From 5a698ed1711391d8837cdeab0e84a3ab7416470e Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Fri, 24 Mar 2023 21:36:10 +0000 Subject: [PATCH 01/75] Transform error messages --- lib/main.js | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/main.js b/lib/main.js index e19ce93..9ccbaad 100644 --- a/lib/main.js +++ b/lib/main.js @@ -25,7 +25,7 @@ var allocUnsafe = require( '@stdlib/buffer-alloc-unsafe' ); var ctors = require( '@stdlib/array-typed-ctors' ); var zeros = require( '@stdlib/array-base-zeros' ); var bytesPerElement = require( '@stdlib/ndarray-base-bytes-per-element' ); -var format = require( '@stdlib/string-format' ); +var format = require( '@stdlib/error-tools-fmtprodmsg' ); // MAIN // @@ -57,7 +57,7 @@ function empty( length ) { var nb; if ( !isNonNegativeInteger( length ) ) { - throw new TypeError( format( 'invalid argument. First argument must be a nonnegative integer. Value: `%s`.', length ) ); + throw new TypeError( format( 'null2p', length ) ); } if ( arguments.length > 1 ) { dtype = arguments[ 1 ]; diff --git a/package.json b/package.json index 365776b..fc6033b 100644 --- a/package.json +++ b/package.json @@ -45,7 +45,7 @@ "@stdlib/assert-is-uint8array": "^0.0.8", "@stdlib/buffer-alloc-unsafe": "^0.0.7", "@stdlib/ndarray-base-bytes-per-element": "^0.0.8", - "@stdlib/string-format": "^0.0.3", + "@stdlib/error-tools-fmtprodmsg": "^0.0.2", "@stdlib/types": "^0.0.14" }, "devDependencies": { From a026b6dc42894423ff35dd5f16097950ab925ddf Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Fri, 24 Mar 2023 21:38:00 +0000 Subject: [PATCH 02/75] Auto-generated commit --- .editorconfig | 181 - .eslintrc.js | 1 - .gitattributes | 49 - .github/PULL_REQUEST_TEMPLATE.md | 7 - .github/workflows/benchmark.yml | 62 - .github/workflows/cancel.yml | 56 - .github/workflows/close_pull_requests.yml | 44 - .github/workflows/examples.yml | 62 - .github/workflows/npm_downloads.yml | 108 - .github/workflows/productionize.yml | 798 --- .github/workflows/publish.yml | 242 - .github/workflows/test.yml | 97 - .github/workflows/test_bundles.yml | 180 - .github/workflows/test_coverage.yml | 123 - .github/workflows/test_install.yml | 83 - .gitignore | 188 - .npmignore | 227 - .npmrc | 28 - CHANGELOG.md | 5 - CODE_OF_CONDUCT.md | 3 - CONTRIBUTING.md | 3 - Makefile | 534 -- README.md | 24 +- benchmark/benchmark.js | 264 - benchmark/benchmark.length.complex128.js | 93 - benchmark/benchmark.length.complex64.js | 93 - benchmark/benchmark.length.float32.js | 93 - benchmark/benchmark.length.float64.js | 93 - benchmark/benchmark.length.generic.js | 93 - benchmark/benchmark.length.int16.js | 93 - benchmark/benchmark.length.int32.js | 93 - benchmark/benchmark.length.int8.js | 93 - benchmark/benchmark.length.uint16.js | 93 - benchmark/benchmark.length.uint32.js | 93 - benchmark/benchmark.length.uint8.js | 93 - benchmark/benchmark.length.uint8c.js | 93 - branches.md | 53 - docs/repl.txt | 52 - docs/types/test.ts | 77 - examples/index.js | 33 - lib/index.js | 58 - lib/is_buffer_uint8array.js | 47 - lib/main.js | 101 - lib/polyfill.js | 56 - docs/types/index.d.ts => mod.d.ts | 2 +- mod.js | 4 + mod.js.map | 1 + package.json | 80 +- stats.html | 6177 +++++++++++++++++++++ test/test.js | 60 - test/test.main.js | 274 - test/test.polyfill.js | 324 -- 52 files changed, 6189 insertions(+), 5695 deletions(-) delete mode 100644 .editorconfig delete mode 100644 .eslintrc.js delete mode 100644 .gitattributes delete mode 100644 .github/PULL_REQUEST_TEMPLATE.md delete mode 100644 .github/workflows/benchmark.yml delete mode 100644 .github/workflows/cancel.yml delete mode 100644 .github/workflows/close_pull_requests.yml delete mode 100644 .github/workflows/examples.yml delete mode 100644 .github/workflows/npm_downloads.yml delete mode 100644 .github/workflows/productionize.yml delete mode 100644 .github/workflows/publish.yml delete mode 100644 .github/workflows/test.yml delete mode 100644 .github/workflows/test_bundles.yml delete mode 100644 .github/workflows/test_coverage.yml delete mode 100644 .github/workflows/test_install.yml delete mode 100644 .gitignore delete mode 100644 .npmignore delete mode 100644 .npmrc delete mode 100644 CHANGELOG.md delete mode 100644 CODE_OF_CONDUCT.md delete mode 100644 CONTRIBUTING.md delete mode 100644 Makefile delete mode 100644 benchmark/benchmark.js delete mode 100644 benchmark/benchmark.length.complex128.js delete mode 100644 benchmark/benchmark.length.complex64.js delete mode 100644 benchmark/benchmark.length.float32.js delete mode 100644 benchmark/benchmark.length.float64.js delete mode 100644 benchmark/benchmark.length.generic.js delete mode 100644 benchmark/benchmark.length.int16.js delete mode 100644 benchmark/benchmark.length.int32.js delete mode 100644 benchmark/benchmark.length.int8.js delete mode 100644 benchmark/benchmark.length.uint16.js delete mode 100644 benchmark/benchmark.length.uint32.js delete mode 100644 benchmark/benchmark.length.uint8.js delete mode 100644 benchmark/benchmark.length.uint8c.js delete mode 100644 branches.md delete mode 100644 docs/repl.txt delete mode 100644 docs/types/test.ts delete mode 100644 examples/index.js delete mode 100644 lib/index.js delete mode 100644 lib/is_buffer_uint8array.js delete mode 100644 lib/main.js delete mode 100644 lib/polyfill.js rename docs/types/index.d.ts => mod.d.ts (99%) create mode 100644 mod.js create mode 100644 mod.js.map create mode 100644 stats.html delete mode 100644 test/test.js delete mode 100644 test/test.main.js delete mode 100644 test/test.polyfill.js diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index 0fd4d6c..0000000 --- a/.editorconfig +++ /dev/null @@ -1,181 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# EditorConfig configuration file (see ). - -# Indicate that this file is a root-level configuration file: -root = true - -# Set properties for all files: -[*] -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true - -# Set properties for JavaScript files: -[*.{js,js.txt}] -indent_style = tab - -# Set properties for JavaScript ES module files: -[*.{mjs,mjs.txt}] -indent_style = tab - -# Set properties for JavaScript CommonJS files: -[*.{cjs,cjs.txt}] -indent_style = tab - -# Set properties for JSON files: -[*.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `cli_opts.json` files: -[cli_opts.json] -indent_style = tab - -# Set properties for TypeScript files: -[*.ts] -indent_style = tab - -# Set properties for Python files: -[*.{py,py.txt}] -indent_style = space -indent_size = 4 - -# Set properties for Julia files: -[*.{jl,jl.txt}] -indent_style = tab - -# Set properties for R files: -[*.{R,R.txt}] -indent_style = tab - -# Set properties for C files: -[*.{c,c.txt}] -indent_style = tab - -# Set properties for C header files: -[*.{h,h.txt}] -indent_style = tab - -# Set properties for C++ files: -[*.{cpp,cpp.txt}] -indent_style = tab - -# Set properties for C++ header files: -[*.{hpp,hpp.txt}] -indent_style = tab - -# Set properties for Fortran files: -[*.{f,f.txt}] -indent_style = space -indent_size = 2 -insert_final_newline = false - -# Set properties for shell files: -[*.{sh,sh.txt}] -indent_style = tab - -# Set properties for AWK files: -[*.{awk,awk.txt}] -indent_style = tab - -# Set properties for HTML files: -[*.{html,html.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for XML files: -[*.{xml,xml.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for CSS files: -[*.{css,css.txt}] -indent_style = tab - -# Set properties for Makefiles: -[Makefile] -indent_style = tab - -[*.{mk,mk.txt}] -indent_style = tab - -# Set properties for Markdown files: -[*.{md,md.txt}] -indent_style = space -indent_size = 4 -trim_trailing_whitespace = false - -# Set properties for `usage.txt` files: -[usage.txt] -indent_style = space -indent_size = 2 - -# Set properties for `repl.txt` files: -[repl.txt] -indent_style = space -indent_size = 4 - -# Set properties for `package.json` files: -[package.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `datapackage.json` files: -[datapackage.json] -indent_style = space -indent_size = 2 - -# Set properties for `manifest.json` files: -[manifest.json] -indent_style = space -indent_size = 2 - -# Set properties for `tslint.json` files: -[tslint.json] -indent_style = space -indent_size = 2 - -# Set properties for `tsconfig.json` files: -[tsconfig.json] -indent_style = space -indent_size = 2 - -# Set properties for LaTeX files: -[*.{tex,tex.txt}] -indent_style = tab - -# Set properties for LaTeX Bibliography files: -[*.{bib,bib.txt}] -indent_style = tab - -# Set properties for YAML files: -[*.{yml,yml.txt}] -indent_style = space -indent_size = 2 - -# Set properties for GYP files: -[binding.gyp] -indent_style = space -indent_size = 2 - -[*.gypi] -indent_style = space -indent_size = 2 diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index 5f30286..0000000 --- a/.eslintrc.js +++ /dev/null @@ -1 +0,0 @@ -/* For the `eslint` rules of this project, consult the main repository at https://github.com/stdlib-js/stdlib */ diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index 10a16e6..0000000 --- a/.gitattributes +++ /dev/null @@ -1,49 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Configuration file which assigns attributes to pathnames. -# -# [1]: https://git-scm.com/docs/gitattributes - -# Automatically normalize the line endings of any committed text files: -* text=auto - -# Override line endings for certain files on checkout: -*.crlf.csv text eol=crlf - -# Denote that certain files are binary and should not be modified: -*.png binary -*.jpg binary -*.jpeg binary -*.gif binary -*.ico binary -*.gz binary -*.zip binary -*.7z binary -*.mp3 binary -*.mp4 binary -*.mov binary - -# Override what is considered "vendored" by GitHub's linguist: -/deps/** linguist-vendored=false -/lib/node_modules/** linguist-vendored=false linguist-generated=false -test/fixtures/** linguist-vendored=false -tools/** linguist-vendored=false - -# Override what is considered "documentation" by GitHub's linguist: -examples/** linguist-documentation=false diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index 96f81a8..0000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,7 +0,0 @@ - - -We are excited about your pull request, but unfortunately we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/empty) of the main repository where we’ll review and provide feedback. - -If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. You may also consult the [development guide](https://github.com/stdlib-js/stdlib/blob/develop/docs/development.md) for help on developing stdlib. - -We look forward to receiving your contribution! :smiley: \ No newline at end of file diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml deleted file mode 100644 index 06a9a75..0000000 --- a/.github/workflows/benchmark.yml +++ /dev/null @@ -1,62 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: benchmark - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run benchmarks: - benchmark: - - # Define a display name: - name: 'Run benchmarks' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - uses: actions/checkout@v3 - - # Install Node.js: - - name: 'Install Node.js' - uses: actions/setup-node@v3 - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run benchmarks: - - name: 'Run benchmarks' - run: | - npm run benchmark diff --git a/.github/workflows/cancel.yml b/.github/workflows/cancel.yml deleted file mode 100644 index a00dbe5..0000000 --- a/.github/workflows/cancel.yml +++ /dev/null @@ -1,56 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: cancel - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to cancel existing workflow runs: - cancel: - - # Define a display name: - name: 'Cancel workflow runs' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Time limit: - timeout-minutes: 3 - - # Define the sequence of job steps... - steps: - - # Cancel existing workflow runs: - - name: 'Cancel existing workflow runs' - uses: styfle/cancel-workflow-action@0.11.0 - with: - workflow_id: >- - benchmark.yml, - examples.yml, - test.yml, - test_coverage.yml, - test_install.yml, - publish.yml - access_token: ${{ github.token }} diff --git a/.github/workflows/close_pull_requests.yml b/.github/workflows/close_pull_requests.yml deleted file mode 100644 index 38d3aa3..0000000 --- a/.github/workflows/close_pull_requests.yml +++ /dev/null @@ -1,44 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: close_pull_requests - -# Workflow triggers: -on: - pull_request_target: - types: [opened] - -# Workflow jobs: -jobs: - run: - runs-on: ubuntu-latest - steps: - - uses: superbrothers/close-pull-request@v3 - with: - comment: | - Thank you for submitting a pull request. :raised_hands: - - We greatly appreciate your willingness to submit a contribution. However, we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). - - We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/empty) of the main repository where we’ll review and provide feedback. If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. - - Thank you again, and we look forward to receiving your contribution! :smiley: - - Best, - The stdlib team \ No newline at end of file diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml deleted file mode 100644 index 7902a7d..0000000 --- a/.github/workflows/examples.yml +++ /dev/null @@ -1,62 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: examples - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run the package examples... - examples: - - # Define display name: - name: 'Run examples' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout the repository' - uses: actions/checkout@v3 - - # Install Node.js: - - name: 'Install Node.js' - uses: actions/setup-node@v3 - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run examples: - - name: 'Run examples' - run: | - npm run examples diff --git a/.github/workflows/npm_downloads.yml b/.github/workflows/npm_downloads.yml deleted file mode 100644 index 32477d3..0000000 --- a/.github/workflows/npm_downloads.yml +++ /dev/null @@ -1,108 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: npm_downloads - -# Workflow triggers: -on: - # Run this workflow weekly: - schedule: - # cron: ' ' - - cron: '49 1 * * 5' - - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job for retrieving npm download counts... - npm_downloads: - - # Define display name: - name: 'Retrieve npm download counts' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - uses: actions/checkout@v3 - timeout-minutes: 10 - - # Install Node.js: - - name: 'Install Node.js' - uses: actions/setup-node@v3 - with: - node-version: 16 - timeout-minutes: 5 - - # Resolve package name: - - name: 'Resolve package name' - id: package_name - run: | - name=`node -e 'console.log(require("./package.json").name)' | tr -d '\n'` - echo "package_name=$name" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Fetch download data: - - name: 'Fetch data' - id: download_data - run: | - url="https://api.npmjs.org/downloads/range/$(date --date='1 year ago' '+%Y-%m-%d'):$(date '+%Y-%m-%d')/${{ steps.package_name.outputs.package_name }}" - echo "$url" - data=$(curl "$url") - mkdir ./tmp - echo "$data" > ./tmp/npm_downloads.json - echo "data=$data" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Print summary of download data: - - name: 'Print summary' - run: | - echo "| Date | Downloads |" >> $GITHUB_STEP_SUMMARY - echo "|------|------------|" >> $GITHUB_STEP_SUMMARY - cat ./tmp/npm_downloads.json | jq -r ".downloads | .[-14:] | to_entries | map(\"| \(.value.day) | \(.value.downloads) |\") |.[]" >> $GITHUB_STEP_SUMMARY - - # Upload the download data: - - name: 'Upload data' - uses: actions/upload-artifact@v3 - with: - # Define a name for the uploaded artifact (ensuring a unique name for each job): - name: npm_downloads - - # Specify the path to the file to upload: - path: ./tmp/npm_downloads.json - - # Specify the number of days to retain the artifact (default is 90 days): - retention-days: 90 - timeout-minutes: 10 - if: success() - - # Send data to events server: - - name: 'Post data' - uses: distributhor/workflow-webhook@v3 - env: - webhook_url: ${{ secrets.STDLIB_NPM_DOWNLOADS_URL }} - webhook_secret: ${{ secrets.STDLIB_WEBHOOK_SECRET }} - data: '{ "downloads": ${{ steps.download_data.outputs.data }} }' - timeout-minutes: 5 - if: success() diff --git a/.github/workflows/productionize.yml b/.github/workflows/productionize.yml deleted file mode 100644 index 3e8e2db..0000000 --- a/.github/workflows/productionize.yml +++ /dev/null @@ -1,798 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: productionize - -# Workflow triggers: -on: - # Run workflow when a new commit is pushed to the main branch: - push: - branches: - - main - - # Allow the workflow to be manually run: - workflow_dispatch: - inputs: - require-passing-tests: - description: 'Require passing tests for creating bundles' - type: boolean - default: true - - # Run workflow upon completion of `publish` workflow run: - workflow_run: - workflows: ["publish"] - types: [completed] - - -# Concurrency group to prevent multiple concurrent executions: -concurrency: - group: productionize - cancel-in-progress: true - -# Workflow jobs: -jobs: - - # Define a job to create a production build... - productionize: - - # Define display name: - name: 'Productionize' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - # Checkout main branch of repository: - - name: 'Checkout main branch' - uses: actions/checkout@v3 - with: - ref: main - - # Install Node.js: - - name: 'Install Node.js' - uses: actions/setup-node@v3 - with: - node-version: 16 - timeout-minutes: 5 - - # Create production branch: - - name: 'Create production branch' - run: | - git checkout -b production - - # Transform error messages: - - name: 'Transform error messages' - id: transform-error-messages - uses: stdlib-js/transform-errors-action@main - - # Format error messages: - - name: 'Replace double quotes with single quotes in rewritten format string error messages' - run: | - find . -name "*.js" -exec sed -E -i "s/Error\( format\( \"([a-zA-Z0-9]+)\"/Error\( format\( '\1'/g" {} \; - - # Format string literal error messages: - - name: 'Replace double quotes with single quotes in rewritten string literal error messages' - run: | - find . -name "*.js" -exec sed -E -i "s/Error\( format\(\"([a-zA-Z0-9]+)\"\)/Error\( format\( '\1' \)/g" {} \; - - # Format code: - - name: 'Replace double quotes with single quotes in inserted `require` calls' - run: | - find . -name "*.js" -exec sed -E -i "s/require\( ?\"@stdlib\/error-tools-fmtprodmsg\" ?\);/require\( '@stdlib\/error-tools-fmtprodmsg' \);/g" {} \; - - # Change `@stdlib/string-format` to `@stdlib/error-tools-fmtprodmsg` in package.json if the former is a dependency, otherwise insert it as a dependency: - - name: 'Update dependencies in package.json' - run: | - PKG_VERSION=$(npm view @stdlib/error-tools-fmtprodmsg version) - if grep -q '"@stdlib/string-format"' package.json; then - sed -i "s/\"@stdlib\/string-format\": \"^.*\"/\"@stdlib\/error-tools-fmtprodmsg\": \"^$PKG_VERSION\"/g" package.json - else - node -e "var pkg = require( './package.json' ); pkg.dependencies[ '@stdlib/error-tools-fmtprodmsg' ] = '^$PKG_VERSION'; require( 'fs' ).writeFileSync( 'package.json', JSON.stringify( pkg, null, 2 ) );" - fi - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Transform error messages" - - # Push changes: - - name: 'Push changes' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" production --force - - # Define a job for running tests of the productionized code... - test: - - # Define a display name: - name: 'Run Tests' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Indicate that this job depends on the prior job finishing: - needs: productionize - - # Run this job regardless of the outcome of the prior job: - if: always() - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - uses: actions/checkout@v3 - with: - # Use the `production` branch: - ref: production - - # Install Node.js: - - name: 'Install Node.js' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - uses: actions/setup-node@v3 - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Build native add-on if present: - - name: 'Build native add-on (if present)' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - run: | - if [ -f "binding.gyp" ]; then - npm install node-gyp --no-save && ./node_modules/.bin/node-gyp rebuild - fi - - # Run tests: - - name: 'Run tests' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: tests - run: | - npm test || npm test || npm test - - # Define job to create a bundle for use in Deno... - deno: - - # Define display name: - name: 'Create Deno bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - uses: actions/checkout@v3 - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `deno` branch exists: - - name: 'Check if remote `deno` branch exists' - id: deno-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin deno - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `deno` exists, delete everything in branch and merge `production` into it - - name: 'If `deno` exists, delete everything in branch and merge `production` into it' - if: steps.deno-branch-exists.outputs.remote-exists - run: | - git checkout -b deno origin/deno - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `deno` does not exist, create `deno` branch: - - name: 'If `deno` does not exist, create `deno` branch' - if: ${{ steps.deno-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b deno - - # Copy files to deno directory: - - name: 'Copy files to deno directory' - run: | - mkdir -p deno - cp README.md LICENSE CONTRIBUTORS NOTICE ./deno - - # Copy TypeScript definitions to deno directory: - if [ -d index.d.ts ]; then - cp index.d.ts ./deno/index.d.ts - fi - if [ -e ./docs/types/index.d.ts ]; then - cp ./docs/types/index.d.ts ./deno/mod.d.ts - fi - - # Install Node.js: - - name: 'Install Node.js' - uses: actions/setup-node@v3 - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: Install production and development dependencies - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Bundle package for use in Deno: - - name: 'Bundle package for Deno' - id: deno-bundle - uses: stdlib-js/bundle-action@main - with: - target: 'deno' - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - # Replace links to other packages with links to the deno branch: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/deno/"; - - # Replace reference to `@stdlib/types` with CDN link: - find ./deno -type f -name '*.ts' -print0 | xargs -0 sed -Ei "s/\/\/\/ /\/\/\/ /g" - - # Change wording of project description to avoid reference to JavaScript and Node.js: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "s/a standard library for JavaScript and Node.js, /a standard library /g" - - # Rewrite all `require()`s to use jsDelivr links: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/require\( '@stdlib\// { - s/(var|let|const)\s+([a-z0-9_]+)\s+=\s*require\( '([^']+)' \);/import \2 from \'\3\';/i - s/@stdlib/https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js/ - s/';/@deno\/mod.js';/ - }" - - # Rewrite first `import` to show importing of named exports if available: - exports=$(cat lib/index.js | \ - grep -E 'setReadOnly\(.*,.*,.*\)' | \ - sed -E 's/setReadOnly\((.*),(.*),(.*)\);/\2/' | \ - sed -E "s/'//g" | \ - sort) - if [ -n "$exports" ]; then - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\nimport\s+([a-zA-Z0-9_]+)\s+from\s*'([^']+)';\n\`\`\`/\`\`\`javascript\nimport \1 from '\2';\n\`\`\`\n\nYou can also import the following named exports from the package:\n\n\`\`\`javascript\nimport { $(echo $exports | sed -E 's/ /, /g') } from '\2';\n\`\`\`/" - fi - - # Remove `installation`, `cli`, and `c` sections: - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Create package.json file for deno branch: - jq --indent 2 '{"name": .name, "version": .version, "description": .description, "license": .license, "type": "module", "main": "./mod.js", "homepage": .homepage, "repository": .repository, "bugs": .bugs, "keywords": .keywords, "funding": .funding}' package.json > ./deno/package.json - - # Delete everything in current directory aside from deno folder: - - name: 'Delete everything in current directory aside from deno folder' - run: | - find . -type 'f' | grep -v -e "deno" -e ".git/" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e "deno" -e ".git" | xargs -r rm -rf - - # Move deno directory to root: - - name: 'Move deno directory to root' - run: | - mv ./deno/* . - rmdir ./deno - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Auto-generated commit" - - # Push changes to `deno` branch: - - name: 'Push changes to `deno` branch' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" deno - - # Send status to Slack channel if job fails: - - name: 'Send status to Slack channel in case of failure' - uses: act10ns/slack@v1 - with: - status: ${{ job.status }} - steps: ${{ toJson(steps) }} - channel: '#npm-ci' - if: failure() - - # Define job to create a UMD bundle... - umd: - - # Define display name: - name: 'Create UMD bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - uses: actions/checkout@v3 - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `umd` branch exists: - - name: 'Check if remote `umd` branch exists' - id: umd-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin umd - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `umd` exists, delete everything in branch and merge `production` into it - - name: 'If `umd` exists, delete everything in branch and merge `production` into it' - if: steps.umd-branch-exists.outputs.remote-exists - run: | - git checkout -b umd origin/umd - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `umd` does not exist, create `umd` branch: - - name: 'If `umd` does not exist, create `umd` branch' - if: ${{ steps.umd-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b umd - - # Copy files to umd directory: - - name: 'Copy files to umd directory' - run: | - mkdir -p umd - cp README.md LICENSE CONTRIBUTORS NOTICE ./umd - - # Install Node.js - - name: 'Install Node.js' - uses: actions/setup-node@v3 - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Extract alias: - - name: 'Extract alias' - id: extract-alias - run: | - alias=$(grep -E 'require\(' README.md | head -n 1 | sed -E 's/^var ([a-zA-Z0-9_]+) = .+/\1/') - echo "alias=${alias}" >> $GITHUB_OUTPUT - - # Create Universal Module Definition (UMD) Node.js bundle: - - name: 'Create Universal Module Definition (UMD) Node.js bundle' - id: umd-bundle-node - uses: stdlib-js/bundle-action@main - with: - target: 'umd-node' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Create Universal Module Definition (UMD) browser bundle: - - name: 'Create Universal Module Definition (UMD) browser bundle' - id: umd-bundle-browser - uses: stdlib-js/bundle-action@main - with: - target: 'umd-browser' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - - # Replace links to other packages with links to the umd branch: - find ./umd -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/umd/"; - - # Remove `installation`, `cli`, and `c` sections: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Rewrite first `require()` to show consumption of the UMD bundle in Observable and via a `script` tag: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\n(var|let|const)\s+([a-zA-Z0-9_]+)\s+=\s*require\( '\@stdlib\/([^']+)' \);\n\`\`\`/To use in Observable,\n\n\`\`\`javascript\n\2 = require\( 'https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js\/\3\@umd\/browser.js' \)\n\`\`\`\n\nTo vendor stdlib functionality and avoid installing dependency trees for Node.js, you can use the UMD server build:\n\n\`\`\`javascript\nvar \2 = require\( 'path\/to\/vendor\/umd\/\3\/index.js' \)\n\`\`\`\n\nTo include the bundle in a webpage,\n\n\`\`\`html\n + + + + diff --git a/test/test.js b/test/test.js deleted file mode 100644 index 8e62cb8..0000000 --- a/test/test.js +++ /dev/null @@ -1,60 +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 proxyquire = require( 'proxyquire' ); -var main = require( './../lib/main.js' ); -var polyfill = require( './../lib/polyfill.js' ); -var empty = require( './../lib' ); - - -// TESTS // - -tape( 'main export is a function', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof empty, 'function', 'main export is a function' ); - t.end(); -}); - -tape( 'if an environment supports Node.js buffer instances inheriting from Uint8Array, the main export supports returning arrays having uninitialized memory', function test( t ) { - var empty = proxyquire( './../lib', { - './is_buffer_uint8array.js': mock - }); - t.strictEqual( empty, main, 'returns expected value' ); - t.end(); - - function mock() { - return true; - } -}); - -tape( 'if an environment does not support Node.js buffer instances inheriting from Uint8Array, the main export supports returning zero-filled arrays', function test( t ) { - var empty = proxyquire( './../lib', { - './is_buffer_uint8array.js': mock - }); - t.strictEqual( empty, polyfill, 'returns expected value' ); - t.end(); - - function mock() { - return false; - } -}); diff --git a/test/test.main.js b/test/test.main.js deleted file mode 100644 index 3ceb26e..0000000 --- a/test/test.main.js +++ /dev/null @@ -1,274 +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 Float64Array = require( '@stdlib/array-float64' ); -var Float32Array = require( '@stdlib/array-float32' ); -var Int32Array = require( '@stdlib/array-int32' ); -var Uint32Array = require( '@stdlib/array-uint32' ); -var Int16Array = require( '@stdlib/array-int16' ); -var Uint16Array = require( '@stdlib/array-uint16' ); -var Int8Array = require( '@stdlib/array-int8' ); -var Uint8Array = require( '@stdlib/array-uint8' ); -var Uint8ClampedArray = require( '@stdlib/array-uint8c' ); -var Complex64Array = require( '@stdlib/array-complex64' ); -var Complex128Array = require( '@stdlib/array-complex128' ); -var instanceOf = require( '@stdlib/assert-instance-of' ); -var empty = require( './../lib/main.js' ); - - -// TESTS // - -tape( 'main export is a function', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof empty, 'function', 'main export is a function' ); - t.end(); -}); - -tape( 'the function throws an error if provided a value other than a nonnegative integer for the first argument', function test( t ) { - var values; - var i; - - values = [ - '5', - -3, - 3.14, - NaN, - true, - false, - null, - void 0, - [], - {}, - function noop() {} - ]; - - for ( i = 0; i < values.length; i++ ) { - t.throws( badValue( values[i] ), TypeError, 'throws an error when provided '+values[i] ); - } - t.end(); - - function badValue( value ) { - return function badValue() { - empty( value ); - }; - } -}); - -tape( 'the function throws an error if provided a value other than a nonnegative integer for the first argument (dtype)', function test( t ) { - var values; - var i; - - values = [ - '5', - -3, - 3.14, - NaN, - true, - false, - null, - void 0, - [], - {}, - function noop() {} - ]; - - for ( i = 0; i < values.length; i++ ) { - t.throws( badValue( values[i] ), TypeError, 'throws an error when provided '+values[i] ); - } - t.end(); - - function badValue( value ) { - return function badValue() { - empty( value, 'float32' ); - }; - } -}); - -tape( 'the function throws an error if provided an unrecognized data type', function test( t ) { - var values; - var i; - - values = [ - '5', - 'beep', - 'empty', - 'Int32', - 'Uint32', - 'Int16', - 'Uint16', - 'Int8', - 'Uint8', - 'Uint8c', - 'uint8_clamped', - 'Float64', - 'Float32', - 'FLOAT64', - 'FLOAT32', - 'GENERIC' - ]; - - for ( i = 0; i < values.length; i++ ) { - t.throws( badValue( values[i] ), TypeError, 'throws an error when provided '+values[i] ); - } - t.end(); - - function badValue( value ) { - return function badValue() { - empty( 10, value ); - }; - } -}); - -tape( 'the function returns an empty array (default)', function test( t ) { - var arr; - - arr = empty( 5 ); - t.strictEqual( instanceOf( arr, Float64Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=float64)', function test( t ) { - var arr; - - arr = empty( 5, 'float64' ); - t.strictEqual( instanceOf( arr, Float64Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=float32)', function test( t ) { - var arr; - - arr = empty( 5, 'float32' ); - t.strictEqual( instanceOf( arr, Float32Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=complex128)', function test( t ) { - var arr; - - arr = empty( 5, 'complex128' ); - t.strictEqual( instanceOf( arr, Complex128Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=complex64)', function test( t ) { - var arr; - - arr = empty( 5, 'complex64' ); - t.strictEqual( instanceOf( arr, Complex64Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=int32)', function test( t ) { - var arr; - - arr = empty( 5, 'int32' ); - t.strictEqual( instanceOf( arr, Int32Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=uint32)', function test( t ) { - var arr; - - arr = empty( 5, 'uint32' ); - t.strictEqual( instanceOf( arr, Uint32Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=int16)', function test( t ) { - var arr; - - arr = empty( 5, 'int16' ); - t.strictEqual( instanceOf( arr, Int16Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=uint16)', function test( t ) { - var arr; - - arr = empty( 5, 'uint16' ); - t.strictEqual( instanceOf( arr, Uint16Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=int8)', function test( t ) { - var arr; - - arr = empty( 5, 'int8' ); - t.strictEqual( instanceOf( arr, Int8Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=uint8)', function test( t ) { - var arr; - - arr = empty( 5, 'uint8' ); - t.strictEqual( instanceOf( arr, Uint8Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=uint8c)', function test( t ) { - var arr; - - arr = empty( 5, 'uint8c' ); - t.strictEqual( instanceOf( arr, Uint8ClampedArray ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=generic)', function test( t ) { - var expected; - var arr; - - expected = [ 0, 0, 0, 0, 0 ]; - - arr = empty( 5, 'generic' ); - t.strictEqual( instanceOf( arr, Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); diff --git a/test/test.polyfill.js b/test/test.polyfill.js deleted file mode 100644 index 17b99f3..0000000 --- a/test/test.polyfill.js +++ /dev/null @@ -1,324 +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 Float64Array = require( '@stdlib/array-float64' ); -var Float32Array = require( '@stdlib/array-float32' ); -var Int32Array = require( '@stdlib/array-int32' ); -var Uint32Array = require( '@stdlib/array-uint32' ); -var Int16Array = require( '@stdlib/array-int16' ); -var Uint16Array = require( '@stdlib/array-uint16' ); -var Int8Array = require( '@stdlib/array-int8' ); -var Uint8Array = require( '@stdlib/array-uint8' ); -var Uint8ClampedArray = require( '@stdlib/array-uint8c' ); -var Complex64Array = require( '@stdlib/array-complex64' ); -var Complex128Array = require( '@stdlib/array-complex128' ); -var reinterpret64 = require( '@stdlib/strided-base-reinterpret-complex64' ); -var reinterpret128 = require( '@stdlib/strided-base-reinterpret-complex128' ); -var instanceOf = require( '@stdlib/assert-instance-of' ); -var empty = require( './../lib/polyfill.js' ); - - -// TESTS // - -tape( 'main export is a function', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof empty, 'function', 'main export is a function' ); - t.end(); -}); - -tape( 'the function throws an error if provided a value other than a nonnegative integer for the first argument', function test( t ) { - var values; - var i; - - values = [ - '5', - -3, - 3.14, - NaN, - true, - false, - null, - void 0, - [], - {}, - function noop() {} - ]; - - for ( i = 0; i < values.length; i++ ) { - t.throws( badValue( values[i] ), TypeError, 'throws an error when provided '+values[i] ); - } - t.end(); - - function badValue( value ) { - return function badValue() { - empty( value ); - }; - } -}); - -tape( 'the function throws an error if provided a value other than a nonnegative integer for the first argument (dtype)', function test( t ) { - var values; - var i; - - values = [ - '5', - -3, - 3.14, - NaN, - true, - false, - null, - void 0, - [], - {}, - function noop() {} - ]; - - for ( i = 0; i < values.length; i++ ) { - t.throws( badValue( values[i] ), TypeError, 'throws an error when provided '+values[i] ); - } - t.end(); - - function badValue( value ) { - return function badValue() { - empty( value, 'float32' ); - }; - } -}); - -tape( 'the function throws an error if provided an unrecognized data type', function test( t ) { - var values; - var i; - - values = [ - '5', - 'beep', - 'empty', - 'Int32', - 'Uint32', - 'Int16', - 'Uint16', - 'Int8', - 'Uint8', - 'Uint8c', - 'uint8_clamped', - 'Float64', - 'Float32', - 'FLOAT64', - 'FLOAT32', - 'GENERIC' - ]; - - for ( i = 0; i < values.length; i++ ) { - t.throws( badValue( values[i] ), TypeError, 'throws an error when provided '+values[i] ); - } - t.end(); - - function badValue( value ) { - return function badValue() { - empty( 10, value ); - }; - } -}); - -tape( 'the function returns a zero-filled array (default)', function test( t ) { - var expected; - var arr; - - expected = new Float64Array( [ 0.0, 0.0, 0.0, 0.0, 0.0 ] ); - - arr = empty( 5 ); - t.strictEqual( instanceOf( arr, Float64Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=float64)', function test( t ) { - var expected; - var arr; - - expected = new Float64Array( [ 0.0, 0.0, 0.0, 0.0, 0.0 ] ); - - arr = empty( 5, 'float64' ); - t.strictEqual( instanceOf( arr, Float64Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=float32)', function test( t ) { - var expected; - var arr; - - expected = new Float32Array( [ 0.0, 0.0, 0.0, 0.0, 0.0 ] ); - - arr = empty( 5, 'float32' ); - t.strictEqual( instanceOf( arr, Float32Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=complex128)', function test( t ) { - var expected; - var arr; - - expected = new Float64Array( [ 0.0, 0.0, 0.0, 0.0 ] ); - - arr = empty( 2, 'complex128' ); - t.strictEqual( instanceOf( arr, Complex128Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length/2, 'returns expected value' ); - t.deepEqual( reinterpret128( arr, 0 ), expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=complex64)', function test( t ) { - var expected; - var arr; - - expected = new Float32Array( [ 0.0, 0.0, 0.0, 0.0 ] ); - - arr = empty( 2, 'complex64' ); - t.strictEqual( instanceOf( arr, Complex64Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length/2, 'returns expected value' ); - t.deepEqual( reinterpret64( arr, 0 ), expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=int32)', function test( t ) { - var expected; - var arr; - - expected = new Int32Array( [ 0, 0, 0, 0, 0 ] ); - - arr = empty( 5, 'int32' ); - t.strictEqual( instanceOf( arr, Int32Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=uint32)', function test( t ) { - var expected; - var arr; - - expected = new Uint32Array( [ 0, 0, 0, 0, 0 ] ); - - arr = empty( 5, 'uint32' ); - t.strictEqual( instanceOf( arr, Uint32Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=int16)', function test( t ) { - var expected; - var arr; - - expected = new Int16Array( [ 0, 0, 0, 0, 0 ] ); - - arr = empty( 5, 'int16' ); - t.strictEqual( instanceOf( arr, Int16Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=uint16)', function test( t ) { - var expected; - var arr; - - expected = new Uint16Array( [ 0, 0, 0, 0, 0 ] ); - - arr = empty( 5, 'uint16' ); - t.strictEqual( instanceOf( arr, Uint16Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=int8)', function test( t ) { - var expected; - var arr; - - expected = new Int8Array( [ 0, 0, 0, 0, 0 ] ); - - arr = empty( 5, 'int8' ); - t.strictEqual( instanceOf( arr, Int8Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=uint8)', function test( t ) { - var expected; - var arr; - - expected = new Uint8Array( [ 0, 0, 0, 0, 0 ] ); - - arr = empty( 5, 'uint8' ); - t.strictEqual( instanceOf( arr, Uint8Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=uint8c)', function test( t ) { - var expected; - var arr; - - expected = new Uint8ClampedArray( [ 0, 0, 0, 0, 0 ] ); - - arr = empty( 5, 'uint8c' ); - t.strictEqual( instanceOf( arr, Uint8ClampedArray ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=generic)', function test( t ) { - var expected; - var arr; - - expected = [ 0, 0, 0, 0, 0 ]; - - arr = empty( 5, 'generic' ); - t.strictEqual( instanceOf( arr, Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); From 6e6405c635bdd67df134e8dbab4a47c8eb7ccbeb Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Mon, 31 Jul 2023 15:13:23 +0000 Subject: [PATCH 03/75] Transform error messages --- lib/main.js | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/main.js b/lib/main.js index e19ce93..9ccbaad 100644 --- a/lib/main.js +++ b/lib/main.js @@ -25,7 +25,7 @@ var allocUnsafe = require( '@stdlib/buffer-alloc-unsafe' ); var ctors = require( '@stdlib/array-typed-ctors' ); var zeros = require( '@stdlib/array-base-zeros' ); var bytesPerElement = require( '@stdlib/ndarray-base-bytes-per-element' ); -var format = require( '@stdlib/string-format' ); +var format = require( '@stdlib/error-tools-fmtprodmsg' ); // MAIN // @@ -57,7 +57,7 @@ function empty( length ) { var nb; if ( !isNonNegativeInteger( length ) ) { - throw new TypeError( format( 'invalid argument. First argument must be a nonnegative integer. Value: `%s`.', length ) ); + throw new TypeError( format( 'null2p', length ) ); } if ( arguments.length > 1 ) { dtype = arguments[ 1 ]; diff --git a/package.json b/package.json index b0f70e2..ebc740c 100644 --- a/package.json +++ b/package.json @@ -45,7 +45,7 @@ "@stdlib/assert-is-uint8array": "^0.0.8", "@stdlib/buffer-alloc-unsafe": "^0.0.7", "@stdlib/ndarray-base-bytes-per-element": "^0.0.8", - "@stdlib/string-format": "^0.0.3", + "@stdlib/error-tools-fmtprodmsg": "^0.0.2", "@stdlib/types": "^0.0.14" }, "devDependencies": { From 65268638f752abc4611e3397c17bebf5bdb97190 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Mon, 31 Jul 2023 15:14:34 +0000 Subject: [PATCH 04/75] Remove files --- mod.d.ts | 277 --- mod.js | 4 - mod.js.map | 1 - stats.html | 6177 ---------------------------------------------------- 4 files changed, 6459 deletions(-) delete mode 100644 mod.d.ts delete mode 100644 mod.js delete mode 100644 mod.js.map delete mode 100644 stats.html diff --git a/mod.d.ts b/mod.d.ts deleted file mode 100644 index ed25296..0000000 --- a/mod.d.ts +++ /dev/null @@ -1,277 +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: 2.0 - -/// - -import { Complex128Array, Complex64Array, DataType } from '@stdlib/types/array'; - -/** -* Creates an uninitialized array having a specified length. -* -* ## Notes -* -* - In browser environments, the function always returns zero-filled arrays. -* - In Node.js versions `>=3.0.0`, the underlying memory of returned typed arrays is **not** initialized. Memory contents are unknown and may contain **sensitive** data. -* -* @param length - array length -* @param dtype - data type -* @returns empty array -* -* @example -* var arr = empty( 2, 'float64' ); -* // returns -*/ -declare function empty( length: number, dtype: 'float64' ): Float64Array; - -/** -* Creates an uninitialized array having a specified length. -* -* ## Notes -* -* - In browser environments, the function always returns zero-filled arrays. -* - In Node.js versions `>=3.0.0`, the underlying memory of returned typed arrays is **not** initialized. Memory contents are unknown and may contain **sensitive** data. -* -* @param length - array length -* @param dtype - data type -* @returns empty array -* -* @example -* var arr = empty( 2, 'float32' ); -* // returns -*/ -declare function empty( length: number, dtype: 'float32' ): Float32Array; - -/** -* Creates an uninitialized array having a specified length. -* -* ## Notes -* -* - In browser environments, the function always returns zero-filled arrays. -* - In Node.js versions `>=3.0.0`, the underlying memory of returned typed arrays is **not** initialized. Memory contents are unknown and may contain **sensitive** data. -* -* @param length - array length -* @param dtype - data type -* @returns empty array -* -* @example -* var arr = empty( 2, 'complex128' ); -* // returns -*/ -declare function empty( length: number, dtype: 'complex128' ): Complex128Array; - -/** -* Creates an uninitialized array having a specified length. -* -* ## Notes -* -* - In browser environments, the function always returns zero-filled arrays. -* - In Node.js versions `>=3.0.0`, the underlying memory of returned typed arrays is **not** initialized. Memory contents are unknown and may contain **sensitive** data. -* -* @param length - array length -* @param dtype - data type -* @returns empty array -* -* @example -* var arr = empty( 2, 'complex64' ); -* // returns -*/ -declare function empty( length: number, dtype: 'complex64' ): Complex64Array; - -/** -* Creates an uninitialized array having a specified length. -* -* ## Notes -* -* - In browser environments, the function always returns zero-filled arrays. -* - In Node.js versions `>=3.0.0`, the underlying memory of returned typed arrays is **not** initialized. Memory contents are unknown and may contain **sensitive** data. -* -* @param length - array length -* @param dtype - data type -* @returns empty array -* -* @example -* var arr = empty( 2, 'int32' ); -* // returns -*/ -declare function empty( length: number, dtype: 'int32' ): Int32Array; - -/** -* Creates an uninitialized array having a specified length. -* -* ## Notes -* -* - In browser environments, the function always returns zero-filled arrays. -* - In Node.js versions `>=3.0.0`, the underlying memory of returned typed arrays is **not** initialized. Memory contents are unknown and may contain **sensitive** data. -* -* @param length - array length -* @param dtype - data type -* @returns empty array -* -* @example -* var arr = empty( 2, 'int16' ); -* // returns -*/ -declare function empty( length: number, dtype: 'int16' ): Int16Array; - -/** -* Creates an uninitialized array having a specified length. -* -* ## Notes -* -* - In browser environments, the function always returns zero-filled arrays. -* - In Node.js versions `>=3.0.0`, the underlying memory of returned typed arrays is **not** initialized. Memory contents are unknown and may contain **sensitive** data. -* -* @param length - array length -* @param dtype - data type -* @returns empty array -* -* @example -* var arr = empty( 2, 'int8' ); -* // returns -*/ -declare function empty( length: number, dtype: 'int8' ): Int8Array; - -/** -* Creates an uninitialized array having a specified length. -* -* ## Notes -* -* - In browser environments, the function always returns zero-filled arrays. -* - In Node.js versions `>=3.0.0`, the underlying memory of returned typed arrays is **not** initialized. Memory contents are unknown and may contain **sensitive** data. -* -* @param length - array length -* @param dtype - data type -* @returns empty array -* -* @example -* var arr = empty( 2, 'uint32' ); -* // returns -*/ -declare function empty( length: number, dtype: 'uint32' ): Uint32Array; - -/** -* Creates an uninitialized array having a specified length. -* -* ## Notes -* -* - In browser environments, the function always returns zero-filled arrays. -* - In Node.js versions `>=3.0.0`, the underlying memory of returned typed arrays is **not** initialized. Memory contents are unknown and may contain **sensitive** data. -* -* @param length - array length -* @param dtype - data type -* @returns empty array -* -* @example -* var arr = empty( 2, 'uint16' ); -* // returns -*/ -declare function empty( length: number, dtype: 'uint16' ): Uint16Array; - -/** -* Creates an uninitialized array having a specified length. -* -* ## Notes -* -* - In browser environments, the function always returns zero-filled arrays. -* - In Node.js versions `>=3.0.0`, the underlying memory of returned typed arrays is **not** initialized. Memory contents are unknown and may contain **sensitive** data. -* -* @param length - array length -* @param dtype - data type -* @returns empty array -* -* @example -* var arr = empty( 2, 'uint8' ); -* // returns -*/ -declare function empty( length: number, dtype: 'uint8' ): Uint8Array; - -/** -* Creates an uninitialized array having a specified length. -* -* ## Notes -* -* - In browser environments, the function always returns zero-filled arrays. -* - In Node.js versions `>=3.0.0`, the underlying memory of returned typed arrays is **not** initialized. Memory contents are unknown and may contain **sensitive** data. -* -* @param length - array length -* @param dtype - data type -* @returns empty array -* -* @example -* var arr = empty( 2, 'uint8c' ); -* // returns -*/ -declare function empty( length: number, dtype: 'uint8c' ): Uint8ClampedArray; - -/** -* Creates a zero-filled array having a specified length. -* -* @param length - array length -* @param dtype - data type -* @returns zero-filled array -* -* @example -* var arr = empty( 2, 'generic' ); -* // returns -*/ -declare function empty( length: number, dtype: 'generic' ): Array; - -/** -* Creates an uninitialized array having a specified length. -* -* ## Notes -* -* - In browser environments, the function always returns zero-filled arrays. -* - If `dtype` is `'generic'`, the function always returns a zero-filled array. -* - In Node.js versions `>=3.0.0`, the underlying memory of returned typed arrays is **not** initialized. Memory contents are unknown and may contain **sensitive** data. -* -* The function recognizes the following data types: -* -* - `float64`: double-precision floating-point numbers (IEEE 754) -* - `float32`: single-precision floating-point numbers (IEEE 754) -* - `complex128`: double-precision complex floating-point numbers -* - `complex64`: single-precision complex floating-point numbers -* - `int32`: 32-bit two's complement signed integers -* - `uint32`: 32-bit unsigned integers -* - `int16`: 16-bit two's complement signed integers -* - `uint16`: 16-bit unsigned integers -* - `int8`: 8-bit two's complement signed integers -* - `uint8`: 8-bit unsigned integers -* - `uint8c`: 8-bit unsigned integers clamped to `0-255` -* - `generic`: generic JavaScript values -* -* @param length - array length -* @param dtype - data type (default: 'float64') -* @returns empty array -* -* @example -* var arr = empty( 2 ); -* // returns -* -* @example -* var arr = empty( 2, 'float32' ); -* // returns -*/ -declare function empty( length: number, dtype?: DataType ): Float64Array; - - -// EXPORTS // - -export = empty; diff --git a/mod.js b/mod.js deleted file mode 100644 index 6a414ae..0000000 --- a/mod.js +++ /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 -/// -var e="function"==typeof Object.defineProperty?Object.defineProperty:null;var r,t=Object.defineProperty,n=Object.prototype,o=n.toString,i=n.__defineGetter__,a=n.__defineSetter__,u=n.__lookupGetter__,f=n.__lookupSetter__;r=function(){try{return e({},"x",{}),!0}catch(e){return!1}}()?t:function(e,r,t){var l,c,y,s;if("object"!=typeof e||null===e||"[object Array]"===o.call(e))throw new TypeError("invalid argument. First argument must be an object. Value: `"+e+"`.");if("object"!=typeof t||null===t||"[object Array]"===o.call(t))throw new TypeError("invalid argument. Property descriptor must be an object. Value: `"+t+"`.");if((c="value"in t)&&(u.call(e,r)||f.call(e,r)?(l=e.__proto__,e.__proto__=n,delete e[r],e[r]=t.value,e.__proto__=l):e[r]=t.value),y="get"in t,s="set"in t,c&&(y||s))throw new Error("invalid argument. Cannot specify one or more accessors and a value or writable attribute in the property descriptor.");return y&&i&&i.call(e,r,t.get),s&&a&&a.call(e,r,t.set),e};var l=r;function c(e,r,t){l(e,r,{configurable:!1,enumerable:!1,writable:!1,value:t})}function y(e){return"number"==typeof e}var s="function"==typeof Symbol&&"symbol"==typeof Symbol("foo");function h(){return s&&"symbol"==typeof Symbol.toStringTag}var m=Object.prototype.toString;var p=Object.prototype.hasOwnProperty;function g(e,r){return null!=e&&p.call(e,r)}var w="function"==typeof Symbol?Symbol.toStringTag:"";var b=h()?function(e){var r,t,n;if(null==e)return m.call(e);t=e[w],r=g(e,w);try{e[w]=void 0}catch(r){return m.call(e)}return n=m.call(e),r?e[w]=t:delete e[w],n}:function(e){return m.call(e)},v=Number,d=v.prototype.toString;var E=h();function _(e){return"object"==typeof e&&(e instanceof v||(E?function(e){try{return d.call(e),!0}catch(e){return!1}}(e):"[object Number]"===b(e)))}function A(e){return y(e)||_(e)}c(A,"isPrimitive",y),c(A,"isObject",_);var T=Number.POSITIVE_INFINITY,j=v.NEGATIVE_INFINITY,x=Math.floor;function B(e){return x(e)===e}function L(e){return ej&&B(e)}function V(e){return y(e)&&L(e)}function S(e){return _(e)&&L(e.valueOf())}function R(e){return V(e)||S(e)}function k(e){return V(e)&&e>=0}function I(e){return S(e)&&e.valueOf()>=0}function O(e){return k(e)||I(e)}c(R,"isPrimitive",V),c(R,"isObject",S),c(O,"isPrimitive",k),c(O,"isObject",I);var M="function"==typeof Float64Array;var C="function"==typeof Float64Array?Float64Array:null;var N="function"==typeof Float64Array?Float64Array:void 0;var F=function(){var e,r,t;if("function"!=typeof C)return!1;try{r=new C([1,3.14,-3.14,NaN]),t=r,e=(M&&t instanceof Float64Array||"[object Float64Array]"===b(t))&&1===r[0]&&3.14===r[1]&&-3.14===r[2]&&r[3]!=r[3]}catch(r){e=!1}return e}()?N:function(){throw new Error("not implemented")},P="function"==typeof Float32Array;var U="function"==typeof Float32Array?Float32Array:null;var Y="function"==typeof Float32Array?Float32Array:void 0;var W=function(){var e,r,t;if("function"!=typeof U)return!1;try{r=new U([1,3.14,-3.14,5e40]),t=r,e=(P&&t instanceof Float32Array||"[object Float32Array]"===b(t))&&1===r[0]&&3.140000104904175===r[1]&&-3.140000104904175===r[2]&&r[3]===T}catch(r){e=!1}return e}()?Y:function(){throw new Error("not implemented")},G="function"==typeof Int16Array;var J="function"==typeof Int16Array?Int16Array:null;var z="function"==typeof Int16Array?Int16Array:void 0;var X=function(){var e,r,t;if("function"!=typeof J)return!1;try{r=new J([1,3.14,-3.14,32768]),t=r,e=(G&&t instanceof Int16Array||"[object Int16Array]"===b(t))&&1===r[0]&&3===r[1]&&-3===r[2]&&-32768===r[3]}catch(r){e=!1}return e}()?z:function(){throw new Error("not implemented")},q="function"==typeof Int32Array;var D="function"==typeof Int32Array?Int32Array:null;var H="function"==typeof Int32Array?Int32Array:void 0;var K=function(){var e,r,t;if("function"!=typeof D)return!1;try{r=new D([1,3.14,-3.14,2147483648]),t=r,e=(q&&t instanceof Int32Array||"[object Int32Array]"===b(t))&&1===r[0]&&3===r[1]&&-3===r[2]&&-2147483648===r[3]}catch(r){e=!1}return e}()?H:function(){throw new Error("not implemented")},Q="function"==typeof Int8Array;var Z="function"==typeof Int8Array?Int8Array:null;var $="function"==typeof Int8Array?Int8Array:void 0;var ee=function(){var e,r,t;if("function"!=typeof Z)return!1;try{r=new Z([1,3.14,-3.14,128]),t=r,e=(Q&&t instanceof Int8Array||"[object Int8Array]"===b(t))&&1===r[0]&&3===r[1]&&-3===r[2]&&-128===r[3]}catch(r){e=!1}return e}()?$:function(){throw new Error("not implemented")},re="function"==typeof Uint16Array;var te="function"==typeof Uint16Array?Uint16Array:null;var ne="function"==typeof Uint16Array?Uint16Array:void 0;var oe=function(){var e,r,t;if("function"!=typeof te)return!1;try{r=new te(r=[1,3.14,-3.14,65536,65537]),t=r,e=(re&&t instanceof Uint16Array||"[object Uint16Array]"===b(t))&&1===r[0]&&3===r[1]&&65533===r[2]&&0===r[3]&&1===r[4]}catch(r){e=!1}return e}()?ne:function(){throw new Error("not implemented")},ie="function"==typeof Uint32Array;var ae="function"==typeof Uint32Array?Uint32Array:null;var ue="function"==typeof Uint32Array?Uint32Array:void 0;var fe=function(){var e,r,t;if("function"!=typeof ae)return!1;try{r=new ae(r=[1,3.14,-3.14,4294967296,4294967297]),t=r,e=(ie&&t instanceof Uint32Array||"[object Uint32Array]"===b(t))&&1===r[0]&&3===r[1]&&4294967293===r[2]&&0===r[3]&&1===r[4]}catch(r){e=!1}return e}()?ue:function(){throw new Error("not implemented")},le="function"==typeof Uint8Array;var ce="function"==typeof Uint8Array?Uint8Array:null;var ye="function"==typeof Uint8Array?Uint8Array:void 0;var se=function(){var e,r,t;if("function"!=typeof ce)return!1;try{r=new ce(r=[1,3.14,-3.14,256,257]),t=r,e=(le&&t instanceof Uint8Array||"[object Uint8Array]"===b(t))&&1===r[0]&&3===r[1]&&253===r[2]&&0===r[3]&&1===r[4]}catch(r){e=!1}return e}()?ye:function(){throw new Error("not implemented")},he="function"==typeof Uint8ClampedArray;var me="function"==typeof Uint8ClampedArray?Uint8ClampedArray:null;var pe="function"==typeof Uint8ClampedArray?Uint8ClampedArray:void 0;var ge=function(){var e,r,t;if("function"!=typeof me)return!1;try{r=new me([-1,0,1,3.14,4.99,255,256]),t=r,e=(he&&t instanceof Uint8ClampedArray||"[object Uint8ClampedArray]"===b(t))&&0===r[0]&&0===r[1]&&1===r[2]&&3===r[3]&&5===r[4]&&255===r[5]&&255===r[6]}catch(r){e=!1}return e}()?pe:function(){throw new Error("not implemented")};function we(e){return"object"==typeof e&&null!==e&&"number"==typeof e.length&&B(e.length)&&e.length>=0&&e.length<=4294967295}function be(e){return"object"==typeof e&&null!==e&&"number"==typeof e.length&&B(e.length)&&e.length>=0&&e.length<=9007199254740991}var ve="function"==typeof ArrayBuffer;function de(e){return ve&&e instanceof ArrayBuffer||"[object ArrayBuffer]"===b(e)}var Ee=Array.isArray?Array.isArray:function(e){return"[object Array]"===b(e)};function _e(e){return"object"==typeof e&&null!==e&&!Ee(e)}var Ae=/./;function Te(e){return"boolean"==typeof e}var je=Boolean.prototype.toString;var xe=h();function Be(e){return"object"==typeof e&&(e instanceof Boolean||(xe?function(e){try{return je.call(e),!0}catch(e){return!1}}(e):"[object Boolean]"===b(e)))}function Le(e){return Te(e)||Be(e)}function Ve(){return new Function("return this;")()}c(Le,"isPrimitive",Te),c(Le,"isObject",Be);var Se="object"==typeof self?self:null,Re="object"==typeof window?window:null,ke="undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},Ie="object"==typeof ke?ke:null;var Oe=function(e){if(arguments.length){if(!Te(e))throw new TypeError("invalid argument. Must provide a boolean primitive. Value: `"+e+"`.");if(e)return Ve()}if(Se)return Se;if(Re)return Re;if(Ie)return Ie;throw new Error("unexpected error. Unable to resolve global object.")}(),Me=Oe.document&&Oe.document.childNodes,Ce=Int8Array;function Ne(){return/^\s*function\s*([^(]*)/i}var Fe=/^\s*function\s*([^(]*)/i;function Pe(e){return null!==e&&"object"==typeof e}function Ue(e){var r,t,n,o;if(("Object"===(t=b(e).slice(8,-1))||"Error"===t)&&e.constructor){if("string"==typeof(n=e.constructor).name)return n.name;if(r=Fe.exec(n.toString()))return r[1]}return Pe(o=e)&&(o._isBuffer||o.constructor&&"function"==typeof o.constructor.isBuffer&&o.constructor.isBuffer(o))?"Buffer":t}c(Ne,"REGEXP",Fe),c(Pe,"isObjectLikeArray",function(e){if("function"!=typeof e)throw new TypeError("invalid argument. Must provide a function. Value: `"+e+"`.");return function(r){var t,n;if(!Ee(r))return!1;if(0===(t=r.length))return!1;for(n=0;n=2)r.push(n[0],n[1]);else{if(!De(n))return new TypeError("invalid argument. An iterator must return either a two-element array containing real and imaginary components or a complex number. Value: `"+n+"`.");r.push($e(n),er(n))}return r}function lr(e,r,t){var n,o,i,a;for(n=[],a=-1;!(o=e.next()).done;)if(a+=1,we(i=r.call(t,o.value,a))&&i.length>=2)n.push(i[0],i[1]);else{if(!De(i))return new TypeError("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `"+i+"`.");n.push($e(i),er(i))}return n}function cr(e,r){var t,n,o,i;for(t=r.length,i=0,o=0;ot.byteLength-e)throw new RangeError("invalid arguments. ArrayBuffer has insufficient capacity. Either decrease the array length or provide a bigger buffer. Minimum capacity: `"+n*yr+"`.");t=new W(t,e,2*n)}}return c(this,"_buffer",t),c(this,"_length",t.length/2),this}function br(e){return e.re}function vr(e){return e.im}function dr(e){var r,t,n;for(r=[];!(t=e.next()).done;)if(we(n=t.value)&&n.length>=2)r.push(n[0],n[1]);else{if(!De(n))return new TypeError("invalid argument. An iterator must return either a two-element array containing real and imaginary components or a complex number. Value: `"+n+"`.");r.push(br(n),vr(n))}return r}function Er(e,r,t){var n,o,i,a;for(n=[],a=-1;!(o=e.next()).done;)if(a+=1,we(i=r.call(t,o.value,a))&&i.length>=2)n.push(i[0],i[1]);else{if(!De(i))return new TypeError("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `"+i+"`.");n.push(br(i),vr(i))}return n}function _r(e,r){var t,n,o,i;for(t=r.length,i=0,o=0;o1){if(!We(n=arguments[1]))throw new TypeError("invalid argument. Second argument must be a function. Value: `"+n+"`.");t>2&&(r=arguments[2])}if(hr(e)){if(u=e.length,n){for(i=(o=new this(u))._buffer,y=0,c=0;c=2))throw new TypeError("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `"+l+"`.");i[y]=l[0],i[y+1]=l[1]}y+=2}return o}return new this(e)}if(be(e)){if(n){for(u=e.length,a=ur(e),c=0;c=2))throw new TypeError("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `"+l+"`.");i[y]=l[0],i[y+1]=l[1]}y+=2}return o}return new this(e)}if(_e(e)&&sr&&We(e[Qe])){if(!We((i=e[Qe]()).next))throw new TypeError("invalid argument. First argument must be an array-like object or an iterable.");if((a=n?lr(i,n,r):fr(i))instanceof Error)throw a;for(i=(o=new this(u=a.length/2))._buffer,c=0;c=n)return{done:!0};return r=new qe(e[a+=2],e[a+1]),{value:[i,r],done:!1}})),c(t,"return",(function(e){if(o=!0,arguments.length)return{value:e,done:!0};return{done:!0}})),Qe&&c(t,Qe,(function(){return r.entries()})),t})),c(wr.prototype,"get",(function(e){var r;if(!hr(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!k(e))throw new TypeError("invalid argument. Must provide a nonnegative integer. Value: `"+e+"`.");if(!(e>=this._length))return new qe((r=this._buffer)[e*=2],r[e+1])})),Ze(wr.prototype,"length",(function(){return this._length})),c(wr.prototype,"set",(function(e){var r,t,n,o,i,a,u,f,l;if(!hr(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(n=this._buffer,arguments.length>1){if(!k(t=arguments[1]))throw new TypeError("invalid argument. Index argument must be a nonnegative integer. Value: `"+t+"`.")}else t=0;if(De(e)){if(t>=this._length)throw new RangeError("invalid argument. Index argument is out-of-bounds. Value: `"+t+"`.");return n[t*=2]=$e(e),void(n[t+1]=er(e))}if(hr(e)){if(t+(a=e._length)>this._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");if(r=e._buffer,l=n.byteOffset+t*yr,r.buffer===n.buffer&&r.byteOffsetl){for(o=new W(r.length),f=0;fthis._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");if(r=e,l=n.byteOffset+t*yr,r.buffer===n.buffer&&r.byteOffsetl){for(o=new W(a),f=0;fthis._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");for(t*=2,f=0;ft.byteLength-e)throw new RangeError("invalid arguments. ArrayBuffer has insufficient capacity. Either decrease the array length or provide a bigger buffer. Minimum capacity: `"+n*Ar+"`.");t=new F(t,e,2*n)}}return c(this,"_buffer",t),c(this,"_length",t.length/2),this}c(Vr,"BYTES_PER_ELEMENT",Ar),c(Vr,"name","Complex128Array"),c(Vr,"from",(function(e){var r,t,n,o,i,a,u,f,l,c,y;if(!We(this))throw new TypeError("invalid invocation. `this` context must be a constructor.");if(!xr(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if((t=arguments.length)>1){if(!We(n=arguments[1]))throw new TypeError("invalid argument. Second argument must be a function. Value: `"+n+"`.");t>2&&(r=arguments[2])}if(jr(e)){if(u=e.length,n){for(i=(o=new this(u))._buffer,y=0,c=0;c=2))throw new TypeError("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `"+l+"`.");i[y]=l[0],i[y+1]=l[1]}y+=2}return o}return new this(e)}if(be(e)){if(n){for(u=e.length,a=ur(e),c=0;c=2))throw new TypeError("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `"+l+"`.");i[y]=l[0],i[y+1]=l[1]}y+=2}return o}return new this(e)}if(_e(e)&&Tr&&We(e[Qe])){if(!We((i=e[Qe]()).next))throw new TypeError("invalid argument. First argument must be an array-like object or an iterable.");if((a=n?Er(i,n,r):dr(i))instanceof Error)throw a;for(i=(o=new this(u=a.length/2))._buffer,c=0;c=n)return{done:!0};return r=new Ge(e[a+=2],e[a+1]),{value:[i,r],done:!1}})),c(t,"return",(function(e){if(o=!0,arguments.length)return{value:e,done:!0};return{done:!0}})),Qe&&c(t,Qe,(function(){return r.entries()})),t})),c(Vr.prototype,"get",(function(e){var r;if(!jr(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!k(e))throw new TypeError("invalid argument. Must provide a nonnegative integer. Value: `"+e+"`.");if(!(e>=this._length))return new Ge((r=this._buffer)[e*=2],r[e+1])})),Ze(Vr.prototype,"length",(function(){return this._length})),c(Vr.prototype,"set",(function(e){var r,t,n,o,i,a,u,f,l;if(!jr(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(n=this._buffer,arguments.length>1){if(!k(t=arguments[1]))throw new TypeError("invalid argument. Index argument must be a nonnegative integer. Value: `"+t+"`.")}else t=0;if(De(e)){if(t>=this._length)throw new RangeError("invalid argument. Index argument is out-of-bounds. Value: `"+t+"`.");return n[t*=2]=br(e),void(n[t+1]=vr(e))}if(jr(e)){if(t+(a=e._length)>this._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");if(r=e._buffer,l=n.byteOffset+t*Ar,r.buffer===n.buffer&&r.byteOffsetl){for(o=new F(r.length),f=0;fthis._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");if(r=e,l=n.byteOffset+t*Ar,r.buffer===n.buffer&&r.byteOffsetl){for(o=new F(a),f=0;fthis._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");for(t*=2,f=0;f1?arguments[1]:"float64"))return kr(e);if(null===(t=Rr(r)))throw new TypeError("invalid argument. Second argument must be a recognized data type. Value: `"+r+"`.");return new t(e)}function Or(e){return arguments.length>1?Ir(e,arguments[1]):Ir(e)}export{Or as default}; -//# sourceMappingURL=mod.js.map diff --git a/mod.js.map b/mod.js.map deleted file mode 100644 index 1c46139..0000000 --- a/mod.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"mod.js","sources":["../node_modules/@stdlib/utils-define-property/lib/define_property.js","../node_modules/@stdlib/utils-define-property/lib/builtin.js","../node_modules/@stdlib/utils-define-property/lib/index.js","../node_modules/@stdlib/utils-define-property/lib/polyfill.js","../node_modules/@stdlib/utils-define-property/lib/has_define_property_support.js","../node_modules/@stdlib/utils-define-nonenumerable-read-only-property/lib/main.js","../node_modules/@stdlib/assert-is-number/lib/primitive.js","../node_modules/@stdlib/assert-has-tostringtag-support/lib/main.js","../node_modules/@stdlib/assert-has-symbol-support/lib/main.js","../node_modules/@stdlib/utils-native-class/lib/tostring.js","../node_modules/@stdlib/assert-has-own-property/lib/main.js","../node_modules/@stdlib/utils-native-class/lib/tostringtag.js","../node_modules/@stdlib/utils-native-class/lib/index.js","../node_modules/@stdlib/utils-native-class/lib/polyfill.js","../node_modules/@stdlib/utils-native-class/lib/native_class.js","../node_modules/@stdlib/number-ctor/lib/number.js","../node_modules/@stdlib/assert-is-number/lib/tostring.js","../node_modules/@stdlib/assert-is-number/lib/object.js","../node_modules/@stdlib/assert-is-number/lib/try2serialize.js","../node_modules/@stdlib/assert-is-number/lib/main.js","../node_modules/@stdlib/assert-is-number/lib/index.js","../node_modules/@stdlib/constants-float64-pinf/lib/index.js","../node_modules/@stdlib/constants-float64-ninf/lib/index.js","../node_modules/@stdlib/math-base-special-floor/lib/main.js","../node_modules/@stdlib/math-base-assert-is-integer/lib/is_integer.js","../node_modules/@stdlib/assert-is-integer/lib/integer.js","../node_modules/@stdlib/assert-is-integer/lib/primitive.js","../node_modules/@stdlib/assert-is-integer/lib/object.js","../node_modules/@stdlib/assert-is-integer/lib/main.js","../node_modules/@stdlib/assert-is-nonnegative-integer/lib/primitive.js","../node_modules/@stdlib/assert-is-nonnegative-integer/lib/object.js","../node_modules/@stdlib/assert-is-nonnegative-integer/lib/main.js","../node_modules/@stdlib/assert-is-integer/lib/index.js","../node_modules/@stdlib/assert-is-nonnegative-integer/lib/index.js","../node_modules/@stdlib/assert-is-float64array/lib/main.js","../node_modules/@stdlib/assert-has-float64array-support/lib/float64array.js","../node_modules/@stdlib/array-float64/lib/float64array.js","../node_modules/@stdlib/array-float64/lib/index.js","../node_modules/@stdlib/assert-has-float64array-support/lib/main.js","../node_modules/@stdlib/array-float64/lib/polyfill.js","../node_modules/@stdlib/assert-is-float32array/lib/main.js","../node_modules/@stdlib/assert-has-float32array-support/lib/float32array.js","../node_modules/@stdlib/array-float32/lib/float32array.js","../node_modules/@stdlib/array-float32/lib/index.js","../node_modules/@stdlib/assert-has-float32array-support/lib/main.js","../node_modules/@stdlib/array-float32/lib/polyfill.js","../node_modules/@stdlib/assert-is-int16array/lib/main.js","../node_modules/@stdlib/constants-int16-max/lib/index.js","../node_modules/@stdlib/assert-has-int16array-support/lib/int16array.js","../node_modules/@stdlib/array-int16/lib/int16array.js","../node_modules/@stdlib/array-int16/lib/index.js","../node_modules/@stdlib/assert-has-int16array-support/lib/main.js","../node_modules/@stdlib/constants-int16-min/lib/index.js","../node_modules/@stdlib/array-int16/lib/polyfill.js","../node_modules/@stdlib/assert-is-int32array/lib/main.js","../node_modules/@stdlib/constants-int32-max/lib/index.js","../node_modules/@stdlib/assert-has-int32array-support/lib/int32array.js","../node_modules/@stdlib/array-int32/lib/int32array.js","../node_modules/@stdlib/array-int32/lib/index.js","../node_modules/@stdlib/assert-has-int32array-support/lib/main.js","../node_modules/@stdlib/constants-int32-min/lib/index.js","../node_modules/@stdlib/array-int32/lib/polyfill.js","../node_modules/@stdlib/assert-is-int8array/lib/main.js","../node_modules/@stdlib/constants-int8-max/lib/index.js","../node_modules/@stdlib/assert-has-int8array-support/lib/int8array.js","../node_modules/@stdlib/array-int8/lib/int8array.js","../node_modules/@stdlib/array-int8/lib/index.js","../node_modules/@stdlib/assert-has-int8array-support/lib/main.js","../node_modules/@stdlib/constants-int8-min/lib/index.js","../node_modules/@stdlib/array-int8/lib/polyfill.js","../node_modules/@stdlib/assert-is-uint16array/lib/main.js","../node_modules/@stdlib/constants-uint16-max/lib/index.js","../node_modules/@stdlib/assert-has-uint16array-support/lib/uint16array.js","../node_modules/@stdlib/array-uint16/lib/uint16array.js","../node_modules/@stdlib/array-uint16/lib/index.js","../node_modules/@stdlib/assert-has-uint16array-support/lib/main.js","../node_modules/@stdlib/array-uint16/lib/polyfill.js","../node_modules/@stdlib/assert-is-uint32array/lib/main.js","../node_modules/@stdlib/constants-uint32-max/lib/index.js","../node_modules/@stdlib/assert-has-uint32array-support/lib/uint32array.js","../node_modules/@stdlib/array-uint32/lib/uint32array.js","../node_modules/@stdlib/array-uint32/lib/index.js","../node_modules/@stdlib/assert-has-uint32array-support/lib/main.js","../node_modules/@stdlib/array-uint32/lib/polyfill.js","../node_modules/@stdlib/assert-is-uint8array/lib/main.js","../node_modules/@stdlib/constants-uint8-max/lib/index.js","../node_modules/@stdlib/assert-has-uint8array-support/lib/uint8array.js","../node_modules/@stdlib/array-uint8/lib/uint8array.js","../node_modules/@stdlib/array-uint8/lib/index.js","../node_modules/@stdlib/assert-has-uint8array-support/lib/main.js","../node_modules/@stdlib/array-uint8/lib/polyfill.js","../node_modules/@stdlib/assert-is-uint8clampedarray/lib/main.js","../node_modules/@stdlib/assert-has-uint8clampedarray-support/lib/uint8clampedarray.js","../node_modules/@stdlib/array-uint8c/lib/uint8clampedarray.js","../node_modules/@stdlib/array-uint8c/lib/index.js","../node_modules/@stdlib/assert-has-uint8clampedarray-support/lib/main.js","../node_modules/@stdlib/array-uint8c/lib/polyfill.js","../node_modules/@stdlib/assert-is-array-like-object/lib/main.js","../node_modules/@stdlib/constants-array-max-array-length/lib/index.js","../node_modules/@stdlib/assert-is-collection/lib/main.js","../node_modules/@stdlib/constants-array-max-typed-array-length/lib/index.js","../node_modules/@stdlib/assert-is-arraybuffer/lib/main.js","../node_modules/@stdlib/assert-is-array/lib/main.js","../node_modules/@stdlib/assert-is-object/lib/main.js","../node_modules/@stdlib/utils-type-of/lib/fixtures/re.js","../node_modules/@stdlib/assert-is-boolean/lib/primitive.js","../node_modules/@stdlib/assert-is-boolean/lib/tostring.js","../node_modules/@stdlib/assert-is-boolean/lib/object.js","../node_modules/@stdlib/assert-is-boolean/lib/try2serialize.js","../node_modules/@stdlib/assert-is-boolean/lib/main.js","../node_modules/@stdlib/utils-global/lib/codegen.js","../node_modules/@stdlib/assert-is-boolean/lib/index.js","../node_modules/@stdlib/utils-global/lib/self.js","../node_modules/@stdlib/utils-global/lib/window.js","../node_modules/@stdlib/utils-global/lib/global.js","../node_modules/@stdlib/utils-type-of/lib/fixtures/nodelist.js","../node_modules/@stdlib/utils-global/lib/main.js","../node_modules/@stdlib/utils-type-of/lib/fixtures/typedarray.js","../node_modules/@stdlib/regexp-function-name/lib/main.js","../node_modules/@stdlib/regexp-function-name/lib/regexp.js","../node_modules/@stdlib/assert-is-object-like/lib/main.js","../node_modules/@stdlib/utils-constructor-name/lib/main.js","../node_modules/@stdlib/assert-is-buffer/lib/main.js","../node_modules/@stdlib/regexp-function-name/lib/index.js","../node_modules/@stdlib/assert-is-object-like/lib/index.js","../node_modules/@stdlib/assert-tools-array-function/lib/arrayfcn.js","../node_modules/@stdlib/utils-type-of/lib/index.js","../node_modules/@stdlib/utils-type-of/lib/check.js","../node_modules/@stdlib/utils-type-of/lib/polyfill.js","../node_modules/@stdlib/utils-type-of/lib/typeof.js","../node_modules/@stdlib/assert-is-function/lib/main.js","../node_modules/@stdlib/complex-float64/lib/main.js","../node_modules/@stdlib/complex-float64/lib/tostring.js","../node_modules/@stdlib/complex-float64/lib/tojson.js","../node_modules/@stdlib/number-float64-base-to-float32/lib/main.js","../node_modules/@stdlib/number-float64-base-to-float32/lib/polyfill.js","../node_modules/@stdlib/number-float64-base-to-float32/lib/index.js","../node_modules/@stdlib/complex-float32/lib/main.js","../node_modules/@stdlib/assert-is-complex-like/lib/main.js","../node_modules/@stdlib/math-base-assert-is-even/lib/is_even.js","../node_modules/@stdlib/assert-has-iterator-symbol-support/lib/main.js","../node_modules/@stdlib/complex-float32/lib/tostring.js","../node_modules/@stdlib/complex-float32/lib/tojson.js","../node_modules/@stdlib/symbol-iterator/lib/main.js","../node_modules/@stdlib/utils-define-nonenumerable-read-only-accessor/lib/main.js","../node_modules/@stdlib/complex-realf/lib/main.js","../node_modules/@stdlib/complex-imagf/lib/main.js","../node_modules/@stdlib/strided-base-reinterpret-complex64/lib/main.js","../node_modules/@stdlib/strided-base-reinterpret-complex128/lib/main.js","../node_modules/@stdlib/array-base-arraylike2object/lib/getter.js","../node_modules/@stdlib/array-base-arraylike2object/lib/getter.accessor.js","../node_modules/@stdlib/array-base-arraylike2object/lib/setter.js","../node_modules/@stdlib/array-base-arraylike2object/lib/setter.accessor.js","../node_modules/@stdlib/array-base-arraylike2object/lib/main.js","../node_modules/@stdlib/array-complex64/lib/from_iterator.js","../node_modules/@stdlib/array-complex64/lib/from_iterator_map.js","../node_modules/@stdlib/array-complex64/lib/from_array.js","../node_modules/@stdlib/array-complex64/lib/main.js","../node_modules/@stdlib/complex-real/lib/main.js","../node_modules/@stdlib/complex-imag/lib/main.js","../node_modules/@stdlib/array-complex128/lib/from_iterator.js","../node_modules/@stdlib/array-complex128/lib/from_iterator_map.js","../node_modules/@stdlib/array-complex128/lib/from_array.js","../node_modules/@stdlib/array-complex128/lib/main.js","../node_modules/@stdlib/array-ctors/lib/ctors.js","../node_modules/@stdlib/array-ctors/lib/main.js","../node_modules/@stdlib/array-base-zeros/lib/main.js","../node_modules/@stdlib/array-base-filled/lib/main.js","../node_modules/@stdlib/array-zeros/lib/main.js","../lib/polyfill.js"],"sourcesContent":["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Object.defineProperty === 'function' ) ? Object.defineProperty : null;\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Defines (or modifies) an object property.\n*\n* ## Notes\n*\n* - Property descriptors come in two flavors: **data descriptors** and **accessor descriptors**. A data descriptor is a property that has a value, which may or may not be writable. An accessor descriptor is a property described by a getter-setter function pair. A descriptor must be one of these two flavors and cannot be both.\n*\n* @name defineProperty\n* @type {Function}\n* @param {Object} obj - object on which to define the property\n* @param {(string|symbol)} prop - property name\n* @param {Object} descriptor - property descriptor\n* @param {boolean} [descriptor.configurable=false] - boolean indicating if property descriptor can be changed and if the property can be deleted from the provided object\n* @param {boolean} [descriptor.enumerable=false] - boolean indicating if the property shows up when enumerating object properties\n* @param {boolean} [descriptor.writable=false] - boolean indicating if the value associated with the property can be changed with an assignment operator\n* @param {*} [descriptor.value] - property value\n* @param {(Function|void)} [descriptor.get=undefined] - function which serves as a getter for the property, or, if no getter, undefined. When the property is accessed, a getter function is called without arguments and with the `this` context set to the object through which the property is accessed (which may not be the object on which the property is defined due to inheritance). The return value will be used as the property value.\n* @param {(Function|void)} [descriptor.set=undefined] - function which serves as a setter for the property, or, if no setter, undefined. When assigning a property value, a setter function is called with one argument (the value being assigned to the property) and with the `this` context set to the object through which the property is assigned.\n* @throws {TypeError} first argument must be an object\n* @throws {TypeError} third argument must be an object\n* @throws {Error} property descriptor cannot have both a value and a setter and/or getter\n* @returns {Object} object with added property\n*\n* @example\n* var obj = {};\n*\n* defineProperty( obj, 'foo', {\n* 'value': 'bar'\n* });\n*\n* var str = obj.foo;\n* // returns 'bar'\n*/\nvar defineProperty = Object.defineProperty;\n\n\n// EXPORTS //\n\nexport default defineProperty;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Define (or modify) an object property.\n*\n* @module @stdlib/utils-define-property\n*\n* @example\n* import defineProperty from '@stdlib/utils-define-property';\n*\n* var obj = {};\n* defineProperty( obj, 'foo', {\n* 'value': 'bar',\n* 'writable': false,\n* 'configurable': false,\n* 'enumerable': false\n* });\n* obj.foo = 'boop'; // => throws\n*/\n\n// MODULES //\n\nimport hasDefinePropertySupport from './has_define_property_support.js';\nimport builtin from './builtin.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar defineProperty;\nif ( hasDefinePropertySupport() ) {\n\tdefineProperty = builtin;\n} else {\n\tdefineProperty = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default defineProperty;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable no-underscore-dangle, no-proto */\n\n'use strict';\n\n// VARIABLES //\n\nvar objectProtoype = Object.prototype;\nvar toStr = objectProtoype.toString;\nvar defineGetter = objectProtoype.__defineGetter__;\nvar defineSetter = objectProtoype.__defineSetter__;\nvar lookupGetter = objectProtoype.__lookupGetter__;\nvar lookupSetter = objectProtoype.__lookupSetter__;\n\n\n// MAIN //\n\n/**\n* Defines (or modifies) an object property.\n*\n* ## Notes\n*\n* - Property descriptors come in two flavors: **data descriptors** and **accessor descriptors**. A data descriptor is a property that has a value, which may or may not be writable. An accessor descriptor is a property described by a getter-setter function pair. A descriptor must be one of these two flavors and cannot be both.\n*\n* @param {Object} obj - object on which to define the property\n* @param {string} prop - property name\n* @param {Object} descriptor - property descriptor\n* @param {boolean} [descriptor.configurable=false] - boolean indicating if property descriptor can be changed and if the property can be deleted from the provided object\n* @param {boolean} [descriptor.enumerable=false] - boolean indicating if the property shows up when enumerating object properties\n* @param {boolean} [descriptor.writable=false] - boolean indicating if the value associated with the property can be changed with an assignment operator\n* @param {*} [descriptor.value] - property value\n* @param {(Function|void)} [descriptor.get=undefined] - function which serves as a getter for the property, or, if no getter, undefined. When the property is accessed, a getter function is called without arguments and with the `this` context set to the object through which the property is accessed (which may not be the object on which the property is defined due to inheritance). The return value will be used as the property value.\n* @param {(Function|void)} [descriptor.set=undefined] - function which serves as a setter for the property, or, if no setter, undefined. When assigning a property value, a setter function is called with one argument (the value being assigned to the property) and with the `this` context set to the object through which the property is assigned.\n* @throws {TypeError} first argument must be an object\n* @throws {TypeError} third argument must be an object\n* @throws {Error} property descriptor cannot have both a value and a setter and/or getter\n* @returns {Object} object with added property\n*\n* @example\n* var obj = {};\n*\n* defineProperty( obj, 'foo', {\n* 'value': 'bar'\n* });\n*\n* var str = obj.foo;\n* // returns 'bar'\n*/\nfunction defineProperty( obj, prop, descriptor ) {\n\tvar prototype;\n\tvar hasValue;\n\tvar hasGet;\n\tvar hasSet;\n\n\tif ( typeof obj !== 'object' || obj === null || toStr.call( obj ) === '[object Array]' ) {\n\t\tthrow new TypeError( 'invalid argument. First argument must be an object. Value: `' + obj + '`.' );\n\t}\n\tif ( typeof descriptor !== 'object' || descriptor === null || toStr.call( descriptor ) === '[object Array]' ) {\n\t\tthrow new TypeError( 'invalid argument. Property descriptor must be an object. Value: `' + descriptor + '`.' );\n\t}\n\thasValue = ( 'value' in descriptor );\n\tif ( hasValue ) {\n\t\tif (\n\t\t\tlookupGetter.call( obj, prop ) ||\n\t\t\tlookupSetter.call( obj, prop )\n\t\t) {\n\t\t\t// Override `__proto__` to avoid touching inherited accessors:\n\t\t\tprototype = obj.__proto__;\n\t\t\tobj.__proto__ = objectProtoype;\n\n\t\t\t// Delete property as existing getters/setters prevent assigning value to specified property:\n\t\t\tdelete obj[ prop ];\n\t\t\tobj[ prop ] = descriptor.value;\n\n\t\t\t// Restore original prototype:\n\t\t\tobj.__proto__ = prototype;\n\t\t} else {\n\t\t\tobj[ prop ] = descriptor.value;\n\t\t}\n\t}\n\thasGet = ( 'get' in descriptor );\n\thasSet = ( 'set' in descriptor );\n\n\tif ( hasValue && ( hasGet || hasSet ) ) {\n\t\tthrow new Error( 'invalid argument. Cannot specify one or more accessors and a value or writable attribute in the property descriptor.' );\n\t}\n\n\tif ( hasGet && defineGetter ) {\n\t\tdefineGetter.call( obj, prop, descriptor.get );\n\t}\n\tif ( hasSet && defineSetter ) {\n\t\tdefineSetter.call( obj, prop, descriptor.set );\n\t}\n\treturn obj;\n}\n\n\n// EXPORTS //\n\nexport default defineProperty;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport defineProperty from './define_property.js';\n\n\n// MAIN //\n\n/**\n* Tests for `Object.defineProperty` support.\n*\n* @private\n* @returns {boolean} boolean indicating if an environment has `Object.defineProperty` support\n*\n* @example\n* var bool = hasDefinePropertySupport();\n* // returns \n*/\nfunction hasDefinePropertySupport() {\n\t// Test basic support...\n\ttry {\n\t\tdefineProperty( {}, 'x', {} );\n\t\treturn true;\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\treturn false;\n\t}\n}\n\n\n// EXPORTS //\n\nexport default hasDefinePropertySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport defineProperty from '@stdlib/utils-define-property';\n\n\n// MAIN //\n\n/**\n* Defines a non-enumerable read-only property.\n*\n* @param {Object} obj - object on which to define the property\n* @param {(string|symbol)} prop - property name\n* @param {*} value - value to set\n*\n* @example\n* var obj = {};\n*\n* setNonEnumerableReadOnly( obj, 'foo', 'bar' );\n*\n* try {\n* obj.foo = 'boop';\n* } catch ( err ) {\n* console.error( err.message );\n* }\n*/\nfunction setNonEnumerableReadOnly( obj, prop, value ) {\n\tdefineProperty( obj, prop, {\n\t\t'configurable': false,\n\t\t'enumerable': false,\n\t\t'writable': false,\n\t\t'value': value\n\t});\n}\n\n\n// EXPORTS //\n\nexport default setNonEnumerableReadOnly;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Tests if a value is a number primitive.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number primitive\n*\n* @example\n* var bool = isNumber( 3.14 );\n* // returns true\n*\n* @example\n* var bool = isNumber( NaN );\n* // returns true\n*\n* @example\n* var bool = isNumber( new Number( 3.14 ) );\n* // returns false\n*/\nfunction isNumber( value ) {\n\treturn ( typeof value === 'number' );\n}\n\n\n// EXPORTS //\n\nexport default isNumber;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport hasSymbols from '@stdlib/assert-has-symbol-support';\n\n\n// VARIABLES //\n\nvar FLG = hasSymbols();\n\n\n// MAIN //\n\n/**\n* Tests for native `toStringTag` support.\n*\n* @returns {boolean} boolean indicating if an environment has `toStringTag` support\n*\n* @example\n* var bool = hasToStringTagSupport();\n* // returns \n*/\nfunction hasToStringTagSupport() {\n\treturn ( FLG && typeof Symbol.toStringTag === 'symbol' );\n}\n\n\n// EXPORTS //\n\nexport default hasToStringTagSupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Tests for native `Symbol` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Symbol` support\n*\n* @example\n* var bool = hasSymbolSupport();\n* // returns \n*/\nfunction hasSymbolSupport() {\n\treturn (\n\t\ttypeof Symbol === 'function' &&\n\t\ttypeof Symbol( 'foo' ) === 'symbol'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default hasSymbolSupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar toStr = Object.prototype.toString;\n\n\n// EXPORTS //\n\nexport default toStr;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// FUNCTIONS //\n\nvar has = Object.prototype.hasOwnProperty;\n\n\n// MAIN //\n\n/**\n* Tests if an object has a specified property.\n*\n* @param {*} value - value to test\n* @param {*} property - property to test\n* @returns {boolean} boolean indicating if an object has a specified property\n*\n* @example\n* var beep = {\n* 'boop': true\n* };\n*\n* var bool = hasOwnProp( beep, 'boop' );\n* // returns true\n*\n* @example\n* var beep = {\n* 'boop': true\n* };\n*\n* var bool = hasOwnProp( beep, 'bap' );\n* // returns false\n*/\nfunction hasOwnProp( value, property ) {\n\tif (\n\t\tvalue === void 0 ||\n\t\tvalue === null\n\t) {\n\t\treturn false;\n\t}\n\treturn has.call( value, property );\n}\n\n\n// EXPORTS //\n\nexport default hasOwnProp;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar toStrTag = ( typeof Symbol === 'function' ) ? Symbol.toStringTag : '';\n\n\n// EXPORTS //\n\nexport default toStrTag;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Return a string value indicating a specification defined classification of an object.\n*\n* @module @stdlib/utils-native-class\n*\n* @example\n* import nativeClass from '@stdlib/utils-native-class';\n*\n* var str = nativeClass( 'a' );\n* // returns '[object String]'\n*\n* str = nativeClass( 5 );\n* // returns '[object Number]'\n*\n* function Beep() {\n* return this;\n* }\n* str = nativeClass( new Beep() );\n* // returns '[object Object]'\n*/\n\n// MODULES //\n\nimport hasToStringTag from '@stdlib/assert-has-tostringtag-support';\nimport builtin from './native_class.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar nativeClass;\nif ( hasToStringTag() ) {\n\tnativeClass = polyfill;\n} else {\n\tnativeClass = builtin;\n}\n\n\n// EXPORTS //\n\nexport default nativeClass;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport hasOwnProp from '@stdlib/assert-has-own-property';\nimport toStringTag from './tostringtag.js';\nimport toStr from './tostring.js';\n\n\n// MAIN //\n\n/**\n* Returns a string value indicating a specification defined classification of an object in environments supporting `Symbol.toStringTag`.\n*\n* @param {*} v - input value\n* @returns {string} string value indicating a specification defined classification of the input value\n*\n* @example\n* var str = nativeClass( 'a' );\n* // returns '[object String]'\n*\n* @example\n* var str = nativeClass( 5 );\n* // returns '[object Number]'\n*\n* @example\n* function Beep() {\n* return this;\n* }\n* var str = nativeClass( new Beep() );\n* // returns '[object Object]'\n*/\nfunction nativeClass( v ) {\n\tvar isOwn;\n\tvar tag;\n\tvar out;\n\n\tif ( v === null || v === void 0 ) {\n\t\treturn toStr.call( v );\n\t}\n\ttag = v[ toStringTag ];\n\tisOwn = hasOwnProp( v, toStringTag );\n\n\t// Attempt to override the `toStringTag` property. For built-ins having a `Symbol.toStringTag` property (e.g., `JSON`, `Math`, etc), the `Symbol.toStringTag` property is read-only (e.g., , so we need to wrap in a `try/catch`.\n\ttry {\n\t\tv[ toStringTag ] = void 0;\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\treturn toStr.call( v );\n\t}\n\tout = toStr.call( v );\n\n\tif ( isOwn ) {\n\t\tv[ toStringTag ] = tag;\n\t} else {\n\t\tdelete v[ toStringTag ];\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default nativeClass;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport toStr from './tostring.js';\n\n\n// MAIN //\n\n/**\n* Returns a string value indicating a specification defined classification (via the internal property `[[Class]]`) of an object.\n*\n* @param {*} v - input value\n* @returns {string} string value indicating a specification defined classification of the input value\n*\n* @example\n* var str = nativeClass( 'a' );\n* // returns '[object String]'\n*\n* @example\n* var str = nativeClass( 5 );\n* // returns '[object Number]'\n*\n* @example\n* function Beep() {\n* return this;\n* }\n* var str = nativeClass( new Beep() );\n* // returns '[object Object]'\n*/\nfunction nativeClass( v ) {\n\treturn toStr.call( v );\n}\n\n\n// EXPORTS //\n\nexport default nativeClass;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// EXPORTS //\n\nexport default Number; // eslint-disable-line stdlib/require-globals\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport Number from '@stdlib/number-ctor';\n\n\n// MAIN //\n\n// eslint-disable-next-line stdlib/no-redeclare\nvar toString = Number.prototype.toString; // non-generic\n\n\n// EXPORTS //\n\nexport default toString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport hasToStringTag from '@stdlib/assert-has-tostringtag-support';\nimport nativeClass from '@stdlib/utils-native-class';\nimport Number from '@stdlib/number-ctor';\nimport test from './try2serialize.js';\n\n\n// VARIABLES //\n\nvar FLG = hasToStringTag();\n\n\n// MAIN //\n\n/**\n* Tests if a value is a number object.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number object\n*\n* @example\n* var bool = isNumber( 3.14 );\n* // returns false\n*\n* @example\n* var bool = isNumber( new Number( 3.14 ) );\n* // returns true\n*/\nfunction isNumber( value ) {\n\tif ( typeof value === 'object' ) {\n\t\tif ( value instanceof Number ) {\n\t\t\treturn true;\n\t\t}\n\t\tif ( FLG ) {\n\t\t\treturn test( value );\n\t\t}\n\t\treturn ( nativeClass( value ) === '[object Number]' );\n\t}\n\treturn false;\n}\n\n\n// EXPORTS //\n\nexport default isNumber;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport toString from './tostring.js'; // eslint-disable-line stdlib/no-redeclare\n\n\n// MAIN //\n\n/**\n* Attempts to serialize a value to a string.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value can be serialized\n*/\nfunction test( value ) {\n\ttry {\n\t\ttoString.call( value );\n\t\treturn true;\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\treturn false;\n\t}\n}\n\n\n// EXPORTS //\n\nexport default test;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a number.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a number\n*\n* @example\n* var bool = isNumber( 3.14 );\n* // returns true\n*\n* @example\n* var bool = isNumber( new Number( 3.14 ) );\n* // returns true\n*\n* @example\n* var bool = isNumber( NaN );\n* // returns true\n*\n* @example\n* var bool = isNumber( null );\n* // returns false\n*/\nfunction isNumber( value ) {\n\treturn ( isPrimitive( value ) || isObject( value ) );\n}\n\n\n// EXPORTS //\n\nexport default isNumber;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test if a value is a number.\n*\n* @module @stdlib/assert-is-number\n*\n* @example\n* import isNumber from '@stdlib/assert-is-number';\n*\n* var bool = isNumber( 3.14 );\n* // returns true\n*\n* bool = isNumber( new Number( 3.14 ) );\n* // returns true\n*\n* bool = isNumber( NaN );\n* // returns true\n*\n* bool = isNumber( null );\n* // returns false\n*\n* @example\n* import { isPrimitive as isNumber } from '@stdlib/assert-is-number';\n*\n* var bool = isNumber( 3.14 );\n* // returns true\n*\n* bool = isNumber( NaN );\n* // returns true\n*\n* bool = isNumber( new Number( 3.14 ) );\n* // returns false\n*\n* @example\n* import { isObject as isNumber } from '@stdlib/assert-is-number';\n*\n* var bool = isNumber( 3.14 );\n* // returns false\n*\n* bool = isNumber( new Number( 3.14 ) );\n* // returns true\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport isNumber from './main.js';\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\nsetReadOnly( isNumber, 'isPrimitive', isPrimitive );\nsetReadOnly( isNumber, 'isObject', isObject );\n\n\n// EXPORTS //\n\nexport default isNumber;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Double-precision floating-point positive infinity.\n*\n* @module @stdlib/constants-float64-pinf\n* @type {number}\n*\n* @example\n* import FLOAT64_PINF from '@stdlib/constants-float64-pinf';\n* // returns Infinity\n*/\n\n\n// MAIN //\n\n/**\n* Double-precision floating-point positive infinity.\n*\n* ## Notes\n*\n* Double-precision floating-point positive infinity has the bit sequence\n*\n* ```binarystring\n* 0 11111111111 00000000000000000000 00000000000000000000000000000000\n* ```\n*\n* @constant\n* @type {number}\n* @default Number.POSITIVE_INFINITY\n* @see [IEEE 754]{@link https://en.wikipedia.org/wiki/IEEE_754-1985}\n*/\nvar FLOAT64_PINF = Number.POSITIVE_INFINITY; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default FLOAT64_PINF;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Double-precision floating-point negative infinity.\n*\n* @module @stdlib/constants-float64-ninf\n* @type {number}\n*\n* @example\n* import FLOAT64_NINF from '@stdlib/constants-float64-ninf';\n* // returns -Infinity\n*/\n\n// MODULES //\n\nimport Number from '@stdlib/number-ctor';\n\n\n// MAIN //\n\n/**\n* Double-precision floating-point negative infinity.\n*\n* ## Notes\n*\n* Double-precision floating-point negative infinity has the bit sequence\n*\n* ```binarystring\n* 1 11111111111 00000000000000000000 00000000000000000000000000000000\n* ```\n*\n* @constant\n* @type {number}\n* @default Number.NEGATIVE_INFINITY\n* @see [IEEE 754]{@link https://en.wikipedia.org/wiki/IEEE_754-1985}\n*/\nvar FLOAT64_NINF = Number.NEGATIVE_INFINITY;\n\n\n// EXPORTS //\n\nexport default FLOAT64_NINF;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: implementation (?)\n\n/**\n* Rounds a double-precision floating-point number toward negative infinity.\n*\n* @param {number} x - input value\n* @returns {number} rounded value\n*\n* @example\n* var v = floor( -4.2 );\n* // returns -5.0\n*\n* @example\n* var v = floor( 9.99999 );\n* // returns 9.0\n*\n* @example\n* var v = floor( 0.0 );\n* // returns 0.0\n*\n* @example\n* var v = floor( NaN );\n* // returns NaN\n*/\nvar floor = Math.floor; // eslint-disable-line stdlib/no-builtin-math\n\n\n// EXPORTS //\n\nexport default floor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport floor from '@stdlib/math-base-special-floor';\n\n\n// MAIN //\n\n/**\n* Tests if a finite double-precision floating-point number is an integer.\n*\n* @param {number} x - value to test\n* @returns {boolean} boolean indicating whether the value is an integer\n*\n* @example\n* var bool = isInteger( 1.0 );\n* // returns true\n*\n* @example\n* var bool = isInteger( 3.14 );\n* // returns false\n*/\nfunction isInteger( x ) {\n\treturn (floor(x) === x);\n}\n\n\n// EXPORTS //\n\nexport default isInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport PINF from '@stdlib/constants-float64-pinf';\nimport NINF from '@stdlib/constants-float64-ninf';\nimport isInt from '@stdlib/math-base-assert-is-integer';\n\n\n// MAIN //\n\n/**\n* Tests if a number primitive is an integer value.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a number primitive is an integer value\n*/\nfunction isInteger( value ) {\n\treturn (\n\t\tvalue < PINF &&\n\t\tvalue > NINF &&\n\t\tisInt( value )\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isNumber } from '@stdlib/assert-is-number';\nimport isInt from './integer.js';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a number primitive having an integer value.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number primitive having an integer value\n*\n* @example\n* var bool = isInteger( -3.0 );\n* // returns true\n*\n* @example\n* var bool = isInteger( new Number( -3.0 ) );\n* // returns false\n*/\nfunction isInteger( value ) {\n\treturn (\n\t\tisNumber( value ) &&\n\t\tisInt( value )\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isObject as isNumber } from '@stdlib/assert-is-number';\nimport isInt from './integer.js';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a number object having an integer value.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number object having an integer value\n*\n* @example\n* var bool = isInteger( 3.0 );\n* // returns false\n*\n* @example\n* var bool = isInteger( new Number( 3.0 ) );\n* // returns true\n*/\nfunction isInteger( value ) {\n\treturn (\n\t\tisNumber( value ) &&\n\t\tisInt( value.valueOf() )\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\n/**\n* Tests if a value is an integer.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an integer\n*\n* @example\n* var bool = isInteger( 5.0 );\n* // returns true\n*\n* @example\n* var bool = isInteger( new Number( 5.0 ) );\n* // returns true\n*\n* @example\n* var bool = isInteger( -3.14 );\n* // returns false\n*\n* @example\n* var bool = isInteger( null );\n* // returns false\n*/\nfunction isInteger( value ) {\n\treturn ( isPrimitive( value ) || isObject( value ) );\n}\n\n\n// EXPORTS //\n\nexport default isInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isInteger } from '@stdlib/assert-is-integer';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a number primitive having a nonnegative integer value.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number primitive having a nonnegative integer value\n*\n* @example\n* var bool = isNonNegativeInteger( 3.0 );\n* // returns true\n*\n* @example\n* var bool = isNonNegativeInteger( new Number( 3.0 ) );\n* // returns false\n*/\nfunction isNonNegativeInteger( value ) {\n\treturn (\n\t\tisInteger( value ) &&\n\t\tvalue >= 0\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isNonNegativeInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isObject as isInteger } from '@stdlib/assert-is-integer';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a number object having a nonnegative integer value.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number object having a nonnegative integer value\n*\n* @example\n* var bool = isNonNegativeInteger( 3.0 );\n* // returns false\n*\n* @example\n* var bool = isNonNegativeInteger( new Number( 3.0 ) );\n* // returns true\n*/\nfunction isNonNegativeInteger( value ) {\n\treturn (\n\t\tisInteger( value ) &&\n\t\tvalue.valueOf() >= 0\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isNonNegativeInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a nonnegative integer.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a nonnegative integer\n*\n* @example\n* var bool = isNonNegativeInteger( 5.0 );\n* // returns true\n*\n* @example\n* var bool = isNonNegativeInteger( new Number( 5.0 ) );\n* // returns true\n*\n* @example\n* var bool = isNonNegativeInteger( -5.0 );\n* // returns false\n*\n* @example\n* var bool = isNonNegativeInteger( 3.14 );\n* // returns false\n*\n* @example\n* var bool = isNonNegativeInteger( null );\n* // returns false\n*/\nfunction isNonNegativeInteger( value ) {\n\treturn ( isPrimitive( value ) || isObject( value ) );\n}\n\n\n// EXPORTS //\n\nexport default isNonNegativeInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test if a value is an integer.\n*\n* @module @stdlib/assert-is-integer\n*\n* @example\n* import isInteger from '@stdlib/assert-is-integer';\n*\n* var bool = isInteger( 5.0 );\n* // returns true\n*\n* bool = isInteger( new Number( 5.0 ) );\n* // returns true\n*\n* bool = isInteger( -3.14 );\n* // returns false\n*\n* bool = isInteger( null );\n* // returns false\n*\n* @example\n* // Use interface to check for integer primitives...\n* import { isPrimitive as isInteger } from '@stdlib/assert-is-integer';\n*\n* var bool = isInteger( -3.0 );\n* // returns true\n*\n* bool = isInteger( new Number( -3.0 ) );\n* // returns false\n*\n* @example\n* // Use interface to check for integer objects...\n* import { isObject as isInteger } from '@stdlib/assert-is-integer';\n*\n* var bool = isInteger( 3.0 );\n* // returns false\n*\n* bool = isInteger( new Number( 3.0 ) );\n* // returns true\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport isInteger from './main.js';\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\nsetReadOnly( isInteger, 'isPrimitive', isPrimitive );\nsetReadOnly( isInteger, 'isObject', isObject );\n\n\n// EXPORTS //\n\nexport default isInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test if a value is a nonnegative integer.\n*\n* @module @stdlib/assert-is-nonnegative-integer\n*\n* @example\n* import isNonNegativeInteger from '@stdlib/assert-is-nonnegative-integer';\n*\n* var bool = isNonNegativeInteger( 5.0 );\n* // returns true\n*\n* bool = isNonNegativeInteger( new Number( 5.0 ) );\n* // returns true\n*\n* bool = isNonNegativeInteger( -5.0 );\n* // returns false\n*\n* bool = isNonNegativeInteger( 3.14 );\n* // returns false\n*\n* bool = isNonNegativeInteger( null );\n* // returns false\n*\n* @example\n* import { isPrimitive as isNonNegativeInteger } from '@stdlib/assert-is-nonnegative-integer';\n*\n* var bool = isNonNegativeInteger( 3.0 );\n* // returns true\n*\n* bool = isNonNegativeInteger( new Number( 3.0 ) );\n* // returns false\n*\n* @example\n* import { isObject as isNonNegativeInteger } from '@stdlib/assert-is-nonnegative-integer';\n*\n* var bool = isNonNegativeInteger( 3.0 );\n* // returns false\n*\n* bool = isNonNegativeInteger( new Number( 3.0 ) );\n* // returns true\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport isNonNegativeInteger from './main.js';\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\nsetReadOnly( isNonNegativeInteger, 'isPrimitive', isPrimitive );\nsetReadOnly( isNonNegativeInteger, 'isObject', isObject );\n\n\n// EXPORTS //\n\nexport default isNonNegativeInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasFloat64Array = ( typeof Float64Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Float64Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a Float64Array\n*\n* @example\n* var bool = isFloat64Array( new Float64Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isFloat64Array( [] );\n* // returns false\n*/\nfunction isFloat64Array( value ) {\n\treturn (\n\t\t( hasFloat64Array && value instanceof Float64Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Float64Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isFloat64Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Float64Array === 'function' ) ? Float64Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Float64Array === 'function' ) ? Float64Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of double-precision floating-point numbers in the platform byte order.\n*\n* @module @stdlib/array-float64\n*\n* @example\n* import ctor from '@stdlib/array-float64';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasFloat64ArraySupport from '@stdlib/assert-has-float64array-support';\nimport builtin from './float64array.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasFloat64ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isFloat64Array from '@stdlib/assert-is-float64array';\nimport GlobalFloat64Array from './float64array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Float64Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Float64Array` support\n*\n* @example\n* var bool = hasFloat64ArraySupport();\n* // returns \n*/\nfunction hasFloat64ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalFloat64Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = new GlobalFloat64Array( [ 1.0, 3.14, -3.14, NaN ] );\n\t\tbool = (\n\t\t\tisFloat64Array( arr ) &&\n\t\t\tarr[ 0 ] === 1.0 &&\n\t\t\tarr[ 1 ] === 3.14 &&\n\t\t\tarr[ 2 ] === -3.14 &&\n\t\t\tarr[ 3 ] !== arr[ 3 ]\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasFloat64ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of double-precision floating-point numbers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasFloat32Array = ( typeof Float32Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Float32Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a Float32Array\n*\n* @example\n* var bool = isFloat32Array( new Float32Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isFloat32Array( [] );\n* // returns false\n*/\nfunction isFloat32Array( value ) {\n\treturn (\n\t\t( hasFloat32Array && value instanceof Float32Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Float32Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isFloat32Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Float32Array === 'function' ) ? Float32Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Float32Array === 'function' ) ? Float32Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of single-precision floating-point numbers in the platform byte order.\n*\n* @module @stdlib/array-float32\n*\n* @example\n* import ctor from '@stdlib/array-float32';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasFloat32ArraySupport from '@stdlib/assert-has-float32array-support';\nimport builtin from './float32array.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasFloat32ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isFloat32Array from '@stdlib/assert-is-float32array';\nimport PINF from '@stdlib/constants-float64-pinf';\nimport GlobalFloat32Array from './float32array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Float32Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Float32Array` support\n*\n* @example\n* var bool = hasFloat32ArraySupport();\n* // returns \n*/\nfunction hasFloat32ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalFloat32Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = new GlobalFloat32Array( [ 1.0, 3.14, -3.14, 5.0e40 ] );\n\t\tbool = (\n\t\t\tisFloat32Array( arr ) &&\n\t\t\tarr[ 0 ] === 1.0 &&\n\t\t\tarr[ 1 ] === 3.140000104904175 &&\n\t\t\tarr[ 2 ] === -3.140000104904175 &&\n\t\t\tarr[ 3 ] === PINF\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasFloat32ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of single-precision floating-point numbers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasInt16Array = ( typeof Int16Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is an Int16Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an Int16Array\n*\n* @example\n* var bool = isInt16Array( new Int16Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isInt16Array( [] );\n* // returns false\n*/\nfunction isInt16Array( value ) {\n\treturn (\n\t\t( hasInt16Array && value instanceof Int16Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Int16Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isInt16Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum signed 16-bit integer.\n*\n* @module @stdlib/constants-int16-max\n* @type {integer32}\n*\n* @example\n* import INT16_MAX from '@stdlib/constants-int16-max';\n* // returns 32767\n*/\n\n\n// MAIN //\n\n/**\n* Maximum signed 16-bit integer.\n*\n* ## Notes\n*\n* The number has the value\n*\n* ```tex\n* 2^{15} - 1\n* ```\n*\n* which corresponds to the bit sequence\n*\n* ```binarystring\n* 0111111111111111\n* ```\n*\n* @constant\n* @type {integer32}\n* @default 32767\n*/\nvar INT16_MAX = 32767|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default INT16_MAX;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Int16Array === 'function' ) ? Int16Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Int16Array === 'function' ) ? Int16Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of twos-complement 16-bit signed integers in the platform byte order.\n*\n* @module @stdlib/array-int16\n*\n* @example\n* import ctor from '@stdlib/array-int16';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasInt16ArraySupport from '@stdlib/assert-has-int16array-support';\nimport builtin from './int16array.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasInt16ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isInt16Array from '@stdlib/assert-is-int16array';\nimport INT16_MAX from '@stdlib/constants-int16-max';\nimport INT16_MIN from '@stdlib/constants-int16-min';\nimport GlobalInt16Array from './int16array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Int16Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Int16Array` support\n*\n* @example\n* var bool = hasInt16ArraySupport();\n* // returns \n*/\nfunction hasInt16ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalInt16Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = new GlobalInt16Array( [ 1, 3.14, -3.14, INT16_MAX+1 ] );\n\t\tbool = (\n\t\t\tisInt16Array( arr ) &&\n\t\t\tarr[ 0 ] === 1 &&\n\t\t\tarr[ 1 ] === 3 && // truncation\n\t\t\tarr[ 2 ] === -3 && // truncation\n\t\t\tarr[ 3 ] === INT16_MIN // wrap around\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasInt16ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Minimum signed 16-bit integer.\n*\n* @module @stdlib/constants-int16-min\n* @type {integer32}\n*\n* @example\n* import INT16_MIN from '@stdlib/constants-int16-min';\n* // returns -32768\n*/\n\n\n// MAIN //\n\n/**\n* Minimum signed 16-bit integer.\n*\n* ## Notes\n*\n* The number has the value\n*\n* ```tex\n* -(2^{15})\n* ```\n*\n* which corresponds to the two's complement bit sequence\n*\n* ```binarystring\n* 1000000000000000\n* ```\n*\n* @constant\n* @type {integer32}\n* @default -32768\n*/\nvar INT16_MIN = -32768|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default INT16_MIN;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of twos-complement 16-bit signed integers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasInt32Array = ( typeof Int32Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is an Int32Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an Int32Array\n*\n* @example\n* var bool = isInt32Array( new Int32Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isInt32Array( [] );\n* // returns false\n*/\nfunction isInt32Array( value ) {\n\treturn (\n\t\t( hasInt32Array && value instanceof Int32Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Int32Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isInt32Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum signed 32-bit integer.\n*\n* @module @stdlib/constants-int32-max\n* @type {integer32}\n*\n* @example\n* import INT32_MAX from '@stdlib/constants-int32-max';\n* // returns 2147483647\n*/\n\n\n// MAIN //\n\n/**\n* Maximum signed 32-bit integer.\n*\n* ## Notes\n*\n* The number has the value\n*\n* ```tex\n* 2^{31} - 1\n* ```\n*\n* which corresponds to the bit sequence\n*\n* ```binarystring\n* 01111111111111111111111111111111\n* ```\n*\n* @constant\n* @type {integer32}\n* @default 2147483647\n*/\nvar INT32_MAX = 2147483647|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default INT32_MAX;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Int32Array === 'function' ) ? Int32Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Int32Array === 'function' ) ? Int32Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of twos-complement 32-bit signed integers in the platform byte order.\n*\n* @module @stdlib/array-int32\n*\n* @example\n* import ctor from '@stdlib/array-int32';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasInt32ArraySupport from '@stdlib/assert-has-int32array-support';\nimport builtin from './int32array.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasInt32ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isInt32Array from '@stdlib/assert-is-int32array';\nimport INT32_MAX from '@stdlib/constants-int32-max';\nimport INT32_MIN from '@stdlib/constants-int32-min';\nimport GlobalInt32Array from './int32array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Int32Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Int32Array` support\n*\n* @example\n* var bool = hasInt32ArraySupport();\n* // returns \n*/\nfunction hasInt32ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalInt32Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = new GlobalInt32Array( [ 1, 3.14, -3.14, INT32_MAX+1 ] );\n\t\tbool = (\n\t\t\tisInt32Array( arr ) &&\n\t\t\tarr[ 0 ] === 1 &&\n\t\t\tarr[ 1 ] === 3 && // truncation\n\t\t\tarr[ 2 ] === -3 && // truncation\n\t\t\tarr[ 3 ] === INT32_MIN // wrap around\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasInt32ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Minimum signed 32-bit integer.\n*\n* @module @stdlib/constants-int32-min\n* @type {integer32}\n*\n* @example\n* import INT32_MIN from '@stdlib/constants-int32-min';\n* // returns -2147483648\n*/\n\n\n// MAIN //\n\n/**\n* Minimum signed 32-bit integer.\n*\n* ## Notes\n*\n* The number has the value\n*\n* ```tex\n* -(2^{31})\n* ```\n*\n* which corresponds to the two's complement bit sequence\n*\n* ```binarystring\n* 10000000000000000000000000000000\n* ```\n*\n* @constant\n* @type {integer32}\n* @default -2147483648\n*/\nvar INT32_MIN = -2147483648|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default INT32_MIN;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of twos-complement 32-bit signed integers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasInt8Array = ( typeof Int8Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is an Int8Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an Int8Array\n*\n* @example\n* var bool = isInt8Array( new Int8Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isInt8Array( [] );\n* // returns false\n*/\nfunction isInt8Array( value ) {\n\treturn (\n\t\t( hasInt8Array && value instanceof Int8Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Int8Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isInt8Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum signed 8-bit integer.\n*\n* @module @stdlib/constants-int8-max\n* @type {integer32}\n*\n* @example\n* import INT8_MAX from '@stdlib/constants-int8-max';\n* // returns 127\n*/\n\n\n// MAIN //\n\n/**\n* Maximum signed 8-bit integer.\n*\n* ## Notes\n*\n* The number is given by\n*\n* ```tex\n* 2^{7} - 1\n* ```\n*\n* which corresponds to the bit sequence\n*\n* ```binarystring\n* 01111111\n* ```\n*\n* @constant\n* @type {integer32}\n* @default 127\n*/\nvar INT8_MAX = 127|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default INT8_MAX;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Int8Array === 'function' ) ? Int8Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Int8Array === 'function' ) ? Int8Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of twos-complement 8-bit signed integers in the platform byte order.\n*\n* @module @stdlib/array-int8\n*\n* @example\n* import ctor from '@stdlib/array-int8';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasInt8ArraySupport from '@stdlib/assert-has-int8array-support';\nimport builtin from './int8array.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasInt8ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isInt8Array from '@stdlib/assert-is-int8array';\nimport INT8_MAX from '@stdlib/constants-int8-max';\nimport INT8_MIN from '@stdlib/constants-int8-min';\nimport GlobalInt8Array from './int8array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Int8Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Int8Array` support\n*\n* @example\n* var bool = hasInt8ArraySupport();\n* // returns \n*/\nfunction hasInt8ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalInt8Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = new GlobalInt8Array( [ 1, 3.14, -3.14, INT8_MAX+1 ] );\n\t\tbool = (\n\t\t\tisInt8Array( arr ) &&\n\t\t\tarr[ 0 ] === 1 &&\n\t\t\tarr[ 1 ] === 3 && // truncation\n\t\t\tarr[ 2 ] === -3 && // truncation\n\t\t\tarr[ 3 ] === INT8_MIN // wrap around\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasInt8ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Minimum signed 8-bit integer.\n*\n* @module @stdlib/constants-int8-min\n* @type {integer32}\n*\n* @example\n* import INT8_MIN from '@stdlib/constants-int8-min';\n* // returns -128\n*/\n\n\n// MAIN //\n\n/**\n* Minimum signed 8-bit integer.\n*\n* ## Notes\n*\n* The number is given by\n*\n* ```tex\n* -(2^{7})\n* ```\n*\n* which corresponds to the two's complement bit sequence\n*\n* ```binarystring\n* 10000000\n* ```\n*\n* @constant\n* @type {integer32}\n* @default -128\n*/\nvar INT8_MIN = -128|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default INT8_MIN;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of twos-complement 8-bit signed integers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasUint16Array = ( typeof Uint16Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Uint16Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a Uint16Array\n*\n* @example\n* var bool = isUint16Array( new Uint16Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isUint16Array( [] );\n* // returns false\n*/\nfunction isUint16Array( value ) {\n\treturn (\n\t\t( hasUint16Array && value instanceof Uint16Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Uint16Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isUint16Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum unsigned 16-bit integer.\n*\n* @module @stdlib/constants-uint16-max\n* @type {integer32}\n*\n* @example\n* import UINT16_MAX from '@stdlib/constants-uint16-max';\n* // returns 65535\n*/\n\n\n// MAIN //\n\n/**\n* Maximum unsigned 16-bit integer.\n*\n* ## Notes\n*\n* The number has the value\n*\n* ```tex\n* 2^{16} - 1\n* ```\n*\n* which corresponds to the bit sequence\n*\n* ```binarystring\n* 1111111111111111\n* ```\n*\n* @constant\n* @type {integer32}\n* @default 65535\n*/\nvar UINT16_MAX = 65535|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default UINT16_MAX;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Uint16Array === 'function' ) ? Uint16Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Uint16Array === 'function' ) ? Uint16Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of 16-bit unsigned integers in the platform byte order.\n*\n* @module @stdlib/array-uint16\n*\n* @example\n* import ctor from '@stdlib/array-uint16';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasUint16ArraySupport from '@stdlib/assert-has-uint16array-support';\nimport builtin from './uint16array.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasUint16ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isUint16Array from '@stdlib/assert-is-uint16array';\nimport UINT16_MAX from '@stdlib/constants-uint16-max';\nimport GlobalUint16Array from './uint16array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Uint16Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Uint16Array` support\n*\n* @example\n* var bool = hasUint16ArraySupport();\n* // returns \n*/\nfunction hasUint16ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalUint16Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = [ 1, 3.14, -3.14, UINT16_MAX+1, UINT16_MAX+2 ];\n\t\tarr = new GlobalUint16Array( arr );\n\t\tbool = (\n\t\t\tisUint16Array( arr ) &&\n\t\t\tarr[ 0 ] === 1 &&\n\t\t\tarr[ 1 ] === 3 && // truncation\n\t\t\tarr[ 2 ] === UINT16_MAX-2 && // truncation and wrap around\n\t\t\tarr[ 3 ] === 0 && // wrap around\n\t\t\tarr[ 4 ] === 1 // wrap around\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasUint16ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of 16-bit unsigned integers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasUint32Array = ( typeof Uint32Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Uint32Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a Uint32Array\n*\n* @example\n* var bool = isUint32Array( new Uint32Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isUint32Array( [] );\n* // returns false\n*/\nfunction isUint32Array( value ) {\n\treturn (\n\t\t( hasUint32Array && value instanceof Uint32Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Uint32Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isUint32Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum unsigned 32-bit integer.\n*\n* @module @stdlib/constants-uint32-max\n* @type {uinteger32}\n*\n* @example\n* import UINT32_MAX from '@stdlib/constants-uint32-max';\n* // returns 4294967295\n*/\n\n\n// MAIN //\n\n/**\n* Maximum unsigned 32-bit integer.\n*\n* ## Notes\n*\n* The number has the value\n*\n* ```tex\n* 2^{32} - 1\n* ```\n*\n* which corresponds to the bit sequence\n*\n* ```binarystring\n* 11111111111111111111111111111111\n* ```\n*\n* @constant\n* @type {uinteger32}\n* @default 4294967295\n*/\nvar UINT32_MAX = 4294967295;\n\n\n// EXPORTS //\n\nexport default UINT32_MAX;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Uint32Array === 'function' ) ? Uint32Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Uint32Array === 'function' ) ? Uint32Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of 32-bit unsigned integers in the platform byte order.\n*\n* @module @stdlib/array-uint32\n*\n* @example\n* import ctor from '@stdlib/array-uint32';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasUint32ArraySupport from '@stdlib/assert-has-uint32array-support';\nimport builtin from './uint32array.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasUint32ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isUint32Array from '@stdlib/assert-is-uint32array';\nimport UINT32_MAX from '@stdlib/constants-uint32-max';\nimport GlobalUint32Array from './uint32array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Uint32Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Uint32Array` support\n*\n* @example\n* var bool = hasUint32ArraySupport();\n* // returns \n*/\nfunction hasUint32ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalUint32Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = [ 1, 3.14, -3.14, UINT32_MAX+1, UINT32_MAX+2 ];\n\t\tarr = new GlobalUint32Array( arr );\n\t\tbool = (\n\t\t\tisUint32Array( arr ) &&\n\t\t\tarr[ 0 ] === 1 &&\n\t\t\tarr[ 1 ] === 3 && // truncation\n\t\t\tarr[ 2 ] === UINT32_MAX-2 && // truncation and wrap around\n\t\t\tarr[ 3 ] === 0 && // wrap around\n\t\t\tarr[ 4 ] === 1 // wrap around\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasUint32ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of 32-bit unsigned integers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasUint8Array = ( typeof Uint8Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Uint8Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a Uint8Array\n*\n* @example\n* var bool = isUint8Array( new Uint8Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isUint8Array( [] );\n* // returns false\n*/\nfunction isUint8Array( value ) {\n\treturn (\n\t\t( hasUint8Array && value instanceof Uint8Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Uint8Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isUint8Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum unsigned 8-bit integer.\n*\n* @module @stdlib/constants-uint8-max\n* @type {integer32}\n*\n* @example\n* import UINT8_MAX from '@stdlib/constants-uint8-max';\n* // returns 255\n*/\n\n\n// MAIN //\n\n/**\n* Maximum unsigned 8-bit integer.\n*\n* ## Notes\n*\n* The number has the value\n*\n* ```tex\n* 2^{8} - 1\n* ```\n*\n* which corresponds to the bit sequence\n*\n* ```binarystring\n* 11111111\n* ```\n*\n* @constant\n* @type {integer32}\n* @default 255\n*/\nvar UINT8_MAX = 255|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default UINT8_MAX;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Uint8Array === 'function' ) ? Uint8Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Uint8Array === 'function' ) ? Uint8Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of 8-bit unsigned integers in the platform byte order.\n*\n* @module @stdlib/array-uint8\n*\n* @example\n* import ctor from '@stdlib/array-uint8';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasUint8ArraySupport from '@stdlib/assert-has-uint8array-support';\nimport builtin from './uint8array.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasUint8ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isUint8Array from '@stdlib/assert-is-uint8array';\nimport UINT8_MAX from '@stdlib/constants-uint8-max';\nimport GlobalUint8Array from './uint8array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Uint8Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Uint8Array` support\n*\n* @example\n* var bool = hasUint8ArraySupport();\n* // returns \n*/\nfunction hasUint8ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalUint8Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = [ 1, 3.14, -3.14, UINT8_MAX+1, UINT8_MAX+2 ];\n\t\tarr = new GlobalUint8Array( arr );\n\t\tbool = (\n\t\t\tisUint8Array( arr ) &&\n\t\t\tarr[ 0 ] === 1 &&\n\t\t\tarr[ 1 ] === 3 && // truncation\n\t\t\tarr[ 2 ] === UINT8_MAX-2 && // truncation and wrap around\n\t\t\tarr[ 3 ] === 0 && // wrap around\n\t\t\tarr[ 4 ] === 1 // wrap around\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasUint8ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of 8-bit unsigned integers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasUint8ClampedArray = ( typeof Uint8ClampedArray === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Uint8ClampedArray.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a Uint8ClampedArray\n*\n* @example\n* var bool = isUint8ClampedArray( new Uint8ClampedArray( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isUint8ClampedArray( [] );\n* // returns false\n*/\nfunction isUint8ClampedArray( value ) {\n\treturn (\n\t\t( hasUint8ClampedArray && value instanceof Uint8ClampedArray ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Uint8ClampedArray]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isUint8ClampedArray;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Uint8ClampedArray === 'function' ) ? Uint8ClampedArray : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Uint8ClampedArray === 'function' ) ? Uint8ClampedArray : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of 8-bit unsigned integers in the platform byte order clamped to 0-255.\n*\n* @module @stdlib/array-uint8c\n*\n* @example\n* import ctor from '@stdlib/array-uint8c';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasUint8ClampedArraySupport from '@stdlib/assert-has-uint8clampedarray-support'; // eslint-disable-line id-length\nimport builtin from './uint8clampedarray.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasUint8ClampedArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isUint8ClampedArray from '@stdlib/assert-is-uint8clampedarray';\nimport GlobalUint8ClampedArray from './uint8clampedarray.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Uint8ClampedArray` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Uint8ClampedArray` support\n*\n* @example\n* var bool = hasUint8ClampedArraySupport();\n* // returns \n*/\nfunction hasUint8ClampedArraySupport() { // eslint-disable-line id-length\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalUint8ClampedArray !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = new GlobalUint8ClampedArray( [ -1, 0, 1, 3.14, 4.99, 255, 256 ] );\n\t\tbool = (\n\t\t\tisUint8ClampedArray( arr ) &&\n\t\t\tarr[ 0 ] === 0 && // clamped\n\t\t\tarr[ 1 ] === 0 &&\n\t\t\tarr[ 2 ] === 1 &&\n\t\t\tarr[ 3 ] === 3 && // round to nearest\n\t\t\tarr[ 4 ] === 5 && // round to nearest\n\t\t\tarr[ 5 ] === 255 &&\n\t\t\tarr[ 6 ] === 255 // clamped\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasUint8ClampedArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of 8-bit unsigned integers in the platform byte order clamped to 0-255.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isInteger from '@stdlib/math-base-assert-is-integer';\nimport MAX_LENGTH from '@stdlib/constants-array-max-array-length';\n\n\n// MAIN //\n\n/**\n* Tests if a value is an array-like object.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is an array-like object\n*\n* @example\n* var bool = isArrayLikeObject( [] );\n* // returns true\n*\n* @example\n* var bool = isArrayLikeObject( { 'length':10 } );\n* // returns true\n*\n* @example\n* var bool = isArrayLikeObject( 'beep' );\n* // returns false\n*/\nfunction isArrayLikeObject( value ) {\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\ttypeof value.length === 'number' &&\n\t\tisInteger( value.length ) &&\n\t\tvalue.length >= 0 &&\n\t\tvalue.length <= MAX_LENGTH\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isArrayLikeObject;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum length of a generic array.\n*\n* @module @stdlib/constants-array-max-array-length\n*\n* @example\n* import MAX_ARRAY_LENGTH from '@stdlib/constants-array-max-array-length';\n* // returns 4294967295\n*/\n\n// MAIN //\n\n/**\n* Maximum length of a generic array.\n*\n* ```tex\n* 2^{32} - 1\n* ```\n*\n* @constant\n* @type {uinteger32}\n* @default 4294967295\n*/\nvar MAX_ARRAY_LENGTH = 4294967295>>>0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default MAX_ARRAY_LENGTH;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isInteger from '@stdlib/math-base-assert-is-integer';\nimport MAX_LENGTH from '@stdlib/constants-array-max-typed-array-length';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a collection.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether a value is a collection\n*\n* @example\n* var bool = isCollection( [] );\n* // returns true\n*\n* @example\n* var bool = isCollection( {} );\n* // returns false\n*/\nfunction isCollection( value ) {\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\ttypeof value.length === 'number' &&\n\t\tisInteger( value.length ) &&\n\t\tvalue.length >= 0 &&\n\t\tvalue.length <= MAX_LENGTH\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isCollection;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum length of a typed array.\n*\n* @module @stdlib/constants-array-max-typed-array-length\n*\n* @example\n* import MAX_TYPED_ARRAY_LENGTH from '@stdlib/constants-array-max-typed-array-length';\n* // returns 9007199254740991\n*/\n\n// MAIN //\n\n/**\n* Maximum length of a typed array.\n*\n* ```tex\n* 2^{53} - 1\n* ```\n*\n* @constant\n* @type {number}\n* @default 9007199254740991\n*/\nvar MAX_TYPED_ARRAY_LENGTH = 9007199254740991;\n\n\n// EXPORTS //\n\nexport default MAX_TYPED_ARRAY_LENGTH;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasArrayBuffer = ( typeof ArrayBuffer === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is an ArrayBuffer.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an ArrayBuffer\n*\n* @example\n* import ArrayBuffer from '@stdlib/array-buffer';\n*\n* var bool = isArrayBuffer( new ArrayBuffer( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isArrayBuffer( [] );\n* // returns false\n*/\nfunction isArrayBuffer( value ) {\n\treturn (\n\t\t( hasArrayBuffer && value instanceof ArrayBuffer ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object ArrayBuffer]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isArrayBuffer;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar f;\n\n\n// FUNCTIONS //\n\n/**\n* Tests if a value is an array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an array\n*\n* @example\n* var bool = isArray( [] );\n* // returns true\n*\n* @example\n* var bool = isArray( {} );\n* // returns false\n*/\nfunction isArray( value ) {\n\treturn ( nativeClass( value ) === '[object Array]' );\n}\n\n\n// MAIN //\n\nif ( Array.isArray ) {\n\tf = Array.isArray;\n} else {\n\tf = isArray;\n}\n\n\n// EXPORTS //\n\nexport default f;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isArray from '@stdlib/assert-is-array';\n\n\n// MAIN //\n\n/**\n* Tests if a value is an object; e.g., `{}`.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an object\n*\n* @example\n* var bool = isObject( {} );\n* // returns true\n*\n* @example\n* var bool = isObject( null );\n* // returns false\n*/\nfunction isObject( value ) {\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\t!isArray( value )\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isObject;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\nvar RE = /./;\n\n\n// EXPORTS //\n\nexport default RE;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Tests if a value is a boolean primitive.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a boolean primitive\n*\n* @example\n* var bool = isBoolean( true );\n* // returns true\n*\n* @example\n* var bool = isBoolean( false );\n* // returns true\n*\n* @example\n* var bool = isBoolean( new Boolean( true ) );\n* // returns false\n*/\nfunction isBoolean( value ) {\n\treturn ( typeof value === 'boolean' );\n}\n\n\n// EXPORTS //\n\nexport default isBoolean;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// eslint-disable-next-line stdlib/no-redeclare\nvar toString = Boolean.prototype.toString; // non-generic\n\n\n// EXPORTS //\n\nexport default toString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport hasToStringTag from '@stdlib/assert-has-tostringtag-support';\nimport nativeClass from '@stdlib/utils-native-class';\nimport test from './try2serialize.js';\n\n\n// VARIABLES //\n\nvar FLG = hasToStringTag();\n\n\n// MAIN //\n\n/**\n* Tests if a value is a boolean object.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a boolean object\n*\n* @example\n* var bool = isBoolean( true );\n* // returns false\n*\n* @example\n* var bool = isBoolean( new Boolean( false ) );\n* // returns true\n*/\nfunction isBoolean( value ) {\n\tif ( typeof value === 'object' ) {\n\t\tif ( value instanceof Boolean ) {\n\t\t\treturn true;\n\t\t}\n\t\tif ( FLG ) {\n\t\t\treturn test( value );\n\t\t}\n\t\treturn ( nativeClass( value ) === '[object Boolean]' );\n\t}\n\treturn false;\n}\n\n\n// EXPORTS //\n\nexport default isBoolean;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport toString from './tostring.js'; // eslint-disable-line stdlib/no-redeclare\n\n\n// MAIN //\n\n/**\n* Attempts to serialize a value to a string.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value can be serialized\n*/\nfunction test( value ) {\n\ttry {\n\t\ttoString.call( value );\n\t\treturn true;\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\treturn false;\n\t}\n}\n\n\n// EXPORTS //\n\nexport default test;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a boolean.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a boolean\n*\n* @example\n* var bool = isBoolean( false );\n* // returns true\n*\n* @example\n* var bool = isBoolean( true );\n* // returns true\n*\n* @example\n* var bool = isBoolean( new Boolean( false ) );\n* // returns true\n*\n* @example\n* var bool = isBoolean( new Boolean( true ) );\n* // returns true\n*/\nfunction isBoolean( value ) {\n\treturn ( isPrimitive( value ) || isObject( value ) );\n}\n\n\n// EXPORTS //\n\nexport default isBoolean;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Returns the global object using code generation.\n*\n* @private\n* @returns {Object} global object\n*/\nfunction getGlobal() {\n\treturn new Function( 'return this;' )(); // eslint-disable-line no-new-func\n}\n\n\n// EXPORTS //\n\nexport default getGlobal;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test if a value is a boolean.\n*\n* @module @stdlib/assert-is-boolean\n*\n* @example\n* import isBoolean from '@stdlib/assert-is-boolean';\n*\n* var bool = isBoolean( false );\n* // returns true\n*\n* bool = isBoolean( new Boolean( false ) );\n* // returns true\n*\n* @example\n* // Use interface to check for boolean primitives...\n* import { isPrimitive as isBoolean } from '@stdlib/assert-is-boolean';\n*\n* var bool = isBoolean( false );\n* // returns true\n*\n* bool = isBoolean( new Boolean( true ) );\n* // returns false\n*\n* @example\n* // Use interface to check for boolean objects...\n* import { isObject as isBoolean } from '@stdlib/assert-is-boolean';\n*\n* var bool = isBoolean( true );\n* // returns false\n*\n* bool = isBoolean( new Boolean( false ) );\n* // returns true\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport isBoolean from './main.js';\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\nsetReadOnly( isBoolean, 'isPrimitive', isPrimitive );\nsetReadOnly( isBoolean, 'isObject', isObject );\n\n\n// EXPORTS //\n\nexport default isBoolean;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar obj = ( typeof self === 'object' ) ? self : null;\n\n\n// EXPORTS //\n\nexport default obj;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar obj = ( typeof window === 'object' ) ? window : null;\n\n\n// EXPORTS //\n\nexport default obj;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar obj = ( typeof global === 'object' ) ? global : null;\n\n\n// EXPORTS //\n\nexport default obj;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport getGlobal from '@stdlib/utils-global';\n\n\n// MAIN //\n\nvar root = getGlobal();\nvar nodeList = root.document && root.document.childNodes;\n\n\n// EXPORTS //\n\nexport default nodeList;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isBoolean } from '@stdlib/assert-is-boolean';\nimport getThis from './codegen.js';\nimport Self from './self.js';\nimport Win from './window.js';\nimport Global from './global.js';\n\n\n// MAIN //\n\n/**\n* Returns the global object.\n*\n* ## Notes\n*\n* - Using code generation is the **most** reliable way to resolve the global object; however, doing so is likely to violate content security policies (CSPs) in, e.g., Chrome Apps and elsewhere.\n*\n* @param {boolean} [codegen=false] - boolean indicating whether to use code generation to resolve the global object\n* @throws {TypeError} must provide a boolean\n* @throws {Error} unable to resolve global object\n* @returns {Object} global object\n*\n* @example\n* var g = getGlobal();\n* // returns {...}\n*/\nfunction getGlobal( codegen ) {\n\tif ( arguments.length ) {\n\t\tif ( !isBoolean( codegen ) ) {\n\t\t\tthrow new TypeError( 'invalid argument. Must provide a boolean primitive. Value: `'+codegen+'`.' );\n\t\t}\n\t\tif ( codegen ) {\n\t\t\treturn getThis();\n\t\t}\n\t\t// Fall through...\n\t}\n\t// Case: browsers and web workers\n\tif ( Self ) {\n\t\treturn Self;\n\t}\n\t// Case: browsers\n\tif ( Win ) {\n\t\treturn Win;\n\t}\n\t// Case: Node.js\n\tif ( Global ) {\n\t\treturn Global;\n\t}\n\t// Case: unknown\n\tthrow new Error( 'unexpected error. Unable to resolve global object.' );\n}\n\n\n// EXPORTS //\n\nexport default getGlobal;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\nvar typedarray = Int8Array; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default typedarray;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Returns a regular expression to capture everything that is not a space immediately after the `function` keyword and before the first left parenthesis.\n*\n* @returns {RegExp} regular expression\n*\n* @example\n* var RE_FUNCTION_NAME = reFunctionName();\n*\n* function fname( fcn ) {\n* return RE_FUNCTION_NAME.exec( fcn.toString() )[ 1 ];\n* }\n*\n* var fn = fname( Math.sqrt );\n* // returns 'sqrt'\n*\n* fn = fname( Int8Array );\n* // returns 'Int8Array'\n*\n* fn = fname( Object.prototype.toString );\n* // returns 'toString'\n*\n* fn = fname( function(){} );\n* // returns ''\n*/\nfunction reFunctionName() {\n\treturn /^\\s*function\\s*([^(]*)/i;\n}\n\n\n// EXPORTS //\n\nexport default reFunctionName;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport reFunctionName from './main.js';\n\n\n// MAIN //\n\n/**\n* Captures everything that is not a space immediately after the `function` keyword and before the first left parenthesis.\n*\n* Regular expression: `/^\\s*function\\s*([^(]*)/i`\n*\n* - `/^\\s*`\n* - Match zero or more spaces at beginning\n*\n* - `function`\n* - Match the word `function`\n*\n* - `\\s*`\n* - Match zero or more spaces after the word `function`\n*\n* - `()`\n* - Capture\n*\n* - `[^(]*`\n* - Match anything except a left parenthesis `(` zero or more times\n*\n* - `/i`\n* - ignore case\n*\n* @constant\n* @type {RegExp}\n* @default /^\\s*function\\s*([^(]*)/i\n*/\nvar RE_FUNCTION_NAME = reFunctionName();\n\n\n// EXPORTS //\n\nexport default RE_FUNCTION_NAME;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Tests if a value is object-like.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether a value is object-like\n*\n* @example\n* var bool = isObjectLike( {} );\n* // returns true\n*\n* @example\n* var bool = isObjectLike( [] );\n* // returns true\n*\n* @example\n* var bool = isObjectLike( null );\n* // returns false\n*/\nfunction isObjectLike( value ) {\n\treturn (\n\t\tvalue !== null &&\n\t\ttypeof value === 'object'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isObjectLike;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\nimport { REGEXP as RE } from '@stdlib/regexp-function-name';\nimport isBuffer from '@stdlib/assert-is-buffer';\n\n\n// MAIN //\n\n/**\n* Determines the name of a value's constructor.\n*\n* @param {*} v - input value\n* @returns {string} name of a value's constructor\n*\n* @example\n* var v = constructorName( 'a' );\n* // returns 'String'\n*\n* @example\n* var v = constructorName( 5 );\n* // returns 'Number'\n*\n* @example\n* var v = constructorName( null );\n* // returns 'Null'\n*\n* @example\n* var v = constructorName( undefined );\n* // returns 'Undefined'\n*\n* @example\n* var v = constructorName( function noop() {} );\n* // returns 'Function'\n*/\nfunction constructorName( v ) {\n\tvar match;\n\tvar name;\n\tvar ctor;\n\tname = nativeClass( v ).slice( 8, -1 );\n\tif ( (name === 'Object' || name === 'Error') && v.constructor ) {\n\t\tctor = v.constructor;\n\t\tif ( typeof ctor.name === 'string' ) {\n\t\t\treturn ctor.name;\n\t\t}\n\t\tmatch = RE.exec( ctor.toString() );\n\t\tif ( match ) {\n\t\t\treturn match[ 1 ];\n\t\t}\n\t}\n\tif ( isBuffer( v ) ) {\n\t\treturn 'Buffer';\n\t}\n\treturn name;\n}\n\n\n// EXPORTS //\n\nexport default constructorName;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isObjectLike from '@stdlib/assert-is-object-like';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Buffer instance.\n*\n* @param {*} value - value to validate\n* @returns {boolean} boolean indicating if a value is a Buffer instance\n*\n* @example\n* var v = isBuffer( new Buffer( 'beep' ) );\n* // returns true\n*\n* @example\n* var v = isBuffer( new Buffer( [1,2,3,4] ) );\n* // returns true\n*\n* @example\n* var v = isBuffer( {} );\n* // returns false\n*\n* @example\n* var v = isBuffer( [] );\n* // returns false\n*/\nfunction isBuffer( value ) {\n\treturn (\n\t\tisObjectLike( value ) &&\n\t\t(\n\t\t\t// eslint-disable-next-line no-underscore-dangle\n\t\t\tvalue._isBuffer || // for envs missing Object.prototype.constructor (e.g., Safari 5-7)\n\t\t\t(\n\t\t\t\tvalue.constructor &&\n\n\t\t\t\t// WARNING: `typeof` is not a foolproof check, as certain envs consider RegExp and NodeList instances to be functions\n\t\t\t\ttypeof value.constructor.isBuffer === 'function' &&\n\t\t\t\tvalue.constructor.isBuffer( value )\n\t\t\t)\n\t\t)\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isBuffer;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Regular expression to capture everything that is not a space immediately after the `function` keyword and before the first left parenthesis.\n*\n* @module @stdlib/regexp-function-name\n*\n* @example\n* import reFunctionName from '@stdlib/regexp-function-name';\n* var RE_FUNCTION_NAME = reFunctionName();\n*\n* function fname( fcn ) {\n* return RE_FUNCTION_NAME.exec( fcn.toString() )[ 1 ];\n* }\n*\n* var fn = fname( Math.sqrt );\n* // returns 'sqrt'\n*\n* fn = fname( Int8Array );\n* // returns 'Int8Array'\n*\n* fn = fname( Object.prototype.toString );\n* // returns 'toString'\n*\n* fn = fname( function(){} );\n* // returns ''\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport reFunctionName from './main.js';\nimport REGEXP from './regexp.js';\n\n\n// MAIN //\n\nsetReadOnly( reFunctionName, 'REGEXP', REGEXP );\n\n\n// EXPORTS //\n\nexport default reFunctionName;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test if a value is object-like.\n*\n* @module @stdlib/assert-is-object-like\n*\n* @example\n* import isObjectLike from '@stdlib/assert-is-object-like';\n*\n* var bool = isObjectLike( {} );\n* // returns true\n*\n* bool = isObjectLike( [] );\n* // returns true\n*\n* bool = isObjectLike( null );\n* // returns false\n*\n* @example\n* import { isObjectLikeArray as isObjectLike } from '@stdlib/assert-is-object-like';\n*\n* var bool = isObjectLike( [ {}, [] ] );\n* // returns true\n*\n* bool = isObjectLike( [ {}, '3.0' ] );\n* // returns false\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport arrayfun from '@stdlib/assert-tools-array-function';\nimport isObjectLike from './main.js';\n\n\n// VARIABLES //\n\nvar isObjectLikeArray = arrayfun( isObjectLike );\n\n\n// MAIN //\n\nsetReadOnly( isObjectLike, 'isObjectLikeArray', isObjectLikeArray );\n\n\n// EXPORTS //\n\nexport default isObjectLike;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isArray from '@stdlib/assert-is-array';\n\n\n// MAIN //\n\n/**\n* Returns a function which tests if every element in an array passes a test condition.\n*\n* @param {Function} predicate - function to apply\n* @throws {TypeError} must provide a function\n* @returns {Function} an array function\n*\n* @example\n* import isOdd from '@stdlib/assert-is-odd';\n*\n* var arr1 = [ 1, 3, 5, 7 ];\n* var arr2 = [ 3, 5, 8 ];\n*\n* var validate = arrayfcn( isOdd );\n*\n* var bool = validate( arr1 );\n* // returns true\n*\n* bool = validate( arr2 );\n* // returns false\n*/\nfunction arrayfcn( predicate ) {\n\tif ( typeof predicate !== 'function' ) {\n\t\tthrow new TypeError( 'invalid argument. Must provide a function. Value: `' + predicate + '`.' );\n\t}\n\treturn every;\n\n\t/**\n\t* Tests if every element in an array passes a test condition.\n\t*\n\t* @private\n\t* @param {*} value - value to test\n\t* @returns {boolean} boolean indicating whether a value is an array for which all elements pass a test condition\n\t*/\n\tfunction every( value ) {\n\t\tvar len;\n\t\tvar i;\n\t\tif ( !isArray( value ) ) {\n\t\t\treturn false;\n\t\t}\n\t\tlen = value.length;\n\t\tif ( len === 0 ) {\n\t\t\treturn false;\n\t\t}\n\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\tif ( predicate( value[ i ] ) === false ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}\n}\n\n\n// EXPORTS //\n\nexport default arrayfcn;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Determine a value's type.\n*\n* @module @stdlib/utils-type-of\n*\n* @example\n* import typeOf from '@stdlib/utils-type-of';\n*\n* var str = typeOf( 'a' );\n* // returns 'string'\n*\n* str = typeOf( 5 );\n* // returns 'number'\n*/\n\n// MODULES //\n\nimport usePolyfill from './check.js';\nimport typeOf from './typeof.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar main = ( usePolyfill() ) ? polyfill : typeOf;\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport RE from './fixtures/re.js';\nimport nodeList from './fixtures/nodelist.js';\nimport typedarray from './fixtures/typedarray.js';\n\n\n// MAIN //\n\n/**\n* Checks whether a polyfill is needed when using the `typeof` operator.\n*\n* @private\n* @returns {boolean} boolean indicating whether a polyfill is needed\n*/\nfunction check() {\n\tif (\n\t\t// Chrome 1-12 returns 'function' for regular expression instances (see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/typeof):\n\t\ttypeof RE === 'function' ||\n\n\t\t// Safari 8 returns 'object' for typed array and weak map constructors (underscore #1929):\n\t\ttypeof typedarray === 'object' ||\n\n\t\t// PhantomJS 1.9 returns 'function' for `NodeList` instances (underscore #2236):\n\t\ttypeof nodeList === 'function'\n\t) {\n\t\treturn true;\n\t}\n\treturn false;\n}\n\n\n// EXPORTS //\n\nexport default check;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport ctorName from '@stdlib/utils-constructor-name';\n\n\n// MAIN //\n\n/**\n* Determines a value's type.\n*\n* @param {*} v - input value\n* @returns {string} string indicating the value's type\n*/\nfunction typeOf( v ) {\n\treturn ctorName( v ).toLowerCase();\n}\n\n\n// EXPORTS //\n\nexport default typeOf;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport ctorName from '@stdlib/utils-constructor-name';\n\n\n// NOTES //\n\n/*\n* Built-in `typeof` operator behavior:\n*\n* ```text\n* typeof null => 'object'\n* typeof undefined => 'undefined'\n* typeof 'a' => 'string'\n* typeof 5 => 'number'\n* typeof NaN => 'number'\n* typeof true => 'boolean'\n* typeof false => 'boolean'\n* typeof {} => 'object'\n* typeof [] => 'object'\n* typeof function foo(){} => 'function'\n* typeof function* foo(){} => 'object'\n* typeof Symbol() => 'symbol'\n* ```\n*\n*/\n\n\n// MAIN //\n\n/**\n* Determines a value's type.\n*\n* @param {*} v - input value\n* @returns {string} string indicating the value's type\n*/\nfunction typeOf( v ) {\n\tvar type;\n\n\t// Address `typeof null` => `object` (see http://wiki.ecmascript.org/doku.php?id=harmony:typeof_null):\n\tif ( v === null ) {\n\t\treturn 'null';\n\t}\n\ttype = typeof v;\n\n\t// If the `typeof` operator returned something other than `object`, we are done. Otherwise, we need to check for an internal class name or search for a constructor.\n\tif ( type === 'object' ) {\n\t\treturn ctorName( v ).toLowerCase();\n\t}\n\treturn type;\n}\n\n\n// EXPORTS //\n\nexport default typeOf;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport typeOf from '@stdlib/utils-type-of';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a function.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a function\n*\n* @example\n* function beep() {\n* return 'beep';\n* }\n*\n* var bool = isFunction( beep );\n* // returns true\n*/\nfunction isFunction( value ) {\n\t// Note: cannot use `typeof` directly, as various browser engines incorrectly return `'function'` when operating on non-function objects, such as regular expressions and NodeLists.\n\treturn ( typeOf( value ) === 'function' );\n}\n\n\n// EXPORTS //\n\nexport default isFunction;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isNumber } from '@stdlib/assert-is-number';\nimport defineProperty from '@stdlib/utils-define-property';\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport toStr from './tostring.js';\nimport toJSON from './tojson.js';\n\n\n// MAIN //\n\n/**\n* 128-bit complex number constructor.\n*\n* @constructor\n* @param {number} real - real component\n* @param {number} imag - imaginary component\n* @throws {TypeError} must invoke using the `new` keyword\n* @throws {TypeError} real component must be a number primitive\n* @throws {TypeError} imaginary component must be a number primitive\n* @returns {Complex128} 128-bit complex number\n*\n* @example\n* var z = new Complex128( 5.0, 3.0 );\n* // returns \n*/\nfunction Complex128( real, imag ) {\n\tif ( !( this instanceof Complex128 ) ) {\n\t\tthrow new TypeError( 'invalid invocation. Constructor must be called with the `new` keyword.' );\n\t}\n\tif ( !isNumber( real ) ) {\n\t\tthrow new TypeError( 'invalid argument. Real component must be a number primitive. Value: `'+real+'`.' );\n\t}\n\tif ( !isNumber( imag ) ) {\n\t\tthrow new TypeError( 'invalid argument. Imaginary component must be a number primitive. Value: `'+imag+'`.' );\n\t}\n\tdefineProperty( this, 're', {\n\t\t'configurable': false,\n\t\t'enumerable': true,\n\t\t'writable': false,\n\t\t'value': real\n\t});\n\tdefineProperty( this, 'im', {\n\t\t'configurable': false,\n\t\t'enumerable': true,\n\t\t'writable': false,\n\t\t'value': imag\n\t});\n\treturn this;\n}\n\n/**\n* Size (in bytes) of each component.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex128\n* @type {integer}\n* @returns {integer} size of each component\n*\n* @example\n* var nbytes = Complex128.BYTES_PER_ELEMENT;\n* // returns 8\n*/\nsetReadOnly( Complex128, 'BYTES_PER_ELEMENT', 8 );\n\n/**\n* Size (in bytes) of each component.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex128.prototype\n* @type {integer}\n* @returns {integer} size of each component\n*\n* @example\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var nbytes = z.BYTES_PER_ELEMENT;\n* // returns 8\n*/\nsetReadOnly( Complex128.prototype, 'BYTES_PER_ELEMENT', 8 );\n\n/**\n* Length (in bytes) of a complex number.\n*\n* @name byteLength\n* @memberof Complex128.prototype\n* @type {integer}\n* @returns {integer} byte length\n*\n* @example\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var nbytes = z.byteLength;\n* // returns 16\n*/\nsetReadOnly( Complex128.prototype, 'byteLength', 16 );\n\n/**\n* Serializes a complex number as a string.\n*\n* @name toString\n* @memberof Complex128.prototype\n* @type {Function}\n* @returns {string} serialized complex number\n*\n* @example\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var str = z.toString();\n* // returns '5 + 3i'\n*/\nsetReadOnly( Complex128.prototype, 'toString', toStr );\n\n/**\n* Serializes a complex number as a JSON object.\n*\n* ## Notes\n*\n* - `JSON.stringify()` implicitly calls this method when stringifying a `Complex128` instance.\n*\n*\n* @name toJSON\n* @memberof Complex128.prototype\n* @type {Function}\n* @returns {Object} serialized complex number\n*\n* @example\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var obj = z.toJSON();\n* // returns { 'type': 'Complex128', 're': 5.0, 'im': 3.0 }\n*/\nsetReadOnly( Complex128.prototype, 'toJSON', toJSON );\n\n\n// EXPORTS //\n\nexport default Complex128;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Serializes a complex number as a string.\n*\n* @private\n* @returns {string} serialized complex number\n*/\nfunction toString() { // eslint-disable-line stdlib/no-redeclare\n\t/* eslint-disable no-invalid-this */\n\tvar str = '' + this.re;\n\tif ( this.im < 0 ) {\n\t\tstr += ' - ' + (-this.im);\n\t} else {\n\t\tstr += ' + ' + this.im;\n\t}\n\tstr += 'i';\n\treturn str;\n}\n\n\n// EXPORTS //\n\nexport default toString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Serializes a complex number as a JSON object.\n*\n* @private\n* @returns {Object} JSON representation\n*/\nfunction toJSON() {\n\t/* eslint-disable no-invalid-this */\n\tvar out = {};\n\tout.type = 'Complex128';\n\tout.re = this.re;\n\tout.im = this.im;\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default toJSON;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar fround = ( typeof Math.fround === 'function' ) ? Math.fround : null; // eslint-disable-line stdlib/no-builtin-math\n\n\n// EXPORTS //\n\nexport default fround;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport Float32Array from '@stdlib/array-float32';\n\n\n// VARIABLES //\n\nvar FLOAT32_VIEW = new Float32Array( 1 );\n\n\n// MAIN //\n\n/**\n* Converts a double-precision floating-point number to the nearest single-precision floating-point number.\n*\n* @param {number} x - double-precision floating-point number\n* @returns {number} nearest single-precision floating-point number\n*\n* @example\n* var y = float64ToFloat32( 1.337 );\n* // returns 1.3370000123977661\n*/\nfunction float64ToFloat32( x ) {\n\tFLOAT32_VIEW[ 0 ] = x;\n\treturn FLOAT32_VIEW[ 0 ];\n}\n\n\n// EXPORTS //\n\nexport default float64ToFloat32;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Convert a double-precision floating-point number to the nearest single-precision floating-point number.\n*\n* @module @stdlib/number-float64-base-to-float32\n*\n* @example\n* import float64ToFloat32 from '@stdlib/number-float64-base-to-float32';\n*\n* var y = float64ToFloat32( 1.337 );\n* // returns 1.3370000123977661\n*/\n\n// MODULES //\n\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar float64ToFloat32;\nif ( typeof builtin === 'function' ) {\n\tfloat64ToFloat32 = builtin;\n} else {\n\tfloat64ToFloat32 = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default float64ToFloat32;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isNumber } from '@stdlib/assert-is-number';\nimport defineProperty from '@stdlib/utils-define-property';\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport float64ToFloat32 from '@stdlib/number-float64-base-to-float32';\nimport toStr from './tostring.js';\nimport toJSON from './tojson.js';\n\n\n// MAIN //\n\n/**\n* 64-bit complex number constructor.\n*\n* @constructor\n* @param {number} real - real component\n* @param {number} imag - imaginary component\n* @throws {TypeError} must invoke using the `new` keyword\n* @throws {TypeError} real component must be a number primitive\n* @throws {TypeError} imaginary component must be a number primitive\n* @returns {Complex64} 64-bit complex number\n*\n* @example\n* var z = new Complex64( 5.0, 3.0 );\n* // returns \n*/\nfunction Complex64( real, imag ) {\n\tif ( !( this instanceof Complex64 ) ) {\n\t\tthrow new TypeError( 'invalid invocation. Constructor must be called with the `new` keyword.' );\n\t}\n\tif ( !isNumber( real ) ) {\n\t\tthrow new TypeError( 'invalid argument. Real component must be a number primitive. Value: `'+real+'`.' );\n\t}\n\tif ( !isNumber( imag ) ) {\n\t\tthrow new TypeError( 'invalid argument. Imaginary component must be a number primitive. Value: `'+imag+'`.' );\n\t}\n\tdefineProperty( this, 're', {\n\t\t'configurable': false,\n\t\t'enumerable': true,\n\t\t'writable': false,\n\t\t'value': float64ToFloat32( real )\n\t});\n\tdefineProperty( this, 'im', {\n\t\t'configurable': false,\n\t\t'enumerable': true,\n\t\t'writable': false,\n\t\t'value': float64ToFloat32( imag )\n\t});\n\treturn this;\n}\n\n/**\n* Size (in bytes) of each component.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex64\n* @type {integer}\n* @returns {integer} size of each component\n*\n* @example\n* var nbytes = Complex64.BYTES_PER_ELEMENT;\n* // returns 4\n*/\nsetReadOnly( Complex64, 'BYTES_PER_ELEMENT', 4 );\n\n/**\n* Size (in bytes) of each component.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex64.prototype\n* @type {integer}\n* @returns {integer} size of each component\n*\n* @example\n* var z = new Complex64( 5.0, 3.0 );\n*\n* var nbytes = z.BYTES_PER_ELEMENT;\n* // returns 4\n*/\nsetReadOnly( Complex64.prototype, 'BYTES_PER_ELEMENT', 4 );\n\n/**\n* Length (in bytes) of a complex number.\n*\n* @name byteLength\n* @memberof Complex64.prototype\n* @type {integer}\n* @returns {integer} byte length\n*\n* @example\n* var z = new Complex64( 5.0, 3.0 );\n*\n* var nbytes = z.byteLength;\n* // returns 8\n*/\nsetReadOnly( Complex64.prototype, 'byteLength', 8 );\n\n/**\n* Serializes a complex number as a string.\n*\n* @name toString\n* @memberof Complex64.prototype\n* @type {Function}\n* @returns {string} serialized complex number\n*\n* @example\n* var z = new Complex64( 5.0, 3.0 );\n*\n* var str = z.toString();\n* // returns '5 + 3i'\n*/\nsetReadOnly( Complex64.prototype, 'toString', toStr );\n\n/**\n* Serializes a complex number as a JSON object.\n*\n* ## Notes\n*\n* - `JSON.stringify()` implicitly calls this method when stringifying a `Complex64` instance.\n*\n*\n* @name toJSON\n* @memberof Complex64.prototype\n* @type {Function}\n* @returns {Object} serialized complex number\n*\n* @example\n* var z = new Complex64( 5.0, 3.0 );\n*\n* var obj = z.toJSON();\n* // returns { 'type': 'Complex64', 're': 5.0, 'im': 3.0 }\n*/\nsetReadOnly( Complex64.prototype, 'toJSON', toJSON );\n\n\n// EXPORTS //\n\nexport default Complex64;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport Complex128 from '@stdlib/complex-float64';\nimport Complex64 from '@stdlib/complex-float32';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a complex number-like object.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a complex number-like object.\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n* import Complex64 from '@stdlib/complex-float32';\n*\n* var x = new Complex128( 4.0, 2.0 );\n* var bool = isComplexLike( x );\n* // returns true\n*\n* x = new Complex64( 4.0, 2.0 );\n* bool = isComplexLike( x );\n* // returns true\n*/\nfunction isComplexLike( value ) {\n\tif ( value instanceof Complex128 || value instanceof Complex64 ) {\n\t\treturn true;\n\t}\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\ttypeof value.re === 'number' &&\n\t\ttypeof value.im === 'number'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isComplexLike;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isInteger from '@stdlib/math-base-assert-is-integer';\n\n\n// MAIN //\n\n/**\n* Tests if a finite numeric value is an even number.\n*\n* @param {number} x - value to test\n* @returns {boolean} boolean indicating whether the value is an even number\n*\n* @example\n* var bool = isEven( 5.0 );\n* // returns false\n*\n* @example\n* var bool = isEven( -2.0 );\n* // returns true\n*\n* @example\n* var bool = isEven( 0.0 );\n* // returns true\n*\n* @example\n* var bool = isEven( NaN );\n* // returns false\n*/\nfunction isEven( x ) {\n\treturn isInteger( x/2.0 );\n}\n\n\n// EXPORTS //\n\nexport default isEven;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport hasOwnProp from '@stdlib/assert-has-own-property';\n\n\n// MAIN //\n\n/**\n* Tests for native `Symbol.iterator` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Symbol.iterator` support\n*\n* @example\n* var bool = hasIteratorSymbolSupport();\n* // returns \n*/\nfunction hasIteratorSymbolSupport() {\n\treturn (\n\t\ttypeof Symbol === 'function' &&\n\t\ttypeof Symbol( 'foo' ) === 'symbol' &&\n\t\thasOwnProp( Symbol, 'iterator' ) &&\n\t\ttypeof Symbol.iterator === 'symbol'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default hasIteratorSymbolSupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Serializes a complex number as a string.\n*\n* @private\n* @returns {string} serialized complex number\n*/\nfunction toString() { // eslint-disable-line stdlib/no-redeclare\n\t/* eslint-disable no-invalid-this */\n\tvar str = '' + this.re;\n\tif ( this.im < 0 ) {\n\t\tstr += ' - ' + (-this.im);\n\t} else {\n\t\tstr += ' + ' + this.im;\n\t}\n\tstr += 'i';\n\treturn str;\n}\n\n\n// EXPORTS //\n\nexport default toString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Serializes a complex number as a JSON object.\n*\n* @private\n* @returns {Object} JSON representation\n*/\nfunction toJSON() {\n\t/* eslint-disable no-invalid-this */\n\tvar out = {};\n\tout.type = 'Complex64';\n\tout.re = this.re;\n\tout.im = this.im;\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default toJSON;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport hasIteratorSymbolSupport from '@stdlib/assert-has-iterator-symbol-support';\n\n\n// MAIN //\n\n/**\n* Iterator symbol.\n*\n* @name IteratorSymbol\n* @constant\n* @type {(symbol|null)}\n*\n* @example\n* function iterator() {\n* var it;\n* var i;\n*\n* i = -1;\n*\n* it = {};\n* it.next = next;\n* it.return = done;\n*\n* if ( IteratorSymbol ) {\n* it[ IteratorSymbol ] = iterator;\n* }\n* return it;\n*\n* function next() {\n* i += 1;\n* return {\n* 'value': i,\n* 'done': false\n* };\n* }\n*\n* function done( value ) {\n* if ( arguments.length === 0 ) {\n* return {\n* 'done': true\n* };\n* }\n* return {\n* 'value': value,\n* 'done': true\n* };\n* }\n* }\n*\n* var obj = iterator();\n*/\nvar IteratorSymbol = ( hasIteratorSymbolSupport() ) ? Symbol.iterator : null;\n\n\n// EXPORTS //\n\nexport default IteratorSymbol;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport defineProperty from '@stdlib/utils-define-property';\n\n\n// MAIN //\n\n/**\n* Defines a non-enumerable read-only accessor.\n*\n* @param {Object} obj - object on which to define the property\n* @param {(string|symbol)} prop - property name\n* @param {Function} getter - accessor\n*\n* @example\n* function getter() {\n* return 'bar';\n* }\n*\n* var obj = {};\n*\n* setNonEnumerableReadOnlyAccessor( obj, 'foo', getter );\n*\n* try {\n* obj.foo = 'boop';\n* } catch ( err ) {\n* console.error( err.message );\n* }\n*/\nfunction setNonEnumerableReadOnlyAccessor( obj, prop, getter ) { // eslint-disable-line id-length\n\tdefineProperty( obj, prop, {\n\t\t'configurable': false,\n\t\t'enumerable': false,\n\t\t'get': getter\n\t});\n}\n\n\n// EXPORTS //\n\nexport default setNonEnumerableReadOnlyAccessor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Returns the real component of a single-precision complex floating-point number.\n*\n* @param {Complex} z - complex number\n* @returns {number} real component\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n*\n* var z = new Complex64( 5.0, 3.0 );\n*\n* var re = realf( z );\n* // returns 5.0\n*/\nfunction realf( z ) {\n\treturn z.re;\n}\n\n\n// EXPORTS //\n\nexport default realf;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Returns the imaginary component of a single-precision complex floating-point number.\n*\n* @param {Complex} z - complex number\n* @returns {number} imaginary component\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n*\n* var z = new Complex64( 5.0, 3.0 );\n*\n* var im = imagf( z );\n* // returns 3.0\n*/\nfunction imagf( z ) {\n\treturn z.im;\n}\n\n\n// EXPORTS //\n\nexport default imagf;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport Float32Array from '@stdlib/array-float32';\n\n\n// MAIN //\n\n/**\n* Reinterprets a `Complex64Array` as a `Float32Array`.\n*\n* @param {Complex64Array} x - input array\n* @param {NonNegativeInteger} offset - starting index\n* @returns {Float32Array} `Float32Array` view\n*\n* @example\n* import Complex64Array from '@stdlib/array-complex64';\n*\n* var x = new Complex64Array( 10 );\n*\n* var out = reinterpret( x, 0 );\n* // returns \n*\n* var bool = ( out.buffer === x.buffer );\n* // returns true\n*/\nfunction reinterpret( x, offset ) {\n\treturn new Float32Array( x.buffer, x.byteOffset+(x.BYTES_PER_ELEMENT*offset), 2*(x.length-offset) ); // eslint-disable-line max-len\n}\n\n\n// EXPORTS //\n\nexport default reinterpret;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport Float64Array from '@stdlib/array-float64';\n\n\n// MAIN //\n\n/**\n* Reinterprets a `Complex128Array` as a `Float64Array`.\n*\n* @param {Complex128Array} x - input array\n* @param {NonNegativeInteger} offset - starting index\n* @returns {Float64Array} `Float64Array` view\n*\n* @example\n* import Complex128Array from '@stdlib/array-complex128';\n*\n* var x = new Complex128Array( 10 );\n*\n* var out = reinterpret( x, 0 );\n* // returns \n*\n* var bool = ( out.buffer === x.buffer );\n* // returns true\n*/\nfunction reinterpret( x, offset ) {\n\treturn new Float64Array( x.buffer, x.byteOffset+(x.BYTES_PER_ELEMENT*offset), 2*(x.length-offset) ); // eslint-disable-line max-len\n}\n\n\n// EXPORTS //\n\nexport default reinterpret;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Returns an array element.\n*\n* @private\n* @param {Collection} x - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {*} element\n*/\nfunction getter( x, idx ) {\n\treturn x[ idx ];\n}\n\n\n// EXPORTS //\n\nexport default getter;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Returns an array element using an accessor method.\n*\n* @private\n* @param {Collection} x - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {*} element\n*/\nfunction getter( x, idx ) {\n\treturn x.get( idx );\n}\n\n\n// EXPORTS //\n\nexport default getter;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Sets an array element.\n*\n* @private\n* @param {Collection} x - input array\n* @param {NonNegativeInteger} idx - element index\n* @param {*} value - value to set\n*/\nfunction setter( x, idx, value ) {\n\tx[ idx ] = value;\n}\n\n\n// EXPORTS //\n\nexport default setter;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Sets an array element using an accessor method.\n*\n* @private\n* @param {Collection} x - input array\n* @param {NonNegativeInteger} idx - element index\n* @param {*} value - value to set\n*/\nfunction setter( x, idx, value ) {\n\tx.set( value, idx );\n}\n\n\n// EXPORTS //\n\nexport default setter;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport getIndexed from './getter.js';\nimport getAccessor from './getter.accessor.js';\nimport setIndexed from './setter.js';\nimport setAccessor from './setter.accessor.js';\n\n\n// MAIN //\n\n/**\n* Converts an array-like to an object likely to have the same \"shape\".\n*\n* ## Notes\n*\n* - This function is intended as a potential performance optimization. In V8, for example, even if two objects share common properties, if those properties were added in different orders or if one object has additional properties not shared by the other object, then those objects will have different \"hidden\" classes. If a function is provided many objects having different \"shapes\", some JavaScript VMs (e.g., V8) will consider the function \"megamorphic\" and fail to perform various runtime optimizations. Accordingly, the intent of this function is to standardize the \"shape\" of the object holding array meta data to ensure that internal functions operating on arrays are provided consistent argument \"shapes\".\n*\n* - The returned object has the following properties:\n*\n* - **data**: data buffer.\n* - **accessors**: `boolean` indicating whether the data buffer uses accessors for getting and setting elements.\n* - **getter**: accessor for retrieving a data buffer element.\n* - **setter**: accessor for setting a data buffer element.\n*\n* @param {Collection} x - array-like object\n* @returns {Object} object containing array meta data\n*\n* @example\n* var obj = arraylike2object( [ 1, 2, 3, 4 ] );\n* // returns {...}\n*/\nfunction arraylike2object( x ) {\n\tvar bool = Boolean( x.get && x.set ); // Note: intentional weak check, as we don't explicitly check for functions for (perhaps marginally) better performance.\n\treturn {\n\t\t'data': x,\n\t\t'accessors': bool,\n\t\t'getter': ( bool ) ? getAccessor : getIndexed,\n\t\t'setter': ( bool ) ? setAccessor : setIndexed\n\t};\n}\n\n\n// EXPORTS //\n\nexport default arraylike2object;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isArrayLikeObject from '@stdlib/assert-is-array-like-object';\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport realf from '@stdlib/complex-realf';\nimport imagf from '@stdlib/complex-imagf';\n\n\n// MAIN //\n\n/**\n* Returns an array of iterated values.\n*\n* @private\n* @param {Object} it - iterator\n* @returns {(Array|TypeError)} array or an error\n*/\nfunction fromIterator( it ) {\n\tvar out;\n\tvar v;\n\tvar z;\n\n\tout = [];\n\twhile ( true ) {\n\t\tv = it.next();\n\t\tif ( v.done ) {\n\t\t\tbreak;\n\t\t}\n\t\tz = v.value;\n\t\tif ( isArrayLikeObject( z ) && z.length >= 2 ) {\n\t\t\tout.push( z[ 0 ], z[ 1 ] );\n\t\t} else if ( isComplexLike( z ) ) {\n\t\t\tout.push( realf( z ), imagf( z ) );\n\t\t} else {\n\t\t\treturn new TypeError( 'invalid argument. An iterator must return either a two-element array containing real and imaginary components or a complex number. Value: `'+z+'`.' );\n\t\t}\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default fromIterator;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isArrayLikeObject from '@stdlib/assert-is-array-like-object';\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport realf from '@stdlib/complex-realf';\nimport imagf from '@stdlib/complex-imagf';\n\n\n// MAIN //\n\n/**\n* Returns an array of iterated values.\n*\n* @private\n* @param {Object} it - iterator\n* @param {Function} clbk - callback to invoke for each iterated value\n* @param {*} thisArg - invocation context\n* @returns {(Array|TypeError)} array or an error\n*/\nfunction fromIteratorMap( it, clbk, thisArg ) {\n\tvar out;\n\tvar v;\n\tvar z;\n\tvar i;\n\n\tout = [];\n\ti = -1;\n\twhile ( true ) {\n\t\tv = it.next();\n\t\tif ( v.done ) {\n\t\t\tbreak;\n\t\t}\n\t\ti += 1;\n\t\tz = clbk.call( thisArg, v.value, i );\n\t\tif ( isArrayLikeObject( z ) && z.length >= 2 ) {\n\t\t\tout.push( z[ 0 ], z[ 1 ] );\n\t\t} else if ( isComplexLike( z ) ) {\n\t\t\tout.push( realf( z ), imagf( z ) );\n\t\t} else {\n\t\t\treturn new TypeError( 'invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `'+z+'`.' );\n\t\t}\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default fromIteratorMap;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport realf from '@stdlib/complex-realf';\nimport imagf from '@stdlib/complex-imagf';\n\n\n// MAIN //\n\n/**\n* Returns a strided array of real and imaginary components.\n*\n* @private\n* @param {Float32Array} buf - output array\n* @param {Array} arr - array containing complex numbers\n* @returns {(Float32Array|null)} output array or null\n*/\nfunction fromArray( buf, arr ) {\n\tvar len;\n\tvar v;\n\tvar i;\n\tvar j;\n\n\tlen = arr.length;\n\tj = 0;\n\tfor ( i = 0; i < len; i++ ) {\n\t\tv = arr[ i ];\n\t\tif ( !isComplexLike( v ) ) {\n\t\t\treturn null;\n\t\t}\n\t\tbuf[ j ] = realf( v );\n\t\tbuf[ j+1 ] = imagf( v );\n\t\tj += 2; // stride\n\t}\n\treturn buf;\n}\n\n\n// EXPORTS //\n\nexport default fromArray;\n","/* eslint-disable no-restricted-syntax, max-lines, no-invalid-this */\n\n/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isNonNegativeInteger } from '@stdlib/assert-is-nonnegative-integer';\nimport isArrayLikeObject from '@stdlib/assert-is-array-like-object';\nimport isCollection from '@stdlib/assert-is-collection';\nimport isArrayBuffer from '@stdlib/assert-is-arraybuffer';\nimport isObject from '@stdlib/assert-is-object';\nimport isArray from '@stdlib/assert-is-array';\nimport isFunction from '@stdlib/assert-is-function';\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport isEven from '@stdlib/math-base-assert-is-even';\nimport isInteger from '@stdlib/math-base-assert-is-integer';\nimport hasIteratorSymbolSupport from '@stdlib/assert-has-iterator-symbol-support';\nimport ITERATOR_SYMBOL from '@stdlib/symbol-iterator';\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport setReadOnlyAccessor from '@stdlib/utils-define-nonenumerable-read-only-accessor';\nimport Float32Array from '@stdlib/array-float32';\nimport Complex64 from '@stdlib/complex-float32';\nimport realf from '@stdlib/complex-realf';\nimport imagf from '@stdlib/complex-imagf';\nimport reinterpret64 from '@stdlib/strided-base-reinterpret-complex64';\nimport reinterpret128 from '@stdlib/strided-base-reinterpret-complex128';\nimport arraylike2object from '@stdlib/array-base-arraylike2object';\nimport fromIterator from './from_iterator.js';\nimport fromIteratorMap from './from_iterator_map.js';\nimport fromArray from './from_array.js';\n\n\n// VARIABLES //\n\nvar BYTES_PER_ELEMENT = Float32Array.BYTES_PER_ELEMENT * 2;\nvar HAS_ITERATOR_SYMBOL = hasIteratorSymbolSupport();\n\n\n// FUNCTIONS //\n\n/**\n* Returns a boolean indicating if a value is a complex typed array.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a complex typed array\n*/\nfunction isComplexArray( value ) {\n\treturn (\n\t\tvalue instanceof Complex64Array ||\n\t\t(\n\t\t\ttypeof value === 'object' &&\n\t\t\tvalue !== null &&\n\t\t\t(\n\t\t\t\tvalue.constructor.name === 'Complex64Array' ||\n\t\t\t\tvalue.constructor.name === 'Complex128Array'\n\t\t\t) &&\n\t\t\ttypeof value._length === 'number' && // eslint-disable-line no-underscore-dangle\n\n\t\t\t// NOTE: we don't perform a more rigorous test here for a typed array for performance reasons, as robustly checking for a typed array instance could require walking the prototype tree and performing relatively expensive constructor checks...\n\t\t\ttypeof value._buffer === 'object' // eslint-disable-line no-underscore-dangle\n\t\t)\n\t);\n}\n\n/**\n* Returns a boolean indicating if a value is a complex typed array constructor.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a complex typed array constructor\n*/\nfunction isComplexArrayConstructor( value ) {\n\treturn (\n\t\tvalue === Complex64Array ||\n\n\t\t// NOTE: weaker test in order to avoid a circular dependency with Complex128Array...\n\t\tvalue.name === 'Complex128Array'\n\t);\n}\n\n/**\n* Returns a boolean indicating if a value is a `Complex64Array`.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a `Complex64Array`\n*/\nfunction isComplex64Array( value ) {\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\tvalue.constructor.name === 'Complex64Array' &&\n\t\tvalue.BYTES_PER_ELEMENT === BYTES_PER_ELEMENT\n\t);\n}\n\n/**\n* Returns a boolean indicating if a value is a `Complex128Array`.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a `Complex128Array`\n*/\nfunction isComplex128Array( value ) {\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\tvalue.constructor.name === 'Complex128Array' &&\n\t\tvalue.BYTES_PER_ELEMENT === BYTES_PER_ELEMENT*2\n\t);\n}\n\n\n// MAIN //\n\n/**\n* 64-bit complex number array constructor.\n*\n* @constructor\n* @param {(NonNegativeInteger|Collection|ArrayBuffer|Iterable)} [arg] - length, typed array, array-like object, buffer, or an iterable\n* @param {NonNegativeInteger} [byteOffset=0] - byte offset\n* @param {NonNegativeInteger} [length] - view length\n* @throws {RangeError} ArrayBuffer byte length must be a multiple of `8`\n* @throws {RangeError} array-like object and typed array input arguments must have a length which is a multiple of two\n* @throws {TypeError} if provided only a single argument, must provide a valid argument\n* @throws {TypeError} byte offset must be a nonnegative integer\n* @throws {RangeError} byte offset must be a multiple of `8`\n* @throws {TypeError} view length must be a positive multiple of `8`\n* @throws {RangeError} must provide sufficient memory to accommodate byte offset and view length requirements\n* @throws {TypeError} an iterator must return either a two element array containing real and imaginary components or a complex number\n* @returns {Complex64Array} complex number array\n*\n* @example\n* var arr = new Complex64Array();\n* // returns \n*\n* var len = arr.length;\n* // returns 0\n*\n* @example\n* var arr = new Complex64Array( 2 );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*\n* @example\n* var arr = new Complex64Array( [ 1.0, -1.0 ] );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* import ArrayBuffer from '@stdlib/array-buffer';\n*\n* var buf = new ArrayBuffer( 16 );\n* var arr = new Complex64Array( buf );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*\n* @example\n* import ArrayBuffer from '@stdlib/array-buffer';\n*\n* var buf = new ArrayBuffer( 16 );\n* var arr = new Complex64Array( buf, 8 );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* import ArrayBuffer from '@stdlib/array-buffer';\n*\n* var buf = new ArrayBuffer( 32 );\n* var arr = new Complex64Array( buf, 8, 2 );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*/\nfunction Complex64Array() {\n\tvar byteOffset;\n\tvar nargs;\n\tvar buf;\n\tvar len;\n\n\tnargs = arguments.length;\n\tif ( !(this instanceof Complex64Array) ) {\n\t\tif ( nargs === 0 ) {\n\t\t\treturn new Complex64Array();\n\t\t}\n\t\tif ( nargs === 1 ) {\n\t\t\treturn new Complex64Array( arguments[0] );\n\t\t}\n\t\tif ( nargs === 2 ) {\n\t\t\treturn new Complex64Array( arguments[0], arguments[1] );\n\t\t}\n\t\treturn new Complex64Array( arguments[0], arguments[1], arguments[2] );\n\t}\n\t// Create the underlying data buffer...\n\tif ( nargs === 0 ) {\n\t\tbuf = new Float32Array( 0 ); // backward-compatibility\n\t} else if ( nargs === 1 ) {\n\t\tif ( isNonNegativeInteger( arguments[0] ) ) {\n\t\t\tbuf = new Float32Array( arguments[0]*2 );\n\t\t} else if ( isCollection( arguments[0] ) ) {\n\t\t\tbuf = arguments[ 0 ];\n\t\t\tlen = buf.length;\n\n\t\t\t// If provided a \"generic\" array, peak at the first value, and, if the value is a complex number, try to process as an array of complex numbers, falling back to \"normal\" typed array initialization if we fail and ensuring consistency if the first value had not been a complex number...\n\t\t\tif ( len && isArray( buf ) && isComplexLike( buf[0] ) ) {\n\t\t\t\tbuf = fromArray( new Float32Array( len*2 ), buf );\n\t\t\t\tif ( buf === null ) {\n\t\t\t\t\t// We failed and we are now forced to allocate a new array :-(\n\t\t\t\t\tif ( !isEven( len ) ) {\n\t\t\t\t\t\tthrow new RangeError( 'invalid argument. Array-like object input arguments must have a length which is a multiple of two. Length: `'+len+'`.' );\n\t\t\t\t\t}\n\t\t\t\t\t// We failed, so fall back to directly setting values...\n\t\t\t\t\tbuf = new Float32Array( arguments[0] );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ( isComplex64Array( buf ) ) {\n\t\t\t\t\tbuf = reinterpret64( buf, 0 );\n\t\t\t\t} else if ( isComplex128Array( buf ) ) {\n\t\t\t\t\tbuf = reinterpret128( buf, 0 );\n\t\t\t\t} else if ( !isEven( len ) ) {\n\t\t\t\t\tthrow new RangeError( 'invalid argument. Array-like object and typed array input arguments must have a length which is a multiple of two. Length: `'+len+'`.' );\n\t\t\t\t}\n\t\t\t\tbuf = new Float32Array( buf );\n\t\t\t}\n\t\t} else if ( isArrayBuffer( arguments[0] ) ) {\n\t\t\tbuf = arguments[ 0 ];\n\t\t\tif ( !isInteger( buf.byteLength/BYTES_PER_ELEMENT ) ) {\n\t\t\t\tthrow new RangeError( 'invalid argument. ArrayBuffer byte length must be a multiple of '+BYTES_PER_ELEMENT+'. Byte length: `'+buf.byteLength+'`.' );\n\t\t\t}\n\t\t\tbuf = new Float32Array( buf );\n\t\t} else if ( isObject( arguments[0] ) ) {\n\t\t\tbuf = arguments[ 0 ];\n\t\t\tif ( HAS_ITERATOR_SYMBOL === false ) {\n\t\t\t\tthrow new TypeError( 'invalid argument. Environment lacks Symbol.iterator support. Must provide a length, ArrayBuffer, typed array, or array-like object. Value: `'+buf+'`.' );\n\t\t\t}\n\t\t\tif ( !isFunction( buf[ ITERATOR_SYMBOL ] ) ) {\n\t\t\t\tthrow new TypeError( 'invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `'+buf+'`.' );\n\t\t\t}\n\t\t\tbuf = buf[ ITERATOR_SYMBOL ]();\n\t\t\tif ( !isFunction( buf.next ) ) {\n\t\t\t\tthrow new TypeError( 'invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable.' );\n\t\t\t}\n\t\t\tbuf = fromIterator( buf );\n\t\t\tif ( buf instanceof Error ) {\n\t\t\t\tthrow buf;\n\t\t\t}\n\t\t\tbuf = new Float32Array( buf );\n\t\t} else {\n\t\t\tthrow new TypeError( 'invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `'+arguments[0]+'`.' );\n\t\t}\n\t} else {\n\t\tbuf = arguments[ 0 ];\n\t\tif ( !isArrayBuffer( buf ) ) {\n\t\t\tthrow new TypeError( 'invalid argument. First argument must be an array buffer. Value: `'+buf+'`.' );\n\t\t}\n\t\tbyteOffset = arguments[ 1 ];\n\t\tif ( !isNonNegativeInteger( byteOffset ) ) {\n\t\t\tthrow new TypeError( 'invalid argument. Byte offset must be a nonnegative integer. Value: `'+byteOffset+'`.' );\n\t\t}\n\t\tif ( !isInteger( byteOffset/BYTES_PER_ELEMENT ) ) {\n\t\t\tthrow new RangeError( 'invalid argument. Byte offset must be a multiple of '+BYTES_PER_ELEMENT+'. Value: `'+byteOffset+'`.' );\n\t\t}\n\t\tif ( nargs === 2 ) {\n\t\t\tlen = buf.byteLength - byteOffset;\n\t\t\tif ( !isInteger( len/BYTES_PER_ELEMENT ) ) {\n\t\t\t\tthrow new RangeError( 'invalid arguments. ArrayBuffer view byte length must be a multiple of '+BYTES_PER_ELEMENT+'. View byte length: `'+len+'`.' );\n\t\t\t}\n\t\t\tbuf = new Float32Array( buf, byteOffset );\n\t\t} else {\n\t\t\tlen = arguments[ 2 ];\n\t\t\tif ( !isNonNegativeInteger( len ) ) {\n\t\t\t\tthrow new TypeError( 'invalid argument. Length must be a nonnegative integer. Value: `'+len+'`.' );\n\t\t\t}\n\t\t\tif ( (len*BYTES_PER_ELEMENT) > (buf.byteLength-byteOffset) ) {\n\t\t\t\tthrow new RangeError( 'invalid arguments. ArrayBuffer has insufficient capacity. Either decrease the array length or provide a bigger buffer. Minimum capacity: `'+(len*BYTES_PER_ELEMENT)+'`.' );\n\t\t\t}\n\t\t\tbuf = new Float32Array( buf, byteOffset, len*2 );\n\t\t}\n\t}\n\tsetReadOnly( this, '_buffer', buf );\n\tsetReadOnly( this, '_length', buf.length/2 );\n\n\treturn this;\n}\n\n/**\n* Size (in bytes) of each array element.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex64Array\n* @readonly\n* @type {PositiveInteger}\n* @default 8\n*\n* @example\n* var nbytes = Complex64Array.BYTES_PER_ELEMENT;\n* // returns 8\n*/\nsetReadOnly( Complex64Array, 'BYTES_PER_ELEMENT', BYTES_PER_ELEMENT );\n\n/**\n* Constructor name.\n*\n* @name name\n* @memberof Complex64Array\n* @readonly\n* @type {string}\n* @default 'Complex64Array'\n*\n* @example\n* var str = Complex64Array.name;\n* // returns 'Complex64Array'\n*/\nsetReadOnly( Complex64Array, 'name', 'Complex64Array' );\n\n/**\n* Creates a new 64-bit complex number array from an array-like object or an iterable.\n*\n* @name from\n* @memberof Complex64Array\n* @type {Function}\n* @param {(Collection|Iterable)} src - array-like object or iterable\n* @param {Function} [clbk] - callback to invoke for each source element\n* @param {*} [thisArg] - context\n* @throws {TypeError} `this` context must be a constructor\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be an array-like object or an iterable\n* @throws {TypeError} second argument must be a function\n* @throws {RangeError} array-like objects must have a length which is a multiple of two\n* @throws {TypeError} an iterator must return either a two element array containing real and imaginary components or a complex number\n* @throws {TypeError} when provided an iterator, a callback must return either a two element array containing real and imaginary components or a complex number\n* @returns {Complex64Array} 64-bit complex number array\n*\n* @example\n* var arr = Complex64Array.from( [ 1.0, -1.0 ] );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n*\n* var arr = Complex64Array.from( [ new Complex64( 1.0, 1.0 ) ] );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* function clbk( v ) {\n* return new Complex64( realf(v)*2.0, imagf(v)*2.0 );\n* }\n*\n* var arr = Complex64Array.from( [ new Complex64( 1.0, 1.0 ) ], clbk );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*/\nsetReadOnly( Complex64Array, 'from', function from( src ) {\n\tvar thisArg;\n\tvar nargs;\n\tvar clbk;\n\tvar out;\n\tvar buf;\n\tvar tmp;\n\tvar len;\n\tvar flg;\n\tvar v;\n\tvar i;\n\tvar j;\n\tif ( !isFunction( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` context must be a constructor.' );\n\t}\n\tif ( !isComplexArrayConstructor( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tnargs = arguments.length;\n\tif ( nargs > 1 ) {\n\t\tclbk = arguments[ 1 ];\n\t\tif ( !isFunction( clbk ) ) {\n\t\t\tthrow new TypeError( 'invalid argument. Second argument must be a function. Value: `'+clbk+'`.' );\n\t\t}\n\t\tif ( nargs > 2 ) {\n\t\t\tthisArg = arguments[ 2 ];\n\t\t}\n\t}\n\tif ( isComplexArray( src ) ) {\n\t\tlen = src.length;\n\t\tif ( clbk ) {\n\t\t\tout = new this( len );\n\t\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\t\tj = 0;\n\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\tv = clbk.call( thisArg, src.get( i ), i );\n\t\t\t\tif ( isComplexLike( v ) ) {\n\t\t\t\t\tbuf[ j ] = realf( v );\n\t\t\t\t\tbuf[ j+1 ] = imagf( v );\n\t\t\t\t} else if ( isArrayLikeObject( v ) && v.length >= 2 ) {\n\t\t\t\t\tbuf[ j ] = v[ 0 ];\n\t\t\t\t\tbuf[ j+1 ] = v[ 1 ];\n\t\t\t\t} else {\n\t\t\t\t\tthrow new TypeError( 'invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `'+v+'`.' );\n\t\t\t\t}\n\t\t\t\tj += 2; // stride\n\t\t\t}\n\t\t\treturn out;\n\t\t}\n\t\treturn new this( src );\n\t}\n\tif ( isCollection( src ) ) {\n\t\tif ( clbk ) {\n\t\t\t// Note: array contents affect how we iterate over a provided data source. If only complex number objects, we can extract real and imaginary components. Otherwise, for non-complex number arrays (e.g., `Float64Array`, etc), we assume a strided array where real and imaginary components are interleaved. In the former case, we expect a callback to return real and imaginary components (possibly as a complex number). In the latter case, we expect a callback to return *either* a real or imaginary component.\n\n\t\t\tlen = src.length;\n\t\t\ttmp = arraylike2object( src );\n\n\t\t\t// Detect whether we've been provided an array which returns complex number objects...\n\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\tif ( !isComplexLike( tmp.getter( src, i ) ) ) {\n\t\t\t\t\tflg = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// If an array does not contain only complex number objects, then we assume interleaved real and imaginary components...\n\t\t\tif ( flg ) {\n\t\t\t\tif ( !isEven( len ) ) {\n\t\t\t\t\tthrow new RangeError( 'invalid argument. First argument must have a length which is a multiple of two. Length: `'+len+'`.' );\n\t\t\t\t}\n\t\t\t\tout = new this( len/2 );\n\t\t\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\t\tbuf[ i ] = clbk.call( thisArg, tmp.getter( src, i ), i );\n\t\t\t\t}\n\t\t\t\treturn out;\n\t\t\t}\n\t\t\t// If an array contains only complex number objects, then we need to extract real and imaginary components...\n\t\t\tout = new this( len );\n\t\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\t\tj = 0;\n\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\tv = clbk.call( thisArg, tmp.getter( src, i ), i );\n\t\t\t\tif ( isComplexLike( v ) ) {\n\t\t\t\t\tbuf[ j ] = realf( v );\n\t\t\t\t\tbuf[ j+1 ] = imagf( v );\n\t\t\t\t} else if ( isArrayLikeObject( v ) && v.length >= 2 ) {\n\t\t\t\t\tbuf[ j ] = v[ 0 ];\n\t\t\t\t\tbuf[ j+1 ] = v[ 1 ];\n\t\t\t\t} else {\n\t\t\t\t\tthrow new TypeError( 'invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `'+v+'`.' );\n\t\t\t\t}\n\t\t\t\tj += 2; // stride\n\t\t\t}\n\t\t\treturn out;\n\t\t}\n\t\treturn new this( src );\n\t}\n\tif ( isObject( src ) && HAS_ITERATOR_SYMBOL && isFunction( src[ ITERATOR_SYMBOL ] ) ) { // eslint-disable-line max-len\n\t\tbuf = src[ ITERATOR_SYMBOL ]();\n\t\tif ( !isFunction( buf.next ) ) {\n\t\t\tthrow new TypeError( 'invalid argument. First argument must be an array-like object or an iterable.' );\n\t\t}\n\t\tif ( clbk ) {\n\t\t\ttmp = fromIteratorMap( buf, clbk, thisArg );\n\t\t} else {\n\t\t\ttmp = fromIterator( buf );\n\t\t}\n\t\tif ( tmp instanceof Error ) {\n\t\t\tthrow tmp;\n\t\t}\n\t\tlen = tmp.length / 2;\n\t\tout = new this( len );\n\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\tbuf[ i ] = tmp[ i ];\n\t\t}\n\t\treturn out;\n\t}\n\tthrow new TypeError( 'invalid argument. First argument must be an array-like object or an iterable. Value: `'+src+'`.' );\n});\n\n/**\n* Creates a new 64-bit complex number array from a variable number of arguments.\n*\n* @name of\n* @memberof Complex64Array\n* @type {Function}\n* @param {...*} element - array elements\n* @throws {TypeError} `this` context must be a constructor\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Complex64Array} 64-bit complex number array\n*\n* @example\n* var arr = Complex64Array.of( 1.0, 1.0, 1.0, 1.0 );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*/\nsetReadOnly( Complex64Array, 'of', function of() {\n\tvar args;\n\tvar i;\n\tif ( !isFunction( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` context must be a constructor.' );\n\t}\n\tif ( !isComplexArrayConstructor( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\targs = [];\n\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\targs.push( arguments[ i ] );\n\t}\n\treturn new this( args );\n});\n\n/**\n* Pointer to the underlying data buffer.\n*\n* @name buffer\n* @memberof Complex64Array.prototype\n* @readonly\n* @type {ArrayBuffer}\n*\n* @example\n* var arr = new Complex64Array( 10 );\n*\n* var buf = arr.buffer;\n* // returns \n*/\nsetReadOnlyAccessor( Complex64Array.prototype, 'buffer', function get() {\n\treturn this._buffer.buffer;\n});\n\n/**\n* Size (in bytes) of the array.\n*\n* @name byteLength\n* @memberof Complex64Array.prototype\n* @readonly\n* @type {NonNegativeInteger}\n*\n* @example\n* var arr = new Complex64Array( 10 );\n*\n* var byteLength = arr.byteLength;\n* // returns 80\n*/\nsetReadOnlyAccessor( Complex64Array.prototype, 'byteLength', function get() {\n\treturn this._buffer.byteLength;\n});\n\n/**\n* Offset (in bytes) of the array from the start of its underlying `ArrayBuffer`.\n*\n* @name byteOffset\n* @memberof Complex64Array.prototype\n* @readonly\n* @type {NonNegativeInteger}\n*\n* @example\n* var arr = new Complex64Array( 10 );\n*\n* var byteOffset = arr.byteOffset;\n* // returns 0\n*/\nsetReadOnlyAccessor( Complex64Array.prototype, 'byteOffset', function get() {\n\treturn this._buffer.byteOffset;\n});\n\n/**\n* Size (in bytes) of each array element.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex64Array.prototype\n* @readonly\n* @type {PositiveInteger}\n* @default 8\n*\n* @example\n* var arr = new Complex64Array( 10 );\n*\n* var nbytes = arr.BYTES_PER_ELEMENT;\n* // returns 8\n*/\nsetReadOnly( Complex64Array.prototype, 'BYTES_PER_ELEMENT', Complex64Array.BYTES_PER_ELEMENT );\n\n/**\n* Copies a sequence of elements within the array to the position starting at `target`.\n*\n* @name copyWithin\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {integer} target - index at which to start copying elements\n* @param {integer} start - source index at which to copy elements from\n* @param {integer} [end] - source index at which to stop copying elements from\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Complex64Array} modified array\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* var arr = new Complex64Array( 4 );\n*\n* // Set the array elements:\n* arr.set( new Complex64( 1.0, 1.0 ), 0 );\n* arr.set( new Complex64( 2.0, 2.0 ), 1 );\n* arr.set( new Complex64( 3.0, 3.0 ), 2 );\n* arr.set( new Complex64( 4.0, 4.0 ), 3 );\n*\n* // Copy the first two elements to the last two elements:\n* arr.copyWithin( 2, 0, 2 );\n*\n* // Get the last array element:\n* var z = arr.get( 3 );\n*\n* var re = realf( z );\n* // returns 2.0\n*\n* var im = imagf( z );\n* // returns 2.0\n*/\nsetReadOnly( Complex64Array.prototype, 'copyWithin', function copyWithin( target, start ) {\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\t// FIXME: prefer a functional `copyWithin` implementation which addresses lack of universal browser support (e.g., IE11 and Safari) or ensure that typed arrays are polyfilled\n\tif ( arguments.length === 2 ) {\n\t\tthis._buffer.copyWithin( target*2, start*2 );\n\t} else {\n\t\tthis._buffer.copyWithin( target*2, start*2, arguments[2]*2 );\n\t}\n\treturn this;\n});\n\n/**\n* Returns an iterator for iterating over array key-value pairs.\n*\n* @name entries\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Iterator} iterator\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n*\n* var arr = [\n* new Complex64( 1.0, 1.0 ),\n* new Complex64( 2.0, 2.0 ),\n* new Complex64( 3.0, 3.0 )\n* ];\n* arr = new Complex64Array( arr );\n*\n* // Create an iterator:\n* var it = arr.entries();\n*\n* // Iterate over the key-value pairs...\n* var v = it.next().value;\n* // returns [ 0, ]\n*\n* v = it.next().value;\n* // returns [ 1, ]\n*\n* v = it.next().value;\n* // returns [ 2, ]\n*\n* var bool = it.next().done;\n* // returns true\n*/\nsetReadOnly( Complex64Array.prototype, 'entries', function entries() {\n\tvar buffer;\n\tvar self;\n\tvar iter;\n\tvar len;\n\tvar FLG;\n\tvar i;\n\tvar j;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tself = this;\n\tbuffer = this._buffer;\n\tlen = this._length;\n\n\t// Initialize the iteration indices:\n\ti = -1;\n\tj = -2;\n\n\t// Create an iterator protocol-compliant object:\n\titer = {};\n\tsetReadOnly( iter, 'next', next );\n\tsetReadOnly( iter, 'return', end );\n\n\tif ( ITERATOR_SYMBOL ) {\n\t\tsetReadOnly( iter, ITERATOR_SYMBOL, factory );\n\t}\n\treturn iter;\n\n\t/**\n\t* Returns an iterator protocol-compliant object containing the next iterated value.\n\t*\n\t* @private\n\t* @returns {Object} iterator protocol-compliant object\n\t*/\n\tfunction next() {\n\t\tvar z;\n\t\ti += 1;\n\t\tif ( FLG || i >= len ) {\n\t\t\treturn {\n\t\t\t\t'done': true\n\t\t\t};\n\t\t}\n\t\tj += 2;\n\t\tz = new Complex64( buffer[ j ], buffer[ j+1 ] );\n\t\treturn {\n\t\t\t'value': [ i, z ],\n\t\t\t'done': false\n\t\t};\n\t}\n\n\t/**\n\t* Finishes an iterator.\n\t*\n\t* @private\n\t* @param {*} [value] - value to return\n\t* @returns {Object} iterator protocol-compliant object\n\t*/\n\tfunction end( value ) {\n\t\tFLG = true;\n\t\tif ( arguments.length ) {\n\t\t\treturn {\n\t\t\t\t'value': value,\n\t\t\t\t'done': true\n\t\t\t};\n\t\t}\n\t\treturn {\n\t\t\t'done': true\n\t\t};\n\t}\n\n\t/**\n\t* Returns a new iterator.\n\t*\n\t* @private\n\t* @returns {Iterator} iterator\n\t*/\n\tfunction factory() {\n\t\treturn self.entries();\n\t}\n});\n\n/**\n* Returns an array element.\n*\n* @name get\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {NonNegativeInteger} idx - element index\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} must provide a nonnegative integer\n* @returns {(Complex64|void)} array element\n*\n* @example\n* var arr = new Complex64Array( 10 );\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* var z = arr.get( 0 );\n* // returns \n*\n* var re = realf( z );\n* // returns 0.0\n*\n* var im = imagf( z );\n* // returns 0.0\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n*\n* z = arr.get( 0 );\n* // returns \n*\n* re = realf( z );\n* // returns 1.0\n*\n* im = imagf( z );\n* // returns -1.0\n*\n* z = arr.get( 100 );\n* // returns undefined\n*/\nsetReadOnly( Complex64Array.prototype, 'get', function get( idx ) {\n\tvar buf;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isNonNegativeInteger( idx ) ) {\n\t\tthrow new TypeError( 'invalid argument. Must provide a nonnegative integer. Value: `'+idx+'`.' );\n\t}\n\tif ( idx >= this._length ) {\n\t\treturn;\n\t}\n\tbuf = this._buffer;\n\tidx *= 2;\n\treturn new Complex64( buf[ idx ], buf[ idx+1 ] );\n});\n\n/**\n* Number of array elements.\n*\n* @name length\n* @memberof Complex64Array.prototype\n* @readonly\n* @type {NonNegativeInteger}\n*\n* @example\n* var arr = new Complex64Array( 10 );\n*\n* var len = arr.length;\n* // returns 10\n*/\nsetReadOnlyAccessor( Complex64Array.prototype, 'length', function get() {\n\treturn this._length;\n});\n\n/**\n* Sets an array element.\n*\n* ## Notes\n*\n* - When provided a typed array, real or complex, we must check whether the source array shares the same buffer as the target array and whether the underlying memory overlaps. In particular, we are concerned with the following scenario:\n*\n* ```text\n* buf: ---------------------\n* src: ---------------------\n* ```\n*\n* In the above, as we copy values from `src`, we will overwrite values in the `src` view, resulting in duplicated values copied into the end of `buf`, which is not intended. Hence, to avoid overwriting source values, we must **copy** source values to a temporary array.\n*\n* In the other overlapping scenario,\n*\n* ```text\n* buf: ---------------------\n* src: ---------------------\n* ```\n*\n* by the time we begin copying into the overlapping region, we are copying from the end of `src`, a non-overlapping region, which means we don't run the risk of copying copied values, rather than the original `src` values as intended.\n*\n*\n* @name set\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {(Collection|Complex|ComplexArray)} value - value(s)\n* @param {NonNegativeInteger} [i=0] - element index at which to start writing values\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be either a complex number, an array-like object, or a complex number array\n* @throws {TypeError} index argument must be a nonnegative integer\n* @throws {RangeError} array-like objects must have a length which is a multiple of two\n* @throws {RangeError} index argument is out-of-bounds\n* @throws {RangeError} target array lacks sufficient storage to accommodate source values\n* @returns {void}\n*\n* @example\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* var arr = new Complex64Array( 10 );\n*\n* var z = arr.get( 0 );\n* // returns \n*\n* var re = realf( z );\n* // returns 0.0\n*\n* var im = imagf( z );\n* // returns 0.0\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n*\n* z = arr.get( 0 );\n* // returns \n*\n* re = realf( z );\n* // returns 1.0\n*\n* im = imagf( z );\n* // returns -1.0\n*/\nsetReadOnly( Complex64Array.prototype, 'set', function set( value ) {\n\t/* eslint-disable no-underscore-dangle */\n\tvar sbuf;\n\tvar idx;\n\tvar buf;\n\tvar tmp;\n\tvar flg;\n\tvar N;\n\tvar v;\n\tvar i;\n\tvar j;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tbuf = this._buffer;\n\tif ( arguments.length > 1 ) {\n\t\tidx = arguments[ 1 ];\n\t\tif ( !isNonNegativeInteger( idx ) ) {\n\t\t\tthrow new TypeError( 'invalid argument. Index argument must be a nonnegative integer. Value: `'+idx+'`.' );\n\t\t}\n\t} else {\n\t\tidx = 0;\n\t}\n\tif ( isComplexLike( value ) ) {\n\t\tif ( idx >= this._length ) {\n\t\t\tthrow new RangeError( 'invalid argument. Index argument is out-of-bounds. Value: `'+idx+'`.' );\n\t\t}\n\t\tidx *= 2;\n\t\tbuf[ idx ] = realf( value );\n\t\tbuf[ idx+1 ] = imagf( value );\n\t\treturn;\n\t}\n\tif ( isComplexArray( value ) ) {\n\t\tN = value._length;\n\t\tif ( idx+N > this._length ) {\n\t\t\tthrow new RangeError( 'invalid arguments. Target array lacks sufficient storage to accommodate source values.' );\n\t\t}\n\t\tsbuf = value._buffer;\n\n\t\t// Check for overlapping memory...\n\t\tj = buf.byteOffset + (idx*BYTES_PER_ELEMENT);\n\t\tif (\n\t\t\tsbuf.buffer === buf.buffer &&\n\t\t\t(\n\t\t\t\tsbuf.byteOffset < j &&\n\t\t\t\tsbuf.byteOffset+sbuf.byteLength > j\n\t\t\t)\n\t\t) {\n\t\t\t// We need to copy source values...\n\t\t\ttmp = new Float32Array( sbuf.length );\n\t\t\tfor ( i = 0; i < sbuf.length; i++ ) {\n\t\t\t\ttmp[ i ] = sbuf[ i ];\n\t\t\t}\n\t\t\tsbuf = tmp;\n\t\t}\n\t\tidx *= 2;\n\t\tj = 0;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\tbuf[ idx ] = sbuf[ j ];\n\t\t\tbuf[ idx+1 ] = sbuf[ j+1 ];\n\t\t\tidx += 2; // stride\n\t\t\tj += 2; // stride\n\t\t}\n\t\treturn;\n\t}\n\tif ( isCollection( value ) ) {\n\t\t// Detect whether we've been provided an array of complex numbers...\n\t\tN = value.length;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\tif ( !isComplexLike( value[ i ] ) ) {\n\t\t\t\tflg = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t// If an array does not contain only complex numbers, then we assume interleaved real and imaginary components...\n\t\tif ( flg ) {\n\t\t\tif ( !isEven( N ) ) {\n\t\t\t\tthrow new RangeError( 'invalid argument. Array-like object arguments must have a length which is a multiple of two. Length: `'+N+'`.' );\n\t\t\t}\n\t\t\tif ( idx+(N/2) > this._length ) {\n\t\t\t\tthrow new RangeError( 'invalid arguments. Target array lacks sufficient storage to accommodate source values.' );\n\t\t\t}\n\t\t\tsbuf = value;\n\n\t\t\t// Check for overlapping memory...\n\t\t\tj = buf.byteOffset + (idx*BYTES_PER_ELEMENT);\n\t\t\tif (\n\t\t\t\tsbuf.buffer === buf.buffer &&\n\t\t\t\t(\n\t\t\t\t\tsbuf.byteOffset < j &&\n\t\t\t\t\tsbuf.byteOffset+sbuf.byteLength > j\n\t\t\t\t)\n\t\t\t) {\n\t\t\t\t// We need to copy source values...\n\t\t\t\ttmp = new Float32Array( N );\n\t\t\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\t\t\ttmp[ i ] = sbuf[ i ];\n\t\t\t\t}\n\t\t\t\tsbuf = tmp;\n\t\t\t}\n\t\t\tidx *= 2;\n\t\t\tN /= 2;\n\t\t\tj = 0;\n\t\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\t\tbuf[ idx ] = sbuf[ j ];\n\t\t\t\tbuf[ idx+1 ] = sbuf[ j+1 ];\n\t\t\t\tidx += 2; // stride\n\t\t\t\tj += 2; // stride\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\t// If an array contains only complex numbers, then we need to extract real and imaginary components...\n\t\tif ( idx+N > this._length ) {\n\t\t\tthrow new RangeError( 'invalid arguments. Target array lacks sufficient storage to accommodate source values.' );\n\t\t}\n\t\tidx *= 2;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\tv = value[ i ];\n\t\t\tbuf[ idx ] = realf( v );\n\t\t\tbuf[ idx+1 ] = imagf( v );\n\t\t\tidx += 2; // stride\n\t\t}\n\t\treturn;\n\t}\n\tthrow new TypeError( 'invalid argument. First argument must be either a complex number, an array-like object, or a complex number array. Value: `'+value+'`.' );\n\n\t/* eslint-enable no-underscore-dangle */\n});\n\n\n// EXPORTS //\n\nexport default Complex64Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Returns the real component of a double-precision complex floating-point number.\n*\n* @param {Complex} z - complex number\n* @returns {number} real component\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n*\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var re = real( z );\n* // returns 5.0\n*/\nfunction real( z ) {\n\treturn z.re;\n}\n\n\n// EXPORTS //\n\nexport default real;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Returns the imaginary component of a double-precision complex floating-point number.\n*\n* @param {Complex} z - complex number\n* @returns {number} imaginary component\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n*\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var im = imag( z );\n* // returns 3.0\n*/\nfunction imag( z ) {\n\treturn z.im;\n}\n\n\n// EXPORTS //\n\nexport default imag;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isArrayLikeObject from '@stdlib/assert-is-array-like-object';\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport real from '@stdlib/complex-real';\nimport imag from '@stdlib/complex-imag';\n\n\n// MAIN //\n\n/**\n* Returns an array of iterated values.\n*\n* @private\n* @param {Object} it - iterator\n* @returns {(Array|TypeError)} array or an error\n*/\nfunction fromIterator( it ) {\n\tvar out;\n\tvar v;\n\tvar z;\n\n\tout = [];\n\twhile ( true ) {\n\t\tv = it.next();\n\t\tif ( v.done ) {\n\t\t\tbreak;\n\t\t}\n\t\tz = v.value;\n\t\tif ( isArrayLikeObject( z ) && z.length >= 2 ) {\n\t\t\tout.push( z[ 0 ], z[ 1 ] );\n\t\t} else if ( isComplexLike( z ) ) {\n\t\t\tout.push( real( z ), imag( z ) );\n\t\t} else {\n\t\t\treturn new TypeError( 'invalid argument. An iterator must return either a two-element array containing real and imaginary components or a complex number. Value: `'+z+'`.' );\n\t\t}\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default fromIterator;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isArrayLikeObject from '@stdlib/assert-is-array-like-object';\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport real from '@stdlib/complex-real';\nimport imag from '@stdlib/complex-imag';\n\n\n// MAIN //\n\n/**\n* Returns an array of iterated values.\n*\n* @private\n* @param {Object} it - iterator\n* @param {Function} clbk - callback to invoke for each iterated value\n* @param {*} thisArg - invocation context\n* @returns {(Array|TypeError)} array or an error\n*/\nfunction fromIteratorMap( it, clbk, thisArg ) {\n\tvar out;\n\tvar v;\n\tvar z;\n\tvar i;\n\n\tout = [];\n\ti = -1;\n\twhile ( true ) {\n\t\tv = it.next();\n\t\tif ( v.done ) {\n\t\t\tbreak;\n\t\t}\n\t\ti += 1;\n\t\tz = clbk.call( thisArg, v.value, i );\n\t\tif ( isArrayLikeObject( z ) && z.length >= 2 ) {\n\t\t\tout.push( z[ 0 ], z[ 1 ] );\n\t\t} else if ( isComplexLike( z ) ) {\n\t\t\tout.push( real( z ), imag( z ) );\n\t\t} else {\n\t\t\treturn new TypeError( 'invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `'+z+'`.' );\n\t\t}\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default fromIteratorMap;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport real from '@stdlib/complex-real';\nimport imag from '@stdlib/complex-imag';\n\n\n// MAIN //\n\n/**\n* Returns a strided array of real and imaginary components.\n*\n* @private\n* @param {Float64Array} buf - output array\n* @param {Array} arr - array containing complex numbers\n* @returns {(Float64Array|null)} output array or null\n*/\nfunction fromArray( buf, arr ) {\n\tvar len;\n\tvar v;\n\tvar i;\n\tvar j;\n\n\tlen = arr.length;\n\tj = 0;\n\tfor ( i = 0; i < len; i++ ) {\n\t\tv = arr[ i ];\n\t\tif ( !isComplexLike( v ) ) {\n\t\t\treturn null;\n\t\t}\n\t\tbuf[ j ] = real( v );\n\t\tbuf[ j+1 ] = imag( v );\n\t\tj += 2; // stride\n\t}\n\treturn buf;\n}\n\n\n// EXPORTS //\n\nexport default fromArray;\n","/* eslint-disable no-restricted-syntax, max-lines, no-invalid-this */\n\n/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isNonNegativeInteger } from '@stdlib/assert-is-nonnegative-integer';\nimport isArrayLikeObject from '@stdlib/assert-is-array-like-object';\nimport isCollection from '@stdlib/assert-is-collection';\nimport isArrayBuffer from '@stdlib/assert-is-arraybuffer';\nimport isObject from '@stdlib/assert-is-object';\nimport isArray from '@stdlib/assert-is-array';\nimport isFunction from '@stdlib/assert-is-function';\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport isEven from '@stdlib/math-base-assert-is-even';\nimport isInteger from '@stdlib/math-base-assert-is-integer';\nimport hasIteratorSymbolSupport from '@stdlib/assert-has-iterator-symbol-support';\nimport ITERATOR_SYMBOL from '@stdlib/symbol-iterator';\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport setReadOnlyAccessor from '@stdlib/utils-define-nonenumerable-read-only-accessor';\nimport Float64Array from '@stdlib/array-float64';\nimport Complex128 from '@stdlib/complex-float64';\nimport real from '@stdlib/complex-real';\nimport imag from '@stdlib/complex-imag';\nimport reinterpret64 from '@stdlib/strided-base-reinterpret-complex64';\nimport reinterpret128 from '@stdlib/strided-base-reinterpret-complex128';\nimport arraylike2object from '@stdlib/array-base-arraylike2object';\nimport fromIterator from './from_iterator.js';\nimport fromIteratorMap from './from_iterator_map.js';\nimport fromArray from './from_array.js';\n\n\n// VARIABLES //\n\nvar BYTES_PER_ELEMENT = Float64Array.BYTES_PER_ELEMENT * 2;\nvar HAS_ITERATOR_SYMBOL = hasIteratorSymbolSupport();\n\n\n// FUNCTIONS //\n\n/**\n* Returns a boolean indicating if a value is a complex typed array.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a complex typed array\n*/\nfunction isComplexArray( value ) {\n\treturn (\n\t\tvalue instanceof Complex128Array ||\n\t\t(\n\t\t\ttypeof value === 'object' &&\n\t\t\tvalue !== null &&\n\t\t\t(\n\t\t\t\tvalue.constructor.name === 'Complex64Array' ||\n\t\t\t\tvalue.constructor.name === 'Complex128Array'\n\t\t\t) &&\n\t\t\ttypeof value._length === 'number' && // eslint-disable-line no-underscore-dangle\n\n\t\t\t// NOTE: we don't perform a more rigorous test here for a typed array for performance reasons, as robustly checking for a typed array instance could require walking the prototype tree and performing relatively expensive constructor checks...\n\t\t\ttypeof value._buffer === 'object' // eslint-disable-line no-underscore-dangle\n\t\t)\n\t);\n}\n\n/**\n* Returns a boolean indicating if a value is a complex typed array constructor.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a complex typed array constructor\n*/\nfunction isComplexArrayConstructor( value ) {\n\treturn (\n\t\tvalue === Complex128Array ||\n\n\t\t// NOTE: weaker test in order to avoid a circular dependency with Complex64Array...\n\t\tvalue.name === 'Complex64Array'\n\t);\n}\n\n/**\n* Returns a boolean indicating if a value is a `Complex64Array`.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a `Complex64Array`\n*/\nfunction isComplex64Array( value ) {\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\tvalue.constructor.name === 'Complex64Array' &&\n\t\tvalue.BYTES_PER_ELEMENT === BYTES_PER_ELEMENT/2\n\t);\n}\n\n/**\n* Returns a boolean indicating if a value is a `Complex128Array`.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a `Complex128Array`\n*/\nfunction isComplex128Array( value ) {\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\tvalue.constructor.name === 'Complex128Array' &&\n\t\tvalue.BYTES_PER_ELEMENT === BYTES_PER_ELEMENT\n\t);\n}\n\n\n// MAIN //\n\n/**\n* 128-bit complex number array constructor.\n*\n* @constructor\n* @param {(NonNegativeInteger|Collection|ArrayBuffer|Iterable)} [arg] - length, typed array, array-like object, buffer, or iterable\n* @param {NonNegativeInteger} [byteOffset=0] - byte offset\n* @param {NonNegativeInteger} [length] - view length\n* @throws {RangeError} ArrayBuffer byte length must be a multiple of `16`\n* @throws {RangeError} array-like object and typed array input arguments must have a length which is a multiple of two\n* @throws {TypeError} if provided only a single argument, must provide a valid argument\n* @throws {TypeError} byte offset must be a nonnegative integer\n* @throws {RangeError} byte offset must be a multiple of `16`\n* @throws {TypeError} view length must be a positive multiple of `16`\n* @throws {RangeError} must provide sufficient memory to accommodate byte offset and view length requirements\n* @throws {TypeError} an iterator must return either a two element array containing real and imaginary components or a complex number\n* @returns {Complex128Array} complex number array\n*\n* @example\n* var arr = new Complex128Array();\n* // returns \n*\n* var len = arr.length;\n* // returns 0\n*\n* @example\n* var arr = new Complex128Array( 2 );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*\n* @example\n* var arr = new Complex128Array( [ 1.0, -1.0 ] );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* import ArrayBuffer from '@stdlib/array-buffer';\n*\n* var buf = new ArrayBuffer( 32 );\n* var arr = new Complex128Array( buf );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*\n* @example\n* import ArrayBuffer from '@stdlib/array-buffer';\n*\n* var buf = new ArrayBuffer( 32 );\n* var arr = new Complex128Array( buf, 16 );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* import ArrayBuffer from '@stdlib/array-buffer';\n*\n* var buf = new ArrayBuffer( 64 );\n* var arr = new Complex128Array( buf, 16, 2 );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*/\nfunction Complex128Array() {\n\tvar byteOffset;\n\tvar nargs;\n\tvar buf;\n\tvar len;\n\n\tnargs = arguments.length;\n\tif ( !(this instanceof Complex128Array) ) {\n\t\tif ( nargs === 0 ) {\n\t\t\treturn new Complex128Array();\n\t\t}\n\t\tif ( nargs === 1 ) {\n\t\t\treturn new Complex128Array( arguments[0] );\n\t\t}\n\t\tif ( nargs === 2 ) {\n\t\t\treturn new Complex128Array( arguments[0], arguments[1] );\n\t\t}\n\t\treturn new Complex128Array( arguments[0], arguments[1], arguments[2] );\n\t}\n\t// Create the underlying data buffer...\n\tif ( nargs === 0 ) {\n\t\tbuf = new Float64Array( 0 ); // backward-compatibility\n\t} else if ( nargs === 1 ) {\n\t\tif ( isNonNegativeInteger( arguments[0] ) ) {\n\t\t\tbuf = new Float64Array( arguments[0]*2 );\n\t\t} else if ( isCollection( arguments[0] ) ) {\n\t\t\tbuf = arguments[ 0 ];\n\t\t\tlen = buf.length;\n\n\t\t\t// If provided a \"generic\" array, peak at the first value, and, if the value is a complex number, try to process as an array of complex numbers, falling back to \"normal\" typed array initialization if we fail and ensuring consistency if the first value had not been a complex number...\n\t\t\tif ( len && isArray( buf ) && isComplexLike( buf[0] ) ) {\n\t\t\t\tbuf = fromArray( new Float64Array( len*2 ), buf );\n\t\t\t\tif ( buf === null ) {\n\t\t\t\t\t// We failed and we are now forced to allocate a new array :-(\n\t\t\t\t\tif ( !isEven( len ) ) {\n\t\t\t\t\t\tthrow new RangeError( 'invalid argument. Array-like object input arguments must have a length which is a multiple of two. Length: `'+len+'`.' );\n\t\t\t\t\t}\n\t\t\t\t\t// We failed, so fall back to directly setting values...\n\t\t\t\t\tbuf = new Float64Array( arguments[0] );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ( isComplex64Array( buf ) ) {\n\t\t\t\t\tbuf = reinterpret64( buf, 0 );\n\t\t\t\t} else if ( isComplex128Array( buf ) ) {\n\t\t\t\t\tbuf = reinterpret128( buf, 0 );\n\t\t\t\t} else if ( !isEven( len ) ) {\n\t\t\t\t\tthrow new RangeError( 'invalid argument. Array-like object and typed array input arguments must have a length which is a multiple of two. Length: `'+len+'`.' );\n\t\t\t\t}\n\t\t\t\tbuf = new Float64Array( buf );\n\t\t\t}\n\t\t} else if ( isArrayBuffer( arguments[0] ) ) {\n\t\t\tbuf = arguments[ 0 ];\n\t\t\tif ( !isInteger( buf.byteLength/BYTES_PER_ELEMENT ) ) {\n\t\t\t\tthrow new RangeError( 'invalid argument. ArrayBuffer byte length must be a multiple of '+BYTES_PER_ELEMENT+'. Byte length: `'+buf.byteLength+'`.' );\n\t\t\t}\n\t\t\tbuf = new Float64Array( buf );\n\t\t} else if ( isObject( arguments[0] ) ) {\n\t\t\tbuf = arguments[ 0 ];\n\t\t\tif ( HAS_ITERATOR_SYMBOL === false ) {\n\t\t\t\tthrow new TypeError( 'invalid argument. Environment lacks Symbol.iterator support. Must provide a length, ArrayBuffer, typed array, or array-like object. Value: `'+buf+'`.' );\n\t\t\t}\n\t\t\tif ( !isFunction( buf[ ITERATOR_SYMBOL ] ) ) {\n\t\t\t\tthrow new TypeError( 'invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `'+buf+'`.' );\n\t\t\t}\n\t\t\tbuf = buf[ ITERATOR_SYMBOL ]();\n\t\t\tif ( !isFunction( buf.next ) ) {\n\t\t\t\tthrow new TypeError( 'invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable.' );\n\t\t\t}\n\t\t\tbuf = fromIterator( buf );\n\t\t\tif ( buf instanceof Error ) {\n\t\t\t\tthrow buf;\n\t\t\t}\n\t\t\tbuf = new Float64Array( buf );\n\t\t} else {\n\t\t\tthrow new TypeError( 'invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `'+arguments[0]+'`.' );\n\t\t}\n\t} else {\n\t\tbuf = arguments[ 0 ];\n\t\tif ( !isArrayBuffer( buf ) ) {\n\t\t\tthrow new TypeError( 'invalid argument. First argument must be an array buffer. Value: `'+buf+'`.' );\n\t\t}\n\t\tbyteOffset = arguments[ 1 ];\n\t\tif ( !isNonNegativeInteger( byteOffset ) ) {\n\t\t\tthrow new TypeError( 'invalid argument. Byte offset must be a nonnegative integer. Value: `'+byteOffset+'`.' );\n\t\t}\n\t\tif ( !isInteger( byteOffset/BYTES_PER_ELEMENT ) ) {\n\t\t\tthrow new RangeError( 'invalid argument. Byte offset must be a multiple of '+BYTES_PER_ELEMENT+'. Value: `'+byteOffset+'`.' );\n\t\t}\n\t\tif ( nargs === 2 ) {\n\t\t\tlen = buf.byteLength - byteOffset;\n\t\t\tif ( !isInteger( len/BYTES_PER_ELEMENT ) ) {\n\t\t\t\tthrow new RangeError( 'invalid arguments. ArrayBuffer view byte length must be a multiple of '+BYTES_PER_ELEMENT+'. View byte length: `'+len+'`.' );\n\t\t\t}\n\t\t\tbuf = new Float64Array( buf, byteOffset );\n\t\t} else {\n\t\t\tlen = arguments[ 2 ];\n\t\t\tif ( !isNonNegativeInteger( len ) ) {\n\t\t\t\tthrow new TypeError( 'invalid argument. Length must be a nonnegative integer. Value: `'+len+'`.' );\n\t\t\t}\n\t\t\tif ( (len*BYTES_PER_ELEMENT) > (buf.byteLength-byteOffset) ) {\n\t\t\t\tthrow new RangeError( 'invalid arguments. ArrayBuffer has insufficient capacity. Either decrease the array length or provide a bigger buffer. Minimum capacity: `'+(len*BYTES_PER_ELEMENT)+'`.' );\n\t\t\t}\n\t\t\tbuf = new Float64Array( buf, byteOffset, len*2 );\n\t\t}\n\t}\n\tsetReadOnly( this, '_buffer', buf );\n\tsetReadOnly( this, '_length', buf.length/2 );\n\n\treturn this;\n}\n\n/**\n* Size (in bytes) of each array element.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex128Array\n* @readonly\n* @type {PositiveInteger}\n* @default 16\n*\n* @example\n* var nbytes = Complex128Array.BYTES_PER_ELEMENT;\n* // returns 16\n*/\nsetReadOnly( Complex128Array, 'BYTES_PER_ELEMENT', BYTES_PER_ELEMENT );\n\n/**\n* Constructor name.\n*\n* @name name\n* @memberof Complex128Array\n* @readonly\n* @type {string}\n* @default 'Complex128Array'\n*\n* @example\n* var name = Complex128Array.name;\n* // returns 'Complex128Array'\n*/\nsetReadOnly( Complex128Array, 'name', 'Complex128Array' );\n\n/**\n* Creates a new 128-bit complex number array from an array-like object or an iterable.\n*\n* @name from\n* @memberof Complex128Array\n* @type {Function}\n* @param {(Collection|Object)} src - array-like object or iterable\n* @param {Function} [clbk] - callback to invoke for each source element\n* @param {*} [thisArg] - context\n* @throws {TypeError} `this` context must be a constructor\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be an array-like object or an iterable\n* @throws {TypeError} second argument must be a function\n* @throws {RangeError} array-like objects must have a length which is a multiple of two\n* @throws {TypeError} an iterator must return either a two element array containing real and imaginary components or a complex number\n* @throws {TypeError} when provided an iterator, a callback must return either a two element array containing real and imaginary components or a complex number\n* @returns {Complex128Array} 128-bit complex number array\n*\n* @example\n* var arr = Complex128Array.from( [ 1.0, -1.0 ] );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n*\n* var arr = Complex128Array.from( [ new Complex128( 1.0, 1.0 ) ] );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* function clbk( v ) {\n* return new Complex128( real(v)*2.0, imag(v)*2.0 );\n* }\n*\n* var arr = Complex128Array.from( [ new Complex128( 1.0, 1.0 ) ], clbk );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*/\nsetReadOnly( Complex128Array, 'from', function from( src ) {\n\tvar thisArg;\n\tvar nargs;\n\tvar clbk;\n\tvar out;\n\tvar buf;\n\tvar tmp;\n\tvar len;\n\tvar flg;\n\tvar v;\n\tvar i;\n\tvar j;\n\tif ( !isFunction( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` context must be a constructor.' );\n\t}\n\tif ( !isComplexArrayConstructor( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tnargs = arguments.length;\n\tif ( nargs > 1 ) {\n\t\tclbk = arguments[ 1 ];\n\t\tif ( !isFunction( clbk ) ) {\n\t\t\tthrow new TypeError( 'invalid argument. Second argument must be a function. Value: `'+clbk+'`.' );\n\t\t}\n\t\tif ( nargs > 2 ) {\n\t\t\tthisArg = arguments[ 2 ];\n\t\t}\n\t}\n\tif ( isComplexArray( src ) ) {\n\t\tlen = src.length;\n\t\tif ( clbk ) {\n\t\t\tout = new this( len );\n\t\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\t\tj = 0;\n\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\tv = clbk.call( thisArg, src.get( i ), i );\n\t\t\t\tif ( isComplexLike( v ) ) {\n\t\t\t\t\tbuf[ j ] = real( v );\n\t\t\t\t\tbuf[ j+1 ] = imag( v );\n\t\t\t\t} else if ( isArrayLikeObject( v ) && v.length >= 2 ) {\n\t\t\t\t\tbuf[ j ] = v[ 0 ];\n\t\t\t\t\tbuf[ j+1 ] = v[ 1 ];\n\t\t\t\t} else {\n\t\t\t\t\tthrow new TypeError( 'invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `'+v+'`.' );\n\t\t\t\t}\n\t\t\t\tj += 2; // stride\n\t\t\t}\n\t\t\treturn out;\n\t\t}\n\t\treturn new this( src );\n\t}\n\tif ( isCollection( src ) ) {\n\t\tif ( clbk ) {\n\t\t\t// Note: array contents affect how we iterate over a provided data source. If only complex number objects, we can extract real and imaginary components. Otherwise, for non-complex number arrays (e.g., `Float64Array`, etc), we assume a strided array where real and imaginary components are interleaved. In the former case, we expect a callback to return real and imaginary components (possibly as a complex number). In the latter case, we expect a callback to return *either* a real or imaginary component.\n\n\t\t\tlen = src.length;\n\t\t\ttmp = arraylike2object( src );\n\n\t\t\t// Detect whether we've been provided an array which returns complex number objects...\n\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\tif ( !isComplexLike( tmp.getter( src, i ) ) ) {\n\t\t\t\t\tflg = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// If an array does not contain only complex number objects, then we assume interleaved real and imaginary components...\n\t\t\tif ( flg ) {\n\t\t\t\tif ( !isEven( len ) ) {\n\t\t\t\t\tthrow new RangeError( 'invalid argument. First argument must have a length which is a multiple of two. Length: `'+len+'`.' );\n\t\t\t\t}\n\t\t\t\tout = new this( len/2 );\n\t\t\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\t\tbuf[ i ] = clbk.call( thisArg, tmp.getter( src, i ), i );\n\t\t\t\t}\n\t\t\t\treturn out;\n\t\t\t}\n\t\t\t// If an array contains only complex number objects, then we need to extract real and imaginary components...\n\t\t\tout = new this( len );\n\t\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\t\tj = 0;\n\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\tv = clbk.call( thisArg, tmp.getter( src, i ), i );\n\t\t\t\tif ( isComplexLike( v ) ) {\n\t\t\t\t\tbuf[ j ] = real( v );\n\t\t\t\t\tbuf[ j+1 ] = imag( v );\n\t\t\t\t} else if ( isArrayLikeObject( v ) && v.length >= 2 ) {\n\t\t\t\t\tbuf[ j ] = v[ 0 ];\n\t\t\t\t\tbuf[ j+1 ] = v[ 1 ];\n\t\t\t\t} else {\n\t\t\t\t\tthrow new TypeError( 'invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `'+v+'`.' );\n\t\t\t\t}\n\t\t\t\tj += 2; // stride\n\t\t\t}\n\t\t\treturn out;\n\t\t}\n\t\treturn new this( src );\n\t}\n\tif ( isObject( src ) && HAS_ITERATOR_SYMBOL && isFunction( src[ ITERATOR_SYMBOL ] ) ) { // eslint-disable-line max-len\n\t\tbuf = src[ ITERATOR_SYMBOL ]();\n\t\tif ( !isFunction( buf.next ) ) {\n\t\t\tthrow new TypeError( 'invalid argument. First argument must be an array-like object or an iterable.' );\n\t\t}\n\t\tif ( clbk ) {\n\t\t\ttmp = fromIteratorMap( buf, clbk, thisArg );\n\t\t} else {\n\t\t\ttmp = fromIterator( buf );\n\t\t}\n\t\tif ( tmp instanceof Error ) {\n\t\t\tthrow tmp;\n\t\t}\n\t\tlen = tmp.length / 2;\n\t\tout = new this( len );\n\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\tbuf[ i ] = tmp[ i ];\n\t\t}\n\t\treturn out;\n\t}\n\tthrow new TypeError( 'invalid argument. First argument must be an array-like object or an iterable. Value: `'+src+'`.' );\n});\n\n/**\n* Creates a new 128-bit complex number array from a variable number of arguments.\n*\n* @name of\n* @memberof Complex128Array\n* @type {Function}\n* @param {...*} element - array elements\n* @throws {TypeError} `this` context must be a constructor\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Complex128Array} 128-bit complex number array\n*\n* @example\n* var arr = Complex128Array.of( 1.0, 1.0, 1.0, 1.0 );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*/\nsetReadOnly( Complex128Array, 'of', function of() {\n\tvar args;\n\tvar i;\n\tif ( !isFunction( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` context must be a constructor.' );\n\t}\n\tif ( !isComplexArrayConstructor( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\targs = [];\n\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\targs.push( arguments[ i ] );\n\t}\n\treturn new this( args );\n});\n\n/**\n* Pointer to the underlying data buffer.\n*\n* @name buffer\n* @memberof Complex128Array.prototype\n* @readonly\n* @type {ArrayBuffer}\n*\n* @example\n* var arr = new Complex128Array( 10 );\n*\n* var buf = arr.buffer;\n* // returns \n*/\nsetReadOnlyAccessor( Complex128Array.prototype, 'buffer', function get() {\n\treturn this._buffer.buffer;\n});\n\n/**\n* Size (in bytes) of the array.\n*\n* @name byteLength\n* @memberof Complex128Array.prototype\n* @readonly\n* @type {NonNegativeInteger}\n*\n* @example\n* var arr = new Complex128Array( 10 );\n*\n* var byteLength = arr.byteLength;\n* // returns 160\n*/\nsetReadOnlyAccessor( Complex128Array.prototype, 'byteLength', function get() {\n\treturn this._buffer.byteLength;\n});\n\n/**\n* Offset (in bytes) of the array from the start of its underlying `ArrayBuffer`.\n*\n* @name byteOffset\n* @memberof Complex128Array.prototype\n* @readonly\n* @type {NonNegativeInteger}\n*\n* @example\n* var arr = new Complex128Array( 10 );\n*\n* var byteOffset = arr.byteOffset;\n* // returns 0\n*/\nsetReadOnlyAccessor( Complex128Array.prototype, 'byteOffset', function get() {\n\treturn this._buffer.byteOffset;\n});\n\n/**\n* Size (in bytes) of each array element.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex128Array.prototype\n* @readonly\n* @type {PositiveInteger}\n* @default 16\n*\n* @example\n* var arr = new Complex128Array( 10 );\n*\n* var nbytes = arr.BYTES_PER_ELEMENT;\n* // returns 16\n*/\nsetReadOnly( Complex128Array.prototype, 'BYTES_PER_ELEMENT', Complex128Array.BYTES_PER_ELEMENT );\n\n/**\n* Copies a sequence of elements within the array to the position starting at `target`.\n*\n* @name copyWithin\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {integer} target - index at which to start copying elements\n* @param {integer} start - source index at which to copy elements from\n* @param {integer} [end] - source index at which to stop copying elements from\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Complex128Array} modified array\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* var arr = new Complex128Array( 4 );\n*\n* // Set the array elements:\n* arr.set( new Complex128( 1.0, 1.0 ), 0 );\n* arr.set( new Complex128( 2.0, 2.0 ), 1 );\n* arr.set( new Complex128( 3.0, 3.0 ), 2 );\n* arr.set( new Complex128( 4.0, 4.0 ), 3 );\n*\n* // Copy the first two elements to the last two elements:\n* arr.copyWithin( 2, 0, 2 );\n*\n* // Get the last array element:\n* var z = arr.get( 3 );\n*\n* var re = real( z );\n* // returns 2.0\n*\n* var im = imag( z );\n* // returns 2.0\n*/\nsetReadOnly( Complex128Array.prototype, 'copyWithin', function copyWithin( target, start ) {\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\t// FIXME: prefer a functional `copyWithin` implementation which addresses lack of universal browser support (e.g., IE11 and Safari) or ensure that typed arrays are polyfilled\n\tif ( arguments.length === 2 ) {\n\t\tthis._buffer.copyWithin( target*2, start*2 );\n\t} else {\n\t\tthis._buffer.copyWithin( target*2, start*2, arguments[2]*2 );\n\t}\n\treturn this;\n});\n\n/**\n* Returns an iterator for iterating over array key-value pairs.\n*\n* @name entries\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Iterator} iterator\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n*\n* var arr = [\n* new Complex128( 1.0, 1.0 ),\n* new Complex128( 2.0, 2.0 ),\n* new Complex128( 3.0, 3.0 )\n* ];\n* arr = new Complex128Array( arr );\n*\n* // Create an iterator:\n* var it = arr.entries();\n*\n* // Iterate over the key-value pairs...\n* var v = it.next().value;\n* // returns [ 0, ]\n*\n* v = it.next().value;\n* // returns [ 1, ]\n*\n* v = it.next().value;\n* // returns [ 2, ]\n*\n* var bool = it.next().done;\n* // returns true\n*/\nsetReadOnly( Complex128Array.prototype, 'entries', function entries() {\n\tvar buffer;\n\tvar self;\n\tvar iter;\n\tvar len;\n\tvar FLG;\n\tvar i;\n\tvar j;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tself = this;\n\tbuffer = this._buffer;\n\tlen = this._length;\n\n\t// Initialize the iteration indices:\n\ti = -1;\n\tj = -2;\n\n\t// Create an iterator protocol-compliant object:\n\titer = {};\n\tsetReadOnly( iter, 'next', next );\n\tsetReadOnly( iter, 'return', end );\n\n\tif ( ITERATOR_SYMBOL ) {\n\t\tsetReadOnly( iter, ITERATOR_SYMBOL, factory );\n\t}\n\treturn iter;\n\n\t/**\n\t* Returns an iterator protocol-compliant object containing the next iterated value.\n\t*\n\t* @private\n\t* @returns {Object} iterator protocol-compliant object\n\t*/\n\tfunction next() {\n\t\tvar z;\n\t\ti += 1;\n\t\tif ( FLG || i >= len ) {\n\t\t\treturn {\n\t\t\t\t'done': true\n\t\t\t};\n\t\t}\n\t\tj += 2;\n\t\tz = new Complex128( buffer[ j ], buffer[ j+1 ] );\n\t\treturn {\n\t\t\t'value': [ i, z ],\n\t\t\t'done': false\n\t\t};\n\t}\n\n\t/**\n\t* Finishes an iterator.\n\t*\n\t* @private\n\t* @param {*} [value] - value to return\n\t* @returns {Object} iterator protocol-compliant object\n\t*/\n\tfunction end( value ) {\n\t\tFLG = true;\n\t\tif ( arguments.length ) {\n\t\t\treturn {\n\t\t\t\t'value': value,\n\t\t\t\t'done': true\n\t\t\t};\n\t\t}\n\t\treturn {\n\t\t\t'done': true\n\t\t};\n\t}\n\n\t/**\n\t* Returns a new iterator.\n\t*\n\t* @private\n\t* @returns {Iterator} iterator\n\t*/\n\tfunction factory() {\n\t\treturn self.entries();\n\t}\n});\n\n/**\n* Returns an array element.\n*\n* @name get\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {NonNegativeInteger} idx - element index\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} must provide a nonnegative integer\n* @returns {(Complex128|void)} array element\n*\n* @example\n* var arr = new Complex128Array( 10 );\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* var z = arr.get( 0 );\n* // returns \n*\n* var re = real( z );\n* // returns 0.0\n*\n* var im = imag( z );\n* // returns 0.0\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n*\n* z = arr.get( 0 );\n* // returns \n*\n* re = real( z );\n* // returns 1.0\n*\n* im = imag( z );\n* // returns -1.0\n*\n* z = arr.get( 100 );\n* // returns undefined\n*/\nsetReadOnly( Complex128Array.prototype, 'get', function get( idx ) {\n\tvar buf;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isNonNegativeInteger( idx ) ) {\n\t\tthrow new TypeError( 'invalid argument. Must provide a nonnegative integer. Value: `'+idx+'`.' );\n\t}\n\tif ( idx >= this._length ) {\n\t\treturn;\n\t}\n\tbuf = this._buffer;\n\tidx *= 2;\n\treturn new Complex128( buf[ idx ], buf[ idx+1 ] );\n});\n\n/**\n* Number of array elements.\n*\n* @name length\n* @memberof Complex128Array.prototype\n* @readonly\n* @type {NonNegativeInteger}\n*\n* @example\n* var arr = new Complex128Array( 10 );\n*\n* var len = arr.length;\n* // returns 10\n*/\nsetReadOnlyAccessor( Complex128Array.prototype, 'length', function get() {\n\treturn this._length;\n});\n\n/**\n* Sets an array element.\n*\n* ## Notes\n*\n* - When provided a typed array, real or complex, we must check whether the source array shares the same buffer as the target array and whether the underlying memory overlaps. In particular, we are concerned with the following scenario:\n*\n* ```text\n* buf: ---------------------\n* src: ---------------------\n* ```\n*\n* In the above, as we copy values from `src`, we will overwrite values in the `src` view, resulting in duplicated values copied into the end of `buf`, which is not intended. Hence, to avoid overwriting source values, we must **copy** source values to a temporary array.\n*\n* In the other overlapping scenario,\n*\n* ```text\n* buf: ---------------------\n* src: ---------------------\n* ```\n*\n* by the time we begin copying into the overlapping region, we are copying from the end of `src`, a non-overlapping region, which means we don't run the risk of copying copied values, rather than the original `src` values as intended.\n*\n*\n* @name set\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {(Collection|Complex|ComplexArray)} value - value(s)\n* @param {NonNegativeInteger} [i=0] - element index at which to start writing values\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be either a complex number, an array-like object, or a complex number array\n* @throws {TypeError} index argument must be a nonnegative integer\n* @throws {RangeError} array-like objects must have a length which is a multiple of two\n* @throws {RangeError} index argument is out-of-bounds\n* @throws {RangeError} target array lacks sufficient storage to accommodate source values\n* @returns {void}\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* var arr = new Complex128Array( 10 );\n*\n* var z = arr.get( 0 );\n* // returns \n*\n* var re = real( z );\n* // returns 0.0\n*\n* var im = imag( z );\n* // returns 0.0\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n*\n* z = arr.get( 0 );\n* // returns \n*\n* re = real( z );\n* // returns 1.0\n*\n* im = imag( z );\n* // returns -1.0\n*/\nsetReadOnly( Complex128Array.prototype, 'set', function set( value ) {\n\t/* eslint-disable no-underscore-dangle */\n\tvar sbuf;\n\tvar idx;\n\tvar buf;\n\tvar tmp;\n\tvar flg;\n\tvar N;\n\tvar v;\n\tvar i;\n\tvar j;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tbuf = this._buffer;\n\tif ( arguments.length > 1 ) {\n\t\tidx = arguments[ 1 ];\n\t\tif ( !isNonNegativeInteger( idx ) ) {\n\t\t\tthrow new TypeError( 'invalid argument. Index argument must be a nonnegative integer. Value: `'+idx+'`.' );\n\t\t}\n\t} else {\n\t\tidx = 0;\n\t}\n\tif ( isComplexLike( value ) ) {\n\t\tif ( idx >= this._length ) {\n\t\t\tthrow new RangeError( 'invalid argument. Index argument is out-of-bounds. Value: `'+idx+'`.' );\n\t\t}\n\t\tidx *= 2;\n\t\tbuf[ idx ] = real( value );\n\t\tbuf[ idx+1 ] = imag( value );\n\t\treturn;\n\t}\n\tif ( isComplexArray( value ) ) {\n\t\tN = value._length;\n\t\tif ( idx+N > this._length ) {\n\t\t\tthrow new RangeError( 'invalid arguments. Target array lacks sufficient storage to accommodate source values.' );\n\t\t}\n\t\tsbuf = value._buffer;\n\n\t\t// Check for overlapping memory...\n\t\tj = buf.byteOffset + (idx*BYTES_PER_ELEMENT);\n\t\tif (\n\t\t\tsbuf.buffer === buf.buffer &&\n\t\t\t(\n\t\t\t\tsbuf.byteOffset < j &&\n\t\t\t\tsbuf.byteOffset+sbuf.byteLength > j\n\t\t\t)\n\t\t) {\n\t\t\t// We need to copy source values...\n\t\t\ttmp = new Float64Array( sbuf.length );\n\t\t\tfor ( i = 0; i < sbuf.length; i++ ) {\n\t\t\t\ttmp[ i ] = sbuf[ i ];\n\t\t\t}\n\t\t\tsbuf = tmp;\n\t\t}\n\t\tidx *= 2;\n\t\tj = 0;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\tbuf[ idx ] = sbuf[ j ];\n\t\t\tbuf[ idx+1 ] = sbuf[ j+1 ];\n\t\t\tidx += 2; // stride\n\t\t\tj += 2; // stride\n\t\t}\n\t\treturn;\n\t}\n\tif ( isCollection( value ) ) {\n\t\t// Detect whether we've been provided an array of complex numbers...\n\t\tN = value.length;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\tif ( !isComplexLike( value[ i ] ) ) {\n\t\t\t\tflg = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t// If an array does not contain only complex numbers, then we assume interleaved real and imaginary components...\n\t\tif ( flg ) {\n\t\t\tif ( !isEven( N ) ) {\n\t\t\t\tthrow new RangeError( 'invalid argument. Array-like object arguments must have a length which is a multiple of two. Length: `'+N+'`.' );\n\t\t\t}\n\t\t\tif ( idx+(N/2) > this._length ) {\n\t\t\t\tthrow new RangeError( 'invalid arguments. Target array lacks sufficient storage to accommodate source values.' );\n\t\t\t}\n\t\t\tsbuf = value;\n\n\t\t\t// Check for overlapping memory...\n\t\t\tj = buf.byteOffset + (idx*BYTES_PER_ELEMENT);\n\t\t\tif (\n\t\t\t\tsbuf.buffer === buf.buffer &&\n\t\t\t\t(\n\t\t\t\t\tsbuf.byteOffset < j &&\n\t\t\t\t\tsbuf.byteOffset+sbuf.byteLength > j\n\t\t\t\t)\n\t\t\t) {\n\t\t\t\t// We need to copy source values...\n\t\t\t\ttmp = new Float64Array( N );\n\t\t\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\t\t\ttmp[ i ] = sbuf[ i ];\n\t\t\t\t}\n\t\t\t\tsbuf = tmp;\n\t\t\t}\n\t\t\tidx *= 2;\n\t\t\tN /= 2;\n\t\t\tj = 0;\n\t\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\t\tbuf[ idx ] = sbuf[ j ];\n\t\t\t\tbuf[ idx+1 ] = sbuf[ j+1 ];\n\t\t\t\tidx += 2; // stride\n\t\t\t\tj += 2; // stride\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\t// If an array contains only complex numbers, then we need to extract real and imaginary components...\n\t\tif ( idx+N > this._length ) {\n\t\t\tthrow new RangeError( 'invalid arguments. Target array lacks sufficient storage to accommodate source values.' );\n\t\t}\n\t\tidx *= 2;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\tv = value[ i ];\n\t\t\tbuf[ idx ] = real( v );\n\t\t\tbuf[ idx+1 ] = imag( v );\n\t\t\tidx += 2; // stride\n\t\t}\n\t\treturn;\n\t}\n\tthrow new TypeError( 'invalid argument. First argument must be either a complex number, an array-like object, or a complex number array. Value: `'+value+'`.' );\n\n\t/* eslint-enable no-underscore-dangle */\n});\n\n\n// EXPORTS //\n\nexport default Complex128Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport Float64Array from '@stdlib/array-float64';\nimport Float32Array from '@stdlib/array-float32';\nimport Int16Array from '@stdlib/array-int16';\nimport Int32Array from '@stdlib/array-int32';\nimport Int8Array from '@stdlib/array-int8';\nimport Uint16Array from '@stdlib/array-uint16';\nimport Uint32Array from '@stdlib/array-uint32';\nimport Uint8Array from '@stdlib/array-uint8';\nimport Uint8ClampedArray from '@stdlib/array-uint8c';\nimport Complex64Array from '@stdlib/array-complex64';\nimport Complex128Array from '@stdlib/array-complex128';\n\n\n// MAIN //\n\n// Mapping from data types to constructors...\nvar ctors = {\n\t'float64': Float64Array,\n\t'float32': Float32Array,\n\t'generic': Array, // TODO: replace with `stdlib` pkg\n\t'int16': Int16Array,\n\t'int32': Int32Array,\n\t'int8': Int8Array,\n\t'uint16': Uint16Array,\n\t'uint32': Uint32Array,\n\t'uint8': Uint8Array,\n\t'uint8c': Uint8ClampedArray,\n\t'complex64': Complex64Array,\n\t'complex128': Complex128Array\n};\n\n\n// EXPORTS //\n\nexport default ctors;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport table from './ctors.js';\n\n\n// MAIN //\n\n/**\n* Returns an array constructor.\n*\n* @param {string} dtype - data type\n* @returns {(Function|null)} constructor or null\n*\n* @example\n* var ctor = ctors( 'float64' );\n* // returns \n*\n* @example\n* var ctor = ctors( 'float' );\n* // returns null\n*/\nfunction ctors( dtype ) {\n\treturn table[ dtype ] || null;\n}\n\n\n// EXPORTS //\n\nexport default ctors;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport filled from '@stdlib/array-base-filled';\n\n\n// MAIN //\n\n/**\n* Returns a zero-filled \"generic\" array.\n*\n* @param {NonNegativeInteger} len - array length\n* @returns {Array} output array\n*\n* @example\n* var out = zeros( 3 );\n* // returns [ 0.0, 0.0, 0.0 ]\n*/\nfunction zeros( len ) {\n\treturn filled( 0.0, len );\n}\n\n\n// EXPORTS //\n\nexport default zeros;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Returns a filled \"generic\" array.\n*\n* @param {*} value - fill value\n* @param {NonNegativeInteger} len - array length\n* @returns {Array} filled array\n*\n* @example\n* var out = filled( 0.0, 3 );\n* // returns [ 0.0, 0.0, 0.0 ]\n*\n* @example\n* var out = filled( 'beep', 3 );\n* // returns [ 'beep', 'beep', 'beep' ]\n*/\nfunction filled( value, len ) {\n\tvar arr;\n\tvar i;\n\n\t// Manually push elements in order to ensure \"fast\" elements...\n\tarr = [];\n\tfor ( i = 0; i < len; i++ ) {\n\t\tarr.push( value );\n\t}\n\treturn arr;\n}\n\n\n// EXPORTS //\n\nexport default filled;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isNonNegativeInteger } from '@stdlib/assert-is-nonnegative-integer';\nimport ctors from '@stdlib/array-ctors';\nimport gzeros from '@stdlib/array-base-zeros';\n\n\n// MAIN //\n\n/**\n* Creates a zero-filled array having a specified length.\n*\n* @param {NonNegativeInteger} length - array length\n* @param {string} [dtype=\"float64\"] - data type\n* @throws {TypeError} first argument must be a nonnegative integer\n* @throws {TypeError} second argument must be a recognized data type\n* @returns {(TypedArray|Array|ComplexArray)} array or typed array\n*\n* @example\n* var arr = zeros( 2 );\n* // returns [ 0.0, 0.0 ]\n*\n* @example\n* var arr = zeros( 2, 'float32' );\n* // returns [ 0.0, 0.0 ]\n*/\nfunction zeros( length ) {\n\tvar dtype;\n\tvar ctor;\n\tif ( !isNonNegativeInteger( length ) ) {\n\t\tthrow new TypeError( 'invalid argument. First argument must be a nonnegative integer. Value: `' + length + '`.' );\n\t}\n\tif ( arguments.length > 1 ) {\n\t\tdtype = arguments[ 1 ];\n\t} else {\n\t\tdtype = 'float64';\n\t}\n\tif ( dtype === 'generic' ) {\n\t\treturn gzeros( length );\n\t}\n\tctor = ctors( dtype );\n\tif ( ctor === null ) {\n\t\tthrow new TypeError( 'invalid argument. Second argument must be a recognized data type. Value: `' + dtype + '`.' );\n\t}\n\treturn new ctor( length ); // WARNING: we assume that, apart from 'generic', the constructors for supported array data types are zero-filled by default\n}\n\n\n// EXPORTS //\n\nexport default zeros;\n","/**\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// MODULES //\n\nimport zeros from '@stdlib/array-zeros';\n\n\n// MAIN //\n\n/**\n* Creates an uninitialized array having a specified length.\n*\n* @private\n* @param {NonNegativeInteger} length - array length\n* @param {string} [dtype=\"float64\"] - data type\n* @throws {TypeError} first argument must be a nonnegative integer\n* @throws {TypeError} second argument must be a recognized data type\n* @returns {(TypedArray|Array|ComplexArray)} array or typed array\n*\n* @example\n* var arr = empty( 2 );\n* // returns \n*\n* @example\n* var arr = empty( 2, 'float32' );\n* // returns \n*/\nfunction empty( length ) {\n\tif ( arguments.length > 1 ) {\n\t\treturn zeros( length, arguments[ 1 ] );\n\t}\n\treturn zeros( length );\n}\n\n\n// EXPORTS //\n\nexport default empty;\n"],"names":["main","Object","defineProperty","objectProtoype","prototype","toStr","toString","defineGetter","__defineGetter__","defineSetter","__defineSetter__","lookupGetter","__lookupGetter__","lookupSetter","__lookupSetter__","err","hasDefinePropertySupport","builtin","obj","prop","descriptor","hasValue","hasGet","hasSet","call","TypeError","__proto__","value","Error","get","set","defineProperty$1","setNonEnumerableReadOnly","configurable","enumerable","writable","isNumber","FLG","Symbol","hasToStringTagSupport","toStringTag","has","hasOwnProperty","hasOwnProp","property","toStrTag","nativeClass$1","hasToStringTag","v","isOwn","tag","out","Number$1","Number","test","nativeClass","isPrimitive","isObject","setReadOnly","FLOAT64_PINF","POSITIVE_INFINITY","FLOAT64_NINF","NEGATIVE_INFINITY","floor","Math","isInteger","x","PINF","NINF","isInt","valueOf","isNonNegativeInteger","hasFloat64Array","Float64Array","ctor","Float64Array$1","bool","arr","GlobalFloat64Array","NaN","hasFloat64ArraySupport","hasFloat32Array","Float32Array","Float32Array$1","GlobalFloat32Array","hasFloat32ArraySupport","hasInt16Array","Int16Array","Int16Array$1","GlobalInt16Array","INT16_MAX","hasInt16ArraySupport","hasInt32Array","Int32Array","Int32Array$1","GlobalInt32Array","INT32_MAX","hasInt32ArraySupport","hasInt8Array","Int8Array","Int8Array$1","GlobalInt8Array","INT8_MAX","hasInt8ArraySupport","hasUint16Array","Uint16Array","Uint16Array$1","GlobalUint16Array","UINT16_MAX","hasUint16ArraySupport","hasUint32Array","Uint32Array","Uint32Array$1","GlobalUint32Array","UINT32_MAX","hasUint32ArraySupport","hasUint8Array","Uint8Array","Uint8Array$1","GlobalUint8Array","UINT8_MAX","hasUint8ArraySupport","hasUint8ClampedArray","Uint8ClampedArray","Uint8ClampedArray$1","GlobalUint8ClampedArray","hasUint8ClampedArraySupport","isArrayLikeObject","length","isCollection","hasArrayBuffer","ArrayBuffer","isArrayBuffer","isArray$1","Array","isArray","RE","isBoolean","Boolean","getGlobal","Function","self","window","global","root","codegen","arguments","getThis","Self","Win","Global","nodeList","document","childNodes","typedarray","reFunctionName","RE_FUNCTION_NAME","isObjectLike","constructorName","match","name","slice","constructor","exec","_isBuffer","isBuffer","REGEXP","predicate","len","i","arrayfun","ctorName","toLowerCase","type","isFunction","typeOf","Complex128","real","imag","this","str","re","im","fround","FLOAT32_VIEW","float64ToFloat32$1","Complex64","float64ToFloat32","isComplexLike","isEven","hasIteratorSymbolSupport","iterator","IteratorSymbol","setNonEnumerableReadOnlyAccessor","getter","realf","z","imagf","reinterpret","offset","buffer","byteOffset","BYTES_PER_ELEMENT","idx","setter","arraylike2object","data","accessors","getAccessor","getIndexed","setAccessor","setIndexed","fromIterator","it","next","done","push","fromIteratorMap","clbk","thisArg","fromArray","buf","j","HAS_ITERATOR_SYMBOL","isComplexArray","Complex64Array","_length","_buffer","isComplexArrayConstructor","isComplex64Array","isComplex128Array","nargs","RangeError","reinterpret64","reinterpret128","byteLength","ITERATOR_SYMBOL","src","tmp","flg","args","setReadOnlyAccessor","target","start","copyWithin","iter","entries","sbuf","N","Complex128Array","ctors","float64","float32","generic","int16","int32","int8","uint16","uint32","uint8","uint8c","complex64","complex128","dtype","table","zeros","filled","gzeros","empty"],"mappings":";;AAsBA,IAAIA,EAA0C,mBAA1BC,OAAOC,eAAkCD,OAAOC,eAAiB,KCiCrF,ICRIA,EDQAA,EAAiBD,OAAOC,eE/BxBC,EAAiBF,OAAOG,UACxBC,EAAQF,EAAeG,SACvBC,EAAeJ,EAAeK,iBAC9BC,EAAeN,EAAeO,iBAC9BC,EAAeR,EAAeS,iBAC9BC,EAAeV,EAAeW,iBDsBjCZ,EEdD,WAEC,IAEC,OADAA,EAAgB,CAAE,EAAE,IAAK,CAAA,IAClB,CAGP,CAFC,MAAQa,GACT,OAAO,CACP,CACF,CFGKC,GACaC,ECgBlB,SAAyBC,EAAKC,EAAMC,GACnC,IAAIhB,EACAiB,EACAC,EACAC,EAEJ,GAAoB,iBAARL,GAA4B,OAARA,GAAsC,mBAAtBb,EAAMmB,KAAMN,GAC3D,MAAM,IAAIO,UAAW,+DAAiEP,EAAM,MAE7F,GAA2B,iBAAfE,GAA0C,OAAfA,GAAoD,mBAA7Bf,EAAMmB,KAAMJ,GACzE,MAAM,IAAIK,UAAW,oEAAsEL,EAAa,MAyBzG,IAvBAC,EAAa,UAAWD,KAGtBT,EAAaa,KAAMN,EAAKC,IACxBN,EAAaW,KAAMN,EAAKC,IAGxBf,EAAYc,EAAIQ,UAChBR,EAAIQ,UAAYvB,SAGTe,EAAKC,GACZD,EAAKC,GAASC,EAAWO,MAGzBT,EAAIQ,UAAYtB,GAEhBc,EAAKC,GAASC,EAAWO,OAG3BL,EAAW,QAASF,EACp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AAM,IAAI9O,UAAW,6EAA+E8O,EAAQ,MAE7G,OAAO,IAAI7L,EAAMsD,EAClB,CCpBA,SAAS4I,GAAO5I,GACf,OAAKkB,UAAUlB,OAAS,EAChByI,GAAOzI,EAAQkB,UAAW,IAE3BuH,GAAOzI,EACf"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index 8f6a57f..0000000 --- a/stats.html +++ /dev/null @@ -1,6177 +0,0 @@ - - - - - - - - Rollup Visualizer - - - -
- - - - - From 898e077b2093a9c0479e04fc69b638f2bee2809c Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Mon, 31 Jul 2023 15:15:32 +0000 Subject: [PATCH 05/75] Auto-generated commit --- .editorconfig | 181 - .eslintrc.js | 1 - .gitattributes | 49 - .github/PULL_REQUEST_TEMPLATE.md | 7 - .github/workflows/benchmark.yml | 62 - .github/workflows/cancel.yml | 56 - .github/workflows/close_pull_requests.yml | 44 - .github/workflows/examples.yml | 62 - .github/workflows/npm_downloads.yml | 108 - .github/workflows/productionize.yml | 798 --- .github/workflows/publish.yml | 242 - .github/workflows/test.yml | 97 - .github/workflows/test_bundles.yml | 180 - .github/workflows/test_coverage.yml | 123 - .github/workflows/test_install.yml | 83 - .gitignore | 188 - .npmignore | 227 - .npmrc | 28 - CHANGELOG.md | 5 - CODE_OF_CONDUCT.md | 3 - CONTRIBUTING.md | 3 - Makefile | 534 -- README.md | 24 +- benchmark/benchmark.js | 264 - benchmark/benchmark.length.complex128.js | 93 - benchmark/benchmark.length.complex64.js | 93 - benchmark/benchmark.length.float32.js | 93 - benchmark/benchmark.length.float64.js | 93 - benchmark/benchmark.length.generic.js | 93 - benchmark/benchmark.length.int16.js | 93 - benchmark/benchmark.length.int32.js | 93 - benchmark/benchmark.length.int8.js | 93 - benchmark/benchmark.length.uint16.js | 93 - benchmark/benchmark.length.uint32.js | 93 - benchmark/benchmark.length.uint8.js | 93 - benchmark/benchmark.length.uint8c.js | 93 - branches.md | 53 - docs/repl.txt | 52 - docs/types/test.ts | 77 - examples/index.js | 33 - lib/index.js | 58 - lib/is_buffer_uint8array.js | 47 - lib/main.js | 101 - lib/polyfill.js | 56 - docs/types/index.d.ts => mod.d.ts | 2 +- mod.js | 4 + mod.js.map | 1 + package.json | 80 +- stats.html | 6177 +++++++++++++++++++++ test/test.js | 60 - test/test.main.js | 274 - test/test.polyfill.js | 324 -- 52 files changed, 6189 insertions(+), 5695 deletions(-) delete mode 100644 .editorconfig delete mode 100644 .eslintrc.js delete mode 100644 .gitattributes delete mode 100644 .github/PULL_REQUEST_TEMPLATE.md delete mode 100644 .github/workflows/benchmark.yml delete mode 100644 .github/workflows/cancel.yml delete mode 100644 .github/workflows/close_pull_requests.yml delete mode 100644 .github/workflows/examples.yml delete mode 100644 .github/workflows/npm_downloads.yml delete mode 100644 .github/workflows/productionize.yml delete mode 100644 .github/workflows/publish.yml delete mode 100644 .github/workflows/test.yml delete mode 100644 .github/workflows/test_bundles.yml delete mode 100644 .github/workflows/test_coverage.yml delete mode 100644 .github/workflows/test_install.yml delete mode 100644 .gitignore delete mode 100644 .npmignore delete mode 100644 .npmrc delete mode 100644 CHANGELOG.md delete mode 100644 CODE_OF_CONDUCT.md delete mode 100644 CONTRIBUTING.md delete mode 100644 Makefile delete mode 100644 benchmark/benchmark.js delete mode 100644 benchmark/benchmark.length.complex128.js delete mode 100644 benchmark/benchmark.length.complex64.js delete mode 100644 benchmark/benchmark.length.float32.js delete mode 100644 benchmark/benchmark.length.float64.js delete mode 100644 benchmark/benchmark.length.generic.js delete mode 100644 benchmark/benchmark.length.int16.js delete mode 100644 benchmark/benchmark.length.int32.js delete mode 100644 benchmark/benchmark.length.int8.js delete mode 100644 benchmark/benchmark.length.uint16.js delete mode 100644 benchmark/benchmark.length.uint32.js delete mode 100644 benchmark/benchmark.length.uint8.js delete mode 100644 benchmark/benchmark.length.uint8c.js delete mode 100644 branches.md delete mode 100644 docs/repl.txt delete mode 100644 docs/types/test.ts delete mode 100644 examples/index.js delete mode 100644 lib/index.js delete mode 100644 lib/is_buffer_uint8array.js delete mode 100644 lib/main.js delete mode 100644 lib/polyfill.js rename docs/types/index.d.ts => mod.d.ts (99%) create mode 100644 mod.js create mode 100644 mod.js.map create mode 100644 stats.html delete mode 100644 test/test.js delete mode 100644 test/test.main.js delete mode 100644 test/test.polyfill.js diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index 0fd4d6c..0000000 --- a/.editorconfig +++ /dev/null @@ -1,181 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# EditorConfig configuration file (see ). - -# Indicate that this file is a root-level configuration file: -root = true - -# Set properties for all files: -[*] -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true - -# Set properties for JavaScript files: -[*.{js,js.txt}] -indent_style = tab - -# Set properties for JavaScript ES module files: -[*.{mjs,mjs.txt}] -indent_style = tab - -# Set properties for JavaScript CommonJS files: -[*.{cjs,cjs.txt}] -indent_style = tab - -# Set properties for JSON files: -[*.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `cli_opts.json` files: -[cli_opts.json] -indent_style = tab - -# Set properties for TypeScript files: -[*.ts] -indent_style = tab - -# Set properties for Python files: -[*.{py,py.txt}] -indent_style = space -indent_size = 4 - -# Set properties for Julia files: -[*.{jl,jl.txt}] -indent_style = tab - -# Set properties for R files: -[*.{R,R.txt}] -indent_style = tab - -# Set properties for C files: -[*.{c,c.txt}] -indent_style = tab - -# Set properties for C header files: -[*.{h,h.txt}] -indent_style = tab - -# Set properties for C++ files: -[*.{cpp,cpp.txt}] -indent_style = tab - -# Set properties for C++ header files: -[*.{hpp,hpp.txt}] -indent_style = tab - -# Set properties for Fortran files: -[*.{f,f.txt}] -indent_style = space -indent_size = 2 -insert_final_newline = false - -# Set properties for shell files: -[*.{sh,sh.txt}] -indent_style = tab - -# Set properties for AWK files: -[*.{awk,awk.txt}] -indent_style = tab - -# Set properties for HTML files: -[*.{html,html.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for XML files: -[*.{xml,xml.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for CSS files: -[*.{css,css.txt}] -indent_style = tab - -# Set properties for Makefiles: -[Makefile] -indent_style = tab - -[*.{mk,mk.txt}] -indent_style = tab - -# Set properties for Markdown files: -[*.{md,md.txt}] -indent_style = space -indent_size = 4 -trim_trailing_whitespace = false - -# Set properties for `usage.txt` files: -[usage.txt] -indent_style = space -indent_size = 2 - -# Set properties for `repl.txt` files: -[repl.txt] -indent_style = space -indent_size = 4 - -# Set properties for `package.json` files: -[package.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `datapackage.json` files: -[datapackage.json] -indent_style = space -indent_size = 2 - -# Set properties for `manifest.json` files: -[manifest.json] -indent_style = space -indent_size = 2 - -# Set properties for `tslint.json` files: -[tslint.json] -indent_style = space -indent_size = 2 - -# Set properties for `tsconfig.json` files: -[tsconfig.json] -indent_style = space -indent_size = 2 - -# Set properties for LaTeX files: -[*.{tex,tex.txt}] -indent_style = tab - -# Set properties for LaTeX Bibliography files: -[*.{bib,bib.txt}] -indent_style = tab - -# Set properties for YAML files: -[*.{yml,yml.txt}] -indent_style = space -indent_size = 2 - -# Set properties for GYP files: -[binding.gyp] -indent_style = space -indent_size = 2 - -[*.gypi] -indent_style = space -indent_size = 2 diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index 5f30286..0000000 --- a/.eslintrc.js +++ /dev/null @@ -1 +0,0 @@ -/* For the `eslint` rules of this project, consult the main repository at https://github.com/stdlib-js/stdlib */ diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index 10a16e6..0000000 --- a/.gitattributes +++ /dev/null @@ -1,49 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Configuration file which assigns attributes to pathnames. -# -# [1]: https://git-scm.com/docs/gitattributes - -# Automatically normalize the line endings of any committed text files: -* text=auto - -# Override line endings for certain files on checkout: -*.crlf.csv text eol=crlf - -# Denote that certain files are binary and should not be modified: -*.png binary -*.jpg binary -*.jpeg binary -*.gif binary -*.ico binary -*.gz binary -*.zip binary -*.7z binary -*.mp3 binary -*.mp4 binary -*.mov binary - -# Override what is considered "vendored" by GitHub's linguist: -/deps/** linguist-vendored=false -/lib/node_modules/** linguist-vendored=false linguist-generated=false -test/fixtures/** linguist-vendored=false -tools/** linguist-vendored=false - -# Override what is considered "documentation" by GitHub's linguist: -examples/** linguist-documentation=false diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index 96f81a8..0000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,7 +0,0 @@ - - -We are excited about your pull request, but unfortunately we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/empty) of the main repository where we’ll review and provide feedback. - -If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. You may also consult the [development guide](https://github.com/stdlib-js/stdlib/blob/develop/docs/development.md) for help on developing stdlib. - -We look forward to receiving your contribution! :smiley: \ No newline at end of file diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml deleted file mode 100644 index 06a9a75..0000000 --- a/.github/workflows/benchmark.yml +++ /dev/null @@ -1,62 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: benchmark - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run benchmarks: - benchmark: - - # Define a display name: - name: 'Run benchmarks' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - uses: actions/checkout@v3 - - # Install Node.js: - - name: 'Install Node.js' - uses: actions/setup-node@v3 - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run benchmarks: - - name: 'Run benchmarks' - run: | - npm run benchmark diff --git a/.github/workflows/cancel.yml b/.github/workflows/cancel.yml deleted file mode 100644 index a00dbe5..0000000 --- a/.github/workflows/cancel.yml +++ /dev/null @@ -1,56 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: cancel - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to cancel existing workflow runs: - cancel: - - # Define a display name: - name: 'Cancel workflow runs' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Time limit: - timeout-minutes: 3 - - # Define the sequence of job steps... - steps: - - # Cancel existing workflow runs: - - name: 'Cancel existing workflow runs' - uses: styfle/cancel-workflow-action@0.11.0 - with: - workflow_id: >- - benchmark.yml, - examples.yml, - test.yml, - test_coverage.yml, - test_install.yml, - publish.yml - access_token: ${{ github.token }} diff --git a/.github/workflows/close_pull_requests.yml b/.github/workflows/close_pull_requests.yml deleted file mode 100644 index 38d3aa3..0000000 --- a/.github/workflows/close_pull_requests.yml +++ /dev/null @@ -1,44 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: close_pull_requests - -# Workflow triggers: -on: - pull_request_target: - types: [opened] - -# Workflow jobs: -jobs: - run: - runs-on: ubuntu-latest - steps: - - uses: superbrothers/close-pull-request@v3 - with: - comment: | - Thank you for submitting a pull request. :raised_hands: - - We greatly appreciate your willingness to submit a contribution. However, we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). - - We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/empty) of the main repository where we’ll review and provide feedback. If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. - - Thank you again, and we look forward to receiving your contribution! :smiley: - - Best, - The stdlib team \ No newline at end of file diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml deleted file mode 100644 index 7902a7d..0000000 --- a/.github/workflows/examples.yml +++ /dev/null @@ -1,62 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: examples - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run the package examples... - examples: - - # Define display name: - name: 'Run examples' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout the repository' - uses: actions/checkout@v3 - - # Install Node.js: - - name: 'Install Node.js' - uses: actions/setup-node@v3 - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run examples: - - name: 'Run examples' - run: | - npm run examples diff --git a/.github/workflows/npm_downloads.yml b/.github/workflows/npm_downloads.yml deleted file mode 100644 index 32477d3..0000000 --- a/.github/workflows/npm_downloads.yml +++ /dev/null @@ -1,108 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: npm_downloads - -# Workflow triggers: -on: - # Run this workflow weekly: - schedule: - # cron: ' ' - - cron: '49 1 * * 5' - - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job for retrieving npm download counts... - npm_downloads: - - # Define display name: - name: 'Retrieve npm download counts' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - uses: actions/checkout@v3 - timeout-minutes: 10 - - # Install Node.js: - - name: 'Install Node.js' - uses: actions/setup-node@v3 - with: - node-version: 16 - timeout-minutes: 5 - - # Resolve package name: - - name: 'Resolve package name' - id: package_name - run: | - name=`node -e 'console.log(require("./package.json").name)' | tr -d '\n'` - echo "package_name=$name" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Fetch download data: - - name: 'Fetch data' - id: download_data - run: | - url="https://api.npmjs.org/downloads/range/$(date --date='1 year ago' '+%Y-%m-%d'):$(date '+%Y-%m-%d')/${{ steps.package_name.outputs.package_name }}" - echo "$url" - data=$(curl "$url") - mkdir ./tmp - echo "$data" > ./tmp/npm_downloads.json - echo "data=$data" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Print summary of download data: - - name: 'Print summary' - run: | - echo "| Date | Downloads |" >> $GITHUB_STEP_SUMMARY - echo "|------|------------|" >> $GITHUB_STEP_SUMMARY - cat ./tmp/npm_downloads.json | jq -r ".downloads | .[-14:] | to_entries | map(\"| \(.value.day) | \(.value.downloads) |\") |.[]" >> $GITHUB_STEP_SUMMARY - - # Upload the download data: - - name: 'Upload data' - uses: actions/upload-artifact@v3 - with: - # Define a name for the uploaded artifact (ensuring a unique name for each job): - name: npm_downloads - - # Specify the path to the file to upload: - path: ./tmp/npm_downloads.json - - # Specify the number of days to retain the artifact (default is 90 days): - retention-days: 90 - timeout-minutes: 10 - if: success() - - # Send data to events server: - - name: 'Post data' - uses: distributhor/workflow-webhook@v3 - env: - webhook_url: ${{ secrets.STDLIB_NPM_DOWNLOADS_URL }} - webhook_secret: ${{ secrets.STDLIB_WEBHOOK_SECRET }} - data: '{ "downloads": ${{ steps.download_data.outputs.data }} }' - timeout-minutes: 5 - if: success() diff --git a/.github/workflows/productionize.yml b/.github/workflows/productionize.yml deleted file mode 100644 index 334eb59..0000000 --- a/.github/workflows/productionize.yml +++ /dev/null @@ -1,798 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: productionize - -# Workflow triggers: -on: - # Run workflow when a new commit is pushed to the main branch: - push: - branches: - - main - - # Allow the workflow to be manually run: - workflow_dispatch: - inputs: - require-passing-tests: - description: 'Require passing tests for creating bundles' - type: boolean - default: true - - # Run workflow upon completion of `publish` workflow run: - workflow_run: - workflows: ["publish"] - types: [completed] - - -# Concurrency group to prevent multiple concurrent executions: -concurrency: - group: productionize - cancel-in-progress: true - -# Workflow jobs: -jobs: - - # Define a job to create a production build... - productionize: - - # Define display name: - name: 'Productionize' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - # Checkout main branch of repository: - - name: 'Checkout main branch' - uses: actions/checkout@v3 - with: - ref: main - - # Install Node.js: - - name: 'Install Node.js' - uses: actions/setup-node@v3 - with: - node-version: 16 - timeout-minutes: 5 - - # Create production branch: - - name: 'Create production branch' - run: | - git checkout -b production - - # Transform error messages: - - name: 'Transform error messages' - id: transform-error-messages - uses: stdlib-js/transform-errors-action@main - - # Format error messages: - - name: 'Replace double quotes with single quotes in rewritten format string error messages' - run: | - find . -name "*.js" -exec sed -E -i "s/Error\( format\( \"([a-zA-Z0-9]+)\"/Error\( format\( '\1'/g" {} \; - - # Format string literal error messages: - - name: 'Replace double quotes with single quotes in rewritten string literal error messages' - run: | - find . -name "*.js" -exec sed -E -i "s/Error\( format\(\"([a-zA-Z0-9]+)\"\)/Error\( format\( '\1' \)/g" {} \; - - # Format code: - - name: 'Replace double quotes with single quotes in inserted `require` calls' - run: | - find . -name "*.js" -exec sed -E -i "s/require\( ?\"@stdlib\/error-tools-fmtprodmsg\" ?\);/require\( '@stdlib\/error-tools-fmtprodmsg' \);/g" {} \; - - # Change `@stdlib/string-format` to `@stdlib/error-tools-fmtprodmsg` in package.json if the former is a dependency, otherwise insert it as a dependency: - - name: 'Update dependencies in package.json' - run: | - PKG_VERSION=$(npm view @stdlib/error-tools-fmtprodmsg version) - if grep -q '"@stdlib/string-format"' package.json; then - sed -i "s/\"@stdlib\/string-format\": \"^.*\"/\"@stdlib\/error-tools-fmtprodmsg\": \"^$PKG_VERSION\"/g" package.json - else - node -e "var pkg = require( './package.json' ); pkg.dependencies[ '@stdlib/error-tools-fmtprodmsg' ] = '^$PKG_VERSION'; require( 'fs' ).writeFileSync( 'package.json', JSON.stringify( pkg, null, 2 ) );" - fi - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Transform error messages" - - # Push changes: - - name: 'Push changes' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" production --force - - # Define a job for running tests of the productionized code... - test: - - # Define a display name: - name: 'Run Tests' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Indicate that this job depends on the prior job finishing: - needs: productionize - - # Run this job regardless of the outcome of the prior job: - if: always() - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - uses: actions/checkout@v3 - with: - # Use the `production` branch: - ref: production - - # Install Node.js: - - name: 'Install Node.js' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - uses: actions/setup-node@v3 - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Build native add-on if present: - - name: 'Build native add-on (if present)' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - run: | - if [ -f "binding.gyp" ]; then - npm install node-gyp --no-save && ./node_modules/.bin/node-gyp rebuild - fi - - # Run tests: - - name: 'Run tests' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: tests - run: | - npm test || npm test || npm test - - # Define job to create a bundle for use in Deno... - deno: - - # Define display name: - name: 'Create Deno bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - uses: actions/checkout@v3 - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `deno` branch exists: - - name: 'Check if remote `deno` branch exists' - id: deno-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin deno - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `deno` exists, delete everything in branch and merge `production` into it - - name: 'If `deno` exists, delete everything in branch and merge `production` into it' - if: steps.deno-branch-exists.outputs.remote-exists - run: | - git checkout -b deno origin/deno - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `deno` does not exist, create `deno` branch: - - name: 'If `deno` does not exist, create `deno` branch' - if: ${{ steps.deno-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b deno - - # Copy files to deno directory: - - name: 'Copy files to deno directory' - run: | - mkdir -p deno - cp README.md LICENSE CONTRIBUTORS NOTICE ./deno - - # Copy TypeScript definitions to deno directory: - if [ -d index.d.ts ]; then - cp index.d.ts ./deno/index.d.ts - fi - if [ -e ./docs/types/index.d.ts ]; then - cp ./docs/types/index.d.ts ./deno/mod.d.ts - fi - - # Install Node.js: - - name: 'Install Node.js' - uses: actions/setup-node@v3 - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: Install production and development dependencies - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Bundle package for use in Deno: - - name: 'Bundle package for Deno' - id: deno-bundle - uses: stdlib-js/bundle-action@main - with: - target: 'deno' - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - # Replace links to other packages with links to the deno branch: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/deno/"; - - # Replace reference to `@stdlib/types` with CDN link: - find ./deno -type f -name '*.ts' -print0 | xargs -0 sed -Ei "s/\/\/\/ /\/\/\/ /g" - - # Change wording of project description to avoid reference to JavaScript and Node.js: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "s/a standard library for JavaScript and Node.js, /a standard library /g" - - # Rewrite all `require()`s to use jsDelivr links: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/require\( '@stdlib\// { - s/(var|let|const)\s+([a-z0-9_]+)\s+=\s*require\( '([^']+)' \);/import \2 from \'\3\';/i - s/@stdlib/https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js/ - s/';/@deno\/mod.js';/ - }" - - # Rewrite first `import` to show importing of named exports if available: - exports=$(cat lib/index.js | \ - grep -E 'setReadOnly\(.*,.*,.*\)' | \ - sed -E 's/setReadOnly\((.*),(.*),(.*)\);/\2/' | \ - sed -E "s/'//g" | \ - sort) - if [ -n "$exports" ]; then - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\nimport\s+([a-zA-Z0-9_]+)\s+from\s*'([^']+)';\n\`\`\`/\`\`\`javascript\nimport \1 from '\2';\n\`\`\`\n\nYou can also import the following named exports from the package:\n\n\`\`\`javascript\nimport { $(echo $exports | sed -E 's/ /, /g') } from '\2';\n\`\`\`/" - fi - - # Remove `installation`, `cli`, and `c` sections: - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Create package.json file for deno branch: - jq --indent 2 '{"name": .name, "version": .version, "description": .description, "license": .license, "type": "module", "main": "./mod.js", "homepage": .homepage, "repository": .repository, "bugs": .bugs, "keywords": .keywords, "funding": .funding}' package.json > ./deno/package.json - - # Delete everything in current directory aside from deno folder: - - name: 'Delete everything in current directory aside from deno folder' - run: | - find . -type 'f' | grep -v -e "deno" -e ".git/" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e "deno" -e ".git" | xargs -r rm -rf - - # Move deno directory to root: - - name: 'Move deno directory to root' - run: | - mv ./deno/* . - rmdir ./deno - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Auto-generated commit" - - # Push changes to `deno` branch: - - name: 'Push changes to `deno` branch' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" deno - - # Send status to Slack channel if job fails: - - name: 'Send status to Slack channel in case of failure' - uses: act10ns/slack@v2 - with: - status: ${{ job.status }} - steps: ${{ toJson(steps) }} - channel: '#npm-ci' - if: failure() - - # Define job to create a UMD bundle... - umd: - - # Define display name: - name: 'Create UMD bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - uses: actions/checkout@v3 - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `umd` branch exists: - - name: 'Check if remote `umd` branch exists' - id: umd-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin umd - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `umd` exists, delete everything in branch and merge `production` into it - - name: 'If `umd` exists, delete everything in branch and merge `production` into it' - if: steps.umd-branch-exists.outputs.remote-exists - run: | - git checkout -b umd origin/umd - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `umd` does not exist, create `umd` branch: - - name: 'If `umd` does not exist, create `umd` branch' - if: ${{ steps.umd-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b umd - - # Copy files to umd directory: - - name: 'Copy files to umd directory' - run: | - mkdir -p umd - cp README.md LICENSE CONTRIBUTORS NOTICE ./umd - - # Install Node.js - - name: 'Install Node.js' - uses: actions/setup-node@v3 - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Extract alias: - - name: 'Extract alias' - id: extract-alias - run: | - alias=$(grep -E 'require\(' README.md | head -n 1 | sed -E 's/^var ([a-zA-Z0-9_]+) = .+/\1/') - echo "alias=${alias}" >> $GITHUB_OUTPUT - - # Create Universal Module Definition (UMD) Node.js bundle: - - name: 'Create Universal Module Definition (UMD) Node.js bundle' - id: umd-bundle-node - uses: stdlib-js/bundle-action@main - with: - target: 'umd-node' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Create Universal Module Definition (UMD) browser bundle: - - name: 'Create Universal Module Definition (UMD) browser bundle' - id: umd-bundle-browser - uses: stdlib-js/bundle-action@main - with: - target: 'umd-browser' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - - # Replace links to other packages with links to the umd branch: - find ./umd -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/umd/"; - - # Remove `installation`, `cli`, and `c` sections: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Rewrite first `require()` to show consumption of the UMD bundle in Observable and via a `script` tag: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\n(var|let|const)\s+([a-zA-Z0-9_]+)\s+=\s*require\( '\@stdlib\/([^']+)' \);\n\`\`\`/To use in Observable,\n\n\`\`\`javascript\n\2 = require\( 'https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js\/\3\@umd\/browser.js' \)\n\`\`\`\n\nTo vendor stdlib functionality and avoid installing dependency trees for Node.js, you can use the UMD server build:\n\n\`\`\`javascript\nvar \2 = require\( 'path\/to\/vendor\/umd\/\3\/index.js' \)\n\`\`\`\n\nTo include the bundle in a webpage,\n\n\`\`\`html\n + + + + diff --git a/test/test.js b/test/test.js deleted file mode 100644 index 8e62cb8..0000000 --- a/test/test.js +++ /dev/null @@ -1,60 +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 proxyquire = require( 'proxyquire' ); -var main = require( './../lib/main.js' ); -var polyfill = require( './../lib/polyfill.js' ); -var empty = require( './../lib' ); - - -// TESTS // - -tape( 'main export is a function', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof empty, 'function', 'main export is a function' ); - t.end(); -}); - -tape( 'if an environment supports Node.js buffer instances inheriting from Uint8Array, the main export supports returning arrays having uninitialized memory', function test( t ) { - var empty = proxyquire( './../lib', { - './is_buffer_uint8array.js': mock - }); - t.strictEqual( empty, main, 'returns expected value' ); - t.end(); - - function mock() { - return true; - } -}); - -tape( 'if an environment does not support Node.js buffer instances inheriting from Uint8Array, the main export supports returning zero-filled arrays', function test( t ) { - var empty = proxyquire( './../lib', { - './is_buffer_uint8array.js': mock - }); - t.strictEqual( empty, polyfill, 'returns expected value' ); - t.end(); - - function mock() { - return false; - } -}); diff --git a/test/test.main.js b/test/test.main.js deleted file mode 100644 index 3ceb26e..0000000 --- a/test/test.main.js +++ /dev/null @@ -1,274 +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 Float64Array = require( '@stdlib/array-float64' ); -var Float32Array = require( '@stdlib/array-float32' ); -var Int32Array = require( '@stdlib/array-int32' ); -var Uint32Array = require( '@stdlib/array-uint32' ); -var Int16Array = require( '@stdlib/array-int16' ); -var Uint16Array = require( '@stdlib/array-uint16' ); -var Int8Array = require( '@stdlib/array-int8' ); -var Uint8Array = require( '@stdlib/array-uint8' ); -var Uint8ClampedArray = require( '@stdlib/array-uint8c' ); -var Complex64Array = require( '@stdlib/array-complex64' ); -var Complex128Array = require( '@stdlib/array-complex128' ); -var instanceOf = require( '@stdlib/assert-instance-of' ); -var empty = require( './../lib/main.js' ); - - -// TESTS // - -tape( 'main export is a function', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof empty, 'function', 'main export is a function' ); - t.end(); -}); - -tape( 'the function throws an error if provided a value other than a nonnegative integer for the first argument', function test( t ) { - var values; - var i; - - values = [ - '5', - -3, - 3.14, - NaN, - true, - false, - null, - void 0, - [], - {}, - function noop() {} - ]; - - for ( i = 0; i < values.length; i++ ) { - t.throws( badValue( values[i] ), TypeError, 'throws an error when provided '+values[i] ); - } - t.end(); - - function badValue( value ) { - return function badValue() { - empty( value ); - }; - } -}); - -tape( 'the function throws an error if provided a value other than a nonnegative integer for the first argument (dtype)', function test( t ) { - var values; - var i; - - values = [ - '5', - -3, - 3.14, - NaN, - true, - false, - null, - void 0, - [], - {}, - function noop() {} - ]; - - for ( i = 0; i < values.length; i++ ) { - t.throws( badValue( values[i] ), TypeError, 'throws an error when provided '+values[i] ); - } - t.end(); - - function badValue( value ) { - return function badValue() { - empty( value, 'float32' ); - }; - } -}); - -tape( 'the function throws an error if provided an unrecognized data type', function test( t ) { - var values; - var i; - - values = [ - '5', - 'beep', - 'empty', - 'Int32', - 'Uint32', - 'Int16', - 'Uint16', - 'Int8', - 'Uint8', - 'Uint8c', - 'uint8_clamped', - 'Float64', - 'Float32', - 'FLOAT64', - 'FLOAT32', - 'GENERIC' - ]; - - for ( i = 0; i < values.length; i++ ) { - t.throws( badValue( values[i] ), TypeError, 'throws an error when provided '+values[i] ); - } - t.end(); - - function badValue( value ) { - return function badValue() { - empty( 10, value ); - }; - } -}); - -tape( 'the function returns an empty array (default)', function test( t ) { - var arr; - - arr = empty( 5 ); - t.strictEqual( instanceOf( arr, Float64Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=float64)', function test( t ) { - var arr; - - arr = empty( 5, 'float64' ); - t.strictEqual( instanceOf( arr, Float64Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=float32)', function test( t ) { - var arr; - - arr = empty( 5, 'float32' ); - t.strictEqual( instanceOf( arr, Float32Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=complex128)', function test( t ) { - var arr; - - arr = empty( 5, 'complex128' ); - t.strictEqual( instanceOf( arr, Complex128Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=complex64)', function test( t ) { - var arr; - - arr = empty( 5, 'complex64' ); - t.strictEqual( instanceOf( arr, Complex64Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=int32)', function test( t ) { - var arr; - - arr = empty( 5, 'int32' ); - t.strictEqual( instanceOf( arr, Int32Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=uint32)', function test( t ) { - var arr; - - arr = empty( 5, 'uint32' ); - t.strictEqual( instanceOf( arr, Uint32Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=int16)', function test( t ) { - var arr; - - arr = empty( 5, 'int16' ); - t.strictEqual( instanceOf( arr, Int16Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=uint16)', function test( t ) { - var arr; - - arr = empty( 5, 'uint16' ); - t.strictEqual( instanceOf( arr, Uint16Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=int8)', function test( t ) { - var arr; - - arr = empty( 5, 'int8' ); - t.strictEqual( instanceOf( arr, Int8Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=uint8)', function test( t ) { - var arr; - - arr = empty( 5, 'uint8' ); - t.strictEqual( instanceOf( arr, Uint8Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=uint8c)', function test( t ) { - var arr; - - arr = empty( 5, 'uint8c' ); - t.strictEqual( instanceOf( arr, Uint8ClampedArray ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=generic)', function test( t ) { - var expected; - var arr; - - expected = [ 0, 0, 0, 0, 0 ]; - - arr = empty( 5, 'generic' ); - t.strictEqual( instanceOf( arr, Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); diff --git a/test/test.polyfill.js b/test/test.polyfill.js deleted file mode 100644 index 17b99f3..0000000 --- a/test/test.polyfill.js +++ /dev/null @@ -1,324 +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 Float64Array = require( '@stdlib/array-float64' ); -var Float32Array = require( '@stdlib/array-float32' ); -var Int32Array = require( '@stdlib/array-int32' ); -var Uint32Array = require( '@stdlib/array-uint32' ); -var Int16Array = require( '@stdlib/array-int16' ); -var Uint16Array = require( '@stdlib/array-uint16' ); -var Int8Array = require( '@stdlib/array-int8' ); -var Uint8Array = require( '@stdlib/array-uint8' ); -var Uint8ClampedArray = require( '@stdlib/array-uint8c' ); -var Complex64Array = require( '@stdlib/array-complex64' ); -var Complex128Array = require( '@stdlib/array-complex128' ); -var reinterpret64 = require( '@stdlib/strided-base-reinterpret-complex64' ); -var reinterpret128 = require( '@stdlib/strided-base-reinterpret-complex128' ); -var instanceOf = require( '@stdlib/assert-instance-of' ); -var empty = require( './../lib/polyfill.js' ); - - -// TESTS // - -tape( 'main export is a function', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof empty, 'function', 'main export is a function' ); - t.end(); -}); - -tape( 'the function throws an error if provided a value other than a nonnegative integer for the first argument', function test( t ) { - var values; - var i; - - values = [ - '5', - -3, - 3.14, - NaN, - true, - false, - null, - void 0, - [], - {}, - function noop() {} - ]; - - for ( i = 0; i < values.length; i++ ) { - t.throws( badValue( values[i] ), TypeError, 'throws an error when provided '+values[i] ); - } - t.end(); - - function badValue( value ) { - return function badValue() { - empty( value ); - }; - } -}); - -tape( 'the function throws an error if provided a value other than a nonnegative integer for the first argument (dtype)', function test( t ) { - var values; - var i; - - values = [ - '5', - -3, - 3.14, - NaN, - true, - false, - null, - void 0, - [], - {}, - function noop() {} - ]; - - for ( i = 0; i < values.length; i++ ) { - t.throws( badValue( values[i] ), TypeError, 'throws an error when provided '+values[i] ); - } - t.end(); - - function badValue( value ) { - return function badValue() { - empty( value, 'float32' ); - }; - } -}); - -tape( 'the function throws an error if provided an unrecognized data type', function test( t ) { - var values; - var i; - - values = [ - '5', - 'beep', - 'empty', - 'Int32', - 'Uint32', - 'Int16', - 'Uint16', - 'Int8', - 'Uint8', - 'Uint8c', - 'uint8_clamped', - 'Float64', - 'Float32', - 'FLOAT64', - 'FLOAT32', - 'GENERIC' - ]; - - for ( i = 0; i < values.length; i++ ) { - t.throws( badValue( values[i] ), TypeError, 'throws an error when provided '+values[i] ); - } - t.end(); - - function badValue( value ) { - return function badValue() { - empty( 10, value ); - }; - } -}); - -tape( 'the function returns a zero-filled array (default)', function test( t ) { - var expected; - var arr; - - expected = new Float64Array( [ 0.0, 0.0, 0.0, 0.0, 0.0 ] ); - - arr = empty( 5 ); - t.strictEqual( instanceOf( arr, Float64Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=float64)', function test( t ) { - var expected; - var arr; - - expected = new Float64Array( [ 0.0, 0.0, 0.0, 0.0, 0.0 ] ); - - arr = empty( 5, 'float64' ); - t.strictEqual( instanceOf( arr, Float64Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=float32)', function test( t ) { - var expected; - var arr; - - expected = new Float32Array( [ 0.0, 0.0, 0.0, 0.0, 0.0 ] ); - - arr = empty( 5, 'float32' ); - t.strictEqual( instanceOf( arr, Float32Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=complex128)', function test( t ) { - var expected; - var arr; - - expected = new Float64Array( [ 0.0, 0.0, 0.0, 0.0 ] ); - - arr = empty( 2, 'complex128' ); - t.strictEqual( instanceOf( arr, Complex128Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length/2, 'returns expected value' ); - t.deepEqual( reinterpret128( arr, 0 ), expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=complex64)', function test( t ) { - var expected; - var arr; - - expected = new Float32Array( [ 0.0, 0.0, 0.0, 0.0 ] ); - - arr = empty( 2, 'complex64' ); - t.strictEqual( instanceOf( arr, Complex64Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length/2, 'returns expected value' ); - t.deepEqual( reinterpret64( arr, 0 ), expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=int32)', function test( t ) { - var expected; - var arr; - - expected = new Int32Array( [ 0, 0, 0, 0, 0 ] ); - - arr = empty( 5, 'int32' ); - t.strictEqual( instanceOf( arr, Int32Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=uint32)', function test( t ) { - var expected; - var arr; - - expected = new Uint32Array( [ 0, 0, 0, 0, 0 ] ); - - arr = empty( 5, 'uint32' ); - t.strictEqual( instanceOf( arr, Uint32Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=int16)', function test( t ) { - var expected; - var arr; - - expected = new Int16Array( [ 0, 0, 0, 0, 0 ] ); - - arr = empty( 5, 'int16' ); - t.strictEqual( instanceOf( arr, Int16Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=uint16)', function test( t ) { - var expected; - var arr; - - expected = new Uint16Array( [ 0, 0, 0, 0, 0 ] ); - - arr = empty( 5, 'uint16' ); - t.strictEqual( instanceOf( arr, Uint16Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=int8)', function test( t ) { - var expected; - var arr; - - expected = new Int8Array( [ 0, 0, 0, 0, 0 ] ); - - arr = empty( 5, 'int8' ); - t.strictEqual( instanceOf( arr, Int8Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=uint8)', function test( t ) { - var expected; - var arr; - - expected = new Uint8Array( [ 0, 0, 0, 0, 0 ] ); - - arr = empty( 5, 'uint8' ); - t.strictEqual( instanceOf( arr, Uint8Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=uint8c)', function test( t ) { - var expected; - var arr; - - expected = new Uint8ClampedArray( [ 0, 0, 0, 0, 0 ] ); - - arr = empty( 5, 'uint8c' ); - t.strictEqual( instanceOf( arr, Uint8ClampedArray ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=generic)', function test( t ) { - var expected; - var arr; - - expected = [ 0, 0, 0, 0, 0 ]; - - arr = empty( 5, 'generic' ); - t.strictEqual( instanceOf( arr, Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); From e6567a512ab2f293fcae7ce2f0586935f576697c Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Mon, 31 Jul 2023 15:16:09 +0000 Subject: [PATCH 06/75] Update README.md for Deno bundle v0.0.1 --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 9176da2..66bbcf5 100644 --- a/README.md +++ b/README.md @@ -41,7 +41,7 @@ limitations under the License. ## Usage ```javascript -import empty from 'https://cdn.jsdelivr.net/gh/stdlib-js/array-empty@deno/mod.js'; +import empty from 'https://cdn.jsdelivr.net/gh/stdlib-js/array-empty@v0.0.1-deno/mod.js'; ``` #### empty( length\[, dtype] ) @@ -103,7 +103,7 @@ var arr = empty( 2, 'int32' ); ```javascript import dtypes from 'https://cdn.jsdelivr.net/gh/stdlib-js/array-dtypes@deno/mod.js'; -import empty from 'https://cdn.jsdelivr.net/gh/stdlib-js/array-empty@deno/mod.js'; +import empty from 'https://cdn.jsdelivr.net/gh/stdlib-js/array-empty@v0.0.1-deno/mod.js'; // Get a list of array data types: var dt = dtypes(); From 7ce4e4ab198fe646a75ae979e95dcc00bc87b9a8 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Mon, 31 Jul 2023 15:16:10 +0000 Subject: [PATCH 07/75] Auto-generated commit --- README.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 66bbcf5..2df4464 100644 --- a/README.md +++ b/README.md @@ -40,6 +40,11 @@ limitations under the License. ## Usage +```javascript +import empty from 'https://cdn.jsdelivr.net/gh/stdlib-js/array-empty@deno/mod.js'; +``` +The previous example will load the latest bundled code from the deno branch. Alternatively, you may load a specific version by loading the file from one of the [tagged bundles](https://github.com/stdlib-js/array-empty/tags). For example, + ```javascript import empty from 'https://cdn.jsdelivr.net/gh/stdlib-js/array-empty@v0.0.1-deno/mod.js'; ``` @@ -103,7 +108,7 @@ var arr = empty( 2, 'int32' ); ```javascript import dtypes from 'https://cdn.jsdelivr.net/gh/stdlib-js/array-dtypes@deno/mod.js'; -import empty from 'https://cdn.jsdelivr.net/gh/stdlib-js/array-empty@v0.0.1-deno/mod.js'; +import empty from 'https://cdn.jsdelivr.net/gh/stdlib-js/array-empty@deno/mod.js'; // Get a list of array data types: var dt = dtypes(); From 630efd614ad7adcd76c43c411ca4e581be2151f7 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sat, 19 Aug 2023 01:39:58 +0000 Subject: [PATCH 08/75] Transform error messages --- lib/main.js | 6 +++--- package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/main.js b/lib/main.js index e19ce93..e02b26b 100644 --- a/lib/main.js +++ b/lib/main.js @@ -25,7 +25,7 @@ var allocUnsafe = require( '@stdlib/buffer-alloc-unsafe' ); var ctors = require( '@stdlib/array-typed-ctors' ); var zeros = require( '@stdlib/array-base-zeros' ); var bytesPerElement = require( '@stdlib/ndarray-base-bytes-per-element' ); -var format = require( '@stdlib/string-format' ); +var format = require( '@stdlib/error-tools-fmtprodmsg' ); // MAIN // @@ -57,7 +57,7 @@ function empty( length ) { var nb; if ( !isNonNegativeInteger( length ) ) { - throw new TypeError( format( 'invalid argument. First argument must be a nonnegative integer. Value: `%s`.', length ) ); + throw new TypeError( format( '1Zj2d,MG', length ) ); } if ( arguments.length > 1 ) { dtype = arguments[ 1 ]; @@ -69,7 +69,7 @@ function empty( length ) { } nbytes = bytesPerElement( dtype ); if ( nbytes === null ) { - throw new TypeError( format( 'invalid argument. Second argument must be a supported data type. Value: `%s`.', dtype ) ); + throw new TypeError( format( '1ZjMl', dtype ) ); } // Resolve typed array constructor: ctor = ctors( dtype ); diff --git a/package.json b/package.json index b0f70e2..ebc740c 100644 --- a/package.json +++ b/package.json @@ -45,7 +45,7 @@ "@stdlib/assert-is-uint8array": "^0.0.8", "@stdlib/buffer-alloc-unsafe": "^0.0.7", "@stdlib/ndarray-base-bytes-per-element": "^0.0.8", - "@stdlib/string-format": "^0.0.3", + "@stdlib/error-tools-fmtprodmsg": "^0.0.2", "@stdlib/types": "^0.0.14" }, "devDependencies": { From 35886caf877263870161fb0c6948e68692ea2840 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sat, 19 Aug 2023 01:42:22 +0000 Subject: [PATCH 09/75] Remove files --- mod.d.ts | 277 --- mod.js | 4 - mod.js.map | 1 - stats.html | 6177 ---------------------------------------------------- 4 files changed, 6459 deletions(-) delete mode 100644 mod.d.ts delete mode 100644 mod.js delete mode 100644 mod.js.map delete mode 100644 stats.html diff --git a/mod.d.ts b/mod.d.ts deleted file mode 100644 index ed25296..0000000 --- a/mod.d.ts +++ /dev/null @@ -1,277 +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: 2.0 - -/// - -import { Complex128Array, Complex64Array, DataType } from '@stdlib/types/array'; - -/** -* Creates an uninitialized array having a specified length. -* -* ## Notes -* -* - In browser environments, the function always returns zero-filled arrays. -* - In Node.js versions `>=3.0.0`, the underlying memory of returned typed arrays is **not** initialized. Memory contents are unknown and may contain **sensitive** data. -* -* @param length - array length -* @param dtype - data type -* @returns empty array -* -* @example -* var arr = empty( 2, 'float64' ); -* // returns -*/ -declare function empty( length: number, dtype: 'float64' ): Float64Array; - -/** -* Creates an uninitialized array having a specified length. -* -* ## Notes -* -* - In browser environments, the function always returns zero-filled arrays. -* - In Node.js versions `>=3.0.0`, the underlying memory of returned typed arrays is **not** initialized. Memory contents are unknown and may contain **sensitive** data. -* -* @param length - array length -* @param dtype - data type -* @returns empty array -* -* @example -* var arr = empty( 2, 'float32' ); -* // returns -*/ -declare function empty( length: number, dtype: 'float32' ): Float32Array; - -/** -* Creates an uninitialized array having a specified length. -* -* ## Notes -* -* - In browser environments, the function always returns zero-filled arrays. -* - In Node.js versions `>=3.0.0`, the underlying memory of returned typed arrays is **not** initialized. Memory contents are unknown and may contain **sensitive** data. -* -* @param length - array length -* @param dtype - data type -* @returns empty array -* -* @example -* var arr = empty( 2, 'complex128' ); -* // returns -*/ -declare function empty( length: number, dtype: 'complex128' ): Complex128Array; - -/** -* Creates an uninitialized array having a specified length. -* -* ## Notes -* -* - In browser environments, the function always returns zero-filled arrays. -* - In Node.js versions `>=3.0.0`, the underlying memory of returned typed arrays is **not** initialized. Memory contents are unknown and may contain **sensitive** data. -* -* @param length - array length -* @param dtype - data type -* @returns empty array -* -* @example -* var arr = empty( 2, 'complex64' ); -* // returns -*/ -declare function empty( length: number, dtype: 'complex64' ): Complex64Array; - -/** -* Creates an uninitialized array having a specified length. -* -* ## Notes -* -* - In browser environments, the function always returns zero-filled arrays. -* - In Node.js versions `>=3.0.0`, the underlying memory of returned typed arrays is **not** initialized. Memory contents are unknown and may contain **sensitive** data. -* -* @param length - array length -* @param dtype - data type -* @returns empty array -* -* @example -* var arr = empty( 2, 'int32' ); -* // returns -*/ -declare function empty( length: number, dtype: 'int32' ): Int32Array; - -/** -* Creates an uninitialized array having a specified length. -* -* ## Notes -* -* - In browser environments, the function always returns zero-filled arrays. -* - In Node.js versions `>=3.0.0`, the underlying memory of returned typed arrays is **not** initialized. Memory contents are unknown and may contain **sensitive** data. -* -* @param length - array length -* @param dtype - data type -* @returns empty array -* -* @example -* var arr = empty( 2, 'int16' ); -* // returns -*/ -declare function empty( length: number, dtype: 'int16' ): Int16Array; - -/** -* Creates an uninitialized array having a specified length. -* -* ## Notes -* -* - In browser environments, the function always returns zero-filled arrays. -* - In Node.js versions `>=3.0.0`, the underlying memory of returned typed arrays is **not** initialized. Memory contents are unknown and may contain **sensitive** data. -* -* @param length - array length -* @param dtype - data type -* @returns empty array -* -* @example -* var arr = empty( 2, 'int8' ); -* // returns -*/ -declare function empty( length: number, dtype: 'int8' ): Int8Array; - -/** -* Creates an uninitialized array having a specified length. -* -* ## Notes -* -* - In browser environments, the function always returns zero-filled arrays. -* - In Node.js versions `>=3.0.0`, the underlying memory of returned typed arrays is **not** initialized. Memory contents are unknown and may contain **sensitive** data. -* -* @param length - array length -* @param dtype - data type -* @returns empty array -* -* @example -* var arr = empty( 2, 'uint32' ); -* // returns -*/ -declare function empty( length: number, dtype: 'uint32' ): Uint32Array; - -/** -* Creates an uninitialized array having a specified length. -* -* ## Notes -* -* - In browser environments, the function always returns zero-filled arrays. -* - In Node.js versions `>=3.0.0`, the underlying memory of returned typed arrays is **not** initialized. Memory contents are unknown and may contain **sensitive** data. -* -* @param length - array length -* @param dtype - data type -* @returns empty array -* -* @example -* var arr = empty( 2, 'uint16' ); -* // returns -*/ -declare function empty( length: number, dtype: 'uint16' ): Uint16Array; - -/** -* Creates an uninitialized array having a specified length. -* -* ## Notes -* -* - In browser environments, the function always returns zero-filled arrays. -* - In Node.js versions `>=3.0.0`, the underlying memory of returned typed arrays is **not** initialized. Memory contents are unknown and may contain **sensitive** data. -* -* @param length - array length -* @param dtype - data type -* @returns empty array -* -* @example -* var arr = empty( 2, 'uint8' ); -* // returns -*/ -declare function empty( length: number, dtype: 'uint8' ): Uint8Array; - -/** -* Creates an uninitialized array having a specified length. -* -* ## Notes -* -* - In browser environments, the function always returns zero-filled arrays. -* - In Node.js versions `>=3.0.0`, the underlying memory of returned typed arrays is **not** initialized. Memory contents are unknown and may contain **sensitive** data. -* -* @param length - array length -* @param dtype - data type -* @returns empty array -* -* @example -* var arr = empty( 2, 'uint8c' ); -* // returns -*/ -declare function empty( length: number, dtype: 'uint8c' ): Uint8ClampedArray; - -/** -* Creates a zero-filled array having a specified length. -* -* @param length - array length -* @param dtype - data type -* @returns zero-filled array -* -* @example -* var arr = empty( 2, 'generic' ); -* // returns -*/ -declare function empty( length: number, dtype: 'generic' ): Array; - -/** -* Creates an uninitialized array having a specified length. -* -* ## Notes -* -* - In browser environments, the function always returns zero-filled arrays. -* - If `dtype` is `'generic'`, the function always returns a zero-filled array. -* - In Node.js versions `>=3.0.0`, the underlying memory of returned typed arrays is **not** initialized. Memory contents are unknown and may contain **sensitive** data. -* -* The function recognizes the following data types: -* -* - `float64`: double-precision floating-point numbers (IEEE 754) -* - `float32`: single-precision floating-point numbers (IEEE 754) -* - `complex128`: double-precision complex floating-point numbers -* - `complex64`: single-precision complex floating-point numbers -* - `int32`: 32-bit two's complement signed integers -* - `uint32`: 32-bit unsigned integers -* - `int16`: 16-bit two's complement signed integers -* - `uint16`: 16-bit unsigned integers -* - `int8`: 8-bit two's complement signed integers -* - `uint8`: 8-bit unsigned integers -* - `uint8c`: 8-bit unsigned integers clamped to `0-255` -* - `generic`: generic JavaScript values -* -* @param length - array length -* @param dtype - data type (default: 'float64') -* @returns empty array -* -* @example -* var arr = empty( 2 ); -* // returns -* -* @example -* var arr = empty( 2, 'float32' ); -* // returns -*/ -declare function empty( length: number, dtype?: DataType ): Float64Array; - - -// EXPORTS // - -export = empty; diff --git a/mod.js b/mod.js deleted file mode 100644 index 6a414ae..0000000 --- a/mod.js +++ /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 -/// -var e="function"==typeof Object.defineProperty?Object.defineProperty:null;var r,t=Object.defineProperty,n=Object.prototype,o=n.toString,i=n.__defineGetter__,a=n.__defineSetter__,u=n.__lookupGetter__,f=n.__lookupSetter__;r=function(){try{return e({},"x",{}),!0}catch(e){return!1}}()?t:function(e,r,t){var l,c,y,s;if("object"!=typeof e||null===e||"[object Array]"===o.call(e))throw new TypeError("invalid argument. First argument must be an object. Value: `"+e+"`.");if("object"!=typeof t||null===t||"[object Array]"===o.call(t))throw new TypeError("invalid argument. Property descriptor must be an object. Value: `"+t+"`.");if((c="value"in t)&&(u.call(e,r)||f.call(e,r)?(l=e.__proto__,e.__proto__=n,delete e[r],e[r]=t.value,e.__proto__=l):e[r]=t.value),y="get"in t,s="set"in t,c&&(y||s))throw new Error("invalid argument. Cannot specify one or more accessors and a value or writable attribute in the property descriptor.");return y&&i&&i.call(e,r,t.get),s&&a&&a.call(e,r,t.set),e};var l=r;function c(e,r,t){l(e,r,{configurable:!1,enumerable:!1,writable:!1,value:t})}function y(e){return"number"==typeof e}var s="function"==typeof Symbol&&"symbol"==typeof Symbol("foo");function h(){return s&&"symbol"==typeof Symbol.toStringTag}var m=Object.prototype.toString;var p=Object.prototype.hasOwnProperty;function g(e,r){return null!=e&&p.call(e,r)}var w="function"==typeof Symbol?Symbol.toStringTag:"";var b=h()?function(e){var r,t,n;if(null==e)return m.call(e);t=e[w],r=g(e,w);try{e[w]=void 0}catch(r){return m.call(e)}return n=m.call(e),r?e[w]=t:delete e[w],n}:function(e){return m.call(e)},v=Number,d=v.prototype.toString;var E=h();function _(e){return"object"==typeof e&&(e instanceof v||(E?function(e){try{return d.call(e),!0}catch(e){return!1}}(e):"[object Number]"===b(e)))}function A(e){return y(e)||_(e)}c(A,"isPrimitive",y),c(A,"isObject",_);var T=Number.POSITIVE_INFINITY,j=v.NEGATIVE_INFINITY,x=Math.floor;function B(e){return x(e)===e}function L(e){return ej&&B(e)}function V(e){return y(e)&&L(e)}function S(e){return _(e)&&L(e.valueOf())}function R(e){return V(e)||S(e)}function k(e){return V(e)&&e>=0}function I(e){return S(e)&&e.valueOf()>=0}function O(e){return k(e)||I(e)}c(R,"isPrimitive",V),c(R,"isObject",S),c(O,"isPrimitive",k),c(O,"isObject",I);var M="function"==typeof Float64Array;var C="function"==typeof Float64Array?Float64Array:null;var N="function"==typeof Float64Array?Float64Array:void 0;var F=function(){var e,r,t;if("function"!=typeof C)return!1;try{r=new C([1,3.14,-3.14,NaN]),t=r,e=(M&&t instanceof Float64Array||"[object Float64Array]"===b(t))&&1===r[0]&&3.14===r[1]&&-3.14===r[2]&&r[3]!=r[3]}catch(r){e=!1}return e}()?N:function(){throw new Error("not implemented")},P="function"==typeof Float32Array;var U="function"==typeof Float32Array?Float32Array:null;var Y="function"==typeof Float32Array?Float32Array:void 0;var W=function(){var e,r,t;if("function"!=typeof U)return!1;try{r=new U([1,3.14,-3.14,5e40]),t=r,e=(P&&t instanceof Float32Array||"[object Float32Array]"===b(t))&&1===r[0]&&3.140000104904175===r[1]&&-3.140000104904175===r[2]&&r[3]===T}catch(r){e=!1}return e}()?Y:function(){throw new Error("not implemented")},G="function"==typeof Int16Array;var J="function"==typeof Int16Array?Int16Array:null;var z="function"==typeof Int16Array?Int16Array:void 0;var X=function(){var e,r,t;if("function"!=typeof J)return!1;try{r=new J([1,3.14,-3.14,32768]),t=r,e=(G&&t instanceof Int16Array||"[object Int16Array]"===b(t))&&1===r[0]&&3===r[1]&&-3===r[2]&&-32768===r[3]}catch(r){e=!1}return e}()?z:function(){throw new Error("not implemented")},q="function"==typeof Int32Array;var D="function"==typeof Int32Array?Int32Array:null;var H="function"==typeof Int32Array?Int32Array:void 0;var K=function(){var e,r,t;if("function"!=typeof D)return!1;try{r=new D([1,3.14,-3.14,2147483648]),t=r,e=(q&&t instanceof Int32Array||"[object Int32Array]"===b(t))&&1===r[0]&&3===r[1]&&-3===r[2]&&-2147483648===r[3]}catch(r){e=!1}return e}()?H:function(){throw new Error("not implemented")},Q="function"==typeof Int8Array;var Z="function"==typeof Int8Array?Int8Array:null;var $="function"==typeof Int8Array?Int8Array:void 0;var ee=function(){var e,r,t;if("function"!=typeof Z)return!1;try{r=new Z([1,3.14,-3.14,128]),t=r,e=(Q&&t instanceof Int8Array||"[object Int8Array]"===b(t))&&1===r[0]&&3===r[1]&&-3===r[2]&&-128===r[3]}catch(r){e=!1}return e}()?$:function(){throw new Error("not implemented")},re="function"==typeof Uint16Array;var te="function"==typeof Uint16Array?Uint16Array:null;var ne="function"==typeof Uint16Array?Uint16Array:void 0;var oe=function(){var e,r,t;if("function"!=typeof te)return!1;try{r=new te(r=[1,3.14,-3.14,65536,65537]),t=r,e=(re&&t instanceof Uint16Array||"[object Uint16Array]"===b(t))&&1===r[0]&&3===r[1]&&65533===r[2]&&0===r[3]&&1===r[4]}catch(r){e=!1}return e}()?ne:function(){throw new Error("not implemented")},ie="function"==typeof Uint32Array;var ae="function"==typeof Uint32Array?Uint32Array:null;var ue="function"==typeof Uint32Array?Uint32Array:void 0;var fe=function(){var e,r,t;if("function"!=typeof ae)return!1;try{r=new ae(r=[1,3.14,-3.14,4294967296,4294967297]),t=r,e=(ie&&t instanceof Uint32Array||"[object Uint32Array]"===b(t))&&1===r[0]&&3===r[1]&&4294967293===r[2]&&0===r[3]&&1===r[4]}catch(r){e=!1}return e}()?ue:function(){throw new Error("not implemented")},le="function"==typeof Uint8Array;var ce="function"==typeof Uint8Array?Uint8Array:null;var ye="function"==typeof Uint8Array?Uint8Array:void 0;var se=function(){var e,r,t;if("function"!=typeof ce)return!1;try{r=new ce(r=[1,3.14,-3.14,256,257]),t=r,e=(le&&t instanceof Uint8Array||"[object Uint8Array]"===b(t))&&1===r[0]&&3===r[1]&&253===r[2]&&0===r[3]&&1===r[4]}catch(r){e=!1}return e}()?ye:function(){throw new Error("not implemented")},he="function"==typeof Uint8ClampedArray;var me="function"==typeof Uint8ClampedArray?Uint8ClampedArray:null;var pe="function"==typeof Uint8ClampedArray?Uint8ClampedArray:void 0;var ge=function(){var e,r,t;if("function"!=typeof me)return!1;try{r=new me([-1,0,1,3.14,4.99,255,256]),t=r,e=(he&&t instanceof Uint8ClampedArray||"[object Uint8ClampedArray]"===b(t))&&0===r[0]&&0===r[1]&&1===r[2]&&3===r[3]&&5===r[4]&&255===r[5]&&255===r[6]}catch(r){e=!1}return e}()?pe:function(){throw new Error("not implemented")};function we(e){return"object"==typeof e&&null!==e&&"number"==typeof e.length&&B(e.length)&&e.length>=0&&e.length<=4294967295}function be(e){return"object"==typeof e&&null!==e&&"number"==typeof e.length&&B(e.length)&&e.length>=0&&e.length<=9007199254740991}var ve="function"==typeof ArrayBuffer;function de(e){return ve&&e instanceof ArrayBuffer||"[object ArrayBuffer]"===b(e)}var Ee=Array.isArray?Array.isArray:function(e){return"[object Array]"===b(e)};function _e(e){return"object"==typeof e&&null!==e&&!Ee(e)}var Ae=/./;function Te(e){return"boolean"==typeof e}var je=Boolean.prototype.toString;var xe=h();function Be(e){return"object"==typeof e&&(e instanceof Boolean||(xe?function(e){try{return je.call(e),!0}catch(e){return!1}}(e):"[object Boolean]"===b(e)))}function Le(e){return Te(e)||Be(e)}function Ve(){return new Function("return this;")()}c(Le,"isPrimitive",Te),c(Le,"isObject",Be);var Se="object"==typeof self?self:null,Re="object"==typeof window?window:null,ke="undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},Ie="object"==typeof ke?ke:null;var Oe=function(e){if(arguments.length){if(!Te(e))throw new TypeError("invalid argument. Must provide a boolean primitive. Value: `"+e+"`.");if(e)return Ve()}if(Se)return Se;if(Re)return Re;if(Ie)return Ie;throw new Error("unexpected error. Unable to resolve global object.")}(),Me=Oe.document&&Oe.document.childNodes,Ce=Int8Array;function Ne(){return/^\s*function\s*([^(]*)/i}var Fe=/^\s*function\s*([^(]*)/i;function Pe(e){return null!==e&&"object"==typeof e}function Ue(e){var r,t,n,o;if(("Object"===(t=b(e).slice(8,-1))||"Error"===t)&&e.constructor){if("string"==typeof(n=e.constructor).name)return n.name;if(r=Fe.exec(n.toString()))return r[1]}return Pe(o=e)&&(o._isBuffer||o.constructor&&"function"==typeof o.constructor.isBuffer&&o.constructor.isBuffer(o))?"Buffer":t}c(Ne,"REGEXP",Fe),c(Pe,"isObjectLikeArray",function(e){if("function"!=typeof e)throw new TypeError("invalid argument. Must provide a function. Value: `"+e+"`.");return function(r){var t,n;if(!Ee(r))return!1;if(0===(t=r.length))return!1;for(n=0;n=2)r.push(n[0],n[1]);else{if(!De(n))return new TypeError("invalid argument. An iterator must return either a two-element array containing real and imaginary components or a complex number. Value: `"+n+"`.");r.push($e(n),er(n))}return r}function lr(e,r,t){var n,o,i,a;for(n=[],a=-1;!(o=e.next()).done;)if(a+=1,we(i=r.call(t,o.value,a))&&i.length>=2)n.push(i[0],i[1]);else{if(!De(i))return new TypeError("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `"+i+"`.");n.push($e(i),er(i))}return n}function cr(e,r){var t,n,o,i;for(t=r.length,i=0,o=0;ot.byteLength-e)throw new RangeError("invalid arguments. ArrayBuffer has insufficient capacity. Either decrease the array length or provide a bigger buffer. Minimum capacity: `"+n*yr+"`.");t=new W(t,e,2*n)}}return c(this,"_buffer",t),c(this,"_length",t.length/2),this}function br(e){return e.re}function vr(e){return e.im}function dr(e){var r,t,n;for(r=[];!(t=e.next()).done;)if(we(n=t.value)&&n.length>=2)r.push(n[0],n[1]);else{if(!De(n))return new TypeError("invalid argument. An iterator must return either a two-element array containing real and imaginary components or a complex number. Value: `"+n+"`.");r.push(br(n),vr(n))}return r}function Er(e,r,t){var n,o,i,a;for(n=[],a=-1;!(o=e.next()).done;)if(a+=1,we(i=r.call(t,o.value,a))&&i.length>=2)n.push(i[0],i[1]);else{if(!De(i))return new TypeError("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `"+i+"`.");n.push(br(i),vr(i))}return n}function _r(e,r){var t,n,o,i;for(t=r.length,i=0,o=0;o1){if(!We(n=arguments[1]))throw new TypeError("invalid argument. Second argument must be a function. Value: `"+n+"`.");t>2&&(r=arguments[2])}if(hr(e)){if(u=e.length,n){for(i=(o=new this(u))._buffer,y=0,c=0;c=2))throw new TypeError("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `"+l+"`.");i[y]=l[0],i[y+1]=l[1]}y+=2}return o}return new this(e)}if(be(e)){if(n){for(u=e.length,a=ur(e),c=0;c=2))throw new TypeError("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `"+l+"`.");i[y]=l[0],i[y+1]=l[1]}y+=2}return o}return new this(e)}if(_e(e)&&sr&&We(e[Qe])){if(!We((i=e[Qe]()).next))throw new TypeError("invalid argument. First argument must be an array-like object or an iterable.");if((a=n?lr(i,n,r):fr(i))instanceof Error)throw a;for(i=(o=new this(u=a.length/2))._buffer,c=0;c=n)return{done:!0};return r=new qe(e[a+=2],e[a+1]),{value:[i,r],done:!1}})),c(t,"return",(function(e){if(o=!0,arguments.length)return{value:e,done:!0};return{done:!0}})),Qe&&c(t,Qe,(function(){return r.entries()})),t})),c(wr.prototype,"get",(function(e){var r;if(!hr(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!k(e))throw new TypeError("invalid argument. Must provide a nonnegative integer. Value: `"+e+"`.");if(!(e>=this._length))return new qe((r=this._buffer)[e*=2],r[e+1])})),Ze(wr.prototype,"length",(function(){return this._length})),c(wr.prototype,"set",(function(e){var r,t,n,o,i,a,u,f,l;if(!hr(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(n=this._buffer,arguments.length>1){if(!k(t=arguments[1]))throw new TypeError("invalid argument. Index argument must be a nonnegative integer. Value: `"+t+"`.")}else t=0;if(De(e)){if(t>=this._length)throw new RangeError("invalid argument. Index argument is out-of-bounds. Value: `"+t+"`.");return n[t*=2]=$e(e),void(n[t+1]=er(e))}if(hr(e)){if(t+(a=e._length)>this._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");if(r=e._buffer,l=n.byteOffset+t*yr,r.buffer===n.buffer&&r.byteOffsetl){for(o=new W(r.length),f=0;fthis._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");if(r=e,l=n.byteOffset+t*yr,r.buffer===n.buffer&&r.byteOffsetl){for(o=new W(a),f=0;fthis._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");for(t*=2,f=0;ft.byteLength-e)throw new RangeError("invalid arguments. ArrayBuffer has insufficient capacity. Either decrease the array length or provide a bigger buffer. Minimum capacity: `"+n*Ar+"`.");t=new F(t,e,2*n)}}return c(this,"_buffer",t),c(this,"_length",t.length/2),this}c(Vr,"BYTES_PER_ELEMENT",Ar),c(Vr,"name","Complex128Array"),c(Vr,"from",(function(e){var r,t,n,o,i,a,u,f,l,c,y;if(!We(this))throw new TypeError("invalid invocation. `this` context must be a constructor.");if(!xr(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if((t=arguments.length)>1){if(!We(n=arguments[1]))throw new TypeError("invalid argument. Second argument must be a function. Value: `"+n+"`.");t>2&&(r=arguments[2])}if(jr(e)){if(u=e.length,n){for(i=(o=new this(u))._buffer,y=0,c=0;c=2))throw new TypeError("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `"+l+"`.");i[y]=l[0],i[y+1]=l[1]}y+=2}return o}return new this(e)}if(be(e)){if(n){for(u=e.length,a=ur(e),c=0;c=2))throw new TypeError("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `"+l+"`.");i[y]=l[0],i[y+1]=l[1]}y+=2}return o}return new this(e)}if(_e(e)&&Tr&&We(e[Qe])){if(!We((i=e[Qe]()).next))throw new TypeError("invalid argument. First argument must be an array-like object or an iterable.");if((a=n?Er(i,n,r):dr(i))instanceof Error)throw a;for(i=(o=new this(u=a.length/2))._buffer,c=0;c=n)return{done:!0};return r=new Ge(e[a+=2],e[a+1]),{value:[i,r],done:!1}})),c(t,"return",(function(e){if(o=!0,arguments.length)return{value:e,done:!0};return{done:!0}})),Qe&&c(t,Qe,(function(){return r.entries()})),t})),c(Vr.prototype,"get",(function(e){var r;if(!jr(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!k(e))throw new TypeError("invalid argument. Must provide a nonnegative integer. Value: `"+e+"`.");if(!(e>=this._length))return new Ge((r=this._buffer)[e*=2],r[e+1])})),Ze(Vr.prototype,"length",(function(){return this._length})),c(Vr.prototype,"set",(function(e){var r,t,n,o,i,a,u,f,l;if(!jr(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(n=this._buffer,arguments.length>1){if(!k(t=arguments[1]))throw new TypeError("invalid argument. Index argument must be a nonnegative integer. Value: `"+t+"`.")}else t=0;if(De(e)){if(t>=this._length)throw new RangeError("invalid argument. Index argument is out-of-bounds. Value: `"+t+"`.");return n[t*=2]=br(e),void(n[t+1]=vr(e))}if(jr(e)){if(t+(a=e._length)>this._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");if(r=e._buffer,l=n.byteOffset+t*Ar,r.buffer===n.buffer&&r.byteOffsetl){for(o=new F(r.length),f=0;fthis._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");if(r=e,l=n.byteOffset+t*Ar,r.buffer===n.buffer&&r.byteOffsetl){for(o=new F(a),f=0;fthis._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");for(t*=2,f=0;f1?arguments[1]:"float64"))return kr(e);if(null===(t=Rr(r)))throw new TypeError("invalid argument. Second argument must be a recognized data type. Value: `"+r+"`.");return new t(e)}function Or(e){return arguments.length>1?Ir(e,arguments[1]):Ir(e)}export{Or as default}; -//# sourceMappingURL=mod.js.map diff --git a/mod.js.map b/mod.js.map deleted file mode 100644 index 1c46139..0000000 --- a/mod.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"mod.js","sources":["../node_modules/@stdlib/utils-define-property/lib/define_property.js","../node_modules/@stdlib/utils-define-property/lib/builtin.js","../node_modules/@stdlib/utils-define-property/lib/index.js","../node_modules/@stdlib/utils-define-property/lib/polyfill.js","../node_modules/@stdlib/utils-define-property/lib/has_define_property_support.js","../node_modules/@stdlib/utils-define-nonenumerable-read-only-property/lib/main.js","../node_modules/@stdlib/assert-is-number/lib/primitive.js","../node_modules/@stdlib/assert-has-tostringtag-support/lib/main.js","../node_modules/@stdlib/assert-has-symbol-support/lib/main.js","../node_modules/@stdlib/utils-native-class/lib/tostring.js","../node_modules/@stdlib/assert-has-own-property/lib/main.js","../node_modules/@stdlib/utils-native-class/lib/tostringtag.js","../node_modules/@stdlib/utils-native-class/lib/index.js","../node_modules/@stdlib/utils-native-class/lib/polyfill.js","../node_modules/@stdlib/utils-native-class/lib/native_class.js","../node_modules/@stdlib/number-ctor/lib/number.js","../node_modules/@stdlib/assert-is-number/lib/tostring.js","../node_modules/@stdlib/assert-is-number/lib/object.js","../node_modules/@stdlib/assert-is-number/lib/try2serialize.js","../node_modules/@stdlib/assert-is-number/lib/main.js","../node_modules/@stdlib/assert-is-number/lib/index.js","../node_modules/@stdlib/constants-float64-pinf/lib/index.js","../node_modules/@stdlib/constants-float64-ninf/lib/index.js","../node_modules/@stdlib/math-base-special-floor/lib/main.js","../node_modules/@stdlib/math-base-assert-is-integer/lib/is_integer.js","../node_modules/@stdlib/assert-is-integer/lib/integer.js","../node_modules/@stdlib/assert-is-integer/lib/primitive.js","../node_modules/@stdlib/assert-is-integer/lib/object.js","../node_modules/@stdlib/assert-is-integer/lib/main.js","../node_modules/@stdlib/assert-is-nonnegative-integer/lib/primitive.js","../node_modules/@stdlib/assert-is-nonnegative-integer/lib/object.js","../node_modules/@stdlib/assert-is-nonnegative-integer/lib/main.js","../node_modules/@stdlib/assert-is-integer/lib/index.js","../node_modules/@stdlib/assert-is-nonnegative-integer/lib/index.js","../node_modules/@stdlib/assert-is-float64array/lib/main.js","../node_modules/@stdlib/assert-has-float64array-support/lib/float64array.js","../node_modules/@stdlib/array-float64/lib/float64array.js","../node_modules/@stdlib/array-float64/lib/index.js","../node_modules/@stdlib/assert-has-float64array-support/lib/main.js","../node_modules/@stdlib/array-float64/lib/polyfill.js","../node_modules/@stdlib/assert-is-float32array/lib/main.js","../node_modules/@stdlib/assert-has-float32array-support/lib/float32array.js","../node_modules/@stdlib/array-float32/lib/float32array.js","../node_modules/@stdlib/array-float32/lib/index.js","../node_modules/@stdlib/assert-has-float32array-support/lib/main.js","../node_modules/@stdlib/array-float32/lib/polyfill.js","../node_modules/@stdlib/assert-is-int16array/lib/main.js","../node_modules/@stdlib/constants-int16-max/lib/index.js","../node_modules/@stdlib/assert-has-int16array-support/lib/int16array.js","../node_modules/@stdlib/array-int16/lib/int16array.js","../node_modules/@stdlib/array-int16/lib/index.js","../node_modules/@stdlib/assert-has-int16array-support/lib/main.js","../node_modules/@stdlib/constants-int16-min/lib/index.js","../node_modules/@stdlib/array-int16/lib/polyfill.js","../node_modules/@stdlib/assert-is-int32array/lib/main.js","../node_modules/@stdlib/constants-int32-max/lib/index.js","../node_modules/@stdlib/assert-has-int32array-support/lib/int32array.js","../node_modules/@stdlib/array-int32/lib/int32array.js","../node_modules/@stdlib/array-int32/lib/index.js","../node_modules/@stdlib/assert-has-int32array-support/lib/main.js","../node_modules/@stdlib/constants-int32-min/lib/index.js","../node_modules/@stdlib/array-int32/lib/polyfill.js","../node_modules/@stdlib/assert-is-int8array/lib/main.js","../node_modules/@stdlib/constants-int8-max/lib/index.js","../node_modules/@stdlib/assert-has-int8array-support/lib/int8array.js","../node_modules/@stdlib/array-int8/lib/int8array.js","../node_modules/@stdlib/array-int8/lib/index.js","../node_modules/@stdlib/assert-has-int8array-support/lib/main.js","../node_modules/@stdlib/constants-int8-min/lib/index.js","../node_modules/@stdlib/array-int8/lib/polyfill.js","../node_modules/@stdlib/assert-is-uint16array/lib/main.js","../node_modules/@stdlib/constants-uint16-max/lib/index.js","../node_modules/@stdlib/assert-has-uint16array-support/lib/uint16array.js","../node_modules/@stdlib/array-uint16/lib/uint16array.js","../node_modules/@stdlib/array-uint16/lib/index.js","../node_modules/@stdlib/assert-has-uint16array-support/lib/main.js","../node_modules/@stdlib/array-uint16/lib/polyfill.js","../node_modules/@stdlib/assert-is-uint32array/lib/main.js","../node_modules/@stdlib/constants-uint32-max/lib/index.js","../node_modules/@stdlib/assert-has-uint32array-support/lib/uint32array.js","../node_modules/@stdlib/array-uint32/lib/uint32array.js","../node_modules/@stdlib/array-uint32/lib/index.js","../node_modules/@stdlib/assert-has-uint32array-support/lib/main.js","../node_modules/@stdlib/array-uint32/lib/polyfill.js","../node_modules/@stdlib/assert-is-uint8array/lib/main.js","../node_modules/@stdlib/constants-uint8-max/lib/index.js","../node_modules/@stdlib/assert-has-uint8array-support/lib/uint8array.js","../node_modules/@stdlib/array-uint8/lib/uint8array.js","../node_modules/@stdlib/array-uint8/lib/index.js","../node_modules/@stdlib/assert-has-uint8array-support/lib/main.js","../node_modules/@stdlib/array-uint8/lib/polyfill.js","../node_modules/@stdlib/assert-is-uint8clampedarray/lib/main.js","../node_modules/@stdlib/assert-has-uint8clampedarray-support/lib/uint8clampedarray.js","../node_modules/@stdlib/array-uint8c/lib/uint8clampedarray.js","../node_modules/@stdlib/array-uint8c/lib/index.js","../node_modules/@stdlib/assert-has-uint8clampedarray-support/lib/main.js","../node_modules/@stdlib/array-uint8c/lib/polyfill.js","../node_modules/@stdlib/assert-is-array-like-object/lib/main.js","../node_modules/@stdlib/constants-array-max-array-length/lib/index.js","../node_modules/@stdlib/assert-is-collection/lib/main.js","../node_modules/@stdlib/constants-array-max-typed-array-length/lib/index.js","../node_modules/@stdlib/assert-is-arraybuffer/lib/main.js","../node_modules/@stdlib/assert-is-array/lib/main.js","../node_modules/@stdlib/assert-is-object/lib/main.js","../node_modules/@stdlib/utils-type-of/lib/fixtures/re.js","../node_modules/@stdlib/assert-is-boolean/lib/primitive.js","../node_modules/@stdlib/assert-is-boolean/lib/tostring.js","../node_modules/@stdlib/assert-is-boolean/lib/object.js","../node_modules/@stdlib/assert-is-boolean/lib/try2serialize.js","../node_modules/@stdlib/assert-is-boolean/lib/main.js","../node_modules/@stdlib/utils-global/lib/codegen.js","../node_modules/@stdlib/assert-is-boolean/lib/index.js","../node_modules/@stdlib/utils-global/lib/self.js","../node_modules/@stdlib/utils-global/lib/window.js","../node_modules/@stdlib/utils-global/lib/global.js","../node_modules/@stdlib/utils-type-of/lib/fixtures/nodelist.js","../node_modules/@stdlib/utils-global/lib/main.js","../node_modules/@stdlib/utils-type-of/lib/fixtures/typedarray.js","../node_modules/@stdlib/regexp-function-name/lib/main.js","../node_modules/@stdlib/regexp-function-name/lib/regexp.js","../node_modules/@stdlib/assert-is-object-like/lib/main.js","../node_modules/@stdlib/utils-constructor-name/lib/main.js","../node_modules/@stdlib/assert-is-buffer/lib/main.js","../node_modules/@stdlib/regexp-function-name/lib/index.js","../node_modules/@stdlib/assert-is-object-like/lib/index.js","../node_modules/@stdlib/assert-tools-array-function/lib/arrayfcn.js","../node_modules/@stdlib/utils-type-of/lib/index.js","../node_modules/@stdlib/utils-type-of/lib/check.js","../node_modules/@stdlib/utils-type-of/lib/polyfill.js","../node_modules/@stdlib/utils-type-of/lib/typeof.js","../node_modules/@stdlib/assert-is-function/lib/main.js","../node_modules/@stdlib/complex-float64/lib/main.js","../node_modules/@stdlib/complex-float64/lib/tostring.js","../node_modules/@stdlib/complex-float64/lib/tojson.js","../node_modules/@stdlib/number-float64-base-to-float32/lib/main.js","../node_modules/@stdlib/number-float64-base-to-float32/lib/polyfill.js","../node_modules/@stdlib/number-float64-base-to-float32/lib/index.js","../node_modules/@stdlib/complex-float32/lib/main.js","../node_modules/@stdlib/assert-is-complex-like/lib/main.js","../node_modules/@stdlib/math-base-assert-is-even/lib/is_even.js","../node_modules/@stdlib/assert-has-iterator-symbol-support/lib/main.js","../node_modules/@stdlib/complex-float32/lib/tostring.js","../node_modules/@stdlib/complex-float32/lib/tojson.js","../node_modules/@stdlib/symbol-iterator/lib/main.js","../node_modules/@stdlib/utils-define-nonenumerable-read-only-accessor/lib/main.js","../node_modules/@stdlib/complex-realf/lib/main.js","../node_modules/@stdlib/complex-imagf/lib/main.js","../node_modules/@stdlib/strided-base-reinterpret-complex64/lib/main.js","../node_modules/@stdlib/strided-base-reinterpret-complex128/lib/main.js","../node_modules/@stdlib/array-base-arraylike2object/lib/getter.js","../node_modules/@stdlib/array-base-arraylike2object/lib/getter.accessor.js","../node_modules/@stdlib/array-base-arraylike2object/lib/setter.js","../node_modules/@stdlib/array-base-arraylike2object/lib/setter.accessor.js","../node_modules/@stdlib/array-base-arraylike2object/lib/main.js","../node_modules/@stdlib/array-complex64/lib/from_iterator.js","../node_modules/@stdlib/array-complex64/lib/from_iterator_map.js","../node_modules/@stdlib/array-complex64/lib/from_array.js","../node_modules/@stdlib/array-complex64/lib/main.js","../node_modules/@stdlib/complex-real/lib/main.js","../node_modules/@stdlib/complex-imag/lib/main.js","../node_modules/@stdlib/array-complex128/lib/from_iterator.js","../node_modules/@stdlib/array-complex128/lib/from_iterator_map.js","../node_modules/@stdlib/array-complex128/lib/from_array.js","../node_modules/@stdlib/array-complex128/lib/main.js","../node_modules/@stdlib/array-ctors/lib/ctors.js","../node_modules/@stdlib/array-ctors/lib/main.js","../node_modules/@stdlib/array-base-zeros/lib/main.js","../node_modules/@stdlib/array-base-filled/lib/main.js","../node_modules/@stdlib/array-zeros/lib/main.js","../lib/polyfill.js"],"sourcesContent":["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Object.defineProperty === 'function' ) ? Object.defineProperty : null;\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Defines (or modifies) an object property.\n*\n* ## Notes\n*\n* - Property descriptors come in two flavors: **data descriptors** and **accessor descriptors**. A data descriptor is a property that has a value, which may or may not be writable. An accessor descriptor is a property described by a getter-setter function pair. A descriptor must be one of these two flavors and cannot be both.\n*\n* @name defineProperty\n* @type {Function}\n* @param {Object} obj - object on which to define the property\n* @param {(string|symbol)} prop - property name\n* @param {Object} descriptor - property descriptor\n* @param {boolean} [descriptor.configurable=false] - boolean indicating if property descriptor can be changed and if the property can be deleted from the provided object\n* @param {boolean} [descriptor.enumerable=false] - boolean indicating if the property shows up when enumerating object properties\n* @param {boolean} [descriptor.writable=false] - boolean indicating if the value associated with the property can be changed with an assignment operator\n* @param {*} [descriptor.value] - property value\n* @param {(Function|void)} [descriptor.get=undefined] - function which serves as a getter for the property, or, if no getter, undefined. When the property is accessed, a getter function is called without arguments and with the `this` context set to the object through which the property is accessed (which may not be the object on which the property is defined due to inheritance). The return value will be used as the property value.\n* @param {(Function|void)} [descriptor.set=undefined] - function which serves as a setter for the property, or, if no setter, undefined. When assigning a property value, a setter function is called with one argument (the value being assigned to the property) and with the `this` context set to the object through which the property is assigned.\n* @throws {TypeError} first argument must be an object\n* @throws {TypeError} third argument must be an object\n* @throws {Error} property descriptor cannot have both a value and a setter and/or getter\n* @returns {Object} object with added property\n*\n* @example\n* var obj = {};\n*\n* defineProperty( obj, 'foo', {\n* 'value': 'bar'\n* });\n*\n* var str = obj.foo;\n* // returns 'bar'\n*/\nvar defineProperty = Object.defineProperty;\n\n\n// EXPORTS //\n\nexport default defineProperty;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Define (or modify) an object property.\n*\n* @module @stdlib/utils-define-property\n*\n* @example\n* import defineProperty from '@stdlib/utils-define-property';\n*\n* var obj = {};\n* defineProperty( obj, 'foo', {\n* 'value': 'bar',\n* 'writable': false,\n* 'configurable': false,\n* 'enumerable': false\n* });\n* obj.foo = 'boop'; // => throws\n*/\n\n// MODULES //\n\nimport hasDefinePropertySupport from './has_define_property_support.js';\nimport builtin from './builtin.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar defineProperty;\nif ( hasDefinePropertySupport() ) {\n\tdefineProperty = builtin;\n} else {\n\tdefineProperty = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default defineProperty;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable no-underscore-dangle, no-proto */\n\n'use strict';\n\n// VARIABLES //\n\nvar objectProtoype = Object.prototype;\nvar toStr = objectProtoype.toString;\nvar defineGetter = objectProtoype.__defineGetter__;\nvar defineSetter = objectProtoype.__defineSetter__;\nvar lookupGetter = objectProtoype.__lookupGetter__;\nvar lookupSetter = objectProtoype.__lookupSetter__;\n\n\n// MAIN //\n\n/**\n* Defines (or modifies) an object property.\n*\n* ## Notes\n*\n* - Property descriptors come in two flavors: **data descriptors** and **accessor descriptors**. A data descriptor is a property that has a value, which may or may not be writable. An accessor descriptor is a property described by a getter-setter function pair. A descriptor must be one of these two flavors and cannot be both.\n*\n* @param {Object} obj - object on which to define the property\n* @param {string} prop - property name\n* @param {Object} descriptor - property descriptor\n* @param {boolean} [descriptor.configurable=false] - boolean indicating if property descriptor can be changed and if the property can be deleted from the provided object\n* @param {boolean} [descriptor.enumerable=false] - boolean indicating if the property shows up when enumerating object properties\n* @param {boolean} [descriptor.writable=false] - boolean indicating if the value associated with the property can be changed with an assignment operator\n* @param {*} [descriptor.value] - property value\n* @param {(Function|void)} [descriptor.get=undefined] - function which serves as a getter for the property, or, if no getter, undefined. When the property is accessed, a getter function is called without arguments and with the `this` context set to the object through which the property is accessed (which may not be the object on which the property is defined due to inheritance). The return value will be used as the property value.\n* @param {(Function|void)} [descriptor.set=undefined] - function which serves as a setter for the property, or, if no setter, undefined. When assigning a property value, a setter function is called with one argument (the value being assigned to the property) and with the `this` context set to the object through which the property is assigned.\n* @throws {TypeError} first argument must be an object\n* @throws {TypeError} third argument must be an object\n* @throws {Error} property descriptor cannot have both a value and a setter and/or getter\n* @returns {Object} object with added property\n*\n* @example\n* var obj = {};\n*\n* defineProperty( obj, 'foo', {\n* 'value': 'bar'\n* });\n*\n* var str = obj.foo;\n* // returns 'bar'\n*/\nfunction defineProperty( obj, prop, descriptor ) {\n\tvar prototype;\n\tvar hasValue;\n\tvar hasGet;\n\tvar hasSet;\n\n\tif ( typeof obj !== 'object' || obj === null || toStr.call( obj ) === '[object Array]' ) {\n\t\tthrow new TypeError( 'invalid argument. First argument must be an object. Value: `' + obj + '`.' );\n\t}\n\tif ( typeof descriptor !== 'object' || descriptor === null || toStr.call( descriptor ) === '[object Array]' ) {\n\t\tthrow new TypeError( 'invalid argument. Property descriptor must be an object. Value: `' + descriptor + '`.' );\n\t}\n\thasValue = ( 'value' in descriptor );\n\tif ( hasValue ) {\n\t\tif (\n\t\t\tlookupGetter.call( obj, prop ) ||\n\t\t\tlookupSetter.call( obj, prop )\n\t\t) {\n\t\t\t// Override `__proto__` to avoid touching inherited accessors:\n\t\t\tprototype = obj.__proto__;\n\t\t\tobj.__proto__ = objectProtoype;\n\n\t\t\t// Delete property as existing getters/setters prevent assigning value to specified property:\n\t\t\tdelete obj[ prop ];\n\t\t\tobj[ prop ] = descriptor.value;\n\n\t\t\t// Restore original prototype:\n\t\t\tobj.__proto__ = prototype;\n\t\t} else {\n\t\t\tobj[ prop ] = descriptor.value;\n\t\t}\n\t}\n\thasGet = ( 'get' in descriptor );\n\thasSet = ( 'set' in descriptor );\n\n\tif ( hasValue && ( hasGet || hasSet ) ) {\n\t\tthrow new Error( 'invalid argument. Cannot specify one or more accessors and a value or writable attribute in the property descriptor.' );\n\t}\n\n\tif ( hasGet && defineGetter ) {\n\t\tdefineGetter.call( obj, prop, descriptor.get );\n\t}\n\tif ( hasSet && defineSetter ) {\n\t\tdefineSetter.call( obj, prop, descriptor.set );\n\t}\n\treturn obj;\n}\n\n\n// EXPORTS //\n\nexport default defineProperty;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport defineProperty from './define_property.js';\n\n\n// MAIN //\n\n/**\n* Tests for `Object.defineProperty` support.\n*\n* @private\n* @returns {boolean} boolean indicating if an environment has `Object.defineProperty` support\n*\n* @example\n* var bool = hasDefinePropertySupport();\n* // returns \n*/\nfunction hasDefinePropertySupport() {\n\t// Test basic support...\n\ttry {\n\t\tdefineProperty( {}, 'x', {} );\n\t\treturn true;\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\treturn false;\n\t}\n}\n\n\n// EXPORTS //\n\nexport default hasDefinePropertySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport defineProperty from '@stdlib/utils-define-property';\n\n\n// MAIN //\n\n/**\n* Defines a non-enumerable read-only property.\n*\n* @param {Object} obj - object on which to define the property\n* @param {(string|symbol)} prop - property name\n* @param {*} value - value to set\n*\n* @example\n* var obj = {};\n*\n* setNonEnumerableReadOnly( obj, 'foo', 'bar' );\n*\n* try {\n* obj.foo = 'boop';\n* } catch ( err ) {\n* console.error( err.message );\n* }\n*/\nfunction setNonEnumerableReadOnly( obj, prop, value ) {\n\tdefineProperty( obj, prop, {\n\t\t'configurable': false,\n\t\t'enumerable': false,\n\t\t'writable': false,\n\t\t'value': value\n\t});\n}\n\n\n// EXPORTS //\n\nexport default setNonEnumerableReadOnly;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Tests if a value is a number primitive.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number primitive\n*\n* @example\n* var bool = isNumber( 3.14 );\n* // returns true\n*\n* @example\n* var bool = isNumber( NaN );\n* // returns true\n*\n* @example\n* var bool = isNumber( new Number( 3.14 ) );\n* // returns false\n*/\nfunction isNumber( value ) {\n\treturn ( typeof value === 'number' );\n}\n\n\n// EXPORTS //\n\nexport default isNumber;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport hasSymbols from '@stdlib/assert-has-symbol-support';\n\n\n// VARIABLES //\n\nvar FLG = hasSymbols();\n\n\n// MAIN //\n\n/**\n* Tests for native `toStringTag` support.\n*\n* @returns {boolean} boolean indicating if an environment has `toStringTag` support\n*\n* @example\n* var bool = hasToStringTagSupport();\n* // returns \n*/\nfunction hasToStringTagSupport() {\n\treturn ( FLG && typeof Symbol.toStringTag === 'symbol' );\n}\n\n\n// EXPORTS //\n\nexport default hasToStringTagSupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Tests for native `Symbol` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Symbol` support\n*\n* @example\n* var bool = hasSymbolSupport();\n* // returns \n*/\nfunction hasSymbolSupport() {\n\treturn (\n\t\ttypeof Symbol === 'function' &&\n\t\ttypeof Symbol( 'foo' ) === 'symbol'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default hasSymbolSupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar toStr = Object.prototype.toString;\n\n\n// EXPORTS //\n\nexport default toStr;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// FUNCTIONS //\n\nvar has = Object.prototype.hasOwnProperty;\n\n\n// MAIN //\n\n/**\n* Tests if an object has a specified property.\n*\n* @param {*} value - value to test\n* @param {*} property - property to test\n* @returns {boolean} boolean indicating if an object has a specified property\n*\n* @example\n* var beep = {\n* 'boop': true\n* };\n*\n* var bool = hasOwnProp( beep, 'boop' );\n* // returns true\n*\n* @example\n* var beep = {\n* 'boop': true\n* };\n*\n* var bool = hasOwnProp( beep, 'bap' );\n* // returns false\n*/\nfunction hasOwnProp( value, property ) {\n\tif (\n\t\tvalue === void 0 ||\n\t\tvalue === null\n\t) {\n\t\treturn false;\n\t}\n\treturn has.call( value, property );\n}\n\n\n// EXPORTS //\n\nexport default hasOwnProp;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar toStrTag = ( typeof Symbol === 'function' ) ? Symbol.toStringTag : '';\n\n\n// EXPORTS //\n\nexport default toStrTag;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Return a string value indicating a specification defined classification of an object.\n*\n* @module @stdlib/utils-native-class\n*\n* @example\n* import nativeClass from '@stdlib/utils-native-class';\n*\n* var str = nativeClass( 'a' );\n* // returns '[object String]'\n*\n* str = nativeClass( 5 );\n* // returns '[object Number]'\n*\n* function Beep() {\n* return this;\n* }\n* str = nativeClass( new Beep() );\n* // returns '[object Object]'\n*/\n\n// MODULES //\n\nimport hasToStringTag from '@stdlib/assert-has-tostringtag-support';\nimport builtin from './native_class.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar nativeClass;\nif ( hasToStringTag() ) {\n\tnativeClass = polyfill;\n} else {\n\tnativeClass = builtin;\n}\n\n\n// EXPORTS //\n\nexport default nativeClass;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport hasOwnProp from '@stdlib/assert-has-own-property';\nimport toStringTag from './tostringtag.js';\nimport toStr from './tostring.js';\n\n\n// MAIN //\n\n/**\n* Returns a string value indicating a specification defined classification of an object in environments supporting `Symbol.toStringTag`.\n*\n* @param {*} v - input value\n* @returns {string} string value indicating a specification defined classification of the input value\n*\n* @example\n* var str = nativeClass( 'a' );\n* // returns '[object String]'\n*\n* @example\n* var str = nativeClass( 5 );\n* // returns '[object Number]'\n*\n* @example\n* function Beep() {\n* return this;\n* }\n* var str = nativeClass( new Beep() );\n* // returns '[object Object]'\n*/\nfunction nativeClass( v ) {\n\tvar isOwn;\n\tvar tag;\n\tvar out;\n\n\tif ( v === null || v === void 0 ) {\n\t\treturn toStr.call( v );\n\t}\n\ttag = v[ toStringTag ];\n\tisOwn = hasOwnProp( v, toStringTag );\n\n\t// Attempt to override the `toStringTag` property. For built-ins having a `Symbol.toStringTag` property (e.g., `JSON`, `Math`, etc), the `Symbol.toStringTag` property is read-only (e.g., , so we need to wrap in a `try/catch`.\n\ttry {\n\t\tv[ toStringTag ] = void 0;\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\treturn toStr.call( v );\n\t}\n\tout = toStr.call( v );\n\n\tif ( isOwn ) {\n\t\tv[ toStringTag ] = tag;\n\t} else {\n\t\tdelete v[ toStringTag ];\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default nativeClass;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport toStr from './tostring.js';\n\n\n// MAIN //\n\n/**\n* Returns a string value indicating a specification defined classification (via the internal property `[[Class]]`) of an object.\n*\n* @param {*} v - input value\n* @returns {string} string value indicating a specification defined classification of the input value\n*\n* @example\n* var str = nativeClass( 'a' );\n* // returns '[object String]'\n*\n* @example\n* var str = nativeClass( 5 );\n* // returns '[object Number]'\n*\n* @example\n* function Beep() {\n* return this;\n* }\n* var str = nativeClass( new Beep() );\n* // returns '[object Object]'\n*/\nfunction nativeClass( v ) {\n\treturn toStr.call( v );\n}\n\n\n// EXPORTS //\n\nexport default nativeClass;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// EXPORTS //\n\nexport default Number; // eslint-disable-line stdlib/require-globals\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport Number from '@stdlib/number-ctor';\n\n\n// MAIN //\n\n// eslint-disable-next-line stdlib/no-redeclare\nvar toString = Number.prototype.toString; // non-generic\n\n\n// EXPORTS //\n\nexport default toString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport hasToStringTag from '@stdlib/assert-has-tostringtag-support';\nimport nativeClass from '@stdlib/utils-native-class';\nimport Number from '@stdlib/number-ctor';\nimport test from './try2serialize.js';\n\n\n// VARIABLES //\n\nvar FLG = hasToStringTag();\n\n\n// MAIN //\n\n/**\n* Tests if a value is a number object.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number object\n*\n* @example\n* var bool = isNumber( 3.14 );\n* // returns false\n*\n* @example\n* var bool = isNumber( new Number( 3.14 ) );\n* // returns true\n*/\nfunction isNumber( value ) {\n\tif ( typeof value === 'object' ) {\n\t\tif ( value instanceof Number ) {\n\t\t\treturn true;\n\t\t}\n\t\tif ( FLG ) {\n\t\t\treturn test( value );\n\t\t}\n\t\treturn ( nativeClass( value ) === '[object Number]' );\n\t}\n\treturn false;\n}\n\n\n// EXPORTS //\n\nexport default isNumber;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport toString from './tostring.js'; // eslint-disable-line stdlib/no-redeclare\n\n\n// MAIN //\n\n/**\n* Attempts to serialize a value to a string.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value can be serialized\n*/\nfunction test( value ) {\n\ttry {\n\t\ttoString.call( value );\n\t\treturn true;\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\treturn false;\n\t}\n}\n\n\n// EXPORTS //\n\nexport default test;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a number.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a number\n*\n* @example\n* var bool = isNumber( 3.14 );\n* // returns true\n*\n* @example\n* var bool = isNumber( new Number( 3.14 ) );\n* // returns true\n*\n* @example\n* var bool = isNumber( NaN );\n* // returns true\n*\n* @example\n* var bool = isNumber( null );\n* // returns false\n*/\nfunction isNumber( value ) {\n\treturn ( isPrimitive( value ) || isObject( value ) );\n}\n\n\n// EXPORTS //\n\nexport default isNumber;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test if a value is a number.\n*\n* @module @stdlib/assert-is-number\n*\n* @example\n* import isNumber from '@stdlib/assert-is-number';\n*\n* var bool = isNumber( 3.14 );\n* // returns true\n*\n* bool = isNumber( new Number( 3.14 ) );\n* // returns true\n*\n* bool = isNumber( NaN );\n* // returns true\n*\n* bool = isNumber( null );\n* // returns false\n*\n* @example\n* import { isPrimitive as isNumber } from '@stdlib/assert-is-number';\n*\n* var bool = isNumber( 3.14 );\n* // returns true\n*\n* bool = isNumber( NaN );\n* // returns true\n*\n* bool = isNumber( new Number( 3.14 ) );\n* // returns false\n*\n* @example\n* import { isObject as isNumber } from '@stdlib/assert-is-number';\n*\n* var bool = isNumber( 3.14 );\n* // returns false\n*\n* bool = isNumber( new Number( 3.14 ) );\n* // returns true\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport isNumber from './main.js';\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\nsetReadOnly( isNumber, 'isPrimitive', isPrimitive );\nsetReadOnly( isNumber, 'isObject', isObject );\n\n\n// EXPORTS //\n\nexport default isNumber;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Double-precision floating-point positive infinity.\n*\n* @module @stdlib/constants-float64-pinf\n* @type {number}\n*\n* @example\n* import FLOAT64_PINF from '@stdlib/constants-float64-pinf';\n* // returns Infinity\n*/\n\n\n// MAIN //\n\n/**\n* Double-precision floating-point positive infinity.\n*\n* ## Notes\n*\n* Double-precision floating-point positive infinity has the bit sequence\n*\n* ```binarystring\n* 0 11111111111 00000000000000000000 00000000000000000000000000000000\n* ```\n*\n* @constant\n* @type {number}\n* @default Number.POSITIVE_INFINITY\n* @see [IEEE 754]{@link https://en.wikipedia.org/wiki/IEEE_754-1985}\n*/\nvar FLOAT64_PINF = Number.POSITIVE_INFINITY; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default FLOAT64_PINF;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Double-precision floating-point negative infinity.\n*\n* @module @stdlib/constants-float64-ninf\n* @type {number}\n*\n* @example\n* import FLOAT64_NINF from '@stdlib/constants-float64-ninf';\n* // returns -Infinity\n*/\n\n// MODULES //\n\nimport Number from '@stdlib/number-ctor';\n\n\n// MAIN //\n\n/**\n* Double-precision floating-point negative infinity.\n*\n* ## Notes\n*\n* Double-precision floating-point negative infinity has the bit sequence\n*\n* ```binarystring\n* 1 11111111111 00000000000000000000 00000000000000000000000000000000\n* ```\n*\n* @constant\n* @type {number}\n* @default Number.NEGATIVE_INFINITY\n* @see [IEEE 754]{@link https://en.wikipedia.org/wiki/IEEE_754-1985}\n*/\nvar FLOAT64_NINF = Number.NEGATIVE_INFINITY;\n\n\n// EXPORTS //\n\nexport default FLOAT64_NINF;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: implementation (?)\n\n/**\n* Rounds a double-precision floating-point number toward negative infinity.\n*\n* @param {number} x - input value\n* @returns {number} rounded value\n*\n* @example\n* var v = floor( -4.2 );\n* // returns -5.0\n*\n* @example\n* var v = floor( 9.99999 );\n* // returns 9.0\n*\n* @example\n* var v = floor( 0.0 );\n* // returns 0.0\n*\n* @example\n* var v = floor( NaN );\n* // returns NaN\n*/\nvar floor = Math.floor; // eslint-disable-line stdlib/no-builtin-math\n\n\n// EXPORTS //\n\nexport default floor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport floor from '@stdlib/math-base-special-floor';\n\n\n// MAIN //\n\n/**\n* Tests if a finite double-precision floating-point number is an integer.\n*\n* @param {number} x - value to test\n* @returns {boolean} boolean indicating whether the value is an integer\n*\n* @example\n* var bool = isInteger( 1.0 );\n* // returns true\n*\n* @example\n* var bool = isInteger( 3.14 );\n* // returns false\n*/\nfunction isInteger( x ) {\n\treturn (floor(x) === x);\n}\n\n\n// EXPORTS //\n\nexport default isInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport PINF from '@stdlib/constants-float64-pinf';\nimport NINF from '@stdlib/constants-float64-ninf';\nimport isInt from '@stdlib/math-base-assert-is-integer';\n\n\n// MAIN //\n\n/**\n* Tests if a number primitive is an integer value.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a number primitive is an integer value\n*/\nfunction isInteger( value ) {\n\treturn (\n\t\tvalue < PINF &&\n\t\tvalue > NINF &&\n\t\tisInt( value )\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isNumber } from '@stdlib/assert-is-number';\nimport isInt from './integer.js';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a number primitive having an integer value.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number primitive having an integer value\n*\n* @example\n* var bool = isInteger( -3.0 );\n* // returns true\n*\n* @example\n* var bool = isInteger( new Number( -3.0 ) );\n* // returns false\n*/\nfunction isInteger( value ) {\n\treturn (\n\t\tisNumber( value ) &&\n\t\tisInt( value )\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isObject as isNumber } from '@stdlib/assert-is-number';\nimport isInt from './integer.js';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a number object having an integer value.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number object having an integer value\n*\n* @example\n* var bool = isInteger( 3.0 );\n* // returns false\n*\n* @example\n* var bool = isInteger( new Number( 3.0 ) );\n* // returns true\n*/\nfunction isInteger( value ) {\n\treturn (\n\t\tisNumber( value ) &&\n\t\tisInt( value.valueOf() )\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\n/**\n* Tests if a value is an integer.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an integer\n*\n* @example\n* var bool = isInteger( 5.0 );\n* // returns true\n*\n* @example\n* var bool = isInteger( new Number( 5.0 ) );\n* // returns true\n*\n* @example\n* var bool = isInteger( -3.14 );\n* // returns false\n*\n* @example\n* var bool = isInteger( null );\n* // returns false\n*/\nfunction isInteger( value ) {\n\treturn ( isPrimitive( value ) || isObject( value ) );\n}\n\n\n// EXPORTS //\n\nexport default isInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isInteger } from '@stdlib/assert-is-integer';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a number primitive having a nonnegative integer value.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number primitive having a nonnegative integer value\n*\n* @example\n* var bool = isNonNegativeInteger( 3.0 );\n* // returns true\n*\n* @example\n* var bool = isNonNegativeInteger( new Number( 3.0 ) );\n* // returns false\n*/\nfunction isNonNegativeInteger( value ) {\n\treturn (\n\t\tisInteger( value ) &&\n\t\tvalue >= 0\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isNonNegativeInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isObject as isInteger } from '@stdlib/assert-is-integer';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a number object having a nonnegative integer value.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number object having a nonnegative integer value\n*\n* @example\n* var bool = isNonNegativeInteger( 3.0 );\n* // returns false\n*\n* @example\n* var bool = isNonNegativeInteger( new Number( 3.0 ) );\n* // returns true\n*/\nfunction isNonNegativeInteger( value ) {\n\treturn (\n\t\tisInteger( value ) &&\n\t\tvalue.valueOf() >= 0\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isNonNegativeInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a nonnegative integer.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a nonnegative integer\n*\n* @example\n* var bool = isNonNegativeInteger( 5.0 );\n* // returns true\n*\n* @example\n* var bool = isNonNegativeInteger( new Number( 5.0 ) );\n* // returns true\n*\n* @example\n* var bool = isNonNegativeInteger( -5.0 );\n* // returns false\n*\n* @example\n* var bool = isNonNegativeInteger( 3.14 );\n* // returns false\n*\n* @example\n* var bool = isNonNegativeInteger( null );\n* // returns false\n*/\nfunction isNonNegativeInteger( value ) {\n\treturn ( isPrimitive( value ) || isObject( value ) );\n}\n\n\n// EXPORTS //\n\nexport default isNonNegativeInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test if a value is an integer.\n*\n* @module @stdlib/assert-is-integer\n*\n* @example\n* import isInteger from '@stdlib/assert-is-integer';\n*\n* var bool = isInteger( 5.0 );\n* // returns true\n*\n* bool = isInteger( new Number( 5.0 ) );\n* // returns true\n*\n* bool = isInteger( -3.14 );\n* // returns false\n*\n* bool = isInteger( null );\n* // returns false\n*\n* @example\n* // Use interface to check for integer primitives...\n* import { isPrimitive as isInteger } from '@stdlib/assert-is-integer';\n*\n* var bool = isInteger( -3.0 );\n* // returns true\n*\n* bool = isInteger( new Number( -3.0 ) );\n* // returns false\n*\n* @example\n* // Use interface to check for integer objects...\n* import { isObject as isInteger } from '@stdlib/assert-is-integer';\n*\n* var bool = isInteger( 3.0 );\n* // returns false\n*\n* bool = isInteger( new Number( 3.0 ) );\n* // returns true\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport isInteger from './main.js';\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\nsetReadOnly( isInteger, 'isPrimitive', isPrimitive );\nsetReadOnly( isInteger, 'isObject', isObject );\n\n\n// EXPORTS //\n\nexport default isInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test if a value is a nonnegative integer.\n*\n* @module @stdlib/assert-is-nonnegative-integer\n*\n* @example\n* import isNonNegativeInteger from '@stdlib/assert-is-nonnegative-integer';\n*\n* var bool = isNonNegativeInteger( 5.0 );\n* // returns true\n*\n* bool = isNonNegativeInteger( new Number( 5.0 ) );\n* // returns true\n*\n* bool = isNonNegativeInteger( -5.0 );\n* // returns false\n*\n* bool = isNonNegativeInteger( 3.14 );\n* // returns false\n*\n* bool = isNonNegativeInteger( null );\n* // returns false\n*\n* @example\n* import { isPrimitive as isNonNegativeInteger } from '@stdlib/assert-is-nonnegative-integer';\n*\n* var bool = isNonNegativeInteger( 3.0 );\n* // returns true\n*\n* bool = isNonNegativeInteger( new Number( 3.0 ) );\n* // returns false\n*\n* @example\n* import { isObject as isNonNegativeInteger } from '@stdlib/assert-is-nonnegative-integer';\n*\n* var bool = isNonNegativeInteger( 3.0 );\n* // returns false\n*\n* bool = isNonNegativeInteger( new Number( 3.0 ) );\n* // returns true\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport isNonNegativeInteger from './main.js';\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\nsetReadOnly( isNonNegativeInteger, 'isPrimitive', isPrimitive );\nsetReadOnly( isNonNegativeInteger, 'isObject', isObject );\n\n\n// EXPORTS //\n\nexport default isNonNegativeInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasFloat64Array = ( typeof Float64Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Float64Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a Float64Array\n*\n* @example\n* var bool = isFloat64Array( new Float64Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isFloat64Array( [] );\n* // returns false\n*/\nfunction isFloat64Array( value ) {\n\treturn (\n\t\t( hasFloat64Array && value instanceof Float64Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Float64Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isFloat64Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Float64Array === 'function' ) ? Float64Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Float64Array === 'function' ) ? Float64Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of double-precision floating-point numbers in the platform byte order.\n*\n* @module @stdlib/array-float64\n*\n* @example\n* import ctor from '@stdlib/array-float64';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasFloat64ArraySupport from '@stdlib/assert-has-float64array-support';\nimport builtin from './float64array.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasFloat64ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isFloat64Array from '@stdlib/assert-is-float64array';\nimport GlobalFloat64Array from './float64array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Float64Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Float64Array` support\n*\n* @example\n* var bool = hasFloat64ArraySupport();\n* // returns \n*/\nfunction hasFloat64ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalFloat64Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = new GlobalFloat64Array( [ 1.0, 3.14, -3.14, NaN ] );\n\t\tbool = (\n\t\t\tisFloat64Array( arr ) &&\n\t\t\tarr[ 0 ] === 1.0 &&\n\t\t\tarr[ 1 ] === 3.14 &&\n\t\t\tarr[ 2 ] === -3.14 &&\n\t\t\tarr[ 3 ] !== arr[ 3 ]\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasFloat64ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of double-precision floating-point numbers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasFloat32Array = ( typeof Float32Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Float32Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a Float32Array\n*\n* @example\n* var bool = isFloat32Array( new Float32Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isFloat32Array( [] );\n* // returns false\n*/\nfunction isFloat32Array( value ) {\n\treturn (\n\t\t( hasFloat32Array && value instanceof Float32Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Float32Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isFloat32Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Float32Array === 'function' ) ? Float32Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Float32Array === 'function' ) ? Float32Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of single-precision floating-point numbers in the platform byte order.\n*\n* @module @stdlib/array-float32\n*\n* @example\n* import ctor from '@stdlib/array-float32';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasFloat32ArraySupport from '@stdlib/assert-has-float32array-support';\nimport builtin from './float32array.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasFloat32ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isFloat32Array from '@stdlib/assert-is-float32array';\nimport PINF from '@stdlib/constants-float64-pinf';\nimport GlobalFloat32Array from './float32array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Float32Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Float32Array` support\n*\n* @example\n* var bool = hasFloat32ArraySupport();\n* // returns \n*/\nfunction hasFloat32ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalFloat32Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = new GlobalFloat32Array( [ 1.0, 3.14, -3.14, 5.0e40 ] );\n\t\tbool = (\n\t\t\tisFloat32Array( arr ) &&\n\t\t\tarr[ 0 ] === 1.0 &&\n\t\t\tarr[ 1 ] === 3.140000104904175 &&\n\t\t\tarr[ 2 ] === -3.140000104904175 &&\n\t\t\tarr[ 3 ] === PINF\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasFloat32ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of single-precision floating-point numbers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasInt16Array = ( typeof Int16Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is an Int16Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an Int16Array\n*\n* @example\n* var bool = isInt16Array( new Int16Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isInt16Array( [] );\n* // returns false\n*/\nfunction isInt16Array( value ) {\n\treturn (\n\t\t( hasInt16Array && value instanceof Int16Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Int16Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isInt16Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum signed 16-bit integer.\n*\n* @module @stdlib/constants-int16-max\n* @type {integer32}\n*\n* @example\n* import INT16_MAX from '@stdlib/constants-int16-max';\n* // returns 32767\n*/\n\n\n// MAIN //\n\n/**\n* Maximum signed 16-bit integer.\n*\n* ## Notes\n*\n* The number has the value\n*\n* ```tex\n* 2^{15} - 1\n* ```\n*\n* which corresponds to the bit sequence\n*\n* ```binarystring\n* 0111111111111111\n* ```\n*\n* @constant\n* @type {integer32}\n* @default 32767\n*/\nvar INT16_MAX = 32767|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default INT16_MAX;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Int16Array === 'function' ) ? Int16Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Int16Array === 'function' ) ? Int16Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of twos-complement 16-bit signed integers in the platform byte order.\n*\n* @module @stdlib/array-int16\n*\n* @example\n* import ctor from '@stdlib/array-int16';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasInt16ArraySupport from '@stdlib/assert-has-int16array-support';\nimport builtin from './int16array.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasInt16ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isInt16Array from '@stdlib/assert-is-int16array';\nimport INT16_MAX from '@stdlib/constants-int16-max';\nimport INT16_MIN from '@stdlib/constants-int16-min';\nimport GlobalInt16Array from './int16array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Int16Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Int16Array` support\n*\n* @example\n* var bool = hasInt16ArraySupport();\n* // returns \n*/\nfunction hasInt16ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalInt16Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = new GlobalInt16Array( [ 1, 3.14, -3.14, INT16_MAX+1 ] );\n\t\tbool = (\n\t\t\tisInt16Array( arr ) &&\n\t\t\tarr[ 0 ] === 1 &&\n\t\t\tarr[ 1 ] === 3 && // truncation\n\t\t\tarr[ 2 ] === -3 && // truncation\n\t\t\tarr[ 3 ] === INT16_MIN // wrap around\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasInt16ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Minimum signed 16-bit integer.\n*\n* @module @stdlib/constants-int16-min\n* @type {integer32}\n*\n* @example\n* import INT16_MIN from '@stdlib/constants-int16-min';\n* // returns -32768\n*/\n\n\n// MAIN //\n\n/**\n* Minimum signed 16-bit integer.\n*\n* ## Notes\n*\n* The number has the value\n*\n* ```tex\n* -(2^{15})\n* ```\n*\n* which corresponds to the two's complement bit sequence\n*\n* ```binarystring\n* 1000000000000000\n* ```\n*\n* @constant\n* @type {integer32}\n* @default -32768\n*/\nvar INT16_MIN = -32768|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default INT16_MIN;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of twos-complement 16-bit signed integers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasInt32Array = ( typeof Int32Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is an Int32Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an Int32Array\n*\n* @example\n* var bool = isInt32Array( new Int32Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isInt32Array( [] );\n* // returns false\n*/\nfunction isInt32Array( value ) {\n\treturn (\n\t\t( hasInt32Array && value instanceof Int32Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Int32Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isInt32Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum signed 32-bit integer.\n*\n* @module @stdlib/constants-int32-max\n* @type {integer32}\n*\n* @example\n* import INT32_MAX from '@stdlib/constants-int32-max';\n* // returns 2147483647\n*/\n\n\n// MAIN //\n\n/**\n* Maximum signed 32-bit integer.\n*\n* ## Notes\n*\n* The number has the value\n*\n* ```tex\n* 2^{31} - 1\n* ```\n*\n* which corresponds to the bit sequence\n*\n* ```binarystring\n* 01111111111111111111111111111111\n* ```\n*\n* @constant\n* @type {integer32}\n* @default 2147483647\n*/\nvar INT32_MAX = 2147483647|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default INT32_MAX;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Int32Array === 'function' ) ? Int32Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Int32Array === 'function' ) ? Int32Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of twos-complement 32-bit signed integers in the platform byte order.\n*\n* @module @stdlib/array-int32\n*\n* @example\n* import ctor from '@stdlib/array-int32';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasInt32ArraySupport from '@stdlib/assert-has-int32array-support';\nimport builtin from './int32array.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasInt32ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isInt32Array from '@stdlib/assert-is-int32array';\nimport INT32_MAX from '@stdlib/constants-int32-max';\nimport INT32_MIN from '@stdlib/constants-int32-min';\nimport GlobalInt32Array from './int32array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Int32Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Int32Array` support\n*\n* @example\n* var bool = hasInt32ArraySupport();\n* // returns \n*/\nfunction hasInt32ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalInt32Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = new GlobalInt32Array( [ 1, 3.14, -3.14, INT32_MAX+1 ] );\n\t\tbool = (\n\t\t\tisInt32Array( arr ) &&\n\t\t\tarr[ 0 ] === 1 &&\n\t\t\tarr[ 1 ] === 3 && // truncation\n\t\t\tarr[ 2 ] === -3 && // truncation\n\t\t\tarr[ 3 ] === INT32_MIN // wrap around\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasInt32ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Minimum signed 32-bit integer.\n*\n* @module @stdlib/constants-int32-min\n* @type {integer32}\n*\n* @example\n* import INT32_MIN from '@stdlib/constants-int32-min';\n* // returns -2147483648\n*/\n\n\n// MAIN //\n\n/**\n* Minimum signed 32-bit integer.\n*\n* ## Notes\n*\n* The number has the value\n*\n* ```tex\n* -(2^{31})\n* ```\n*\n* which corresponds to the two's complement bit sequence\n*\n* ```binarystring\n* 10000000000000000000000000000000\n* ```\n*\n* @constant\n* @type {integer32}\n* @default -2147483648\n*/\nvar INT32_MIN = -2147483648|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default INT32_MIN;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of twos-complement 32-bit signed integers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasInt8Array = ( typeof Int8Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is an Int8Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an Int8Array\n*\n* @example\n* var bool = isInt8Array( new Int8Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isInt8Array( [] );\n* // returns false\n*/\nfunction isInt8Array( value ) {\n\treturn (\n\t\t( hasInt8Array && value instanceof Int8Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Int8Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isInt8Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum signed 8-bit integer.\n*\n* @module @stdlib/constants-int8-max\n* @type {integer32}\n*\n* @example\n* import INT8_MAX from '@stdlib/constants-int8-max';\n* // returns 127\n*/\n\n\n// MAIN //\n\n/**\n* Maximum signed 8-bit integer.\n*\n* ## Notes\n*\n* The number is given by\n*\n* ```tex\n* 2^{7} - 1\n* ```\n*\n* which corresponds to the bit sequence\n*\n* ```binarystring\n* 01111111\n* ```\n*\n* @constant\n* @type {integer32}\n* @default 127\n*/\nvar INT8_MAX = 127|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default INT8_MAX;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Int8Array === 'function' ) ? Int8Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Int8Array === 'function' ) ? Int8Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of twos-complement 8-bit signed integers in the platform byte order.\n*\n* @module @stdlib/array-int8\n*\n* @example\n* import ctor from '@stdlib/array-int8';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasInt8ArraySupport from '@stdlib/assert-has-int8array-support';\nimport builtin from './int8array.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasInt8ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isInt8Array from '@stdlib/assert-is-int8array';\nimport INT8_MAX from '@stdlib/constants-int8-max';\nimport INT8_MIN from '@stdlib/constants-int8-min';\nimport GlobalInt8Array from './int8array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Int8Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Int8Array` support\n*\n* @example\n* var bool = hasInt8ArraySupport();\n* // returns \n*/\nfunction hasInt8ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalInt8Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = new GlobalInt8Array( [ 1, 3.14, -3.14, INT8_MAX+1 ] );\n\t\tbool = (\n\t\t\tisInt8Array( arr ) &&\n\t\t\tarr[ 0 ] === 1 &&\n\t\t\tarr[ 1 ] === 3 && // truncation\n\t\t\tarr[ 2 ] === -3 && // truncation\n\t\t\tarr[ 3 ] === INT8_MIN // wrap around\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasInt8ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Minimum signed 8-bit integer.\n*\n* @module @stdlib/constants-int8-min\n* @type {integer32}\n*\n* @example\n* import INT8_MIN from '@stdlib/constants-int8-min';\n* // returns -128\n*/\n\n\n// MAIN //\n\n/**\n* Minimum signed 8-bit integer.\n*\n* ## Notes\n*\n* The number is given by\n*\n* ```tex\n* -(2^{7})\n* ```\n*\n* which corresponds to the two's complement bit sequence\n*\n* ```binarystring\n* 10000000\n* ```\n*\n* @constant\n* @type {integer32}\n* @default -128\n*/\nvar INT8_MIN = -128|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default INT8_MIN;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of twos-complement 8-bit signed integers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasUint16Array = ( typeof Uint16Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Uint16Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a Uint16Array\n*\n* @example\n* var bool = isUint16Array( new Uint16Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isUint16Array( [] );\n* // returns false\n*/\nfunction isUint16Array( value ) {\n\treturn (\n\t\t( hasUint16Array && value instanceof Uint16Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Uint16Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isUint16Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum unsigned 16-bit integer.\n*\n* @module @stdlib/constants-uint16-max\n* @type {integer32}\n*\n* @example\n* import UINT16_MAX from '@stdlib/constants-uint16-max';\n* // returns 65535\n*/\n\n\n// MAIN //\n\n/**\n* Maximum unsigned 16-bit integer.\n*\n* ## Notes\n*\n* The number has the value\n*\n* ```tex\n* 2^{16} - 1\n* ```\n*\n* which corresponds to the bit sequence\n*\n* ```binarystring\n* 1111111111111111\n* ```\n*\n* @constant\n* @type {integer32}\n* @default 65535\n*/\nvar UINT16_MAX = 65535|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default UINT16_MAX;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Uint16Array === 'function' ) ? Uint16Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Uint16Array === 'function' ) ? Uint16Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of 16-bit unsigned integers in the platform byte order.\n*\n* @module @stdlib/array-uint16\n*\n* @example\n* import ctor from '@stdlib/array-uint16';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasUint16ArraySupport from '@stdlib/assert-has-uint16array-support';\nimport builtin from './uint16array.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasUint16ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isUint16Array from '@stdlib/assert-is-uint16array';\nimport UINT16_MAX from '@stdlib/constants-uint16-max';\nimport GlobalUint16Array from './uint16array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Uint16Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Uint16Array` support\n*\n* @example\n* var bool = hasUint16ArraySupport();\n* // returns \n*/\nfunction hasUint16ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalUint16Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = [ 1, 3.14, -3.14, UINT16_MAX+1, UINT16_MAX+2 ];\n\t\tarr = new GlobalUint16Array( arr );\n\t\tbool = (\n\t\t\tisUint16Array( arr ) &&\n\t\t\tarr[ 0 ] === 1 &&\n\t\t\tarr[ 1 ] === 3 && // truncation\n\t\t\tarr[ 2 ] === UINT16_MAX-2 && // truncation and wrap around\n\t\t\tarr[ 3 ] === 0 && // wrap around\n\t\t\tarr[ 4 ] === 1 // wrap around\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasUint16ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of 16-bit unsigned integers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasUint32Array = ( typeof Uint32Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Uint32Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a Uint32Array\n*\n* @example\n* var bool = isUint32Array( new Uint32Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isUint32Array( [] );\n* // returns false\n*/\nfunction isUint32Array( value ) {\n\treturn (\n\t\t( hasUint32Array && value instanceof Uint32Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Uint32Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isUint32Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum unsigned 32-bit integer.\n*\n* @module @stdlib/constants-uint32-max\n* @type {uinteger32}\n*\n* @example\n* import UINT32_MAX from '@stdlib/constants-uint32-max';\n* // returns 4294967295\n*/\n\n\n// MAIN //\n\n/**\n* Maximum unsigned 32-bit integer.\n*\n* ## Notes\n*\n* The number has the value\n*\n* ```tex\n* 2^{32} - 1\n* ```\n*\n* which corresponds to the bit sequence\n*\n* ```binarystring\n* 11111111111111111111111111111111\n* ```\n*\n* @constant\n* @type {uinteger32}\n* @default 4294967295\n*/\nvar UINT32_MAX = 4294967295;\n\n\n// EXPORTS //\n\nexport default UINT32_MAX;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Uint32Array === 'function' ) ? Uint32Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Uint32Array === 'function' ) ? Uint32Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of 32-bit unsigned integers in the platform byte order.\n*\n* @module @stdlib/array-uint32\n*\n* @example\n* import ctor from '@stdlib/array-uint32';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasUint32ArraySupport from '@stdlib/assert-has-uint32array-support';\nimport builtin from './uint32array.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasUint32ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isUint32Array from '@stdlib/assert-is-uint32array';\nimport UINT32_MAX from '@stdlib/constants-uint32-max';\nimport GlobalUint32Array from './uint32array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Uint32Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Uint32Array` support\n*\n* @example\n* var bool = hasUint32ArraySupport();\n* // returns \n*/\nfunction hasUint32ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalUint32Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = [ 1, 3.14, -3.14, UINT32_MAX+1, UINT32_MAX+2 ];\n\t\tarr = new GlobalUint32Array( arr );\n\t\tbool = (\n\t\t\tisUint32Array( arr ) &&\n\t\t\tarr[ 0 ] === 1 &&\n\t\t\tarr[ 1 ] === 3 && // truncation\n\t\t\tarr[ 2 ] === UINT32_MAX-2 && // truncation and wrap around\n\t\t\tarr[ 3 ] === 0 && // wrap around\n\t\t\tarr[ 4 ] === 1 // wrap around\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasUint32ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of 32-bit unsigned integers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasUint8Array = ( typeof Uint8Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Uint8Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a Uint8Array\n*\n* @example\n* var bool = isUint8Array( new Uint8Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isUint8Array( [] );\n* // returns false\n*/\nfunction isUint8Array( value ) {\n\treturn (\n\t\t( hasUint8Array && value instanceof Uint8Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Uint8Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isUint8Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum unsigned 8-bit integer.\n*\n* @module @stdlib/constants-uint8-max\n* @type {integer32}\n*\n* @example\n* import UINT8_MAX from '@stdlib/constants-uint8-max';\n* // returns 255\n*/\n\n\n// MAIN //\n\n/**\n* Maximum unsigned 8-bit integer.\n*\n* ## Notes\n*\n* The number has the value\n*\n* ```tex\n* 2^{8} - 1\n* ```\n*\n* which corresponds to the bit sequence\n*\n* ```binarystring\n* 11111111\n* ```\n*\n* @constant\n* @type {integer32}\n* @default 255\n*/\nvar UINT8_MAX = 255|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default UINT8_MAX;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Uint8Array === 'function' ) ? Uint8Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Uint8Array === 'function' ) ? Uint8Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of 8-bit unsigned integers in the platform byte order.\n*\n* @module @stdlib/array-uint8\n*\n* @example\n* import ctor from '@stdlib/array-uint8';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasUint8ArraySupport from '@stdlib/assert-has-uint8array-support';\nimport builtin from './uint8array.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasUint8ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isUint8Array from '@stdlib/assert-is-uint8array';\nimport UINT8_MAX from '@stdlib/constants-uint8-max';\nimport GlobalUint8Array from './uint8array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Uint8Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Uint8Array` support\n*\n* @example\n* var bool = hasUint8ArraySupport();\n* // returns \n*/\nfunction hasUint8ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalUint8Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = [ 1, 3.14, -3.14, UINT8_MAX+1, UINT8_MAX+2 ];\n\t\tarr = new GlobalUint8Array( arr );\n\t\tbool = (\n\t\t\tisUint8Array( arr ) &&\n\t\t\tarr[ 0 ] === 1 &&\n\t\t\tarr[ 1 ] === 3 && // truncation\n\t\t\tarr[ 2 ] === UINT8_MAX-2 && // truncation and wrap around\n\t\t\tarr[ 3 ] === 0 && // wrap around\n\t\t\tarr[ 4 ] === 1 // wrap around\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasUint8ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of 8-bit unsigned integers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasUint8ClampedArray = ( typeof Uint8ClampedArray === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Uint8ClampedArray.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a Uint8ClampedArray\n*\n* @example\n* var bool = isUint8ClampedArray( new Uint8ClampedArray( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isUint8ClampedArray( [] );\n* // returns false\n*/\nfunction isUint8ClampedArray( value ) {\n\treturn (\n\t\t( hasUint8ClampedArray && value instanceof Uint8ClampedArray ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Uint8ClampedArray]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isUint8ClampedArray;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Uint8ClampedArray === 'function' ) ? Uint8ClampedArray : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Uint8ClampedArray === 'function' ) ? Uint8ClampedArray : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of 8-bit unsigned integers in the platform byte order clamped to 0-255.\n*\n* @module @stdlib/array-uint8c\n*\n* @example\n* import ctor from '@stdlib/array-uint8c';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasUint8ClampedArraySupport from '@stdlib/assert-has-uint8clampedarray-support'; // eslint-disable-line id-length\nimport builtin from './uint8clampedarray.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasUint8ClampedArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isUint8ClampedArray from '@stdlib/assert-is-uint8clampedarray';\nimport GlobalUint8ClampedArray from './uint8clampedarray.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Uint8ClampedArray` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Uint8ClampedArray` support\n*\n* @example\n* var bool = hasUint8ClampedArraySupport();\n* // returns \n*/\nfunction hasUint8ClampedArraySupport() { // eslint-disable-line id-length\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalUint8ClampedArray !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = new GlobalUint8ClampedArray( [ -1, 0, 1, 3.14, 4.99, 255, 256 ] );\n\t\tbool = (\n\t\t\tisUint8ClampedArray( arr ) &&\n\t\t\tarr[ 0 ] === 0 && // clamped\n\t\t\tarr[ 1 ] === 0 &&\n\t\t\tarr[ 2 ] === 1 &&\n\t\t\tarr[ 3 ] === 3 && // round to nearest\n\t\t\tarr[ 4 ] === 5 && // round to nearest\n\t\t\tarr[ 5 ] === 255 &&\n\t\t\tarr[ 6 ] === 255 // clamped\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasUint8ClampedArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of 8-bit unsigned integers in the platform byte order clamped to 0-255.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isInteger from '@stdlib/math-base-assert-is-integer';\nimport MAX_LENGTH from '@stdlib/constants-array-max-array-length';\n\n\n// MAIN //\n\n/**\n* Tests if a value is an array-like object.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is an array-like object\n*\n* @example\n* var bool = isArrayLikeObject( [] );\n* // returns true\n*\n* @example\n* var bool = isArrayLikeObject( { 'length':10 } );\n* // returns true\n*\n* @example\n* var bool = isArrayLikeObject( 'beep' );\n* // returns false\n*/\nfunction isArrayLikeObject( value ) {\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\ttypeof value.length === 'number' &&\n\t\tisInteger( value.length ) &&\n\t\tvalue.length >= 0 &&\n\t\tvalue.length <= MAX_LENGTH\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isArrayLikeObject;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum length of a generic array.\n*\n* @module @stdlib/constants-array-max-array-length\n*\n* @example\n* import MAX_ARRAY_LENGTH from '@stdlib/constants-array-max-array-length';\n* // returns 4294967295\n*/\n\n// MAIN //\n\n/**\n* Maximum length of a generic array.\n*\n* ```tex\n* 2^{32} - 1\n* ```\n*\n* @constant\n* @type {uinteger32}\n* @default 4294967295\n*/\nvar MAX_ARRAY_LENGTH = 4294967295>>>0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default MAX_ARRAY_LENGTH;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isInteger from '@stdlib/math-base-assert-is-integer';\nimport MAX_LENGTH from '@stdlib/constants-array-max-typed-array-length';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a collection.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether a value is a collection\n*\n* @example\n* var bool = isCollection( [] );\n* // returns true\n*\n* @example\n* var bool = isCollection( {} );\n* // returns false\n*/\nfunction isCollection( value ) {\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\ttypeof value.length === 'number' &&\n\t\tisInteger( value.length ) &&\n\t\tvalue.length >= 0 &&\n\t\tvalue.length <= MAX_LENGTH\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isCollection;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum length of a typed array.\n*\n* @module @stdlib/constants-array-max-typed-array-length\n*\n* @example\n* import MAX_TYPED_ARRAY_LENGTH from '@stdlib/constants-array-max-typed-array-length';\n* // returns 9007199254740991\n*/\n\n// MAIN //\n\n/**\n* Maximum length of a typed array.\n*\n* ```tex\n* 2^{53} - 1\n* ```\n*\n* @constant\n* @type {number}\n* @default 9007199254740991\n*/\nvar MAX_TYPED_ARRAY_LENGTH = 9007199254740991;\n\n\n// EXPORTS //\n\nexport default MAX_TYPED_ARRAY_LENGTH;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasArrayBuffer = ( typeof ArrayBuffer === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is an ArrayBuffer.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an ArrayBuffer\n*\n* @example\n* import ArrayBuffer from '@stdlib/array-buffer';\n*\n* var bool = isArrayBuffer( new ArrayBuffer( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isArrayBuffer( [] );\n* // returns false\n*/\nfunction isArrayBuffer( value ) {\n\treturn (\n\t\t( hasArrayBuffer && value instanceof ArrayBuffer ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object ArrayBuffer]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isArrayBuffer;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar f;\n\n\n// FUNCTIONS //\n\n/**\n* Tests if a value is an array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an array\n*\n* @example\n* var bool = isArray( [] );\n* // returns true\n*\n* @example\n* var bool = isArray( {} );\n* // returns false\n*/\nfunction isArray( value ) {\n\treturn ( nativeClass( value ) === '[object Array]' );\n}\n\n\n// MAIN //\n\nif ( Array.isArray ) {\n\tf = Array.isArray;\n} else {\n\tf = isArray;\n}\n\n\n// EXPORTS //\n\nexport default f;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isArray from '@stdlib/assert-is-array';\n\n\n// MAIN //\n\n/**\n* Tests if a value is an object; e.g., `{}`.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an object\n*\n* @example\n* var bool = isObject( {} );\n* // returns true\n*\n* @example\n* var bool = isObject( null );\n* // returns false\n*/\nfunction isObject( value ) {\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\t!isArray( value )\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isObject;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\nvar RE = /./;\n\n\n// EXPORTS //\n\nexport default RE;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Tests if a value is a boolean primitive.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a boolean primitive\n*\n* @example\n* var bool = isBoolean( true );\n* // returns true\n*\n* @example\n* var bool = isBoolean( false );\n* // returns true\n*\n* @example\n* var bool = isBoolean( new Boolean( true ) );\n* // returns false\n*/\nfunction isBoolean( value ) {\n\treturn ( typeof value === 'boolean' );\n}\n\n\n// EXPORTS //\n\nexport default isBoolean;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// eslint-disable-next-line stdlib/no-redeclare\nvar toString = Boolean.prototype.toString; // non-generic\n\n\n// EXPORTS //\n\nexport default toString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport hasToStringTag from '@stdlib/assert-has-tostringtag-support';\nimport nativeClass from '@stdlib/utils-native-class';\nimport test from './try2serialize.js';\n\n\n// VARIABLES //\n\nvar FLG = hasToStringTag();\n\n\n// MAIN //\n\n/**\n* Tests if a value is a boolean object.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a boolean object\n*\n* @example\n* var bool = isBoolean( true );\n* // returns false\n*\n* @example\n* var bool = isBoolean( new Boolean( false ) );\n* // returns true\n*/\nfunction isBoolean( value ) {\n\tif ( typeof value === 'object' ) {\n\t\tif ( value instanceof Boolean ) {\n\t\t\treturn true;\n\t\t}\n\t\tif ( FLG ) {\n\t\t\treturn test( value );\n\t\t}\n\t\treturn ( nativeClass( value ) === '[object Boolean]' );\n\t}\n\treturn false;\n}\n\n\n// EXPORTS //\n\nexport default isBoolean;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport toString from './tostring.js'; // eslint-disable-line stdlib/no-redeclare\n\n\n// MAIN //\n\n/**\n* Attempts to serialize a value to a string.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value can be serialized\n*/\nfunction test( value ) {\n\ttry {\n\t\ttoString.call( value );\n\t\treturn true;\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\treturn false;\n\t}\n}\n\n\n// EXPORTS //\n\nexport default test;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a boolean.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a boolean\n*\n* @example\n* var bool = isBoolean( false );\n* // returns true\n*\n* @example\n* var bool = isBoolean( true );\n* // returns true\n*\n* @example\n* var bool = isBoolean( new Boolean( false ) );\n* // returns true\n*\n* @example\n* var bool = isBoolean( new Boolean( true ) );\n* // returns true\n*/\nfunction isBoolean( value ) {\n\treturn ( isPrimitive( value ) || isObject( value ) );\n}\n\n\n// EXPORTS //\n\nexport default isBoolean;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Returns the global object using code generation.\n*\n* @private\n* @returns {Object} global object\n*/\nfunction getGlobal() {\n\treturn new Function( 'return this;' )(); // eslint-disable-line no-new-func\n}\n\n\n// EXPORTS //\n\nexport default getGlobal;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test if a value is a boolean.\n*\n* @module @stdlib/assert-is-boolean\n*\n* @example\n* import isBoolean from '@stdlib/assert-is-boolean';\n*\n* var bool = isBoolean( false );\n* // returns true\n*\n* bool = isBoolean( new Boolean( false ) );\n* // returns true\n*\n* @example\n* // Use interface to check for boolean primitives...\n* import { isPrimitive as isBoolean } from '@stdlib/assert-is-boolean';\n*\n* var bool = isBoolean( false );\n* // returns true\n*\n* bool = isBoolean( new Boolean( true ) );\n* // returns false\n*\n* @example\n* // Use interface to check for boolean objects...\n* import { isObject as isBoolean } from '@stdlib/assert-is-boolean';\n*\n* var bool = isBoolean( true );\n* // returns false\n*\n* bool = isBoolean( new Boolean( false ) );\n* // returns true\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport isBoolean from './main.js';\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\nsetReadOnly( isBoolean, 'isPrimitive', isPrimitive );\nsetReadOnly( isBoolean, 'isObject', isObject );\n\n\n// EXPORTS //\n\nexport default isBoolean;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar obj = ( typeof self === 'object' ) ? self : null;\n\n\n// EXPORTS //\n\nexport default obj;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar obj = ( typeof window === 'object' ) ? window : null;\n\n\n// EXPORTS //\n\nexport default obj;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar obj = ( typeof global === 'object' ) ? global : null;\n\n\n// EXPORTS //\n\nexport default obj;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport getGlobal from '@stdlib/utils-global';\n\n\n// MAIN //\n\nvar root = getGlobal();\nvar nodeList = root.document && root.document.childNodes;\n\n\n// EXPORTS //\n\nexport default nodeList;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isBoolean } from '@stdlib/assert-is-boolean';\nimport getThis from './codegen.js';\nimport Self from './self.js';\nimport Win from './window.js';\nimport Global from './global.js';\n\n\n// MAIN //\n\n/**\n* Returns the global object.\n*\n* ## Notes\n*\n* - Using code generation is the **most** reliable way to resolve the global object; however, doing so is likely to violate content security policies (CSPs) in, e.g., Chrome Apps and elsewhere.\n*\n* @param {boolean} [codegen=false] - boolean indicating whether to use code generation to resolve the global object\n* @throws {TypeError} must provide a boolean\n* @throws {Error} unable to resolve global object\n* @returns {Object} global object\n*\n* @example\n* var g = getGlobal();\n* // returns {...}\n*/\nfunction getGlobal( codegen ) {\n\tif ( arguments.length ) {\n\t\tif ( !isBoolean( codegen ) ) {\n\t\t\tthrow new TypeError( 'invalid argument. Must provide a boolean primitive. Value: `'+codegen+'`.' );\n\t\t}\n\t\tif ( codegen ) {\n\t\t\treturn getThis();\n\t\t}\n\t\t// Fall through...\n\t}\n\t// Case: browsers and web workers\n\tif ( Self ) {\n\t\treturn Self;\n\t}\n\t// Case: browsers\n\tif ( Win ) {\n\t\treturn Win;\n\t}\n\t// Case: Node.js\n\tif ( Global ) {\n\t\treturn Global;\n\t}\n\t// Case: unknown\n\tthrow new Error( 'unexpected error. Unable to resolve global object.' );\n}\n\n\n// EXPORTS //\n\nexport default getGlobal;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\nvar typedarray = Int8Array; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default typedarray;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Returns a regular expression to capture everything that is not a space immediately after the `function` keyword and before the first left parenthesis.\n*\n* @returns {RegExp} regular expression\n*\n* @example\n* var RE_FUNCTION_NAME = reFunctionName();\n*\n* function fname( fcn ) {\n* return RE_FUNCTION_NAME.exec( fcn.toString() )[ 1 ];\n* }\n*\n* var fn = fname( Math.sqrt );\n* // returns 'sqrt'\n*\n* fn = fname( Int8Array );\n* // returns 'Int8Array'\n*\n* fn = fname( Object.prototype.toString );\n* // returns 'toString'\n*\n* fn = fname( function(){} );\n* // returns ''\n*/\nfunction reFunctionName() {\n\treturn /^\\s*function\\s*([^(]*)/i;\n}\n\n\n// EXPORTS //\n\nexport default reFunctionName;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport reFunctionName from './main.js';\n\n\n// MAIN //\n\n/**\n* Captures everything that is not a space immediately after the `function` keyword and before the first left parenthesis.\n*\n* Regular expression: `/^\\s*function\\s*([^(]*)/i`\n*\n* - `/^\\s*`\n* - Match zero or more spaces at beginning\n*\n* - `function`\n* - Match the word `function`\n*\n* - `\\s*`\n* - Match zero or more spaces after the word `function`\n*\n* - `()`\n* - Capture\n*\n* - `[^(]*`\n* - Match anything except a left parenthesis `(` zero or more times\n*\n* - `/i`\n* - ignore case\n*\n* @constant\n* @type {RegExp}\n* @default /^\\s*function\\s*([^(]*)/i\n*/\nvar RE_FUNCTION_NAME = reFunctionName();\n\n\n// EXPORTS //\n\nexport default RE_FUNCTION_NAME;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Tests if a value is object-like.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether a value is object-like\n*\n* @example\n* var bool = isObjectLike( {} );\n* // returns true\n*\n* @example\n* var bool = isObjectLike( [] );\n* // returns true\n*\n* @example\n* var bool = isObjectLike( null );\n* // returns false\n*/\nfunction isObjectLike( value ) {\n\treturn (\n\t\tvalue !== null &&\n\t\ttypeof value === 'object'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isObjectLike;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\nimport { REGEXP as RE } from '@stdlib/regexp-function-name';\nimport isBuffer from '@stdlib/assert-is-buffer';\n\n\n// MAIN //\n\n/**\n* Determines the name of a value's constructor.\n*\n* @param {*} v - input value\n* @returns {string} name of a value's constructor\n*\n* @example\n* var v = constructorName( 'a' );\n* // returns 'String'\n*\n* @example\n* var v = constructorName( 5 );\n* // returns 'Number'\n*\n* @example\n* var v = constructorName( null );\n* // returns 'Null'\n*\n* @example\n* var v = constructorName( undefined );\n* // returns 'Undefined'\n*\n* @example\n* var v = constructorName( function noop() {} );\n* // returns 'Function'\n*/\nfunction constructorName( v ) {\n\tvar match;\n\tvar name;\n\tvar ctor;\n\tname = nativeClass( v ).slice( 8, -1 );\n\tif ( (name === 'Object' || name === 'Error') && v.constructor ) {\n\t\tctor = v.constructor;\n\t\tif ( typeof ctor.name === 'string' ) {\n\t\t\treturn ctor.name;\n\t\t}\n\t\tmatch = RE.exec( ctor.toString() );\n\t\tif ( match ) {\n\t\t\treturn match[ 1 ];\n\t\t}\n\t}\n\tif ( isBuffer( v ) ) {\n\t\treturn 'Buffer';\n\t}\n\treturn name;\n}\n\n\n// EXPORTS //\n\nexport default constructorName;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isObjectLike from '@stdlib/assert-is-object-like';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Buffer instance.\n*\n* @param {*} value - value to validate\n* @returns {boolean} boolean indicating if a value is a Buffer instance\n*\n* @example\n* var v = isBuffer( new Buffer( 'beep' ) );\n* // returns true\n*\n* @example\n* var v = isBuffer( new Buffer( [1,2,3,4] ) );\n* // returns true\n*\n* @example\n* var v = isBuffer( {} );\n* // returns false\n*\n* @example\n* var v = isBuffer( [] );\n* // returns false\n*/\nfunction isBuffer( value ) {\n\treturn (\n\t\tisObjectLike( value ) &&\n\t\t(\n\t\t\t// eslint-disable-next-line no-underscore-dangle\n\t\t\tvalue._isBuffer || // for envs missing Object.prototype.constructor (e.g., Safari 5-7)\n\t\t\t(\n\t\t\t\tvalue.constructor &&\n\n\t\t\t\t// WARNING: `typeof` is not a foolproof check, as certain envs consider RegExp and NodeList instances to be functions\n\t\t\t\ttypeof value.constructor.isBuffer === 'function' &&\n\t\t\t\tvalue.constructor.isBuffer( value )\n\t\t\t)\n\t\t)\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isBuffer;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Regular expression to capture everything that is not a space immediately after the `function` keyword and before the first left parenthesis.\n*\n* @module @stdlib/regexp-function-name\n*\n* @example\n* import reFunctionName from '@stdlib/regexp-function-name';\n* var RE_FUNCTION_NAME = reFunctionName();\n*\n* function fname( fcn ) {\n* return RE_FUNCTION_NAME.exec( fcn.toString() )[ 1 ];\n* }\n*\n* var fn = fname( Math.sqrt );\n* // returns 'sqrt'\n*\n* fn = fname( Int8Array );\n* // returns 'Int8Array'\n*\n* fn = fname( Object.prototype.toString );\n* // returns 'toString'\n*\n* fn = fname( function(){} );\n* // returns ''\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport reFunctionName from './main.js';\nimport REGEXP from './regexp.js';\n\n\n// MAIN //\n\nsetReadOnly( reFunctionName, 'REGEXP', REGEXP );\n\n\n// EXPORTS //\n\nexport default reFunctionName;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test if a value is object-like.\n*\n* @module @stdlib/assert-is-object-like\n*\n* @example\n* import isObjectLike from '@stdlib/assert-is-object-like';\n*\n* var bool = isObjectLike( {} );\n* // returns true\n*\n* bool = isObjectLike( [] );\n* // returns true\n*\n* bool = isObjectLike( null );\n* // returns false\n*\n* @example\n* import { isObjectLikeArray as isObjectLike } from '@stdlib/assert-is-object-like';\n*\n* var bool = isObjectLike( [ {}, [] ] );\n* // returns true\n*\n* bool = isObjectLike( [ {}, '3.0' ] );\n* // returns false\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport arrayfun from '@stdlib/assert-tools-array-function';\nimport isObjectLike from './main.js';\n\n\n// VARIABLES //\n\nvar isObjectLikeArray = arrayfun( isObjectLike );\n\n\n// MAIN //\n\nsetReadOnly( isObjectLike, 'isObjectLikeArray', isObjectLikeArray );\n\n\n// EXPORTS //\n\nexport default isObjectLike;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isArray from '@stdlib/assert-is-array';\n\n\n// MAIN //\n\n/**\n* Returns a function which tests if every element in an array passes a test condition.\n*\n* @param {Function} predicate - function to apply\n* @throws {TypeError} must provide a function\n* @returns {Function} an array function\n*\n* @example\n* import isOdd from '@stdlib/assert-is-odd';\n*\n* var arr1 = [ 1, 3, 5, 7 ];\n* var arr2 = [ 3, 5, 8 ];\n*\n* var validate = arrayfcn( isOdd );\n*\n* var bool = validate( arr1 );\n* // returns true\n*\n* bool = validate( arr2 );\n* // returns false\n*/\nfunction arrayfcn( predicate ) {\n\tif ( typeof predicate !== 'function' ) {\n\t\tthrow new TypeError( 'invalid argument. Must provide a function. Value: `' + predicate + '`.' );\n\t}\n\treturn every;\n\n\t/**\n\t* Tests if every element in an array passes a test condition.\n\t*\n\t* @private\n\t* @param {*} value - value to test\n\t* @returns {boolean} boolean indicating whether a value is an array for which all elements pass a test condition\n\t*/\n\tfunction every( value ) {\n\t\tvar len;\n\t\tvar i;\n\t\tif ( !isArray( value ) ) {\n\t\t\treturn false;\n\t\t}\n\t\tlen = value.length;\n\t\tif ( len === 0 ) {\n\t\t\treturn false;\n\t\t}\n\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\tif ( predicate( value[ i ] ) === false ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}\n}\n\n\n// EXPORTS //\n\nexport default arrayfcn;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Determine a value's type.\n*\n* @module @stdlib/utils-type-of\n*\n* @example\n* import typeOf from '@stdlib/utils-type-of';\n*\n* var str = typeOf( 'a' );\n* // returns 'string'\n*\n* str = typeOf( 5 );\n* // returns 'number'\n*/\n\n// MODULES //\n\nimport usePolyfill from './check.js';\nimport typeOf from './typeof.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar main = ( usePolyfill() ) ? polyfill : typeOf;\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport RE from './fixtures/re.js';\nimport nodeList from './fixtures/nodelist.js';\nimport typedarray from './fixtures/typedarray.js';\n\n\n// MAIN //\n\n/**\n* Checks whether a polyfill is needed when using the `typeof` operator.\n*\n* @private\n* @returns {boolean} boolean indicating whether a polyfill is needed\n*/\nfunction check() {\n\tif (\n\t\t// Chrome 1-12 returns 'function' for regular expression instances (see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/typeof):\n\t\ttypeof RE === 'function' ||\n\n\t\t// Safari 8 returns 'object' for typed array and weak map constructors (underscore #1929):\n\t\ttypeof typedarray === 'object' ||\n\n\t\t// PhantomJS 1.9 returns 'function' for `NodeList` instances (underscore #2236):\n\t\ttypeof nodeList === 'function'\n\t) {\n\t\treturn true;\n\t}\n\treturn false;\n}\n\n\n// EXPORTS //\n\nexport default check;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport ctorName from '@stdlib/utils-constructor-name';\n\n\n// MAIN //\n\n/**\n* Determines a value's type.\n*\n* @param {*} v - input value\n* @returns {string} string indicating the value's type\n*/\nfunction typeOf( v ) {\n\treturn ctorName( v ).toLowerCase();\n}\n\n\n// EXPORTS //\n\nexport default typeOf;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport ctorName from '@stdlib/utils-constructor-name';\n\n\n// NOTES //\n\n/*\n* Built-in `typeof` operator behavior:\n*\n* ```text\n* typeof null => 'object'\n* typeof undefined => 'undefined'\n* typeof 'a' => 'string'\n* typeof 5 => 'number'\n* typeof NaN => 'number'\n* typeof true => 'boolean'\n* typeof false => 'boolean'\n* typeof {} => 'object'\n* typeof [] => 'object'\n* typeof function foo(){} => 'function'\n* typeof function* foo(){} => 'object'\n* typeof Symbol() => 'symbol'\n* ```\n*\n*/\n\n\n// MAIN //\n\n/**\n* Determines a value's type.\n*\n* @param {*} v - input value\n* @returns {string} string indicating the value's type\n*/\nfunction typeOf( v ) {\n\tvar type;\n\n\t// Address `typeof null` => `object` (see http://wiki.ecmascript.org/doku.php?id=harmony:typeof_null):\n\tif ( v === null ) {\n\t\treturn 'null';\n\t}\n\ttype = typeof v;\n\n\t// If the `typeof` operator returned something other than `object`, we are done. Otherwise, we need to check for an internal class name or search for a constructor.\n\tif ( type === 'object' ) {\n\t\treturn ctorName( v ).toLowerCase();\n\t}\n\treturn type;\n}\n\n\n// EXPORTS //\n\nexport default typeOf;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport typeOf from '@stdlib/utils-type-of';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a function.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a function\n*\n* @example\n* function beep() {\n* return 'beep';\n* }\n*\n* var bool = isFunction( beep );\n* // returns true\n*/\nfunction isFunction( value ) {\n\t// Note: cannot use `typeof` directly, as various browser engines incorrectly return `'function'` when operating on non-function objects, such as regular expressions and NodeLists.\n\treturn ( typeOf( value ) === 'function' );\n}\n\n\n// EXPORTS //\n\nexport default isFunction;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isNumber } from '@stdlib/assert-is-number';\nimport defineProperty from '@stdlib/utils-define-property';\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport toStr from './tostring.js';\nimport toJSON from './tojson.js';\n\n\n// MAIN //\n\n/**\n* 128-bit complex number constructor.\n*\n* @constructor\n* @param {number} real - real component\n* @param {number} imag - imaginary component\n* @throws {TypeError} must invoke using the `new` keyword\n* @throws {TypeError} real component must be a number primitive\n* @throws {TypeError} imaginary component must be a number primitive\n* @returns {Complex128} 128-bit complex number\n*\n* @example\n* var z = new Complex128( 5.0, 3.0 );\n* // returns \n*/\nfunction Complex128( real, imag ) {\n\tif ( !( this instanceof Complex128 ) ) {\n\t\tthrow new TypeError( 'invalid invocation. Constructor must be called with the `new` keyword.' );\n\t}\n\tif ( !isNumber( real ) ) {\n\t\tthrow new TypeError( 'invalid argument. Real component must be a number primitive. Value: `'+real+'`.' );\n\t}\n\tif ( !isNumber( imag ) ) {\n\t\tthrow new TypeError( 'invalid argument. Imaginary component must be a number primitive. Value: `'+imag+'`.' );\n\t}\n\tdefineProperty( this, 're', {\n\t\t'configurable': false,\n\t\t'enumerable': true,\n\t\t'writable': false,\n\t\t'value': real\n\t});\n\tdefineProperty( this, 'im', {\n\t\t'configurable': false,\n\t\t'enumerable': true,\n\t\t'writable': false,\n\t\t'value': imag\n\t});\n\treturn this;\n}\n\n/**\n* Size (in bytes) of each component.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex128\n* @type {integer}\n* @returns {integer} size of each component\n*\n* @example\n* var nbytes = Complex128.BYTES_PER_ELEMENT;\n* // returns 8\n*/\nsetReadOnly( Complex128, 'BYTES_PER_ELEMENT', 8 );\n\n/**\n* Size (in bytes) of each component.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex128.prototype\n* @type {integer}\n* @returns {integer} size of each component\n*\n* @example\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var nbytes = z.BYTES_PER_ELEMENT;\n* // returns 8\n*/\nsetReadOnly( Complex128.prototype, 'BYTES_PER_ELEMENT', 8 );\n\n/**\n* Length (in bytes) of a complex number.\n*\n* @name byteLength\n* @memberof Complex128.prototype\n* @type {integer}\n* @returns {integer} byte length\n*\n* @example\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var nbytes = z.byteLength;\n* // returns 16\n*/\nsetReadOnly( Complex128.prototype, 'byteLength', 16 );\n\n/**\n* Serializes a complex number as a string.\n*\n* @name toString\n* @memberof Complex128.prototype\n* @type {Function}\n* @returns {string} serialized complex number\n*\n* @example\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var str = z.toString();\n* // returns '5 + 3i'\n*/\nsetReadOnly( Complex128.prototype, 'toString', toStr );\n\n/**\n* Serializes a complex number as a JSON object.\n*\n* ## Notes\n*\n* - `JSON.stringify()` implicitly calls this method when stringifying a `Complex128` instance.\n*\n*\n* @name toJSON\n* @memberof Complex128.prototype\n* @type {Function}\n* @returns {Object} serialized complex number\n*\n* @example\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var obj = z.toJSON();\n* // returns { 'type': 'Complex128', 're': 5.0, 'im': 3.0 }\n*/\nsetReadOnly( Complex128.prototype, 'toJSON', toJSON );\n\n\n// EXPORTS //\n\nexport default Complex128;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Serializes a complex number as a string.\n*\n* @private\n* @returns {string} serialized complex number\n*/\nfunction toString() { // eslint-disable-line stdlib/no-redeclare\n\t/* eslint-disable no-invalid-this */\n\tvar str = '' + this.re;\n\tif ( this.im < 0 ) {\n\t\tstr += ' - ' + (-this.im);\n\t} else {\n\t\tstr += ' + ' + this.im;\n\t}\n\tstr += 'i';\n\treturn str;\n}\n\n\n// EXPORTS //\n\nexport default toString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Serializes a complex number as a JSON object.\n*\n* @private\n* @returns {Object} JSON representation\n*/\nfunction toJSON() {\n\t/* eslint-disable no-invalid-this */\n\tvar out = {};\n\tout.type = 'Complex128';\n\tout.re = this.re;\n\tout.im = this.im;\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default toJSON;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar fround = ( typeof Math.fround === 'function' ) ? Math.fround : null; // eslint-disable-line stdlib/no-builtin-math\n\n\n// EXPORTS //\n\nexport default fround;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport Float32Array from '@stdlib/array-float32';\n\n\n// VARIABLES //\n\nvar FLOAT32_VIEW = new Float32Array( 1 );\n\n\n// MAIN //\n\n/**\n* Converts a double-precision floating-point number to the nearest single-precision floating-point number.\n*\n* @param {number} x - double-precision floating-point number\n* @returns {number} nearest single-precision floating-point number\n*\n* @example\n* var y = float64ToFloat32( 1.337 );\n* // returns 1.3370000123977661\n*/\nfunction float64ToFloat32( x ) {\n\tFLOAT32_VIEW[ 0 ] = x;\n\treturn FLOAT32_VIEW[ 0 ];\n}\n\n\n// EXPORTS //\n\nexport default float64ToFloat32;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Convert a double-precision floating-point number to the nearest single-precision floating-point number.\n*\n* @module @stdlib/number-float64-base-to-float32\n*\n* @example\n* import float64ToFloat32 from '@stdlib/number-float64-base-to-float32';\n*\n* var y = float64ToFloat32( 1.337 );\n* // returns 1.3370000123977661\n*/\n\n// MODULES //\n\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar float64ToFloat32;\nif ( typeof builtin === 'function' ) {\n\tfloat64ToFloat32 = builtin;\n} else {\n\tfloat64ToFloat32 = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default float64ToFloat32;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isNumber } from '@stdlib/assert-is-number';\nimport defineProperty from '@stdlib/utils-define-property';\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport float64ToFloat32 from '@stdlib/number-float64-base-to-float32';\nimport toStr from './tostring.js';\nimport toJSON from './tojson.js';\n\n\n// MAIN //\n\n/**\n* 64-bit complex number constructor.\n*\n* @constructor\n* @param {number} real - real component\n* @param {number} imag - imaginary component\n* @throws {TypeError} must invoke using the `new` keyword\n* @throws {TypeError} real component must be a number primitive\n* @throws {TypeError} imaginary component must be a number primitive\n* @returns {Complex64} 64-bit complex number\n*\n* @example\n* var z = new Complex64( 5.0, 3.0 );\n* // returns \n*/\nfunction Complex64( real, imag ) {\n\tif ( !( this instanceof Complex64 ) ) {\n\t\tthrow new TypeError( 'invalid invocation. Constructor must be called with the `new` keyword.' );\n\t}\n\tif ( !isNumber( real ) ) {\n\t\tthrow new TypeError( 'invalid argument. Real component must be a number primitive. Value: `'+real+'`.' );\n\t}\n\tif ( !isNumber( imag ) ) {\n\t\tthrow new TypeError( 'invalid argument. Imaginary component must be a number primitive. Value: `'+imag+'`.' );\n\t}\n\tdefineProperty( this, 're', {\n\t\t'configurable': false,\n\t\t'enumerable': true,\n\t\t'writable': false,\n\t\t'value': float64ToFloat32( real )\n\t});\n\tdefineProperty( this, 'im', {\n\t\t'configurable': false,\n\t\t'enumerable': true,\n\t\t'writable': false,\n\t\t'value': float64ToFloat32( imag )\n\t});\n\treturn this;\n}\n\n/**\n* Size (in bytes) of each component.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex64\n* @type {integer}\n* @returns {integer} size of each component\n*\n* @example\n* var nbytes = Complex64.BYTES_PER_ELEMENT;\n* // returns 4\n*/\nsetReadOnly( Complex64, 'BYTES_PER_ELEMENT', 4 );\n\n/**\n* Size (in bytes) of each component.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex64.prototype\n* @type {integer}\n* @returns {integer} size of each component\n*\n* @example\n* var z = new Complex64( 5.0, 3.0 );\n*\n* var nbytes = z.BYTES_PER_ELEMENT;\n* // returns 4\n*/\nsetReadOnly( Complex64.prototype, 'BYTES_PER_ELEMENT', 4 );\n\n/**\n* Length (in bytes) of a complex number.\n*\n* @name byteLength\n* @memberof Complex64.prototype\n* @type {integer}\n* @returns {integer} byte length\n*\n* @example\n* var z = new Complex64( 5.0, 3.0 );\n*\n* var nbytes = z.byteLength;\n* // returns 8\n*/\nsetReadOnly( Complex64.prototype, 'byteLength', 8 );\n\n/**\n* Serializes a complex number as a string.\n*\n* @name toString\n* @memberof Complex64.prototype\n* @type {Function}\n* @returns {string} serialized complex number\n*\n* @example\n* var z = new Complex64( 5.0, 3.0 );\n*\n* var str = z.toString();\n* // returns '5 + 3i'\n*/\nsetReadOnly( Complex64.prototype, 'toString', toStr );\n\n/**\n* Serializes a complex number as a JSON object.\n*\n* ## Notes\n*\n* - `JSON.stringify()` implicitly calls this method when stringifying a `Complex64` instance.\n*\n*\n* @name toJSON\n* @memberof Complex64.prototype\n* @type {Function}\n* @returns {Object} serialized complex number\n*\n* @example\n* var z = new Complex64( 5.0, 3.0 );\n*\n* var obj = z.toJSON();\n* // returns { 'type': 'Complex64', 're': 5.0, 'im': 3.0 }\n*/\nsetReadOnly( Complex64.prototype, 'toJSON', toJSON );\n\n\n// EXPORTS //\n\nexport default Complex64;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport Complex128 from '@stdlib/complex-float64';\nimport Complex64 from '@stdlib/complex-float32';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a complex number-like object.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a complex number-like object.\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n* import Complex64 from '@stdlib/complex-float32';\n*\n* var x = new Complex128( 4.0, 2.0 );\n* var bool = isComplexLike( x );\n* // returns true\n*\n* x = new Complex64( 4.0, 2.0 );\n* bool = isComplexLike( x );\n* // returns true\n*/\nfunction isComplexLike( value ) {\n\tif ( value instanceof Complex128 || value instanceof Complex64 ) {\n\t\treturn true;\n\t}\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\ttypeof value.re === 'number' &&\n\t\ttypeof value.im === 'number'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isComplexLike;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isInteger from '@stdlib/math-base-assert-is-integer';\n\n\n// MAIN //\n\n/**\n* Tests if a finite numeric value is an even number.\n*\n* @param {number} x - value to test\n* @returns {boolean} boolean indicating whether the value is an even number\n*\n* @example\n* var bool = isEven( 5.0 );\n* // returns false\n*\n* @example\n* var bool = isEven( -2.0 );\n* // returns true\n*\n* @example\n* var bool = isEven( 0.0 );\n* // returns true\n*\n* @example\n* var bool = isEven( NaN );\n* // returns false\n*/\nfunction isEven( x ) {\n\treturn isInteger( x/2.0 );\n}\n\n\n// EXPORTS //\n\nexport default isEven;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport hasOwnProp from '@stdlib/assert-has-own-property';\n\n\n// MAIN //\n\n/**\n* Tests for native `Symbol.iterator` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Symbol.iterator` support\n*\n* @example\n* var bool = hasIteratorSymbolSupport();\n* // returns \n*/\nfunction hasIteratorSymbolSupport() {\n\treturn (\n\t\ttypeof Symbol === 'function' &&\n\t\ttypeof Symbol( 'foo' ) === 'symbol' &&\n\t\thasOwnProp( Symbol, 'iterator' ) &&\n\t\ttypeof Symbol.iterator === 'symbol'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default hasIteratorSymbolSupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Serializes a complex number as a string.\n*\n* @private\n* @returns {string} serialized complex number\n*/\nfunction toString() { // eslint-disable-line stdlib/no-redeclare\n\t/* eslint-disable no-invalid-this */\n\tvar str = '' + this.re;\n\tif ( this.im < 0 ) {\n\t\tstr += ' - ' + (-this.im);\n\t} else {\n\t\tstr += ' + ' + this.im;\n\t}\n\tstr += 'i';\n\treturn str;\n}\n\n\n// EXPORTS //\n\nexport default toString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Serializes a complex number as a JSON object.\n*\n* @private\n* @returns {Object} JSON representation\n*/\nfunction toJSON() {\n\t/* eslint-disable no-invalid-this */\n\tvar out = {};\n\tout.type = 'Complex64';\n\tout.re = this.re;\n\tout.im = this.im;\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default toJSON;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport hasIteratorSymbolSupport from '@stdlib/assert-has-iterator-symbol-support';\n\n\n// MAIN //\n\n/**\n* Iterator symbol.\n*\n* @name IteratorSymbol\n* @constant\n* @type {(symbol|null)}\n*\n* @example\n* function iterator() {\n* var it;\n* var i;\n*\n* i = -1;\n*\n* it = {};\n* it.next = next;\n* it.return = done;\n*\n* if ( IteratorSymbol ) {\n* it[ IteratorSymbol ] = iterator;\n* }\n* return it;\n*\n* function next() {\n* i += 1;\n* return {\n* 'value': i,\n* 'done': false\n* };\n* }\n*\n* function done( value ) {\n* if ( arguments.length === 0 ) {\n* return {\n* 'done': true\n* };\n* }\n* return {\n* 'value': value,\n* 'done': true\n* };\n* }\n* }\n*\n* var obj = iterator();\n*/\nvar IteratorSymbol = ( hasIteratorSymbolSupport() ) ? Symbol.iterator : null;\n\n\n// EXPORTS //\n\nexport default IteratorSymbol;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport defineProperty from '@stdlib/utils-define-property';\n\n\n// MAIN //\n\n/**\n* Defines a non-enumerable read-only accessor.\n*\n* @param {Object} obj - object on which to define the property\n* @param {(string|symbol)} prop - property name\n* @param {Function} getter - accessor\n*\n* @example\n* function getter() {\n* return 'bar';\n* }\n*\n* var obj = {};\n*\n* setNonEnumerableReadOnlyAccessor( obj, 'foo', getter );\n*\n* try {\n* obj.foo = 'boop';\n* } catch ( err ) {\n* console.error( err.message );\n* }\n*/\nfunction setNonEnumerableReadOnlyAccessor( obj, prop, getter ) { // eslint-disable-line id-length\n\tdefineProperty( obj, prop, {\n\t\t'configurable': false,\n\t\t'enumerable': false,\n\t\t'get': getter\n\t});\n}\n\n\n// EXPORTS //\n\nexport default setNonEnumerableReadOnlyAccessor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Returns the real component of a single-precision complex floating-point number.\n*\n* @param {Complex} z - complex number\n* @returns {number} real component\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n*\n* var z = new Complex64( 5.0, 3.0 );\n*\n* var re = realf( z );\n* // returns 5.0\n*/\nfunction realf( z ) {\n\treturn z.re;\n}\n\n\n// EXPORTS //\n\nexport default realf;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Returns the imaginary component of a single-precision complex floating-point number.\n*\n* @param {Complex} z - complex number\n* @returns {number} imaginary component\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n*\n* var z = new Complex64( 5.0, 3.0 );\n*\n* var im = imagf( z );\n* // returns 3.0\n*/\nfunction imagf( z ) {\n\treturn z.im;\n}\n\n\n// EXPORTS //\n\nexport default imagf;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport Float32Array from '@stdlib/array-float32';\n\n\n// MAIN //\n\n/**\n* Reinterprets a `Complex64Array` as a `Float32Array`.\n*\n* @param {Complex64Array} x - input array\n* @param {NonNegativeInteger} offset - starting index\n* @returns {Float32Array} `Float32Array` view\n*\n* @example\n* import Complex64Array from '@stdlib/array-complex64';\n*\n* var x = new Complex64Array( 10 );\n*\n* var out = reinterpret( x, 0 );\n* // returns \n*\n* var bool = ( out.buffer === x.buffer );\n* // returns true\n*/\nfunction reinterpret( x, offset ) {\n\treturn new Float32Array( x.buffer, x.byteOffset+(x.BYTES_PER_ELEMENT*offset), 2*(x.length-offset) ); // eslint-disable-line max-len\n}\n\n\n// EXPORTS //\n\nexport default reinterpret;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport Float64Array from '@stdlib/array-float64';\n\n\n// MAIN //\n\n/**\n* Reinterprets a `Complex128Array` as a `Float64Array`.\n*\n* @param {Complex128Array} x - input array\n* @param {NonNegativeInteger} offset - starting index\n* @returns {Float64Array} `Float64Array` view\n*\n* @example\n* import Complex128Array from '@stdlib/array-complex128';\n*\n* var x = new Complex128Array( 10 );\n*\n* var out = reinterpret( x, 0 );\n* // returns \n*\n* var bool = ( out.buffer === x.buffer );\n* // returns true\n*/\nfunction reinterpret( x, offset ) {\n\treturn new Float64Array( x.buffer, x.byteOffset+(x.BYTES_PER_ELEMENT*offset), 2*(x.length-offset) ); // eslint-disable-line max-len\n}\n\n\n// EXPORTS //\n\nexport default reinterpret;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Returns an array element.\n*\n* @private\n* @param {Collection} x - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {*} element\n*/\nfunction getter( x, idx ) {\n\treturn x[ idx ];\n}\n\n\n// EXPORTS //\n\nexport default getter;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Returns an array element using an accessor method.\n*\n* @private\n* @param {Collection} x - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {*} element\n*/\nfunction getter( x, idx ) {\n\treturn x.get( idx );\n}\n\n\n// EXPORTS //\n\nexport default getter;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Sets an array element.\n*\n* @private\n* @param {Collection} x - input array\n* @param {NonNegativeInteger} idx - element index\n* @param {*} value - value to set\n*/\nfunction setter( x, idx, value ) {\n\tx[ idx ] = value;\n}\n\n\n// EXPORTS //\n\nexport default setter;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Sets an array element using an accessor method.\n*\n* @private\n* @param {Collection} x - input array\n* @param {NonNegativeInteger} idx - element index\n* @param {*} value - value to set\n*/\nfunction setter( x, idx, value ) {\n\tx.set( value, idx );\n}\n\n\n// EXPORTS //\n\nexport default setter;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport getIndexed from './getter.js';\nimport getAccessor from './getter.accessor.js';\nimport setIndexed from './setter.js';\nimport setAccessor from './setter.accessor.js';\n\n\n// MAIN //\n\n/**\n* Converts an array-like to an object likely to have the same \"shape\".\n*\n* ## Notes\n*\n* - This function is intended as a potential performance optimization. In V8, for example, even if two objects share common properties, if those properties were added in different orders or if one object has additional properties not shared by the other object, then those objects will have different \"hidden\" classes. If a function is provided many objects having different \"shapes\", some JavaScript VMs (e.g., V8) will consider the function \"megamorphic\" and fail to perform various runtime optimizations. Accordingly, the intent of this function is to standardize the \"shape\" of the object holding array meta data to ensure that internal functions operating on arrays are provided consistent argument \"shapes\".\n*\n* - The returned object has the following properties:\n*\n* - **data**: data buffer.\n* - **accessors**: `boolean` indicating whether the data buffer uses accessors for getting and setting elements.\n* - **getter**: accessor for retrieving a data buffer element.\n* - **setter**: accessor for setting a data buffer element.\n*\n* @param {Collection} x - array-like object\n* @returns {Object} object containing array meta data\n*\n* @example\n* var obj = arraylike2object( [ 1, 2, 3, 4 ] );\n* // returns {...}\n*/\nfunction arraylike2object( x ) {\n\tvar bool = Boolean( x.get && x.set ); // Note: intentional weak check, as we don't explicitly check for functions for (perhaps marginally) better performance.\n\treturn {\n\t\t'data': x,\n\t\t'accessors': bool,\n\t\t'getter': ( bool ) ? getAccessor : getIndexed,\n\t\t'setter': ( bool ) ? setAccessor : setIndexed\n\t};\n}\n\n\n// EXPORTS //\n\nexport default arraylike2object;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isArrayLikeObject from '@stdlib/assert-is-array-like-object';\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport realf from '@stdlib/complex-realf';\nimport imagf from '@stdlib/complex-imagf';\n\n\n// MAIN //\n\n/**\n* Returns an array of iterated values.\n*\n* @private\n* @param {Object} it - iterator\n* @returns {(Array|TypeError)} array or an error\n*/\nfunction fromIterator( it ) {\n\tvar out;\n\tvar v;\n\tvar z;\n\n\tout = [];\n\twhile ( true ) {\n\t\tv = it.next();\n\t\tif ( v.done ) {\n\t\t\tbreak;\n\t\t}\n\t\tz = v.value;\n\t\tif ( isArrayLikeObject( z ) && z.length >= 2 ) {\n\t\t\tout.push( z[ 0 ], z[ 1 ] );\n\t\t} else if ( isComplexLike( z ) ) {\n\t\t\tout.push( realf( z ), imagf( z ) );\n\t\t} else {\n\t\t\treturn new TypeError( 'invalid argument. An iterator must return either a two-element array containing real and imaginary components or a complex number. Value: `'+z+'`.' );\n\t\t}\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default fromIterator;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isArrayLikeObject from '@stdlib/assert-is-array-like-object';\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport realf from '@stdlib/complex-realf';\nimport imagf from '@stdlib/complex-imagf';\n\n\n// MAIN //\n\n/**\n* Returns an array of iterated values.\n*\n* @private\n* @param {Object} it - iterator\n* @param {Function} clbk - callback to invoke for each iterated value\n* @param {*} thisArg - invocation context\n* @returns {(Array|TypeError)} array or an error\n*/\nfunction fromIteratorMap( it, clbk, thisArg ) {\n\tvar out;\n\tvar v;\n\tvar z;\n\tvar i;\n\n\tout = [];\n\ti = -1;\n\twhile ( true ) {\n\t\tv = it.next();\n\t\tif ( v.done ) {\n\t\t\tbreak;\n\t\t}\n\t\ti += 1;\n\t\tz = clbk.call( thisArg, v.value, i );\n\t\tif ( isArrayLikeObject( z ) && z.length >= 2 ) {\n\t\t\tout.push( z[ 0 ], z[ 1 ] );\n\t\t} else if ( isComplexLike( z ) ) {\n\t\t\tout.push( realf( z ), imagf( z ) );\n\t\t} else {\n\t\t\treturn new TypeError( 'invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `'+z+'`.' );\n\t\t}\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default fromIteratorMap;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport realf from '@stdlib/complex-realf';\nimport imagf from '@stdlib/complex-imagf';\n\n\n// MAIN //\n\n/**\n* Returns a strided array of real and imaginary components.\n*\n* @private\n* @param {Float32Array} buf - output array\n* @param {Array} arr - array containing complex numbers\n* @returns {(Float32Array|null)} output array or null\n*/\nfunction fromArray( buf, arr ) {\n\tvar len;\n\tvar v;\n\tvar i;\n\tvar j;\n\n\tlen = arr.length;\n\tj = 0;\n\tfor ( i = 0; i < len; i++ ) {\n\t\tv = arr[ i ];\n\t\tif ( !isComplexLike( v ) ) {\n\t\t\treturn null;\n\t\t}\n\t\tbuf[ j ] = realf( v );\n\t\tbuf[ j+1 ] = imagf( v );\n\t\tj += 2; // stride\n\t}\n\treturn buf;\n}\n\n\n// EXPORTS //\n\nexport default fromArray;\n","/* eslint-disable no-restricted-syntax, max-lines, no-invalid-this */\n\n/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isNonNegativeInteger } from '@stdlib/assert-is-nonnegative-integer';\nimport isArrayLikeObject from '@stdlib/assert-is-array-like-object';\nimport isCollection from '@stdlib/assert-is-collection';\nimport isArrayBuffer from '@stdlib/assert-is-arraybuffer';\nimport isObject from '@stdlib/assert-is-object';\nimport isArray from '@stdlib/assert-is-array';\nimport isFunction from '@stdlib/assert-is-function';\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport isEven from '@stdlib/math-base-assert-is-even';\nimport isInteger from '@stdlib/math-base-assert-is-integer';\nimport hasIteratorSymbolSupport from '@stdlib/assert-has-iterator-symbol-support';\nimport ITERATOR_SYMBOL from '@stdlib/symbol-iterator';\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport setReadOnlyAccessor from '@stdlib/utils-define-nonenumerable-read-only-accessor';\nimport Float32Array from '@stdlib/array-float32';\nimport Complex64 from '@stdlib/complex-float32';\nimport realf from '@stdlib/complex-realf';\nimport imagf from '@stdlib/complex-imagf';\nimport reinterpret64 from '@stdlib/strided-base-reinterpret-complex64';\nimport reinterpret128 from '@stdlib/strided-base-reinterpret-complex128';\nimport arraylike2object from '@stdlib/array-base-arraylike2object';\nimport fromIterator from './from_iterator.js';\nimport fromIteratorMap from './from_iterator_map.js';\nimport fromArray from './from_array.js';\n\n\n// VARIABLES //\n\nvar BYTES_PER_ELEMENT = Float32Array.BYTES_PER_ELEMENT * 2;\nvar HAS_ITERATOR_SYMBOL = hasIteratorSymbolSupport();\n\n\n// FUNCTIONS //\n\n/**\n* Returns a boolean indicating if a value is a complex typed array.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a complex typed array\n*/\nfunction isComplexArray( value ) {\n\treturn (\n\t\tvalue instanceof Complex64Array ||\n\t\t(\n\t\t\ttypeof value === 'object' &&\n\t\t\tvalue !== null &&\n\t\t\t(\n\t\t\t\tvalue.constructor.name === 'Complex64Array' ||\n\t\t\t\tvalue.constructor.name === 'Complex128Array'\n\t\t\t) &&\n\t\t\ttypeof value._length === 'number' && // eslint-disable-line no-underscore-dangle\n\n\t\t\t// NOTE: we don't perform a more rigorous test here for a typed array for performance reasons, as robustly checking for a typed array instance could require walking the prototype tree and performing relatively expensive constructor checks...\n\t\t\ttypeof value._buffer === 'object' // eslint-disable-line no-underscore-dangle\n\t\t)\n\t);\n}\n\n/**\n* Returns a boolean indicating if a value is a complex typed array constructor.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a complex typed array constructor\n*/\nfunction isComplexArrayConstructor( value ) {\n\treturn (\n\t\tvalue === Complex64Array ||\n\n\t\t// NOTE: weaker test in order to avoid a circular dependency with Complex128Array...\n\t\tvalue.name === 'Complex128Array'\n\t);\n}\n\n/**\n* Returns a boolean indicating if a value is a `Complex64Array`.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a `Complex64Array`\n*/\nfunction isComplex64Array( value ) {\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\tvalue.constructor.name === 'Complex64Array' &&\n\t\tvalue.BYTES_PER_ELEMENT === BYTES_PER_ELEMENT\n\t);\n}\n\n/**\n* Returns a boolean indicating if a value is a `Complex128Array`.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a `Complex128Array`\n*/\nfunction isComplex128Array( value ) {\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\tvalue.constructor.name === 'Complex128Array' &&\n\t\tvalue.BYTES_PER_ELEMENT === BYTES_PER_ELEMENT*2\n\t);\n}\n\n\n// MAIN //\n\n/**\n* 64-bit complex number array constructor.\n*\n* @constructor\n* @param {(NonNegativeInteger|Collection|ArrayBuffer|Iterable)} [arg] - length, typed array, array-like object, buffer, or an iterable\n* @param {NonNegativeInteger} [byteOffset=0] - byte offset\n* @param {NonNegativeInteger} [length] - view length\n* @throws {RangeError} ArrayBuffer byte length must be a multiple of `8`\n* @throws {RangeError} array-like object and typed array input arguments must have a length which is a multiple of two\n* @throws {TypeError} if provided only a single argument, must provide a valid argument\n* @throws {TypeError} byte offset must be a nonnegative integer\n* @throws {RangeError} byte offset must be a multiple of `8`\n* @throws {TypeError} view length must be a positive multiple of `8`\n* @throws {RangeError} must provide sufficient memory to accommodate byte offset and view length requirements\n* @throws {TypeError} an iterator must return either a two element array containing real and imaginary components or a complex number\n* @returns {Complex64Array} complex number array\n*\n* @example\n* var arr = new Complex64Array();\n* // returns \n*\n* var len = arr.length;\n* // returns 0\n*\n* @example\n* var arr = new Complex64Array( 2 );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*\n* @example\n* var arr = new Complex64Array( [ 1.0, -1.0 ] );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* import ArrayBuffer from '@stdlib/array-buffer';\n*\n* var buf = new ArrayBuffer( 16 );\n* var arr = new Complex64Array( buf );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*\n* @example\n* import ArrayBuffer from '@stdlib/array-buffer';\n*\n* var buf = new ArrayBuffer( 16 );\n* var arr = new Complex64Array( buf, 8 );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* import ArrayBuffer from '@stdlib/array-buffer';\n*\n* var buf = new ArrayBuffer( 32 );\n* var arr = new Complex64Array( buf, 8, 2 );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*/\nfunction Complex64Array() {\n\tvar byteOffset;\n\tvar nargs;\n\tvar buf;\n\tvar len;\n\n\tnargs = arguments.length;\n\tif ( !(this instanceof Complex64Array) ) {\n\t\tif ( nargs === 0 ) {\n\t\t\treturn new Complex64Array();\n\t\t}\n\t\tif ( nargs === 1 ) {\n\t\t\treturn new Complex64Array( arguments[0] );\n\t\t}\n\t\tif ( nargs === 2 ) {\n\t\t\treturn new Complex64Array( arguments[0], arguments[1] );\n\t\t}\n\t\treturn new Complex64Array( arguments[0], arguments[1], arguments[2] );\n\t}\n\t// Create the underlying data buffer...\n\tif ( nargs === 0 ) {\n\t\tbuf = new Float32Array( 0 ); // backward-compatibility\n\t} else if ( nargs === 1 ) {\n\t\tif ( isNonNegativeInteger( arguments[0] ) ) {\n\t\t\tbuf = new Float32Array( arguments[0]*2 );\n\t\t} else if ( isCollection( arguments[0] ) ) {\n\t\t\tbuf = arguments[ 0 ];\n\t\t\tlen = buf.length;\n\n\t\t\t// If provided a \"generic\" array, peak at the first value, and, if the value is a complex number, try to process as an array of complex numbers, falling back to \"normal\" typed array initialization if we fail and ensuring consistency if the first value had not been a complex number...\n\t\t\tif ( len && isArray( buf ) && isComplexLike( buf[0] ) ) {\n\t\t\t\tbuf = fromArray( new Float32Array( len*2 ), buf );\n\t\t\t\tif ( buf === null ) {\n\t\t\t\t\t// We failed and we are now forced to allocate a new array :-(\n\t\t\t\t\tif ( !isEven( len ) ) {\n\t\t\t\t\t\tthrow new RangeError( 'invalid argument. Array-like object input arguments must have a length which is a multiple of two. Length: `'+len+'`.' );\n\t\t\t\t\t}\n\t\t\t\t\t// We failed, so fall back to directly setting values...\n\t\t\t\t\tbuf = new Float32Array( arguments[0] );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ( isComplex64Array( buf ) ) {\n\t\t\t\t\tbuf = reinterpret64( buf, 0 );\n\t\t\t\t} else if ( isComplex128Array( buf ) ) {\n\t\t\t\t\tbuf = reinterpret128( buf, 0 );\n\t\t\t\t} else if ( !isEven( len ) ) {\n\t\t\t\t\tthrow new RangeError( 'invalid argument. Array-like object and typed array input arguments must have a length which is a multiple of two. Length: `'+len+'`.' );\n\t\t\t\t}\n\t\t\t\tbuf = new Float32Array( buf );\n\t\t\t}\n\t\t} else if ( isArrayBuffer( arguments[0] ) ) {\n\t\t\tbuf = arguments[ 0 ];\n\t\t\tif ( !isInteger( buf.byteLength/BYTES_PER_ELEMENT ) ) {\n\t\t\t\tthrow new RangeError( 'invalid argument. ArrayBuffer byte length must be a multiple of '+BYTES_PER_ELEMENT+'. Byte length: `'+buf.byteLength+'`.' );\n\t\t\t}\n\t\t\tbuf = new Float32Array( buf );\n\t\t} else if ( isObject( arguments[0] ) ) {\n\t\t\tbuf = arguments[ 0 ];\n\t\t\tif ( HAS_ITERATOR_SYMBOL === false ) {\n\t\t\t\tthrow new TypeError( 'invalid argument. Environment lacks Symbol.iterator support. Must provide a length, ArrayBuffer, typed array, or array-like object. Value: `'+buf+'`.' );\n\t\t\t}\n\t\t\tif ( !isFunction( buf[ ITERATOR_SYMBOL ] ) ) {\n\t\t\t\tthrow new TypeError( 'invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `'+buf+'`.' );\n\t\t\t}\n\t\t\tbuf = buf[ ITERATOR_SYMBOL ]();\n\t\t\tif ( !isFunction( buf.next ) ) {\n\t\t\t\tthrow new TypeError( 'invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable.' );\n\t\t\t}\n\t\t\tbuf = fromIterator( buf );\n\t\t\tif ( buf instanceof Error ) {\n\t\t\t\tthrow buf;\n\t\t\t}\n\t\t\tbuf = new Float32Array( buf );\n\t\t} else {\n\t\t\tthrow new TypeError( 'invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `'+arguments[0]+'`.' );\n\t\t}\n\t} else {\n\t\tbuf = arguments[ 0 ];\n\t\tif ( !isArrayBuffer( buf ) ) {\n\t\t\tthrow new TypeError( 'invalid argument. First argument must be an array buffer. Value: `'+buf+'`.' );\n\t\t}\n\t\tbyteOffset = arguments[ 1 ];\n\t\tif ( !isNonNegativeInteger( byteOffset ) ) {\n\t\t\tthrow new TypeError( 'invalid argument. Byte offset must be a nonnegative integer. Value: `'+byteOffset+'`.' );\n\t\t}\n\t\tif ( !isInteger( byteOffset/BYTES_PER_ELEMENT ) ) {\n\t\t\tthrow new RangeError( 'invalid argument. Byte offset must be a multiple of '+BYTES_PER_ELEMENT+'. Value: `'+byteOffset+'`.' );\n\t\t}\n\t\tif ( nargs === 2 ) {\n\t\t\tlen = buf.byteLength - byteOffset;\n\t\t\tif ( !isInteger( len/BYTES_PER_ELEMENT ) ) {\n\t\t\t\tthrow new RangeError( 'invalid arguments. ArrayBuffer view byte length must be a multiple of '+BYTES_PER_ELEMENT+'. View byte length: `'+len+'`.' );\n\t\t\t}\n\t\t\tbuf = new Float32Array( buf, byteOffset );\n\t\t} else {\n\t\t\tlen = arguments[ 2 ];\n\t\t\tif ( !isNonNegativeInteger( len ) ) {\n\t\t\t\tthrow new TypeError( 'invalid argument. Length must be a nonnegative integer. Value: `'+len+'`.' );\n\t\t\t}\n\t\t\tif ( (len*BYTES_PER_ELEMENT) > (buf.byteLength-byteOffset) ) {\n\t\t\t\tthrow new RangeError( 'invalid arguments. ArrayBuffer has insufficient capacity. Either decrease the array length or provide a bigger buffer. Minimum capacity: `'+(len*BYTES_PER_ELEMENT)+'`.' );\n\t\t\t}\n\t\t\tbuf = new Float32Array( buf, byteOffset, len*2 );\n\t\t}\n\t}\n\tsetReadOnly( this, '_buffer', buf );\n\tsetReadOnly( this, '_length', buf.length/2 );\n\n\treturn this;\n}\n\n/**\n* Size (in bytes) of each array element.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex64Array\n* @readonly\n* @type {PositiveInteger}\n* @default 8\n*\n* @example\n* var nbytes = Complex64Array.BYTES_PER_ELEMENT;\n* // returns 8\n*/\nsetReadOnly( Complex64Array, 'BYTES_PER_ELEMENT', BYTES_PER_ELEMENT );\n\n/**\n* Constructor name.\n*\n* @name name\n* @memberof Complex64Array\n* @readonly\n* @type {string}\n* @default 'Complex64Array'\n*\n* @example\n* var str = Complex64Array.name;\n* // returns 'Complex64Array'\n*/\nsetReadOnly( Complex64Array, 'name', 'Complex64Array' );\n\n/**\n* Creates a new 64-bit complex number array from an array-like object or an iterable.\n*\n* @name from\n* @memberof Complex64Array\n* @type {Function}\n* @param {(Collection|Iterable)} src - array-like object or iterable\n* @param {Function} [clbk] - callback to invoke for each source element\n* @param {*} [thisArg] - context\n* @throws {TypeError} `this` context must be a constructor\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be an array-like object or an iterable\n* @throws {TypeError} second argument must be a function\n* @throws {RangeError} array-like objects must have a length which is a multiple of two\n* @throws {TypeError} an iterator must return either a two element array containing real and imaginary components or a complex number\n* @throws {TypeError} when provided an iterator, a callback must return either a two element array containing real and imaginary components or a complex number\n* @returns {Complex64Array} 64-bit complex number array\n*\n* @example\n* var arr = Complex64Array.from( [ 1.0, -1.0 ] );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n*\n* var arr = Complex64Array.from( [ new Complex64( 1.0, 1.0 ) ] );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* function clbk( v ) {\n* return new Complex64( realf(v)*2.0, imagf(v)*2.0 );\n* }\n*\n* var arr = Complex64Array.from( [ new Complex64( 1.0, 1.0 ) ], clbk );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*/\nsetReadOnly( Complex64Array, 'from', function from( src ) {\n\tvar thisArg;\n\tvar nargs;\n\tvar clbk;\n\tvar out;\n\tvar buf;\n\tvar tmp;\n\tvar len;\n\tvar flg;\n\tvar v;\n\tvar i;\n\tvar j;\n\tif ( !isFunction( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` context must be a constructor.' );\n\t}\n\tif ( !isComplexArrayConstructor( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tnargs = arguments.length;\n\tif ( nargs > 1 ) {\n\t\tclbk = arguments[ 1 ];\n\t\tif ( !isFunction( clbk ) ) {\n\t\t\tthrow new TypeError( 'invalid argument. Second argument must be a function. Value: `'+clbk+'`.' );\n\t\t}\n\t\tif ( nargs > 2 ) {\n\t\t\tthisArg = arguments[ 2 ];\n\t\t}\n\t}\n\tif ( isComplexArray( src ) ) {\n\t\tlen = src.length;\n\t\tif ( clbk ) {\n\t\t\tout = new this( len );\n\t\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\t\tj = 0;\n\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\tv = clbk.call( thisArg, src.get( i ), i );\n\t\t\t\tif ( isComplexLike( v ) ) {\n\t\t\t\t\tbuf[ j ] = realf( v );\n\t\t\t\t\tbuf[ j+1 ] = imagf( v );\n\t\t\t\t} else if ( isArrayLikeObject( v ) && v.length >= 2 ) {\n\t\t\t\t\tbuf[ j ] = v[ 0 ];\n\t\t\t\t\tbuf[ j+1 ] = v[ 1 ];\n\t\t\t\t} else {\n\t\t\t\t\tthrow new TypeError( 'invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `'+v+'`.' );\n\t\t\t\t}\n\t\t\t\tj += 2; // stride\n\t\t\t}\n\t\t\treturn out;\n\t\t}\n\t\treturn new this( src );\n\t}\n\tif ( isCollection( src ) ) {\n\t\tif ( clbk ) {\n\t\t\t// Note: array contents affect how we iterate over a provided data source. If only complex number objects, we can extract real and imaginary components. Otherwise, for non-complex number arrays (e.g., `Float64Array`, etc), we assume a strided array where real and imaginary components are interleaved. In the former case, we expect a callback to return real and imaginary components (possibly as a complex number). In the latter case, we expect a callback to return *either* a real or imaginary component.\n\n\t\t\tlen = src.length;\n\t\t\ttmp = arraylike2object( src );\n\n\t\t\t// Detect whether we've been provided an array which returns complex number objects...\n\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\tif ( !isComplexLike( tmp.getter( src, i ) ) ) {\n\t\t\t\t\tflg = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// If an array does not contain only complex number objects, then we assume interleaved real and imaginary components...\n\t\t\tif ( flg ) {\n\t\t\t\tif ( !isEven( len ) ) {\n\t\t\t\t\tthrow new RangeError( 'invalid argument. First argument must have a length which is a multiple of two. Length: `'+len+'`.' );\n\t\t\t\t}\n\t\t\t\tout = new this( len/2 );\n\t\t\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\t\tbuf[ i ] = clbk.call( thisArg, tmp.getter( src, i ), i );\n\t\t\t\t}\n\t\t\t\treturn out;\n\t\t\t}\n\t\t\t// If an array contains only complex number objects, then we need to extract real and imaginary components...\n\t\t\tout = new this( len );\n\t\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\t\tj = 0;\n\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\tv = clbk.call( thisArg, tmp.getter( src, i ), i );\n\t\t\t\tif ( isComplexLike( v ) ) {\n\t\t\t\t\tbuf[ j ] = realf( v );\n\t\t\t\t\tbuf[ j+1 ] = imagf( v );\n\t\t\t\t} else if ( isArrayLikeObject( v ) && v.length >= 2 ) {\n\t\t\t\t\tbuf[ j ] = v[ 0 ];\n\t\t\t\t\tbuf[ j+1 ] = v[ 1 ];\n\t\t\t\t} else {\n\t\t\t\t\tthrow new TypeError( 'invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `'+v+'`.' );\n\t\t\t\t}\n\t\t\t\tj += 2; // stride\n\t\t\t}\n\t\t\treturn out;\n\t\t}\n\t\treturn new this( src );\n\t}\n\tif ( isObject( src ) && HAS_ITERATOR_SYMBOL && isFunction( src[ ITERATOR_SYMBOL ] ) ) { // eslint-disable-line max-len\n\t\tbuf = src[ ITERATOR_SYMBOL ]();\n\t\tif ( !isFunction( buf.next ) ) {\n\t\t\tthrow new TypeError( 'invalid argument. First argument must be an array-like object or an iterable.' );\n\t\t}\n\t\tif ( clbk ) {\n\t\t\ttmp = fromIteratorMap( buf, clbk, thisArg );\n\t\t} else {\n\t\t\ttmp = fromIterator( buf );\n\t\t}\n\t\tif ( tmp instanceof Error ) {\n\t\t\tthrow tmp;\n\t\t}\n\t\tlen = tmp.length / 2;\n\t\tout = new this( len );\n\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\tbuf[ i ] = tmp[ i ];\n\t\t}\n\t\treturn out;\n\t}\n\tthrow new TypeError( 'invalid argument. First argument must be an array-like object or an iterable. Value: `'+src+'`.' );\n});\n\n/**\n* Creates a new 64-bit complex number array from a variable number of arguments.\n*\n* @name of\n* @memberof Complex64Array\n* @type {Function}\n* @param {...*} element - array elements\n* @throws {TypeError} `this` context must be a constructor\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Complex64Array} 64-bit complex number array\n*\n* @example\n* var arr = Complex64Array.of( 1.0, 1.0, 1.0, 1.0 );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*/\nsetReadOnly( Complex64Array, 'of', function of() {\n\tvar args;\n\tvar i;\n\tif ( !isFunction( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` context must be a constructor.' );\n\t}\n\tif ( !isComplexArrayConstructor( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\targs = [];\n\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\targs.push( arguments[ i ] );\n\t}\n\treturn new this( args );\n});\n\n/**\n* Pointer to the underlying data buffer.\n*\n* @name buffer\n* @memberof Complex64Array.prototype\n* @readonly\n* @type {ArrayBuffer}\n*\n* @example\n* var arr = new Complex64Array( 10 );\n*\n* var buf = arr.buffer;\n* // returns \n*/\nsetReadOnlyAccessor( Complex64Array.prototype, 'buffer', function get() {\n\treturn this._buffer.buffer;\n});\n\n/**\n* Size (in bytes) of the array.\n*\n* @name byteLength\n* @memberof Complex64Array.prototype\n* @readonly\n* @type {NonNegativeInteger}\n*\n* @example\n* var arr = new Complex64Array( 10 );\n*\n* var byteLength = arr.byteLength;\n* // returns 80\n*/\nsetReadOnlyAccessor( Complex64Array.prototype, 'byteLength', function get() {\n\treturn this._buffer.byteLength;\n});\n\n/**\n* Offset (in bytes) of the array from the start of its underlying `ArrayBuffer`.\n*\n* @name byteOffset\n* @memberof Complex64Array.prototype\n* @readonly\n* @type {NonNegativeInteger}\n*\n* @example\n* var arr = new Complex64Array( 10 );\n*\n* var byteOffset = arr.byteOffset;\n* // returns 0\n*/\nsetReadOnlyAccessor( Complex64Array.prototype, 'byteOffset', function get() {\n\treturn this._buffer.byteOffset;\n});\n\n/**\n* Size (in bytes) of each array element.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex64Array.prototype\n* @readonly\n* @type {PositiveInteger}\n* @default 8\n*\n* @example\n* var arr = new Complex64Array( 10 );\n*\n* var nbytes = arr.BYTES_PER_ELEMENT;\n* // returns 8\n*/\nsetReadOnly( Complex64Array.prototype, 'BYTES_PER_ELEMENT', Complex64Array.BYTES_PER_ELEMENT );\n\n/**\n* Copies a sequence of elements within the array to the position starting at `target`.\n*\n* @name copyWithin\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {integer} target - index at which to start copying elements\n* @param {integer} start - source index at which to copy elements from\n* @param {integer} [end] - source index at which to stop copying elements from\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Complex64Array} modified array\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* var arr = new Complex64Array( 4 );\n*\n* // Set the array elements:\n* arr.set( new Complex64( 1.0, 1.0 ), 0 );\n* arr.set( new Complex64( 2.0, 2.0 ), 1 );\n* arr.set( new Complex64( 3.0, 3.0 ), 2 );\n* arr.set( new Complex64( 4.0, 4.0 ), 3 );\n*\n* // Copy the first two elements to the last two elements:\n* arr.copyWithin( 2, 0, 2 );\n*\n* // Get the last array element:\n* var z = arr.get( 3 );\n*\n* var re = realf( z );\n* // returns 2.0\n*\n* var im = imagf( z );\n* // returns 2.0\n*/\nsetReadOnly( Complex64Array.prototype, 'copyWithin', function copyWithin( target, start ) {\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\t// FIXME: prefer a functional `copyWithin` implementation which addresses lack of universal browser support (e.g., IE11 and Safari) or ensure that typed arrays are polyfilled\n\tif ( arguments.length === 2 ) {\n\t\tthis._buffer.copyWithin( target*2, start*2 );\n\t} else {\n\t\tthis._buffer.copyWithin( target*2, start*2, arguments[2]*2 );\n\t}\n\treturn this;\n});\n\n/**\n* Returns an iterator for iterating over array key-value pairs.\n*\n* @name entries\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Iterator} iterator\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n*\n* var arr = [\n* new Complex64( 1.0, 1.0 ),\n* new Complex64( 2.0, 2.0 ),\n* new Complex64( 3.0, 3.0 )\n* ];\n* arr = new Complex64Array( arr );\n*\n* // Create an iterator:\n* var it = arr.entries();\n*\n* // Iterate over the key-value pairs...\n* var v = it.next().value;\n* // returns [ 0, ]\n*\n* v = it.next().value;\n* // returns [ 1, ]\n*\n* v = it.next().value;\n* // returns [ 2, ]\n*\n* var bool = it.next().done;\n* // returns true\n*/\nsetReadOnly( Complex64Array.prototype, 'entries', function entries() {\n\tvar buffer;\n\tvar self;\n\tvar iter;\n\tvar len;\n\tvar FLG;\n\tvar i;\n\tvar j;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tself = this;\n\tbuffer = this._buffer;\n\tlen = this._length;\n\n\t// Initialize the iteration indices:\n\ti = -1;\n\tj = -2;\n\n\t// Create an iterator protocol-compliant object:\n\titer = {};\n\tsetReadOnly( iter, 'next', next );\n\tsetReadOnly( iter, 'return', end );\n\n\tif ( ITERATOR_SYMBOL ) {\n\t\tsetReadOnly( iter, ITERATOR_SYMBOL, factory );\n\t}\n\treturn iter;\n\n\t/**\n\t* Returns an iterator protocol-compliant object containing the next iterated value.\n\t*\n\t* @private\n\t* @returns {Object} iterator protocol-compliant object\n\t*/\n\tfunction next() {\n\t\tvar z;\n\t\ti += 1;\n\t\tif ( FLG || i >= len ) {\n\t\t\treturn {\n\t\t\t\t'done': true\n\t\t\t};\n\t\t}\n\t\tj += 2;\n\t\tz = new Complex64( buffer[ j ], buffer[ j+1 ] );\n\t\treturn {\n\t\t\t'value': [ i, z ],\n\t\t\t'done': false\n\t\t};\n\t}\n\n\t/**\n\t* Finishes an iterator.\n\t*\n\t* @private\n\t* @param {*} [value] - value to return\n\t* @returns {Object} iterator protocol-compliant object\n\t*/\n\tfunction end( value ) {\n\t\tFLG = true;\n\t\tif ( arguments.length ) {\n\t\t\treturn {\n\t\t\t\t'value': value,\n\t\t\t\t'done': true\n\t\t\t};\n\t\t}\n\t\treturn {\n\t\t\t'done': true\n\t\t};\n\t}\n\n\t/**\n\t* Returns a new iterator.\n\t*\n\t* @private\n\t* @returns {Iterator} iterator\n\t*/\n\tfunction factory() {\n\t\treturn self.entries();\n\t}\n});\n\n/**\n* Returns an array element.\n*\n* @name get\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {NonNegativeInteger} idx - element index\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} must provide a nonnegative integer\n* @returns {(Complex64|void)} array element\n*\n* @example\n* var arr = new Complex64Array( 10 );\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* var z = arr.get( 0 );\n* // returns \n*\n* var re = realf( z );\n* // returns 0.0\n*\n* var im = imagf( z );\n* // returns 0.0\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n*\n* z = arr.get( 0 );\n* // returns \n*\n* re = realf( z );\n* // returns 1.0\n*\n* im = imagf( z );\n* // returns -1.0\n*\n* z = arr.get( 100 );\n* // returns undefined\n*/\nsetReadOnly( Complex64Array.prototype, 'get', function get( idx ) {\n\tvar buf;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isNonNegativeInteger( idx ) ) {\n\t\tthrow new TypeError( 'invalid argument. Must provide a nonnegative integer. Value: `'+idx+'`.' );\n\t}\n\tif ( idx >= this._length ) {\n\t\treturn;\n\t}\n\tbuf = this._buffer;\n\tidx *= 2;\n\treturn new Complex64( buf[ idx ], buf[ idx+1 ] );\n});\n\n/**\n* Number of array elements.\n*\n* @name length\n* @memberof Complex64Array.prototype\n* @readonly\n* @type {NonNegativeInteger}\n*\n* @example\n* var arr = new Complex64Array( 10 );\n*\n* var len = arr.length;\n* // returns 10\n*/\nsetReadOnlyAccessor( Complex64Array.prototype, 'length', function get() {\n\treturn this._length;\n});\n\n/**\n* Sets an array element.\n*\n* ## Notes\n*\n* - When provided a typed array, real or complex, we must check whether the source array shares the same buffer as the target array and whether the underlying memory overlaps. In particular, we are concerned with the following scenario:\n*\n* ```text\n* buf: ---------------------\n* src: ---------------------\n* ```\n*\n* In the above, as we copy values from `src`, we will overwrite values in the `src` view, resulting in duplicated values copied into the end of `buf`, which is not intended. Hence, to avoid overwriting source values, we must **copy** source values to a temporary array.\n*\n* In the other overlapping scenario,\n*\n* ```text\n* buf: ---------------------\n* src: ---------------------\n* ```\n*\n* by the time we begin copying into the overlapping region, we are copying from the end of `src`, a non-overlapping region, which means we don't run the risk of copying copied values, rather than the original `src` values as intended.\n*\n*\n* @name set\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {(Collection|Complex|ComplexArray)} value - value(s)\n* @param {NonNegativeInteger} [i=0] - element index at which to start writing values\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be either a complex number, an array-like object, or a complex number array\n* @throws {TypeError} index argument must be a nonnegative integer\n* @throws {RangeError} array-like objects must have a length which is a multiple of two\n* @throws {RangeError} index argument is out-of-bounds\n* @throws {RangeError} target array lacks sufficient storage to accommodate source values\n* @returns {void}\n*\n* @example\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* var arr = new Complex64Array( 10 );\n*\n* var z = arr.get( 0 );\n* // returns \n*\n* var re = realf( z );\n* // returns 0.0\n*\n* var im = imagf( z );\n* // returns 0.0\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n*\n* z = arr.get( 0 );\n* // returns \n*\n* re = realf( z );\n* // returns 1.0\n*\n* im = imagf( z );\n* // returns -1.0\n*/\nsetReadOnly( Complex64Array.prototype, 'set', function set( value ) {\n\t/* eslint-disable no-underscore-dangle */\n\tvar sbuf;\n\tvar idx;\n\tvar buf;\n\tvar tmp;\n\tvar flg;\n\tvar N;\n\tvar v;\n\tvar i;\n\tvar j;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tbuf = this._buffer;\n\tif ( arguments.length > 1 ) {\n\t\tidx = arguments[ 1 ];\n\t\tif ( !isNonNegativeInteger( idx ) ) {\n\t\t\tthrow new TypeError( 'invalid argument. Index argument must be a nonnegative integer. Value: `'+idx+'`.' );\n\t\t}\n\t} else {\n\t\tidx = 0;\n\t}\n\tif ( isComplexLike( value ) ) {\n\t\tif ( idx >= this._length ) {\n\t\t\tthrow new RangeError( 'invalid argument. Index argument is out-of-bounds. Value: `'+idx+'`.' );\n\t\t}\n\t\tidx *= 2;\n\t\tbuf[ idx ] = realf( value );\n\t\tbuf[ idx+1 ] = imagf( value );\n\t\treturn;\n\t}\n\tif ( isComplexArray( value ) ) {\n\t\tN = value._length;\n\t\tif ( idx+N > this._length ) {\n\t\t\tthrow new RangeError( 'invalid arguments. Target array lacks sufficient storage to accommodate source values.' );\n\t\t}\n\t\tsbuf = value._buffer;\n\n\t\t// Check for overlapping memory...\n\t\tj = buf.byteOffset + (idx*BYTES_PER_ELEMENT);\n\t\tif (\n\t\t\tsbuf.buffer === buf.buffer &&\n\t\t\t(\n\t\t\t\tsbuf.byteOffset < j &&\n\t\t\t\tsbuf.byteOffset+sbuf.byteLength > j\n\t\t\t)\n\t\t) {\n\t\t\t// We need to copy source values...\n\t\t\ttmp = new Float32Array( sbuf.length );\n\t\t\tfor ( i = 0; i < sbuf.length; i++ ) {\n\t\t\t\ttmp[ i ] = sbuf[ i ];\n\t\t\t}\n\t\t\tsbuf = tmp;\n\t\t}\n\t\tidx *= 2;\n\t\tj = 0;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\tbuf[ idx ] = sbuf[ j ];\n\t\t\tbuf[ idx+1 ] = sbuf[ j+1 ];\n\t\t\tidx += 2; // stride\n\t\t\tj += 2; // stride\n\t\t}\n\t\treturn;\n\t}\n\tif ( isCollection( value ) ) {\n\t\t// Detect whether we've been provided an array of complex numbers...\n\t\tN = value.length;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\tif ( !isComplexLike( value[ i ] ) ) {\n\t\t\t\tflg = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t// If an array does not contain only complex numbers, then we assume interleaved real and imaginary components...\n\t\tif ( flg ) {\n\t\t\tif ( !isEven( N ) ) {\n\t\t\t\tthrow new RangeError( 'invalid argument. Array-like object arguments must have a length which is a multiple of two. Length: `'+N+'`.' );\n\t\t\t}\n\t\t\tif ( idx+(N/2) > this._length ) {\n\t\t\t\tthrow new RangeError( 'invalid arguments. Target array lacks sufficient storage to accommodate source values.' );\n\t\t\t}\n\t\t\tsbuf = value;\n\n\t\t\t// Check for overlapping memory...\n\t\t\tj = buf.byteOffset + (idx*BYTES_PER_ELEMENT);\n\t\t\tif (\n\t\t\t\tsbuf.buffer === buf.buffer &&\n\t\t\t\t(\n\t\t\t\t\tsbuf.byteOffset < j &&\n\t\t\t\t\tsbuf.byteOffset+sbuf.byteLength > j\n\t\t\t\t)\n\t\t\t) {\n\t\t\t\t// We need to copy source values...\n\t\t\t\ttmp = new Float32Array( N );\n\t\t\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\t\t\ttmp[ i ] = sbuf[ i ];\n\t\t\t\t}\n\t\t\t\tsbuf = tmp;\n\t\t\t}\n\t\t\tidx *= 2;\n\t\t\tN /= 2;\n\t\t\tj = 0;\n\t\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\t\tbuf[ idx ] = sbuf[ j ];\n\t\t\t\tbuf[ idx+1 ] = sbuf[ j+1 ];\n\t\t\t\tidx += 2; // stride\n\t\t\t\tj += 2; // stride\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\t// If an array contains only complex numbers, then we need to extract real and imaginary components...\n\t\tif ( idx+N > this._length ) {\n\t\t\tthrow new RangeError( 'invalid arguments. Target array lacks sufficient storage to accommodate source values.' );\n\t\t}\n\t\tidx *= 2;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\tv = value[ i ];\n\t\t\tbuf[ idx ] = realf( v );\n\t\t\tbuf[ idx+1 ] = imagf( v );\n\t\t\tidx += 2; // stride\n\t\t}\n\t\treturn;\n\t}\n\tthrow new TypeError( 'invalid argument. First argument must be either a complex number, an array-like object, or a complex number array. Value: `'+value+'`.' );\n\n\t/* eslint-enable no-underscore-dangle */\n});\n\n\n// EXPORTS //\n\nexport default Complex64Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Returns the real component of a double-precision complex floating-point number.\n*\n* @param {Complex} z - complex number\n* @returns {number} real component\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n*\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var re = real( z );\n* // returns 5.0\n*/\nfunction real( z ) {\n\treturn z.re;\n}\n\n\n// EXPORTS //\n\nexport default real;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Returns the imaginary component of a double-precision complex floating-point number.\n*\n* @param {Complex} z - complex number\n* @returns {number} imaginary component\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n*\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var im = imag( z );\n* // returns 3.0\n*/\nfunction imag( z ) {\n\treturn z.im;\n}\n\n\n// EXPORTS //\n\nexport default imag;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isArrayLikeObject from '@stdlib/assert-is-array-like-object';\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport real from '@stdlib/complex-real';\nimport imag from '@stdlib/complex-imag';\n\n\n// MAIN //\n\n/**\n* Returns an array of iterated values.\n*\n* @private\n* @param {Object} it - iterator\n* @returns {(Array|TypeError)} array or an error\n*/\nfunction fromIterator( it ) {\n\tvar out;\n\tvar v;\n\tvar z;\n\n\tout = [];\n\twhile ( true ) {\n\t\tv = it.next();\n\t\tif ( v.done ) {\n\t\t\tbreak;\n\t\t}\n\t\tz = v.value;\n\t\tif ( isArrayLikeObject( z ) && z.length >= 2 ) {\n\t\t\tout.push( z[ 0 ], z[ 1 ] );\n\t\t} else if ( isComplexLike( z ) ) {\n\t\t\tout.push( real( z ), imag( z ) );\n\t\t} else {\n\t\t\treturn new TypeError( 'invalid argument. An iterator must return either a two-element array containing real and imaginary components or a complex number. Value: `'+z+'`.' );\n\t\t}\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default fromIterator;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isArrayLikeObject from '@stdlib/assert-is-array-like-object';\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport real from '@stdlib/complex-real';\nimport imag from '@stdlib/complex-imag';\n\n\n// MAIN //\n\n/**\n* Returns an array of iterated values.\n*\n* @private\n* @param {Object} it - iterator\n* @param {Function} clbk - callback to invoke for each iterated value\n* @param {*} thisArg - invocation context\n* @returns {(Array|TypeError)} array or an error\n*/\nfunction fromIteratorMap( it, clbk, thisArg ) {\n\tvar out;\n\tvar v;\n\tvar z;\n\tvar i;\n\n\tout = [];\n\ti = -1;\n\twhile ( true ) {\n\t\tv = it.next();\n\t\tif ( v.done ) {\n\t\t\tbreak;\n\t\t}\n\t\ti += 1;\n\t\tz = clbk.call( thisArg, v.value, i );\n\t\tif ( isArrayLikeObject( z ) && z.length >= 2 ) {\n\t\t\tout.push( z[ 0 ], z[ 1 ] );\n\t\t} else if ( isComplexLike( z ) ) {\n\t\t\tout.push( real( z ), imag( z ) );\n\t\t} else {\n\t\t\treturn new TypeError( 'invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `'+z+'`.' );\n\t\t}\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default fromIteratorMap;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport real from '@stdlib/complex-real';\nimport imag from '@stdlib/complex-imag';\n\n\n// MAIN //\n\n/**\n* Returns a strided array of real and imaginary components.\n*\n* @private\n* @param {Float64Array} buf - output array\n* @param {Array} arr - array containing complex numbers\n* @returns {(Float64Array|null)} output array or null\n*/\nfunction fromArray( buf, arr ) {\n\tvar len;\n\tvar v;\n\tvar i;\n\tvar j;\n\n\tlen = arr.length;\n\tj = 0;\n\tfor ( i = 0; i < len; i++ ) {\n\t\tv = arr[ i ];\n\t\tif ( !isComplexLike( v ) ) {\n\t\t\treturn null;\n\t\t}\n\t\tbuf[ j ] = real( v );\n\t\tbuf[ j+1 ] = imag( v );\n\t\tj += 2; // stride\n\t}\n\treturn buf;\n}\n\n\n// EXPORTS //\n\nexport default fromArray;\n","/* eslint-disable no-restricted-syntax, max-lines, no-invalid-this */\n\n/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isNonNegativeInteger } from '@stdlib/assert-is-nonnegative-integer';\nimport isArrayLikeObject from '@stdlib/assert-is-array-like-object';\nimport isCollection from '@stdlib/assert-is-collection';\nimport isArrayBuffer from '@stdlib/assert-is-arraybuffer';\nimport isObject from '@stdlib/assert-is-object';\nimport isArray from '@stdlib/assert-is-array';\nimport isFunction from '@stdlib/assert-is-function';\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport isEven from '@stdlib/math-base-assert-is-even';\nimport isInteger from '@stdlib/math-base-assert-is-integer';\nimport hasIteratorSymbolSupport from '@stdlib/assert-has-iterator-symbol-support';\nimport ITERATOR_SYMBOL from '@stdlib/symbol-iterator';\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport setReadOnlyAccessor from '@stdlib/utils-define-nonenumerable-read-only-accessor';\nimport Float64Array from '@stdlib/array-float64';\nimport Complex128 from '@stdlib/complex-float64';\nimport real from '@stdlib/complex-real';\nimport imag from '@stdlib/complex-imag';\nimport reinterpret64 from '@stdlib/strided-base-reinterpret-complex64';\nimport reinterpret128 from '@stdlib/strided-base-reinterpret-complex128';\nimport arraylike2object from '@stdlib/array-base-arraylike2object';\nimport fromIterator from './from_iterator.js';\nimport fromIteratorMap from './from_iterator_map.js';\nimport fromArray from './from_array.js';\n\n\n// VARIABLES //\n\nvar BYTES_PER_ELEMENT = Float64Array.BYTES_PER_ELEMENT * 2;\nvar HAS_ITERATOR_SYMBOL = hasIteratorSymbolSupport();\n\n\n// FUNCTIONS //\n\n/**\n* Returns a boolean indicating if a value is a complex typed array.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a complex typed array\n*/\nfunction isComplexArray( value ) {\n\treturn (\n\t\tvalue instanceof Complex128Array ||\n\t\t(\n\t\t\ttypeof value === 'object' &&\n\t\t\tvalue !== null &&\n\t\t\t(\n\t\t\t\tvalue.constructor.name === 'Complex64Array' ||\n\t\t\t\tvalue.constructor.name === 'Complex128Array'\n\t\t\t) &&\n\t\t\ttypeof value._length === 'number' && // eslint-disable-line no-underscore-dangle\n\n\t\t\t// NOTE: we don't perform a more rigorous test here for a typed array for performance reasons, as robustly checking for a typed array instance could require walking the prototype tree and performing relatively expensive constructor checks...\n\t\t\ttypeof value._buffer === 'object' // eslint-disable-line no-underscore-dangle\n\t\t)\n\t);\n}\n\n/**\n* Returns a boolean indicating if a value is a complex typed array constructor.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a complex typed array constructor\n*/\nfunction isComplexArrayConstructor( value ) {\n\treturn (\n\t\tvalue === Complex128Array ||\n\n\t\t// NOTE: weaker test in order to avoid a circular dependency with Complex64Array...\n\t\tvalue.name === 'Complex64Array'\n\t);\n}\n\n/**\n* Returns a boolean indicating if a value is a `Complex64Array`.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a `Complex64Array`\n*/\nfunction isComplex64Array( value ) {\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\tvalue.constructor.name === 'Complex64Array' &&\n\t\tvalue.BYTES_PER_ELEMENT === BYTES_PER_ELEMENT/2\n\t);\n}\n\n/**\n* Returns a boolean indicating if a value is a `Complex128Array`.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a `Complex128Array`\n*/\nfunction isComplex128Array( value ) {\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\tvalue.constructor.name === 'Complex128Array' &&\n\t\tvalue.BYTES_PER_ELEMENT === BYTES_PER_ELEMENT\n\t);\n}\n\n\n// MAIN //\n\n/**\n* 128-bit complex number array constructor.\n*\n* @constructor\n* @param {(NonNegativeInteger|Collection|ArrayBuffer|Iterable)} [arg] - length, typed array, array-like object, buffer, or iterable\n* @param {NonNegativeInteger} [byteOffset=0] - byte offset\n* @param {NonNegativeInteger} [length] - view length\n* @throws {RangeError} ArrayBuffer byte length must be a multiple of `16`\n* @throws {RangeError} array-like object and typed array input arguments must have a length which is a multiple of two\n* @throws {TypeError} if provided only a single argument, must provide a valid argument\n* @throws {TypeError} byte offset must be a nonnegative integer\n* @throws {RangeError} byte offset must be a multiple of `16`\n* @throws {TypeError} view length must be a positive multiple of `16`\n* @throws {RangeError} must provide sufficient memory to accommodate byte offset and view length requirements\n* @throws {TypeError} an iterator must return either a two element array containing real and imaginary components or a complex number\n* @returns {Complex128Array} complex number array\n*\n* @example\n* var arr = new Complex128Array();\n* // returns \n*\n* var len = arr.length;\n* // returns 0\n*\n* @example\n* var arr = new Complex128Array( 2 );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*\n* @example\n* var arr = new Complex128Array( [ 1.0, -1.0 ] );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* import ArrayBuffer from '@stdlib/array-buffer';\n*\n* var buf = new ArrayBuffer( 32 );\n* var arr = new Complex128Array( buf );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*\n* @example\n* import ArrayBuffer from '@stdlib/array-buffer';\n*\n* var buf = new ArrayBuffer( 32 );\n* var arr = new Complex128Array( buf, 16 );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* import ArrayBuffer from '@stdlib/array-buffer';\n*\n* var buf = new ArrayBuffer( 64 );\n* var arr = new Complex128Array( buf, 16, 2 );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*/\nfunction Complex128Array() {\n\tvar byteOffset;\n\tvar nargs;\n\tvar buf;\n\tvar len;\n\n\tnargs = arguments.length;\n\tif ( !(this instanceof Complex128Array) ) {\n\t\tif ( nargs === 0 ) {\n\t\t\treturn new Complex128Array();\n\t\t}\n\t\tif ( nargs === 1 ) {\n\t\t\treturn new Complex128Array( arguments[0] );\n\t\t}\n\t\tif ( nargs === 2 ) {\n\t\t\treturn new Complex128Array( arguments[0], arguments[1] );\n\t\t}\n\t\treturn new Complex128Array( arguments[0], arguments[1], arguments[2] );\n\t}\n\t// Create the underlying data buffer...\n\tif ( nargs === 0 ) {\n\t\tbuf = new Float64Array( 0 ); // backward-compatibility\n\t} else if ( nargs === 1 ) {\n\t\tif ( isNonNegativeInteger( arguments[0] ) ) {\n\t\t\tbuf = new Float64Array( arguments[0]*2 );\n\t\t} else if ( isCollection( arguments[0] ) ) {\n\t\t\tbuf = arguments[ 0 ];\n\t\t\tlen = buf.length;\n\n\t\t\t// If provided a \"generic\" array, peak at the first value, and, if the value is a complex number, try to process as an array of complex numbers, falling back to \"normal\" typed array initialization if we fail and ensuring consistency if the first value had not been a complex number...\n\t\t\tif ( len && isArray( buf ) && isComplexLike( buf[0] ) ) {\n\t\t\t\tbuf = fromArray( new Float64Array( len*2 ), buf );\n\t\t\t\tif ( buf === null ) {\n\t\t\t\t\t// We failed and we are now forced to allocate a new array :-(\n\t\t\t\t\tif ( !isEven( len ) ) {\n\t\t\t\t\t\tthrow new RangeError( 'invalid argument. Array-like object input arguments must have a length which is a multiple of two. Length: `'+len+'`.' );\n\t\t\t\t\t}\n\t\t\t\t\t// We failed, so fall back to directly setting values...\n\t\t\t\t\tbuf = new Float64Array( arguments[0] );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ( isComplex64Array( buf ) ) {\n\t\t\t\t\tbuf = reinterpret64( buf, 0 );\n\t\t\t\t} else if ( isComplex128Array( buf ) ) {\n\t\t\t\t\tbuf = reinterpret128( buf, 0 );\n\t\t\t\t} else if ( !isEven( len ) ) {\n\t\t\t\t\tthrow new RangeError( 'invalid argument. Array-like object and typed array input arguments must have a length which is a multiple of two. Length: `'+len+'`.' );\n\t\t\t\t}\n\t\t\t\tbuf = new Float64Array( buf );\n\t\t\t}\n\t\t} else if ( isArrayBuffer( arguments[0] ) ) {\n\t\t\tbuf = arguments[ 0 ];\n\t\t\tif ( !isInteger( buf.byteLength/BYTES_PER_ELEMENT ) ) {\n\t\t\t\tthrow new RangeError( 'invalid argument. ArrayBuffer byte length must be a multiple of '+BYTES_PER_ELEMENT+'. Byte length: `'+buf.byteLength+'`.' );\n\t\t\t}\n\t\t\tbuf = new Float64Array( buf );\n\t\t} else if ( isObject( arguments[0] ) ) {\n\t\t\tbuf = arguments[ 0 ];\n\t\t\tif ( HAS_ITERATOR_SYMBOL === false ) {\n\t\t\t\tthrow new TypeError( 'invalid argument. Environment lacks Symbol.iterator support. Must provide a length, ArrayBuffer, typed array, or array-like object. Value: `'+buf+'`.' );\n\t\t\t}\n\t\t\tif ( !isFunction( buf[ ITERATOR_SYMBOL ] ) ) {\n\t\t\t\tthrow new TypeError( 'invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `'+buf+'`.' );\n\t\t\t}\n\t\t\tbuf = buf[ ITERATOR_SYMBOL ]();\n\t\t\tif ( !isFunction( buf.next ) ) {\n\t\t\t\tthrow new TypeError( 'invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable.' );\n\t\t\t}\n\t\t\tbuf = fromIterator( buf );\n\t\t\tif ( buf instanceof Error ) {\n\t\t\t\tthrow buf;\n\t\t\t}\n\t\t\tbuf = new Float64Array( buf );\n\t\t} else {\n\t\t\tthrow new TypeError( 'invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `'+arguments[0]+'`.' );\n\t\t}\n\t} else {\n\t\tbuf = arguments[ 0 ];\n\t\tif ( !isArrayBuffer( buf ) ) {\n\t\t\tthrow new TypeError( 'invalid argument. First argument must be an array buffer. Value: `'+buf+'`.' );\n\t\t}\n\t\tbyteOffset = arguments[ 1 ];\n\t\tif ( !isNonNegativeInteger( byteOffset ) ) {\n\t\t\tthrow new TypeError( 'invalid argument. Byte offset must be a nonnegative integer. Value: `'+byteOffset+'`.' );\n\t\t}\n\t\tif ( !isInteger( byteOffset/BYTES_PER_ELEMENT ) ) {\n\t\t\tthrow new RangeError( 'invalid argument. Byte offset must be a multiple of '+BYTES_PER_ELEMENT+'. Value: `'+byteOffset+'`.' );\n\t\t}\n\t\tif ( nargs === 2 ) {\n\t\t\tlen = buf.byteLength - byteOffset;\n\t\t\tif ( !isInteger( len/BYTES_PER_ELEMENT ) ) {\n\t\t\t\tthrow new RangeError( 'invalid arguments. ArrayBuffer view byte length must be a multiple of '+BYTES_PER_ELEMENT+'. View byte length: `'+len+'`.' );\n\t\t\t}\n\t\t\tbuf = new Float64Array( buf, byteOffset );\n\t\t} else {\n\t\t\tlen = arguments[ 2 ];\n\t\t\tif ( !isNonNegativeInteger( len ) ) {\n\t\t\t\tthrow new TypeError( 'invalid argument. Length must be a nonnegative integer. Value: `'+len+'`.' );\n\t\t\t}\n\t\t\tif ( (len*BYTES_PER_ELEMENT) > (buf.byteLength-byteOffset) ) {\n\t\t\t\tthrow new RangeError( 'invalid arguments. ArrayBuffer has insufficient capacity. Either decrease the array length or provide a bigger buffer. Minimum capacity: `'+(len*BYTES_PER_ELEMENT)+'`.' );\n\t\t\t}\n\t\t\tbuf = new Float64Array( buf, byteOffset, len*2 );\n\t\t}\n\t}\n\tsetReadOnly( this, '_buffer', buf );\n\tsetReadOnly( this, '_length', buf.length/2 );\n\n\treturn this;\n}\n\n/**\n* Size (in bytes) of each array element.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex128Array\n* @readonly\n* @type {PositiveInteger}\n* @default 16\n*\n* @example\n* var nbytes = Complex128Array.BYTES_PER_ELEMENT;\n* // returns 16\n*/\nsetReadOnly( Complex128Array, 'BYTES_PER_ELEMENT', BYTES_PER_ELEMENT );\n\n/**\n* Constructor name.\n*\n* @name name\n* @memberof Complex128Array\n* @readonly\n* @type {string}\n* @default 'Complex128Array'\n*\n* @example\n* var name = Complex128Array.name;\n* // returns 'Complex128Array'\n*/\nsetReadOnly( Complex128Array, 'name', 'Complex128Array' );\n\n/**\n* Creates a new 128-bit complex number array from an array-like object or an iterable.\n*\n* @name from\n* @memberof Complex128Array\n* @type {Function}\n* @param {(Collection|Object)} src - array-like object or iterable\n* @param {Function} [clbk] - callback to invoke for each source element\n* @param {*} [thisArg] - context\n* @throws {TypeError} `this` context must be a constructor\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be an array-like object or an iterable\n* @throws {TypeError} second argument must be a function\n* @throws {RangeError} array-like objects must have a length which is a multiple of two\n* @throws {TypeError} an iterator must return either a two element array containing real and imaginary components or a complex number\n* @throws {TypeError} when provided an iterator, a callback must return either a two element array containing real and imaginary components or a complex number\n* @returns {Complex128Array} 128-bit complex number array\n*\n* @example\n* var arr = Complex128Array.from( [ 1.0, -1.0 ] );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n*\n* var arr = Complex128Array.from( [ new Complex128( 1.0, 1.0 ) ] );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* function clbk( v ) {\n* return new Complex128( real(v)*2.0, imag(v)*2.0 );\n* }\n*\n* var arr = Complex128Array.from( [ new Complex128( 1.0, 1.0 ) ], clbk );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*/\nsetReadOnly( Complex128Array, 'from', function from( src ) {\n\tvar thisArg;\n\tvar nargs;\n\tvar clbk;\n\tvar out;\n\tvar buf;\n\tvar tmp;\n\tvar len;\n\tvar flg;\n\tvar v;\n\tvar i;\n\tvar j;\n\tif ( !isFunction( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` context must be a constructor.' );\n\t}\n\tif ( !isComplexArrayConstructor( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tnargs = arguments.length;\n\tif ( nargs > 1 ) {\n\t\tclbk = arguments[ 1 ];\n\t\tif ( !isFunction( clbk ) ) {\n\t\t\tthrow new TypeError( 'invalid argument. Second argument must be a function. Value: `'+clbk+'`.' );\n\t\t}\n\t\tif ( nargs > 2 ) {\n\t\t\tthisArg = arguments[ 2 ];\n\t\t}\n\t}\n\tif ( isComplexArray( src ) ) {\n\t\tlen = src.length;\n\t\tif ( clbk ) {\n\t\t\tout = new this( len );\n\t\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\t\tj = 0;\n\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\tv = clbk.call( thisArg, src.get( i ), i );\n\t\t\t\tif ( isComplexLike( v ) ) {\n\t\t\t\t\tbuf[ j ] = real( v );\n\t\t\t\t\tbuf[ j+1 ] = imag( v );\n\t\t\t\t} else if ( isArrayLikeObject( v ) && v.length >= 2 ) {\n\t\t\t\t\tbuf[ j ] = v[ 0 ];\n\t\t\t\t\tbuf[ j+1 ] = v[ 1 ];\n\t\t\t\t} else {\n\t\t\t\t\tthrow new TypeError( 'invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `'+v+'`.' );\n\t\t\t\t}\n\t\t\t\tj += 2; // stride\n\t\t\t}\n\t\t\treturn out;\n\t\t}\n\t\treturn new this( src );\n\t}\n\tif ( isCollection( src ) ) {\n\t\tif ( clbk ) {\n\t\t\t// Note: array contents affect how we iterate over a provided data source. If only complex number objects, we can extract real and imaginary components. Otherwise, for non-complex number arrays (e.g., `Float64Array`, etc), we assume a strided array where real and imaginary components are interleaved. In the former case, we expect a callback to return real and imaginary components (possibly as a complex number). In the latter case, we expect a callback to return *either* a real or imaginary component.\n\n\t\t\tlen = src.length;\n\t\t\ttmp = arraylike2object( src );\n\n\t\t\t// Detect whether we've been provided an array which returns complex number objects...\n\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\tif ( !isComplexLike( tmp.getter( src, i ) ) ) {\n\t\t\t\t\tflg = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// If an array does not contain only complex number objects, then we assume interleaved real and imaginary components...\n\t\t\tif ( flg ) {\n\t\t\t\tif ( !isEven( len ) ) {\n\t\t\t\t\tthrow new RangeError( 'invalid argument. First argument must have a length which is a multiple of two. Length: `'+len+'`.' );\n\t\t\t\t}\n\t\t\t\tout = new this( len/2 );\n\t\t\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\t\tbuf[ i ] = clbk.call( thisArg, tmp.getter( src, i ), i );\n\t\t\t\t}\n\t\t\t\treturn out;\n\t\t\t}\n\t\t\t// If an array contains only complex number objects, then we need to extract real and imaginary components...\n\t\t\tout = new this( len );\n\t\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\t\tj = 0;\n\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\tv = clbk.call( thisArg, tmp.getter( src, i ), i );\n\t\t\t\tif ( isComplexLike( v ) ) {\n\t\t\t\t\tbuf[ j ] = real( v );\n\t\t\t\t\tbuf[ j+1 ] = imag( v );\n\t\t\t\t} else if ( isArrayLikeObject( v ) && v.length >= 2 ) {\n\t\t\t\t\tbuf[ j ] = v[ 0 ];\n\t\t\t\t\tbuf[ j+1 ] = v[ 1 ];\n\t\t\t\t} else {\n\t\t\t\t\tthrow new TypeError( 'invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `'+v+'`.' );\n\t\t\t\t}\n\t\t\t\tj += 2; // stride\n\t\t\t}\n\t\t\treturn out;\n\t\t}\n\t\treturn new this( src );\n\t}\n\tif ( isObject( src ) && HAS_ITERATOR_SYMBOL && isFunction( src[ ITERATOR_SYMBOL ] ) ) { // eslint-disable-line max-len\n\t\tbuf = src[ ITERATOR_SYMBOL ]();\n\t\tif ( !isFunction( buf.next ) ) {\n\t\t\tthrow new TypeError( 'invalid argument. First argument must be an array-like object or an iterable.' );\n\t\t}\n\t\tif ( clbk ) {\n\t\t\ttmp = fromIteratorMap( buf, clbk, thisArg );\n\t\t} else {\n\t\t\ttmp = fromIterator( buf );\n\t\t}\n\t\tif ( tmp instanceof Error ) {\n\t\t\tthrow tmp;\n\t\t}\n\t\tlen = tmp.length / 2;\n\t\tout = new this( len );\n\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\tbuf[ i ] = tmp[ i ];\n\t\t}\n\t\treturn out;\n\t}\n\tthrow new TypeError( 'invalid argument. First argument must be an array-like object or an iterable. Value: `'+src+'`.' );\n});\n\n/**\n* Creates a new 128-bit complex number array from a variable number of arguments.\n*\n* @name of\n* @memberof Complex128Array\n* @type {Function}\n* @param {...*} element - array elements\n* @throws {TypeError} `this` context must be a constructor\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Complex128Array} 128-bit complex number array\n*\n* @example\n* var arr = Complex128Array.of( 1.0, 1.0, 1.0, 1.0 );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*/\nsetReadOnly( Complex128Array, 'of', function of() {\n\tvar args;\n\tvar i;\n\tif ( !isFunction( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` context must be a constructor.' );\n\t}\n\tif ( !isComplexArrayConstructor( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\targs = [];\n\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\targs.push( arguments[ i ] );\n\t}\n\treturn new this( args );\n});\n\n/**\n* Pointer to the underlying data buffer.\n*\n* @name buffer\n* @memberof Complex128Array.prototype\n* @readonly\n* @type {ArrayBuffer}\n*\n* @example\n* var arr = new Complex128Array( 10 );\n*\n* var buf = arr.buffer;\n* // returns \n*/\nsetReadOnlyAccessor( Complex128Array.prototype, 'buffer', function get() {\n\treturn this._buffer.buffer;\n});\n\n/**\n* Size (in bytes) of the array.\n*\n* @name byteLength\n* @memberof Complex128Array.prototype\n* @readonly\n* @type {NonNegativeInteger}\n*\n* @example\n* var arr = new Complex128Array( 10 );\n*\n* var byteLength = arr.byteLength;\n* // returns 160\n*/\nsetReadOnlyAccessor( Complex128Array.prototype, 'byteLength', function get() {\n\treturn this._buffer.byteLength;\n});\n\n/**\n* Offset (in bytes) of the array from the start of its underlying `ArrayBuffer`.\n*\n* @name byteOffset\n* @memberof Complex128Array.prototype\n* @readonly\n* @type {NonNegativeInteger}\n*\n* @example\n* var arr = new Complex128Array( 10 );\n*\n* var byteOffset = arr.byteOffset;\n* // returns 0\n*/\nsetReadOnlyAccessor( Complex128Array.prototype, 'byteOffset', function get() {\n\treturn this._buffer.byteOffset;\n});\n\n/**\n* Size (in bytes) of each array element.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex128Array.prototype\n* @readonly\n* @type {PositiveInteger}\n* @default 16\n*\n* @example\n* var arr = new Complex128Array( 10 );\n*\n* var nbytes = arr.BYTES_PER_ELEMENT;\n* // returns 16\n*/\nsetReadOnly( Complex128Array.prototype, 'BYTES_PER_ELEMENT', Complex128Array.BYTES_PER_ELEMENT );\n\n/**\n* Copies a sequence of elements within the array to the position starting at `target`.\n*\n* @name copyWithin\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {integer} target - index at which to start copying elements\n* @param {integer} start - source index at which to copy elements from\n* @param {integer} [end] - source index at which to stop copying elements from\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Complex128Array} modified array\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* var arr = new Complex128Array( 4 );\n*\n* // Set the array elements:\n* arr.set( new Complex128( 1.0, 1.0 ), 0 );\n* arr.set( new Complex128( 2.0, 2.0 ), 1 );\n* arr.set( new Complex128( 3.0, 3.0 ), 2 );\n* arr.set( new Complex128( 4.0, 4.0 ), 3 );\n*\n* // Copy the first two elements to the last two elements:\n* arr.copyWithin( 2, 0, 2 );\n*\n* // Get the last array element:\n* var z = arr.get( 3 );\n*\n* var re = real( z );\n* // returns 2.0\n*\n* var im = imag( z );\n* // returns 2.0\n*/\nsetReadOnly( Complex128Array.prototype, 'copyWithin', function copyWithin( target, start ) {\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\t// FIXME: prefer a functional `copyWithin` implementation which addresses lack of universal browser support (e.g., IE11 and Safari) or ensure that typed arrays are polyfilled\n\tif ( arguments.length === 2 ) {\n\t\tthis._buffer.copyWithin( target*2, start*2 );\n\t} else {\n\t\tthis._buffer.copyWithin( target*2, start*2, arguments[2]*2 );\n\t}\n\treturn this;\n});\n\n/**\n* Returns an iterator for iterating over array key-value pairs.\n*\n* @name entries\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Iterator} iterator\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n*\n* var arr = [\n* new Complex128( 1.0, 1.0 ),\n* new Complex128( 2.0, 2.0 ),\n* new Complex128( 3.0, 3.0 )\n* ];\n* arr = new Complex128Array( arr );\n*\n* // Create an iterator:\n* var it = arr.entries();\n*\n* // Iterate over the key-value pairs...\n* var v = it.next().value;\n* // returns [ 0, ]\n*\n* v = it.next().value;\n* // returns [ 1, ]\n*\n* v = it.next().value;\n* // returns [ 2, ]\n*\n* var bool = it.next().done;\n* // returns true\n*/\nsetReadOnly( Complex128Array.prototype, 'entries', function entries() {\n\tvar buffer;\n\tvar self;\n\tvar iter;\n\tvar len;\n\tvar FLG;\n\tvar i;\n\tvar j;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tself = this;\n\tbuffer = this._buffer;\n\tlen = this._length;\n\n\t// Initialize the iteration indices:\n\ti = -1;\n\tj = -2;\n\n\t// Create an iterator protocol-compliant object:\n\titer = {};\n\tsetReadOnly( iter, 'next', next );\n\tsetReadOnly( iter, 'return', end );\n\n\tif ( ITERATOR_SYMBOL ) {\n\t\tsetReadOnly( iter, ITERATOR_SYMBOL, factory );\n\t}\n\treturn iter;\n\n\t/**\n\t* Returns an iterator protocol-compliant object containing the next iterated value.\n\t*\n\t* @private\n\t* @returns {Object} iterator protocol-compliant object\n\t*/\n\tfunction next() {\n\t\tvar z;\n\t\ti += 1;\n\t\tif ( FLG || i >= len ) {\n\t\t\treturn {\n\t\t\t\t'done': true\n\t\t\t};\n\t\t}\n\t\tj += 2;\n\t\tz = new Complex128( buffer[ j ], buffer[ j+1 ] );\n\t\treturn {\n\t\t\t'value': [ i, z ],\n\t\t\t'done': false\n\t\t};\n\t}\n\n\t/**\n\t* Finishes an iterator.\n\t*\n\t* @private\n\t* @param {*} [value] - value to return\n\t* @returns {Object} iterator protocol-compliant object\n\t*/\n\tfunction end( value ) {\n\t\tFLG = true;\n\t\tif ( arguments.length ) {\n\t\t\treturn {\n\t\t\t\t'value': value,\n\t\t\t\t'done': true\n\t\t\t};\n\t\t}\n\t\treturn {\n\t\t\t'done': true\n\t\t};\n\t}\n\n\t/**\n\t* Returns a new iterator.\n\t*\n\t* @private\n\t* @returns {Iterator} iterator\n\t*/\n\tfunction factory() {\n\t\treturn self.entries();\n\t}\n});\n\n/**\n* Returns an array element.\n*\n* @name get\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {NonNegativeInteger} idx - element index\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} must provide a nonnegative integer\n* @returns {(Complex128|void)} array element\n*\n* @example\n* var arr = new Complex128Array( 10 );\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* var z = arr.get( 0 );\n* // returns \n*\n* var re = real( z );\n* // returns 0.0\n*\n* var im = imag( z );\n* // returns 0.0\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n*\n* z = arr.get( 0 );\n* // returns \n*\n* re = real( z );\n* // returns 1.0\n*\n* im = imag( z );\n* // returns -1.0\n*\n* z = arr.get( 100 );\n* // returns undefined\n*/\nsetReadOnly( Complex128Array.prototype, 'get', function get( idx ) {\n\tvar buf;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isNonNegativeInteger( idx ) ) {\n\t\tthrow new TypeError( 'invalid argument. Must provide a nonnegative integer. Value: `'+idx+'`.' );\n\t}\n\tif ( idx >= this._length ) {\n\t\treturn;\n\t}\n\tbuf = this._buffer;\n\tidx *= 2;\n\treturn new Complex128( buf[ idx ], buf[ idx+1 ] );\n});\n\n/**\n* Number of array elements.\n*\n* @name length\n* @memberof Complex128Array.prototype\n* @readonly\n* @type {NonNegativeInteger}\n*\n* @example\n* var arr = new Complex128Array( 10 );\n*\n* var len = arr.length;\n* // returns 10\n*/\nsetReadOnlyAccessor( Complex128Array.prototype, 'length', function get() {\n\treturn this._length;\n});\n\n/**\n* Sets an array element.\n*\n* ## Notes\n*\n* - When provided a typed array, real or complex, we must check whether the source array shares the same buffer as the target array and whether the underlying memory overlaps. In particular, we are concerned with the following scenario:\n*\n* ```text\n* buf: ---------------------\n* src: ---------------------\n* ```\n*\n* In the above, as we copy values from `src`, we will overwrite values in the `src` view, resulting in duplicated values copied into the end of `buf`, which is not intended. Hence, to avoid overwriting source values, we must **copy** source values to a temporary array.\n*\n* In the other overlapping scenario,\n*\n* ```text\n* buf: ---------------------\n* src: ---------------------\n* ```\n*\n* by the time we begin copying into the overlapping region, we are copying from the end of `src`, a non-overlapping region, which means we don't run the risk of copying copied values, rather than the original `src` values as intended.\n*\n*\n* @name set\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {(Collection|Complex|ComplexArray)} value - value(s)\n* @param {NonNegativeInteger} [i=0] - element index at which to start writing values\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be either a complex number, an array-like object, or a complex number array\n* @throws {TypeError} index argument must be a nonnegative integer\n* @throws {RangeError} array-like objects must have a length which is a multiple of two\n* @throws {RangeError} index argument is out-of-bounds\n* @throws {RangeError} target array lacks sufficient storage to accommodate source values\n* @returns {void}\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* var arr = new Complex128Array( 10 );\n*\n* var z = arr.get( 0 );\n* // returns \n*\n* var re = real( z );\n* // returns 0.0\n*\n* var im = imag( z );\n* // returns 0.0\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n*\n* z = arr.get( 0 );\n* // returns \n*\n* re = real( z );\n* // returns 1.0\n*\n* im = imag( z );\n* // returns -1.0\n*/\nsetReadOnly( Complex128Array.prototype, 'set', function set( value ) {\n\t/* eslint-disable no-underscore-dangle */\n\tvar sbuf;\n\tvar idx;\n\tvar buf;\n\tvar tmp;\n\tvar flg;\n\tvar N;\n\tvar v;\n\tvar i;\n\tvar j;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tbuf = this._buffer;\n\tif ( arguments.length > 1 ) {\n\t\tidx = arguments[ 1 ];\n\t\tif ( !isNonNegativeInteger( idx ) ) {\n\t\t\tthrow new TypeError( 'invalid argument. Index argument must be a nonnegative integer. Value: `'+idx+'`.' );\n\t\t}\n\t} else {\n\t\tidx = 0;\n\t}\n\tif ( isComplexLike( value ) ) {\n\t\tif ( idx >= this._length ) {\n\t\t\tthrow new RangeError( 'invalid argument. Index argument is out-of-bounds. Value: `'+idx+'`.' );\n\t\t}\n\t\tidx *= 2;\n\t\tbuf[ idx ] = real( value );\n\t\tbuf[ idx+1 ] = imag( value );\n\t\treturn;\n\t}\n\tif ( isComplexArray( value ) ) {\n\t\tN = value._length;\n\t\tif ( idx+N > this._length ) {\n\t\t\tthrow new RangeError( 'invalid arguments. Target array lacks sufficient storage to accommodate source values.' );\n\t\t}\n\t\tsbuf = value._buffer;\n\n\t\t// Check for overlapping memory...\n\t\tj = buf.byteOffset + (idx*BYTES_PER_ELEMENT);\n\t\tif (\n\t\t\tsbuf.buffer === buf.buffer &&\n\t\t\t(\n\t\t\t\tsbuf.byteOffset < j &&\n\t\t\t\tsbuf.byteOffset+sbuf.byteLength > j\n\t\t\t)\n\t\t) {\n\t\t\t// We need to copy source values...\n\t\t\ttmp = new Float64Array( sbuf.length );\n\t\t\tfor ( i = 0; i < sbuf.length; i++ ) {\n\t\t\t\ttmp[ i ] = sbuf[ i ];\n\t\t\t}\n\t\t\tsbuf = tmp;\n\t\t}\n\t\tidx *= 2;\n\t\tj = 0;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\tbuf[ idx ] = sbuf[ j ];\n\t\t\tbuf[ idx+1 ] = sbuf[ j+1 ];\n\t\t\tidx += 2; // stride\n\t\t\tj += 2; // stride\n\t\t}\n\t\treturn;\n\t}\n\tif ( isCollection( value ) ) {\n\t\t// Detect whether we've been provided an array of complex numbers...\n\t\tN = value.length;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\tif ( !isComplexLike( value[ i ] ) ) {\n\t\t\t\tflg = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t// If an array does not contain only complex numbers, then we assume interleaved real and imaginary components...\n\t\tif ( flg ) {\n\t\t\tif ( !isEven( N ) ) {\n\t\t\t\tthrow new RangeError( 'invalid argument. Array-like object arguments must have a length which is a multiple of two. Length: `'+N+'`.' );\n\t\t\t}\n\t\t\tif ( idx+(N/2) > this._length ) {\n\t\t\t\tthrow new RangeError( 'invalid arguments. Target array lacks sufficient storage to accommodate source values.' );\n\t\t\t}\n\t\t\tsbuf = value;\n\n\t\t\t// Check for overlapping memory...\n\t\t\tj = buf.byteOffset + (idx*BYTES_PER_ELEMENT);\n\t\t\tif (\n\t\t\t\tsbuf.buffer === buf.buffer &&\n\t\t\t\t(\n\t\t\t\t\tsbuf.byteOffset < j &&\n\t\t\t\t\tsbuf.byteOffset+sbuf.byteLength > j\n\t\t\t\t)\n\t\t\t) {\n\t\t\t\t// We need to copy source values...\n\t\t\t\ttmp = new Float64Array( N );\n\t\t\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\t\t\ttmp[ i ] = sbuf[ i ];\n\t\t\t\t}\n\t\t\t\tsbuf = tmp;\n\t\t\t}\n\t\t\tidx *= 2;\n\t\t\tN /= 2;\n\t\t\tj = 0;\n\t\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\t\tbuf[ idx ] = sbuf[ j ];\n\t\t\t\tbuf[ idx+1 ] = sbuf[ j+1 ];\n\t\t\t\tidx += 2; // stride\n\t\t\t\tj += 2; // stride\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\t// If an array contains only complex numbers, then we need to extract real and imaginary components...\n\t\tif ( idx+N > this._length ) {\n\t\t\tthrow new RangeError( 'invalid arguments. Target array lacks sufficient storage to accommodate source values.' );\n\t\t}\n\t\tidx *= 2;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\tv = value[ i ];\n\t\t\tbuf[ idx ] = real( v );\n\t\t\tbuf[ idx+1 ] = imag( v );\n\t\t\tidx += 2; // stride\n\t\t}\n\t\treturn;\n\t}\n\tthrow new TypeError( 'invalid argument. First argument must be either a complex number, an array-like object, or a complex number array. Value: `'+value+'`.' );\n\n\t/* eslint-enable no-underscore-dangle */\n});\n\n\n// EXPORTS //\n\nexport default Complex128Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport Float64Array from '@stdlib/array-float64';\nimport Float32Array from '@stdlib/array-float32';\nimport Int16Array from '@stdlib/array-int16';\nimport Int32Array from '@stdlib/array-int32';\nimport Int8Array from '@stdlib/array-int8';\nimport Uint16Array from '@stdlib/array-uint16';\nimport Uint32Array from '@stdlib/array-uint32';\nimport Uint8Array from '@stdlib/array-uint8';\nimport Uint8ClampedArray from '@stdlib/array-uint8c';\nimport Complex64Array from '@stdlib/array-complex64';\nimport Complex128Array from '@stdlib/array-complex128';\n\n\n// MAIN //\n\n// Mapping from data types to constructors...\nvar ctors = {\n\t'float64': Float64Array,\n\t'float32': Float32Array,\n\t'generic': Array, // TODO: replace with `stdlib` pkg\n\t'int16': Int16Array,\n\t'int32': Int32Array,\n\t'int8': Int8Array,\n\t'uint16': Uint16Array,\n\t'uint32': Uint32Array,\n\t'uint8': Uint8Array,\n\t'uint8c': Uint8ClampedArray,\n\t'complex64': Complex64Array,\n\t'complex128': Complex128Array\n};\n\n\n// EXPORTS //\n\nexport default ctors;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport table from './ctors.js';\n\n\n// MAIN //\n\n/**\n* Returns an array constructor.\n*\n* @param {string} dtype - data type\n* @returns {(Function|null)} constructor or null\n*\n* @example\n* var ctor = ctors( 'float64' );\n* // returns \n*\n* @example\n* var ctor = ctors( 'float' );\n* // returns null\n*/\nfunction ctors( dtype ) {\n\treturn table[ dtype ] || null;\n}\n\n\n// EXPORTS //\n\nexport default ctors;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport filled from '@stdlib/array-base-filled';\n\n\n// MAIN //\n\n/**\n* Returns a zero-filled \"generic\" array.\n*\n* @param {NonNegativeInteger} len - array length\n* @returns {Array} output array\n*\n* @example\n* var out = zeros( 3 );\n* // returns [ 0.0, 0.0, 0.0 ]\n*/\nfunction zeros( len ) {\n\treturn filled( 0.0, len );\n}\n\n\n// EXPORTS //\n\nexport default zeros;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Returns a filled \"generic\" array.\n*\n* @param {*} value - fill value\n* @param {NonNegativeInteger} len - array length\n* @returns {Array} filled array\n*\n* @example\n* var out = filled( 0.0, 3 );\n* // returns [ 0.0, 0.0, 0.0 ]\n*\n* @example\n* var out = filled( 'beep', 3 );\n* // returns [ 'beep', 'beep', 'beep' ]\n*/\nfunction filled( value, len ) {\n\tvar arr;\n\tvar i;\n\n\t// Manually push elements in order to ensure \"fast\" elements...\n\tarr = [];\n\tfor ( i = 0; i < len; i++ ) {\n\t\tarr.push( value );\n\t}\n\treturn arr;\n}\n\n\n// EXPORTS //\n\nexport default filled;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isNonNegativeInteger } from '@stdlib/assert-is-nonnegative-integer';\nimport ctors from '@stdlib/array-ctors';\nimport gzeros from '@stdlib/array-base-zeros';\n\n\n// MAIN //\n\n/**\n* Creates a zero-filled array having a specified length.\n*\n* @param {NonNegativeInteger} length - array length\n* @param {string} [dtype=\"float64\"] - data type\n* @throws {TypeError} first argument must be a nonnegative integer\n* @throws {TypeError} second argument must be a recognized data type\n* @returns {(TypedArray|Array|ComplexArray)} array or typed array\n*\n* @example\n* var arr = zeros( 2 );\n* // returns [ 0.0, 0.0 ]\n*\n* @example\n* var arr = zeros( 2, 'float32' );\n* // returns [ 0.0, 0.0 ]\n*/\nfunction zeros( length ) {\n\tvar dtype;\n\tvar ctor;\n\tif ( !isNonNegativeInteger( length ) ) {\n\t\tthrow new TypeError( 'invalid argument. First argument must be a nonnegative integer. Value: `' + length + '`.' );\n\t}\n\tif ( arguments.length > 1 ) {\n\t\tdtype = arguments[ 1 ];\n\t} else {\n\t\tdtype = 'float64';\n\t}\n\tif ( dtype === 'generic' ) {\n\t\treturn gzeros( length );\n\t}\n\tctor = ctors( dtype );\n\tif ( ctor === null ) {\n\t\tthrow new TypeError( 'invalid argument. Second argument must be a recognized data type. Value: `' + dtype + '`.' );\n\t}\n\treturn new ctor( length ); // WARNING: we assume that, apart from 'generic', the constructors for supported array data types are zero-filled by default\n}\n\n\n// EXPORTS //\n\nexport default zeros;\n","/**\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// MODULES //\n\nimport zeros from '@stdlib/array-zeros';\n\n\n// MAIN //\n\n/**\n* Creates an uninitialized array having a specified length.\n*\n* @private\n* @param {NonNegativeInteger} length - array length\n* @param {string} [dtype=\"float64\"] - data type\n* @throws {TypeError} first argument must be a nonnegative integer\n* @throws {TypeError} second argument must be a recognized data type\n* @returns {(TypedArray|Array|ComplexArray)} array or typed array\n*\n* @example\n* var arr = empty( 2 );\n* // returns \n*\n* @example\n* var arr = empty( 2, 'float32' );\n* // returns \n*/\nfunction empty( length ) {\n\tif ( arguments.length > 1 ) {\n\t\treturn zeros( length, arguments[ 1 ] );\n\t}\n\treturn zeros( length );\n}\n\n\n// EXPORTS //\n\nexport default empty;\n"],"names":["main","Object","defineProperty","objectProtoype","prototype","toStr","toString","defineGetter","__defineGetter__","defineSetter","__defineSetter__","lookupGetter","__lookupGetter__","lookupSetter","__lookupSetter__","err","hasDefinePropertySupport","builtin","obj","prop","descriptor","hasValue","hasGet","hasSet","call","TypeError","__proto__","value","Error","get","set","defineProperty$1","setNonEnumerableReadOnly","configurable","enumerable","writable","isNumber","FLG","Symbol","hasToStringTagSupport","toStringTag","has","hasOwnProperty","hasOwnProp","property","toStrTag","nativeClass$1","hasToStringTag","v","isOwn","tag","out","Number$1","Number","test","nativeClass","isPrimitive","isObject","setReadOnly","FLOAT64_PINF","POSITIVE_INFINITY","FLOAT64_NINF","NEGATIVE_INFINITY","floor","Math","isInteger","x","PINF","NINF","isInt","valueOf","isNonNegativeInteger","hasFloat64Array","Float64Array","ctor","Float64Array$1","bool","arr","GlobalFloat64Array","NaN","hasFloat64ArraySupport","hasFloat32Array","Float32Array","Float32Array$1","GlobalFloat32Array","hasFloat32ArraySupport","hasInt16Array","Int16Array","Int16Array$1","GlobalInt16Array","INT16_MAX","hasInt16ArraySupport","hasInt32Array","Int32Array","Int32Array$1","GlobalInt32Array","INT32_MAX","hasInt32ArraySupport","hasInt8Array","Int8Array","Int8Array$1","GlobalInt8Array","INT8_MAX","hasInt8ArraySupport","hasUint16Array","Uint16Array","Uint16Array$1","GlobalUint16Array","UINT16_MAX","hasUint16ArraySupport","hasUint32Array","Uint32Array","Uint32Array$1","GlobalUint32Array","UINT32_MAX","hasUint32ArraySupport","hasUint8Array","Uint8Array","Uint8Array$1","GlobalUint8Array","UINT8_MAX","hasUint8ArraySupport","hasUint8ClampedArray","Uint8ClampedArray","Uint8ClampedArray$1","GlobalUint8ClampedArray","hasUint8ClampedArraySupport","isArrayLikeObject","length","isCollection","hasArrayBuffer","ArrayBuffer","isArrayBuffer","isArray$1","Array","isArray","RE","isBoolean","Boolean","getGlobal","Function","self","window","global","root","codegen","arguments","getThis","Self","Win","Global","nodeList","document","childNodes","typedarray","reFunctionName","RE_FUNCTION_NAME","isObjectLike","constructorName","match","name","slice","constructor","exec","_isBuffer","isBuffer","REGEXP","predicate","len","i","arrayfun","ctorName","toLowerCase","type","isFunction","typeOf","Complex128","real","imag","this","str","re","im","fround","FLOAT32_VIEW","float64ToFloat32$1","Complex64","float64ToFloat32","isComplexLike","isEven","hasIteratorSymbolSupport","iterator","IteratorSymbol","setNonEnumerableReadOnlyAccessor","getter","realf","z","imagf","reinterpret","offset","buffer","byteOffset","BYTES_PER_ELEMENT","idx","setter","arraylike2object","data","accessors","getAccessor","getIndexed","setAccessor","setIndexed","fromIterator","it","next","done","push","fromIteratorMap","clbk","thisArg","fromArray","buf","j","HAS_ITERATOR_SYMBOL","isComplexArray","Complex64Array","_length","_buffer","isComplexArrayConstructor","isComplex64Array","isComplex128Array","nargs","RangeError","reinterpret64","reinterpret128","byteLength","ITERATOR_SYMBOL","src","tmp","flg","args","setReadOnlyAccessor","target","start","copyWithin","iter","entries","sbuf","N","Complex128Array","ctors","float64","float32","generic","int16","int32","int8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AnB,GAAA,EACAmB,GAAA,EAEA,MACA,CAEA,GAAAnB,EAAA6C,EAAArE,KAAA+C,QACA,MAAA,IAAAM,WAAA,0FAGA,IADA7B,GAAA,EACAlC,EAAA,EAAAA,EAAA+E,EAAA/E,IACAzH,EAAArB,EAAA8I,GACAoD,EAAAlB,GAAA1B,GAAAjI,GACA6K,EAAAlB,EAAA,GAAAzB,GAAAlI,GACA2J,GAAA,CAxDA,CA+DA,ICn/BA,IAAI+C,GAAQ,CACXC,QAAWlL,EACXmL,QAAW1K,EACX2K,QAAWvH,MACXwH,MAASvK,EACTwK,MAASlK,EACTmK,KAAQ7J,GACR8J,OAAUxJ,GACVyJ,OAAUnJ,GACVoJ,MAAS9I,GACT+I,OAAUzI,GACV0I,UAAapC,GACbqC,WAAcb,ICTf,SAASC,GAAOa,GACf,OAAOC,GAAOD,IAAW,IAC1B,CCNA,SAASE,GAAOjG,GACf,OCDD,SAAiB7I,EAAO6I,GACvB,IAAI3F,EACA4F,EAIJ,IADA5F,EAAM,GACA4F,EAAI,EAAGA,EAAID,EAAKC,IACrB5F,EAAI2I,KAAM7L,GAEX,OAAOkD,CACR,CDTQ6L,CAAQ,EAAKlG,EACrB,CEOA,SAASiG,GAAOzI,GACf,IAAIuI,EACA7L,EACJ,IAAMH,EAAsByD,GAC3B,MAAM,IAAIvG,UAAW,2EAA6EuG,EAAS,MAO5G,GAAe,aAJduI,EADIrH,UAAUlB,OAAS,EACfkB,UAAW,GAEX,WAGR,OAAOyH,GAAQ3I,GAGhB,GAAc,QADdtD,EAAOgL,GAAOa,IAEb,MAAM,IAAI9O,UAAW,6EAA+E8O,EAAQ,MAE7G,OAAO,IAAI7L,EAAMsD,EAClB,CCpBA,SAAS4I,GAAO5I,GACf,OAAKkB,UAAUlB,OAAS,EAChByI,GAAOzI,EAAQkB,UAAW,IAE3BuH,GAAOzI,EACf"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index 784b766..0000000 --- a/stats.html +++ /dev/null @@ -1,6177 +0,0 @@ - - - - - - - - Rollup Visualizer - - - -
- - - - - From 3aa24fe537f865456303efaa4230ac58ca1c63f5 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sat, 19 Aug 2023 01:43:20 +0000 Subject: [PATCH 10/75] Auto-generated commit --- .editorconfig | 181 - .eslintrc.js | 1 - .gitattributes | 49 - .github/PULL_REQUEST_TEMPLATE.md | 7 - .github/workflows/benchmark.yml | 62 - .github/workflows/cancel.yml | 56 - .github/workflows/close_pull_requests.yml | 44 - .github/workflows/examples.yml | 62 - .github/workflows/npm_downloads.yml | 108 - .github/workflows/productionize.yml | 783 --- .github/workflows/publish.yml | 242 - .github/workflows/test.yml | 97 - .github/workflows/test_bundles.yml | 180 - .github/workflows/test_coverage.yml | 123 - .github/workflows/test_install.yml | 83 - .gitignore | 188 - .npmignore | 227 - .npmrc | 28 - CHANGELOG.md | 5 - CODE_OF_CONDUCT.md | 3 - CONTRIBUTING.md | 3 - Makefile | 534 -- README.md | 24 +- benchmark/benchmark.js | 264 - benchmark/benchmark.length.complex128.js | 93 - benchmark/benchmark.length.complex64.js | 93 - benchmark/benchmark.length.float32.js | 93 - benchmark/benchmark.length.float64.js | 93 - benchmark/benchmark.length.generic.js | 93 - benchmark/benchmark.length.int16.js | 93 - benchmark/benchmark.length.int32.js | 93 - benchmark/benchmark.length.int8.js | 93 - benchmark/benchmark.length.uint16.js | 93 - benchmark/benchmark.length.uint32.js | 93 - benchmark/benchmark.length.uint8.js | 93 - benchmark/benchmark.length.uint8c.js | 93 - branches.md | 53 - dist/index.d.ts | 3 - dist/index.js | 9 - dist/index.js.map | 7 - docs/repl.txt | 52 - docs/types/test.ts | 77 - examples/index.js | 33 - lib/index.js | 58 - lib/is_buffer_uint8array.js | 47 - lib/main.js | 101 - lib/polyfill.js | 56 - docs/types/index.d.ts => mod.d.ts | 2 +- mod.js | 4 + mod.js.map | 1 + package.json | 80 +- stats.html | 6177 +++++++++++++++++++++ test/test.js | 60 - test/test.main.js | 274 - test/test.polyfill.js | 324 -- 55 files changed, 6189 insertions(+), 5699 deletions(-) delete mode 100644 .editorconfig delete mode 100644 .eslintrc.js delete mode 100644 .gitattributes delete mode 100644 .github/PULL_REQUEST_TEMPLATE.md delete mode 100644 .github/workflows/benchmark.yml delete mode 100644 .github/workflows/cancel.yml delete mode 100644 .github/workflows/close_pull_requests.yml delete mode 100644 .github/workflows/examples.yml delete mode 100644 .github/workflows/npm_downloads.yml delete mode 100644 .github/workflows/productionize.yml delete mode 100644 .github/workflows/publish.yml delete mode 100644 .github/workflows/test.yml delete mode 100644 .github/workflows/test_bundles.yml delete mode 100644 .github/workflows/test_coverage.yml delete mode 100644 .github/workflows/test_install.yml delete mode 100644 .gitignore delete mode 100644 .npmignore delete mode 100644 .npmrc delete mode 100644 CHANGELOG.md delete mode 100644 CODE_OF_CONDUCT.md delete mode 100644 CONTRIBUTING.md delete mode 100644 Makefile delete mode 100644 benchmark/benchmark.js delete mode 100644 benchmark/benchmark.length.complex128.js delete mode 100644 benchmark/benchmark.length.complex64.js delete mode 100644 benchmark/benchmark.length.float32.js delete mode 100644 benchmark/benchmark.length.float64.js delete mode 100644 benchmark/benchmark.length.generic.js delete mode 100644 benchmark/benchmark.length.int16.js delete mode 100644 benchmark/benchmark.length.int32.js delete mode 100644 benchmark/benchmark.length.int8.js delete mode 100644 benchmark/benchmark.length.uint16.js delete mode 100644 benchmark/benchmark.length.uint32.js delete mode 100644 benchmark/benchmark.length.uint8.js delete mode 100644 benchmark/benchmark.length.uint8c.js 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/repl.txt delete mode 100644 docs/types/test.ts delete mode 100644 examples/index.js delete mode 100644 lib/index.js delete mode 100644 lib/is_buffer_uint8array.js delete mode 100644 lib/main.js delete mode 100644 lib/polyfill.js rename docs/types/index.d.ts => mod.d.ts (99%) create mode 100644 mod.js create mode 100644 mod.js.map create mode 100644 stats.html delete mode 100644 test/test.js delete mode 100644 test/test.main.js delete mode 100644 test/test.polyfill.js diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index 0fd4d6c..0000000 --- a/.editorconfig +++ /dev/null @@ -1,181 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# EditorConfig configuration file (see ). - -# Indicate that this file is a root-level configuration file: -root = true - -# Set properties for all files: -[*] -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true - -# Set properties for JavaScript files: -[*.{js,js.txt}] -indent_style = tab - -# Set properties for JavaScript ES module files: -[*.{mjs,mjs.txt}] -indent_style = tab - -# Set properties for JavaScript CommonJS files: -[*.{cjs,cjs.txt}] -indent_style = tab - -# Set properties for JSON files: -[*.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `cli_opts.json` files: -[cli_opts.json] -indent_style = tab - -# Set properties for TypeScript files: -[*.ts] -indent_style = tab - -# Set properties for Python files: -[*.{py,py.txt}] -indent_style = space -indent_size = 4 - -# Set properties for Julia files: -[*.{jl,jl.txt}] -indent_style = tab - -# Set properties for R files: -[*.{R,R.txt}] -indent_style = tab - -# Set properties for C files: -[*.{c,c.txt}] -indent_style = tab - -# Set properties for C header files: -[*.{h,h.txt}] -indent_style = tab - -# Set properties for C++ files: -[*.{cpp,cpp.txt}] -indent_style = tab - -# Set properties for C++ header files: -[*.{hpp,hpp.txt}] -indent_style = tab - -# Set properties for Fortran files: -[*.{f,f.txt}] -indent_style = space -indent_size = 2 -insert_final_newline = false - -# Set properties for shell files: -[*.{sh,sh.txt}] -indent_style = tab - -# Set properties for AWK files: -[*.{awk,awk.txt}] -indent_style = tab - -# Set properties for HTML files: -[*.{html,html.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for XML files: -[*.{xml,xml.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for CSS files: -[*.{css,css.txt}] -indent_style = tab - -# Set properties for Makefiles: -[Makefile] -indent_style = tab - -[*.{mk,mk.txt}] -indent_style = tab - -# Set properties for Markdown files: -[*.{md,md.txt}] -indent_style = space -indent_size = 4 -trim_trailing_whitespace = false - -# Set properties for `usage.txt` files: -[usage.txt] -indent_style = space -indent_size = 2 - -# Set properties for `repl.txt` files: -[repl.txt] -indent_style = space -indent_size = 4 - -# Set properties for `package.json` files: -[package.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `datapackage.json` files: -[datapackage.json] -indent_style = space -indent_size = 2 - -# Set properties for `manifest.json` files: -[manifest.json] -indent_style = space -indent_size = 2 - -# Set properties for `tslint.json` files: -[tslint.json] -indent_style = space -indent_size = 2 - -# Set properties for `tsconfig.json` files: -[tsconfig.json] -indent_style = space -indent_size = 2 - -# Set properties for LaTeX files: -[*.{tex,tex.txt}] -indent_style = tab - -# Set properties for LaTeX Bibliography files: -[*.{bib,bib.txt}] -indent_style = tab - -# Set properties for YAML files: -[*.{yml,yml.txt}] -indent_style = space -indent_size = 2 - -# Set properties for GYP files: -[binding.gyp] -indent_style = space -indent_size = 2 - -[*.gypi] -indent_style = space -indent_size = 2 diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index 5f30286..0000000 --- a/.eslintrc.js +++ /dev/null @@ -1 +0,0 @@ -/* For the `eslint` rules of this project, consult the main repository at https://github.com/stdlib-js/stdlib */ diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index 10a16e6..0000000 --- a/.gitattributes +++ /dev/null @@ -1,49 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Configuration file which assigns attributes to pathnames. -# -# [1]: https://git-scm.com/docs/gitattributes - -# Automatically normalize the line endings of any committed text files: -* text=auto - -# Override line endings for certain files on checkout: -*.crlf.csv text eol=crlf - -# Denote that certain files are binary and should not be modified: -*.png binary -*.jpg binary -*.jpeg binary -*.gif binary -*.ico binary -*.gz binary -*.zip binary -*.7z binary -*.mp3 binary -*.mp4 binary -*.mov binary - -# Override what is considered "vendored" by GitHub's linguist: -/deps/** linguist-vendored=false -/lib/node_modules/** linguist-vendored=false linguist-generated=false -test/fixtures/** linguist-vendored=false -tools/** linguist-vendored=false - -# Override what is considered "documentation" by GitHub's linguist: -examples/** linguist-documentation=false diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index 96f81a8..0000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,7 +0,0 @@ - - -We are excited about your pull request, but unfortunately we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/empty) of the main repository where we’ll review and provide feedback. - -If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. You may also consult the [development guide](https://github.com/stdlib-js/stdlib/blob/develop/docs/development.md) for help on developing stdlib. - -We look forward to receiving your contribution! :smiley: \ No newline at end of file diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml deleted file mode 100644 index 06a9a75..0000000 --- a/.github/workflows/benchmark.yml +++ /dev/null @@ -1,62 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: benchmark - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run benchmarks: - benchmark: - - # Define a display name: - name: 'Run benchmarks' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - uses: actions/checkout@v3 - - # Install Node.js: - - name: 'Install Node.js' - uses: actions/setup-node@v3 - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run benchmarks: - - name: 'Run benchmarks' - run: | - npm run benchmark diff --git a/.github/workflows/cancel.yml b/.github/workflows/cancel.yml deleted file mode 100644 index a00dbe5..0000000 --- a/.github/workflows/cancel.yml +++ /dev/null @@ -1,56 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: cancel - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to cancel existing workflow runs: - cancel: - - # Define a display name: - name: 'Cancel workflow runs' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Time limit: - timeout-minutes: 3 - - # Define the sequence of job steps... - steps: - - # Cancel existing workflow runs: - - name: 'Cancel existing workflow runs' - uses: styfle/cancel-workflow-action@0.11.0 - with: - workflow_id: >- - benchmark.yml, - examples.yml, - test.yml, - test_coverage.yml, - test_install.yml, - publish.yml - access_token: ${{ github.token }} diff --git a/.github/workflows/close_pull_requests.yml b/.github/workflows/close_pull_requests.yml deleted file mode 100644 index 38d3aa3..0000000 --- a/.github/workflows/close_pull_requests.yml +++ /dev/null @@ -1,44 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: close_pull_requests - -# Workflow triggers: -on: - pull_request_target: - types: [opened] - -# Workflow jobs: -jobs: - run: - runs-on: ubuntu-latest - steps: - - uses: superbrothers/close-pull-request@v3 - with: - comment: | - Thank you for submitting a pull request. :raised_hands: - - We greatly appreciate your willingness to submit a contribution. However, we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). - - We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/empty) of the main repository where we’ll review and provide feedback. If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. - - Thank you again, and we look forward to receiving your contribution! :smiley: - - Best, - The stdlib team \ No newline at end of file diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml deleted file mode 100644 index 7902a7d..0000000 --- a/.github/workflows/examples.yml +++ /dev/null @@ -1,62 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: examples - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run the package examples... - examples: - - # Define display name: - name: 'Run examples' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout the repository' - uses: actions/checkout@v3 - - # Install Node.js: - - name: 'Install Node.js' - uses: actions/setup-node@v3 - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run examples: - - name: 'Run examples' - run: | - npm run examples diff --git a/.github/workflows/npm_downloads.yml b/.github/workflows/npm_downloads.yml deleted file mode 100644 index 32477d3..0000000 --- a/.github/workflows/npm_downloads.yml +++ /dev/null @@ -1,108 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: npm_downloads - -# Workflow triggers: -on: - # Run this workflow weekly: - schedule: - # cron: ' ' - - cron: '49 1 * * 5' - - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job for retrieving npm download counts... - npm_downloads: - - # Define display name: - name: 'Retrieve npm download counts' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - uses: actions/checkout@v3 - timeout-minutes: 10 - - # Install Node.js: - - name: 'Install Node.js' - uses: actions/setup-node@v3 - with: - node-version: 16 - timeout-minutes: 5 - - # Resolve package name: - - name: 'Resolve package name' - id: package_name - run: | - name=`node -e 'console.log(require("./package.json").name)' | tr -d '\n'` - echo "package_name=$name" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Fetch download data: - - name: 'Fetch data' - id: download_data - run: | - url="https://api.npmjs.org/downloads/range/$(date --date='1 year ago' '+%Y-%m-%d'):$(date '+%Y-%m-%d')/${{ steps.package_name.outputs.package_name }}" - echo "$url" - data=$(curl "$url") - mkdir ./tmp - echo "$data" > ./tmp/npm_downloads.json - echo "data=$data" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Print summary of download data: - - name: 'Print summary' - run: | - echo "| Date | Downloads |" >> $GITHUB_STEP_SUMMARY - echo "|------|------------|" >> $GITHUB_STEP_SUMMARY - cat ./tmp/npm_downloads.json | jq -r ".downloads | .[-14:] | to_entries | map(\"| \(.value.day) | \(.value.downloads) |\") |.[]" >> $GITHUB_STEP_SUMMARY - - # Upload the download data: - - name: 'Upload data' - uses: actions/upload-artifact@v3 - with: - # Define a name for the uploaded artifact (ensuring a unique name for each job): - name: npm_downloads - - # Specify the path to the file to upload: - path: ./tmp/npm_downloads.json - - # Specify the number of days to retain the artifact (default is 90 days): - retention-days: 90 - timeout-minutes: 10 - if: success() - - # Send data to events server: - - name: 'Post data' - uses: distributhor/workflow-webhook@v3 - env: - webhook_url: ${{ secrets.STDLIB_NPM_DOWNLOADS_URL }} - webhook_secret: ${{ secrets.STDLIB_WEBHOOK_SECRET }} - data: '{ "downloads": ${{ steps.download_data.outputs.data }} }' - timeout-minutes: 5 - if: success() diff --git a/.github/workflows/productionize.yml b/.github/workflows/productionize.yml deleted file mode 100644 index 91f2b93..0000000 --- a/.github/workflows/productionize.yml +++ /dev/null @@ -1,783 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: productionize - -# Workflow triggers: -on: - # Run workflow when a new commit is pushed to the main branch: - push: - branches: - - main - - # Allow the workflow to be manually run: - workflow_dispatch: - inputs: - require-passing-tests: - description: 'Require passing tests for creating bundles' - type: boolean - default: true - - # Run workflow upon completion of `publish` workflow run: - workflow_run: - workflows: ["publish"] - types: [completed] - - -# Concurrency group to prevent multiple concurrent executions: -concurrency: - group: productionize - cancel-in-progress: true - -# Workflow jobs: -jobs: - - # Define a job to create a production build... - productionize: - - # Define display name: - name: 'Productionize' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - # Checkout main branch of repository: - - name: 'Checkout main branch' - uses: actions/checkout@v3 - with: - ref: main - - # Install Node.js: - - name: 'Install Node.js' - uses: actions/setup-node@v3 - with: - node-version: 16 - timeout-minutes: 5 - - # Create production branch: - - name: 'Create production branch' - run: | - git checkout -b production - - # Transform error messages: - - name: 'Transform error messages' - id: transform-error-messages - uses: stdlib-js/transform-errors-action@main - - # Change `@stdlib/string-format` to `@stdlib/error-tools-fmtprodmsg` in package.json if the former is a dependency, otherwise insert it as a dependency: - - name: 'Update dependencies in package.json' - run: | - PKG_VERSION=$(npm view @stdlib/error-tools-fmtprodmsg version) - if grep -q '"@stdlib/string-format"' package.json; then - sed -i "s/\"@stdlib\/string-format\": \"^.*\"/\"@stdlib\/error-tools-fmtprodmsg\": \"^$PKG_VERSION\"/g" package.json - else - node -e "var pkg = require( './package.json' ); pkg.dependencies[ '@stdlib/error-tools-fmtprodmsg' ] = '^$PKG_VERSION'; require( 'fs' ).writeFileSync( 'package.json', JSON.stringify( pkg, null, 2 ) );" - fi - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Transform error messages" - - # Push changes: - - name: 'Push changes' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" production --force - - # Define a job for running tests of the productionized code... - test: - - # Define a display name: - name: 'Run Tests' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Indicate that this job depends on the prior job finishing: - needs: productionize - - # Run this job regardless of the outcome of the prior job: - if: always() - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - uses: actions/checkout@v3 - with: - # Use the `production` branch: - ref: production - - # Install Node.js: - - name: 'Install Node.js' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - uses: actions/setup-node@v3 - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Build native add-on if present: - - name: 'Build native add-on (if present)' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - run: | - if [ -f "binding.gyp" ]; then - npm install node-gyp --no-save && ./node_modules/.bin/node-gyp rebuild - fi - - # Run tests: - - name: 'Run tests' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: tests - run: | - npm test || npm test || npm test - - # Define job to create a bundle for use in Deno... - deno: - - # Define display name: - name: 'Create Deno bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - uses: actions/checkout@v3 - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `deno` branch exists: - - name: 'Check if remote `deno` branch exists' - id: deno-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin deno - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `deno` exists, delete everything in branch and merge `production` into it - - name: 'If `deno` exists, delete everything in branch and merge `production` into it' - if: steps.deno-branch-exists.outputs.remote-exists - run: | - git checkout -b deno origin/deno - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `deno` does not exist, create `deno` branch: - - name: 'If `deno` does not exist, create `deno` branch' - if: ${{ steps.deno-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b deno - - # Copy files to deno directory: - - name: 'Copy files to deno directory' - run: | - mkdir -p deno - cp README.md LICENSE CONTRIBUTORS NOTICE ./deno - - # Copy TypeScript definitions to deno directory: - if [ -d index.d.ts ]; then - cp index.d.ts ./deno/index.d.ts - fi - if [ -e ./docs/types/index.d.ts ]; then - cp ./docs/types/index.d.ts ./deno/mod.d.ts - fi - - # Install Node.js: - - name: 'Install Node.js' - uses: actions/setup-node@v3 - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: Install production and development dependencies - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Bundle package for use in Deno: - - name: 'Bundle package for Deno' - id: deno-bundle - uses: stdlib-js/bundle-action@main - with: - target: 'deno' - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - # Replace links to other packages with links to the deno branch: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/deno/"; - - # Replace reference to `@stdlib/types` with CDN link: - find ./deno -type f -name '*.ts' -print0 | xargs -0 sed -Ei "s/\/\/\/ /\/\/\/ /g" - - # Change wording of project description to avoid reference to JavaScript and Node.js: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "s/a standard library for JavaScript and Node.js, /a standard library /g" - - # Rewrite all `require()`s to use jsDelivr links: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/require\( '@stdlib\// { - s/(var|let|const)\s+([a-z0-9_]+)\s+=\s*require\( '([^']+)' \);/import \2 from \'\3\';/i - s/@stdlib/https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js/ - s/';/@deno\/mod.js';/ - }" - - # Rewrite first `import` to show importing of named exports if available: - exports=$(cat lib/index.js | \ - grep -E 'setReadOnly\(.*,.*,.*\)' | \ - sed -E 's/setReadOnly\((.*),(.*),(.*)\);/\2/' | \ - sed -E "s/'//g" | \ - sort) - if [ -n "$exports" ]; then - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\nimport\s+([a-zA-Z0-9_]+)\s+from\s*'([^']+)';\n\`\`\`/\`\`\`javascript\nimport \1 from '\2';\n\`\`\`\n\nYou can also import the following named exports from the package:\n\n\`\`\`javascript\nimport { $(echo $exports | sed -E 's/ /, /g') } from '\2';\n\`\`\`/" - fi - - # Remove `installation`, `cli`, and `c` sections: - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Create package.json file for deno branch: - jq --indent 2 '{"name": .name, "version": .version, "description": .description, "license": .license, "type": "module", "main": "./mod.js", "homepage": .homepage, "repository": .repository, "bugs": .bugs, "keywords": .keywords, "funding": .funding}' package.json > ./deno/package.json - - # Delete everything in current directory aside from deno folder: - - name: 'Delete everything in current directory aside from deno folder' - run: | - find . -type 'f' | grep -v -e "deno" -e ".git/" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e "deno" -e ".git" | xargs -r rm -rf - - # Move deno directory to root: - - name: 'Move deno directory to root' - run: | - mv ./deno/* . - rmdir ./deno - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Auto-generated commit" - - # Push changes to `deno` branch: - - name: 'Push changes to `deno` branch' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" deno - - # Send status to Slack channel if job fails: - - name: 'Send status to Slack channel in case of failure' - uses: act10ns/slack@v2 - with: - status: ${{ job.status }} - steps: ${{ toJson(steps) }} - channel: '#npm-ci' - if: failure() - - # Define job to create a UMD bundle... - umd: - - # Define display name: - name: 'Create UMD bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - uses: actions/checkout@v3 - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `umd` branch exists: - - name: 'Check if remote `umd` branch exists' - id: umd-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin umd - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `umd` exists, delete everything in branch and merge `production` into it - - name: 'If `umd` exists, delete everything in branch and merge `production` into it' - if: steps.umd-branch-exists.outputs.remote-exists - run: | - git checkout -b umd origin/umd - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `umd` does not exist, create `umd` branch: - - name: 'If `umd` does not exist, create `umd` branch' - if: ${{ steps.umd-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b umd - - # Copy files to umd directory: - - name: 'Copy files to umd directory' - run: | - mkdir -p umd - cp README.md LICENSE CONTRIBUTORS NOTICE ./umd - - # Install Node.js - - name: 'Install Node.js' - uses: actions/setup-node@v3 - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Extract alias: - - name: 'Extract alias' - id: extract-alias - run: | - alias=$(grep -E 'require\(' README.md | head -n 1 | sed -E 's/^var ([a-zA-Z0-9_]+) = .+/\1/') - echo "alias=${alias}" >> $GITHUB_OUTPUT - - # Create Universal Module Definition (UMD) Node.js bundle: - - name: 'Create Universal Module Definition (UMD) Node.js bundle' - id: umd-bundle-node - uses: stdlib-js/bundle-action@main - with: - target: 'umd-node' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Create Universal Module Definition (UMD) browser bundle: - - name: 'Create Universal Module Definition (UMD) browser bundle' - id: umd-bundle-browser - uses: stdlib-js/bundle-action@main - with: - target: 'umd-browser' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - - # Replace links to other packages with links to the umd branch: - find ./umd -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/umd/"; - - # Remove `installation`, `cli`, and `c` sections: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Rewrite first `require()` to show consumption of the UMD bundle in Observable and via a `script` tag: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\n(var|let|const)\s+([a-zA-Z0-9_]+)\s+=\s*require\( '\@stdlib\/([^']+)' \);\n\`\`\`/To use in Observable,\n\n\`\`\`javascript\n\2 = require\( 'https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js\/\3\@umd\/browser.js' \)\n\`\`\`\n\nTo vendor stdlib functionality and avoid installing dependency trees for Node.js, you can use the UMD server build:\n\n\`\`\`javascript\nvar \2 = require\( 'path\/to\/vendor\/umd\/\3\/index.js' \)\n\`\`\`\n\nTo include the bundle in a webpage,\n\n\`\`\`html\n + + + + diff --git a/test/test.js b/test/test.js deleted file mode 100644 index 8e62cb8..0000000 --- a/test/test.js +++ /dev/null @@ -1,60 +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 proxyquire = require( 'proxyquire' ); -var main = require( './../lib/main.js' ); -var polyfill = require( './../lib/polyfill.js' ); -var empty = require( './../lib' ); - - -// TESTS // - -tape( 'main export is a function', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof empty, 'function', 'main export is a function' ); - t.end(); -}); - -tape( 'if an environment supports Node.js buffer instances inheriting from Uint8Array, the main export supports returning arrays having uninitialized memory', function test( t ) { - var empty = proxyquire( './../lib', { - './is_buffer_uint8array.js': mock - }); - t.strictEqual( empty, main, 'returns expected value' ); - t.end(); - - function mock() { - return true; - } -}); - -tape( 'if an environment does not support Node.js buffer instances inheriting from Uint8Array, the main export supports returning zero-filled arrays', function test( t ) { - var empty = proxyquire( './../lib', { - './is_buffer_uint8array.js': mock - }); - t.strictEqual( empty, polyfill, 'returns expected value' ); - t.end(); - - function mock() { - return false; - } -}); diff --git a/test/test.main.js b/test/test.main.js deleted file mode 100644 index 3ceb26e..0000000 --- a/test/test.main.js +++ /dev/null @@ -1,274 +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 Float64Array = require( '@stdlib/array-float64' ); -var Float32Array = require( '@stdlib/array-float32' ); -var Int32Array = require( '@stdlib/array-int32' ); -var Uint32Array = require( '@stdlib/array-uint32' ); -var Int16Array = require( '@stdlib/array-int16' ); -var Uint16Array = require( '@stdlib/array-uint16' ); -var Int8Array = require( '@stdlib/array-int8' ); -var Uint8Array = require( '@stdlib/array-uint8' ); -var Uint8ClampedArray = require( '@stdlib/array-uint8c' ); -var Complex64Array = require( '@stdlib/array-complex64' ); -var Complex128Array = require( '@stdlib/array-complex128' ); -var instanceOf = require( '@stdlib/assert-instance-of' ); -var empty = require( './../lib/main.js' ); - - -// TESTS // - -tape( 'main export is a function', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof empty, 'function', 'main export is a function' ); - t.end(); -}); - -tape( 'the function throws an error if provided a value other than a nonnegative integer for the first argument', function test( t ) { - var values; - var i; - - values = [ - '5', - -3, - 3.14, - NaN, - true, - false, - null, - void 0, - [], - {}, - function noop() {} - ]; - - for ( i = 0; i < values.length; i++ ) { - t.throws( badValue( values[i] ), TypeError, 'throws an error when provided '+values[i] ); - } - t.end(); - - function badValue( value ) { - return function badValue() { - empty( value ); - }; - } -}); - -tape( 'the function throws an error if provided a value other than a nonnegative integer for the first argument (dtype)', function test( t ) { - var values; - var i; - - values = [ - '5', - -3, - 3.14, - NaN, - true, - false, - null, - void 0, - [], - {}, - function noop() {} - ]; - - for ( i = 0; i < values.length; i++ ) { - t.throws( badValue( values[i] ), TypeError, 'throws an error when provided '+values[i] ); - } - t.end(); - - function badValue( value ) { - return function badValue() { - empty( value, 'float32' ); - }; - } -}); - -tape( 'the function throws an error if provided an unrecognized data type', function test( t ) { - var values; - var i; - - values = [ - '5', - 'beep', - 'empty', - 'Int32', - 'Uint32', - 'Int16', - 'Uint16', - 'Int8', - 'Uint8', - 'Uint8c', - 'uint8_clamped', - 'Float64', - 'Float32', - 'FLOAT64', - 'FLOAT32', - 'GENERIC' - ]; - - for ( i = 0; i < values.length; i++ ) { - t.throws( badValue( values[i] ), TypeError, 'throws an error when provided '+values[i] ); - } - t.end(); - - function badValue( value ) { - return function badValue() { - empty( 10, value ); - }; - } -}); - -tape( 'the function returns an empty array (default)', function test( t ) { - var arr; - - arr = empty( 5 ); - t.strictEqual( instanceOf( arr, Float64Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=float64)', function test( t ) { - var arr; - - arr = empty( 5, 'float64' ); - t.strictEqual( instanceOf( arr, Float64Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=float32)', function test( t ) { - var arr; - - arr = empty( 5, 'float32' ); - t.strictEqual( instanceOf( arr, Float32Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=complex128)', function test( t ) { - var arr; - - arr = empty( 5, 'complex128' ); - t.strictEqual( instanceOf( arr, Complex128Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=complex64)', function test( t ) { - var arr; - - arr = empty( 5, 'complex64' ); - t.strictEqual( instanceOf( arr, Complex64Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=int32)', function test( t ) { - var arr; - - arr = empty( 5, 'int32' ); - t.strictEqual( instanceOf( arr, Int32Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=uint32)', function test( t ) { - var arr; - - arr = empty( 5, 'uint32' ); - t.strictEqual( instanceOf( arr, Uint32Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=int16)', function test( t ) { - var arr; - - arr = empty( 5, 'int16' ); - t.strictEqual( instanceOf( arr, Int16Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=uint16)', function test( t ) { - var arr; - - arr = empty( 5, 'uint16' ); - t.strictEqual( instanceOf( arr, Uint16Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=int8)', function test( t ) { - var arr; - - arr = empty( 5, 'int8' ); - t.strictEqual( instanceOf( arr, Int8Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=uint8)', function test( t ) { - var arr; - - arr = empty( 5, 'uint8' ); - t.strictEqual( instanceOf( arr, Uint8Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=uint8c)', function test( t ) { - var arr; - - arr = empty( 5, 'uint8c' ); - t.strictEqual( instanceOf( arr, Uint8ClampedArray ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=generic)', function test( t ) { - var expected; - var arr; - - expected = [ 0, 0, 0, 0, 0 ]; - - arr = empty( 5, 'generic' ); - t.strictEqual( instanceOf( arr, Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); diff --git a/test/test.polyfill.js b/test/test.polyfill.js deleted file mode 100644 index 17b99f3..0000000 --- a/test/test.polyfill.js +++ /dev/null @@ -1,324 +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 Float64Array = require( '@stdlib/array-float64' ); -var Float32Array = require( '@stdlib/array-float32' ); -var Int32Array = require( '@stdlib/array-int32' ); -var Uint32Array = require( '@stdlib/array-uint32' ); -var Int16Array = require( '@stdlib/array-int16' ); -var Uint16Array = require( '@stdlib/array-uint16' ); -var Int8Array = require( '@stdlib/array-int8' ); -var Uint8Array = require( '@stdlib/array-uint8' ); -var Uint8ClampedArray = require( '@stdlib/array-uint8c' ); -var Complex64Array = require( '@stdlib/array-complex64' ); -var Complex128Array = require( '@stdlib/array-complex128' ); -var reinterpret64 = require( '@stdlib/strided-base-reinterpret-complex64' ); -var reinterpret128 = require( '@stdlib/strided-base-reinterpret-complex128' ); -var instanceOf = require( '@stdlib/assert-instance-of' ); -var empty = require( './../lib/polyfill.js' ); - - -// TESTS // - -tape( 'main export is a function', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof empty, 'function', 'main export is a function' ); - t.end(); -}); - -tape( 'the function throws an error if provided a value other than a nonnegative integer for the first argument', function test( t ) { - var values; - var i; - - values = [ - '5', - -3, - 3.14, - NaN, - true, - false, - null, - void 0, - [], - {}, - function noop() {} - ]; - - for ( i = 0; i < values.length; i++ ) { - t.throws( badValue( values[i] ), TypeError, 'throws an error when provided '+values[i] ); - } - t.end(); - - function badValue( value ) { - return function badValue() { - empty( value ); - }; - } -}); - -tape( 'the function throws an error if provided a value other than a nonnegative integer for the first argument (dtype)', function test( t ) { - var values; - var i; - - values = [ - '5', - -3, - 3.14, - NaN, - true, - false, - null, - void 0, - [], - {}, - function noop() {} - ]; - - for ( i = 0; i < values.length; i++ ) { - t.throws( badValue( values[i] ), TypeError, 'throws an error when provided '+values[i] ); - } - t.end(); - - function badValue( value ) { - return function badValue() { - empty( value, 'float32' ); - }; - } -}); - -tape( 'the function throws an error if provided an unrecognized data type', function test( t ) { - var values; - var i; - - values = [ - '5', - 'beep', - 'empty', - 'Int32', - 'Uint32', - 'Int16', - 'Uint16', - 'Int8', - 'Uint8', - 'Uint8c', - 'uint8_clamped', - 'Float64', - 'Float32', - 'FLOAT64', - 'FLOAT32', - 'GENERIC' - ]; - - for ( i = 0; i < values.length; i++ ) { - t.throws( badValue( values[i] ), TypeError, 'throws an error when provided '+values[i] ); - } - t.end(); - - function badValue( value ) { - return function badValue() { - empty( 10, value ); - }; - } -}); - -tape( 'the function returns a zero-filled array (default)', function test( t ) { - var expected; - var arr; - - expected = new Float64Array( [ 0.0, 0.0, 0.0, 0.0, 0.0 ] ); - - arr = empty( 5 ); - t.strictEqual( instanceOf( arr, Float64Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=float64)', function test( t ) { - var expected; - var arr; - - expected = new Float64Array( [ 0.0, 0.0, 0.0, 0.0, 0.0 ] ); - - arr = empty( 5, 'float64' ); - t.strictEqual( instanceOf( arr, Float64Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=float32)', function test( t ) { - var expected; - var arr; - - expected = new Float32Array( [ 0.0, 0.0, 0.0, 0.0, 0.0 ] ); - - arr = empty( 5, 'float32' ); - t.strictEqual( instanceOf( arr, Float32Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=complex128)', function test( t ) { - var expected; - var arr; - - expected = new Float64Array( [ 0.0, 0.0, 0.0, 0.0 ] ); - - arr = empty( 2, 'complex128' ); - t.strictEqual( instanceOf( arr, Complex128Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length/2, 'returns expected value' ); - t.deepEqual( reinterpret128( arr, 0 ), expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=complex64)', function test( t ) { - var expected; - var arr; - - expected = new Float32Array( [ 0.0, 0.0, 0.0, 0.0 ] ); - - arr = empty( 2, 'complex64' ); - t.strictEqual( instanceOf( arr, Complex64Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length/2, 'returns expected value' ); - t.deepEqual( reinterpret64( arr, 0 ), expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=int32)', function test( t ) { - var expected; - var arr; - - expected = new Int32Array( [ 0, 0, 0, 0, 0 ] ); - - arr = empty( 5, 'int32' ); - t.strictEqual( instanceOf( arr, Int32Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=uint32)', function test( t ) { - var expected; - var arr; - - expected = new Uint32Array( [ 0, 0, 0, 0, 0 ] ); - - arr = empty( 5, 'uint32' ); - t.strictEqual( instanceOf( arr, Uint32Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=int16)', function test( t ) { - var expected; - var arr; - - expected = new Int16Array( [ 0, 0, 0, 0, 0 ] ); - - arr = empty( 5, 'int16' ); - t.strictEqual( instanceOf( arr, Int16Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=uint16)', function test( t ) { - var expected; - var arr; - - expected = new Uint16Array( [ 0, 0, 0, 0, 0 ] ); - - arr = empty( 5, 'uint16' ); - t.strictEqual( instanceOf( arr, Uint16Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=int8)', function test( t ) { - var expected; - var arr; - - expected = new Int8Array( [ 0, 0, 0, 0, 0 ] ); - - arr = empty( 5, 'int8' ); - t.strictEqual( instanceOf( arr, Int8Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=uint8)', function test( t ) { - var expected; - var arr; - - expected = new Uint8Array( [ 0, 0, 0, 0, 0 ] ); - - arr = empty( 5, 'uint8' ); - t.strictEqual( instanceOf( arr, Uint8Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=uint8c)', function test( t ) { - var expected; - var arr; - - expected = new Uint8ClampedArray( [ 0, 0, 0, 0, 0 ] ); - - arr = empty( 5, 'uint8c' ); - t.strictEqual( instanceOf( arr, Uint8ClampedArray ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=generic)', function test( t ) { - var expected; - var arr; - - expected = [ 0, 0, 0, 0, 0 ]; - - arr = empty( 5, 'generic' ); - t.strictEqual( instanceOf( arr, Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); From 34d20a6651407d8f480fa4654f91871d7b796629 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sun, 24 Sep 2023 17:03:58 +0000 Subject: [PATCH 11/75] Transform error messages --- lib/main.js | 6 +++--- package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/main.js b/lib/main.js index e19ce93..e02b26b 100644 --- a/lib/main.js +++ b/lib/main.js @@ -25,7 +25,7 @@ var allocUnsafe = require( '@stdlib/buffer-alloc-unsafe' ); var ctors = require( '@stdlib/array-typed-ctors' ); var zeros = require( '@stdlib/array-base-zeros' ); var bytesPerElement = require( '@stdlib/ndarray-base-bytes-per-element' ); -var format = require( '@stdlib/string-format' ); +var format = require( '@stdlib/error-tools-fmtprodmsg' ); // MAIN // @@ -57,7 +57,7 @@ function empty( length ) { var nb; if ( !isNonNegativeInteger( length ) ) { - throw new TypeError( format( 'invalid argument. First argument must be a nonnegative integer. Value: `%s`.', length ) ); + throw new TypeError( format( '1Zj2d,MG', length ) ); } if ( arguments.length > 1 ) { dtype = arguments[ 1 ]; @@ -69,7 +69,7 @@ function empty( length ) { } nbytes = bytesPerElement( dtype ); if ( nbytes === null ) { - throw new TypeError( format( 'invalid argument. Second argument must be a supported data type. Value: `%s`.', dtype ) ); + throw new TypeError( format( '1ZjMl', dtype ) ); } // Resolve typed array constructor: ctor = ctors( dtype ); diff --git a/package.json b/package.json index de0cd8c..c1bd125 100644 --- a/package.json +++ b/package.json @@ -45,7 +45,7 @@ "@stdlib/assert-is-uint8array": "^0.1.0", "@stdlib/buffer-alloc-unsafe": "^0.1.0", "@stdlib/ndarray-base-bytes-per-element": "^0.1.0", - "@stdlib/string-format": "^0.1.0", + "@stdlib/error-tools-fmtprodmsg": "^0.1.0", "@stdlib/types": "^0.1.0" }, "devDependencies": { From cc44fb625bbf638ba497c2bc5df4123f10066cd7 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sun, 24 Sep 2023 17:37:21 +0000 Subject: [PATCH 12/75] Remove files --- mod.d.ts | 277 --- mod.js | 4 - mod.js.map | 1 - stats.html | 6177 ---------------------------------------------------- 4 files changed, 6459 deletions(-) delete mode 100644 mod.d.ts delete mode 100644 mod.js delete mode 100644 mod.js.map delete mode 100644 stats.html diff --git a/mod.d.ts b/mod.d.ts deleted file mode 100644 index c071f4d..0000000 --- a/mod.d.ts +++ /dev/null @@ -1,277 +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 - -/// - -import { Complex128Array, Complex64Array, DataType } from '@stdlib/types/array'; - -/** -* Creates an uninitialized array having a specified length. -* -* ## Notes -* -* - In browser environments, the function always returns zero-filled arrays. -* - In Node.js versions `>=3.0.0`, the underlying memory of returned typed arrays is **not** initialized. Memory contents are unknown and may contain **sensitive** data. -* -* @param length - array length -* @param dtype - data type -* @returns empty array -* -* @example -* var arr = empty( 2, 'float64' ); -* // returns -*/ -declare function empty( length: number, dtype: 'float64' ): Float64Array; - -/** -* Creates an uninitialized array having a specified length. -* -* ## Notes -* -* - In browser environments, the function always returns zero-filled arrays. -* - In Node.js versions `>=3.0.0`, the underlying memory of returned typed arrays is **not** initialized. Memory contents are unknown and may contain **sensitive** data. -* -* @param length - array length -* @param dtype - data type -* @returns empty array -* -* @example -* var arr = empty( 2, 'float32' ); -* // returns -*/ -declare function empty( length: number, dtype: 'float32' ): Float32Array; - -/** -* Creates an uninitialized array having a specified length. -* -* ## Notes -* -* - In browser environments, the function always returns zero-filled arrays. -* - In Node.js versions `>=3.0.0`, the underlying memory of returned typed arrays is **not** initialized. Memory contents are unknown and may contain **sensitive** data. -* -* @param length - array length -* @param dtype - data type -* @returns empty array -* -* @example -* var arr = empty( 2, 'complex128' ); -* // returns -*/ -declare function empty( length: number, dtype: 'complex128' ): Complex128Array; - -/** -* Creates an uninitialized array having a specified length. -* -* ## Notes -* -* - In browser environments, the function always returns zero-filled arrays. -* - In Node.js versions `>=3.0.0`, the underlying memory of returned typed arrays is **not** initialized. Memory contents are unknown and may contain **sensitive** data. -* -* @param length - array length -* @param dtype - data type -* @returns empty array -* -* @example -* var arr = empty( 2, 'complex64' ); -* // returns -*/ -declare function empty( length: number, dtype: 'complex64' ): Complex64Array; - -/** -* Creates an uninitialized array having a specified length. -* -* ## Notes -* -* - In browser environments, the function always returns zero-filled arrays. -* - In Node.js versions `>=3.0.0`, the underlying memory of returned typed arrays is **not** initialized. Memory contents are unknown and may contain **sensitive** data. -* -* @param length - array length -* @param dtype - data type -* @returns empty array -* -* @example -* var arr = empty( 2, 'int32' ); -* // returns -*/ -declare function empty( length: number, dtype: 'int32' ): Int32Array; - -/** -* Creates an uninitialized array having a specified length. -* -* ## Notes -* -* - In browser environments, the function always returns zero-filled arrays. -* - In Node.js versions `>=3.0.0`, the underlying memory of returned typed arrays is **not** initialized. Memory contents are unknown and may contain **sensitive** data. -* -* @param length - array length -* @param dtype - data type -* @returns empty array -* -* @example -* var arr = empty( 2, 'int16' ); -* // returns -*/ -declare function empty( length: number, dtype: 'int16' ): Int16Array; - -/** -* Creates an uninitialized array having a specified length. -* -* ## Notes -* -* - In browser environments, the function always returns zero-filled arrays. -* - In Node.js versions `>=3.0.0`, the underlying memory of returned typed arrays is **not** initialized. Memory contents are unknown and may contain **sensitive** data. -* -* @param length - array length -* @param dtype - data type -* @returns empty array -* -* @example -* var arr = empty( 2, 'int8' ); -* // returns -*/ -declare function empty( length: number, dtype: 'int8' ): Int8Array; - -/** -* Creates an uninitialized array having a specified length. -* -* ## Notes -* -* - In browser environments, the function always returns zero-filled arrays. -* - In Node.js versions `>=3.0.0`, the underlying memory of returned typed arrays is **not** initialized. Memory contents are unknown and may contain **sensitive** data. -* -* @param length - array length -* @param dtype - data type -* @returns empty array -* -* @example -* var arr = empty( 2, 'uint32' ); -* // returns -*/ -declare function empty( length: number, dtype: 'uint32' ): Uint32Array; - -/** -* Creates an uninitialized array having a specified length. -* -* ## Notes -* -* - In browser environments, the function always returns zero-filled arrays. -* - In Node.js versions `>=3.0.0`, the underlying memory of returned typed arrays is **not** initialized. Memory contents are unknown and may contain **sensitive** data. -* -* @param length - array length -* @param dtype - data type -* @returns empty array -* -* @example -* var arr = empty( 2, 'uint16' ); -* // returns -*/ -declare function empty( length: number, dtype: 'uint16' ): Uint16Array; - -/** -* Creates an uninitialized array having a specified length. -* -* ## Notes -* -* - In browser environments, the function always returns zero-filled arrays. -* - In Node.js versions `>=3.0.0`, the underlying memory of returned typed arrays is **not** initialized. Memory contents are unknown and may contain **sensitive** data. -* -* @param length - array length -* @param dtype - data type -* @returns empty array -* -* @example -* var arr = empty( 2, 'uint8' ); -* // returns -*/ -declare function empty( length: number, dtype: 'uint8' ): Uint8Array; - -/** -* Creates an uninitialized array having a specified length. -* -* ## Notes -* -* - In browser environments, the function always returns zero-filled arrays. -* - In Node.js versions `>=3.0.0`, the underlying memory of returned typed arrays is **not** initialized. Memory contents are unknown and may contain **sensitive** data. -* -* @param length - array length -* @param dtype - data type -* @returns empty array -* -* @example -* var arr = empty( 2, 'uint8c' ); -* // returns -*/ -declare function empty( length: number, dtype: 'uint8c' ): Uint8ClampedArray; - -/** -* Creates a zero-filled array having a specified length. -* -* @param length - array length -* @param dtype - data type -* @returns zero-filled array -* -* @example -* var arr = empty( 2, 'generic' ); -* // returns -*/ -declare function empty( length: number, dtype: 'generic' ): Array; - -/** -* Creates an uninitialized array having a specified length. -* -* ## Notes -* -* - In browser environments, the function always returns zero-filled arrays. -* - If `dtype` is `'generic'`, the function always returns a zero-filled array. -* - In Node.js versions `>=3.0.0`, the underlying memory of returned typed arrays is **not** initialized. Memory contents are unknown and may contain **sensitive** data. -* -* The function recognizes the following data types: -* -* - `float64`: double-precision floating-point numbers (IEEE 754) -* - `float32`: single-precision floating-point numbers (IEEE 754) -* - `complex128`: double-precision complex floating-point numbers -* - `complex64`: single-precision complex floating-point numbers -* - `int32`: 32-bit two's complement signed integers -* - `uint32`: 32-bit unsigned integers -* - `int16`: 16-bit two's complement signed integers -* - `uint16`: 16-bit unsigned integers -* - `int8`: 8-bit two's complement signed integers -* - `uint8`: 8-bit unsigned integers -* - `uint8c`: 8-bit unsigned integers clamped to `0-255` -* - `generic`: generic JavaScript values -* -* @param length - array length -* @param dtype - data type (default: 'float64') -* @returns empty array -* -* @example -* var arr = empty( 2 ); -* // returns -* -* @example -* var arr = empty( 2, 'float32' ); -* // returns -*/ -declare function empty( length: number, dtype?: DataType ): Float64Array; - - -// EXPORTS // - -export = empty; diff --git a/mod.js b/mod.js deleted file mode 100644 index 6a414ae..0000000 --- a/mod.js +++ /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 -/// -var e="function"==typeof Object.defineProperty?Object.defineProperty:null;var r,t=Object.defineProperty,n=Object.prototype,o=n.toString,i=n.__defineGetter__,a=n.__defineSetter__,u=n.__lookupGetter__,f=n.__lookupSetter__;r=function(){try{return e({},"x",{}),!0}catch(e){return!1}}()?t:function(e,r,t){var l,c,y,s;if("object"!=typeof e||null===e||"[object Array]"===o.call(e))throw new TypeError("invalid argument. First argument must be an object. Value: `"+e+"`.");if("object"!=typeof t||null===t||"[object Array]"===o.call(t))throw new TypeError("invalid argument. Property descriptor must be an object. Value: `"+t+"`.");if((c="value"in t)&&(u.call(e,r)||f.call(e,r)?(l=e.__proto__,e.__proto__=n,delete e[r],e[r]=t.value,e.__proto__=l):e[r]=t.value),y="get"in t,s="set"in t,c&&(y||s))throw new Error("invalid argument. Cannot specify one or more accessors and a value or writable attribute in the property descriptor.");return y&&i&&i.call(e,r,t.get),s&&a&&a.call(e,r,t.set),e};var l=r;function c(e,r,t){l(e,r,{configurable:!1,enumerable:!1,writable:!1,value:t})}function y(e){return"number"==typeof e}var s="function"==typeof Symbol&&"symbol"==typeof Symbol("foo");function h(){return s&&"symbol"==typeof Symbol.toStringTag}var m=Object.prototype.toString;var p=Object.prototype.hasOwnProperty;function g(e,r){return null!=e&&p.call(e,r)}var w="function"==typeof Symbol?Symbol.toStringTag:"";var b=h()?function(e){var r,t,n;if(null==e)return m.call(e);t=e[w],r=g(e,w);try{e[w]=void 0}catch(r){return m.call(e)}return n=m.call(e),r?e[w]=t:delete e[w],n}:function(e){return m.call(e)},v=Number,d=v.prototype.toString;var E=h();function _(e){return"object"==typeof e&&(e instanceof v||(E?function(e){try{return d.call(e),!0}catch(e){return!1}}(e):"[object Number]"===b(e)))}function A(e){return y(e)||_(e)}c(A,"isPrimitive",y),c(A,"isObject",_);var T=Number.POSITIVE_INFINITY,j=v.NEGATIVE_INFINITY,x=Math.floor;function B(e){return x(e)===e}function L(e){return ej&&B(e)}function V(e){return y(e)&&L(e)}function S(e){return _(e)&&L(e.valueOf())}function R(e){return V(e)||S(e)}function k(e){return V(e)&&e>=0}function I(e){return S(e)&&e.valueOf()>=0}function O(e){return k(e)||I(e)}c(R,"isPrimitive",V),c(R,"isObject",S),c(O,"isPrimitive",k),c(O,"isObject",I);var M="function"==typeof Float64Array;var C="function"==typeof Float64Array?Float64Array:null;var N="function"==typeof Float64Array?Float64Array:void 0;var F=function(){var e,r,t;if("function"!=typeof C)return!1;try{r=new C([1,3.14,-3.14,NaN]),t=r,e=(M&&t instanceof Float64Array||"[object Float64Array]"===b(t))&&1===r[0]&&3.14===r[1]&&-3.14===r[2]&&r[3]!=r[3]}catch(r){e=!1}return e}()?N:function(){throw new Error("not implemented")},P="function"==typeof Float32Array;var U="function"==typeof Float32Array?Float32Array:null;var Y="function"==typeof Float32Array?Float32Array:void 0;var W=function(){var e,r,t;if("function"!=typeof U)return!1;try{r=new U([1,3.14,-3.14,5e40]),t=r,e=(P&&t instanceof Float32Array||"[object Float32Array]"===b(t))&&1===r[0]&&3.140000104904175===r[1]&&-3.140000104904175===r[2]&&r[3]===T}catch(r){e=!1}return e}()?Y:function(){throw new Error("not implemented")},G="function"==typeof Int16Array;var J="function"==typeof Int16Array?Int16Array:null;var z="function"==typeof Int16Array?Int16Array:void 0;var X=function(){var e,r,t;if("function"!=typeof J)return!1;try{r=new J([1,3.14,-3.14,32768]),t=r,e=(G&&t instanceof Int16Array||"[object Int16Array]"===b(t))&&1===r[0]&&3===r[1]&&-3===r[2]&&-32768===r[3]}catch(r){e=!1}return e}()?z:function(){throw new Error("not implemented")},q="function"==typeof Int32Array;var D="function"==typeof Int32Array?Int32Array:null;var H="function"==typeof Int32Array?Int32Array:void 0;var K=function(){var e,r,t;if("function"!=typeof D)return!1;try{r=new D([1,3.14,-3.14,2147483648]),t=r,e=(q&&t instanceof Int32Array||"[object Int32Array]"===b(t))&&1===r[0]&&3===r[1]&&-3===r[2]&&-2147483648===r[3]}catch(r){e=!1}return e}()?H:function(){throw new Error("not implemented")},Q="function"==typeof Int8Array;var Z="function"==typeof Int8Array?Int8Array:null;var $="function"==typeof Int8Array?Int8Array:void 0;var ee=function(){var e,r,t;if("function"!=typeof Z)return!1;try{r=new Z([1,3.14,-3.14,128]),t=r,e=(Q&&t instanceof Int8Array||"[object Int8Array]"===b(t))&&1===r[0]&&3===r[1]&&-3===r[2]&&-128===r[3]}catch(r){e=!1}return e}()?$:function(){throw new Error("not implemented")},re="function"==typeof Uint16Array;var te="function"==typeof Uint16Array?Uint16Array:null;var ne="function"==typeof Uint16Array?Uint16Array:void 0;var oe=function(){var e,r,t;if("function"!=typeof te)return!1;try{r=new te(r=[1,3.14,-3.14,65536,65537]),t=r,e=(re&&t instanceof Uint16Array||"[object Uint16Array]"===b(t))&&1===r[0]&&3===r[1]&&65533===r[2]&&0===r[3]&&1===r[4]}catch(r){e=!1}return e}()?ne:function(){throw new Error("not implemented")},ie="function"==typeof Uint32Array;var ae="function"==typeof Uint32Array?Uint32Array:null;var ue="function"==typeof Uint32Array?Uint32Array:void 0;var fe=function(){var e,r,t;if("function"!=typeof ae)return!1;try{r=new ae(r=[1,3.14,-3.14,4294967296,4294967297]),t=r,e=(ie&&t instanceof Uint32Array||"[object Uint32Array]"===b(t))&&1===r[0]&&3===r[1]&&4294967293===r[2]&&0===r[3]&&1===r[4]}catch(r){e=!1}return e}()?ue:function(){throw new Error("not implemented")},le="function"==typeof Uint8Array;var ce="function"==typeof Uint8Array?Uint8Array:null;var ye="function"==typeof Uint8Array?Uint8Array:void 0;var se=function(){var e,r,t;if("function"!=typeof ce)return!1;try{r=new ce(r=[1,3.14,-3.14,256,257]),t=r,e=(le&&t instanceof Uint8Array||"[object Uint8Array]"===b(t))&&1===r[0]&&3===r[1]&&253===r[2]&&0===r[3]&&1===r[4]}catch(r){e=!1}return e}()?ye:function(){throw new Error("not implemented")},he="function"==typeof Uint8ClampedArray;var me="function"==typeof Uint8ClampedArray?Uint8ClampedArray:null;var pe="function"==typeof Uint8ClampedArray?Uint8ClampedArray:void 0;var ge=function(){var e,r,t;if("function"!=typeof me)return!1;try{r=new me([-1,0,1,3.14,4.99,255,256]),t=r,e=(he&&t instanceof Uint8ClampedArray||"[object Uint8ClampedArray]"===b(t))&&0===r[0]&&0===r[1]&&1===r[2]&&3===r[3]&&5===r[4]&&255===r[5]&&255===r[6]}catch(r){e=!1}return e}()?pe:function(){throw new Error("not implemented")};function we(e){return"object"==typeof e&&null!==e&&"number"==typeof e.length&&B(e.length)&&e.length>=0&&e.length<=4294967295}function be(e){return"object"==typeof e&&null!==e&&"number"==typeof e.length&&B(e.length)&&e.length>=0&&e.length<=9007199254740991}var ve="function"==typeof ArrayBuffer;function de(e){return ve&&e instanceof ArrayBuffer||"[object ArrayBuffer]"===b(e)}var Ee=Array.isArray?Array.isArray:function(e){return"[object Array]"===b(e)};function _e(e){return"object"==typeof e&&null!==e&&!Ee(e)}var Ae=/./;function Te(e){return"boolean"==typeof e}var je=Boolean.prototype.toString;var xe=h();function Be(e){return"object"==typeof e&&(e instanceof Boolean||(xe?function(e){try{return je.call(e),!0}catch(e){return!1}}(e):"[object Boolean]"===b(e)))}function Le(e){return Te(e)||Be(e)}function Ve(){return new Function("return this;")()}c(Le,"isPrimitive",Te),c(Le,"isObject",Be);var Se="object"==typeof self?self:null,Re="object"==typeof window?window:null,ke="undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},Ie="object"==typeof ke?ke:null;var Oe=function(e){if(arguments.length){if(!Te(e))throw new TypeError("invalid argument. Must provide a boolean primitive. Value: `"+e+"`.");if(e)return Ve()}if(Se)return Se;if(Re)return Re;if(Ie)return Ie;throw new Error("unexpected error. Unable to resolve global object.")}(),Me=Oe.document&&Oe.document.childNodes,Ce=Int8Array;function Ne(){return/^\s*function\s*([^(]*)/i}var Fe=/^\s*function\s*([^(]*)/i;function Pe(e){return null!==e&&"object"==typeof e}function Ue(e){var r,t,n,o;if(("Object"===(t=b(e).slice(8,-1))||"Error"===t)&&e.constructor){if("string"==typeof(n=e.constructor).name)return n.name;if(r=Fe.exec(n.toString()))return r[1]}return Pe(o=e)&&(o._isBuffer||o.constructor&&"function"==typeof o.constructor.isBuffer&&o.constructor.isBuffer(o))?"Buffer":t}c(Ne,"REGEXP",Fe),c(Pe,"isObjectLikeArray",function(e){if("function"!=typeof e)throw new TypeError("invalid argument. Must provide a function. Value: `"+e+"`.");return function(r){var t,n;if(!Ee(r))return!1;if(0===(t=r.length))return!1;for(n=0;n=2)r.push(n[0],n[1]);else{if(!De(n))return new TypeError("invalid argument. An iterator must return either a two-element array containing real and imaginary components or a complex number. Value: `"+n+"`.");r.push($e(n),er(n))}return r}function lr(e,r,t){var n,o,i,a;for(n=[],a=-1;!(o=e.next()).done;)if(a+=1,we(i=r.call(t,o.value,a))&&i.length>=2)n.push(i[0],i[1]);else{if(!De(i))return new TypeError("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `"+i+"`.");n.push($e(i),er(i))}return n}function cr(e,r){var t,n,o,i;for(t=r.length,i=0,o=0;ot.byteLength-e)throw new RangeError("invalid arguments. ArrayBuffer has insufficient capacity. Either decrease the array length or provide a bigger buffer. Minimum capacity: `"+n*yr+"`.");t=new W(t,e,2*n)}}return c(this,"_buffer",t),c(this,"_length",t.length/2),this}function br(e){return e.re}function vr(e){return e.im}function dr(e){var r,t,n;for(r=[];!(t=e.next()).done;)if(we(n=t.value)&&n.length>=2)r.push(n[0],n[1]);else{if(!De(n))return new TypeError("invalid argument. An iterator must return either a two-element array containing real and imaginary components or a complex number. Value: `"+n+"`.");r.push(br(n),vr(n))}return r}function Er(e,r,t){var n,o,i,a;for(n=[],a=-1;!(o=e.next()).done;)if(a+=1,we(i=r.call(t,o.value,a))&&i.length>=2)n.push(i[0],i[1]);else{if(!De(i))return new TypeError("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `"+i+"`.");n.push(br(i),vr(i))}return n}function _r(e,r){var t,n,o,i;for(t=r.length,i=0,o=0;o1){if(!We(n=arguments[1]))throw new TypeError("invalid argument. Second argument must be a function. Value: `"+n+"`.");t>2&&(r=arguments[2])}if(hr(e)){if(u=e.length,n){for(i=(o=new this(u))._buffer,y=0,c=0;c=2))throw new TypeError("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `"+l+"`.");i[y]=l[0],i[y+1]=l[1]}y+=2}return o}return new this(e)}if(be(e)){if(n){for(u=e.length,a=ur(e),c=0;c=2))throw new TypeError("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `"+l+"`.");i[y]=l[0],i[y+1]=l[1]}y+=2}return o}return new this(e)}if(_e(e)&&sr&&We(e[Qe])){if(!We((i=e[Qe]()).next))throw new TypeError("invalid argument. First argument must be an array-like object or an iterable.");if((a=n?lr(i,n,r):fr(i))instanceof Error)throw a;for(i=(o=new this(u=a.length/2))._buffer,c=0;c=n)return{done:!0};return r=new qe(e[a+=2],e[a+1]),{value:[i,r],done:!1}})),c(t,"return",(function(e){if(o=!0,arguments.length)return{value:e,done:!0};return{done:!0}})),Qe&&c(t,Qe,(function(){return r.entries()})),t})),c(wr.prototype,"get",(function(e){var r;if(!hr(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!k(e))throw new TypeError("invalid argument. Must provide a nonnegative integer. Value: `"+e+"`.");if(!(e>=this._length))return new qe((r=this._buffer)[e*=2],r[e+1])})),Ze(wr.prototype,"length",(function(){return this._length})),c(wr.prototype,"set",(function(e){var r,t,n,o,i,a,u,f,l;if(!hr(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(n=this._buffer,arguments.length>1){if(!k(t=arguments[1]))throw new TypeError("invalid argument. Index argument must be a nonnegative integer. Value: `"+t+"`.")}else t=0;if(De(e)){if(t>=this._length)throw new RangeError("invalid argument. Index argument is out-of-bounds. Value: `"+t+"`.");return n[t*=2]=$e(e),void(n[t+1]=er(e))}if(hr(e)){if(t+(a=e._length)>this._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");if(r=e._buffer,l=n.byteOffset+t*yr,r.buffer===n.buffer&&r.byteOffsetl){for(o=new W(r.length),f=0;fthis._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");if(r=e,l=n.byteOffset+t*yr,r.buffer===n.buffer&&r.byteOffsetl){for(o=new W(a),f=0;fthis._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");for(t*=2,f=0;ft.byteLength-e)throw new RangeError("invalid arguments. ArrayBuffer has insufficient capacity. Either decrease the array length or provide a bigger buffer. Minimum capacity: `"+n*Ar+"`.");t=new F(t,e,2*n)}}return c(this,"_buffer",t),c(this,"_length",t.length/2),this}c(Vr,"BYTES_PER_ELEMENT",Ar),c(Vr,"name","Complex128Array"),c(Vr,"from",(function(e){var r,t,n,o,i,a,u,f,l,c,y;if(!We(this))throw new TypeError("invalid invocation. `this` context must be a constructor.");if(!xr(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if((t=arguments.length)>1){if(!We(n=arguments[1]))throw new TypeError("invalid argument. Second argument must be a function. Value: `"+n+"`.");t>2&&(r=arguments[2])}if(jr(e)){if(u=e.length,n){for(i=(o=new this(u))._buffer,y=0,c=0;c=2))throw new TypeError("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `"+l+"`.");i[y]=l[0],i[y+1]=l[1]}y+=2}return o}return new this(e)}if(be(e)){if(n){for(u=e.length,a=ur(e),c=0;c=2))throw new TypeError("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `"+l+"`.");i[y]=l[0],i[y+1]=l[1]}y+=2}return o}return new this(e)}if(_e(e)&&Tr&&We(e[Qe])){if(!We((i=e[Qe]()).next))throw new TypeError("invalid argument. First argument must be an array-like object or an iterable.");if((a=n?Er(i,n,r):dr(i))instanceof Error)throw a;for(i=(o=new this(u=a.length/2))._buffer,c=0;c=n)return{done:!0};return r=new Ge(e[a+=2],e[a+1]),{value:[i,r],done:!1}})),c(t,"return",(function(e){if(o=!0,arguments.length)return{value:e,done:!0};return{done:!0}})),Qe&&c(t,Qe,(function(){return r.entries()})),t})),c(Vr.prototype,"get",(function(e){var r;if(!jr(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!k(e))throw new TypeError("invalid argument. Must provide a nonnegative integer. Value: `"+e+"`.");if(!(e>=this._length))return new Ge((r=this._buffer)[e*=2],r[e+1])})),Ze(Vr.prototype,"length",(function(){return this._length})),c(Vr.prototype,"set",(function(e){var r,t,n,o,i,a,u,f,l;if(!jr(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(n=this._buffer,arguments.length>1){if(!k(t=arguments[1]))throw new TypeError("invalid argument. Index argument must be a nonnegative integer. Value: `"+t+"`.")}else t=0;if(De(e)){if(t>=this._length)throw new RangeError("invalid argument. Index argument is out-of-bounds. Value: `"+t+"`.");return n[t*=2]=br(e),void(n[t+1]=vr(e))}if(jr(e)){if(t+(a=e._length)>this._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");if(r=e._buffer,l=n.byteOffset+t*Ar,r.buffer===n.buffer&&r.byteOffsetl){for(o=new F(r.length),f=0;fthis._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");if(r=e,l=n.byteOffset+t*Ar,r.buffer===n.buffer&&r.byteOffsetl){for(o=new F(a),f=0;fthis._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");for(t*=2,f=0;f1?arguments[1]:"float64"))return kr(e);if(null===(t=Rr(r)))throw new TypeError("invalid argument. Second argument must be a recognized data type. Value: `"+r+"`.");return new t(e)}function Or(e){return arguments.length>1?Ir(e,arguments[1]):Ir(e)}export{Or as default}; -//# sourceMappingURL=mod.js.map diff --git a/mod.js.map b/mod.js.map deleted file mode 100644 index 1c46139..0000000 --- a/mod.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"mod.js","sources":["../node_modules/@stdlib/utils-define-property/lib/define_property.js","../node_modules/@stdlib/utils-define-property/lib/builtin.js","../node_modules/@stdlib/utils-define-property/lib/index.js","../node_modules/@stdlib/utils-define-property/lib/polyfill.js","../node_modules/@stdlib/utils-define-property/lib/has_define_property_support.js","../node_modules/@stdlib/utils-define-nonenumerable-read-only-property/lib/main.js","../node_modules/@stdlib/assert-is-number/lib/primitive.js","../node_modules/@stdlib/assert-has-tostringtag-support/lib/main.js","../node_modules/@stdlib/assert-has-symbol-support/lib/main.js","../node_modules/@stdlib/utils-native-class/lib/tostring.js","../node_modules/@stdlib/assert-has-own-property/lib/main.js","../node_modules/@stdlib/utils-native-class/lib/tostringtag.js","../node_modules/@stdlib/utils-native-class/lib/index.js","../node_modules/@stdlib/utils-native-class/lib/polyfill.js","../node_modules/@stdlib/utils-native-class/lib/native_class.js","../node_modules/@stdlib/number-ctor/lib/number.js","../node_modules/@stdlib/assert-is-number/lib/tostring.js","../node_modules/@stdlib/assert-is-number/lib/object.js","../node_modules/@stdlib/assert-is-number/lib/try2serialize.js","../node_modules/@stdlib/assert-is-number/lib/main.js","../node_modules/@stdlib/assert-is-number/lib/index.js","../node_modules/@stdlib/constants-float64-pinf/lib/index.js","../node_modules/@stdlib/constants-float64-ninf/lib/index.js","../node_modules/@stdlib/math-base-special-floor/lib/main.js","../node_modules/@stdlib/math-base-assert-is-integer/lib/is_integer.js","../node_modules/@stdlib/assert-is-integer/lib/integer.js","../node_modules/@stdlib/assert-is-integer/lib/primitive.js","../node_modules/@stdlib/assert-is-integer/lib/object.js","../node_modules/@stdlib/assert-is-integer/lib/main.js","../node_modules/@stdlib/assert-is-nonnegative-integer/lib/primitive.js","../node_modules/@stdlib/assert-is-nonnegative-integer/lib/object.js","../node_modules/@stdlib/assert-is-nonnegative-integer/lib/main.js","../node_modules/@stdlib/assert-is-integer/lib/index.js","../node_modules/@stdlib/assert-is-nonnegative-integer/lib/index.js","../node_modules/@stdlib/assert-is-float64array/lib/main.js","../node_modules/@stdlib/assert-has-float64array-support/lib/float64array.js","../node_modules/@stdlib/array-float64/lib/float64array.js","../node_modules/@stdlib/array-float64/lib/index.js","../node_modules/@stdlib/assert-has-float64array-support/lib/main.js","../node_modules/@stdlib/array-float64/lib/polyfill.js","../node_modules/@stdlib/assert-is-float32array/lib/main.js","../node_modules/@stdlib/assert-has-float32array-support/lib/float32array.js","../node_modules/@stdlib/array-float32/lib/float32array.js","../node_modules/@stdlib/array-float32/lib/index.js","../node_modules/@stdlib/assert-has-float32array-support/lib/main.js","../node_modules/@stdlib/array-float32/lib/polyfill.js","../node_modules/@stdlib/assert-is-int16array/lib/main.js","../node_modules/@stdlib/constants-int16-max/lib/index.js","../node_modules/@stdlib/assert-has-int16array-support/lib/int16array.js","../node_modules/@stdlib/array-int16/lib/int16array.js","../node_modules/@stdlib/array-int16/lib/index.js","../node_modules/@stdlib/assert-has-int16array-support/lib/main.js","../node_modules/@stdlib/constants-int16-min/lib/index.js","../node_modules/@stdlib/array-int16/lib/polyfill.js","../node_modules/@stdlib/assert-is-int32array/lib/main.js","../node_modules/@stdlib/constants-int32-max/lib/index.js","../node_modules/@stdlib/assert-has-int32array-support/lib/int32array.js","../node_modules/@stdlib/array-int32/lib/int32array.js","../node_modules/@stdlib/array-int32/lib/index.js","../node_modules/@stdlib/assert-has-int32array-support/lib/main.js","../node_modules/@stdlib/constants-int32-min/lib/index.js","../node_modules/@stdlib/array-int32/lib/polyfill.js","../node_modules/@stdlib/assert-is-int8array/lib/main.js","../node_modules/@stdlib/constants-int8-max/lib/index.js","../node_modules/@stdlib/assert-has-int8array-support/lib/int8array.js","../node_modules/@stdlib/array-int8/lib/int8array.js","../node_modules/@stdlib/array-int8/lib/index.js","../node_modules/@stdlib/assert-has-int8array-support/lib/main.js","../node_modules/@stdlib/constants-int8-min/lib/index.js","../node_modules/@stdlib/array-int8/lib/polyfill.js","../node_modules/@stdlib/assert-is-uint16array/lib/main.js","../node_modules/@stdlib/constants-uint16-max/lib/index.js","../node_modules/@stdlib/assert-has-uint16array-support/lib/uint16array.js","../node_modules/@stdlib/array-uint16/lib/uint16array.js","../node_modules/@stdlib/array-uint16/lib/index.js","../node_modules/@stdlib/assert-has-uint16array-support/lib/main.js","../node_modules/@stdlib/array-uint16/lib/polyfill.js","../node_modules/@stdlib/assert-is-uint32array/lib/main.js","../node_modules/@stdlib/constants-uint32-max/lib/index.js","../node_modules/@stdlib/assert-has-uint32array-support/lib/uint32array.js","../node_modules/@stdlib/array-uint32/lib/uint32array.js","../node_modules/@stdlib/array-uint32/lib/index.js","../node_modules/@stdlib/assert-has-uint32array-support/lib/main.js","../node_modules/@stdlib/array-uint32/lib/polyfill.js","../node_modules/@stdlib/assert-is-uint8array/lib/main.js","../node_modules/@stdlib/constants-uint8-max/lib/index.js","../node_modules/@stdlib/assert-has-uint8array-support/lib/uint8array.js","../node_modules/@stdlib/array-uint8/lib/uint8array.js","../node_modules/@stdlib/array-uint8/lib/index.js","../node_modules/@stdlib/assert-has-uint8array-support/lib/main.js","../node_modules/@stdlib/array-uint8/lib/polyfill.js","../node_modules/@stdlib/assert-is-uint8clampedarray/lib/main.js","../node_modules/@stdlib/assert-has-uint8clampedarray-support/lib/uint8clampedarray.js","../node_modules/@stdlib/array-uint8c/lib/uint8clampedarray.js","../node_modules/@stdlib/array-uint8c/lib/index.js","../node_modules/@stdlib/assert-has-uint8clampedarray-support/lib/main.js","../node_modules/@stdlib/array-uint8c/lib/polyfill.js","../node_modules/@stdlib/assert-is-array-like-object/lib/main.js","../node_modules/@stdlib/constants-array-max-array-length/lib/index.js","../node_modules/@stdlib/assert-is-collection/lib/main.js","../node_modules/@stdlib/constants-array-max-typed-array-length/lib/index.js","../node_modules/@stdlib/assert-is-arraybuffer/lib/main.js","../node_modules/@stdlib/assert-is-array/lib/main.js","../node_modules/@stdlib/assert-is-object/lib/main.js","../node_modules/@stdlib/utils-type-of/lib/fixtures/re.js","../node_modules/@stdlib/assert-is-boolean/lib/primitive.js","../node_modules/@stdlib/assert-is-boolean/lib/tostring.js","../node_modules/@stdlib/assert-is-boolean/lib/object.js","../node_modules/@stdlib/assert-is-boolean/lib/try2serialize.js","../node_modules/@stdlib/assert-is-boolean/lib/main.js","../node_modules/@stdlib/utils-global/lib/codegen.js","../node_modules/@stdlib/assert-is-boolean/lib/index.js","../node_modules/@stdlib/utils-global/lib/self.js","../node_modules/@stdlib/utils-global/lib/window.js","../node_modules/@stdlib/utils-global/lib/global.js","../node_modules/@stdlib/utils-type-of/lib/fixtures/nodelist.js","../node_modules/@stdlib/utils-global/lib/main.js","../node_modules/@stdlib/utils-type-of/lib/fixtures/typedarray.js","../node_modules/@stdlib/regexp-function-name/lib/main.js","../node_modules/@stdlib/regexp-function-name/lib/regexp.js","../node_modules/@stdlib/assert-is-object-like/lib/main.js","../node_modules/@stdlib/utils-constructor-name/lib/main.js","../node_modules/@stdlib/assert-is-buffer/lib/main.js","../node_modules/@stdlib/regexp-function-name/lib/index.js","../node_modules/@stdlib/assert-is-object-like/lib/index.js","../node_modules/@stdlib/assert-tools-array-function/lib/arrayfcn.js","../node_modules/@stdlib/utils-type-of/lib/index.js","../node_modules/@stdlib/utils-type-of/lib/check.js","../node_modules/@stdlib/utils-type-of/lib/polyfill.js","../node_modules/@stdlib/utils-type-of/lib/typeof.js","../node_modules/@stdlib/assert-is-function/lib/main.js","../node_modules/@stdlib/complex-float64/lib/main.js","../node_modules/@stdlib/complex-float64/lib/tostring.js","../node_modules/@stdlib/complex-float64/lib/tojson.js","../node_modules/@stdlib/number-float64-base-to-float32/lib/main.js","../node_modules/@stdlib/number-float64-base-to-float32/lib/polyfill.js","../node_modules/@stdlib/number-float64-base-to-float32/lib/index.js","../node_modules/@stdlib/complex-float32/lib/main.js","../node_modules/@stdlib/assert-is-complex-like/lib/main.js","../node_modules/@stdlib/math-base-assert-is-even/lib/is_even.js","../node_modules/@stdlib/assert-has-iterator-symbol-support/lib/main.js","../node_modules/@stdlib/complex-float32/lib/tostring.js","../node_modules/@stdlib/complex-float32/lib/tojson.js","../node_modules/@stdlib/symbol-iterator/lib/main.js","../node_modules/@stdlib/utils-define-nonenumerable-read-only-accessor/lib/main.js","../node_modules/@stdlib/complex-realf/lib/main.js","../node_modules/@stdlib/complex-imagf/lib/main.js","../node_modules/@stdlib/strided-base-reinterpret-complex64/lib/main.js","../node_modules/@stdlib/strided-base-reinterpret-complex128/lib/main.js","../node_modules/@stdlib/array-base-arraylike2object/lib/getter.js","../node_modules/@stdlib/array-base-arraylike2object/lib/getter.accessor.js","../node_modules/@stdlib/array-base-arraylike2object/lib/setter.js","../node_modules/@stdlib/array-base-arraylike2object/lib/setter.accessor.js","../node_modules/@stdlib/array-base-arraylike2object/lib/main.js","../node_modules/@stdlib/array-complex64/lib/from_iterator.js","../node_modules/@stdlib/array-complex64/lib/from_iterator_map.js","../node_modules/@stdlib/array-complex64/lib/from_array.js","../node_modules/@stdlib/array-complex64/lib/main.js","../node_modules/@stdlib/complex-real/lib/main.js","../node_modules/@stdlib/complex-imag/lib/main.js","../node_modules/@stdlib/array-complex128/lib/from_iterator.js","../node_modules/@stdlib/array-complex128/lib/from_iterator_map.js","../node_modules/@stdlib/array-complex128/lib/from_array.js","../node_modules/@stdlib/array-complex128/lib/main.js","../node_modules/@stdlib/array-ctors/lib/ctors.js","../node_modules/@stdlib/array-ctors/lib/main.js","../node_modules/@stdlib/array-base-zeros/lib/main.js","../node_modules/@stdlib/array-base-filled/lib/main.js","../node_modules/@stdlib/array-zeros/lib/main.js","../lib/polyfill.js"],"sourcesContent":["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Object.defineProperty === 'function' ) ? Object.defineProperty : null;\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Defines (or modifies) an object property.\n*\n* ## Notes\n*\n* - Property descriptors come in two flavors: **data descriptors** and **accessor descriptors**. A data descriptor is a property that has a value, which may or may not be writable. An accessor descriptor is a property described by a getter-setter function pair. A descriptor must be one of these two flavors and cannot be both.\n*\n* @name defineProperty\n* @type {Function}\n* @param {Object} obj - object on which to define the property\n* @param {(string|symbol)} prop - property name\n* @param {Object} descriptor - property descriptor\n* @param {boolean} [descriptor.configurable=false] - boolean indicating if property descriptor can be changed and if the property can be deleted from the provided object\n* @param {boolean} [descriptor.enumerable=false] - boolean indicating if the property shows up when enumerating object properties\n* @param {boolean} [descriptor.writable=false] - boolean indicating if the value associated with the property can be changed with an assignment operator\n* @param {*} [descriptor.value] - property value\n* @param {(Function|void)} [descriptor.get=undefined] - function which serves as a getter for the property, or, if no getter, undefined. When the property is accessed, a getter function is called without arguments and with the `this` context set to the object through which the property is accessed (which may not be the object on which the property is defined due to inheritance). The return value will be used as the property value.\n* @param {(Function|void)} [descriptor.set=undefined] - function which serves as a setter for the property, or, if no setter, undefined. When assigning a property value, a setter function is called with one argument (the value being assigned to the property) and with the `this` context set to the object through which the property is assigned.\n* @throws {TypeError} first argument must be an object\n* @throws {TypeError} third argument must be an object\n* @throws {Error} property descriptor cannot have both a value and a setter and/or getter\n* @returns {Object} object with added property\n*\n* @example\n* var obj = {};\n*\n* defineProperty( obj, 'foo', {\n* 'value': 'bar'\n* });\n*\n* var str = obj.foo;\n* // returns 'bar'\n*/\nvar defineProperty = Object.defineProperty;\n\n\n// EXPORTS //\n\nexport default defineProperty;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Define (or modify) an object property.\n*\n* @module @stdlib/utils-define-property\n*\n* @example\n* import defineProperty from '@stdlib/utils-define-property';\n*\n* var obj = {};\n* defineProperty( obj, 'foo', {\n* 'value': 'bar',\n* 'writable': false,\n* 'configurable': false,\n* 'enumerable': false\n* });\n* obj.foo = 'boop'; // => throws\n*/\n\n// MODULES //\n\nimport hasDefinePropertySupport from './has_define_property_support.js';\nimport builtin from './builtin.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar defineProperty;\nif ( hasDefinePropertySupport() ) {\n\tdefineProperty = builtin;\n} else {\n\tdefineProperty = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default defineProperty;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable no-underscore-dangle, no-proto */\n\n'use strict';\n\n// VARIABLES //\n\nvar objectProtoype = Object.prototype;\nvar toStr = objectProtoype.toString;\nvar defineGetter = objectProtoype.__defineGetter__;\nvar defineSetter = objectProtoype.__defineSetter__;\nvar lookupGetter = objectProtoype.__lookupGetter__;\nvar lookupSetter = objectProtoype.__lookupSetter__;\n\n\n// MAIN //\n\n/**\n* Defines (or modifies) an object property.\n*\n* ## Notes\n*\n* - Property descriptors come in two flavors: **data descriptors** and **accessor descriptors**. A data descriptor is a property that has a value, which may or may not be writable. An accessor descriptor is a property described by a getter-setter function pair. A descriptor must be one of these two flavors and cannot be both.\n*\n* @param {Object} obj - object on which to define the property\n* @param {string} prop - property name\n* @param {Object} descriptor - property descriptor\n* @param {boolean} [descriptor.configurable=false] - boolean indicating if property descriptor can be changed and if the property can be deleted from the provided object\n* @param {boolean} [descriptor.enumerable=false] - boolean indicating if the property shows up when enumerating object properties\n* @param {boolean} [descriptor.writable=false] - boolean indicating if the value associated with the property can be changed with an assignment operator\n* @param {*} [descriptor.value] - property value\n* @param {(Function|void)} [descriptor.get=undefined] - function which serves as a getter for the property, or, if no getter, undefined. When the property is accessed, a getter function is called without arguments and with the `this` context set to the object through which the property is accessed (which may not be the object on which the property is defined due to inheritance). The return value will be used as the property value.\n* @param {(Function|void)} [descriptor.set=undefined] - function which serves as a setter for the property, or, if no setter, undefined. When assigning a property value, a setter function is called with one argument (the value being assigned to the property) and with the `this` context set to the object through which the property is assigned.\n* @throws {TypeError} first argument must be an object\n* @throws {TypeError} third argument must be an object\n* @throws {Error} property descriptor cannot have both a value and a setter and/or getter\n* @returns {Object} object with added property\n*\n* @example\n* var obj = {};\n*\n* defineProperty( obj, 'foo', {\n* 'value': 'bar'\n* });\n*\n* var str = obj.foo;\n* // returns 'bar'\n*/\nfunction defineProperty( obj, prop, descriptor ) {\n\tvar prototype;\n\tvar hasValue;\n\tvar hasGet;\n\tvar hasSet;\n\n\tif ( typeof obj !== 'object' || obj === null || toStr.call( obj ) === '[object Array]' ) {\n\t\tthrow new TypeError( 'invalid argument. First argument must be an object. Value: `' + obj + '`.' );\n\t}\n\tif ( typeof descriptor !== 'object' || descriptor === null || toStr.call( descriptor ) === '[object Array]' ) {\n\t\tthrow new TypeError( 'invalid argument. Property descriptor must be an object. Value: `' + descriptor + '`.' );\n\t}\n\thasValue = ( 'value' in descriptor );\n\tif ( hasValue ) {\n\t\tif (\n\t\t\tlookupGetter.call( obj, prop ) ||\n\t\t\tlookupSetter.call( obj, prop )\n\t\t) {\n\t\t\t// Override `__proto__` to avoid touching inherited accessors:\n\t\t\tprototype = obj.__proto__;\n\t\t\tobj.__proto__ = objectProtoype;\n\n\t\t\t// Delete property as existing getters/setters prevent assigning value to specified property:\n\t\t\tdelete obj[ prop ];\n\t\t\tobj[ prop ] = descriptor.value;\n\n\t\t\t// Restore original prototype:\n\t\t\tobj.__proto__ = prototype;\n\t\t} else {\n\t\t\tobj[ prop ] = descriptor.value;\n\t\t}\n\t}\n\thasGet = ( 'get' in descriptor );\n\thasSet = ( 'set' in descriptor );\n\n\tif ( hasValue && ( hasGet || hasSet ) ) {\n\t\tthrow new Error( 'invalid argument. Cannot specify one or more accessors and a value or writable attribute in the property descriptor.' );\n\t}\n\n\tif ( hasGet && defineGetter ) {\n\t\tdefineGetter.call( obj, prop, descriptor.get );\n\t}\n\tif ( hasSet && defineSetter ) {\n\t\tdefineSetter.call( obj, prop, descriptor.set );\n\t}\n\treturn obj;\n}\n\n\n// EXPORTS //\n\nexport default defineProperty;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport defineProperty from './define_property.js';\n\n\n// MAIN //\n\n/**\n* Tests for `Object.defineProperty` support.\n*\n* @private\n* @returns {boolean} boolean indicating if an environment has `Object.defineProperty` support\n*\n* @example\n* var bool = hasDefinePropertySupport();\n* // returns \n*/\nfunction hasDefinePropertySupport() {\n\t// Test basic support...\n\ttry {\n\t\tdefineProperty( {}, 'x', {} );\n\t\treturn true;\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\treturn false;\n\t}\n}\n\n\n// EXPORTS //\n\nexport default hasDefinePropertySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport defineProperty from '@stdlib/utils-define-property';\n\n\n// MAIN //\n\n/**\n* Defines a non-enumerable read-only property.\n*\n* @param {Object} obj - object on which to define the property\n* @param {(string|symbol)} prop - property name\n* @param {*} value - value to set\n*\n* @example\n* var obj = {};\n*\n* setNonEnumerableReadOnly( obj, 'foo', 'bar' );\n*\n* try {\n* obj.foo = 'boop';\n* } catch ( err ) {\n* console.error( err.message );\n* }\n*/\nfunction setNonEnumerableReadOnly( obj, prop, value ) {\n\tdefineProperty( obj, prop, {\n\t\t'configurable': false,\n\t\t'enumerable': false,\n\t\t'writable': false,\n\t\t'value': value\n\t});\n}\n\n\n// EXPORTS //\n\nexport default setNonEnumerableReadOnly;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Tests if a value is a number primitive.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number primitive\n*\n* @example\n* var bool = isNumber( 3.14 );\n* // returns true\n*\n* @example\n* var bool = isNumber( NaN );\n* // returns true\n*\n* @example\n* var bool = isNumber( new Number( 3.14 ) );\n* // returns false\n*/\nfunction isNumber( value ) {\n\treturn ( typeof value === 'number' );\n}\n\n\n// EXPORTS //\n\nexport default isNumber;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport hasSymbols from '@stdlib/assert-has-symbol-support';\n\n\n// VARIABLES //\n\nvar FLG = hasSymbols();\n\n\n// MAIN //\n\n/**\n* Tests for native `toStringTag` support.\n*\n* @returns {boolean} boolean indicating if an environment has `toStringTag` support\n*\n* @example\n* var bool = hasToStringTagSupport();\n* // returns \n*/\nfunction hasToStringTagSupport() {\n\treturn ( FLG && typeof Symbol.toStringTag === 'symbol' );\n}\n\n\n// EXPORTS //\n\nexport default hasToStringTagSupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Tests for native `Symbol` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Symbol` support\n*\n* @example\n* var bool = hasSymbolSupport();\n* // returns \n*/\nfunction hasSymbolSupport() {\n\treturn (\n\t\ttypeof Symbol === 'function' &&\n\t\ttypeof Symbol( 'foo' ) === 'symbol'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default hasSymbolSupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar toStr = Object.prototype.toString;\n\n\n// EXPORTS //\n\nexport default toStr;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// FUNCTIONS //\n\nvar has = Object.prototype.hasOwnProperty;\n\n\n// MAIN //\n\n/**\n* Tests if an object has a specified property.\n*\n* @param {*} value - value to test\n* @param {*} property - property to test\n* @returns {boolean} boolean indicating if an object has a specified property\n*\n* @example\n* var beep = {\n* 'boop': true\n* };\n*\n* var bool = hasOwnProp( beep, 'boop' );\n* // returns true\n*\n* @example\n* var beep = {\n* 'boop': true\n* };\n*\n* var bool = hasOwnProp( beep, 'bap' );\n* // returns false\n*/\nfunction hasOwnProp( value, property ) {\n\tif (\n\t\tvalue === void 0 ||\n\t\tvalue === null\n\t) {\n\t\treturn false;\n\t}\n\treturn has.call( value, property );\n}\n\n\n// EXPORTS //\n\nexport default hasOwnProp;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar toStrTag = ( typeof Symbol === 'function' ) ? Symbol.toStringTag : '';\n\n\n// EXPORTS //\n\nexport default toStrTag;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Return a string value indicating a specification defined classification of an object.\n*\n* @module @stdlib/utils-native-class\n*\n* @example\n* import nativeClass from '@stdlib/utils-native-class';\n*\n* var str = nativeClass( 'a' );\n* // returns '[object String]'\n*\n* str = nativeClass( 5 );\n* // returns '[object Number]'\n*\n* function Beep() {\n* return this;\n* }\n* str = nativeClass( new Beep() );\n* // returns '[object Object]'\n*/\n\n// MODULES //\n\nimport hasToStringTag from '@stdlib/assert-has-tostringtag-support';\nimport builtin from './native_class.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar nativeClass;\nif ( hasToStringTag() ) {\n\tnativeClass = polyfill;\n} else {\n\tnativeClass = builtin;\n}\n\n\n// EXPORTS //\n\nexport default nativeClass;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport hasOwnProp from '@stdlib/assert-has-own-property';\nimport toStringTag from './tostringtag.js';\nimport toStr from './tostring.js';\n\n\n// MAIN //\n\n/**\n* Returns a string value indicating a specification defined classification of an object in environments supporting `Symbol.toStringTag`.\n*\n* @param {*} v - input value\n* @returns {string} string value indicating a specification defined classification of the input value\n*\n* @example\n* var str = nativeClass( 'a' );\n* // returns '[object String]'\n*\n* @example\n* var str = nativeClass( 5 );\n* // returns '[object Number]'\n*\n* @example\n* function Beep() {\n* return this;\n* }\n* var str = nativeClass( new Beep() );\n* // returns '[object Object]'\n*/\nfunction nativeClass( v ) {\n\tvar isOwn;\n\tvar tag;\n\tvar out;\n\n\tif ( v === null || v === void 0 ) {\n\t\treturn toStr.call( v );\n\t}\n\ttag = v[ toStringTag ];\n\tisOwn = hasOwnProp( v, toStringTag );\n\n\t// Attempt to override the `toStringTag` property. For built-ins having a `Symbol.toStringTag` property (e.g., `JSON`, `Math`, etc), the `Symbol.toStringTag` property is read-only (e.g., , so we need to wrap in a `try/catch`.\n\ttry {\n\t\tv[ toStringTag ] = void 0;\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\treturn toStr.call( v );\n\t}\n\tout = toStr.call( v );\n\n\tif ( isOwn ) {\n\t\tv[ toStringTag ] = tag;\n\t} else {\n\t\tdelete v[ toStringTag ];\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default nativeClass;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport toStr from './tostring.js';\n\n\n// MAIN //\n\n/**\n* Returns a string value indicating a specification defined classification (via the internal property `[[Class]]`) of an object.\n*\n* @param {*} v - input value\n* @returns {string} string value indicating a specification defined classification of the input value\n*\n* @example\n* var str = nativeClass( 'a' );\n* // returns '[object String]'\n*\n* @example\n* var str = nativeClass( 5 );\n* // returns '[object Number]'\n*\n* @example\n* function Beep() {\n* return this;\n* }\n* var str = nativeClass( new Beep() );\n* // returns '[object Object]'\n*/\nfunction nativeClass( v ) {\n\treturn toStr.call( v );\n}\n\n\n// EXPORTS //\n\nexport default nativeClass;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// EXPORTS //\n\nexport default Number; // eslint-disable-line stdlib/require-globals\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport Number from '@stdlib/number-ctor';\n\n\n// MAIN //\n\n// eslint-disable-next-line stdlib/no-redeclare\nvar toString = Number.prototype.toString; // non-generic\n\n\n// EXPORTS //\n\nexport default toString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport hasToStringTag from '@stdlib/assert-has-tostringtag-support';\nimport nativeClass from '@stdlib/utils-native-class';\nimport Number from '@stdlib/number-ctor';\nimport test from './try2serialize.js';\n\n\n// VARIABLES //\n\nvar FLG = hasToStringTag();\n\n\n// MAIN //\n\n/**\n* Tests if a value is a number object.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number object\n*\n* @example\n* var bool = isNumber( 3.14 );\n* // returns false\n*\n* @example\n* var bool = isNumber( new Number( 3.14 ) );\n* // returns true\n*/\nfunction isNumber( value ) {\n\tif ( typeof value === 'object' ) {\n\t\tif ( value instanceof Number ) {\n\t\t\treturn true;\n\t\t}\n\t\tif ( FLG ) {\n\t\t\treturn test( value );\n\t\t}\n\t\treturn ( nativeClass( value ) === '[object Number]' );\n\t}\n\treturn false;\n}\n\n\n// EXPORTS //\n\nexport default isNumber;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport toString from './tostring.js'; // eslint-disable-line stdlib/no-redeclare\n\n\n// MAIN //\n\n/**\n* Attempts to serialize a value to a string.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value can be serialized\n*/\nfunction test( value ) {\n\ttry {\n\t\ttoString.call( value );\n\t\treturn true;\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\treturn false;\n\t}\n}\n\n\n// EXPORTS //\n\nexport default test;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a number.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a number\n*\n* @example\n* var bool = isNumber( 3.14 );\n* // returns true\n*\n* @example\n* var bool = isNumber( new Number( 3.14 ) );\n* // returns true\n*\n* @example\n* var bool = isNumber( NaN );\n* // returns true\n*\n* @example\n* var bool = isNumber( null );\n* // returns false\n*/\nfunction isNumber( value ) {\n\treturn ( isPrimitive( value ) || isObject( value ) );\n}\n\n\n// EXPORTS //\n\nexport default isNumber;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test if a value is a number.\n*\n* @module @stdlib/assert-is-number\n*\n* @example\n* import isNumber from '@stdlib/assert-is-number';\n*\n* var bool = isNumber( 3.14 );\n* // returns true\n*\n* bool = isNumber( new Number( 3.14 ) );\n* // returns true\n*\n* bool = isNumber( NaN );\n* // returns true\n*\n* bool = isNumber( null );\n* // returns false\n*\n* @example\n* import { isPrimitive as isNumber } from '@stdlib/assert-is-number';\n*\n* var bool = isNumber( 3.14 );\n* // returns true\n*\n* bool = isNumber( NaN );\n* // returns true\n*\n* bool = isNumber( new Number( 3.14 ) );\n* // returns false\n*\n* @example\n* import { isObject as isNumber } from '@stdlib/assert-is-number';\n*\n* var bool = isNumber( 3.14 );\n* // returns false\n*\n* bool = isNumber( new Number( 3.14 ) );\n* // returns true\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport isNumber from './main.js';\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\nsetReadOnly( isNumber, 'isPrimitive', isPrimitive );\nsetReadOnly( isNumber, 'isObject', isObject );\n\n\n// EXPORTS //\n\nexport default isNumber;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Double-precision floating-point positive infinity.\n*\n* @module @stdlib/constants-float64-pinf\n* @type {number}\n*\n* @example\n* import FLOAT64_PINF from '@stdlib/constants-float64-pinf';\n* // returns Infinity\n*/\n\n\n// MAIN //\n\n/**\n* Double-precision floating-point positive infinity.\n*\n* ## Notes\n*\n* Double-precision floating-point positive infinity has the bit sequence\n*\n* ```binarystring\n* 0 11111111111 00000000000000000000 00000000000000000000000000000000\n* ```\n*\n* @constant\n* @type {number}\n* @default Number.POSITIVE_INFINITY\n* @see [IEEE 754]{@link https://en.wikipedia.org/wiki/IEEE_754-1985}\n*/\nvar FLOAT64_PINF = Number.POSITIVE_INFINITY; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default FLOAT64_PINF;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Double-precision floating-point negative infinity.\n*\n* @module @stdlib/constants-float64-ninf\n* @type {number}\n*\n* @example\n* import FLOAT64_NINF from '@stdlib/constants-float64-ninf';\n* // returns -Infinity\n*/\n\n// MODULES //\n\nimport Number from '@stdlib/number-ctor';\n\n\n// MAIN //\n\n/**\n* Double-precision floating-point negative infinity.\n*\n* ## Notes\n*\n* Double-precision floating-point negative infinity has the bit sequence\n*\n* ```binarystring\n* 1 11111111111 00000000000000000000 00000000000000000000000000000000\n* ```\n*\n* @constant\n* @type {number}\n* @default Number.NEGATIVE_INFINITY\n* @see [IEEE 754]{@link https://en.wikipedia.org/wiki/IEEE_754-1985}\n*/\nvar FLOAT64_NINF = Number.NEGATIVE_INFINITY;\n\n\n// EXPORTS //\n\nexport default FLOAT64_NINF;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: implementation (?)\n\n/**\n* Rounds a double-precision floating-point number toward negative infinity.\n*\n* @param {number} x - input value\n* @returns {number} rounded value\n*\n* @example\n* var v = floor( -4.2 );\n* // returns -5.0\n*\n* @example\n* var v = floor( 9.99999 );\n* // returns 9.0\n*\n* @example\n* var v = floor( 0.0 );\n* // returns 0.0\n*\n* @example\n* var v = floor( NaN );\n* // returns NaN\n*/\nvar floor = Math.floor; // eslint-disable-line stdlib/no-builtin-math\n\n\n// EXPORTS //\n\nexport default floor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport floor from '@stdlib/math-base-special-floor';\n\n\n// MAIN //\n\n/**\n* Tests if a finite double-precision floating-point number is an integer.\n*\n* @param {number} x - value to test\n* @returns {boolean} boolean indicating whether the value is an integer\n*\n* @example\n* var bool = isInteger( 1.0 );\n* // returns true\n*\n* @example\n* var bool = isInteger( 3.14 );\n* // returns false\n*/\nfunction isInteger( x ) {\n\treturn (floor(x) === x);\n}\n\n\n// EXPORTS //\n\nexport default isInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport PINF from '@stdlib/constants-float64-pinf';\nimport NINF from '@stdlib/constants-float64-ninf';\nimport isInt from '@stdlib/math-base-assert-is-integer';\n\n\n// MAIN //\n\n/**\n* Tests if a number primitive is an integer value.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a number primitive is an integer value\n*/\nfunction isInteger( value ) {\n\treturn (\n\t\tvalue < PINF &&\n\t\tvalue > NINF &&\n\t\tisInt( value )\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isNumber } from '@stdlib/assert-is-number';\nimport isInt from './integer.js';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a number primitive having an integer value.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number primitive having an integer value\n*\n* @example\n* var bool = isInteger( -3.0 );\n* // returns true\n*\n* @example\n* var bool = isInteger( new Number( -3.0 ) );\n* // returns false\n*/\nfunction isInteger( value ) {\n\treturn (\n\t\tisNumber( value ) &&\n\t\tisInt( value )\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isObject as isNumber } from '@stdlib/assert-is-number';\nimport isInt from './integer.js';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a number object having an integer value.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number object having an integer value\n*\n* @example\n* var bool = isInteger( 3.0 );\n* // returns false\n*\n* @example\n* var bool = isInteger( new Number( 3.0 ) );\n* // returns true\n*/\nfunction isInteger( value ) {\n\treturn (\n\t\tisNumber( value ) &&\n\t\tisInt( value.valueOf() )\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\n/**\n* Tests if a value is an integer.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an integer\n*\n* @example\n* var bool = isInteger( 5.0 );\n* // returns true\n*\n* @example\n* var bool = isInteger( new Number( 5.0 ) );\n* // returns true\n*\n* @example\n* var bool = isInteger( -3.14 );\n* // returns false\n*\n* @example\n* var bool = isInteger( null );\n* // returns false\n*/\nfunction isInteger( value ) {\n\treturn ( isPrimitive( value ) || isObject( value ) );\n}\n\n\n// EXPORTS //\n\nexport default isInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isInteger } from '@stdlib/assert-is-integer';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a number primitive having a nonnegative integer value.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number primitive having a nonnegative integer value\n*\n* @example\n* var bool = isNonNegativeInteger( 3.0 );\n* // returns true\n*\n* @example\n* var bool = isNonNegativeInteger( new Number( 3.0 ) );\n* // returns false\n*/\nfunction isNonNegativeInteger( value ) {\n\treturn (\n\t\tisInteger( value ) &&\n\t\tvalue >= 0\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isNonNegativeInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isObject as isInteger } from '@stdlib/assert-is-integer';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a number object having a nonnegative integer value.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number object having a nonnegative integer value\n*\n* @example\n* var bool = isNonNegativeInteger( 3.0 );\n* // returns false\n*\n* @example\n* var bool = isNonNegativeInteger( new Number( 3.0 ) );\n* // returns true\n*/\nfunction isNonNegativeInteger( value ) {\n\treturn (\n\t\tisInteger( value ) &&\n\t\tvalue.valueOf() >= 0\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isNonNegativeInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a nonnegative integer.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a nonnegative integer\n*\n* @example\n* var bool = isNonNegativeInteger( 5.0 );\n* // returns true\n*\n* @example\n* var bool = isNonNegativeInteger( new Number( 5.0 ) );\n* // returns true\n*\n* @example\n* var bool = isNonNegativeInteger( -5.0 );\n* // returns false\n*\n* @example\n* var bool = isNonNegativeInteger( 3.14 );\n* // returns false\n*\n* @example\n* var bool = isNonNegativeInteger( null );\n* // returns false\n*/\nfunction isNonNegativeInteger( value ) {\n\treturn ( isPrimitive( value ) || isObject( value ) );\n}\n\n\n// EXPORTS //\n\nexport default isNonNegativeInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test if a value is an integer.\n*\n* @module @stdlib/assert-is-integer\n*\n* @example\n* import isInteger from '@stdlib/assert-is-integer';\n*\n* var bool = isInteger( 5.0 );\n* // returns true\n*\n* bool = isInteger( new Number( 5.0 ) );\n* // returns true\n*\n* bool = isInteger( -3.14 );\n* // returns false\n*\n* bool = isInteger( null );\n* // returns false\n*\n* @example\n* // Use interface to check for integer primitives...\n* import { isPrimitive as isInteger } from '@stdlib/assert-is-integer';\n*\n* var bool = isInteger( -3.0 );\n* // returns true\n*\n* bool = isInteger( new Number( -3.0 ) );\n* // returns false\n*\n* @example\n* // Use interface to check for integer objects...\n* import { isObject as isInteger } from '@stdlib/assert-is-integer';\n*\n* var bool = isInteger( 3.0 );\n* // returns false\n*\n* bool = isInteger( new Number( 3.0 ) );\n* // returns true\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport isInteger from './main.js';\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\nsetReadOnly( isInteger, 'isPrimitive', isPrimitive );\nsetReadOnly( isInteger, 'isObject', isObject );\n\n\n// EXPORTS //\n\nexport default isInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test if a value is a nonnegative integer.\n*\n* @module @stdlib/assert-is-nonnegative-integer\n*\n* @example\n* import isNonNegativeInteger from '@stdlib/assert-is-nonnegative-integer';\n*\n* var bool = isNonNegativeInteger( 5.0 );\n* // returns true\n*\n* bool = isNonNegativeInteger( new Number( 5.0 ) );\n* // returns true\n*\n* bool = isNonNegativeInteger( -5.0 );\n* // returns false\n*\n* bool = isNonNegativeInteger( 3.14 );\n* // returns false\n*\n* bool = isNonNegativeInteger( null );\n* // returns false\n*\n* @example\n* import { isPrimitive as isNonNegativeInteger } from '@stdlib/assert-is-nonnegative-integer';\n*\n* var bool = isNonNegativeInteger( 3.0 );\n* // returns true\n*\n* bool = isNonNegativeInteger( new Number( 3.0 ) );\n* // returns false\n*\n* @example\n* import { isObject as isNonNegativeInteger } from '@stdlib/assert-is-nonnegative-integer';\n*\n* var bool = isNonNegativeInteger( 3.0 );\n* // returns false\n*\n* bool = isNonNegativeInteger( new Number( 3.0 ) );\n* // returns true\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport isNonNegativeInteger from './main.js';\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\nsetReadOnly( isNonNegativeInteger, 'isPrimitive', isPrimitive );\nsetReadOnly( isNonNegativeInteger, 'isObject', isObject );\n\n\n// EXPORTS //\n\nexport default isNonNegativeInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasFloat64Array = ( typeof Float64Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Float64Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a Float64Array\n*\n* @example\n* var bool = isFloat64Array( new Float64Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isFloat64Array( [] );\n* // returns false\n*/\nfunction isFloat64Array( value ) {\n\treturn (\n\t\t( hasFloat64Array && value instanceof Float64Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Float64Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isFloat64Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Float64Array === 'function' ) ? Float64Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Float64Array === 'function' ) ? Float64Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of double-precision floating-point numbers in the platform byte order.\n*\n* @module @stdlib/array-float64\n*\n* @example\n* import ctor from '@stdlib/array-float64';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasFloat64ArraySupport from '@stdlib/assert-has-float64array-support';\nimport builtin from './float64array.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasFloat64ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isFloat64Array from '@stdlib/assert-is-float64array';\nimport GlobalFloat64Array from './float64array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Float64Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Float64Array` support\n*\n* @example\n* var bool = hasFloat64ArraySupport();\n* // returns \n*/\nfunction hasFloat64ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalFloat64Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = new GlobalFloat64Array( [ 1.0, 3.14, -3.14, NaN ] );\n\t\tbool = (\n\t\t\tisFloat64Array( arr ) &&\n\t\t\tarr[ 0 ] === 1.0 &&\n\t\t\tarr[ 1 ] === 3.14 &&\n\t\t\tarr[ 2 ] === -3.14 &&\n\t\t\tarr[ 3 ] !== arr[ 3 ]\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasFloat64ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of double-precision floating-point numbers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasFloat32Array = ( typeof Float32Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Float32Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a Float32Array\n*\n* @example\n* var bool = isFloat32Array( new Float32Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isFloat32Array( [] );\n* // returns false\n*/\nfunction isFloat32Array( value ) {\n\treturn (\n\t\t( hasFloat32Array && value instanceof Float32Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Float32Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isFloat32Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Float32Array === 'function' ) ? Float32Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Float32Array === 'function' ) ? Float32Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of single-precision floating-point numbers in the platform byte order.\n*\n* @module @stdlib/array-float32\n*\n* @example\n* import ctor from '@stdlib/array-float32';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasFloat32ArraySupport from '@stdlib/assert-has-float32array-support';\nimport builtin from './float32array.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasFloat32ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isFloat32Array from '@stdlib/assert-is-float32array';\nimport PINF from '@stdlib/constants-float64-pinf';\nimport GlobalFloat32Array from './float32array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Float32Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Float32Array` support\n*\n* @example\n* var bool = hasFloat32ArraySupport();\n* // returns \n*/\nfunction hasFloat32ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalFloat32Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = new GlobalFloat32Array( [ 1.0, 3.14, -3.14, 5.0e40 ] );\n\t\tbool = (\n\t\t\tisFloat32Array( arr ) &&\n\t\t\tarr[ 0 ] === 1.0 &&\n\t\t\tarr[ 1 ] === 3.140000104904175 &&\n\t\t\tarr[ 2 ] === -3.140000104904175 &&\n\t\t\tarr[ 3 ] === PINF\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasFloat32ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of single-precision floating-point numbers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasInt16Array = ( typeof Int16Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is an Int16Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an Int16Array\n*\n* @example\n* var bool = isInt16Array( new Int16Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isInt16Array( [] );\n* // returns false\n*/\nfunction isInt16Array( value ) {\n\treturn (\n\t\t( hasInt16Array && value instanceof Int16Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Int16Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isInt16Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum signed 16-bit integer.\n*\n* @module @stdlib/constants-int16-max\n* @type {integer32}\n*\n* @example\n* import INT16_MAX from '@stdlib/constants-int16-max';\n* // returns 32767\n*/\n\n\n// MAIN //\n\n/**\n* Maximum signed 16-bit integer.\n*\n* ## Notes\n*\n* The number has the value\n*\n* ```tex\n* 2^{15} - 1\n* ```\n*\n* which corresponds to the bit sequence\n*\n* ```binarystring\n* 0111111111111111\n* ```\n*\n* @constant\n* @type {integer32}\n* @default 32767\n*/\nvar INT16_MAX = 32767|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default INT16_MAX;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Int16Array === 'function' ) ? Int16Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Int16Array === 'function' ) ? Int16Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of twos-complement 16-bit signed integers in the platform byte order.\n*\n* @module @stdlib/array-int16\n*\n* @example\n* import ctor from '@stdlib/array-int16';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasInt16ArraySupport from '@stdlib/assert-has-int16array-support';\nimport builtin from './int16array.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasInt16ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isInt16Array from '@stdlib/assert-is-int16array';\nimport INT16_MAX from '@stdlib/constants-int16-max';\nimport INT16_MIN from '@stdlib/constants-int16-min';\nimport GlobalInt16Array from './int16array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Int16Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Int16Array` support\n*\n* @example\n* var bool = hasInt16ArraySupport();\n* // returns \n*/\nfunction hasInt16ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalInt16Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = new GlobalInt16Array( [ 1, 3.14, -3.14, INT16_MAX+1 ] );\n\t\tbool = (\n\t\t\tisInt16Array( arr ) &&\n\t\t\tarr[ 0 ] === 1 &&\n\t\t\tarr[ 1 ] === 3 && // truncation\n\t\t\tarr[ 2 ] === -3 && // truncation\n\t\t\tarr[ 3 ] === INT16_MIN // wrap around\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasInt16ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Minimum signed 16-bit integer.\n*\n* @module @stdlib/constants-int16-min\n* @type {integer32}\n*\n* @example\n* import INT16_MIN from '@stdlib/constants-int16-min';\n* // returns -32768\n*/\n\n\n// MAIN //\n\n/**\n* Minimum signed 16-bit integer.\n*\n* ## Notes\n*\n* The number has the value\n*\n* ```tex\n* -(2^{15})\n* ```\n*\n* which corresponds to the two's complement bit sequence\n*\n* ```binarystring\n* 1000000000000000\n* ```\n*\n* @constant\n* @type {integer32}\n* @default -32768\n*/\nvar INT16_MIN = -32768|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default INT16_MIN;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of twos-complement 16-bit signed integers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasInt32Array = ( typeof Int32Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is an Int32Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an Int32Array\n*\n* @example\n* var bool = isInt32Array( new Int32Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isInt32Array( [] );\n* // returns false\n*/\nfunction isInt32Array( value ) {\n\treturn (\n\t\t( hasInt32Array && value instanceof Int32Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Int32Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isInt32Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum signed 32-bit integer.\n*\n* @module @stdlib/constants-int32-max\n* @type {integer32}\n*\n* @example\n* import INT32_MAX from '@stdlib/constants-int32-max';\n* // returns 2147483647\n*/\n\n\n// MAIN //\n\n/**\n* Maximum signed 32-bit integer.\n*\n* ## Notes\n*\n* The number has the value\n*\n* ```tex\n* 2^{31} - 1\n* ```\n*\n* which corresponds to the bit sequence\n*\n* ```binarystring\n* 01111111111111111111111111111111\n* ```\n*\n* @constant\n* @type {integer32}\n* @default 2147483647\n*/\nvar INT32_MAX = 2147483647|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default INT32_MAX;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Int32Array === 'function' ) ? Int32Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Int32Array === 'function' ) ? Int32Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of twos-complement 32-bit signed integers in the platform byte order.\n*\n* @module @stdlib/array-int32\n*\n* @example\n* import ctor from '@stdlib/array-int32';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasInt32ArraySupport from '@stdlib/assert-has-int32array-support';\nimport builtin from './int32array.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasInt32ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isInt32Array from '@stdlib/assert-is-int32array';\nimport INT32_MAX from '@stdlib/constants-int32-max';\nimport INT32_MIN from '@stdlib/constants-int32-min';\nimport GlobalInt32Array from './int32array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Int32Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Int32Array` support\n*\n* @example\n* var bool = hasInt32ArraySupport();\n* // returns \n*/\nfunction hasInt32ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalInt32Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = new GlobalInt32Array( [ 1, 3.14, -3.14, INT32_MAX+1 ] );\n\t\tbool = (\n\t\t\tisInt32Array( arr ) &&\n\t\t\tarr[ 0 ] === 1 &&\n\t\t\tarr[ 1 ] === 3 && // truncation\n\t\t\tarr[ 2 ] === -3 && // truncation\n\t\t\tarr[ 3 ] === INT32_MIN // wrap around\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasInt32ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Minimum signed 32-bit integer.\n*\n* @module @stdlib/constants-int32-min\n* @type {integer32}\n*\n* @example\n* import INT32_MIN from '@stdlib/constants-int32-min';\n* // returns -2147483648\n*/\n\n\n// MAIN //\n\n/**\n* Minimum signed 32-bit integer.\n*\n* ## Notes\n*\n* The number has the value\n*\n* ```tex\n* -(2^{31})\n* ```\n*\n* which corresponds to the two's complement bit sequence\n*\n* ```binarystring\n* 10000000000000000000000000000000\n* ```\n*\n* @constant\n* @type {integer32}\n* @default -2147483648\n*/\nvar INT32_MIN = -2147483648|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default INT32_MIN;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of twos-complement 32-bit signed integers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasInt8Array = ( typeof Int8Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is an Int8Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an Int8Array\n*\n* @example\n* var bool = isInt8Array( new Int8Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isInt8Array( [] );\n* // returns false\n*/\nfunction isInt8Array( value ) {\n\treturn (\n\t\t( hasInt8Array && value instanceof Int8Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Int8Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isInt8Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum signed 8-bit integer.\n*\n* @module @stdlib/constants-int8-max\n* @type {integer32}\n*\n* @example\n* import INT8_MAX from '@stdlib/constants-int8-max';\n* // returns 127\n*/\n\n\n// MAIN //\n\n/**\n* Maximum signed 8-bit integer.\n*\n* ## Notes\n*\n* The number is given by\n*\n* ```tex\n* 2^{7} - 1\n* ```\n*\n* which corresponds to the bit sequence\n*\n* ```binarystring\n* 01111111\n* ```\n*\n* @constant\n* @type {integer32}\n* @default 127\n*/\nvar INT8_MAX = 127|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default INT8_MAX;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Int8Array === 'function' ) ? Int8Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Int8Array === 'function' ) ? Int8Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of twos-complement 8-bit signed integers in the platform byte order.\n*\n* @module @stdlib/array-int8\n*\n* @example\n* import ctor from '@stdlib/array-int8';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasInt8ArraySupport from '@stdlib/assert-has-int8array-support';\nimport builtin from './int8array.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasInt8ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isInt8Array from '@stdlib/assert-is-int8array';\nimport INT8_MAX from '@stdlib/constants-int8-max';\nimport INT8_MIN from '@stdlib/constants-int8-min';\nimport GlobalInt8Array from './int8array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Int8Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Int8Array` support\n*\n* @example\n* var bool = hasInt8ArraySupport();\n* // returns \n*/\nfunction hasInt8ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalInt8Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = new GlobalInt8Array( [ 1, 3.14, -3.14, INT8_MAX+1 ] );\n\t\tbool = (\n\t\t\tisInt8Array( arr ) &&\n\t\t\tarr[ 0 ] === 1 &&\n\t\t\tarr[ 1 ] === 3 && // truncation\n\t\t\tarr[ 2 ] === -3 && // truncation\n\t\t\tarr[ 3 ] === INT8_MIN // wrap around\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasInt8ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Minimum signed 8-bit integer.\n*\n* @module @stdlib/constants-int8-min\n* @type {integer32}\n*\n* @example\n* import INT8_MIN from '@stdlib/constants-int8-min';\n* // returns -128\n*/\n\n\n// MAIN //\n\n/**\n* Minimum signed 8-bit integer.\n*\n* ## Notes\n*\n* The number is given by\n*\n* ```tex\n* -(2^{7})\n* ```\n*\n* which corresponds to the two's complement bit sequence\n*\n* ```binarystring\n* 10000000\n* ```\n*\n* @constant\n* @type {integer32}\n* @default -128\n*/\nvar INT8_MIN = -128|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default INT8_MIN;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of twos-complement 8-bit signed integers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasUint16Array = ( typeof Uint16Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Uint16Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a Uint16Array\n*\n* @example\n* var bool = isUint16Array( new Uint16Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isUint16Array( [] );\n* // returns false\n*/\nfunction isUint16Array( value ) {\n\treturn (\n\t\t( hasUint16Array && value instanceof Uint16Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Uint16Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isUint16Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum unsigned 16-bit integer.\n*\n* @module @stdlib/constants-uint16-max\n* @type {integer32}\n*\n* @example\n* import UINT16_MAX from '@stdlib/constants-uint16-max';\n* // returns 65535\n*/\n\n\n// MAIN //\n\n/**\n* Maximum unsigned 16-bit integer.\n*\n* ## Notes\n*\n* The number has the value\n*\n* ```tex\n* 2^{16} - 1\n* ```\n*\n* which corresponds to the bit sequence\n*\n* ```binarystring\n* 1111111111111111\n* ```\n*\n* @constant\n* @type {integer32}\n* @default 65535\n*/\nvar UINT16_MAX = 65535|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default UINT16_MAX;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Uint16Array === 'function' ) ? Uint16Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Uint16Array === 'function' ) ? Uint16Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of 16-bit unsigned integers in the platform byte order.\n*\n* @module @stdlib/array-uint16\n*\n* @example\n* import ctor from '@stdlib/array-uint16';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasUint16ArraySupport from '@stdlib/assert-has-uint16array-support';\nimport builtin from './uint16array.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasUint16ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isUint16Array from '@stdlib/assert-is-uint16array';\nimport UINT16_MAX from '@stdlib/constants-uint16-max';\nimport GlobalUint16Array from './uint16array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Uint16Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Uint16Array` support\n*\n* @example\n* var bool = hasUint16ArraySupport();\n* // returns \n*/\nfunction hasUint16ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalUint16Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = [ 1, 3.14, -3.14, UINT16_MAX+1, UINT16_MAX+2 ];\n\t\tarr = new GlobalUint16Array( arr );\n\t\tbool = (\n\t\t\tisUint16Array( arr ) &&\n\t\t\tarr[ 0 ] === 1 &&\n\t\t\tarr[ 1 ] === 3 && // truncation\n\t\t\tarr[ 2 ] === UINT16_MAX-2 && // truncation and wrap around\n\t\t\tarr[ 3 ] === 0 && // wrap around\n\t\t\tarr[ 4 ] === 1 // wrap around\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasUint16ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of 16-bit unsigned integers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasUint32Array = ( typeof Uint32Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Uint32Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a Uint32Array\n*\n* @example\n* var bool = isUint32Array( new Uint32Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isUint32Array( [] );\n* // returns false\n*/\nfunction isUint32Array( value ) {\n\treturn (\n\t\t( hasUint32Array && value instanceof Uint32Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Uint32Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isUint32Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum unsigned 32-bit integer.\n*\n* @module @stdlib/constants-uint32-max\n* @type {uinteger32}\n*\n* @example\n* import UINT32_MAX from '@stdlib/constants-uint32-max';\n* // returns 4294967295\n*/\n\n\n// MAIN //\n\n/**\n* Maximum unsigned 32-bit integer.\n*\n* ## Notes\n*\n* The number has the value\n*\n* ```tex\n* 2^{32} - 1\n* ```\n*\n* which corresponds to the bit sequence\n*\n* ```binarystring\n* 11111111111111111111111111111111\n* ```\n*\n* @constant\n* @type {uinteger32}\n* @default 4294967295\n*/\nvar UINT32_MAX = 4294967295;\n\n\n// EXPORTS //\n\nexport default UINT32_MAX;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Uint32Array === 'function' ) ? Uint32Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Uint32Array === 'function' ) ? Uint32Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of 32-bit unsigned integers in the platform byte order.\n*\n* @module @stdlib/array-uint32\n*\n* @example\n* import ctor from '@stdlib/array-uint32';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasUint32ArraySupport from '@stdlib/assert-has-uint32array-support';\nimport builtin from './uint32array.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasUint32ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isUint32Array from '@stdlib/assert-is-uint32array';\nimport UINT32_MAX from '@stdlib/constants-uint32-max';\nimport GlobalUint32Array from './uint32array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Uint32Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Uint32Array` support\n*\n* @example\n* var bool = hasUint32ArraySupport();\n* // returns \n*/\nfunction hasUint32ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalUint32Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = [ 1, 3.14, -3.14, UINT32_MAX+1, UINT32_MAX+2 ];\n\t\tarr = new GlobalUint32Array( arr );\n\t\tbool = (\n\t\t\tisUint32Array( arr ) &&\n\t\t\tarr[ 0 ] === 1 &&\n\t\t\tarr[ 1 ] === 3 && // truncation\n\t\t\tarr[ 2 ] === UINT32_MAX-2 && // truncation and wrap around\n\t\t\tarr[ 3 ] === 0 && // wrap around\n\t\t\tarr[ 4 ] === 1 // wrap around\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasUint32ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of 32-bit unsigned integers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasUint8Array = ( typeof Uint8Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Uint8Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a Uint8Array\n*\n* @example\n* var bool = isUint8Array( new Uint8Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isUint8Array( [] );\n* // returns false\n*/\nfunction isUint8Array( value ) {\n\treturn (\n\t\t( hasUint8Array && value instanceof Uint8Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Uint8Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isUint8Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum unsigned 8-bit integer.\n*\n* @module @stdlib/constants-uint8-max\n* @type {integer32}\n*\n* @example\n* import UINT8_MAX from '@stdlib/constants-uint8-max';\n* // returns 255\n*/\n\n\n// MAIN //\n\n/**\n* Maximum unsigned 8-bit integer.\n*\n* ## Notes\n*\n* The number has the value\n*\n* ```tex\n* 2^{8} - 1\n* ```\n*\n* which corresponds to the bit sequence\n*\n* ```binarystring\n* 11111111\n* ```\n*\n* @constant\n* @type {integer32}\n* @default 255\n*/\nvar UINT8_MAX = 255|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default UINT8_MAX;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Uint8Array === 'function' ) ? Uint8Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Uint8Array === 'function' ) ? Uint8Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of 8-bit unsigned integers in the platform byte order.\n*\n* @module @stdlib/array-uint8\n*\n* @example\n* import ctor from '@stdlib/array-uint8';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasUint8ArraySupport from '@stdlib/assert-has-uint8array-support';\nimport builtin from './uint8array.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasUint8ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isUint8Array from '@stdlib/assert-is-uint8array';\nimport UINT8_MAX from '@stdlib/constants-uint8-max';\nimport GlobalUint8Array from './uint8array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Uint8Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Uint8Array` support\n*\n* @example\n* var bool = hasUint8ArraySupport();\n* // returns \n*/\nfunction hasUint8ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalUint8Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = [ 1, 3.14, -3.14, UINT8_MAX+1, UINT8_MAX+2 ];\n\t\tarr = new GlobalUint8Array( arr );\n\t\tbool = (\n\t\t\tisUint8Array( arr ) &&\n\t\t\tarr[ 0 ] === 1 &&\n\t\t\tarr[ 1 ] === 3 && // truncation\n\t\t\tarr[ 2 ] === UINT8_MAX-2 && // truncation and wrap around\n\t\t\tarr[ 3 ] === 0 && // wrap around\n\t\t\tarr[ 4 ] === 1 // wrap around\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasUint8ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of 8-bit unsigned integers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasUint8ClampedArray = ( typeof Uint8ClampedArray === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Uint8ClampedArray.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a Uint8ClampedArray\n*\n* @example\n* var bool = isUint8ClampedArray( new Uint8ClampedArray( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isUint8ClampedArray( [] );\n* // returns false\n*/\nfunction isUint8ClampedArray( value ) {\n\treturn (\n\t\t( hasUint8ClampedArray && value instanceof Uint8ClampedArray ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Uint8ClampedArray]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isUint8ClampedArray;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Uint8ClampedArray === 'function' ) ? Uint8ClampedArray : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Uint8ClampedArray === 'function' ) ? Uint8ClampedArray : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of 8-bit unsigned integers in the platform byte order clamped to 0-255.\n*\n* @module @stdlib/array-uint8c\n*\n* @example\n* import ctor from '@stdlib/array-uint8c';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasUint8ClampedArraySupport from '@stdlib/assert-has-uint8clampedarray-support'; // eslint-disable-line id-length\nimport builtin from './uint8clampedarray.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasUint8ClampedArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isUint8ClampedArray from '@stdlib/assert-is-uint8clampedarray';\nimport GlobalUint8ClampedArray from './uint8clampedarray.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Uint8ClampedArray` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Uint8ClampedArray` support\n*\n* @example\n* var bool = hasUint8ClampedArraySupport();\n* // returns \n*/\nfunction hasUint8ClampedArraySupport() { // eslint-disable-line id-length\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalUint8ClampedArray !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = new GlobalUint8ClampedArray( [ -1, 0, 1, 3.14, 4.99, 255, 256 ] );\n\t\tbool = (\n\t\t\tisUint8ClampedArray( arr ) &&\n\t\t\tarr[ 0 ] === 0 && // clamped\n\t\t\tarr[ 1 ] === 0 &&\n\t\t\tarr[ 2 ] === 1 &&\n\t\t\tarr[ 3 ] === 3 && // round to nearest\n\t\t\tarr[ 4 ] === 5 && // round to nearest\n\t\t\tarr[ 5 ] === 255 &&\n\t\t\tarr[ 6 ] === 255 // clamped\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasUint8ClampedArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of 8-bit unsigned integers in the platform byte order clamped to 0-255.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isInteger from '@stdlib/math-base-assert-is-integer';\nimport MAX_LENGTH from '@stdlib/constants-array-max-array-length';\n\n\n// MAIN //\n\n/**\n* Tests if a value is an array-like object.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is an array-like object\n*\n* @example\n* var bool = isArrayLikeObject( [] );\n* // returns true\n*\n* @example\n* var bool = isArrayLikeObject( { 'length':10 } );\n* // returns true\n*\n* @example\n* var bool = isArrayLikeObject( 'beep' );\n* // returns false\n*/\nfunction isArrayLikeObject( value ) {\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\ttypeof value.length === 'number' &&\n\t\tisInteger( value.length ) &&\n\t\tvalue.length >= 0 &&\n\t\tvalue.length <= MAX_LENGTH\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isArrayLikeObject;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum length of a generic array.\n*\n* @module @stdlib/constants-array-max-array-length\n*\n* @example\n* import MAX_ARRAY_LENGTH from '@stdlib/constants-array-max-array-length';\n* // returns 4294967295\n*/\n\n// MAIN //\n\n/**\n* Maximum length of a generic array.\n*\n* ```tex\n* 2^{32} - 1\n* ```\n*\n* @constant\n* @type {uinteger32}\n* @default 4294967295\n*/\nvar MAX_ARRAY_LENGTH = 4294967295>>>0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default MAX_ARRAY_LENGTH;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isInteger from '@stdlib/math-base-assert-is-integer';\nimport MAX_LENGTH from '@stdlib/constants-array-max-typed-array-length';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a collection.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether a value is a collection\n*\n* @example\n* var bool = isCollection( [] );\n* // returns true\n*\n* @example\n* var bool = isCollection( {} );\n* // returns false\n*/\nfunction isCollection( value ) {\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\ttypeof value.length === 'number' &&\n\t\tisInteger( value.length ) &&\n\t\tvalue.length >= 0 &&\n\t\tvalue.length <= MAX_LENGTH\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isCollection;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum length of a typed array.\n*\n* @module @stdlib/constants-array-max-typed-array-length\n*\n* @example\n* import MAX_TYPED_ARRAY_LENGTH from '@stdlib/constants-array-max-typed-array-length';\n* // returns 9007199254740991\n*/\n\n// MAIN //\n\n/**\n* Maximum length of a typed array.\n*\n* ```tex\n* 2^{53} - 1\n* ```\n*\n* @constant\n* @type {number}\n* @default 9007199254740991\n*/\nvar MAX_TYPED_ARRAY_LENGTH = 9007199254740991;\n\n\n// EXPORTS //\n\nexport default MAX_TYPED_ARRAY_LENGTH;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasArrayBuffer = ( typeof ArrayBuffer === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is an ArrayBuffer.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an ArrayBuffer\n*\n* @example\n* import ArrayBuffer from '@stdlib/array-buffer';\n*\n* var bool = isArrayBuffer( new ArrayBuffer( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isArrayBuffer( [] );\n* // returns false\n*/\nfunction isArrayBuffer( value ) {\n\treturn (\n\t\t( hasArrayBuffer && value instanceof ArrayBuffer ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object ArrayBuffer]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isArrayBuffer;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar f;\n\n\n// FUNCTIONS //\n\n/**\n* Tests if a value is an array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an array\n*\n* @example\n* var bool = isArray( [] );\n* // returns true\n*\n* @example\n* var bool = isArray( {} );\n* // returns false\n*/\nfunction isArray( value ) {\n\treturn ( nativeClass( value ) === '[object Array]' );\n}\n\n\n// MAIN //\n\nif ( Array.isArray ) {\n\tf = Array.isArray;\n} else {\n\tf = isArray;\n}\n\n\n// EXPORTS //\n\nexport default f;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isArray from '@stdlib/assert-is-array';\n\n\n// MAIN //\n\n/**\n* Tests if a value is an object; e.g., `{}`.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an object\n*\n* @example\n* var bool = isObject( {} );\n* // returns true\n*\n* @example\n* var bool = isObject( null );\n* // returns false\n*/\nfunction isObject( value ) {\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\t!isArray( value )\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isObject;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\nvar RE = /./;\n\n\n// EXPORTS //\n\nexport default RE;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Tests if a value is a boolean primitive.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a boolean primitive\n*\n* @example\n* var bool = isBoolean( true );\n* // returns true\n*\n* @example\n* var bool = isBoolean( false );\n* // returns true\n*\n* @example\n* var bool = isBoolean( new Boolean( true ) );\n* // returns false\n*/\nfunction isBoolean( value ) {\n\treturn ( typeof value === 'boolean' );\n}\n\n\n// EXPORTS //\n\nexport default isBoolean;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// eslint-disable-next-line stdlib/no-redeclare\nvar toString = Boolean.prototype.toString; // non-generic\n\n\n// EXPORTS //\n\nexport default toString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport hasToStringTag from '@stdlib/assert-has-tostringtag-support';\nimport nativeClass from '@stdlib/utils-native-class';\nimport test from './try2serialize.js';\n\n\n// VARIABLES //\n\nvar FLG = hasToStringTag();\n\n\n// MAIN //\n\n/**\n* Tests if a value is a boolean object.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a boolean object\n*\n* @example\n* var bool = isBoolean( true );\n* // returns false\n*\n* @example\n* var bool = isBoolean( new Boolean( false ) );\n* // returns true\n*/\nfunction isBoolean( value ) {\n\tif ( typeof value === 'object' ) {\n\t\tif ( value instanceof Boolean ) {\n\t\t\treturn true;\n\t\t}\n\t\tif ( FLG ) {\n\t\t\treturn test( value );\n\t\t}\n\t\treturn ( nativeClass( value ) === '[object Boolean]' );\n\t}\n\treturn false;\n}\n\n\n// EXPORTS //\n\nexport default isBoolean;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport toString from './tostring.js'; // eslint-disable-line stdlib/no-redeclare\n\n\n// MAIN //\n\n/**\n* Attempts to serialize a value to a string.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value can be serialized\n*/\nfunction test( value ) {\n\ttry {\n\t\ttoString.call( value );\n\t\treturn true;\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\treturn false;\n\t}\n}\n\n\n// EXPORTS //\n\nexport default test;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a boolean.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a boolean\n*\n* @example\n* var bool = isBoolean( false );\n* // returns true\n*\n* @example\n* var bool = isBoolean( true );\n* // returns true\n*\n* @example\n* var bool = isBoolean( new Boolean( false ) );\n* // returns true\n*\n* @example\n* var bool = isBoolean( new Boolean( true ) );\n* // returns true\n*/\nfunction isBoolean( value ) {\n\treturn ( isPrimitive( value ) || isObject( value ) );\n}\n\n\n// EXPORTS //\n\nexport default isBoolean;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Returns the global object using code generation.\n*\n* @private\n* @returns {Object} global object\n*/\nfunction getGlobal() {\n\treturn new Function( 'return this;' )(); // eslint-disable-line no-new-func\n}\n\n\n// EXPORTS //\n\nexport default getGlobal;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test if a value is a boolean.\n*\n* @module @stdlib/assert-is-boolean\n*\n* @example\n* import isBoolean from '@stdlib/assert-is-boolean';\n*\n* var bool = isBoolean( false );\n* // returns true\n*\n* bool = isBoolean( new Boolean( false ) );\n* // returns true\n*\n* @example\n* // Use interface to check for boolean primitives...\n* import { isPrimitive as isBoolean } from '@stdlib/assert-is-boolean';\n*\n* var bool = isBoolean( false );\n* // returns true\n*\n* bool = isBoolean( new Boolean( true ) );\n* // returns false\n*\n* @example\n* // Use interface to check for boolean objects...\n* import { isObject as isBoolean } from '@stdlib/assert-is-boolean';\n*\n* var bool = isBoolean( true );\n* // returns false\n*\n* bool = isBoolean( new Boolean( false ) );\n* // returns true\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport isBoolean from './main.js';\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\nsetReadOnly( isBoolean, 'isPrimitive', isPrimitive );\nsetReadOnly( isBoolean, 'isObject', isObject );\n\n\n// EXPORTS //\n\nexport default isBoolean;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar obj = ( typeof self === 'object' ) ? self : null;\n\n\n// EXPORTS //\n\nexport default obj;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar obj = ( typeof window === 'object' ) ? window : null;\n\n\n// EXPORTS //\n\nexport default obj;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar obj = ( typeof global === 'object' ) ? global : null;\n\n\n// EXPORTS //\n\nexport default obj;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport getGlobal from '@stdlib/utils-global';\n\n\n// MAIN //\n\nvar root = getGlobal();\nvar nodeList = root.document && root.document.childNodes;\n\n\n// EXPORTS //\n\nexport default nodeList;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isBoolean } from '@stdlib/assert-is-boolean';\nimport getThis from './codegen.js';\nimport Self from './self.js';\nimport Win from './window.js';\nimport Global from './global.js';\n\n\n// MAIN //\n\n/**\n* Returns the global object.\n*\n* ## Notes\n*\n* - Using code generation is the **most** reliable way to resolve the global object; however, doing so is likely to violate content security policies (CSPs) in, e.g., Chrome Apps and elsewhere.\n*\n* @param {boolean} [codegen=false] - boolean indicating whether to use code generation to resolve the global object\n* @throws {TypeError} must provide a boolean\n* @throws {Error} unable to resolve global object\n* @returns {Object} global object\n*\n* @example\n* var g = getGlobal();\n* // returns {...}\n*/\nfunction getGlobal( codegen ) {\n\tif ( arguments.length ) {\n\t\tif ( !isBoolean( codegen ) ) {\n\t\t\tthrow new TypeError( 'invalid argument. Must provide a boolean primitive. Value: `'+codegen+'`.' );\n\t\t}\n\t\tif ( codegen ) {\n\t\t\treturn getThis();\n\t\t}\n\t\t// Fall through...\n\t}\n\t// Case: browsers and web workers\n\tif ( Self ) {\n\t\treturn Self;\n\t}\n\t// Case: browsers\n\tif ( Win ) {\n\t\treturn Win;\n\t}\n\t// Case: Node.js\n\tif ( Global ) {\n\t\treturn Global;\n\t}\n\t// Case: unknown\n\tthrow new Error( 'unexpected error. Unable to resolve global object.' );\n}\n\n\n// EXPORTS //\n\nexport default getGlobal;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\nvar typedarray = Int8Array; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default typedarray;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Returns a regular expression to capture everything that is not a space immediately after the `function` keyword and before the first left parenthesis.\n*\n* @returns {RegExp} regular expression\n*\n* @example\n* var RE_FUNCTION_NAME = reFunctionName();\n*\n* function fname( fcn ) {\n* return RE_FUNCTION_NAME.exec( fcn.toString() )[ 1 ];\n* }\n*\n* var fn = fname( Math.sqrt );\n* // returns 'sqrt'\n*\n* fn = fname( Int8Array );\n* // returns 'Int8Array'\n*\n* fn = fname( Object.prototype.toString );\n* // returns 'toString'\n*\n* fn = fname( function(){} );\n* // returns ''\n*/\nfunction reFunctionName() {\n\treturn /^\\s*function\\s*([^(]*)/i;\n}\n\n\n// EXPORTS //\n\nexport default reFunctionName;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport reFunctionName from './main.js';\n\n\n// MAIN //\n\n/**\n* Captures everything that is not a space immediately after the `function` keyword and before the first left parenthesis.\n*\n* Regular expression: `/^\\s*function\\s*([^(]*)/i`\n*\n* - `/^\\s*`\n* - Match zero or more spaces at beginning\n*\n* - `function`\n* - Match the word `function`\n*\n* - `\\s*`\n* - Match zero or more spaces after the word `function`\n*\n* - `()`\n* - Capture\n*\n* - `[^(]*`\n* - Match anything except a left parenthesis `(` zero or more times\n*\n* - `/i`\n* - ignore case\n*\n* @constant\n* @type {RegExp}\n* @default /^\\s*function\\s*([^(]*)/i\n*/\nvar RE_FUNCTION_NAME = reFunctionName();\n\n\n// EXPORTS //\n\nexport default RE_FUNCTION_NAME;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Tests if a value is object-like.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether a value is object-like\n*\n* @example\n* var bool = isObjectLike( {} );\n* // returns true\n*\n* @example\n* var bool = isObjectLike( [] );\n* // returns true\n*\n* @example\n* var bool = isObjectLike( null );\n* // returns false\n*/\nfunction isObjectLike( value ) {\n\treturn (\n\t\tvalue !== null &&\n\t\ttypeof value === 'object'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isObjectLike;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\nimport { REGEXP as RE } from '@stdlib/regexp-function-name';\nimport isBuffer from '@stdlib/assert-is-buffer';\n\n\n// MAIN //\n\n/**\n* Determines the name of a value's constructor.\n*\n* @param {*} v - input value\n* @returns {string} name of a value's constructor\n*\n* @example\n* var v = constructorName( 'a' );\n* // returns 'String'\n*\n* @example\n* var v = constructorName( 5 );\n* // returns 'Number'\n*\n* @example\n* var v = constructorName( null );\n* // returns 'Null'\n*\n* @example\n* var v = constructorName( undefined );\n* // returns 'Undefined'\n*\n* @example\n* var v = constructorName( function noop() {} );\n* // returns 'Function'\n*/\nfunction constructorName( v ) {\n\tvar match;\n\tvar name;\n\tvar ctor;\n\tname = nativeClass( v ).slice( 8, -1 );\n\tif ( (name === 'Object' || name === 'Error') && v.constructor ) {\n\t\tctor = v.constructor;\n\t\tif ( typeof ctor.name === 'string' ) {\n\t\t\treturn ctor.name;\n\t\t}\n\t\tmatch = RE.exec( ctor.toString() );\n\t\tif ( match ) {\n\t\t\treturn match[ 1 ];\n\t\t}\n\t}\n\tif ( isBuffer( v ) ) {\n\t\treturn 'Buffer';\n\t}\n\treturn name;\n}\n\n\n// EXPORTS //\n\nexport default constructorName;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isObjectLike from '@stdlib/assert-is-object-like';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Buffer instance.\n*\n* @param {*} value - value to validate\n* @returns {boolean} boolean indicating if a value is a Buffer instance\n*\n* @example\n* var v = isBuffer( new Buffer( 'beep' ) );\n* // returns true\n*\n* @example\n* var v = isBuffer( new Buffer( [1,2,3,4] ) );\n* // returns true\n*\n* @example\n* var v = isBuffer( {} );\n* // returns false\n*\n* @example\n* var v = isBuffer( [] );\n* // returns false\n*/\nfunction isBuffer( value ) {\n\treturn (\n\t\tisObjectLike( value ) &&\n\t\t(\n\t\t\t// eslint-disable-next-line no-underscore-dangle\n\t\t\tvalue._isBuffer || // for envs missing Object.prototype.constructor (e.g., Safari 5-7)\n\t\t\t(\n\t\t\t\tvalue.constructor &&\n\n\t\t\t\t// WARNING: `typeof` is not a foolproof check, as certain envs consider RegExp and NodeList instances to be functions\n\t\t\t\ttypeof value.constructor.isBuffer === 'function' &&\n\t\t\t\tvalue.constructor.isBuffer( value )\n\t\t\t)\n\t\t)\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isBuffer;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Regular expression to capture everything that is not a space immediately after the `function` keyword and before the first left parenthesis.\n*\n* @module @stdlib/regexp-function-name\n*\n* @example\n* import reFunctionName from '@stdlib/regexp-function-name';\n* var RE_FUNCTION_NAME = reFunctionName();\n*\n* function fname( fcn ) {\n* return RE_FUNCTION_NAME.exec( fcn.toString() )[ 1 ];\n* }\n*\n* var fn = fname( Math.sqrt );\n* // returns 'sqrt'\n*\n* fn = fname( Int8Array );\n* // returns 'Int8Array'\n*\n* fn = fname( Object.prototype.toString );\n* // returns 'toString'\n*\n* fn = fname( function(){} );\n* // returns ''\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport reFunctionName from './main.js';\nimport REGEXP from './regexp.js';\n\n\n// MAIN //\n\nsetReadOnly( reFunctionName, 'REGEXP', REGEXP );\n\n\n// EXPORTS //\n\nexport default reFunctionName;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test if a value is object-like.\n*\n* @module @stdlib/assert-is-object-like\n*\n* @example\n* import isObjectLike from '@stdlib/assert-is-object-like';\n*\n* var bool = isObjectLike( {} );\n* // returns true\n*\n* bool = isObjectLike( [] );\n* // returns true\n*\n* bool = isObjectLike( null );\n* // returns false\n*\n* @example\n* import { isObjectLikeArray as isObjectLike } from '@stdlib/assert-is-object-like';\n*\n* var bool = isObjectLike( [ {}, [] ] );\n* // returns true\n*\n* bool = isObjectLike( [ {}, '3.0' ] );\n* // returns false\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport arrayfun from '@stdlib/assert-tools-array-function';\nimport isObjectLike from './main.js';\n\n\n// VARIABLES //\n\nvar isObjectLikeArray = arrayfun( isObjectLike );\n\n\n// MAIN //\n\nsetReadOnly( isObjectLike, 'isObjectLikeArray', isObjectLikeArray );\n\n\n// EXPORTS //\n\nexport default isObjectLike;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isArray from '@stdlib/assert-is-array';\n\n\n// MAIN //\n\n/**\n* Returns a function which tests if every element in an array passes a test condition.\n*\n* @param {Function} predicate - function to apply\n* @throws {TypeError} must provide a function\n* @returns {Function} an array function\n*\n* @example\n* import isOdd from '@stdlib/assert-is-odd';\n*\n* var arr1 = [ 1, 3, 5, 7 ];\n* var arr2 = [ 3, 5, 8 ];\n*\n* var validate = arrayfcn( isOdd );\n*\n* var bool = validate( arr1 );\n* // returns true\n*\n* bool = validate( arr2 );\n* // returns false\n*/\nfunction arrayfcn( predicate ) {\n\tif ( typeof predicate !== 'function' ) {\n\t\tthrow new TypeError( 'invalid argument. Must provide a function. Value: `' + predicate + '`.' );\n\t}\n\treturn every;\n\n\t/**\n\t* Tests if every element in an array passes a test condition.\n\t*\n\t* @private\n\t* @param {*} value - value to test\n\t* @returns {boolean} boolean indicating whether a value is an array for which all elements pass a test condition\n\t*/\n\tfunction every( value ) {\n\t\tvar len;\n\t\tvar i;\n\t\tif ( !isArray( value ) ) {\n\t\t\treturn false;\n\t\t}\n\t\tlen = value.length;\n\t\tif ( len === 0 ) {\n\t\t\treturn false;\n\t\t}\n\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\tif ( predicate( value[ i ] ) === false ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}\n}\n\n\n// EXPORTS //\n\nexport default arrayfcn;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Determine a value's type.\n*\n* @module @stdlib/utils-type-of\n*\n* @example\n* import typeOf from '@stdlib/utils-type-of';\n*\n* var str = typeOf( 'a' );\n* // returns 'string'\n*\n* str = typeOf( 5 );\n* // returns 'number'\n*/\n\n// MODULES //\n\nimport usePolyfill from './check.js';\nimport typeOf from './typeof.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar main = ( usePolyfill() ) ? polyfill : typeOf;\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport RE from './fixtures/re.js';\nimport nodeList from './fixtures/nodelist.js';\nimport typedarray from './fixtures/typedarray.js';\n\n\n// MAIN //\n\n/**\n* Checks whether a polyfill is needed when using the `typeof` operator.\n*\n* @private\n* @returns {boolean} boolean indicating whether a polyfill is needed\n*/\nfunction check() {\n\tif (\n\t\t// Chrome 1-12 returns 'function' for regular expression instances (see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/typeof):\n\t\ttypeof RE === 'function' ||\n\n\t\t// Safari 8 returns 'object' for typed array and weak map constructors (underscore #1929):\n\t\ttypeof typedarray === 'object' ||\n\n\t\t// PhantomJS 1.9 returns 'function' for `NodeList` instances (underscore #2236):\n\t\ttypeof nodeList === 'function'\n\t) {\n\t\treturn true;\n\t}\n\treturn false;\n}\n\n\n// EXPORTS //\n\nexport default check;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport ctorName from '@stdlib/utils-constructor-name';\n\n\n// MAIN //\n\n/**\n* Determines a value's type.\n*\n* @param {*} v - input value\n* @returns {string} string indicating the value's type\n*/\nfunction typeOf( v ) {\n\treturn ctorName( v ).toLowerCase();\n}\n\n\n// EXPORTS //\n\nexport default typeOf;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport ctorName from '@stdlib/utils-constructor-name';\n\n\n// NOTES //\n\n/*\n* Built-in `typeof` operator behavior:\n*\n* ```text\n* typeof null => 'object'\n* typeof undefined => 'undefined'\n* typeof 'a' => 'string'\n* typeof 5 => 'number'\n* typeof NaN => 'number'\n* typeof true => 'boolean'\n* typeof false => 'boolean'\n* typeof {} => 'object'\n* typeof [] => 'object'\n* typeof function foo(){} => 'function'\n* typeof function* foo(){} => 'object'\n* typeof Symbol() => 'symbol'\n* ```\n*\n*/\n\n\n// MAIN //\n\n/**\n* Determines a value's type.\n*\n* @param {*} v - input value\n* @returns {string} string indicating the value's type\n*/\nfunction typeOf( v ) {\n\tvar type;\n\n\t// Address `typeof null` => `object` (see http://wiki.ecmascript.org/doku.php?id=harmony:typeof_null):\n\tif ( v === null ) {\n\t\treturn 'null';\n\t}\n\ttype = typeof v;\n\n\t// If the `typeof` operator returned something other than `object`, we are done. Otherwise, we need to check for an internal class name or search for a constructor.\n\tif ( type === 'object' ) {\n\t\treturn ctorName( v ).toLowerCase();\n\t}\n\treturn type;\n}\n\n\n// EXPORTS //\n\nexport default typeOf;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport typeOf from '@stdlib/utils-type-of';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a function.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a function\n*\n* @example\n* function beep() {\n* return 'beep';\n* }\n*\n* var bool = isFunction( beep );\n* // returns true\n*/\nfunction isFunction( value ) {\n\t// Note: cannot use `typeof` directly, as various browser engines incorrectly return `'function'` when operating on non-function objects, such as regular expressions and NodeLists.\n\treturn ( typeOf( value ) === 'function' );\n}\n\n\n// EXPORTS //\n\nexport default isFunction;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isNumber } from '@stdlib/assert-is-number';\nimport defineProperty from '@stdlib/utils-define-property';\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport toStr from './tostring.js';\nimport toJSON from './tojson.js';\n\n\n// MAIN //\n\n/**\n* 128-bit complex number constructor.\n*\n* @constructor\n* @param {number} real - real component\n* @param {number} imag - imaginary component\n* @throws {TypeError} must invoke using the `new` keyword\n* @throws {TypeError} real component must be a number primitive\n* @throws {TypeError} imaginary component must be a number primitive\n* @returns {Complex128} 128-bit complex number\n*\n* @example\n* var z = new Complex128( 5.0, 3.0 );\n* // returns \n*/\nfunction Complex128( real, imag ) {\n\tif ( !( this instanceof Complex128 ) ) {\n\t\tthrow new TypeError( 'invalid invocation. Constructor must be called with the `new` keyword.' );\n\t}\n\tif ( !isNumber( real ) ) {\n\t\tthrow new TypeError( 'invalid argument. Real component must be a number primitive. Value: `'+real+'`.' );\n\t}\n\tif ( !isNumber( imag ) ) {\n\t\tthrow new TypeError( 'invalid argument. Imaginary component must be a number primitive. Value: `'+imag+'`.' );\n\t}\n\tdefineProperty( this, 're', {\n\t\t'configurable': false,\n\t\t'enumerable': true,\n\t\t'writable': false,\n\t\t'value': real\n\t});\n\tdefineProperty( this, 'im', {\n\t\t'configurable': false,\n\t\t'enumerable': true,\n\t\t'writable': false,\n\t\t'value': imag\n\t});\n\treturn this;\n}\n\n/**\n* Size (in bytes) of each component.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex128\n* @type {integer}\n* @returns {integer} size of each component\n*\n* @example\n* var nbytes = Complex128.BYTES_PER_ELEMENT;\n* // returns 8\n*/\nsetReadOnly( Complex128, 'BYTES_PER_ELEMENT', 8 );\n\n/**\n* Size (in bytes) of each component.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex128.prototype\n* @type {integer}\n* @returns {integer} size of each component\n*\n* @example\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var nbytes = z.BYTES_PER_ELEMENT;\n* // returns 8\n*/\nsetReadOnly( Complex128.prototype, 'BYTES_PER_ELEMENT', 8 );\n\n/**\n* Length (in bytes) of a complex number.\n*\n* @name byteLength\n* @memberof Complex128.prototype\n* @type {integer}\n* @returns {integer} byte length\n*\n* @example\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var nbytes = z.byteLength;\n* // returns 16\n*/\nsetReadOnly( Complex128.prototype, 'byteLength', 16 );\n\n/**\n* Serializes a complex number as a string.\n*\n* @name toString\n* @memberof Complex128.prototype\n* @type {Function}\n* @returns {string} serialized complex number\n*\n* @example\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var str = z.toString();\n* // returns '5 + 3i'\n*/\nsetReadOnly( Complex128.prototype, 'toString', toStr );\n\n/**\n* Serializes a complex number as a JSON object.\n*\n* ## Notes\n*\n* - `JSON.stringify()` implicitly calls this method when stringifying a `Complex128` instance.\n*\n*\n* @name toJSON\n* @memberof Complex128.prototype\n* @type {Function}\n* @returns {Object} serialized complex number\n*\n* @example\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var obj = z.toJSON();\n* // returns { 'type': 'Complex128', 're': 5.0, 'im': 3.0 }\n*/\nsetReadOnly( Complex128.prototype, 'toJSON', toJSON );\n\n\n// EXPORTS //\n\nexport default Complex128;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Serializes a complex number as a string.\n*\n* @private\n* @returns {string} serialized complex number\n*/\nfunction toString() { // eslint-disable-line stdlib/no-redeclare\n\t/* eslint-disable no-invalid-this */\n\tvar str = '' + this.re;\n\tif ( this.im < 0 ) {\n\t\tstr += ' - ' + (-this.im);\n\t} else {\n\t\tstr += ' + ' + this.im;\n\t}\n\tstr += 'i';\n\treturn str;\n}\n\n\n// EXPORTS //\n\nexport default toString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Serializes a complex number as a JSON object.\n*\n* @private\n* @returns {Object} JSON representation\n*/\nfunction toJSON() {\n\t/* eslint-disable no-invalid-this */\n\tvar out = {};\n\tout.type = 'Complex128';\n\tout.re = this.re;\n\tout.im = this.im;\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default toJSON;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar fround = ( typeof Math.fround === 'function' ) ? Math.fround : null; // eslint-disable-line stdlib/no-builtin-math\n\n\n// EXPORTS //\n\nexport default fround;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport Float32Array from '@stdlib/array-float32';\n\n\n// VARIABLES //\n\nvar FLOAT32_VIEW = new Float32Array( 1 );\n\n\n// MAIN //\n\n/**\n* Converts a double-precision floating-point number to the nearest single-precision floating-point number.\n*\n* @param {number} x - double-precision floating-point number\n* @returns {number} nearest single-precision floating-point number\n*\n* @example\n* var y = float64ToFloat32( 1.337 );\n* // returns 1.3370000123977661\n*/\nfunction float64ToFloat32( x ) {\n\tFLOAT32_VIEW[ 0 ] = x;\n\treturn FLOAT32_VIEW[ 0 ];\n}\n\n\n// EXPORTS //\n\nexport default float64ToFloat32;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Convert a double-precision floating-point number to the nearest single-precision floating-point number.\n*\n* @module @stdlib/number-float64-base-to-float32\n*\n* @example\n* import float64ToFloat32 from '@stdlib/number-float64-base-to-float32';\n*\n* var y = float64ToFloat32( 1.337 );\n* // returns 1.3370000123977661\n*/\n\n// MODULES //\n\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar float64ToFloat32;\nif ( typeof builtin === 'function' ) {\n\tfloat64ToFloat32 = builtin;\n} else {\n\tfloat64ToFloat32 = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default float64ToFloat32;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isNumber } from '@stdlib/assert-is-number';\nimport defineProperty from '@stdlib/utils-define-property';\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport float64ToFloat32 from '@stdlib/number-float64-base-to-float32';\nimport toStr from './tostring.js';\nimport toJSON from './tojson.js';\n\n\n// MAIN //\n\n/**\n* 64-bit complex number constructor.\n*\n* @constructor\n* @param {number} real - real component\n* @param {number} imag - imaginary component\n* @throws {TypeError} must invoke using the `new` keyword\n* @throws {TypeError} real component must be a number primitive\n* @throws {TypeError} imaginary component must be a number primitive\n* @returns {Complex64} 64-bit complex number\n*\n* @example\n* var z = new Complex64( 5.0, 3.0 );\n* // returns \n*/\nfunction Complex64( real, imag ) {\n\tif ( !( this instanceof Complex64 ) ) {\n\t\tthrow new TypeError( 'invalid invocation. Constructor must be called with the `new` keyword.' );\n\t}\n\tif ( !isNumber( real ) ) {\n\t\tthrow new TypeError( 'invalid argument. Real component must be a number primitive. Value: `'+real+'`.' );\n\t}\n\tif ( !isNumber( imag ) ) {\n\t\tthrow new TypeError( 'invalid argument. Imaginary component must be a number primitive. Value: `'+imag+'`.' );\n\t}\n\tdefineProperty( this, 're', {\n\t\t'configurable': false,\n\t\t'enumerable': true,\n\t\t'writable': false,\n\t\t'value': float64ToFloat32( real )\n\t});\n\tdefineProperty( this, 'im', {\n\t\t'configurable': false,\n\t\t'enumerable': true,\n\t\t'writable': false,\n\t\t'value': float64ToFloat32( imag )\n\t});\n\treturn this;\n}\n\n/**\n* Size (in bytes) of each component.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex64\n* @type {integer}\n* @returns {integer} size of each component\n*\n* @example\n* var nbytes = Complex64.BYTES_PER_ELEMENT;\n* // returns 4\n*/\nsetReadOnly( Complex64, 'BYTES_PER_ELEMENT', 4 );\n\n/**\n* Size (in bytes) of each component.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex64.prototype\n* @type {integer}\n* @returns {integer} size of each component\n*\n* @example\n* var z = new Complex64( 5.0, 3.0 );\n*\n* var nbytes = z.BYTES_PER_ELEMENT;\n* // returns 4\n*/\nsetReadOnly( Complex64.prototype, 'BYTES_PER_ELEMENT', 4 );\n\n/**\n* Length (in bytes) of a complex number.\n*\n* @name byteLength\n* @memberof Complex64.prototype\n* @type {integer}\n* @returns {integer} byte length\n*\n* @example\n* var z = new Complex64( 5.0, 3.0 );\n*\n* var nbytes = z.byteLength;\n* // returns 8\n*/\nsetReadOnly( Complex64.prototype, 'byteLength', 8 );\n\n/**\n* Serializes a complex number as a string.\n*\n* @name toString\n* @memberof Complex64.prototype\n* @type {Function}\n* @returns {string} serialized complex number\n*\n* @example\n* var z = new Complex64( 5.0, 3.0 );\n*\n* var str = z.toString();\n* // returns '5 + 3i'\n*/\nsetReadOnly( Complex64.prototype, 'toString', toStr );\n\n/**\n* Serializes a complex number as a JSON object.\n*\n* ## Notes\n*\n* - `JSON.stringify()` implicitly calls this method when stringifying a `Complex64` instance.\n*\n*\n* @name toJSON\n* @memberof Complex64.prototype\n* @type {Function}\n* @returns {Object} serialized complex number\n*\n* @example\n* var z = new Complex64( 5.0, 3.0 );\n*\n* var obj = z.toJSON();\n* // returns { 'type': 'Complex64', 're': 5.0, 'im': 3.0 }\n*/\nsetReadOnly( Complex64.prototype, 'toJSON', toJSON );\n\n\n// EXPORTS //\n\nexport default Complex64;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport Complex128 from '@stdlib/complex-float64';\nimport Complex64 from '@stdlib/complex-float32';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a complex number-like object.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a complex number-like object.\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n* import Complex64 from '@stdlib/complex-float32';\n*\n* var x = new Complex128( 4.0, 2.0 );\n* var bool = isComplexLike( x );\n* // returns true\n*\n* x = new Complex64( 4.0, 2.0 );\n* bool = isComplexLike( x );\n* // returns true\n*/\nfunction isComplexLike( value ) {\n\tif ( value instanceof Complex128 || value instanceof Complex64 ) {\n\t\treturn true;\n\t}\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\ttypeof value.re === 'number' &&\n\t\ttypeof value.im === 'number'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isComplexLike;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isInteger from '@stdlib/math-base-assert-is-integer';\n\n\n// MAIN //\n\n/**\n* Tests if a finite numeric value is an even number.\n*\n* @param {number} x - value to test\n* @returns {boolean} boolean indicating whether the value is an even number\n*\n* @example\n* var bool = isEven( 5.0 );\n* // returns false\n*\n* @example\n* var bool = isEven( -2.0 );\n* // returns true\n*\n* @example\n* var bool = isEven( 0.0 );\n* // returns true\n*\n* @example\n* var bool = isEven( NaN );\n* // returns false\n*/\nfunction isEven( x ) {\n\treturn isInteger( x/2.0 );\n}\n\n\n// EXPORTS //\n\nexport default isEven;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport hasOwnProp from '@stdlib/assert-has-own-property';\n\n\n// MAIN //\n\n/**\n* Tests for native `Symbol.iterator` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Symbol.iterator` support\n*\n* @example\n* var bool = hasIteratorSymbolSupport();\n* // returns \n*/\nfunction hasIteratorSymbolSupport() {\n\treturn (\n\t\ttypeof Symbol === 'function' &&\n\t\ttypeof Symbol( 'foo' ) === 'symbol' &&\n\t\thasOwnProp( Symbol, 'iterator' ) &&\n\t\ttypeof Symbol.iterator === 'symbol'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default hasIteratorSymbolSupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Serializes a complex number as a string.\n*\n* @private\n* @returns {string} serialized complex number\n*/\nfunction toString() { // eslint-disable-line stdlib/no-redeclare\n\t/* eslint-disable no-invalid-this */\n\tvar str = '' + this.re;\n\tif ( this.im < 0 ) {\n\t\tstr += ' - ' + (-this.im);\n\t} else {\n\t\tstr += ' + ' + this.im;\n\t}\n\tstr += 'i';\n\treturn str;\n}\n\n\n// EXPORTS //\n\nexport default toString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Serializes a complex number as a JSON object.\n*\n* @private\n* @returns {Object} JSON representation\n*/\nfunction toJSON() {\n\t/* eslint-disable no-invalid-this */\n\tvar out = {};\n\tout.type = 'Complex64';\n\tout.re = this.re;\n\tout.im = this.im;\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default toJSON;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport hasIteratorSymbolSupport from '@stdlib/assert-has-iterator-symbol-support';\n\n\n// MAIN //\n\n/**\n* Iterator symbol.\n*\n* @name IteratorSymbol\n* @constant\n* @type {(symbol|null)}\n*\n* @example\n* function iterator() {\n* var it;\n* var i;\n*\n* i = -1;\n*\n* it = {};\n* it.next = next;\n* it.return = done;\n*\n* if ( IteratorSymbol ) {\n* it[ IteratorSymbol ] = iterator;\n* }\n* return it;\n*\n* function next() {\n* i += 1;\n* return {\n* 'value': i,\n* 'done': false\n* };\n* }\n*\n* function done( value ) {\n* if ( arguments.length === 0 ) {\n* return {\n* 'done': true\n* };\n* }\n* return {\n* 'value': value,\n* 'done': true\n* };\n* }\n* }\n*\n* var obj = iterator();\n*/\nvar IteratorSymbol = ( hasIteratorSymbolSupport() ) ? Symbol.iterator : null;\n\n\n// EXPORTS //\n\nexport default IteratorSymbol;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport defineProperty from '@stdlib/utils-define-property';\n\n\n// MAIN //\n\n/**\n* Defines a non-enumerable read-only accessor.\n*\n* @param {Object} obj - object on which to define the property\n* @param {(string|symbol)} prop - property name\n* @param {Function} getter - accessor\n*\n* @example\n* function getter() {\n* return 'bar';\n* }\n*\n* var obj = {};\n*\n* setNonEnumerableReadOnlyAccessor( obj, 'foo', getter );\n*\n* try {\n* obj.foo = 'boop';\n* } catch ( err ) {\n* console.error( err.message );\n* }\n*/\nfunction setNonEnumerableReadOnlyAccessor( obj, prop, getter ) { // eslint-disable-line id-length\n\tdefineProperty( obj, prop, {\n\t\t'configurable': false,\n\t\t'enumerable': false,\n\t\t'get': getter\n\t});\n}\n\n\n// EXPORTS //\n\nexport default setNonEnumerableReadOnlyAccessor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Returns the real component of a single-precision complex floating-point number.\n*\n* @param {Complex} z - complex number\n* @returns {number} real component\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n*\n* var z = new Complex64( 5.0, 3.0 );\n*\n* var re = realf( z );\n* // returns 5.0\n*/\nfunction realf( z ) {\n\treturn z.re;\n}\n\n\n// EXPORTS //\n\nexport default realf;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Returns the imaginary component of a single-precision complex floating-point number.\n*\n* @param {Complex} z - complex number\n* @returns {number} imaginary component\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n*\n* var z = new Complex64( 5.0, 3.0 );\n*\n* var im = imagf( z );\n* // returns 3.0\n*/\nfunction imagf( z ) {\n\treturn z.im;\n}\n\n\n// EXPORTS //\n\nexport default imagf;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport Float32Array from '@stdlib/array-float32';\n\n\n// MAIN //\n\n/**\n* Reinterprets a `Complex64Array` as a `Float32Array`.\n*\n* @param {Complex64Array} x - input array\n* @param {NonNegativeInteger} offset - starting index\n* @returns {Float32Array} `Float32Array` view\n*\n* @example\n* import Complex64Array from '@stdlib/array-complex64';\n*\n* var x = new Complex64Array( 10 );\n*\n* var out = reinterpret( x, 0 );\n* // returns \n*\n* var bool = ( out.buffer === x.buffer );\n* // returns true\n*/\nfunction reinterpret( x, offset ) {\n\treturn new Float32Array( x.buffer, x.byteOffset+(x.BYTES_PER_ELEMENT*offset), 2*(x.length-offset) ); // eslint-disable-line max-len\n}\n\n\n// EXPORTS //\n\nexport default reinterpret;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport Float64Array from '@stdlib/array-float64';\n\n\n// MAIN //\n\n/**\n* Reinterprets a `Complex128Array` as a `Float64Array`.\n*\n* @param {Complex128Array} x - input array\n* @param {NonNegativeInteger} offset - starting index\n* @returns {Float64Array} `Float64Array` view\n*\n* @example\n* import Complex128Array from '@stdlib/array-complex128';\n*\n* var x = new Complex128Array( 10 );\n*\n* var out = reinterpret( x, 0 );\n* // returns \n*\n* var bool = ( out.buffer === x.buffer );\n* // returns true\n*/\nfunction reinterpret( x, offset ) {\n\treturn new Float64Array( x.buffer, x.byteOffset+(x.BYTES_PER_ELEMENT*offset), 2*(x.length-offset) ); // eslint-disable-line max-len\n}\n\n\n// EXPORTS //\n\nexport default reinterpret;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Returns an array element.\n*\n* @private\n* @param {Collection} x - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {*} element\n*/\nfunction getter( x, idx ) {\n\treturn x[ idx ];\n}\n\n\n// EXPORTS //\n\nexport default getter;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Returns an array element using an accessor method.\n*\n* @private\n* @param {Collection} x - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {*} element\n*/\nfunction getter( x, idx ) {\n\treturn x.get( idx );\n}\n\n\n// EXPORTS //\n\nexport default getter;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Sets an array element.\n*\n* @private\n* @param {Collection} x - input array\n* @param {NonNegativeInteger} idx - element index\n* @param {*} value - value to set\n*/\nfunction setter( x, idx, value ) {\n\tx[ idx ] = value;\n}\n\n\n// EXPORTS //\n\nexport default setter;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Sets an array element using an accessor method.\n*\n* @private\n* @param {Collection} x - input array\n* @param {NonNegativeInteger} idx - element index\n* @param {*} value - value to set\n*/\nfunction setter( x, idx, value ) {\n\tx.set( value, idx );\n}\n\n\n// EXPORTS //\n\nexport default setter;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport getIndexed from './getter.js';\nimport getAccessor from './getter.accessor.js';\nimport setIndexed from './setter.js';\nimport setAccessor from './setter.accessor.js';\n\n\n// MAIN //\n\n/**\n* Converts an array-like to an object likely to have the same \"shape\".\n*\n* ## Notes\n*\n* - This function is intended as a potential performance optimization. In V8, for example, even if two objects share common properties, if those properties were added in different orders or if one object has additional properties not shared by the other object, then those objects will have different \"hidden\" classes. If a function is provided many objects having different \"shapes\", some JavaScript VMs (e.g., V8) will consider the function \"megamorphic\" and fail to perform various runtime optimizations. Accordingly, the intent of this function is to standardize the \"shape\" of the object holding array meta data to ensure that internal functions operating on arrays are provided consistent argument \"shapes\".\n*\n* - The returned object has the following properties:\n*\n* - **data**: data buffer.\n* - **accessors**: `boolean` indicating whether the data buffer uses accessors for getting and setting elements.\n* - **getter**: accessor for retrieving a data buffer element.\n* - **setter**: accessor for setting a data buffer element.\n*\n* @param {Collection} x - array-like object\n* @returns {Object} object containing array meta data\n*\n* @example\n* var obj = arraylike2object( [ 1, 2, 3, 4 ] );\n* // returns {...}\n*/\nfunction arraylike2object( x ) {\n\tvar bool = Boolean( x.get && x.set ); // Note: intentional weak check, as we don't explicitly check for functions for (perhaps marginally) better performance.\n\treturn {\n\t\t'data': x,\n\t\t'accessors': bool,\n\t\t'getter': ( bool ) ? getAccessor : getIndexed,\n\t\t'setter': ( bool ) ? setAccessor : setIndexed\n\t};\n}\n\n\n// EXPORTS //\n\nexport default arraylike2object;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isArrayLikeObject from '@stdlib/assert-is-array-like-object';\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport realf from '@stdlib/complex-realf';\nimport imagf from '@stdlib/complex-imagf';\n\n\n// MAIN //\n\n/**\n* Returns an array of iterated values.\n*\n* @private\n* @param {Object} it - iterator\n* @returns {(Array|TypeError)} array or an error\n*/\nfunction fromIterator( it ) {\n\tvar out;\n\tvar v;\n\tvar z;\n\n\tout = [];\n\twhile ( true ) {\n\t\tv = it.next();\n\t\tif ( v.done ) {\n\t\t\tbreak;\n\t\t}\n\t\tz = v.value;\n\t\tif ( isArrayLikeObject( z ) && z.length >= 2 ) {\n\t\t\tout.push( z[ 0 ], z[ 1 ] );\n\t\t} else if ( isComplexLike( z ) ) {\n\t\t\tout.push( realf( z ), imagf( z ) );\n\t\t} else {\n\t\t\treturn new TypeError( 'invalid argument. An iterator must return either a two-element array containing real and imaginary components or a complex number. Value: `'+z+'`.' );\n\t\t}\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default fromIterator;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isArrayLikeObject from '@stdlib/assert-is-array-like-object';\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport realf from '@stdlib/complex-realf';\nimport imagf from '@stdlib/complex-imagf';\n\n\n// MAIN //\n\n/**\n* Returns an array of iterated values.\n*\n* @private\n* @param {Object} it - iterator\n* @param {Function} clbk - callback to invoke for each iterated value\n* @param {*} thisArg - invocation context\n* @returns {(Array|TypeError)} array or an error\n*/\nfunction fromIteratorMap( it, clbk, thisArg ) {\n\tvar out;\n\tvar v;\n\tvar z;\n\tvar i;\n\n\tout = [];\n\ti = -1;\n\twhile ( true ) {\n\t\tv = it.next();\n\t\tif ( v.done ) {\n\t\t\tbreak;\n\t\t}\n\t\ti += 1;\n\t\tz = clbk.call( thisArg, v.value, i );\n\t\tif ( isArrayLikeObject( z ) && z.length >= 2 ) {\n\t\t\tout.push( z[ 0 ], z[ 1 ] );\n\t\t} else if ( isComplexLike( z ) ) {\n\t\t\tout.push( realf( z ), imagf( z ) );\n\t\t} else {\n\t\t\treturn new TypeError( 'invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `'+z+'`.' );\n\t\t}\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default fromIteratorMap;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport realf from '@stdlib/complex-realf';\nimport imagf from '@stdlib/complex-imagf';\n\n\n// MAIN //\n\n/**\n* Returns a strided array of real and imaginary components.\n*\n* @private\n* @param {Float32Array} buf - output array\n* @param {Array} arr - array containing complex numbers\n* @returns {(Float32Array|null)} output array or null\n*/\nfunction fromArray( buf, arr ) {\n\tvar len;\n\tvar v;\n\tvar i;\n\tvar j;\n\n\tlen = arr.length;\n\tj = 0;\n\tfor ( i = 0; i < len; i++ ) {\n\t\tv = arr[ i ];\n\t\tif ( !isComplexLike( v ) ) {\n\t\t\treturn null;\n\t\t}\n\t\tbuf[ j ] = realf( v );\n\t\tbuf[ j+1 ] = imagf( v );\n\t\tj += 2; // stride\n\t}\n\treturn buf;\n}\n\n\n// EXPORTS //\n\nexport default fromArray;\n","/* eslint-disable no-restricted-syntax, max-lines, no-invalid-this */\n\n/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isNonNegativeInteger } from '@stdlib/assert-is-nonnegative-integer';\nimport isArrayLikeObject from '@stdlib/assert-is-array-like-object';\nimport isCollection from '@stdlib/assert-is-collection';\nimport isArrayBuffer from '@stdlib/assert-is-arraybuffer';\nimport isObject from '@stdlib/assert-is-object';\nimport isArray from '@stdlib/assert-is-array';\nimport isFunction from '@stdlib/assert-is-function';\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport isEven from '@stdlib/math-base-assert-is-even';\nimport isInteger from '@stdlib/math-base-assert-is-integer';\nimport hasIteratorSymbolSupport from '@stdlib/assert-has-iterator-symbol-support';\nimport ITERATOR_SYMBOL from '@stdlib/symbol-iterator';\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport setReadOnlyAccessor from '@stdlib/utils-define-nonenumerable-read-only-accessor';\nimport Float32Array from '@stdlib/array-float32';\nimport Complex64 from '@stdlib/complex-float32';\nimport realf from '@stdlib/complex-realf';\nimport imagf from '@stdlib/complex-imagf';\nimport reinterpret64 from '@stdlib/strided-base-reinterpret-complex64';\nimport reinterpret128 from '@stdlib/strided-base-reinterpret-complex128';\nimport arraylike2object from '@stdlib/array-base-arraylike2object';\nimport fromIterator from './from_iterator.js';\nimport fromIteratorMap from './from_iterator_map.js';\nimport fromArray from './from_array.js';\n\n\n// VARIABLES //\n\nvar BYTES_PER_ELEMENT = Float32Array.BYTES_PER_ELEMENT * 2;\nvar HAS_ITERATOR_SYMBOL = hasIteratorSymbolSupport();\n\n\n// FUNCTIONS //\n\n/**\n* Returns a boolean indicating if a value is a complex typed array.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a complex typed array\n*/\nfunction isComplexArray( value ) {\n\treturn (\n\t\tvalue instanceof Complex64Array ||\n\t\t(\n\t\t\ttypeof value === 'object' &&\n\t\t\tvalue !== null &&\n\t\t\t(\n\t\t\t\tvalue.constructor.name === 'Complex64Array' ||\n\t\t\t\tvalue.constructor.name === 'Complex128Array'\n\t\t\t) &&\n\t\t\ttypeof value._length === 'number' && // eslint-disable-line no-underscore-dangle\n\n\t\t\t// NOTE: we don't perform a more rigorous test here for a typed array for performance reasons, as robustly checking for a typed array instance could require walking the prototype tree and performing relatively expensive constructor checks...\n\t\t\ttypeof value._buffer === 'object' // eslint-disable-line no-underscore-dangle\n\t\t)\n\t);\n}\n\n/**\n* Returns a boolean indicating if a value is a complex typed array constructor.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a complex typed array constructor\n*/\nfunction isComplexArrayConstructor( value ) {\n\treturn (\n\t\tvalue === Complex64Array ||\n\n\t\t// NOTE: weaker test in order to avoid a circular dependency with Complex128Array...\n\t\tvalue.name === 'Complex128Array'\n\t);\n}\n\n/**\n* Returns a boolean indicating if a value is a `Complex64Array`.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a `Complex64Array`\n*/\nfunction isComplex64Array( value ) {\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\tvalue.constructor.name === 'Complex64Array' &&\n\t\tvalue.BYTES_PER_ELEMENT === BYTES_PER_ELEMENT\n\t);\n}\n\n/**\n* Returns a boolean indicating if a value is a `Complex128Array`.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a `Complex128Array`\n*/\nfunction isComplex128Array( value ) {\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\tvalue.constructor.name === 'Complex128Array' &&\n\t\tvalue.BYTES_PER_ELEMENT === BYTES_PER_ELEMENT*2\n\t);\n}\n\n\n// MAIN //\n\n/**\n* 64-bit complex number array constructor.\n*\n* @constructor\n* @param {(NonNegativeInteger|Collection|ArrayBuffer|Iterable)} [arg] - length, typed array, array-like object, buffer, or an iterable\n* @param {NonNegativeInteger} [byteOffset=0] - byte offset\n* @param {NonNegativeInteger} [length] - view length\n* @throws {RangeError} ArrayBuffer byte length must be a multiple of `8`\n* @throws {RangeError} array-like object and typed array input arguments must have a length which is a multiple of two\n* @throws {TypeError} if provided only a single argument, must provide a valid argument\n* @throws {TypeError} byte offset must be a nonnegative integer\n* @throws {RangeError} byte offset must be a multiple of `8`\n* @throws {TypeError} view length must be a positive multiple of `8`\n* @throws {RangeError} must provide sufficient memory to accommodate byte offset and view length requirements\n* @throws {TypeError} an iterator must return either a two element array containing real and imaginary components or a complex number\n* @returns {Complex64Array} complex number array\n*\n* @example\n* var arr = new Complex64Array();\n* // returns \n*\n* var len = arr.length;\n* // returns 0\n*\n* @example\n* var arr = new Complex64Array( 2 );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*\n* @example\n* var arr = new Complex64Array( [ 1.0, -1.0 ] );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* import ArrayBuffer from '@stdlib/array-buffer';\n*\n* var buf = new ArrayBuffer( 16 );\n* var arr = new Complex64Array( buf );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*\n* @example\n* import ArrayBuffer from '@stdlib/array-buffer';\n*\n* var buf = new ArrayBuffer( 16 );\n* var arr = new Complex64Array( buf, 8 );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* import ArrayBuffer from '@stdlib/array-buffer';\n*\n* var buf = new ArrayBuffer( 32 );\n* var arr = new Complex64Array( buf, 8, 2 );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*/\nfunction Complex64Array() {\n\tvar byteOffset;\n\tvar nargs;\n\tvar buf;\n\tvar len;\n\n\tnargs = arguments.length;\n\tif ( !(this instanceof Complex64Array) ) {\n\t\tif ( nargs === 0 ) {\n\t\t\treturn new Complex64Array();\n\t\t}\n\t\tif ( nargs === 1 ) {\n\t\t\treturn new Complex64Array( arguments[0] );\n\t\t}\n\t\tif ( nargs === 2 ) {\n\t\t\treturn new Complex64Array( arguments[0], arguments[1] );\n\t\t}\n\t\treturn new Complex64Array( arguments[0], arguments[1], arguments[2] );\n\t}\n\t// Create the underlying data buffer...\n\tif ( nargs === 0 ) {\n\t\tbuf = new Float32Array( 0 ); // backward-compatibility\n\t} else if ( nargs === 1 ) {\n\t\tif ( isNonNegativeInteger( arguments[0] ) ) {\n\t\t\tbuf = new Float32Array( arguments[0]*2 );\n\t\t} else if ( isCollection( arguments[0] ) ) {\n\t\t\tbuf = arguments[ 0 ];\n\t\t\tlen = buf.length;\n\n\t\t\t// If provided a \"generic\" array, peak at the first value, and, if the value is a complex number, try to process as an array of complex numbers, falling back to \"normal\" typed array initialization if we fail and ensuring consistency if the first value had not been a complex number...\n\t\t\tif ( len && isArray( buf ) && isComplexLike( buf[0] ) ) {\n\t\t\t\tbuf = fromArray( new Float32Array( len*2 ), buf );\n\t\t\t\tif ( buf === null ) {\n\t\t\t\t\t// We failed and we are now forced to allocate a new array :-(\n\t\t\t\t\tif ( !isEven( len ) ) {\n\t\t\t\t\t\tthrow new RangeError( 'invalid argument. Array-like object input arguments must have a length which is a multiple of two. Length: `'+len+'`.' );\n\t\t\t\t\t}\n\t\t\t\t\t// We failed, so fall back to directly setting values...\n\t\t\t\t\tbuf = new Float32Array( arguments[0] );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ( isComplex64Array( buf ) ) {\n\t\t\t\t\tbuf = reinterpret64( buf, 0 );\n\t\t\t\t} else if ( isComplex128Array( buf ) ) {\n\t\t\t\t\tbuf = reinterpret128( buf, 0 );\n\t\t\t\t} else if ( !isEven( len ) ) {\n\t\t\t\t\tthrow new RangeError( 'invalid argument. Array-like object and typed array input arguments must have a length which is a multiple of two. Length: `'+len+'`.' );\n\t\t\t\t}\n\t\t\t\tbuf = new Float32Array( buf );\n\t\t\t}\n\t\t} else if ( isArrayBuffer( arguments[0] ) ) {\n\t\t\tbuf = arguments[ 0 ];\n\t\t\tif ( !isInteger( buf.byteLength/BYTES_PER_ELEMENT ) ) {\n\t\t\t\tthrow new RangeError( 'invalid argument. ArrayBuffer byte length must be a multiple of '+BYTES_PER_ELEMENT+'. Byte length: `'+buf.byteLength+'`.' );\n\t\t\t}\n\t\t\tbuf = new Float32Array( buf );\n\t\t} else if ( isObject( arguments[0] ) ) {\n\t\t\tbuf = arguments[ 0 ];\n\t\t\tif ( HAS_ITERATOR_SYMBOL === false ) {\n\t\t\t\tthrow new TypeError( 'invalid argument. Environment lacks Symbol.iterator support. Must provide a length, ArrayBuffer, typed array, or array-like object. Value: `'+buf+'`.' );\n\t\t\t}\n\t\t\tif ( !isFunction( buf[ ITERATOR_SYMBOL ] ) ) {\n\t\t\t\tthrow new TypeError( 'invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `'+buf+'`.' );\n\t\t\t}\n\t\t\tbuf = buf[ ITERATOR_SYMBOL ]();\n\t\t\tif ( !isFunction( buf.next ) ) {\n\t\t\t\tthrow new TypeError( 'invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable.' );\n\t\t\t}\n\t\t\tbuf = fromIterator( buf );\n\t\t\tif ( buf instanceof Error ) {\n\t\t\t\tthrow buf;\n\t\t\t}\n\t\t\tbuf = new Float32Array( buf );\n\t\t} else {\n\t\t\tthrow new TypeError( 'invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `'+arguments[0]+'`.' );\n\t\t}\n\t} else {\n\t\tbuf = arguments[ 0 ];\n\t\tif ( !isArrayBuffer( buf ) ) {\n\t\t\tthrow new TypeError( 'invalid argument. First argument must be an array buffer. Value: `'+buf+'`.' );\n\t\t}\n\t\tbyteOffset = arguments[ 1 ];\n\t\tif ( !isNonNegativeInteger( byteOffset ) ) {\n\t\t\tthrow new TypeError( 'invalid argument. Byte offset must be a nonnegative integer. Value: `'+byteOffset+'`.' );\n\t\t}\n\t\tif ( !isInteger( byteOffset/BYTES_PER_ELEMENT ) ) {\n\t\t\tthrow new RangeError( 'invalid argument. Byte offset must be a multiple of '+BYTES_PER_ELEMENT+'. Value: `'+byteOffset+'`.' );\n\t\t}\n\t\tif ( nargs === 2 ) {\n\t\t\tlen = buf.byteLength - byteOffset;\n\t\t\tif ( !isInteger( len/BYTES_PER_ELEMENT ) ) {\n\t\t\t\tthrow new RangeError( 'invalid arguments. ArrayBuffer view byte length must be a multiple of '+BYTES_PER_ELEMENT+'. View byte length: `'+len+'`.' );\n\t\t\t}\n\t\t\tbuf = new Float32Array( buf, byteOffset );\n\t\t} else {\n\t\t\tlen = arguments[ 2 ];\n\t\t\tif ( !isNonNegativeInteger( len ) ) {\n\t\t\t\tthrow new TypeError( 'invalid argument. Length must be a nonnegative integer. Value: `'+len+'`.' );\n\t\t\t}\n\t\t\tif ( (len*BYTES_PER_ELEMENT) > (buf.byteLength-byteOffset) ) {\n\t\t\t\tthrow new RangeError( 'invalid arguments. ArrayBuffer has insufficient capacity. Either decrease the array length or provide a bigger buffer. Minimum capacity: `'+(len*BYTES_PER_ELEMENT)+'`.' );\n\t\t\t}\n\t\t\tbuf = new Float32Array( buf, byteOffset, len*2 );\n\t\t}\n\t}\n\tsetReadOnly( this, '_buffer', buf );\n\tsetReadOnly( this, '_length', buf.length/2 );\n\n\treturn this;\n}\n\n/**\n* Size (in bytes) of each array element.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex64Array\n* @readonly\n* @type {PositiveInteger}\n* @default 8\n*\n* @example\n* var nbytes = Complex64Array.BYTES_PER_ELEMENT;\n* // returns 8\n*/\nsetReadOnly( Complex64Array, 'BYTES_PER_ELEMENT', BYTES_PER_ELEMENT );\n\n/**\n* Constructor name.\n*\n* @name name\n* @memberof Complex64Array\n* @readonly\n* @type {string}\n* @default 'Complex64Array'\n*\n* @example\n* var str = Complex64Array.name;\n* // returns 'Complex64Array'\n*/\nsetReadOnly( Complex64Array, 'name', 'Complex64Array' );\n\n/**\n* Creates a new 64-bit complex number array from an array-like object or an iterable.\n*\n* @name from\n* @memberof Complex64Array\n* @type {Function}\n* @param {(Collection|Iterable)} src - array-like object or iterable\n* @param {Function} [clbk] - callback to invoke for each source element\n* @param {*} [thisArg] - context\n* @throws {TypeError} `this` context must be a constructor\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be an array-like object or an iterable\n* @throws {TypeError} second argument must be a function\n* @throws {RangeError} array-like objects must have a length which is a multiple of two\n* @throws {TypeError} an iterator must return either a two element array containing real and imaginary components or a complex number\n* @throws {TypeError} when provided an iterator, a callback must return either a two element array containing real and imaginary components or a complex number\n* @returns {Complex64Array} 64-bit complex number array\n*\n* @example\n* var arr = Complex64Array.from( [ 1.0, -1.0 ] );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n*\n* var arr = Complex64Array.from( [ new Complex64( 1.0, 1.0 ) ] );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* function clbk( v ) {\n* return new Complex64( realf(v)*2.0, imagf(v)*2.0 );\n* }\n*\n* var arr = Complex64Array.from( [ new Complex64( 1.0, 1.0 ) ], clbk );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*/\nsetReadOnly( Complex64Array, 'from', function from( src ) {\n\tvar thisArg;\n\tvar nargs;\n\tvar clbk;\n\tvar out;\n\tvar buf;\n\tvar tmp;\n\tvar len;\n\tvar flg;\n\tvar v;\n\tvar i;\n\tvar j;\n\tif ( !isFunction( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` context must be a constructor.' );\n\t}\n\tif ( !isComplexArrayConstructor( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tnargs = arguments.length;\n\tif ( nargs > 1 ) {\n\t\tclbk = arguments[ 1 ];\n\t\tif ( !isFunction( clbk ) ) {\n\t\t\tthrow new TypeError( 'invalid argument. Second argument must be a function. Value: `'+clbk+'`.' );\n\t\t}\n\t\tif ( nargs > 2 ) {\n\t\t\tthisArg = arguments[ 2 ];\n\t\t}\n\t}\n\tif ( isComplexArray( src ) ) {\n\t\tlen = src.length;\n\t\tif ( clbk ) {\n\t\t\tout = new this( len );\n\t\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\t\tj = 0;\n\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\tv = clbk.call( thisArg, src.get( i ), i );\n\t\t\t\tif ( isComplexLike( v ) ) {\n\t\t\t\t\tbuf[ j ] = realf( v );\n\t\t\t\t\tbuf[ j+1 ] = imagf( v );\n\t\t\t\t} else if ( isArrayLikeObject( v ) && v.length >= 2 ) {\n\t\t\t\t\tbuf[ j ] = v[ 0 ];\n\t\t\t\t\tbuf[ j+1 ] = v[ 1 ];\n\t\t\t\t} else {\n\t\t\t\t\tthrow new TypeError( 'invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `'+v+'`.' );\n\t\t\t\t}\n\t\t\t\tj += 2; // stride\n\t\t\t}\n\t\t\treturn out;\n\t\t}\n\t\treturn new this( src );\n\t}\n\tif ( isCollection( src ) ) {\n\t\tif ( clbk ) {\n\t\t\t// Note: array contents affect how we iterate over a provided data source. If only complex number objects, we can extract real and imaginary components. Otherwise, for non-complex number arrays (e.g., `Float64Array`, etc), we assume a strided array where real and imaginary components are interleaved. In the former case, we expect a callback to return real and imaginary components (possibly as a complex number). In the latter case, we expect a callback to return *either* a real or imaginary component.\n\n\t\t\tlen = src.length;\n\t\t\ttmp = arraylike2object( src );\n\n\t\t\t// Detect whether we've been provided an array which returns complex number objects...\n\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\tif ( !isComplexLike( tmp.getter( src, i ) ) ) {\n\t\t\t\t\tflg = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// If an array does not contain only complex number objects, then we assume interleaved real and imaginary components...\n\t\t\tif ( flg ) {\n\t\t\t\tif ( !isEven( len ) ) {\n\t\t\t\t\tthrow new RangeError( 'invalid argument. First argument must have a length which is a multiple of two. Length: `'+len+'`.' );\n\t\t\t\t}\n\t\t\t\tout = new this( len/2 );\n\t\t\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\t\tbuf[ i ] = clbk.call( thisArg, tmp.getter( src, i ), i );\n\t\t\t\t}\n\t\t\t\treturn out;\n\t\t\t}\n\t\t\t// If an array contains only complex number objects, then we need to extract real and imaginary components...\n\t\t\tout = new this( len );\n\t\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\t\tj = 0;\n\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\tv = clbk.call( thisArg, tmp.getter( src, i ), i );\n\t\t\t\tif ( isComplexLike( v ) ) {\n\t\t\t\t\tbuf[ j ] = realf( v );\n\t\t\t\t\tbuf[ j+1 ] = imagf( v );\n\t\t\t\t} else if ( isArrayLikeObject( v ) && v.length >= 2 ) {\n\t\t\t\t\tbuf[ j ] = v[ 0 ];\n\t\t\t\t\tbuf[ j+1 ] = v[ 1 ];\n\t\t\t\t} else {\n\t\t\t\t\tthrow new TypeError( 'invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `'+v+'`.' );\n\t\t\t\t}\n\t\t\t\tj += 2; // stride\n\t\t\t}\n\t\t\treturn out;\n\t\t}\n\t\treturn new this( src );\n\t}\n\tif ( isObject( src ) && HAS_ITERATOR_SYMBOL && isFunction( src[ ITERATOR_SYMBOL ] ) ) { // eslint-disable-line max-len\n\t\tbuf = src[ ITERATOR_SYMBOL ]();\n\t\tif ( !isFunction( buf.next ) ) {\n\t\t\tthrow new TypeError( 'invalid argument. First argument must be an array-like object or an iterable.' );\n\t\t}\n\t\tif ( clbk ) {\n\t\t\ttmp = fromIteratorMap( buf, clbk, thisArg );\n\t\t} else {\n\t\t\ttmp = fromIterator( buf );\n\t\t}\n\t\tif ( tmp instanceof Error ) {\n\t\t\tthrow tmp;\n\t\t}\n\t\tlen = tmp.length / 2;\n\t\tout = new this( len );\n\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\tbuf[ i ] = tmp[ i ];\n\t\t}\n\t\treturn out;\n\t}\n\tthrow new TypeError( 'invalid argument. First argument must be an array-like object or an iterable. Value: `'+src+'`.' );\n});\n\n/**\n* Creates a new 64-bit complex number array from a variable number of arguments.\n*\n* @name of\n* @memberof Complex64Array\n* @type {Function}\n* @param {...*} element - array elements\n* @throws {TypeError} `this` context must be a constructor\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Complex64Array} 64-bit complex number array\n*\n* @example\n* var arr = Complex64Array.of( 1.0, 1.0, 1.0, 1.0 );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*/\nsetReadOnly( Complex64Array, 'of', function of() {\n\tvar args;\n\tvar i;\n\tif ( !isFunction( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` context must be a constructor.' );\n\t}\n\tif ( !isComplexArrayConstructor( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\targs = [];\n\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\targs.push( arguments[ i ] );\n\t}\n\treturn new this( args );\n});\n\n/**\n* Pointer to the underlying data buffer.\n*\n* @name buffer\n* @memberof Complex64Array.prototype\n* @readonly\n* @type {ArrayBuffer}\n*\n* @example\n* var arr = new Complex64Array( 10 );\n*\n* var buf = arr.buffer;\n* // returns \n*/\nsetReadOnlyAccessor( Complex64Array.prototype, 'buffer', function get() {\n\treturn this._buffer.buffer;\n});\n\n/**\n* Size (in bytes) of the array.\n*\n* @name byteLength\n* @memberof Complex64Array.prototype\n* @readonly\n* @type {NonNegativeInteger}\n*\n* @example\n* var arr = new Complex64Array( 10 );\n*\n* var byteLength = arr.byteLength;\n* // returns 80\n*/\nsetReadOnlyAccessor( Complex64Array.prototype, 'byteLength', function get() {\n\treturn this._buffer.byteLength;\n});\n\n/**\n* Offset (in bytes) of the array from the start of its underlying `ArrayBuffer`.\n*\n* @name byteOffset\n* @memberof Complex64Array.prototype\n* @readonly\n* @type {NonNegativeInteger}\n*\n* @example\n* var arr = new Complex64Array( 10 );\n*\n* var byteOffset = arr.byteOffset;\n* // returns 0\n*/\nsetReadOnlyAccessor( Complex64Array.prototype, 'byteOffset', function get() {\n\treturn this._buffer.byteOffset;\n});\n\n/**\n* Size (in bytes) of each array element.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex64Array.prototype\n* @readonly\n* @type {PositiveInteger}\n* @default 8\n*\n* @example\n* var arr = new Complex64Array( 10 );\n*\n* var nbytes = arr.BYTES_PER_ELEMENT;\n* // returns 8\n*/\nsetReadOnly( Complex64Array.prototype, 'BYTES_PER_ELEMENT', Complex64Array.BYTES_PER_ELEMENT );\n\n/**\n* Copies a sequence of elements within the array to the position starting at `target`.\n*\n* @name copyWithin\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {integer} target - index at which to start copying elements\n* @param {integer} start - source index at which to copy elements from\n* @param {integer} [end] - source index at which to stop copying elements from\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Complex64Array} modified array\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* var arr = new Complex64Array( 4 );\n*\n* // Set the array elements:\n* arr.set( new Complex64( 1.0, 1.0 ), 0 );\n* arr.set( new Complex64( 2.0, 2.0 ), 1 );\n* arr.set( new Complex64( 3.0, 3.0 ), 2 );\n* arr.set( new Complex64( 4.0, 4.0 ), 3 );\n*\n* // Copy the first two elements to the last two elements:\n* arr.copyWithin( 2, 0, 2 );\n*\n* // Get the last array element:\n* var z = arr.get( 3 );\n*\n* var re = realf( z );\n* // returns 2.0\n*\n* var im = imagf( z );\n* // returns 2.0\n*/\nsetReadOnly( Complex64Array.prototype, 'copyWithin', function copyWithin( target, start ) {\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\t// FIXME: prefer a functional `copyWithin` implementation which addresses lack of universal browser support (e.g., IE11 and Safari) or ensure that typed arrays are polyfilled\n\tif ( arguments.length === 2 ) {\n\t\tthis._buffer.copyWithin( target*2, start*2 );\n\t} else {\n\t\tthis._buffer.copyWithin( target*2, start*2, arguments[2]*2 );\n\t}\n\treturn this;\n});\n\n/**\n* Returns an iterator for iterating over array key-value pairs.\n*\n* @name entries\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Iterator} iterator\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n*\n* var arr = [\n* new Complex64( 1.0, 1.0 ),\n* new Complex64( 2.0, 2.0 ),\n* new Complex64( 3.0, 3.0 )\n* ];\n* arr = new Complex64Array( arr );\n*\n* // Create an iterator:\n* var it = arr.entries();\n*\n* // Iterate over the key-value pairs...\n* var v = it.next().value;\n* // returns [ 0, ]\n*\n* v = it.next().value;\n* // returns [ 1, ]\n*\n* v = it.next().value;\n* // returns [ 2, ]\n*\n* var bool = it.next().done;\n* // returns true\n*/\nsetReadOnly( Complex64Array.prototype, 'entries', function entries() {\n\tvar buffer;\n\tvar self;\n\tvar iter;\n\tvar len;\n\tvar FLG;\n\tvar i;\n\tvar j;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tself = this;\n\tbuffer = this._buffer;\n\tlen = this._length;\n\n\t// Initialize the iteration indices:\n\ti = -1;\n\tj = -2;\n\n\t// Create an iterator protocol-compliant object:\n\titer = {};\n\tsetReadOnly( iter, 'next', next );\n\tsetReadOnly( iter, 'return', end );\n\n\tif ( ITERATOR_SYMBOL ) {\n\t\tsetReadOnly( iter, ITERATOR_SYMBOL, factory );\n\t}\n\treturn iter;\n\n\t/**\n\t* Returns an iterator protocol-compliant object containing the next iterated value.\n\t*\n\t* @private\n\t* @returns {Object} iterator protocol-compliant object\n\t*/\n\tfunction next() {\n\t\tvar z;\n\t\ti += 1;\n\t\tif ( FLG || i >= len ) {\n\t\t\treturn {\n\t\t\t\t'done': true\n\t\t\t};\n\t\t}\n\t\tj += 2;\n\t\tz = new Complex64( buffer[ j ], buffer[ j+1 ] );\n\t\treturn {\n\t\t\t'value': [ i, z ],\n\t\t\t'done': false\n\t\t};\n\t}\n\n\t/**\n\t* Finishes an iterator.\n\t*\n\t* @private\n\t* @param {*} [value] - value to return\n\t* @returns {Object} iterator protocol-compliant object\n\t*/\n\tfunction end( value ) {\n\t\tFLG = true;\n\t\tif ( arguments.length ) {\n\t\t\treturn {\n\t\t\t\t'value': value,\n\t\t\t\t'done': true\n\t\t\t};\n\t\t}\n\t\treturn {\n\t\t\t'done': true\n\t\t};\n\t}\n\n\t/**\n\t* Returns a new iterator.\n\t*\n\t* @private\n\t* @returns {Iterator} iterator\n\t*/\n\tfunction factory() {\n\t\treturn self.entries();\n\t}\n});\n\n/**\n* Returns an array element.\n*\n* @name get\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {NonNegativeInteger} idx - element index\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} must provide a nonnegative integer\n* @returns {(Complex64|void)} array element\n*\n* @example\n* var arr = new Complex64Array( 10 );\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* var z = arr.get( 0 );\n* // returns \n*\n* var re = realf( z );\n* // returns 0.0\n*\n* var im = imagf( z );\n* // returns 0.0\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n*\n* z = arr.get( 0 );\n* // returns \n*\n* re = realf( z );\n* // returns 1.0\n*\n* im = imagf( z );\n* // returns -1.0\n*\n* z = arr.get( 100 );\n* // returns undefined\n*/\nsetReadOnly( Complex64Array.prototype, 'get', function get( idx ) {\n\tvar buf;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isNonNegativeInteger( idx ) ) {\n\t\tthrow new TypeError( 'invalid argument. Must provide a nonnegative integer. Value: `'+idx+'`.' );\n\t}\n\tif ( idx >= this._length ) {\n\t\treturn;\n\t}\n\tbuf = this._buffer;\n\tidx *= 2;\n\treturn new Complex64( buf[ idx ], buf[ idx+1 ] );\n});\n\n/**\n* Number of array elements.\n*\n* @name length\n* @memberof Complex64Array.prototype\n* @readonly\n* @type {NonNegativeInteger}\n*\n* @example\n* var arr = new Complex64Array( 10 );\n*\n* var len = arr.length;\n* // returns 10\n*/\nsetReadOnlyAccessor( Complex64Array.prototype, 'length', function get() {\n\treturn this._length;\n});\n\n/**\n* Sets an array element.\n*\n* ## Notes\n*\n* - When provided a typed array, real or complex, we must check whether the source array shares the same buffer as the target array and whether the underlying memory overlaps. In particular, we are concerned with the following scenario:\n*\n* ```text\n* buf: ---------------------\n* src: ---------------------\n* ```\n*\n* In the above, as we copy values from `src`, we will overwrite values in the `src` view, resulting in duplicated values copied into the end of `buf`, which is not intended. Hence, to avoid overwriting source values, we must **copy** source values to a temporary array.\n*\n* In the other overlapping scenario,\n*\n* ```text\n* buf: ---------------------\n* src: ---------------------\n* ```\n*\n* by the time we begin copying into the overlapping region, we are copying from the end of `src`, a non-overlapping region, which means we don't run the risk of copying copied values, rather than the original `src` values as intended.\n*\n*\n* @name set\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {(Collection|Complex|ComplexArray)} value - value(s)\n* @param {NonNegativeInteger} [i=0] - element index at which to start writing values\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be either a complex number, an array-like object, or a complex number array\n* @throws {TypeError} index argument must be a nonnegative integer\n* @throws {RangeError} array-like objects must have a length which is a multiple of two\n* @throws {RangeError} index argument is out-of-bounds\n* @throws {RangeError} target array lacks sufficient storage to accommodate source values\n* @returns {void}\n*\n* @example\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* var arr = new Complex64Array( 10 );\n*\n* var z = arr.get( 0 );\n* // returns \n*\n* var re = realf( z );\n* // returns 0.0\n*\n* var im = imagf( z );\n* // returns 0.0\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n*\n* z = arr.get( 0 );\n* // returns \n*\n* re = realf( z );\n* // returns 1.0\n*\n* im = imagf( z );\n* // returns -1.0\n*/\nsetReadOnly( Complex64Array.prototype, 'set', function set( value ) {\n\t/* eslint-disable no-underscore-dangle */\n\tvar sbuf;\n\tvar idx;\n\tvar buf;\n\tvar tmp;\n\tvar flg;\n\tvar N;\n\tvar v;\n\tvar i;\n\tvar j;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tbuf = this._buffer;\n\tif ( arguments.length > 1 ) {\n\t\tidx = arguments[ 1 ];\n\t\tif ( !isNonNegativeInteger( idx ) ) {\n\t\t\tthrow new TypeError( 'invalid argument. Index argument must be a nonnegative integer. Value: `'+idx+'`.' );\n\t\t}\n\t} else {\n\t\tidx = 0;\n\t}\n\tif ( isComplexLike( value ) ) {\n\t\tif ( idx >= this._length ) {\n\t\t\tthrow new RangeError( 'invalid argument. Index argument is out-of-bounds. Value: `'+idx+'`.' );\n\t\t}\n\t\tidx *= 2;\n\t\tbuf[ idx ] = realf( value );\n\t\tbuf[ idx+1 ] = imagf( value );\n\t\treturn;\n\t}\n\tif ( isComplexArray( value ) ) {\n\t\tN = value._length;\n\t\tif ( idx+N > this._length ) {\n\t\t\tthrow new RangeError( 'invalid arguments. Target array lacks sufficient storage to accommodate source values.' );\n\t\t}\n\t\tsbuf = value._buffer;\n\n\t\t// Check for overlapping memory...\n\t\tj = buf.byteOffset + (idx*BYTES_PER_ELEMENT);\n\t\tif (\n\t\t\tsbuf.buffer === buf.buffer &&\n\t\t\t(\n\t\t\t\tsbuf.byteOffset < j &&\n\t\t\t\tsbuf.byteOffset+sbuf.byteLength > j\n\t\t\t)\n\t\t) {\n\t\t\t// We need to copy source values...\n\t\t\ttmp = new Float32Array( sbuf.length );\n\t\t\tfor ( i = 0; i < sbuf.length; i++ ) {\n\t\t\t\ttmp[ i ] = sbuf[ i ];\n\t\t\t}\n\t\t\tsbuf = tmp;\n\t\t}\n\t\tidx *= 2;\n\t\tj = 0;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\tbuf[ idx ] = sbuf[ j ];\n\t\t\tbuf[ idx+1 ] = sbuf[ j+1 ];\n\t\t\tidx += 2; // stride\n\t\t\tj += 2; // stride\n\t\t}\n\t\treturn;\n\t}\n\tif ( isCollection( value ) ) {\n\t\t// Detect whether we've been provided an array of complex numbers...\n\t\tN = value.length;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\tif ( !isComplexLike( value[ i ] ) ) {\n\t\t\t\tflg = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t// If an array does not contain only complex numbers, then we assume interleaved real and imaginary components...\n\t\tif ( flg ) {\n\t\t\tif ( !isEven( N ) ) {\n\t\t\t\tthrow new RangeError( 'invalid argument. Array-like object arguments must have a length which is a multiple of two. Length: `'+N+'`.' );\n\t\t\t}\n\t\t\tif ( idx+(N/2) > this._length ) {\n\t\t\t\tthrow new RangeError( 'invalid arguments. Target array lacks sufficient storage to accommodate source values.' );\n\t\t\t}\n\t\t\tsbuf = value;\n\n\t\t\t// Check for overlapping memory...\n\t\t\tj = buf.byteOffset + (idx*BYTES_PER_ELEMENT);\n\t\t\tif (\n\t\t\t\tsbuf.buffer === buf.buffer &&\n\t\t\t\t(\n\t\t\t\t\tsbuf.byteOffset < j &&\n\t\t\t\t\tsbuf.byteOffset+sbuf.byteLength > j\n\t\t\t\t)\n\t\t\t) {\n\t\t\t\t// We need to copy source values...\n\t\t\t\ttmp = new Float32Array( N );\n\t\t\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\t\t\ttmp[ i ] = sbuf[ i ];\n\t\t\t\t}\n\t\t\t\tsbuf = tmp;\n\t\t\t}\n\t\t\tidx *= 2;\n\t\t\tN /= 2;\n\t\t\tj = 0;\n\t\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\t\tbuf[ idx ] = sbuf[ j ];\n\t\t\t\tbuf[ idx+1 ] = sbuf[ j+1 ];\n\t\t\t\tidx += 2; // stride\n\t\t\t\tj += 2; // stride\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\t// If an array contains only complex numbers, then we need to extract real and imaginary components...\n\t\tif ( idx+N > this._length ) {\n\t\t\tthrow new RangeError( 'invalid arguments. Target array lacks sufficient storage to accommodate source values.' );\n\t\t}\n\t\tidx *= 2;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\tv = value[ i ];\n\t\t\tbuf[ idx ] = realf( v );\n\t\t\tbuf[ idx+1 ] = imagf( v );\n\t\t\tidx += 2; // stride\n\t\t}\n\t\treturn;\n\t}\n\tthrow new TypeError( 'invalid argument. First argument must be either a complex number, an array-like object, or a complex number array. Value: `'+value+'`.' );\n\n\t/* eslint-enable no-underscore-dangle */\n});\n\n\n// EXPORTS //\n\nexport default Complex64Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Returns the real component of a double-precision complex floating-point number.\n*\n* @param {Complex} z - complex number\n* @returns {number} real component\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n*\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var re = real( z );\n* // returns 5.0\n*/\nfunction real( z ) {\n\treturn z.re;\n}\n\n\n// EXPORTS //\n\nexport default real;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Returns the imaginary component of a double-precision complex floating-point number.\n*\n* @param {Complex} z - complex number\n* @returns {number} imaginary component\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n*\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var im = imag( z );\n* // returns 3.0\n*/\nfunction imag( z ) {\n\treturn z.im;\n}\n\n\n// EXPORTS //\n\nexport default imag;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isArrayLikeObject from '@stdlib/assert-is-array-like-object';\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport real from '@stdlib/complex-real';\nimport imag from '@stdlib/complex-imag';\n\n\n// MAIN //\n\n/**\n* Returns an array of iterated values.\n*\n* @private\n* @param {Object} it - iterator\n* @returns {(Array|TypeError)} array or an error\n*/\nfunction fromIterator( it ) {\n\tvar out;\n\tvar v;\n\tvar z;\n\n\tout = [];\n\twhile ( true ) {\n\t\tv = it.next();\n\t\tif ( v.done ) {\n\t\t\tbreak;\n\t\t}\n\t\tz = v.value;\n\t\tif ( isArrayLikeObject( z ) && z.length >= 2 ) {\n\t\t\tout.push( z[ 0 ], z[ 1 ] );\n\t\t} else if ( isComplexLike( z ) ) {\n\t\t\tout.push( real( z ), imag( z ) );\n\t\t} else {\n\t\t\treturn new TypeError( 'invalid argument. An iterator must return either a two-element array containing real and imaginary components or a complex number. Value: `'+z+'`.' );\n\t\t}\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default fromIterator;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isArrayLikeObject from '@stdlib/assert-is-array-like-object';\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport real from '@stdlib/complex-real';\nimport imag from '@stdlib/complex-imag';\n\n\n// MAIN //\n\n/**\n* Returns an array of iterated values.\n*\n* @private\n* @param {Object} it - iterator\n* @param {Function} clbk - callback to invoke for each iterated value\n* @param {*} thisArg - invocation context\n* @returns {(Array|TypeError)} array or an error\n*/\nfunction fromIteratorMap( it, clbk, thisArg ) {\n\tvar out;\n\tvar v;\n\tvar z;\n\tvar i;\n\n\tout = [];\n\ti = -1;\n\twhile ( true ) {\n\t\tv = it.next();\n\t\tif ( v.done ) {\n\t\t\tbreak;\n\t\t}\n\t\ti += 1;\n\t\tz = clbk.call( thisArg, v.value, i );\n\t\tif ( isArrayLikeObject( z ) && z.length >= 2 ) {\n\t\t\tout.push( z[ 0 ], z[ 1 ] );\n\t\t} else if ( isComplexLike( z ) ) {\n\t\t\tout.push( real( z ), imag( z ) );\n\t\t} else {\n\t\t\treturn new TypeError( 'invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `'+z+'`.' );\n\t\t}\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default fromIteratorMap;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport real from '@stdlib/complex-real';\nimport imag from '@stdlib/complex-imag';\n\n\n// MAIN //\n\n/**\n* Returns a strided array of real and imaginary components.\n*\n* @private\n* @param {Float64Array} buf - output array\n* @param {Array} arr - array containing complex numbers\n* @returns {(Float64Array|null)} output array or null\n*/\nfunction fromArray( buf, arr ) {\n\tvar len;\n\tvar v;\n\tvar i;\n\tvar j;\n\n\tlen = arr.length;\n\tj = 0;\n\tfor ( i = 0; i < len; i++ ) {\n\t\tv = arr[ i ];\n\t\tif ( !isComplexLike( v ) ) {\n\t\t\treturn null;\n\t\t}\n\t\tbuf[ j ] = real( v );\n\t\tbuf[ j+1 ] = imag( v );\n\t\tj += 2; // stride\n\t}\n\treturn buf;\n}\n\n\n// EXPORTS //\n\nexport default fromArray;\n","/* eslint-disable no-restricted-syntax, max-lines, no-invalid-this */\n\n/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isNonNegativeInteger } from '@stdlib/assert-is-nonnegative-integer';\nimport isArrayLikeObject from '@stdlib/assert-is-array-like-object';\nimport isCollection from '@stdlib/assert-is-collection';\nimport isArrayBuffer from '@stdlib/assert-is-arraybuffer';\nimport isObject from '@stdlib/assert-is-object';\nimport isArray from '@stdlib/assert-is-array';\nimport isFunction from '@stdlib/assert-is-function';\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport isEven from '@stdlib/math-base-assert-is-even';\nimport isInteger from '@stdlib/math-base-assert-is-integer';\nimport hasIteratorSymbolSupport from '@stdlib/assert-has-iterator-symbol-support';\nimport ITERATOR_SYMBOL from '@stdlib/symbol-iterator';\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport setReadOnlyAccessor from '@stdlib/utils-define-nonenumerable-read-only-accessor';\nimport Float64Array from '@stdlib/array-float64';\nimport Complex128 from '@stdlib/complex-float64';\nimport real from '@stdlib/complex-real';\nimport imag from '@stdlib/complex-imag';\nimport reinterpret64 from '@stdlib/strided-base-reinterpret-complex64';\nimport reinterpret128 from '@stdlib/strided-base-reinterpret-complex128';\nimport arraylike2object from '@stdlib/array-base-arraylike2object';\nimport fromIterator from './from_iterator.js';\nimport fromIteratorMap from './from_iterator_map.js';\nimport fromArray from './from_array.js';\n\n\n// VARIABLES //\n\nvar BYTES_PER_ELEMENT = Float64Array.BYTES_PER_ELEMENT * 2;\nvar HAS_ITERATOR_SYMBOL = hasIteratorSymbolSupport();\n\n\n// FUNCTIONS //\n\n/**\n* Returns a boolean indicating if a value is a complex typed array.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a complex typed array\n*/\nfunction isComplexArray( value ) {\n\treturn (\n\t\tvalue instanceof Complex128Array ||\n\t\t(\n\t\t\ttypeof value === 'object' &&\n\t\t\tvalue !== null &&\n\t\t\t(\n\t\t\t\tvalue.constructor.name === 'Complex64Array' ||\n\t\t\t\tvalue.constructor.name === 'Complex128Array'\n\t\t\t) &&\n\t\t\ttypeof value._length === 'number' && // eslint-disable-line no-underscore-dangle\n\n\t\t\t// NOTE: we don't perform a more rigorous test here for a typed array for performance reasons, as robustly checking for a typed array instance could require walking the prototype tree and performing relatively expensive constructor checks...\n\t\t\ttypeof value._buffer === 'object' // eslint-disable-line no-underscore-dangle\n\t\t)\n\t);\n}\n\n/**\n* Returns a boolean indicating if a value is a complex typed array constructor.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a complex typed array constructor\n*/\nfunction isComplexArrayConstructor( value ) {\n\treturn (\n\t\tvalue === Complex128Array ||\n\n\t\t// NOTE: weaker test in order to avoid a circular dependency with Complex64Array...\n\t\tvalue.name === 'Complex64Array'\n\t);\n}\n\n/**\n* Returns a boolean indicating if a value is a `Complex64Array`.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a `Complex64Array`\n*/\nfunction isComplex64Array( value ) {\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\tvalue.constructor.name === 'Complex64Array' &&\n\t\tvalue.BYTES_PER_ELEMENT === BYTES_PER_ELEMENT/2\n\t);\n}\n\n/**\n* Returns a boolean indicating if a value is a `Complex128Array`.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a `Complex128Array`\n*/\nfunction isComplex128Array( value ) {\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\tvalue.constructor.name === 'Complex128Array' &&\n\t\tvalue.BYTES_PER_ELEMENT === BYTES_PER_ELEMENT\n\t);\n}\n\n\n// MAIN //\n\n/**\n* 128-bit complex number array constructor.\n*\n* @constructor\n* @param {(NonNegativeInteger|Collection|ArrayBuffer|Iterable)} [arg] - length, typed array, array-like object, buffer, or iterable\n* @param {NonNegativeInteger} [byteOffset=0] - byte offset\n* @param {NonNegativeInteger} [length] - view length\n* @throws {RangeError} ArrayBuffer byte length must be a multiple of `16`\n* @throws {RangeError} array-like object and typed array input arguments must have a length which is a multiple of two\n* @throws {TypeError} if provided only a single argument, must provide a valid argument\n* @throws {TypeError} byte offset must be a nonnegative integer\n* @throws {RangeError} byte offset must be a multiple of `16`\n* @throws {TypeError} view length must be a positive multiple of `16`\n* @throws {RangeError} must provide sufficient memory to accommodate byte offset and view length requirements\n* @throws {TypeError} an iterator must return either a two element array containing real and imaginary components or a complex number\n* @returns {Complex128Array} complex number array\n*\n* @example\n* var arr = new Complex128Array();\n* // returns \n*\n* var len = arr.length;\n* // returns 0\n*\n* @example\n* var arr = new Complex128Array( 2 );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*\n* @example\n* var arr = new Complex128Array( [ 1.0, -1.0 ] );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* import ArrayBuffer from '@stdlib/array-buffer';\n*\n* var buf = new ArrayBuffer( 32 );\n* var arr = new Complex128Array( buf );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*\n* @example\n* import ArrayBuffer from '@stdlib/array-buffer';\n*\n* var buf = new ArrayBuffer( 32 );\n* var arr = new Complex128Array( buf, 16 );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* import ArrayBuffer from '@stdlib/array-buffer';\n*\n* var buf = new ArrayBuffer( 64 );\n* var arr = new Complex128Array( buf, 16, 2 );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*/\nfunction Complex128Array() {\n\tvar byteOffset;\n\tvar nargs;\n\tvar buf;\n\tvar len;\n\n\tnargs = arguments.length;\n\tif ( !(this instanceof Complex128Array) ) {\n\t\tif ( nargs === 0 ) {\n\t\t\treturn new Complex128Array();\n\t\t}\n\t\tif ( nargs === 1 ) {\n\t\t\treturn new Complex128Array( arguments[0] );\n\t\t}\n\t\tif ( nargs === 2 ) {\n\t\t\treturn new Complex128Array( arguments[0], arguments[1] );\n\t\t}\n\t\treturn new Complex128Array( arguments[0], arguments[1], arguments[2] );\n\t}\n\t// Create the underlying data buffer...\n\tif ( nargs === 0 ) {\n\t\tbuf = new Float64Array( 0 ); // backward-compatibility\n\t} else if ( nargs === 1 ) {\n\t\tif ( isNonNegativeInteger( arguments[0] ) ) {\n\t\t\tbuf = new Float64Array( arguments[0]*2 );\n\t\t} else if ( isCollection( arguments[0] ) ) {\n\t\t\tbuf = arguments[ 0 ];\n\t\t\tlen = buf.length;\n\n\t\t\t// If provided a \"generic\" array, peak at the first value, and, if the value is a complex number, try to process as an array of complex numbers, falling back to \"normal\" typed array initialization if we fail and ensuring consistency if the first value had not been a complex number...\n\t\t\tif ( len && isArray( buf ) && isComplexLike( buf[0] ) ) {\n\t\t\t\tbuf = fromArray( new Float64Array( len*2 ), buf );\n\t\t\t\tif ( buf === null ) {\n\t\t\t\t\t// We failed and we are now forced to allocate a new array :-(\n\t\t\t\t\tif ( !isEven( len ) ) {\n\t\t\t\t\t\tthrow new RangeError( 'invalid argument. Array-like object input arguments must have a length which is a multiple of two. Length: `'+len+'`.' );\n\t\t\t\t\t}\n\t\t\t\t\t// We failed, so fall back to directly setting values...\n\t\t\t\t\tbuf = new Float64Array( arguments[0] );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ( isComplex64Array( buf ) ) {\n\t\t\t\t\tbuf = reinterpret64( buf, 0 );\n\t\t\t\t} else if ( isComplex128Array( buf ) ) {\n\t\t\t\t\tbuf = reinterpret128( buf, 0 );\n\t\t\t\t} else if ( !isEven( len ) ) {\n\t\t\t\t\tthrow new RangeError( 'invalid argument. Array-like object and typed array input arguments must have a length which is a multiple of two. Length: `'+len+'`.' );\n\t\t\t\t}\n\t\t\t\tbuf = new Float64Array( buf );\n\t\t\t}\n\t\t} else if ( isArrayBuffer( arguments[0] ) ) {\n\t\t\tbuf = arguments[ 0 ];\n\t\t\tif ( !isInteger( buf.byteLength/BYTES_PER_ELEMENT ) ) {\n\t\t\t\tthrow new RangeError( 'invalid argument. ArrayBuffer byte length must be a multiple of '+BYTES_PER_ELEMENT+'. Byte length: `'+buf.byteLength+'`.' );\n\t\t\t}\n\t\t\tbuf = new Float64Array( buf );\n\t\t} else if ( isObject( arguments[0] ) ) {\n\t\t\tbuf = arguments[ 0 ];\n\t\t\tif ( HAS_ITERATOR_SYMBOL === false ) {\n\t\t\t\tthrow new TypeError( 'invalid argument. Environment lacks Symbol.iterator support. Must provide a length, ArrayBuffer, typed array, or array-like object. Value: `'+buf+'`.' );\n\t\t\t}\n\t\t\tif ( !isFunction( buf[ ITERATOR_SYMBOL ] ) ) {\n\t\t\t\tthrow new TypeError( 'invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `'+buf+'`.' );\n\t\t\t}\n\t\t\tbuf = buf[ ITERATOR_SYMBOL ]();\n\t\t\tif ( !isFunction( buf.next ) ) {\n\t\t\t\tthrow new TypeError( 'invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable.' );\n\t\t\t}\n\t\t\tbuf = fromIterator( buf );\n\t\t\tif ( buf instanceof Error ) {\n\t\t\t\tthrow buf;\n\t\t\t}\n\t\t\tbuf = new Float64Array( buf );\n\t\t} else {\n\t\t\tthrow new TypeError( 'invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `'+arguments[0]+'`.' );\n\t\t}\n\t} else {\n\t\tbuf = arguments[ 0 ];\n\t\tif ( !isArrayBuffer( buf ) ) {\n\t\t\tthrow new TypeError( 'invalid argument. First argument must be an array buffer. Value: `'+buf+'`.' );\n\t\t}\n\t\tbyteOffset = arguments[ 1 ];\n\t\tif ( !isNonNegativeInteger( byteOffset ) ) {\n\t\t\tthrow new TypeError( 'invalid argument. Byte offset must be a nonnegative integer. Value: `'+byteOffset+'`.' );\n\t\t}\n\t\tif ( !isInteger( byteOffset/BYTES_PER_ELEMENT ) ) {\n\t\t\tthrow new RangeError( 'invalid argument. Byte offset must be a multiple of '+BYTES_PER_ELEMENT+'. Value: `'+byteOffset+'`.' );\n\t\t}\n\t\tif ( nargs === 2 ) {\n\t\t\tlen = buf.byteLength - byteOffset;\n\t\t\tif ( !isInteger( len/BYTES_PER_ELEMENT ) ) {\n\t\t\t\tthrow new RangeError( 'invalid arguments. ArrayBuffer view byte length must be a multiple of '+BYTES_PER_ELEMENT+'. View byte length: `'+len+'`.' );\n\t\t\t}\n\t\t\tbuf = new Float64Array( buf, byteOffset );\n\t\t} else {\n\t\t\tlen = arguments[ 2 ];\n\t\t\tif ( !isNonNegativeInteger( len ) ) {\n\t\t\t\tthrow new TypeError( 'invalid argument. Length must be a nonnegative integer. Value: `'+len+'`.' );\n\t\t\t}\n\t\t\tif ( (len*BYTES_PER_ELEMENT) > (buf.byteLength-byteOffset) ) {\n\t\t\t\tthrow new RangeError( 'invalid arguments. ArrayBuffer has insufficient capacity. Either decrease the array length or provide a bigger buffer. Minimum capacity: `'+(len*BYTES_PER_ELEMENT)+'`.' );\n\t\t\t}\n\t\t\tbuf = new Float64Array( buf, byteOffset, len*2 );\n\t\t}\n\t}\n\tsetReadOnly( this, '_buffer', buf );\n\tsetReadOnly( this, '_length', buf.length/2 );\n\n\treturn this;\n}\n\n/**\n* Size (in bytes) of each array element.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex128Array\n* @readonly\n* @type {PositiveInteger}\n* @default 16\n*\n* @example\n* var nbytes = Complex128Array.BYTES_PER_ELEMENT;\n* // returns 16\n*/\nsetReadOnly( Complex128Array, 'BYTES_PER_ELEMENT', BYTES_PER_ELEMENT );\n\n/**\n* Constructor name.\n*\n* @name name\n* @memberof Complex128Array\n* @readonly\n* @type {string}\n* @default 'Complex128Array'\n*\n* @example\n* var name = Complex128Array.name;\n* // returns 'Complex128Array'\n*/\nsetReadOnly( Complex128Array, 'name', 'Complex128Array' );\n\n/**\n* Creates a new 128-bit complex number array from an array-like object or an iterable.\n*\n* @name from\n* @memberof Complex128Array\n* @type {Function}\n* @param {(Collection|Object)} src - array-like object or iterable\n* @param {Function} [clbk] - callback to invoke for each source element\n* @param {*} [thisArg] - context\n* @throws {TypeError} `this` context must be a constructor\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be an array-like object or an iterable\n* @throws {TypeError} second argument must be a function\n* @throws {RangeError} array-like objects must have a length which is a multiple of two\n* @throws {TypeError} an iterator must return either a two element array containing real and imaginary components or a complex number\n* @throws {TypeError} when provided an iterator, a callback must return either a two element array containing real and imaginary components or a complex number\n* @returns {Complex128Array} 128-bit complex number array\n*\n* @example\n* var arr = Complex128Array.from( [ 1.0, -1.0 ] );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n*\n* var arr = Complex128Array.from( [ new Complex128( 1.0, 1.0 ) ] );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* function clbk( v ) {\n* return new Complex128( real(v)*2.0, imag(v)*2.0 );\n* }\n*\n* var arr = Complex128Array.from( [ new Complex128( 1.0, 1.0 ) ], clbk );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*/\nsetReadOnly( Complex128Array, 'from', function from( src ) {\n\tvar thisArg;\n\tvar nargs;\n\tvar clbk;\n\tvar out;\n\tvar buf;\n\tvar tmp;\n\tvar len;\n\tvar flg;\n\tvar v;\n\tvar i;\n\tvar j;\n\tif ( !isFunction( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` context must be a constructor.' );\n\t}\n\tif ( !isComplexArrayConstructor( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tnargs = arguments.length;\n\tif ( nargs > 1 ) {\n\t\tclbk = arguments[ 1 ];\n\t\tif ( !isFunction( clbk ) ) {\n\t\t\tthrow new TypeError( 'invalid argument. Second argument must be a function. Value: `'+clbk+'`.' );\n\t\t}\n\t\tif ( nargs > 2 ) {\n\t\t\tthisArg = arguments[ 2 ];\n\t\t}\n\t}\n\tif ( isComplexArray( src ) ) {\n\t\tlen = src.length;\n\t\tif ( clbk ) {\n\t\t\tout = new this( len );\n\t\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\t\tj = 0;\n\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\tv = clbk.call( thisArg, src.get( i ), i );\n\t\t\t\tif ( isComplexLike( v ) ) {\n\t\t\t\t\tbuf[ j ] = real( v );\n\t\t\t\t\tbuf[ j+1 ] = imag( v );\n\t\t\t\t} else if ( isArrayLikeObject( v ) && v.length >= 2 ) {\n\t\t\t\t\tbuf[ j ] = v[ 0 ];\n\t\t\t\t\tbuf[ j+1 ] = v[ 1 ];\n\t\t\t\t} else {\n\t\t\t\t\tthrow new TypeError( 'invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `'+v+'`.' );\n\t\t\t\t}\n\t\t\t\tj += 2; // stride\n\t\t\t}\n\t\t\treturn out;\n\t\t}\n\t\treturn new this( src );\n\t}\n\tif ( isCollection( src ) ) {\n\t\tif ( clbk ) {\n\t\t\t// Note: array contents affect how we iterate over a provided data source. If only complex number objects, we can extract real and imaginary components. Otherwise, for non-complex number arrays (e.g., `Float64Array`, etc), we assume a strided array where real and imaginary components are interleaved. In the former case, we expect a callback to return real and imaginary components (possibly as a complex number). In the latter case, we expect a callback to return *either* a real or imaginary component.\n\n\t\t\tlen = src.length;\n\t\t\ttmp = arraylike2object( src );\n\n\t\t\t// Detect whether we've been provided an array which returns complex number objects...\n\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\tif ( !isComplexLike( tmp.getter( src, i ) ) ) {\n\t\t\t\t\tflg = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// If an array does not contain only complex number objects, then we assume interleaved real and imaginary components...\n\t\t\tif ( flg ) {\n\t\t\t\tif ( !isEven( len ) ) {\n\t\t\t\t\tthrow new RangeError( 'invalid argument. First argument must have a length which is a multiple of two. Length: `'+len+'`.' );\n\t\t\t\t}\n\t\t\t\tout = new this( len/2 );\n\t\t\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\t\tbuf[ i ] = clbk.call( thisArg, tmp.getter( src, i ), i );\n\t\t\t\t}\n\t\t\t\treturn out;\n\t\t\t}\n\t\t\t// If an array contains only complex number objects, then we need to extract real and imaginary components...\n\t\t\tout = new this( len );\n\t\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\t\tj = 0;\n\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\tv = clbk.call( thisArg, tmp.getter( src, i ), i );\n\t\t\t\tif ( isComplexLike( v ) ) {\n\t\t\t\t\tbuf[ j ] = real( v );\n\t\t\t\t\tbuf[ j+1 ] = imag( v );\n\t\t\t\t} else if ( isArrayLikeObject( v ) && v.length >= 2 ) {\n\t\t\t\t\tbuf[ j ] = v[ 0 ];\n\t\t\t\t\tbuf[ j+1 ] = v[ 1 ];\n\t\t\t\t} else {\n\t\t\t\t\tthrow new TypeError( 'invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `'+v+'`.' );\n\t\t\t\t}\n\t\t\t\tj += 2; // stride\n\t\t\t}\n\t\t\treturn out;\n\t\t}\n\t\treturn new this( src );\n\t}\n\tif ( isObject( src ) && HAS_ITERATOR_SYMBOL && isFunction( src[ ITERATOR_SYMBOL ] ) ) { // eslint-disable-line max-len\n\t\tbuf = src[ ITERATOR_SYMBOL ]();\n\t\tif ( !isFunction( buf.next ) ) {\n\t\t\tthrow new TypeError( 'invalid argument. First argument must be an array-like object or an iterable.' );\n\t\t}\n\t\tif ( clbk ) {\n\t\t\ttmp = fromIteratorMap( buf, clbk, thisArg );\n\t\t} else {\n\t\t\ttmp = fromIterator( buf );\n\t\t}\n\t\tif ( tmp instanceof Error ) {\n\t\t\tthrow tmp;\n\t\t}\n\t\tlen = tmp.length / 2;\n\t\tout = new this( len );\n\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\tbuf[ i ] = tmp[ i ];\n\t\t}\n\t\treturn out;\n\t}\n\tthrow new TypeError( 'invalid argument. First argument must be an array-like object or an iterable. Value: `'+src+'`.' );\n});\n\n/**\n* Creates a new 128-bit complex number array from a variable number of arguments.\n*\n* @name of\n* @memberof Complex128Array\n* @type {Function}\n* @param {...*} element - array elements\n* @throws {TypeError} `this` context must be a constructor\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Complex128Array} 128-bit complex number array\n*\n* @example\n* var arr = Complex128Array.of( 1.0, 1.0, 1.0, 1.0 );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*/\nsetReadOnly( Complex128Array, 'of', function of() {\n\tvar args;\n\tvar i;\n\tif ( !isFunction( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` context must be a constructor.' );\n\t}\n\tif ( !isComplexArrayConstructor( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\targs = [];\n\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\targs.push( arguments[ i ] );\n\t}\n\treturn new this( args );\n});\n\n/**\n* Pointer to the underlying data buffer.\n*\n* @name buffer\n* @memberof Complex128Array.prototype\n* @readonly\n* @type {ArrayBuffer}\n*\n* @example\n* var arr = new Complex128Array( 10 );\n*\n* var buf = arr.buffer;\n* // returns \n*/\nsetReadOnlyAccessor( Complex128Array.prototype, 'buffer', function get() {\n\treturn this._buffer.buffer;\n});\n\n/**\n* Size (in bytes) of the array.\n*\n* @name byteLength\n* @memberof Complex128Array.prototype\n* @readonly\n* @type {NonNegativeInteger}\n*\n* @example\n* var arr = new Complex128Array( 10 );\n*\n* var byteLength = arr.byteLength;\n* // returns 160\n*/\nsetReadOnlyAccessor( Complex128Array.prototype, 'byteLength', function get() {\n\treturn this._buffer.byteLength;\n});\n\n/**\n* Offset (in bytes) of the array from the start of its underlying `ArrayBuffer`.\n*\n* @name byteOffset\n* @memberof Complex128Array.prototype\n* @readonly\n* @type {NonNegativeInteger}\n*\n* @example\n* var arr = new Complex128Array( 10 );\n*\n* var byteOffset = arr.byteOffset;\n* // returns 0\n*/\nsetReadOnlyAccessor( Complex128Array.prototype, 'byteOffset', function get() {\n\treturn this._buffer.byteOffset;\n});\n\n/**\n* Size (in bytes) of each array element.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex128Array.prototype\n* @readonly\n* @type {PositiveInteger}\n* @default 16\n*\n* @example\n* var arr = new Complex128Array( 10 );\n*\n* var nbytes = arr.BYTES_PER_ELEMENT;\n* // returns 16\n*/\nsetReadOnly( Complex128Array.prototype, 'BYTES_PER_ELEMENT', Complex128Array.BYTES_PER_ELEMENT );\n\n/**\n* Copies a sequence of elements within the array to the position starting at `target`.\n*\n* @name copyWithin\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {integer} target - index at which to start copying elements\n* @param {integer} start - source index at which to copy elements from\n* @param {integer} [end] - source index at which to stop copying elements from\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Complex128Array} modified array\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* var arr = new Complex128Array( 4 );\n*\n* // Set the array elements:\n* arr.set( new Complex128( 1.0, 1.0 ), 0 );\n* arr.set( new Complex128( 2.0, 2.0 ), 1 );\n* arr.set( new Complex128( 3.0, 3.0 ), 2 );\n* arr.set( new Complex128( 4.0, 4.0 ), 3 );\n*\n* // Copy the first two elements to the last two elements:\n* arr.copyWithin( 2, 0, 2 );\n*\n* // Get the last array element:\n* var z = arr.get( 3 );\n*\n* var re = real( z );\n* // returns 2.0\n*\n* var im = imag( z );\n* // returns 2.0\n*/\nsetReadOnly( Complex128Array.prototype, 'copyWithin', function copyWithin( target, start ) {\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\t// FIXME: prefer a functional `copyWithin` implementation which addresses lack of universal browser support (e.g., IE11 and Safari) or ensure that typed arrays are polyfilled\n\tif ( arguments.length === 2 ) {\n\t\tthis._buffer.copyWithin( target*2, start*2 );\n\t} else {\n\t\tthis._buffer.copyWithin( target*2, start*2, arguments[2]*2 );\n\t}\n\treturn this;\n});\n\n/**\n* Returns an iterator for iterating over array key-value pairs.\n*\n* @name entries\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Iterator} iterator\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n*\n* var arr = [\n* new Complex128( 1.0, 1.0 ),\n* new Complex128( 2.0, 2.0 ),\n* new Complex128( 3.0, 3.0 )\n* ];\n* arr = new Complex128Array( arr );\n*\n* // Create an iterator:\n* var it = arr.entries();\n*\n* // Iterate over the key-value pairs...\n* var v = it.next().value;\n* // returns [ 0, ]\n*\n* v = it.next().value;\n* // returns [ 1, ]\n*\n* v = it.next().value;\n* // returns [ 2, ]\n*\n* var bool = it.next().done;\n* // returns true\n*/\nsetReadOnly( Complex128Array.prototype, 'entries', function entries() {\n\tvar buffer;\n\tvar self;\n\tvar iter;\n\tvar len;\n\tvar FLG;\n\tvar i;\n\tvar j;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tself = this;\n\tbuffer = this._buffer;\n\tlen = this._length;\n\n\t// Initialize the iteration indices:\n\ti = -1;\n\tj = -2;\n\n\t// Create an iterator protocol-compliant object:\n\titer = {};\n\tsetReadOnly( iter, 'next', next );\n\tsetReadOnly( iter, 'return', end );\n\n\tif ( ITERATOR_SYMBOL ) {\n\t\tsetReadOnly( iter, ITERATOR_SYMBOL, factory );\n\t}\n\treturn iter;\n\n\t/**\n\t* Returns an iterator protocol-compliant object containing the next iterated value.\n\t*\n\t* @private\n\t* @returns {Object} iterator protocol-compliant object\n\t*/\n\tfunction next() {\n\t\tvar z;\n\t\ti += 1;\n\t\tif ( FLG || i >= len ) {\n\t\t\treturn {\n\t\t\t\t'done': true\n\t\t\t};\n\t\t}\n\t\tj += 2;\n\t\tz = new Complex128( buffer[ j ], buffer[ j+1 ] );\n\t\treturn {\n\t\t\t'value': [ i, z ],\n\t\t\t'done': false\n\t\t};\n\t}\n\n\t/**\n\t* Finishes an iterator.\n\t*\n\t* @private\n\t* @param {*} [value] - value to return\n\t* @returns {Object} iterator protocol-compliant object\n\t*/\n\tfunction end( value ) {\n\t\tFLG = true;\n\t\tif ( arguments.length ) {\n\t\t\treturn {\n\t\t\t\t'value': value,\n\t\t\t\t'done': true\n\t\t\t};\n\t\t}\n\t\treturn {\n\t\t\t'done': true\n\t\t};\n\t}\n\n\t/**\n\t* Returns a new iterator.\n\t*\n\t* @private\n\t* @returns {Iterator} iterator\n\t*/\n\tfunction factory() {\n\t\treturn self.entries();\n\t}\n});\n\n/**\n* Returns an array element.\n*\n* @name get\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {NonNegativeInteger} idx - element index\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} must provide a nonnegative integer\n* @returns {(Complex128|void)} array element\n*\n* @example\n* var arr = new Complex128Array( 10 );\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* var z = arr.get( 0 );\n* // returns \n*\n* var re = real( z );\n* // returns 0.0\n*\n* var im = imag( z );\n* // returns 0.0\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n*\n* z = arr.get( 0 );\n* // returns \n*\n* re = real( z );\n* // returns 1.0\n*\n* im = imag( z );\n* // returns -1.0\n*\n* z = arr.get( 100 );\n* // returns undefined\n*/\nsetReadOnly( Complex128Array.prototype, 'get', function get( idx ) {\n\tvar buf;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isNonNegativeInteger( idx ) ) {\n\t\tthrow new TypeError( 'invalid argument. Must provide a nonnegative integer. Value: `'+idx+'`.' );\n\t}\n\tif ( idx >= this._length ) {\n\t\treturn;\n\t}\n\tbuf = this._buffer;\n\tidx *= 2;\n\treturn new Complex128( buf[ idx ], buf[ idx+1 ] );\n});\n\n/**\n* Number of array elements.\n*\n* @name length\n* @memberof Complex128Array.prototype\n* @readonly\n* @type {NonNegativeInteger}\n*\n* @example\n* var arr = new Complex128Array( 10 );\n*\n* var len = arr.length;\n* // returns 10\n*/\nsetReadOnlyAccessor( Complex128Array.prototype, 'length', function get() {\n\treturn this._length;\n});\n\n/**\n* Sets an array element.\n*\n* ## Notes\n*\n* - When provided a typed array, real or complex, we must check whether the source array shares the same buffer as the target array and whether the underlying memory overlaps. In particular, we are concerned with the following scenario:\n*\n* ```text\n* buf: ---------------------\n* src: ---------------------\n* ```\n*\n* In the above, as we copy values from `src`, we will overwrite values in the `src` view, resulting in duplicated values copied into the end of `buf`, which is not intended. Hence, to avoid overwriting source values, we must **copy** source values to a temporary array.\n*\n* In the other overlapping scenario,\n*\n* ```text\n* buf: ---------------------\n* src: ---------------------\n* ```\n*\n* by the time we begin copying into the overlapping region, we are copying from the end of `src`, a non-overlapping region, which means we don't run the risk of copying copied values, rather than the original `src` values as intended.\n*\n*\n* @name set\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {(Collection|Complex|ComplexArray)} value - value(s)\n* @param {NonNegativeInteger} [i=0] - element index at which to start writing values\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be either a complex number, an array-like object, or a complex number array\n* @throws {TypeError} index argument must be a nonnegative integer\n* @throws {RangeError} array-like objects must have a length which is a multiple of two\n* @throws {RangeError} index argument is out-of-bounds\n* @throws {RangeError} target array lacks sufficient storage to accommodate source values\n* @returns {void}\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* var arr = new Complex128Array( 10 );\n*\n* var z = arr.get( 0 );\n* // returns \n*\n* var re = real( z );\n* // returns 0.0\n*\n* var im = imag( z );\n* // returns 0.0\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n*\n* z = arr.get( 0 );\n* // returns \n*\n* re = real( z );\n* // returns 1.0\n*\n* im = imag( z );\n* // returns -1.0\n*/\nsetReadOnly( Complex128Array.prototype, 'set', function set( value ) {\n\t/* eslint-disable no-underscore-dangle */\n\tvar sbuf;\n\tvar idx;\n\tvar buf;\n\tvar tmp;\n\tvar flg;\n\tvar N;\n\tvar v;\n\tvar i;\n\tvar j;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tbuf = this._buffer;\n\tif ( arguments.length > 1 ) {\n\t\tidx = arguments[ 1 ];\n\t\tif ( !isNonNegativeInteger( idx ) ) {\n\t\t\tthrow new TypeError( 'invalid argument. Index argument must be a nonnegative integer. Value: `'+idx+'`.' );\n\t\t}\n\t} else {\n\t\tidx = 0;\n\t}\n\tif ( isComplexLike( value ) ) {\n\t\tif ( idx >= this._length ) {\n\t\t\tthrow new RangeError( 'invalid argument. Index argument is out-of-bounds. Value: `'+idx+'`.' );\n\t\t}\n\t\tidx *= 2;\n\t\tbuf[ idx ] = real( value );\n\t\tbuf[ idx+1 ] = imag( value );\n\t\treturn;\n\t}\n\tif ( isComplexArray( value ) ) {\n\t\tN = value._length;\n\t\tif ( idx+N > this._length ) {\n\t\t\tthrow new RangeError( 'invalid arguments. Target array lacks sufficient storage to accommodate source values.' );\n\t\t}\n\t\tsbuf = value._buffer;\n\n\t\t// Check for overlapping memory...\n\t\tj = buf.byteOffset + (idx*BYTES_PER_ELEMENT);\n\t\tif (\n\t\t\tsbuf.buffer === buf.buffer &&\n\t\t\t(\n\t\t\t\tsbuf.byteOffset < j &&\n\t\t\t\tsbuf.byteOffset+sbuf.byteLength > j\n\t\t\t)\n\t\t) {\n\t\t\t// We need to copy source values...\n\t\t\ttmp = new Float64Array( sbuf.length );\n\t\t\tfor ( i = 0; i < sbuf.length; i++ ) {\n\t\t\t\ttmp[ i ] = sbuf[ i ];\n\t\t\t}\n\t\t\tsbuf = tmp;\n\t\t}\n\t\tidx *= 2;\n\t\tj = 0;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\tbuf[ idx ] = sbuf[ j ];\n\t\t\tbuf[ idx+1 ] = sbuf[ j+1 ];\n\t\t\tidx += 2; // stride\n\t\t\tj += 2; // stride\n\t\t}\n\t\treturn;\n\t}\n\tif ( isCollection( value ) ) {\n\t\t// Detect whether we've been provided an array of complex numbers...\n\t\tN = value.length;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\tif ( !isComplexLike( value[ i ] ) ) {\n\t\t\t\tflg = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t// If an array does not contain only complex numbers, then we assume interleaved real and imaginary components...\n\t\tif ( flg ) {\n\t\t\tif ( !isEven( N ) ) {\n\t\t\t\tthrow new RangeError( 'invalid argument. Array-like object arguments must have a length which is a multiple of two. Length: `'+N+'`.' );\n\t\t\t}\n\t\t\tif ( idx+(N/2) > this._length ) {\n\t\t\t\tthrow new RangeError( 'invalid arguments. Target array lacks sufficient storage to accommodate source values.' );\n\t\t\t}\n\t\t\tsbuf = value;\n\n\t\t\t// Check for overlapping memory...\n\t\t\tj = buf.byteOffset + (idx*BYTES_PER_ELEMENT);\n\t\t\tif (\n\t\t\t\tsbuf.buffer === buf.buffer &&\n\t\t\t\t(\n\t\t\t\t\tsbuf.byteOffset < j &&\n\t\t\t\t\tsbuf.byteOffset+sbuf.byteLength > j\n\t\t\t\t)\n\t\t\t) {\n\t\t\t\t// We need to copy source values...\n\t\t\t\ttmp = new Float64Array( N );\n\t\t\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\t\t\ttmp[ i ] = sbuf[ i ];\n\t\t\t\t}\n\t\t\t\tsbuf = tmp;\n\t\t\t}\n\t\t\tidx *= 2;\n\t\t\tN /= 2;\n\t\t\tj = 0;\n\t\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\t\tbuf[ idx ] = sbuf[ j ];\n\t\t\t\tbuf[ idx+1 ] = sbuf[ j+1 ];\n\t\t\t\tidx += 2; // stride\n\t\t\t\tj += 2; // stride\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\t// If an array contains only complex numbers, then we need to extract real and imaginary components...\n\t\tif ( idx+N > this._length ) {\n\t\t\tthrow new RangeError( 'invalid arguments. Target array lacks sufficient storage to accommodate source values.' );\n\t\t}\n\t\tidx *= 2;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\tv = value[ i ];\n\t\t\tbuf[ idx ] = real( v );\n\t\t\tbuf[ idx+1 ] = imag( v );\n\t\t\tidx += 2; // stride\n\t\t}\n\t\treturn;\n\t}\n\tthrow new TypeError( 'invalid argument. First argument must be either a complex number, an array-like object, or a complex number array. Value: `'+value+'`.' );\n\n\t/* eslint-enable no-underscore-dangle */\n});\n\n\n// EXPORTS //\n\nexport default Complex128Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport Float64Array from '@stdlib/array-float64';\nimport Float32Array from '@stdlib/array-float32';\nimport Int16Array from '@stdlib/array-int16';\nimport Int32Array from '@stdlib/array-int32';\nimport Int8Array from '@stdlib/array-int8';\nimport Uint16Array from '@stdlib/array-uint16';\nimport Uint32Array from '@stdlib/array-uint32';\nimport Uint8Array from '@stdlib/array-uint8';\nimport Uint8ClampedArray from '@stdlib/array-uint8c';\nimport Complex64Array from '@stdlib/array-complex64';\nimport Complex128Array from '@stdlib/array-complex128';\n\n\n// MAIN //\n\n// Mapping from data types to constructors...\nvar ctors = {\n\t'float64': Float64Array,\n\t'float32': Float32Array,\n\t'generic': Array, // TODO: replace with `stdlib` pkg\n\t'int16': Int16Array,\n\t'int32': Int32Array,\n\t'int8': Int8Array,\n\t'uint16': Uint16Array,\n\t'uint32': Uint32Array,\n\t'uint8': Uint8Array,\n\t'uint8c': Uint8ClampedArray,\n\t'complex64': Complex64Array,\n\t'complex128': Complex128Array\n};\n\n\n// EXPORTS //\n\nexport default ctors;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport table from './ctors.js';\n\n\n// MAIN //\n\n/**\n* Returns an array constructor.\n*\n* @param {string} dtype - data type\n* @returns {(Function|null)} constructor or null\n*\n* @example\n* var ctor = ctors( 'float64' );\n* // returns \n*\n* @example\n* var ctor = ctors( 'float' );\n* // returns null\n*/\nfunction ctors( dtype ) {\n\treturn table[ dtype ] || null;\n}\n\n\n// EXPORTS //\n\nexport default ctors;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport filled from '@stdlib/array-base-filled';\n\n\n// MAIN //\n\n/**\n* Returns a zero-filled \"generic\" array.\n*\n* @param {NonNegativeInteger} len - array length\n* @returns {Array} output array\n*\n* @example\n* var out = zeros( 3 );\n* // returns [ 0.0, 0.0, 0.0 ]\n*/\nfunction zeros( len ) {\n\treturn filled( 0.0, len );\n}\n\n\n// EXPORTS //\n\nexport default zeros;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Returns a filled \"generic\" array.\n*\n* @param {*} value - fill value\n* @param {NonNegativeInteger} len - array length\n* @returns {Array} filled array\n*\n* @example\n* var out = filled( 0.0, 3 );\n* // returns [ 0.0, 0.0, 0.0 ]\n*\n* @example\n* var out = filled( 'beep', 3 );\n* // returns [ 'beep', 'beep', 'beep' ]\n*/\nfunction filled( value, len ) {\n\tvar arr;\n\tvar i;\n\n\t// Manually push elements in order to ensure \"fast\" elements...\n\tarr = [];\n\tfor ( i = 0; i < len; i++ ) {\n\t\tarr.push( value );\n\t}\n\treturn arr;\n}\n\n\n// EXPORTS //\n\nexport default filled;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isNonNegativeInteger } from '@stdlib/assert-is-nonnegative-integer';\nimport ctors from '@stdlib/array-ctors';\nimport gzeros from '@stdlib/array-base-zeros';\n\n\n// MAIN //\n\n/**\n* Creates a zero-filled array having a specified length.\n*\n* @param {NonNegativeInteger} length - array length\n* @param {string} [dtype=\"float64\"] - data type\n* @throws {TypeError} first argument must be a nonnegative integer\n* @throws {TypeError} second argument must be a recognized data type\n* @returns {(TypedArray|Array|ComplexArray)} array or typed array\n*\n* @example\n* var arr = zeros( 2 );\n* // returns [ 0.0, 0.0 ]\n*\n* @example\n* var arr = zeros( 2, 'float32' );\n* // returns [ 0.0, 0.0 ]\n*/\nfunction zeros( length ) {\n\tvar dtype;\n\tvar ctor;\n\tif ( !isNonNegativeInteger( length ) ) {\n\t\tthrow new TypeError( 'invalid argument. First argument must be a nonnegative integer. Value: `' + length + '`.' );\n\t}\n\tif ( arguments.length > 1 ) {\n\t\tdtype = arguments[ 1 ];\n\t} else {\n\t\tdtype = 'float64';\n\t}\n\tif ( dtype === 'generic' ) {\n\t\treturn gzeros( length );\n\t}\n\tctor = ctors( dtype );\n\tif ( ctor === null ) {\n\t\tthrow new TypeError( 'invalid argument. Second argument must be a recognized data type. Value: `' + dtype + '`.' );\n\t}\n\treturn new ctor( length ); // WARNING: we assume that, apart from 'generic', the constructors for supported array data types are zero-filled by default\n}\n\n\n// EXPORTS //\n\nexport default zeros;\n","/**\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// MODULES //\n\nimport zeros from '@stdlib/array-zeros';\n\n\n// MAIN //\n\n/**\n* Creates an uninitialized array having a specified length.\n*\n* @private\n* @param {NonNegativeInteger} length - array length\n* @param {string} [dtype=\"float64\"] - data type\n* @throws {TypeError} first argument must be a nonnegative integer\n* @throws {TypeError} second argument must be a recognized data type\n* @returns {(TypedArray|Array|ComplexArray)} array or typed array\n*\n* @example\n* var arr = empty( 2 );\n* // returns \n*\n* @example\n* var arr = empty( 2, 'float32' );\n* // returns \n*/\nfunction empty( length ) {\n\tif ( arguments.length > 1 ) {\n\t\treturn zeros( length, arguments[ 1 ] );\n\t}\n\treturn zeros( length );\n}\n\n\n// EXPORTS //\n\nexport default empty;\n"],"names":["main","Object","defineProperty","objectProtoype","prototype","toStr","toString","defineGetter","__defineGetter__","defineSetter","__defineSetter__","lookupGetter","__lookupGetter__","lookupSetter","__lookupSetter__","err","hasDefinePropertySupport","builtin","obj","prop","descriptor","hasValue","hasGet","hasSet","call","TypeError","__proto__","value","Error","get","set","defineProperty$1","setNonEnumerableReadOnly","configurable","enumerable","writable","isNumber","FLG","Symbol","hasToStringTagSupport","toStringTag","has","hasOwnProperty","hasOwnProp","property","toStrTag","nativeClass$1","hasToStringTag","v","isOwn","tag","out","Number$1","Number","test","nativeClass","isPrimitive","isObject","setReadOnly","FLOAT64_PINF","POSITIVE_INFINITY","FLOAT64_NINF","NEGATIVE_INFINITY","floor","Math","isInteger","x","PINF","NINF","isInt","valueOf","isNonNegativeInteger","hasFloat64Array","Float64Array","ctor","Float64Array$1","bool","arr","GlobalFloat64Array","NaN","hasFloat64ArraySupport","hasFloat32Array","Float32Array","Float32Array$1","GlobalFloat32Array","hasFloat32ArraySupport","hasInt16Array","Int16Array","Int16Array$1","GlobalInt16Array","INT16_MAX","hasInt16ArraySupport","hasInt32Array","Int32Array","Int32Array$1","GlobalInt32Array","INT32_MAX","hasInt32ArraySupport","hasInt8Array","Int8Array","Int8Array$1","GlobalInt8Array","INT8_MAX","hasInt8ArraySupport","hasUint16Array","Uint16Array","Uint16Array$1","GlobalUint16Array","UINT16_MAX","hasUint16ArraySupport","hasUint32Array","Uint32Array","Uint32Array$1","GlobalUint32Array","UINT32_MAX","hasUint32ArraySupport","hasUint8Array","Uint8Array","Uint8Array$1","GlobalUint8Array","UINT8_MAX","hasUint8ArraySupport","hasUint8ClampedArray","Uint8ClampedArray","Uint8ClampedArray$1","GlobalUint8ClampedArray","hasUint8ClampedArraySupport","isArrayLikeObject","length","isCollection","hasArrayBuffer","ArrayBuffer","isArrayBuffer","isArray$1","Array","isArray","RE","isBoolean","Boolean","getGlobal","Function","self","window","global","root","codegen","arguments","getThis","Self","Win","Global","nodeList","document","childNodes","typedarray","reFunctionName","RE_FUNCTION_NAME","isObjectLike","constructorName","match","name","slice","constructor","exec","_isBuffer","isBuffer","REGEXP","predicate","len","i","arrayfun","ctorName","toLowerCase","type","isFunction","typeOf","Complex128","real","imag","this","str","re","im","fround","FLOAT32_VIEW","float64ToFloat32$1","Complex64","float64ToFloat32","isComplexLike","isEven","hasIteratorSymbolSupport","iterator","IteratorSymbol","setNonEnumerableReadOnlyAccessor","getter","realf","z","imagf","reinterpret","offset","buffer","byteOffset","BYTES_PER_ELEMENT","idx","setter","arraylike2object","data","accessors","getAccessor","getIndexed","setAccessor","setIndexed","fromIterator","it","next","done","push","fromIteratorMap","clbk","thisArg","fromArray","buf","j","HAS_ITERATOR_SYMBOL","isComplexArray","Complex64Array","_length","_buffer","isComplexArrayConstructor","isComplex64Array","isComplex128Array","nargs","RangeError","reinterpret64","reinterpret128","byteLength","ITERATOR_SYMBOL","src","tmp","flg","args","setReadOnlyAccessor","target","start","copyWithin","iter","entries","sbuf","N","Complex128Array","ctors","float64","float32","generic","int16","int32","int8","uint16","uint32","uint8","uint8c","complex64","complex128","dtype","table","zeros","filled","gzeros","empty"],"mappings":";;AAsBA,IAAIA,EAA0C,mBAA1BC,OAAOC,eAAkCD,OAAOC,eAAiB,KCiCrF,ICRIA,EDQAA,EAAiBD,OAAOC,eE/BxBC,EAAiBF,OAAOG,UACxBC,EAAQF,EAAeG,SACvBC,EAAeJ,EAAeK,iBAC9BC,EAAeN,EAAeO,iBAC9BC,EAAeR,EAAeS,iBAC9BC,EAAeV,EAAeW,iBDsBjCZ,EEdD,WAEC,IAEC,OADAA,EAAgB,CAAE,EAAE,IAAK,CAAA,IAClB,CAGP,CAFC,MAAQa,GACT,OAAO,CACP,CACF,CFGKC,GACaC,ECgBlB,SAAyBC,EAAKC,EAAMC,GACnC,IAAIhB,EACAiB,EACAC,EACAC,EAEJ,GAAoB,iBAARL,GAA4B,OAARA,GAAsC,mBAAtBb,EAAMmB,KAAMN,GAC3D,MAAM,IAAIO,UAAW,+DAAiEP,EAAM,MAE7F,GAA2B,iBAAfE,GAA0C,OAAfA,GAAoD,mBAA7Bf,EAAMmB,KAAMJ,GACzE,MAAM,IAAIK,UAAW,oEAAsEL,EAAa,MAyBzG,IAvBAC,EAAa,UAA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AASiG,GAAOzI,GACf,IAAIuI,EACA7L,EACJ,IAAMH,EAAsByD,GAC3B,MAAM,IAAIvG,UAAW,2EAA6EuG,EAAS,MAO5G,GAAe,aAJduI,EADIrH,UAAUlB,OAAS,EACfkB,UAAW,GAEX,WAGR,OAAOyH,GAAQ3I,GAGhB,GAAc,QADdtD,EAAOgL,GAAOa,IAEb,MAAM,IAAI9O,UAAW,6EAA+E8O,EAAQ,MAE7G,OAAO,IAAI7L,EAAMsD,EAClB,CCpBA,SAAS4I,GAAO5I,GACf,OAAKkB,UAAUlB,OAAS,EAChByI,GAAOzI,EAAQkB,UAAW,IAE3BuH,GAAOzI,EACf"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index 4208446..0000000 --- a/stats.html +++ /dev/null @@ -1,6177 +0,0 @@ - - - - - - - - Rollup Visualizer - - - -
- - - - - From 0dd37e0a43a5bf70bfb4b5fe86a09c92ef233cd3 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sun, 24 Sep 2023 17:38:11 +0000 Subject: [PATCH 13/75] Auto-generated commit --- .editorconfig | 186 - .eslintrc.js | 1 - .gitattributes | 49 - .github/PULL_REQUEST_TEMPLATE.md | 7 - .github/workflows/benchmark.yml | 62 - .github/workflows/cancel.yml | 56 - .github/workflows/close_pull_requests.yml | 44 - .github/workflows/examples.yml | 62 - .github/workflows/npm_downloads.yml | 108 - .github/workflows/productionize.yml | 783 --- .github/workflows/publish.yml | 242 - .github/workflows/test.yml | 97 - .github/workflows/test_bundles.yml | 180 - .github/workflows/test_coverage.yml | 123 - .github/workflows/test_install.yml | 83 - .gitignore | 188 - .npmignore | 227 - .npmrc | 28 - CHANGELOG.md | 5 - CITATION.cff | 30 - CODE_OF_CONDUCT.md | 3 - CONTRIBUTING.md | 3 - Makefile | 534 -- README.md | 24 +- benchmark/benchmark.js | 264 - benchmark/benchmark.length.complex128.js | 93 - benchmark/benchmark.length.complex64.js | 93 - benchmark/benchmark.length.float32.js | 93 - benchmark/benchmark.length.float64.js | 93 - benchmark/benchmark.length.generic.js | 93 - benchmark/benchmark.length.int16.js | 93 - benchmark/benchmark.length.int32.js | 93 - benchmark/benchmark.length.int8.js | 93 - benchmark/benchmark.length.uint16.js | 93 - benchmark/benchmark.length.uint32.js | 93 - benchmark/benchmark.length.uint8.js | 93 - benchmark/benchmark.length.uint8c.js | 93 - branches.md | 53 - dist/index.d.ts | 3 - dist/index.js | 9 - dist/index.js.map | 7 - docs/repl.txt | 52 - docs/types/test.ts | 77 - examples/index.js | 33 - lib/index.js | 58 - lib/is_buffer_uint8array.js | 47 - lib/main.js | 101 - lib/polyfill.js | 56 - docs/types/index.d.ts => mod.d.ts | 2 +- mod.js | 4 + mod.js.map | 1 + package.json | 80 +- stats.html | 6177 +++++++++++++++++++++ test/test.js | 60 - test/test.main.js | 274 - test/test.polyfill.js | 324 -- 56 files changed, 6189 insertions(+), 5734 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 benchmark/benchmark.js delete mode 100644 benchmark/benchmark.length.complex128.js delete mode 100644 benchmark/benchmark.length.complex64.js delete mode 100644 benchmark/benchmark.length.float32.js delete mode 100644 benchmark/benchmark.length.float64.js delete mode 100644 benchmark/benchmark.length.generic.js delete mode 100644 benchmark/benchmark.length.int16.js delete mode 100644 benchmark/benchmark.length.int32.js delete mode 100644 benchmark/benchmark.length.int8.js delete mode 100644 benchmark/benchmark.length.uint16.js delete mode 100644 benchmark/benchmark.length.uint32.js delete mode 100644 benchmark/benchmark.length.uint8.js delete mode 100644 benchmark/benchmark.length.uint8c.js 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/repl.txt delete mode 100644 docs/types/test.ts delete mode 100644 examples/index.js delete mode 100644 lib/index.js delete mode 100644 lib/is_buffer_uint8array.js delete mode 100644 lib/main.js delete mode 100644 lib/polyfill.js rename docs/types/index.d.ts => mod.d.ts (99%) create mode 100644 mod.js create mode 100644 mod.js.map create mode 100644 stats.html delete mode 100644 test/test.js delete mode 100644 test/test.main.js delete mode 100644 test/test.polyfill.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 96f81a8..0000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,7 +0,0 @@ - - -We are excited about your pull request, but unfortunately we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/empty) of the main repository where we’ll review and provide feedback. - -If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. You may also consult the [development guide](https://github.com/stdlib-js/stdlib/blob/develop/docs/development.md) for help on developing stdlib. - -We look forward to receiving your contribution! :smiley: \ No newline at end of file diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml deleted file mode 100644 index 06a9a75..0000000 --- a/.github/workflows/benchmark.yml +++ /dev/null @@ -1,62 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: benchmark - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run benchmarks: - benchmark: - - # Define a display name: - name: 'Run benchmarks' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - uses: actions/checkout@v3 - - # Install Node.js: - - name: 'Install Node.js' - uses: actions/setup-node@v3 - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run benchmarks: - - name: 'Run benchmarks' - run: | - npm run benchmark diff --git a/.github/workflows/cancel.yml b/.github/workflows/cancel.yml deleted file mode 100644 index a00dbe5..0000000 --- a/.github/workflows/cancel.yml +++ /dev/null @@ -1,56 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: cancel - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to cancel existing workflow runs: - cancel: - - # Define a display name: - name: 'Cancel workflow runs' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Time limit: - timeout-minutes: 3 - - # Define the sequence of job steps... - steps: - - # Cancel existing workflow runs: - - name: 'Cancel existing workflow runs' - uses: styfle/cancel-workflow-action@0.11.0 - with: - workflow_id: >- - benchmark.yml, - examples.yml, - test.yml, - test_coverage.yml, - test_install.yml, - publish.yml - access_token: ${{ github.token }} diff --git a/.github/workflows/close_pull_requests.yml b/.github/workflows/close_pull_requests.yml deleted file mode 100644 index 38d3aa3..0000000 --- a/.github/workflows/close_pull_requests.yml +++ /dev/null @@ -1,44 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: close_pull_requests - -# Workflow triggers: -on: - pull_request_target: - types: [opened] - -# Workflow jobs: -jobs: - run: - runs-on: ubuntu-latest - steps: - - uses: superbrothers/close-pull-request@v3 - with: - comment: | - Thank you for submitting a pull request. :raised_hands: - - We greatly appreciate your willingness to submit a contribution. However, we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). - - We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/empty) of the main repository where we’ll review and provide feedback. If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. - - Thank you again, and we look forward to receiving your contribution! :smiley: - - Best, - The stdlib team \ No newline at end of file diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml deleted file mode 100644 index 7902a7d..0000000 --- a/.github/workflows/examples.yml +++ /dev/null @@ -1,62 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: examples - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run the package examples... - examples: - - # Define display name: - name: 'Run examples' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout the repository' - uses: actions/checkout@v3 - - # Install Node.js: - - name: 'Install Node.js' - uses: actions/setup-node@v3 - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run examples: - - name: 'Run examples' - run: | - npm run examples diff --git a/.github/workflows/npm_downloads.yml b/.github/workflows/npm_downloads.yml deleted file mode 100644 index 32477d3..0000000 --- a/.github/workflows/npm_downloads.yml +++ /dev/null @@ -1,108 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: npm_downloads - -# Workflow triggers: -on: - # Run this workflow weekly: - schedule: - # cron: ' ' - - cron: '49 1 * * 5' - - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job for retrieving npm download counts... - npm_downloads: - - # Define display name: - name: 'Retrieve npm download counts' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - uses: actions/checkout@v3 - timeout-minutes: 10 - - # Install Node.js: - - name: 'Install Node.js' - uses: actions/setup-node@v3 - with: - node-version: 16 - timeout-minutes: 5 - - # Resolve package name: - - name: 'Resolve package name' - id: package_name - run: | - name=`node -e 'console.log(require("./package.json").name)' | tr -d '\n'` - echo "package_name=$name" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Fetch download data: - - name: 'Fetch data' - id: download_data - run: | - url="https://api.npmjs.org/downloads/range/$(date --date='1 year ago' '+%Y-%m-%d'):$(date '+%Y-%m-%d')/${{ steps.package_name.outputs.package_name }}" - echo "$url" - data=$(curl "$url") - mkdir ./tmp - echo "$data" > ./tmp/npm_downloads.json - echo "data=$data" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Print summary of download data: - - name: 'Print summary' - run: | - echo "| Date | Downloads |" >> $GITHUB_STEP_SUMMARY - echo "|------|------------|" >> $GITHUB_STEP_SUMMARY - cat ./tmp/npm_downloads.json | jq -r ".downloads | .[-14:] | to_entries | map(\"| \(.value.day) | \(.value.downloads) |\") |.[]" >> $GITHUB_STEP_SUMMARY - - # Upload the download data: - - name: 'Upload data' - uses: actions/upload-artifact@v3 - with: - # Define a name for the uploaded artifact (ensuring a unique name for each job): - name: npm_downloads - - # Specify the path to the file to upload: - path: ./tmp/npm_downloads.json - - # Specify the number of days to retain the artifact (default is 90 days): - retention-days: 90 - timeout-minutes: 10 - if: success() - - # Send data to events server: - - name: 'Post data' - uses: distributhor/workflow-webhook@v3 - env: - webhook_url: ${{ secrets.STDLIB_NPM_DOWNLOADS_URL }} - webhook_secret: ${{ secrets.STDLIB_WEBHOOK_SECRET }} - data: '{ "downloads": ${{ steps.download_data.outputs.data }} }' - timeout-minutes: 5 - if: success() diff --git a/.github/workflows/productionize.yml b/.github/workflows/productionize.yml deleted file mode 100644 index 91f2b93..0000000 --- a/.github/workflows/productionize.yml +++ /dev/null @@ -1,783 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: productionize - -# Workflow triggers: -on: - # Run workflow when a new commit is pushed to the main branch: - push: - branches: - - main - - # Allow the workflow to be manually run: - workflow_dispatch: - inputs: - require-passing-tests: - description: 'Require passing tests for creating bundles' - type: boolean - default: true - - # Run workflow upon completion of `publish` workflow run: - workflow_run: - workflows: ["publish"] - types: [completed] - - -# Concurrency group to prevent multiple concurrent executions: -concurrency: - group: productionize - cancel-in-progress: true - -# Workflow jobs: -jobs: - - # Define a job to create a production build... - productionize: - - # Define display name: - name: 'Productionize' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - # Checkout main branch of repository: - - name: 'Checkout main branch' - uses: actions/checkout@v3 - with: - ref: main - - # Install Node.js: - - name: 'Install Node.js' - uses: actions/setup-node@v3 - with: - node-version: 16 - timeout-minutes: 5 - - # Create production branch: - - name: 'Create production branch' - run: | - git checkout -b production - - # Transform error messages: - - name: 'Transform error messages' - id: transform-error-messages - uses: stdlib-js/transform-errors-action@main - - # Change `@stdlib/string-format` to `@stdlib/error-tools-fmtprodmsg` in package.json if the former is a dependency, otherwise insert it as a dependency: - - name: 'Update dependencies in package.json' - run: | - PKG_VERSION=$(npm view @stdlib/error-tools-fmtprodmsg version) - if grep -q '"@stdlib/string-format"' package.json; then - sed -i "s/\"@stdlib\/string-format\": \"^.*\"/\"@stdlib\/error-tools-fmtprodmsg\": \"^$PKG_VERSION\"/g" package.json - else - node -e "var pkg = require( './package.json' ); pkg.dependencies[ '@stdlib/error-tools-fmtprodmsg' ] = '^$PKG_VERSION'; require( 'fs' ).writeFileSync( 'package.json', JSON.stringify( pkg, null, 2 ) );" - fi - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Transform error messages" - - # Push changes: - - name: 'Push changes' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" production --force - - # Define a job for running tests of the productionized code... - test: - - # Define a display name: - name: 'Run Tests' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Indicate that this job depends on the prior job finishing: - needs: productionize - - # Run this job regardless of the outcome of the prior job: - if: always() - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - uses: actions/checkout@v3 - with: - # Use the `production` branch: - ref: production - - # Install Node.js: - - name: 'Install Node.js' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - uses: actions/setup-node@v3 - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Build native add-on if present: - - name: 'Build native add-on (if present)' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - run: | - if [ -f "binding.gyp" ]; then - npm install node-gyp --no-save && ./node_modules/.bin/node-gyp rebuild - fi - - # Run tests: - - name: 'Run tests' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: tests - run: | - npm test || npm test || npm test - - # Define job to create a bundle for use in Deno... - deno: - - # Define display name: - name: 'Create Deno bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - uses: actions/checkout@v3 - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `deno` branch exists: - - name: 'Check if remote `deno` branch exists' - id: deno-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin deno - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `deno` exists, delete everything in branch and merge `production` into it - - name: 'If `deno` exists, delete everything in branch and merge `production` into it' - if: steps.deno-branch-exists.outputs.remote-exists - run: | - git checkout -b deno origin/deno - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `deno` does not exist, create `deno` branch: - - name: 'If `deno` does not exist, create `deno` branch' - if: ${{ steps.deno-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b deno - - # Copy files to deno directory: - - name: 'Copy files to deno directory' - run: | - mkdir -p deno - cp README.md LICENSE CONTRIBUTORS NOTICE ./deno - - # Copy TypeScript definitions to deno directory: - if [ -d index.d.ts ]; then - cp index.d.ts ./deno/index.d.ts - fi - if [ -e ./docs/types/index.d.ts ]; then - cp ./docs/types/index.d.ts ./deno/mod.d.ts - fi - - # Install Node.js: - - name: 'Install Node.js' - uses: actions/setup-node@v3 - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: Install production and development dependencies - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Bundle package for use in Deno: - - name: 'Bundle package for Deno' - id: deno-bundle - uses: stdlib-js/bundle-action@main - with: - target: 'deno' - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - # Replace links to other packages with links to the deno branch: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/deno/"; - - # Replace reference to `@stdlib/types` with CDN link: - find ./deno -type f -name '*.ts' -print0 | xargs -0 sed -Ei "s/\/\/\/ /\/\/\/ /g" - - # Change wording of project description to avoid reference to JavaScript and Node.js: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "s/a standard library for JavaScript and Node.js, /a standard library /g" - - # Rewrite all `require()`s to use jsDelivr links: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/require\( '@stdlib\// { - s/(var|let|const)\s+([a-z0-9_]+)\s+=\s*require\( '([^']+)' \);/import \2 from \'\3\';/i - s/@stdlib/https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js/ - s/';/@deno\/mod.js';/ - }" - - # Rewrite first `import` to show importing of named exports if available: - exports=$(cat lib/index.js | \ - grep -E 'setReadOnly\(.*,.*,.*\)' | \ - sed -E 's/setReadOnly\((.*),(.*),(.*)\);/\2/' | \ - sed -E "s/'//g" | \ - sort) - if [ -n "$exports" ]; then - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\nimport\s+([a-zA-Z0-9_]+)\s+from\s*'([^']+)';\n\`\`\`/\`\`\`javascript\nimport \1 from '\2';\n\`\`\`\n\nYou can also import the following named exports from the package:\n\n\`\`\`javascript\nimport { $(echo $exports | sed -E 's/ /, /g') } from '\2';\n\`\`\`/" - fi - - # Remove `installation`, `cli`, and `c` sections: - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Create package.json file for deno branch: - jq --indent 2 '{"name": .name, "version": .version, "description": .description, "license": .license, "type": "module", "main": "./mod.js", "homepage": .homepage, "repository": .repository, "bugs": .bugs, "keywords": .keywords, "funding": .funding}' package.json > ./deno/package.json - - # Delete everything in current directory aside from deno folder: - - name: 'Delete everything in current directory aside from deno folder' - run: | - find . -type 'f' | grep -v -e "deno" -e ".git/" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e "deno" -e ".git" | xargs -r rm -rf - - # Move deno directory to root: - - name: 'Move deno directory to root' - run: | - mv ./deno/* . - rmdir ./deno - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Auto-generated commit" - - # Push changes to `deno` branch: - - name: 'Push changes to `deno` branch' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" deno - - # Send status to Slack channel if job fails: - - name: 'Send status to Slack channel in case of failure' - uses: act10ns/slack@v2 - with: - status: ${{ job.status }} - steps: ${{ toJson(steps) }} - channel: '#npm-ci' - if: failure() - - # Define job to create a UMD bundle... - umd: - - # Define display name: - name: 'Create UMD bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - uses: actions/checkout@v3 - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `umd` branch exists: - - name: 'Check if remote `umd` branch exists' - id: umd-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin umd - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `umd` exists, delete everything in branch and merge `production` into it - - name: 'If `umd` exists, delete everything in branch and merge `production` into it' - if: steps.umd-branch-exists.outputs.remote-exists - run: | - git checkout -b umd origin/umd - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `umd` does not exist, create `umd` branch: - - name: 'If `umd` does not exist, create `umd` branch' - if: ${{ steps.umd-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b umd - - # Copy files to umd directory: - - name: 'Copy files to umd directory' - run: | - mkdir -p umd - cp README.md LICENSE CONTRIBUTORS NOTICE ./umd - - # Install Node.js - - name: 'Install Node.js' - uses: actions/setup-node@v3 - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Extract alias: - - name: 'Extract alias' - id: extract-alias - run: | - alias=$(grep -E 'require\(' README.md | head -n 1 | sed -E 's/^var ([a-zA-Z0-9_]+) = .+/\1/') - echo "alias=${alias}" >> $GITHUB_OUTPUT - - # Create Universal Module Definition (UMD) Node.js bundle: - - name: 'Create Universal Module Definition (UMD) Node.js bundle' - id: umd-bundle-node - uses: stdlib-js/bundle-action@main - with: - target: 'umd-node' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Create Universal Module Definition (UMD) browser bundle: - - name: 'Create Universal Module Definition (UMD) browser bundle' - id: umd-bundle-browser - uses: stdlib-js/bundle-action@main - with: - target: 'umd-browser' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - - # Replace links to other packages with links to the umd branch: - find ./umd -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/umd/"; - - # Remove `installation`, `cli`, and `c` sections: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Rewrite first `require()` to show consumption of the UMD bundle in Observable and via a `script` tag: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\n(var|let|const)\s+([a-zA-Z0-9_]+)\s+=\s*require\( '\@stdlib\/([^']+)' \);\n\`\`\`/To use in Observable,\n\n\`\`\`javascript\n\2 = require\( 'https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js\/\3\@umd\/browser.js' \)\n\`\`\`\n\nTo vendor stdlib functionality and avoid installing dependency trees for Node.js, you can use the UMD server build:\n\n\`\`\`javascript\nvar \2 = require\( 'path\/to\/vendor\/umd\/\3\/index.js' \)\n\`\`\`\n\nTo include the bundle in a webpage,\n\n\`\`\`html\n + + + + diff --git a/test/test.js b/test/test.js deleted file mode 100644 index 8e62cb8..0000000 --- a/test/test.js +++ /dev/null @@ -1,60 +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 proxyquire = require( 'proxyquire' ); -var main = require( './../lib/main.js' ); -var polyfill = require( './../lib/polyfill.js' ); -var empty = require( './../lib' ); - - -// TESTS // - -tape( 'main export is a function', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof empty, 'function', 'main export is a function' ); - t.end(); -}); - -tape( 'if an environment supports Node.js buffer instances inheriting from Uint8Array, the main export supports returning arrays having uninitialized memory', function test( t ) { - var empty = proxyquire( './../lib', { - './is_buffer_uint8array.js': mock - }); - t.strictEqual( empty, main, 'returns expected value' ); - t.end(); - - function mock() { - return true; - } -}); - -tape( 'if an environment does not support Node.js buffer instances inheriting from Uint8Array, the main export supports returning zero-filled arrays', function test( t ) { - var empty = proxyquire( './../lib', { - './is_buffer_uint8array.js': mock - }); - t.strictEqual( empty, polyfill, 'returns expected value' ); - t.end(); - - function mock() { - return false; - } -}); diff --git a/test/test.main.js b/test/test.main.js deleted file mode 100644 index 3ceb26e..0000000 --- a/test/test.main.js +++ /dev/null @@ -1,274 +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 Float64Array = require( '@stdlib/array-float64' ); -var Float32Array = require( '@stdlib/array-float32' ); -var Int32Array = require( '@stdlib/array-int32' ); -var Uint32Array = require( '@stdlib/array-uint32' ); -var Int16Array = require( '@stdlib/array-int16' ); -var Uint16Array = require( '@stdlib/array-uint16' ); -var Int8Array = require( '@stdlib/array-int8' ); -var Uint8Array = require( '@stdlib/array-uint8' ); -var Uint8ClampedArray = require( '@stdlib/array-uint8c' ); -var Complex64Array = require( '@stdlib/array-complex64' ); -var Complex128Array = require( '@stdlib/array-complex128' ); -var instanceOf = require( '@stdlib/assert-instance-of' ); -var empty = require( './../lib/main.js' ); - - -// TESTS // - -tape( 'main export is a function', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof empty, 'function', 'main export is a function' ); - t.end(); -}); - -tape( 'the function throws an error if provided a value other than a nonnegative integer for the first argument', function test( t ) { - var values; - var i; - - values = [ - '5', - -3, - 3.14, - NaN, - true, - false, - null, - void 0, - [], - {}, - function noop() {} - ]; - - for ( i = 0; i < values.length; i++ ) { - t.throws( badValue( values[i] ), TypeError, 'throws an error when provided '+values[i] ); - } - t.end(); - - function badValue( value ) { - return function badValue() { - empty( value ); - }; - } -}); - -tape( 'the function throws an error if provided a value other than a nonnegative integer for the first argument (dtype)', function test( t ) { - var values; - var i; - - values = [ - '5', - -3, - 3.14, - NaN, - true, - false, - null, - void 0, - [], - {}, - function noop() {} - ]; - - for ( i = 0; i < values.length; i++ ) { - t.throws( badValue( values[i] ), TypeError, 'throws an error when provided '+values[i] ); - } - t.end(); - - function badValue( value ) { - return function badValue() { - empty( value, 'float32' ); - }; - } -}); - -tape( 'the function throws an error if provided an unrecognized data type', function test( t ) { - var values; - var i; - - values = [ - '5', - 'beep', - 'empty', - 'Int32', - 'Uint32', - 'Int16', - 'Uint16', - 'Int8', - 'Uint8', - 'Uint8c', - 'uint8_clamped', - 'Float64', - 'Float32', - 'FLOAT64', - 'FLOAT32', - 'GENERIC' - ]; - - for ( i = 0; i < values.length; i++ ) { - t.throws( badValue( values[i] ), TypeError, 'throws an error when provided '+values[i] ); - } - t.end(); - - function badValue( value ) { - return function badValue() { - empty( 10, value ); - }; - } -}); - -tape( 'the function returns an empty array (default)', function test( t ) { - var arr; - - arr = empty( 5 ); - t.strictEqual( instanceOf( arr, Float64Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=float64)', function test( t ) { - var arr; - - arr = empty( 5, 'float64' ); - t.strictEqual( instanceOf( arr, Float64Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=float32)', function test( t ) { - var arr; - - arr = empty( 5, 'float32' ); - t.strictEqual( instanceOf( arr, Float32Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=complex128)', function test( t ) { - var arr; - - arr = empty( 5, 'complex128' ); - t.strictEqual( instanceOf( arr, Complex128Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=complex64)', function test( t ) { - var arr; - - arr = empty( 5, 'complex64' ); - t.strictEqual( instanceOf( arr, Complex64Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=int32)', function test( t ) { - var arr; - - arr = empty( 5, 'int32' ); - t.strictEqual( instanceOf( arr, Int32Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=uint32)', function test( t ) { - var arr; - - arr = empty( 5, 'uint32' ); - t.strictEqual( instanceOf( arr, Uint32Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=int16)', function test( t ) { - var arr; - - arr = empty( 5, 'int16' ); - t.strictEqual( instanceOf( arr, Int16Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=uint16)', function test( t ) { - var arr; - - arr = empty( 5, 'uint16' ); - t.strictEqual( instanceOf( arr, Uint16Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=int8)', function test( t ) { - var arr; - - arr = empty( 5, 'int8' ); - t.strictEqual( instanceOf( arr, Int8Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=uint8)', function test( t ) { - var arr; - - arr = empty( 5, 'uint8' ); - t.strictEqual( instanceOf( arr, Uint8Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=uint8c)', function test( t ) { - var arr; - - arr = empty( 5, 'uint8c' ); - t.strictEqual( instanceOf( arr, Uint8ClampedArray ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=generic)', function test( t ) { - var expected; - var arr; - - expected = [ 0, 0, 0, 0, 0 ]; - - arr = empty( 5, 'generic' ); - t.strictEqual( instanceOf( arr, Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); diff --git a/test/test.polyfill.js b/test/test.polyfill.js deleted file mode 100644 index 17b99f3..0000000 --- a/test/test.polyfill.js +++ /dev/null @@ -1,324 +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 Float64Array = require( '@stdlib/array-float64' ); -var Float32Array = require( '@stdlib/array-float32' ); -var Int32Array = require( '@stdlib/array-int32' ); -var Uint32Array = require( '@stdlib/array-uint32' ); -var Int16Array = require( '@stdlib/array-int16' ); -var Uint16Array = require( '@stdlib/array-uint16' ); -var Int8Array = require( '@stdlib/array-int8' ); -var Uint8Array = require( '@stdlib/array-uint8' ); -var Uint8ClampedArray = require( '@stdlib/array-uint8c' ); -var Complex64Array = require( '@stdlib/array-complex64' ); -var Complex128Array = require( '@stdlib/array-complex128' ); -var reinterpret64 = require( '@stdlib/strided-base-reinterpret-complex64' ); -var reinterpret128 = require( '@stdlib/strided-base-reinterpret-complex128' ); -var instanceOf = require( '@stdlib/assert-instance-of' ); -var empty = require( './../lib/polyfill.js' ); - - -// TESTS // - -tape( 'main export is a function', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof empty, 'function', 'main export is a function' ); - t.end(); -}); - -tape( 'the function throws an error if provided a value other than a nonnegative integer for the first argument', function test( t ) { - var values; - var i; - - values = [ - '5', - -3, - 3.14, - NaN, - true, - false, - null, - void 0, - [], - {}, - function noop() {} - ]; - - for ( i = 0; i < values.length; i++ ) { - t.throws( badValue( values[i] ), TypeError, 'throws an error when provided '+values[i] ); - } - t.end(); - - function badValue( value ) { - return function badValue() { - empty( value ); - }; - } -}); - -tape( 'the function throws an error if provided a value other than a nonnegative integer for the first argument (dtype)', function test( t ) { - var values; - var i; - - values = [ - '5', - -3, - 3.14, - NaN, - true, - false, - null, - void 0, - [], - {}, - function noop() {} - ]; - - for ( i = 0; i < values.length; i++ ) { - t.throws( badValue( values[i] ), TypeError, 'throws an error when provided '+values[i] ); - } - t.end(); - - function badValue( value ) { - return function badValue() { - empty( value, 'float32' ); - }; - } -}); - -tape( 'the function throws an error if provided an unrecognized data type', function test( t ) { - var values; - var i; - - values = [ - '5', - 'beep', - 'empty', - 'Int32', - 'Uint32', - 'Int16', - 'Uint16', - 'Int8', - 'Uint8', - 'Uint8c', - 'uint8_clamped', - 'Float64', - 'Float32', - 'FLOAT64', - 'FLOAT32', - 'GENERIC' - ]; - - for ( i = 0; i < values.length; i++ ) { - t.throws( badValue( values[i] ), TypeError, 'throws an error when provided '+values[i] ); - } - t.end(); - - function badValue( value ) { - return function badValue() { - empty( 10, value ); - }; - } -}); - -tape( 'the function returns a zero-filled array (default)', function test( t ) { - var expected; - var arr; - - expected = new Float64Array( [ 0.0, 0.0, 0.0, 0.0, 0.0 ] ); - - arr = empty( 5 ); - t.strictEqual( instanceOf( arr, Float64Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=float64)', function test( t ) { - var expected; - var arr; - - expected = new Float64Array( [ 0.0, 0.0, 0.0, 0.0, 0.0 ] ); - - arr = empty( 5, 'float64' ); - t.strictEqual( instanceOf( arr, Float64Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=float32)', function test( t ) { - var expected; - var arr; - - expected = new Float32Array( [ 0.0, 0.0, 0.0, 0.0, 0.0 ] ); - - arr = empty( 5, 'float32' ); - t.strictEqual( instanceOf( arr, Float32Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=complex128)', function test( t ) { - var expected; - var arr; - - expected = new Float64Array( [ 0.0, 0.0, 0.0, 0.0 ] ); - - arr = empty( 2, 'complex128' ); - t.strictEqual( instanceOf( arr, Complex128Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length/2, 'returns expected value' ); - t.deepEqual( reinterpret128( arr, 0 ), expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=complex64)', function test( t ) { - var expected; - var arr; - - expected = new Float32Array( [ 0.0, 0.0, 0.0, 0.0 ] ); - - arr = empty( 2, 'complex64' ); - t.strictEqual( instanceOf( arr, Complex64Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length/2, 'returns expected value' ); - t.deepEqual( reinterpret64( arr, 0 ), expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=int32)', function test( t ) { - var expected; - var arr; - - expected = new Int32Array( [ 0, 0, 0, 0, 0 ] ); - - arr = empty( 5, 'int32' ); - t.strictEqual( instanceOf( arr, Int32Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=uint32)', function test( t ) { - var expected; - var arr; - - expected = new Uint32Array( [ 0, 0, 0, 0, 0 ] ); - - arr = empty( 5, 'uint32' ); - t.strictEqual( instanceOf( arr, Uint32Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=int16)', function test( t ) { - var expected; - var arr; - - expected = new Int16Array( [ 0, 0, 0, 0, 0 ] ); - - arr = empty( 5, 'int16' ); - t.strictEqual( instanceOf( arr, Int16Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=uint16)', function test( t ) { - var expected; - var arr; - - expected = new Uint16Array( [ 0, 0, 0, 0, 0 ] ); - - arr = empty( 5, 'uint16' ); - t.strictEqual( instanceOf( arr, Uint16Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=int8)', function test( t ) { - var expected; - var arr; - - expected = new Int8Array( [ 0, 0, 0, 0, 0 ] ); - - arr = empty( 5, 'int8' ); - t.strictEqual( instanceOf( arr, Int8Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=uint8)', function test( t ) { - var expected; - var arr; - - expected = new Uint8Array( [ 0, 0, 0, 0, 0 ] ); - - arr = empty( 5, 'uint8' ); - t.strictEqual( instanceOf( arr, Uint8Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=uint8c)', function test( t ) { - var expected; - var arr; - - expected = new Uint8ClampedArray( [ 0, 0, 0, 0, 0 ] ); - - arr = empty( 5, 'uint8c' ); - t.strictEqual( instanceOf( arr, Uint8ClampedArray ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=generic)', function test( t ) { - var expected; - var arr; - - expected = [ 0, 0, 0, 0, 0 ]; - - arr = empty( 5, 'generic' ); - t.strictEqual( instanceOf( arr, Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); From 7d3970d22e014f76ca4500ae1fe3fc74e61061ed Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sun, 24 Sep 2023 17:49:10 +0000 Subject: [PATCH 14/75] Update README.md for Deno bundle v0.1.0 --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index bcb658b..63aef3a 100644 --- a/README.md +++ b/README.md @@ -52,7 +52,7 @@ limitations under the License. ## Usage ```javascript -import empty from 'https://cdn.jsdelivr.net/gh/stdlib-js/array-empty@deno/mod.js'; +import empty from 'https://cdn.jsdelivr.net/gh/stdlib-js/array-empty@v0.1.0-deno/mod.js'; ``` #### empty( length\[, dtype] ) @@ -114,7 +114,7 @@ var arr = empty( 2, 'int32' ); ```javascript import dtypes from 'https://cdn.jsdelivr.net/gh/stdlib-js/array-dtypes@deno/mod.js'; -import empty from 'https://cdn.jsdelivr.net/gh/stdlib-js/array-empty@deno/mod.js'; +import empty from 'https://cdn.jsdelivr.net/gh/stdlib-js/array-empty@v0.1.0-deno/mod.js'; // Get a list of array data types: var dt = dtypes(); From 132ad244e5ad42b82732c02eff41ab0dbb1b700f Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sun, 24 Sep 2023 17:49:11 +0000 Subject: [PATCH 15/75] Auto-generated commit --- README.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 63aef3a..e019d04 100644 --- a/README.md +++ b/README.md @@ -51,6 +51,11 @@ limitations under the License. ## Usage +```javascript +import empty from 'https://cdn.jsdelivr.net/gh/stdlib-js/array-empty@deno/mod.js'; +``` +The previous example will load the latest bundled code from the deno branch. Alternatively, you may load a specific version by loading the file from one of the [tagged bundles](https://github.com/stdlib-js/array-empty/tags). For example, + ```javascript import empty from 'https://cdn.jsdelivr.net/gh/stdlib-js/array-empty@v0.1.0-deno/mod.js'; ``` @@ -114,7 +119,7 @@ var arr = empty( 2, 'int32' ); ```javascript import dtypes from 'https://cdn.jsdelivr.net/gh/stdlib-js/array-dtypes@deno/mod.js'; -import empty from 'https://cdn.jsdelivr.net/gh/stdlib-js/array-empty@v0.1.0-deno/mod.js'; +import empty from 'https://cdn.jsdelivr.net/gh/stdlib-js/array-empty@deno/mod.js'; // Get a list of array data types: var dt = dtypes(); From 9733f1f68f38b27613c26250156b657b1ef4a1fc Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sun, 1 Oct 2023 17:04:10 +0000 Subject: [PATCH 16/75] Transform error messages --- lib/main.js | 6 +++--- package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/main.js b/lib/main.js index e19ce93..e02b26b 100644 --- a/lib/main.js +++ b/lib/main.js @@ -25,7 +25,7 @@ var allocUnsafe = require( '@stdlib/buffer-alloc-unsafe' ); var ctors = require( '@stdlib/array-typed-ctors' ); var zeros = require( '@stdlib/array-base-zeros' ); var bytesPerElement = require( '@stdlib/ndarray-base-bytes-per-element' ); -var format = require( '@stdlib/string-format' ); +var format = require( '@stdlib/error-tools-fmtprodmsg' ); // MAIN // @@ -57,7 +57,7 @@ function empty( length ) { var nb; if ( !isNonNegativeInteger( length ) ) { - throw new TypeError( format( 'invalid argument. First argument must be a nonnegative integer. Value: `%s`.', length ) ); + throw new TypeError( format( '1Zj2d,MG', length ) ); } if ( arguments.length > 1 ) { dtype = arguments[ 1 ]; @@ -69,7 +69,7 @@ function empty( length ) { } nbytes = bytesPerElement( dtype ); if ( nbytes === null ) { - throw new TypeError( format( 'invalid argument. Second argument must be a supported data type. Value: `%s`.', dtype ) ); + throw new TypeError( format( '1ZjMl', dtype ) ); } // Resolve typed array constructor: ctor = ctors( dtype ); diff --git a/package.json b/package.json index 0f8f182..d93a6c0 100644 --- a/package.json +++ b/package.json @@ -45,7 +45,7 @@ "@stdlib/assert-is-uint8array": "^0.1.0", "@stdlib/buffer-alloc-unsafe": "^0.1.0", "@stdlib/ndarray-base-bytes-per-element": "^0.1.0", - "@stdlib/string-format": "^0.1.0", + "@stdlib/error-tools-fmtprodmsg": "^0.1.0", "@stdlib/types": "^0.1.0" }, "devDependencies": { From 9b2fe05f07c6fa89ee176e2290c169d6f36df8cb Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Tue, 3 Oct 2023 02:21:24 +0000 Subject: [PATCH 17/75] Remove files --- mod.d.ts | 277 --- mod.js | 4 - mod.js.map | 1 - stats.html | 6177 ---------------------------------------------------- 4 files changed, 6459 deletions(-) delete mode 100644 mod.d.ts delete mode 100644 mod.js delete mode 100644 mod.js.map delete mode 100644 stats.html diff --git a/mod.d.ts b/mod.d.ts deleted file mode 100644 index c071f4d..0000000 --- a/mod.d.ts +++ /dev/null @@ -1,277 +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 - -/// - -import { Complex128Array, Complex64Array, DataType } from '@stdlib/types/array'; - -/** -* Creates an uninitialized array having a specified length. -* -* ## Notes -* -* - In browser environments, the function always returns zero-filled arrays. -* - In Node.js versions `>=3.0.0`, the underlying memory of returned typed arrays is **not** initialized. Memory contents are unknown and may contain **sensitive** data. -* -* @param length - array length -* @param dtype - data type -* @returns empty array -* -* @example -* var arr = empty( 2, 'float64' ); -* // returns -*/ -declare function empty( length: number, dtype: 'float64' ): Float64Array; - -/** -* Creates an uninitialized array having a specified length. -* -* ## Notes -* -* - In browser environments, the function always returns zero-filled arrays. -* - In Node.js versions `>=3.0.0`, the underlying memory of returned typed arrays is **not** initialized. Memory contents are unknown and may contain **sensitive** data. -* -* @param length - array length -* @param dtype - data type -* @returns empty array -* -* @example -* var arr = empty( 2, 'float32' ); -* // returns -*/ -declare function empty( length: number, dtype: 'float32' ): Float32Array; - -/** -* Creates an uninitialized array having a specified length. -* -* ## Notes -* -* - In browser environments, the function always returns zero-filled arrays. -* - In Node.js versions `>=3.0.0`, the underlying memory of returned typed arrays is **not** initialized. Memory contents are unknown and may contain **sensitive** data. -* -* @param length - array length -* @param dtype - data type -* @returns empty array -* -* @example -* var arr = empty( 2, 'complex128' ); -* // returns -*/ -declare function empty( length: number, dtype: 'complex128' ): Complex128Array; - -/** -* Creates an uninitialized array having a specified length. -* -* ## Notes -* -* - In browser environments, the function always returns zero-filled arrays. -* - In Node.js versions `>=3.0.0`, the underlying memory of returned typed arrays is **not** initialized. Memory contents are unknown and may contain **sensitive** data. -* -* @param length - array length -* @param dtype - data type -* @returns empty array -* -* @example -* var arr = empty( 2, 'complex64' ); -* // returns -*/ -declare function empty( length: number, dtype: 'complex64' ): Complex64Array; - -/** -* Creates an uninitialized array having a specified length. -* -* ## Notes -* -* - In browser environments, the function always returns zero-filled arrays. -* - In Node.js versions `>=3.0.0`, the underlying memory of returned typed arrays is **not** initialized. Memory contents are unknown and may contain **sensitive** data. -* -* @param length - array length -* @param dtype - data type -* @returns empty array -* -* @example -* var arr = empty( 2, 'int32' ); -* // returns -*/ -declare function empty( length: number, dtype: 'int32' ): Int32Array; - -/** -* Creates an uninitialized array having a specified length. -* -* ## Notes -* -* - In browser environments, the function always returns zero-filled arrays. -* - In Node.js versions `>=3.0.0`, the underlying memory of returned typed arrays is **not** initialized. Memory contents are unknown and may contain **sensitive** data. -* -* @param length - array length -* @param dtype - data type -* @returns empty array -* -* @example -* var arr = empty( 2, 'int16' ); -* // returns -*/ -declare function empty( length: number, dtype: 'int16' ): Int16Array; - -/** -* Creates an uninitialized array having a specified length. -* -* ## Notes -* -* - In browser environments, the function always returns zero-filled arrays. -* - In Node.js versions `>=3.0.0`, the underlying memory of returned typed arrays is **not** initialized. Memory contents are unknown and may contain **sensitive** data. -* -* @param length - array length -* @param dtype - data type -* @returns empty array -* -* @example -* var arr = empty( 2, 'int8' ); -* // returns -*/ -declare function empty( length: number, dtype: 'int8' ): Int8Array; - -/** -* Creates an uninitialized array having a specified length. -* -* ## Notes -* -* - In browser environments, the function always returns zero-filled arrays. -* - In Node.js versions `>=3.0.0`, the underlying memory of returned typed arrays is **not** initialized. Memory contents are unknown and may contain **sensitive** data. -* -* @param length - array length -* @param dtype - data type -* @returns empty array -* -* @example -* var arr = empty( 2, 'uint32' ); -* // returns -*/ -declare function empty( length: number, dtype: 'uint32' ): Uint32Array; - -/** -* Creates an uninitialized array having a specified length. -* -* ## Notes -* -* - In browser environments, the function always returns zero-filled arrays. -* - In Node.js versions `>=3.0.0`, the underlying memory of returned typed arrays is **not** initialized. Memory contents are unknown and may contain **sensitive** data. -* -* @param length - array length -* @param dtype - data type -* @returns empty array -* -* @example -* var arr = empty( 2, 'uint16' ); -* // returns -*/ -declare function empty( length: number, dtype: 'uint16' ): Uint16Array; - -/** -* Creates an uninitialized array having a specified length. -* -* ## Notes -* -* - In browser environments, the function always returns zero-filled arrays. -* - In Node.js versions `>=3.0.0`, the underlying memory of returned typed arrays is **not** initialized. Memory contents are unknown and may contain **sensitive** data. -* -* @param length - array length -* @param dtype - data type -* @returns empty array -* -* @example -* var arr = empty( 2, 'uint8' ); -* // returns -*/ -declare function empty( length: number, dtype: 'uint8' ): Uint8Array; - -/** -* Creates an uninitialized array having a specified length. -* -* ## Notes -* -* - In browser environments, the function always returns zero-filled arrays. -* - In Node.js versions `>=3.0.0`, the underlying memory of returned typed arrays is **not** initialized. Memory contents are unknown and may contain **sensitive** data. -* -* @param length - array length -* @param dtype - data type -* @returns empty array -* -* @example -* var arr = empty( 2, 'uint8c' ); -* // returns -*/ -declare function empty( length: number, dtype: 'uint8c' ): Uint8ClampedArray; - -/** -* Creates a zero-filled array having a specified length. -* -* @param length - array length -* @param dtype - data type -* @returns zero-filled array -* -* @example -* var arr = empty( 2, 'generic' ); -* // returns -*/ -declare function empty( length: number, dtype: 'generic' ): Array; - -/** -* Creates an uninitialized array having a specified length. -* -* ## Notes -* -* - In browser environments, the function always returns zero-filled arrays. -* - If `dtype` is `'generic'`, the function always returns a zero-filled array. -* - In Node.js versions `>=3.0.0`, the underlying memory of returned typed arrays is **not** initialized. Memory contents are unknown and may contain **sensitive** data. -* -* The function recognizes the following data types: -* -* - `float64`: double-precision floating-point numbers (IEEE 754) -* - `float32`: single-precision floating-point numbers (IEEE 754) -* - `complex128`: double-precision complex floating-point numbers -* - `complex64`: single-precision complex floating-point numbers -* - `int32`: 32-bit two's complement signed integers -* - `uint32`: 32-bit unsigned integers -* - `int16`: 16-bit two's complement signed integers -* - `uint16`: 16-bit unsigned integers -* - `int8`: 8-bit two's complement signed integers -* - `uint8`: 8-bit unsigned integers -* - `uint8c`: 8-bit unsigned integers clamped to `0-255` -* - `generic`: generic JavaScript values -* -* @param length - array length -* @param dtype - data type (default: 'float64') -* @returns empty array -* -* @example -* var arr = empty( 2 ); -* // returns -* -* @example -* var arr = empty( 2, 'float32' ); -* // returns -*/ -declare function empty( length: number, dtype?: DataType ): Float64Array; - - -// EXPORTS // - -export = empty; diff --git a/mod.js b/mod.js deleted file mode 100644 index ce435ce..0000000 --- a/mod.js +++ /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 -/// -var e="function"==typeof Object.defineProperty?Object.defineProperty:null;var r=Object.defineProperty;function t(e){return"number"==typeof e}function n(e){var r,t="";for(r=0;r0&&(r-=1),n=i.toExponential(r)):n=i.toPrecision(e.precision),e.alternate||(n=y.call(n,v,"$1e"),n=y.call(n,b,"e"),n=y.call(n,w,""));break;default:throw new Error("invalid double notation. Value: "+e.specifier)}return n=y.call(n,h,"e+0$1"),n=y.call(n,p,"e-0$1"),e.alternate&&(n=y.call(n,g,"$1."),n=y.call(n,m,"$1.e")),i>=0&&e.sign&&(n=e.sign+n),n=e.specifier===s.call(e.specifier)?s.call(n):c.call(n)}function E(e){var r,t="";for(r=0;r127)throw new Error("invalid character code. Value: "+n.arg);n.arg=_(a)?String(n.arg):T(a)}break;case"e":case"E":case"f":case"F":case"g":case"G":r||(n.precision=6),n.arg=d(n);break;default:throw new Error("invalid specifier: "+n.specifier)}n.maxWidth>=0&&n.arg.length>n.maxWidth&&(n.arg=n.arg.substring(0,n.maxWidth)),n.padZeros?n.arg=i(n.arg,n.width||n.precision,n.padRight):n.width&&(n.arg=A(n.arg,n.width,n.padRight)),l+=n.arg||"",c+=1}return l}var k=/%(?:([1-9]\d*)\$)?([0 +\-#]*)(\*|\d+)?(?:(\.)(\*|\d+)?)?[hlL]?([%A-Za-z])/g;function L(e){var r={mapping:e[1]?parseInt(e[1],10):void 0,flags:e[2],width:e[3],precision:e[5],specifier:e[6]};return"."===e[4]&&void 0===e[5]&&(r.precision="1"),r}function S(e){var r,t,n,i;for(t=[],i=0,n=k.exec(e);n;)(r=e.slice(i,k.lastIndex-n[0].length)).length&&t.push(r),t.push(L(n)),i=k.lastIndex,n=k.exec(e);return(r=e.slice(i)).length&&t.push(r),t}function R(e){return"string"==typeof e}function B(e){var r,t,n;if(!R(e))throw new TypeError(B("invalid argument. First argument must be a string. Value: `%s`.",e));for(r=S(e),(t=new Array(arguments.length))[0]=r,n=1;nne&&oe(e)}function ue(e){return W(e)&&ae(e)}function fe(e){return ee(e)&&ae(e.valueOf())}function le(e){return ue(e)||fe(e)}function ce(e){return ue(e)&&e>=0}function se(e){return fe(e)&&e.valueOf()>=0}function ye(e){return ce(e)||se(e)}Y(le,"isPrimitive",ue),Y(le,"isObject",fe),Y(ye,"isPrimitive",ce),Y(ye,"isObject",se);var he="function"==typeof Float64Array;var pe="function"==typeof Float64Array?Float64Array:null;var ge="function"==typeof Float64Array?Float64Array:void 0;var me=function(){var e,r,t;if("function"!=typeof pe)return!1;try{r=new pe([1,3.14,-3.14,NaN]),t=r,e=(he&&t instanceof Float64Array||"[object Float64Array]"===D(t))&&1===r[0]&&3.14===r[1]&&-3.14===r[2]&&r[3]!=r[3]}catch(r){e=!1}return e}()?ge:function(){throw new Error("not implemented")},we="function"==typeof Float32Array;var be="function"==typeof Float32Array?Float32Array:null;var ve="function"==typeof Float32Array?Float32Array:void 0;var de=function(){var e,r,t;if("function"!=typeof be)return!1;try{r=new be([1,3.14,-3.14,5e40]),t=r,e=(we&&t instanceof Float32Array||"[object Float32Array]"===D(t))&&1===r[0]&&3.140000104904175===r[1]&&-3.140000104904175===r[2]&&r[3]===te}catch(r){e=!1}return e}()?ve:function(){throw new Error("not implemented")},Ee="function"==typeof Int16Array;var Ae="function"==typeof Int16Array?Int16Array:null;var Te="function"==typeof Int16Array?Int16Array:void 0;var _e=function(){var e,r,t;if("function"!=typeof Ae)return!1;try{r=new Ae([1,3.14,-3.14,32768]),t=r,e=(Ee&&t instanceof Int16Array||"[object Int16Array]"===D(t))&&1===r[0]&&3===r[1]&&-3===r[2]&&-32768===r[3]}catch(r){e=!1}return e}()?Te:function(){throw new Error("not implemented")},xe="function"==typeof Int32Array;var je="function"==typeof Int32Array?Int32Array:null;var Ve="function"==typeof Int32Array?Int32Array:void 0;var ke=function(){var e,r,t;if("function"!=typeof je)return!1;try{r=new je([1,3.14,-3.14,2147483648]),t=r,e=(xe&&t instanceof Int32Array||"[object Int32Array]"===D(t))&&1===r[0]&&3===r[1]&&-3===r[2]&&-2147483648===r[3]}catch(r){e=!1}return e}()?Ve:function(){throw new Error("not implemented")},Le="function"==typeof Int8Array;var Se="function"==typeof Int8Array?Int8Array:null;var Re="function"==typeof Int8Array?Int8Array:void 0;var Be=function(){var e,r,t;if("function"!=typeof Se)return!1;try{r=new Se([1,3.14,-3.14,128]),t=r,e=(Le&&t instanceof Int8Array||"[object Int8Array]"===D(t))&&1===r[0]&&3===r[1]&&-3===r[2]&&-128===r[3]}catch(r){e=!1}return e}()?Re:function(){throw new Error("not implemented")},Ie="function"==typeof Uint16Array;var Ce="function"==typeof Uint16Array?Uint16Array:null;var Fe="function"==typeof Uint16Array?Uint16Array:void 0;var Oe=function(){var e,r,t;if("function"!=typeof Ce)return!1;try{r=new Ce(r=[1,3.14,-3.14,65536,65537]),t=r,e=(Ie&&t instanceof Uint16Array||"[object Uint16Array]"===D(t))&&1===r[0]&&3===r[1]&&65533===r[2]&&0===r[3]&&1===r[4]}catch(r){e=!1}return e}()?Fe:function(){throw new Error("not implemented")},Me="function"==typeof Uint32Array;var Ne="function"==typeof Uint32Array?Uint32Array:null;var Ue="function"==typeof Uint32Array?Uint32Array:void 0;var Pe=function(){var e,r,t;if("function"!=typeof Ne)return!1;try{r=new Ne(r=[1,3.14,-3.14,4294967296,4294967297]),t=r,e=(Me&&t instanceof Uint32Array||"[object Uint32Array]"===D(t))&&1===r[0]&&3===r[1]&&4294967293===r[2]&&0===r[3]&&1===r[4]}catch(r){e=!1}return e}()?Ue:function(){throw new Error("not implemented")},Ye="function"==typeof Uint8Array;var We="function"==typeof Uint8Array?Uint8Array:null;var $e="function"==typeof Uint8Array?Uint8Array:void 0;var Ge=function(){var e,r,t;if("function"!=typeof We)return!1;try{r=new We(r=[1,3.14,-3.14,256,257]),t=r,e=(Ye&&t instanceof Uint8Array||"[object Uint8Array]"===D(t))&&1===r[0]&&3===r[1]&&253===r[2]&&0===r[3]&&1===r[4]}catch(r){e=!1}return e}()?$e:function(){throw new Error("not implemented")},Ze="function"==typeof Uint8ClampedArray;var Xe="function"==typeof Uint8ClampedArray?Uint8ClampedArray:null;var ze="function"==typeof Uint8ClampedArray?Uint8ClampedArray:void 0;var Je=function(){var e,r,t;if("function"!=typeof Xe)return!1;try{r=new Xe([-1,0,1,3.14,4.99,255,256]),t=r,e=(Ze&&t instanceof Uint8ClampedArray||"[object Uint8ClampedArray]"===D(t))&&0===r[0]&&0===r[1]&&1===r[2]&&3===r[3]&&5===r[4]&&255===r[5]&&255===r[6]}catch(r){e=!1}return e}()?ze:function(){throw new Error("not implemented")};function qe(e){return"object"==typeof e&&null!==e&&"number"==typeof e.length&&oe(e.length)&&e.length>=0&&e.length<=4294967295}function De(e){return"object"==typeof e&&null!==e&&"number"==typeof e.length&&oe(e.length)&&e.length>=0&&e.length<=9007199254740991}var He="function"==typeof ArrayBuffer;function Ke(e){return He&&e instanceof ArrayBuffer||"[object ArrayBuffer]"===D(e)}var Qe=Array.isArray?Array.isArray:function(e){return"[object Array]"===D(e)};function er(e){return"object"==typeof e&&null!==e&&!Qe(e)}var rr=/./;function tr(e){return"boolean"==typeof e}var nr=Boolean,ir=Boolean.prototype.toString;var or=G();function ar(e){return"object"==typeof e&&(e instanceof nr||(or?function(e){try{return ir.call(e),!0}catch(e){return!1}}(e):"[object Boolean]"===D(e)))}function ur(e){return tr(e)||ar(e)}function fr(){return new Function("return this;")()}Y(ur,"isPrimitive",tr),Y(ur,"isObject",ar);var lr="object"==typeof self?self:null,cr="object"==typeof window?window:null,sr="undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},yr="object"==typeof sr?sr:null,hr="object"==typeof globalThis?globalThis:null;var pr=function(e){if(arguments.length){if(!tr(e))throw new TypeError(B("invalid argument. Must provide a boolean. Value: `%s`.",e));if(e)return fr()}if(hr)return hr;if(lr)return lr;if(cr)return cr;if(yr)return yr;throw new Error("unexpected error. Unable to resolve global object.")}(),gr=pr.document&&pr.document.childNodes,mr=Int8Array;function wr(){return/^\s*function\s*([^(]*)/i}var br=/^\s*function\s*([^(]*)/i;function vr(e){return null!==e&&"object"==typeof e}function dr(e){var r,t,n,i;if(("Object"===(t=D(e).slice(8,-1))||"Error"===t)&&e.constructor){if("string"==typeof(n=e.constructor).name)return n.name;if(r=br.exec(n.toString()))return r[1]}return vr(i=e)&&(i._isBuffer||i.constructor&&"function"==typeof i.constructor.isBuffer&&i.constructor.isBuffer(i))?"Buffer":t}Y(wr,"REGEXP",br),Y(vr,"isObjectLikeArray",function(e){if("function"!=typeof e)throw new TypeError(B("invalid argument. Must provide a function. Value: `%s`.",e));return function(r){var t,n;if(!Qe(r))return!1;if(0===(t=r.length))return!1;for(n=0;n=2)r.push(n[0],n[1]);else{if(!kr(n))return new TypeError(B("invalid argument. An iterator must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",n));r.push(Ir(n),Cr(n))}return r}function Wr(e,r,t){var n,i,o,a;for(n=[],a=-1;!(i=e.next()).done;)if(a+=1,qe(o=r.call(t,i.value,a))&&o.length>=2)n.push(o[0],o[1]);else{if(!kr(o))return new TypeError(B("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",o));n.push(Ir(o),Cr(o))}return n}function $r(e,r){var t,n,i,o;for(t=r.length,o=0,i=0;it.byteLength-e)throw new RangeError(B("invalid arguments. ArrayBuffer has insufficient capacity. Either decrease the array length or provide a bigger buffer. Minimum capacity: `%u`.",n*Gr));t=new de(t,e,2*n)}}return Y(this,"_buffer",t),Y(this,"_length",t.length/2),this}function Hr(e){return e.re}function Kr(e){return e.im}function Qr(e){var r,t,n;for(r=[];!(t=e.next()).done;)if(qe(n=t.value)&&n.length>=2)r.push(n[0],n[1]);else{if(!kr(n))return new TypeError(B("invalid argument. An iterator must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",n));r.push(Hr(n),Kr(n))}return r}function et(e,r,t){var n,i,o,a;for(n=[],a=-1;!(i=e.next()).done;)if(a+=1,qe(o=r.call(t,i.value,a))&&o.length>=2)n.push(o[0],o[1]);else{if(!kr(o))return new TypeError(B("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",o));n.push(Hr(o),Kr(o))}return n}function rt(e,r){var t,n,i,o;for(t=r.length,o=0,i=0;i1){if(!Ar(n=arguments[1]))throw new TypeError(B("invalid argument. Second argument must be a function. Value: `%s`.",n));t>2&&(r=arguments[2])}if(Xr(e)){if(f=e.length,n){for(o=(i=new this(f))._buffer,y=0,s=0;s=2))throw new TypeError(B("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",c));o[y]=c[0],o[y+1]=c[1]}y+=2}return i}return new this(e)}if(De(e)){if(n){for(f=e.length,u=e.get&&e.set?Pr("default"):Nr("default"),s=0;s=2))throw new TypeError(B("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",c));o[y]=c[0],o[y+1]=c[1]}y+=2}return i}return new this(e)}if(er(e)&&Zr&&Ar(e[Rr])){if(!Ar((o=e[Rr]()).next))throw new TypeError(B("invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.",e));if((a=n?Wr(o,n,r):Yr(o))instanceof Error)throw a;for(o=(i=new this(f=a.length/2))._buffer,s=0;s=n)return{done:!0};return r=new Vr(e[a+=2],e[a+1]),{value:[o,r],done:!1}})),Y(t,"return",(function(e){if(i=!0,arguments.length)return{value:e,done:!0};return{done:!0}})),Rr&&Y(t,Rr,(function(){return r.entries()})),t})),Y(Dr.prototype,"get",(function(e){var r;if(!Xr(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!ce(e))throw new TypeError(B("invalid argument. Must provide a nonnegative integer. Value: `%s`.",e));if(!(e>=this._length))return new Vr((r=this._buffer)[e*=2],r[e+1])})),Br(Dr.prototype,"length",(function(){return this._length})),Y(Dr.prototype,"set",(function(e){var r,t,n,i,o,a,u,f,l;if(!Xr(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(n=this._buffer,arguments.length>1){if(!ce(t=arguments[1]))throw new TypeError(B("invalid argument. Index argument must be a nonnegative integer. Value: `%s`.",t))}else t=0;if(kr(e)){if(t>=this._length)throw new RangeError(B("invalid argument. Index argument is out-of-bounds. Value: `%u`.",t));return n[t*=2]=Ir(e),void(n[t+1]=Cr(e))}if(Xr(e)){if(t+(a=e._length)>this._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");if(r=e._buffer,l=n.byteOffset+t*Gr,r.buffer===n.buffer&&r.byteOffsetl){for(i=new de(r.length),f=0;fthis._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");if(r=e,l=n.byteOffset+t*Gr,r.buffer===n.buffer&&r.byteOffsetl){for(i=new de(a),f=0;fthis._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");for(t*=2,f=0;ft.byteLength-e)throw new RangeError(B("invalid arguments. ArrayBuffer has insufficient capacity. Either decrease the array length or provide a bigger buffer. Minimum capacity: `%u`.",n*tt));t=new me(t,e,2*n)}}return Y(this,"_buffer",t),Y(this,"_length",t.length/2),this}Y(ft,"BYTES_PER_ELEMENT",tt),Y(ft,"name","Complex128Array"),Y(ft,"from",(function(e){var r,t,n,i,o,a,u,f,l,c,s,y;if(!Ar(this))throw new TypeError("invalid invocation. `this` context must be a constructor.");if(!ot(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if((t=arguments.length)>1){if(!Ar(n=arguments[1]))throw new TypeError(B("invalid argument. Second argument must be a function. Value: `%s`.",n));t>2&&(r=arguments[2])}if(it(e)){if(f=e.length,n){for(o=(i=new this(f))._buffer,y=0,s=0;s=2))throw new TypeError(B("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",c));o[y]=c[0],o[y+1]=c[1]}y+=2}return i}return new this(e)}if(De(e)){if(n){for(f=e.length,u=e.get&&e.set?Pr("default"):Nr("default"),s=0;s=2))throw new TypeError(B("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",c));o[y]=c[0],o[y+1]=c[1]}y+=2}return i}return new this(e)}if(er(e)&&nt&&Ar(e[Rr])){if(!Ar((o=e[Rr]()).next))throw new TypeError(B("invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.",e));if((a=n?et(o,n,r):Qr(o))instanceof Error)throw a;for(o=(i=new this(f=a.length/2))._buffer,s=0;s=n)return{done:!0};return r=new Tr(e[a+=2],e[a+1]),{value:[o,r],done:!1}})),Y(t,"return",(function(e){if(i=!0,arguments.length)return{value:e,done:!0};return{done:!0}})),Rr&&Y(t,Rr,(function(){return r.entries()})),t})),Y(ft.prototype,"get",(function(e){var r;if(!it(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!ce(e))throw new TypeError(B("invalid argument. Must provide a nonnegative integer. Value: `%s`.",e));if(!(e>=this._length))return new Tr((r=this._buffer)[e*=2],r[e+1])})),Br(ft.prototype,"length",(function(){return this._length})),Y(ft.prototype,"set",(function(e){var r,t,n,i,o,a,u,f,l;if(!it(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(n=this._buffer,arguments.length>1){if(!ce(t=arguments[1]))throw new TypeError(B("invalid argument. Index argument must be a nonnegative integer. Value: `%s`.",t))}else t=0;if(kr(e)){if(t>=this._length)throw new RangeError(B("invalid argument. Index argument is out-of-bounds. Value: `%u`.",t));return n[t*=2]=Hr(e),void(n[t+1]=Kr(e))}if(it(e)){if(t+(a=e._length)>this._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");if(r=e._buffer,l=n.byteOffset+t*tt,r.buffer===n.buffer&&r.byteOffsetl){for(i=new me(r.length),f=0;fthis._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");if(r=e,l=n.byteOffset+t*tt,r.buffer===n.buffer&&r.byteOffsetl){for(i=new me(a),f=0;fthis._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");for(t*=2,f=0;f1?arguments[1]:"float64"))return st(e);if(null===(t=ct(r)))throw new TypeError(B("invalid argument. Second argument must be a recognized data type. Value: `%s`.",r));return new t(e)}function ht(e){return arguments.length>1?yt(e,arguments[1]):yt(e)}export{ht as default}; -//# sourceMappingURL=mod.js.map diff --git a/mod.js.map b/mod.js.map deleted file mode 100644 index ca3f210..0000000 --- a/mod.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"mod.js","sources":["../node_modules/@stdlib/utils-define-property/lib/define_property.js","../node_modules/@stdlib/utils-define-property/lib/builtin.js","../node_modules/@stdlib/string-base-format-interpolate/lib/is_number.js","../node_modules/@stdlib/string-base-format-interpolate/lib/zero_pad.js","../node_modules/@stdlib/string-base-format-interpolate/lib/format_integer.js","../node_modules/@stdlib/string-base-format-interpolate/lib/is_string.js","../node_modules/@stdlib/string-base-format-interpolate/lib/format_double.js","../node_modules/@stdlib/string-base-format-interpolate/lib/space_pad.js","../node_modules/@stdlib/string-base-format-interpolate/lib/main.js","../node_modules/@stdlib/string-base-format-tokenize/lib/main.js","../node_modules/@stdlib/string-format/lib/is_string.js","../node_modules/@stdlib/string-format/lib/main.js","../node_modules/@stdlib/utils-define-property/lib/polyfill.js","../node_modules/@stdlib/utils-define-property/lib/index.js","../node_modules/@stdlib/utils-define-property/lib/has_define_property_support.js","../node_modules/@stdlib/utils-define-nonenumerable-read-only-property/lib/main.js","../node_modules/@stdlib/assert-is-number/lib/primitive.js","../node_modules/@stdlib/assert-has-tostringtag-support/lib/main.js","../node_modules/@stdlib/assert-has-symbol-support/lib/main.js","../node_modules/@stdlib/utils-native-class/lib/tostring.js","../node_modules/@stdlib/assert-has-own-property/lib/main.js","../node_modules/@stdlib/symbol-ctor/lib/main.js","../node_modules/@stdlib/utils-native-class/lib/tostringtag.js","../node_modules/@stdlib/utils-native-class/lib/index.js","../node_modules/@stdlib/utils-native-class/lib/polyfill.js","../node_modules/@stdlib/utils-native-class/lib/main.js","../node_modules/@stdlib/number-ctor/lib/main.js","../node_modules/@stdlib/assert-is-number/lib/tostring.js","../node_modules/@stdlib/assert-is-number/lib/object.js","../node_modules/@stdlib/assert-is-number/lib/try2serialize.js","../node_modules/@stdlib/assert-is-number/lib/main.js","../node_modules/@stdlib/assert-is-number/lib/index.js","../node_modules/@stdlib/constants-float64-pinf/lib/index.js","../node_modules/@stdlib/constants-float64-ninf/lib/index.js","../node_modules/@stdlib/math-base-special-floor/lib/main.js","../node_modules/@stdlib/math-base-assert-is-integer/lib/main.js","../node_modules/@stdlib/assert-is-integer/lib/integer.js","../node_modules/@stdlib/assert-is-integer/lib/primitive.js","../node_modules/@stdlib/assert-is-integer/lib/object.js","../node_modules/@stdlib/assert-is-integer/lib/main.js","../node_modules/@stdlib/assert-is-nonnegative-integer/lib/primitive.js","../node_modules/@stdlib/assert-is-nonnegative-integer/lib/object.js","../node_modules/@stdlib/assert-is-nonnegative-integer/lib/main.js","../node_modules/@stdlib/assert-is-integer/lib/index.js","../node_modules/@stdlib/assert-is-nonnegative-integer/lib/index.js","../node_modules/@stdlib/assert-is-float64array/lib/main.js","../node_modules/@stdlib/assert-has-float64array-support/lib/float64array.js","../node_modules/@stdlib/array-float64/lib/main.js","../node_modules/@stdlib/array-float64/lib/index.js","../node_modules/@stdlib/assert-has-float64array-support/lib/main.js","../node_modules/@stdlib/array-float64/lib/polyfill.js","../node_modules/@stdlib/assert-is-float32array/lib/main.js","../node_modules/@stdlib/assert-has-float32array-support/lib/float32array.js","../node_modules/@stdlib/array-float32/lib/main.js","../node_modules/@stdlib/array-float32/lib/index.js","../node_modules/@stdlib/assert-has-float32array-support/lib/main.js","../node_modules/@stdlib/array-float32/lib/polyfill.js","../node_modules/@stdlib/assert-is-int16array/lib/main.js","../node_modules/@stdlib/constants-int16-max/lib/index.js","../node_modules/@stdlib/assert-has-int16array-support/lib/int16array.js","../node_modules/@stdlib/array-int16/lib/main.js","../node_modules/@stdlib/array-int16/lib/index.js","../node_modules/@stdlib/assert-has-int16array-support/lib/main.js","../node_modules/@stdlib/constants-int16-min/lib/index.js","../node_modules/@stdlib/array-int16/lib/polyfill.js","../node_modules/@stdlib/assert-is-int32array/lib/main.js","../node_modules/@stdlib/constants-int32-max/lib/index.js","../node_modules/@stdlib/assert-has-int32array-support/lib/int32array.js","../node_modules/@stdlib/array-int32/lib/main.js","../node_modules/@stdlib/array-int32/lib/index.js","../node_modules/@stdlib/assert-has-int32array-support/lib/main.js","../node_modules/@stdlib/constants-int32-min/lib/index.js","../node_modules/@stdlib/array-int32/lib/polyfill.js","../node_modules/@stdlib/assert-is-int8array/lib/main.js","../node_modules/@stdlib/constants-int8-max/lib/index.js","../node_modules/@stdlib/assert-has-int8array-support/lib/int8array.js","../node_modules/@stdlib/array-int8/lib/main.js","../node_modules/@stdlib/array-int8/lib/index.js","../node_modules/@stdlib/assert-has-int8array-support/lib/main.js","../node_modules/@stdlib/constants-int8-min/lib/index.js","../node_modules/@stdlib/array-int8/lib/polyfill.js","../node_modules/@stdlib/assert-is-uint16array/lib/main.js","../node_modules/@stdlib/constants-uint16-max/lib/index.js","../node_modules/@stdlib/assert-has-uint16array-support/lib/uint16array.js","../node_modules/@stdlib/array-uint16/lib/main.js","../node_modules/@stdlib/array-uint16/lib/index.js","../node_modules/@stdlib/assert-has-uint16array-support/lib/main.js","../node_modules/@stdlib/array-uint16/lib/polyfill.js","../node_modules/@stdlib/assert-is-uint32array/lib/main.js","../node_modules/@stdlib/constants-uint32-max/lib/index.js","../node_modules/@stdlib/assert-has-uint32array-support/lib/uint32array.js","../node_modules/@stdlib/array-uint32/lib/main.js","../node_modules/@stdlib/array-uint32/lib/index.js","../node_modules/@stdlib/assert-has-uint32array-support/lib/main.js","../node_modules/@stdlib/array-uint32/lib/polyfill.js","../node_modules/@stdlib/assert-is-uint8array/lib/main.js","../node_modules/@stdlib/constants-uint8-max/lib/index.js","../node_modules/@stdlib/assert-has-uint8array-support/lib/uint8array.js","../node_modules/@stdlib/array-uint8/lib/main.js","../node_modules/@stdlib/array-uint8/lib/index.js","../node_modules/@stdlib/assert-has-uint8array-support/lib/main.js","../node_modules/@stdlib/array-uint8/lib/polyfill.js","../node_modules/@stdlib/assert-is-uint8clampedarray/lib/main.js","../node_modules/@stdlib/assert-has-uint8clampedarray-support/lib/uint8clampedarray.js","../node_modules/@stdlib/array-uint8c/lib/main.js","../node_modules/@stdlib/array-uint8c/lib/index.js","../node_modules/@stdlib/assert-has-uint8clampedarray-support/lib/main.js","../node_modules/@stdlib/array-uint8c/lib/polyfill.js","../node_modules/@stdlib/assert-is-array-like-object/lib/main.js","../node_modules/@stdlib/constants-array-max-array-length/lib/index.js","../node_modules/@stdlib/assert-is-collection/lib/main.js","../node_modules/@stdlib/constants-array-max-typed-array-length/lib/index.js","../node_modules/@stdlib/assert-is-arraybuffer/lib/main.js","../node_modules/@stdlib/assert-is-array/lib/main.js","../node_modules/@stdlib/assert-is-object/lib/main.js","../node_modules/@stdlib/utils-type-of/lib/fixtures/re.js","../node_modules/@stdlib/assert-is-boolean/lib/primitive.js","../node_modules/@stdlib/boolean-ctor/lib/main.js","../node_modules/@stdlib/assert-is-boolean/lib/tostring.js","../node_modules/@stdlib/assert-is-boolean/lib/object.js","../node_modules/@stdlib/assert-is-boolean/lib/try2serialize.js","../node_modules/@stdlib/assert-is-boolean/lib/main.js","../node_modules/@stdlib/utils-global/lib/codegen.js","../node_modules/@stdlib/assert-is-boolean/lib/index.js","../node_modules/@stdlib/utils-global/lib/self.js","../node_modules/@stdlib/utils-global/lib/window.js","../node_modules/@stdlib/utils-global/lib/global.js","../node_modules/@stdlib/utils-global/lib/global_this.js","../node_modules/@stdlib/utils-type-of/lib/fixtures/nodelist.js","../node_modules/@stdlib/utils-global/lib/main.js","../node_modules/@stdlib/utils-type-of/lib/fixtures/typedarray.js","../node_modules/@stdlib/regexp-function-name/lib/main.js","../node_modules/@stdlib/regexp-function-name/lib/regexp.js","../node_modules/@stdlib/assert-is-object-like/lib/main.js","../node_modules/@stdlib/utils-constructor-name/lib/main.js","../node_modules/@stdlib/assert-is-buffer/lib/main.js","../node_modules/@stdlib/regexp-function-name/lib/index.js","../node_modules/@stdlib/assert-is-object-like/lib/index.js","../node_modules/@stdlib/assert-tools-array-function/lib/main.js","../node_modules/@stdlib/utils-type-of/lib/index.js","../node_modules/@stdlib/utils-type-of/lib/check.js","../node_modules/@stdlib/utils-type-of/lib/polyfill.js","../node_modules/@stdlib/utils-type-of/lib/main.js","../node_modules/@stdlib/assert-is-function/lib/main.js","../node_modules/@stdlib/complex-float64/lib/main.js","../node_modules/@stdlib/complex-float64/lib/tostring.js","../node_modules/@stdlib/complex-float64/lib/tojson.js","../node_modules/@stdlib/number-float64-base-to-float32/lib/main.js","../node_modules/@stdlib/number-float64-base-to-float32/lib/polyfill.js","../node_modules/@stdlib/number-float64-base-to-float32/lib/index.js","../node_modules/@stdlib/complex-float32/lib/main.js","../node_modules/@stdlib/assert-is-complex-like/lib/main.js","../node_modules/@stdlib/math-base-assert-is-even/lib/main.js","../node_modules/@stdlib/assert-has-iterator-symbol-support/lib/main.js","../node_modules/@stdlib/complex-float32/lib/tostring.js","../node_modules/@stdlib/complex-float32/lib/tojson.js","../node_modules/@stdlib/symbol-iterator/lib/main.js","../node_modules/@stdlib/utils-define-nonenumerable-read-only-accessor/lib/main.js","../node_modules/@stdlib/complex-realf/lib/main.js","../node_modules/@stdlib/complex-imagf/lib/main.js","../node_modules/@stdlib/strided-base-reinterpret-complex64/lib/main.js","../node_modules/@stdlib/strided-base-reinterpret-complex128/lib/main.js","../node_modules/@stdlib/array-base-getter/lib/main.js","../node_modules/@stdlib/array-base-accessor-getter/lib/main.js","../node_modules/@stdlib/array-complex64/lib/from_iterator.js","../node_modules/@stdlib/array-complex64/lib/from_iterator_map.js","../node_modules/@stdlib/array-complex64/lib/from_array.js","../node_modules/@stdlib/array-complex64/lib/main.js","../node_modules/@stdlib/complex-real/lib/main.js","../node_modules/@stdlib/complex-imag/lib/main.js","../node_modules/@stdlib/array-complex128/lib/from_iterator.js","../node_modules/@stdlib/array-complex128/lib/from_iterator_map.js","../node_modules/@stdlib/array-complex128/lib/from_array.js","../node_modules/@stdlib/array-complex128/lib/main.js","../node_modules/@stdlib/array-ctors/lib/ctors.js","../node_modules/@stdlib/array-ctors/lib/main.js","../node_modules/@stdlib/array-base-zeros/lib/main.js","../node_modules/@stdlib/array-base-filled/lib/main.js","../node_modules/@stdlib/array-zeros/lib/main.js","../lib/polyfill.js"],"sourcesContent":["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Object.defineProperty === 'function' ) ? Object.defineProperty : null;\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Defines (or modifies) an object property.\n*\n* ## Notes\n*\n* - Property descriptors come in two flavors: **data descriptors** and **accessor descriptors**. A data descriptor is a property that has a value, which may or may not be writable. An accessor descriptor is a property described by a getter-setter function pair. A descriptor must be one of these two flavors and cannot be both.\n*\n* @name defineProperty\n* @type {Function}\n* @param {Object} obj - object on which to define the property\n* @param {(string|symbol)} prop - property name\n* @param {Object} descriptor - property descriptor\n* @param {boolean} [descriptor.configurable=false] - boolean indicating if property descriptor can be changed and if the property can be deleted from the provided object\n* @param {boolean} [descriptor.enumerable=false] - boolean indicating if the property shows up when enumerating object properties\n* @param {boolean} [descriptor.writable=false] - boolean indicating if the value associated with the property can be changed with an assignment operator\n* @param {*} [descriptor.value] - property value\n* @param {(Function|void)} [descriptor.get=undefined] - function which serves as a getter for the property, or, if no getter, undefined. When the property is accessed, a getter function is called without arguments and with the `this` context set to the object through which the property is accessed (which may not be the object on which the property is defined due to inheritance). The return value will be used as the property value.\n* @param {(Function|void)} [descriptor.set=undefined] - function which serves as a setter for the property, or, if no setter, undefined. When assigning a property value, a setter function is called with one argument (the value being assigned to the property) and with the `this` context set to the object through which the property is assigned.\n* @throws {TypeError} first argument must be an object\n* @throws {TypeError} third argument must be an object\n* @throws {Error} property descriptor cannot have both a value and a setter and/or getter\n* @returns {Object} object with added property\n*\n* @example\n* var obj = {};\n*\n* defineProperty( obj, 'foo', {\n* 'value': 'bar'\n* });\n*\n* var str = obj.foo;\n* // returns 'bar'\n*/\nvar defineProperty = Object.defineProperty;\n\n\n// EXPORTS //\n\nexport default defineProperty;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Tests if a value is a number primitive.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number primitive\n*\n* @example\n* var bool = isNumber( 3.14 );\n* // returns true\n*\n* @example\n* var bool = isNumber( NaN );\n* // returns true\n*\n* @example\n* var bool = isNumber( new Number( 3.14 ) );\n* // returns false\n*/\nfunction isNumber( value ) {\n\treturn ( typeof value === 'number' ); // NOTE: we inline the `isNumber.isPrimitive` function from `@stdlib/assert/is-number` in order to avoid circular dependencies.\n}\n\n\n// EXPORTS //\n\nexport default isNumber;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// FUNCTIONS //\n\n/**\n* Tests if a string starts with a minus sign (`-`).\n*\n* @private\n* @param {string} str - input string\n* @returns {boolean} boolean indicating if a string starts with a minus sign (`-`)\n*/\nfunction startsWithMinus( str ) {\n\treturn str[ 0 ] === '-';\n}\n\n/**\n* Returns a string of `n` zeros.\n*\n* @private\n* @param {number} n - number of zeros\n* @returns {string} string of zeros\n*/\nfunction zeros( n ) {\n\tvar out = '';\n\tvar i;\n\tfor ( i = 0; i < n; i++ ) {\n\t\tout += '0';\n\t}\n\treturn out;\n}\n\n\n// MAIN //\n\n/**\n* Pads a token with zeros to the specified width.\n*\n* @private\n* @param {string} str - token argument\n* @param {number} width - token width\n* @param {boolean} [right=false] - boolean indicating whether to pad to the right\n* @returns {string} padded token argument\n*/\nfunction zeroPad( str, width, right ) {\n\tvar negative = false;\n\tvar pad = width - str.length;\n\tif ( pad < 0 ) {\n\t\treturn str;\n\t}\n\tif ( startsWithMinus( str ) ) {\n\t\tnegative = true;\n\t\tstr = str.substr( 1 );\n\t}\n\tstr = ( right ) ?\n\t\tstr + zeros( pad ) :\n\t\tzeros( pad ) + str;\n\tif ( negative ) {\n\t\tstr = '-' + str;\n\t}\n\treturn str;\n}\n\n\n// EXPORTS //\n\nexport default zeroPad;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isNumber from './is_number.js';\nimport zeroPad from './zero_pad.js';\n\n// NOTE: for the following, we explicitly avoid using stdlib packages in this particular package in order to avoid circular dependencies.\nvar lowercase = String.prototype.toLowerCase;\nvar uppercase = String.prototype.toUpperCase;\n\n\n// MAIN //\n\n/**\n* Formats a token object argument as an integer.\n*\n* @private\n* @param {Object} token - token object\n* @throws {Error} must provide a valid integer\n* @returns {string} formatted token argument\n*/\nfunction formatInteger( token ) {\n\tvar base;\n\tvar out;\n\tvar i;\n\n\tswitch ( token.specifier ) {\n\tcase 'b':\n\t\t// Case: %b (binary)\n\t\tbase = 2;\n\t\tbreak;\n\tcase 'o':\n\t\t// Case: %o (octal)\n\t\tbase = 8;\n\t\tbreak;\n\tcase 'x':\n\tcase 'X':\n\t\t// Case: %x, %X (hexadecimal)\n\t\tbase = 16;\n\t\tbreak;\n\tcase 'd':\n\tcase 'i':\n\tcase 'u':\n\tdefault:\n\t\t// Case: %d, %i, %u (decimal)\n\t\tbase = 10;\n\t\tbreak;\n\t}\n\tout = token.arg;\n\ti = parseInt( out, 10 );\n\tif ( !isFinite( i ) ) { // NOTE: We use the global `isFinite` function here instead of `@stdlib/math/base/assert/is-finite` in order to avoid circular dependencies.\n\t\tif ( !isNumber( out ) ) {\n\t\t\tthrow new Error( 'invalid integer. Value: ' + out );\n\t\t}\n\t\ti = 0;\n\t}\n\tif ( i < 0 && ( token.specifier === 'u' || base !== 10 ) ) {\n\t\ti = 0xffffffff + i + 1;\n\t}\n\tif ( i < 0 ) {\n\t\tout = ( -i ).toString( base );\n\t\tif ( token.precision ) {\n\t\t\tout = zeroPad( out, token.precision, token.padRight );\n\t\t}\n\t\tout = '-' + out;\n\t} else {\n\t\tout = i.toString( base );\n\t\tif ( !i && !token.precision ) {\n\t\t\tout = '';\n\t\t} else if ( token.precision ) {\n\t\t\tout = zeroPad( out, token.precision, token.padRight );\n\t\t}\n\t\tif ( token.sign ) {\n\t\t\tout = token.sign + out;\n\t\t}\n\t}\n\tif ( base === 16 ) {\n\t\tif ( token.alternate ) {\n\t\t\tout = '0x' + out;\n\t\t}\n\t\tout = ( token.specifier === uppercase.call( token.specifier ) ) ?\n\t\t\tuppercase.call( out ) :\n\t\t\tlowercase.call( out );\n\t}\n\tif ( base === 8 ) {\n\t\tif ( token.alternate && out.charAt( 0 ) !== '0' ) {\n\t\t\tout = '0' + out;\n\t\t}\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default formatInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Tests if a value is a string primitive.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a string primitive\n*\n* @example\n* var bool = isString( 'beep' );\n* // returns true\n*\n* @example\n* var bool = isString( new String( 'beep' ) );\n* // returns false\n*/\nfunction isString( value ) {\n\treturn ( typeof value === 'string' ); // NOTE: we inline the `isString.isPrimitive` function from `@stdlib/assert/is-string` in order to avoid circular dependencies.\n}\n\n\n// EXPORTS //\n\nexport default isString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isNumber from './is_number.js';\n\n// NOTE: for the following, we explicitly avoid using stdlib packages in this particular package in order to avoid circular dependencies.\nvar abs = Math.abs; // eslint-disable-line stdlib/no-builtin-math\nvar lowercase = String.prototype.toLowerCase;\nvar uppercase = String.prototype.toUpperCase;\nvar replace = String.prototype.replace;\n\n\n// VARIABLES //\n\nvar RE_EXP_POS_DIGITS = /e\\+(\\d)$/;\nvar RE_EXP_NEG_DIGITS = /e-(\\d)$/;\nvar RE_ONLY_DIGITS = /^(\\d+)$/;\nvar RE_DIGITS_BEFORE_EXP = /^(\\d+)e/;\nvar RE_TRAILING_PERIOD_ZERO = /\\.0$/;\nvar RE_PERIOD_ZERO_EXP = /\\.0*e/;\nvar RE_ZERO_BEFORE_EXP = /(\\..*[^0])0*e/;\n\n\n// MAIN //\n\n/**\n* Formats a token object argument as a floating-point number.\n*\n* @private\n* @param {Object} token - token object\n* @throws {Error} must provide a valid floating-point number\n* @returns {string} formatted token argument\n*/\nfunction formatDouble( token ) {\n\tvar digits;\n\tvar out;\n\tvar f = parseFloat( token.arg );\n\tif ( !isFinite( f ) ) { // NOTE: We use the global `isFinite` function here instead of `@stdlib/math/base/assert/is-finite` in order to avoid circular dependencies.\n\t\tif ( !isNumber( token.arg ) ) {\n\t\t\tthrow new Error( 'invalid floating-point number. Value: ' + out );\n\t\t}\n\t\t// Case: NaN, Infinity, or -Infinity\n\t\tf = token.arg;\n\t}\n\tswitch ( token.specifier ) {\n\tcase 'e':\n\tcase 'E':\n\t\tout = f.toExponential( token.precision );\n\t\tbreak;\n\tcase 'f':\n\tcase 'F':\n\t\tout = f.toFixed( token.precision );\n\t\tbreak;\n\tcase 'g':\n\tcase 'G':\n\t\tif ( abs( f ) < 0.0001 ) {\n\t\t\tdigits = token.precision;\n\t\t\tif ( digits > 0 ) {\n\t\t\t\tdigits -= 1;\n\t\t\t}\n\t\t\tout = f.toExponential( digits );\n\t\t} else {\n\t\t\tout = f.toPrecision( token.precision );\n\t\t}\n\t\tif ( !token.alternate ) {\n\t\t\tout = replace.call( out, RE_ZERO_BEFORE_EXP, '$1e' );\n\t\t\tout = replace.call( out, RE_PERIOD_ZERO_EXP, 'e');\n\t\t\tout = replace.call( out, RE_TRAILING_PERIOD_ZERO, '' );\n\t\t}\n\t\tbreak;\n\tdefault:\n\t\tthrow new Error( 'invalid double notation. Value: ' + token.specifier );\n\t}\n\tout = replace.call( out, RE_EXP_POS_DIGITS, 'e+0$1' );\n\tout = replace.call( out, RE_EXP_NEG_DIGITS, 'e-0$1' );\n\tif ( token.alternate ) {\n\t\tout = replace.call( out, RE_ONLY_DIGITS, '$1.' );\n\t\tout = replace.call( out, RE_DIGITS_BEFORE_EXP, '$1.e' );\n\t}\n\tif ( f >= 0 && token.sign ) {\n\t\tout = token.sign + out;\n\t}\n\tout = ( token.specifier === uppercase.call( token.specifier ) ) ?\n\t\tuppercase.call( out ) :\n\t\tlowercase.call( out );\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default formatDouble;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// FUNCTIONS //\n\n/**\n* Returns `n` spaces.\n*\n* @private\n* @param {number} n - number of spaces\n* @returns {string} string of spaces\n*/\nfunction spaces( n ) {\n\tvar out = '';\n\tvar i;\n\tfor ( i = 0; i < n; i++ ) {\n\t\tout += ' ';\n\t}\n\treturn out;\n}\n\n\n// MAIN //\n\n/**\n* Pads a token with spaces to the specified width.\n*\n* @private\n* @param {string} str - token argument\n* @param {number} width - token width\n* @param {boolean} [right=false] - boolean indicating whether to pad to the right\n* @returns {string} padded token argument\n*/\nfunction spacePad( str, width, right ) {\n\tvar pad = width - str.length;\n\tif ( pad < 0 ) {\n\t\treturn str;\n\t}\n\tstr = ( right ) ?\n\t\tstr + spaces( pad ) :\n\t\tspaces( pad ) + str;\n\treturn str;\n}\n\n\n// EXPORTS //\n\nexport default spacePad;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport formatInteger from './format_integer.js';\nimport isString from './is_string.js';\nimport formatDouble from './format_double.js';\nimport spacePad from './space_pad.js';\nimport zeroPad from './zero_pad.js';\n\n\n// VARIABLES //\n\nvar fromCharCode = String.fromCharCode;\nvar isnan = isNaN; // NOTE: We use the global `isNaN` function here instead of `@stdlib/math/base/assert/is-nan` to avoid circular dependencies.\nvar isArray = Array.isArray; // NOTE: We use the global `Array.isArray` function here instead of `@stdlib/assert/is-array` to avoid circular dependencies.\n\n\n// FUNCTIONS //\n\n/**\n* Initializes token object with properties of supplied format identifier object or default values if not present.\n*\n* @private\n* @param {Object} token - format identifier object\n* @returns {Object} token object\n*/\nfunction initialize( token ) {\n\tvar out = {};\n\tout.specifier = token.specifier;\n\tout.precision = ( token.precision === void 0 ) ? 1 : token.precision;\n\tout.width = token.width;\n\tout.flags = token.flags || '';\n\tout.mapping = token.mapping;\n\treturn out;\n}\n\n\n// MAIN //\n\n/**\n* Generates string from a token array by interpolating values.\n*\n* @param {Array} tokens - string parts and format identifier objects\n* @param {Array} ...args - variable values\n* @throws {TypeError} first argument must be an array\n* @throws {Error} invalid flags\n* @returns {string} formatted string\n*\n* @example\n* var tokens = [ 'beep ', { 'specifier': 's' } ];\n* var out = formatInterpolate( tokens, 'boop' );\n* // returns 'beep boop'\n*/\nfunction formatInterpolate( tokens ) {\n\tvar hasPeriod;\n\tvar flags;\n\tvar token;\n\tvar flag;\n\tvar num;\n\tvar out;\n\tvar pos;\n\tvar i;\n\tvar j;\n\n\tif ( !isArray( tokens ) ) {\n\t\tthrow new TypeError( 'invalid argument. First argument must be an array. Value: `' + tokens + '`.' );\n\t}\n\tout = '';\n\tpos = 1;\n\tfor ( i = 0; i < tokens.length; i++ ) {\n\t\ttoken = tokens[ i ];\n\t\tif ( isString( token ) ) {\n\t\t\tout += token;\n\t\t} else {\n\t\t\thasPeriod = token.precision !== void 0;\n\t\t\ttoken = initialize( token );\n\t\t\tif ( !token.specifier ) {\n\t\t\t\tthrow new TypeError( 'invalid argument. Token is missing `specifier` property. Index: `'+ i +'`. Value: `' + token + '`.' );\n\t\t\t}\n\t\t\tif ( token.mapping ) {\n\t\t\t\tpos = token.mapping;\n\t\t\t}\n\t\t\tflags = token.flags;\n\t\t\tfor ( j = 0; j < flags.length; j++ ) {\n\t\t\t\tflag = flags.charAt( j );\n\t\t\t\tswitch ( flag ) {\n\t\t\t\tcase ' ':\n\t\t\t\t\ttoken.sign = ' ';\n\t\t\t\t\tbreak;\n\t\t\t\tcase '+':\n\t\t\t\t\ttoken.sign = '+';\n\t\t\t\t\tbreak;\n\t\t\t\tcase '-':\n\t\t\t\t\ttoken.padRight = true;\n\t\t\t\t\ttoken.padZeros = false;\n\t\t\t\t\tbreak;\n\t\t\t\tcase '0':\n\t\t\t\t\ttoken.padZeros = flags.indexOf( '-' ) < 0; // NOTE: We use built-in `Array.prototype.indexOf` here instead of `@stdlib/assert/contains` in order to avoid circular dependencies.\n\t\t\t\t\tbreak;\n\t\t\t\tcase '#':\n\t\t\t\t\ttoken.alternate = true;\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tthrow new Error( 'invalid flag: ' + flag );\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( token.width === '*' ) {\n\t\t\t\ttoken.width = parseInt( arguments[ pos ], 10 );\n\t\t\t\tpos += 1;\n\t\t\t\tif ( isnan( token.width ) ) {\n\t\t\t\t\tthrow new TypeError( 'the argument for * width at position ' + pos + ' is not a number. Value: `' + token.width + '`.' );\n\t\t\t\t}\n\t\t\t\tif ( token.width < 0 ) {\n\t\t\t\t\ttoken.padRight = true;\n\t\t\t\t\ttoken.width = -token.width;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( hasPeriod ) {\n\t\t\t\tif ( token.precision === '*' ) {\n\t\t\t\t\ttoken.precision = parseInt( arguments[ pos ], 10 );\n\t\t\t\t\tpos += 1;\n\t\t\t\t\tif ( isnan( token.precision ) ) {\n\t\t\t\t\t\tthrow new TypeError( 'the argument for * precision at position ' + pos + ' is not a number. Value: `' + token.precision + '`.' );\n\t\t\t\t\t}\n\t\t\t\t\tif ( token.precision < 0 ) {\n\t\t\t\t\t\ttoken.precision = 1;\n\t\t\t\t\t\thasPeriod = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\ttoken.arg = arguments[ pos ];\n\t\t\tswitch ( token.specifier ) {\n\t\t\tcase 'b':\n\t\t\tcase 'o':\n\t\t\tcase 'x':\n\t\t\tcase 'X':\n\t\t\tcase 'd':\n\t\t\tcase 'i':\n\t\t\tcase 'u':\n\t\t\t\t// Case: %b (binary), %o (octal), %x, %X (hexadecimal), %d, %i (decimal), %u (unsigned decimal)\n\t\t\t\tif ( hasPeriod ) {\n\t\t\t\t\ttoken.padZeros = false;\n\t\t\t\t}\n\t\t\t\ttoken.arg = formatInteger( token );\n\t\t\t\tbreak;\n\t\t\tcase 's':\n\t\t\t\t// Case: %s (string)\n\t\t\t\ttoken.maxWidth = ( hasPeriod ) ? token.precision : -1;\n\t\t\t\tbreak;\n\t\t\tcase 'c':\n\t\t\t\t// Case: %c (character)\n\t\t\t\tif ( !isnan( token.arg ) ) {\n\t\t\t\t\tnum = parseInt( token.arg, 10 );\n\t\t\t\t\tif ( num < 0 || num > 127 ) {\n\t\t\t\t\t\tthrow new Error( 'invalid character code. Value: ' + token.arg );\n\t\t\t\t\t}\n\t\t\t\t\ttoken.arg = ( isnan( num ) ) ?\n\t\t\t\t\t\tString( token.arg ) :\n\t\t\t\t\t\tfromCharCode( num );\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'e':\n\t\t\tcase 'E':\n\t\t\tcase 'f':\n\t\t\tcase 'F':\n\t\t\tcase 'g':\n\t\t\tcase 'G':\n\t\t\t\t// Case: %e, %E (scientific notation), %f, %F (decimal floating point), %g, %G (uses the shorter of %e/E or %f/F)\n\t\t\t\tif ( !hasPeriod ) {\n\t\t\t\t\ttoken.precision = 6;\n\t\t\t\t}\n\t\t\t\ttoken.arg = formatDouble( token );\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tthrow new Error( 'invalid specifier: ' + token.specifier );\n\t\t\t}\n\t\t\t// Fit argument into field width...\n\t\t\tif ( token.maxWidth >= 0 && token.arg.length > token.maxWidth ) {\n\t\t\t\ttoken.arg = token.arg.substring( 0, token.maxWidth );\n\t\t\t}\n\t\t\tif ( token.padZeros ) {\n\t\t\t\ttoken.arg = zeroPad( token.arg, token.width || token.precision, token.padRight ); // eslint-disable-line max-len\n\t\t\t} else if ( token.width ) {\n\t\t\t\ttoken.arg = spacePad( token.arg, token.width, token.padRight );\n\t\t\t}\n\t\t\tout += token.arg || '';\n\t\t\tpos += 1;\n\t\t}\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default formatInterpolate;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// VARIABLES //\n\nvar RE = /%(?:([1-9]\\d*)\\$)?([0 +\\-#]*)(\\*|\\d+)?(?:(\\.)(\\*|\\d+)?)?[hlL]?([%A-Za-z])/g;\n\n\n// FUNCTIONS //\n\n/**\n* Parses a delimiter.\n*\n* @private\n* @param {Array} match - regular expression match\n* @returns {Object} delimiter token object\n*/\nfunction parse( match ) {\n\tvar token = {\n\t\t'mapping': ( match[ 1 ] ) ? parseInt( match[ 1 ], 10 ) : void 0,\n\t\t'flags': match[ 2 ],\n\t\t'width': match[ 3 ],\n\t\t'precision': match[ 5 ],\n\t\t'specifier': match[ 6 ]\n\t};\n\tif ( match[ 4 ] === '.' && match[ 5 ] === void 0 ) {\n\t\ttoken.precision = '1';\n\t}\n\treturn token;\n}\n\n\n// MAIN //\n\n/**\n* Tokenizes a string into an array of string parts and format identifier objects.\n*\n* @param {string} str - input string\n* @returns {Array} tokens\n*\n* @example\n* var tokens = formatTokenize( 'Hello %s!' );\n* // returns [ 'Hello ', {...}, '!' ]\n*/\nfunction formatTokenize( str ) {\n\tvar content;\n\tvar tokens;\n\tvar match;\n\tvar prev;\n\n\ttokens = [];\n\tprev = 0;\n\tmatch = RE.exec( str );\n\twhile ( match ) {\n\t\tcontent = str.slice( prev, RE.lastIndex - match[ 0 ].length );\n\t\tif ( content.length ) {\n\t\t\ttokens.push( content );\n\t\t}\n\t\ttokens.push( parse( match ) );\n\t\tprev = RE.lastIndex;\n\t\tmatch = RE.exec( str );\n\t}\n\tcontent = str.slice( prev );\n\tif ( content.length ) {\n\t\ttokens.push( content );\n\t}\n\treturn tokens;\n}\n\n\n// EXPORTS //\n\nexport default formatTokenize;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Tests if a value is a string primitive.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a string primitive\n*\n* @example\n* var bool = isString( 'beep' );\n* // returns true\n*\n* @example\n* var bool = isString( new String( 'beep' ) );\n* // returns false\n*/\nfunction isString( value ) {\n\treturn ( typeof value === 'string' ); // NOTE: we inline the `isString.isPrimitive` function from `@stdlib/assert/is-string` in order to avoid circular dependencies.\n}\n\n\n// EXPORTS //\n\nexport default isString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport interpolate from '@stdlib/string-base-format-interpolate';\nimport tokenize from '@stdlib/string-base-format-tokenize';\nimport isString from './is_string.js';\n\n\n// MAIN //\n\n/**\n* Inserts supplied variable values into a format string.\n*\n* @param {string} str - input string\n* @param {Array} ...args - variable values\n* @throws {TypeError} first argument must be a string\n* @throws {Error} invalid flags\n* @returns {string} formatted string\n*\n* @example\n* var str = format( 'Hello %s!', 'world' );\n* // returns 'Hello world!'\n*\n* @example\n* var str = format( 'Pi: ~%.2f', 3.141592653589793 );\n* // returns 'Pi: ~3.14'\n*/\nfunction format( str ) {\n\tvar tokens;\n\tvar args;\n\tvar i;\n\n\tif ( !isString( str ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a string. Value: `%s`.', str ) );\n\t}\n\ttokens = tokenize( str );\n\targs = new Array( arguments.length );\n\targs[ 0 ] = tokens;\n\tfor ( i = 1; i < args.length; i++ ) {\n\t\targs[ i ] = arguments[ i ];\n\t}\n\treturn interpolate.apply( null, args );\n}\n\n\n// EXPORTS //\n\nexport default format;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable no-underscore-dangle, no-proto */\n\n'use strict';\n\n// MODULES //\n\nimport format from '@stdlib/string-format';\n\n\n// VARIABLES //\n\nvar objectProtoype = Object.prototype;\nvar toStr = objectProtoype.toString;\nvar defineGetter = objectProtoype.__defineGetter__;\nvar defineSetter = objectProtoype.__defineSetter__;\nvar lookupGetter = objectProtoype.__lookupGetter__;\nvar lookupSetter = objectProtoype.__lookupSetter__;\n\n\n// MAIN //\n\n/**\n* Defines (or modifies) an object property.\n*\n* ## Notes\n*\n* - Property descriptors come in two flavors: **data descriptors** and **accessor descriptors**. A data descriptor is a property that has a value, which may or may not be writable. An accessor descriptor is a property described by a getter-setter function pair. A descriptor must be one of these two flavors and cannot be both.\n*\n* @param {Object} obj - object on which to define the property\n* @param {string} prop - property name\n* @param {Object} descriptor - property descriptor\n* @param {boolean} [descriptor.configurable=false] - boolean indicating if property descriptor can be changed and if the property can be deleted from the provided object\n* @param {boolean} [descriptor.enumerable=false] - boolean indicating if the property shows up when enumerating object properties\n* @param {boolean} [descriptor.writable=false] - boolean indicating if the value associated with the property can be changed with an assignment operator\n* @param {*} [descriptor.value] - property value\n* @param {(Function|void)} [descriptor.get=undefined] - function which serves as a getter for the property, or, if no getter, undefined. When the property is accessed, a getter function is called without arguments and with the `this` context set to the object through which the property is accessed (which may not be the object on which the property is defined due to inheritance). The return value will be used as the property value.\n* @param {(Function|void)} [descriptor.set=undefined] - function which serves as a setter for the property, or, if no setter, undefined. When assigning a property value, a setter function is called with one argument (the value being assigned to the property) and with the `this` context set to the object through which the property is assigned.\n* @throws {TypeError} first argument must be an object\n* @throws {TypeError} third argument must be an object\n* @throws {Error} property descriptor cannot have both a value and a setter and/or getter\n* @returns {Object} object with added property\n*\n* @example\n* var obj = {};\n*\n* defineProperty( obj, 'foo', {\n* 'value': 'bar'\n* });\n*\n* var str = obj.foo;\n* // returns 'bar'\n*/\nfunction defineProperty( obj, prop, descriptor ) {\n\tvar prototype;\n\tvar hasValue;\n\tvar hasGet;\n\tvar hasSet;\n\n\tif ( typeof obj !== 'object' || obj === null || toStr.call( obj ) === '[object Array]' ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be an object. Value: `%s`.', obj ) );\n\t}\n\tif ( typeof descriptor !== 'object' || descriptor === null || toStr.call( descriptor ) === '[object Array]' ) {\n\t\tthrow new TypeError( format( 'invalid argument. Property descriptor must be an object. Value: `%s`.', descriptor ) );\n\t}\n\thasValue = ( 'value' in descriptor );\n\tif ( hasValue ) {\n\t\tif (\n\t\t\tlookupGetter.call( obj, prop ) ||\n\t\t\tlookupSetter.call( obj, prop )\n\t\t) {\n\t\t\t// Override `__proto__` to avoid touching inherited accessors:\n\t\t\tprototype = obj.__proto__;\n\t\t\tobj.__proto__ = objectProtoype;\n\n\t\t\t// Delete property as existing getters/setters prevent assigning value to specified property:\n\t\t\tdelete obj[ prop ];\n\t\t\tobj[ prop ] = descriptor.value;\n\n\t\t\t// Restore original prototype:\n\t\t\tobj.__proto__ = prototype;\n\t\t} else {\n\t\t\tobj[ prop ] = descriptor.value;\n\t\t}\n\t}\n\thasGet = ( 'get' in descriptor );\n\thasSet = ( 'set' in descriptor );\n\n\tif ( hasValue && ( hasGet || hasSet ) ) {\n\t\tthrow new Error( 'invalid argument. Cannot specify one or more accessors and a value or writable attribute in the property descriptor.' );\n\t}\n\n\tif ( hasGet && defineGetter ) {\n\t\tdefineGetter.call( obj, prop, descriptor.get );\n\t}\n\tif ( hasSet && defineSetter ) {\n\t\tdefineSetter.call( obj, prop, descriptor.set );\n\t}\n\treturn obj;\n}\n\n\n// EXPORTS //\n\nexport default defineProperty;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Define (or modify) an object property.\n*\n* @module @stdlib/utils-define-property\n*\n* @example\n* import defineProperty from '@stdlib/utils-define-property';\n*\n* var obj = {};\n* defineProperty( obj, 'foo', {\n* 'value': 'bar',\n* 'writable': false,\n* 'configurable': false,\n* 'enumerable': false\n* });\n* obj.foo = 'boop'; // => throws\n*/\n\n// MODULES //\n\nimport hasDefinePropertySupport from './has_define_property_support.js';\nimport builtin from './builtin.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar defineProperty;\nif ( hasDefinePropertySupport() ) {\n\tdefineProperty = builtin;\n} else {\n\tdefineProperty = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default defineProperty;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport defineProperty from './define_property.js';\n\n\n// MAIN //\n\n/**\n* Tests for `Object.defineProperty` support.\n*\n* @private\n* @returns {boolean} boolean indicating if an environment has `Object.defineProperty` support\n*\n* @example\n* var bool = hasDefinePropertySupport();\n* // returns \n*/\nfunction hasDefinePropertySupport() {\n\t// Test basic support...\n\ttry {\n\t\tdefineProperty( {}, 'x', {} );\n\t\treturn true;\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\treturn false;\n\t}\n}\n\n\n// EXPORTS //\n\nexport default hasDefinePropertySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport defineProperty from '@stdlib/utils-define-property';\n\n\n// MAIN //\n\n/**\n* Defines a non-enumerable read-only property.\n*\n* @param {Object} obj - object on which to define the property\n* @param {(string|symbol)} prop - property name\n* @param {*} value - value to set\n*\n* @example\n* var obj = {};\n*\n* setNonEnumerableReadOnly( obj, 'foo', 'bar' );\n*\n* try {\n* obj.foo = 'boop';\n* } catch ( err ) {\n* console.error( err.message );\n* }\n*/\nfunction setNonEnumerableReadOnly( obj, prop, value ) {\n\tdefineProperty( obj, prop, {\n\t\t'configurable': false,\n\t\t'enumerable': false,\n\t\t'writable': false,\n\t\t'value': value\n\t});\n}\n\n\n// EXPORTS //\n\nexport default setNonEnumerableReadOnly;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Tests if a value is a number primitive.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number primitive\n*\n* @example\n* var bool = isNumber( 3.14 );\n* // returns true\n*\n* @example\n* var bool = isNumber( NaN );\n* // returns true\n*\n* @example\n* var bool = isNumber( new Number( 3.14 ) );\n* // returns false\n*/\nfunction isNumber( value ) {\n\treturn ( typeof value === 'number' );\n}\n\n\n// EXPORTS //\n\nexport default isNumber;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport hasSymbols from '@stdlib/assert-has-symbol-support';\n\n\n// VARIABLES //\n\nvar FLG = hasSymbols();\n\n\n// MAIN //\n\n/**\n* Tests for native `toStringTag` support.\n*\n* @returns {boolean} boolean indicating if an environment has `toStringTag` support\n*\n* @example\n* var bool = hasToStringTagSupport();\n* // returns \n*/\nfunction hasToStringTagSupport() {\n\treturn ( FLG && typeof Symbol.toStringTag === 'symbol' );\n}\n\n\n// EXPORTS //\n\nexport default hasToStringTagSupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Tests for native `Symbol` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Symbol` support\n*\n* @example\n* var bool = hasSymbolSupport();\n* // returns \n*/\nfunction hasSymbolSupport() {\n\treturn (\n\t\ttypeof Symbol === 'function' &&\n\t\ttypeof Symbol( 'foo' ) === 'symbol'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default hasSymbolSupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar toStr = Object.prototype.toString;\n\n\n// EXPORTS //\n\nexport default toStr;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// FUNCTIONS //\n\nvar has = Object.prototype.hasOwnProperty;\n\n\n// MAIN //\n\n/**\n* Tests if an object has a specified property.\n*\n* @param {*} value - value to test\n* @param {*} property - property to test\n* @returns {boolean} boolean indicating if an object has a specified property\n*\n* @example\n* var beep = {\n* 'boop': true\n* };\n*\n* var bool = hasOwnProp( beep, 'boop' );\n* // returns true\n*\n* @example\n* var beep = {\n* 'boop': true\n* };\n*\n* var bool = hasOwnProp( beep, 'bap' );\n* // returns false\n*/\nfunction hasOwnProp( value, property ) {\n\tif (\n\t\tvalue === void 0 ||\n\t\tvalue === null\n\t) {\n\t\treturn false;\n\t}\n\treturn has.call( value, property );\n}\n\n\n// EXPORTS //\n\nexport default hasOwnProp;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar Sym = ( typeof Symbol === 'function' ) ? Symbol : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default Sym;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport Symbol from '@stdlib/symbol-ctor';\n\n\n// MAIN //\n\nvar toStrTag = ( typeof Symbol === 'function' ) ? Symbol.toStringTag : '';\n\n\n// EXPORTS //\n\nexport default toStrTag;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Return a string value indicating a specification defined classification of an object.\n*\n* @module @stdlib/utils-native-class\n*\n* @example\n* import nativeClass from '@stdlib/utils-native-class';\n*\n* var str = nativeClass( 'a' );\n* // returns '[object String]'\n*\n* str = nativeClass( 5 );\n* // returns '[object Number]'\n*\n* function Beep() {\n* return this;\n* }\n* str = nativeClass( new Beep() );\n* // returns '[object Object]'\n*/\n\n// MODULES //\n\nimport hasToStringTag from '@stdlib/assert-has-tostringtag-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar main;\nif ( hasToStringTag() ) {\n\tmain = polyfill;\n} else {\n\tmain = builtin;\n}\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport hasOwnProp from '@stdlib/assert-has-own-property';\nimport toStringTag from './tostringtag.js';\nimport toStr from './tostring.js';\n\n\n// MAIN //\n\n/**\n* Returns a string value indicating a specification defined classification of an object in environments supporting `Symbol.toStringTag`.\n*\n* @param {*} v - input value\n* @returns {string} string value indicating a specification defined classification of the input value\n*\n* @example\n* var str = nativeClass( 'a' );\n* // returns '[object String]'\n*\n* @example\n* var str = nativeClass( 5 );\n* // returns '[object Number]'\n*\n* @example\n* function Beep() {\n* return this;\n* }\n* var str = nativeClass( new Beep() );\n* // returns '[object Object]'\n*/\nfunction nativeClass( v ) {\n\tvar isOwn;\n\tvar tag;\n\tvar out;\n\n\tif ( v === null || v === void 0 ) {\n\t\treturn toStr.call( v );\n\t}\n\ttag = v[ toStringTag ];\n\tisOwn = hasOwnProp( v, toStringTag );\n\n\t// Attempt to override the `toStringTag` property. For built-ins having a `Symbol.toStringTag` property (e.g., `JSON`, `Math`, etc), the `Symbol.toStringTag` property is read-only (e.g., , so we need to wrap in a `try/catch`.\n\ttry {\n\t\tv[ toStringTag ] = void 0;\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\treturn toStr.call( v );\n\t}\n\tout = toStr.call( v );\n\n\tif ( isOwn ) {\n\t\tv[ toStringTag ] = tag;\n\t} else {\n\t\tdelete v[ toStringTag ];\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default nativeClass;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport toStr from './tostring.js';\n\n\n// MAIN //\n\n/**\n* Returns a string value indicating a specification defined classification (via the internal property `[[Class]]`) of an object.\n*\n* @param {*} v - input value\n* @returns {string} string value indicating a specification defined classification of the input value\n*\n* @example\n* var str = nativeClass( 'a' );\n* // returns '[object String]'\n*\n* @example\n* var str = nativeClass( 5 );\n* // returns '[object Number]'\n*\n* @example\n* function Beep() {\n* return this;\n* }\n* var str = nativeClass( new Beep() );\n* // returns '[object Object]'\n*/\nfunction nativeClass( v ) {\n\treturn toStr.call( v );\n}\n\n\n// EXPORTS //\n\nexport default nativeClass;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// EXPORTS //\n\nexport default Number; // eslint-disable-line stdlib/require-globals\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport Number from '@stdlib/number-ctor';\n\n\n// MAIN //\n\n// eslint-disable-next-line stdlib/no-redeclare\nvar toString = Number.prototype.toString; // non-generic\n\n\n// EXPORTS //\n\nexport default toString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport hasToStringTag from '@stdlib/assert-has-tostringtag-support';\nimport nativeClass from '@stdlib/utils-native-class';\nimport Number from '@stdlib/number-ctor';\nimport test from './try2serialize.js';\n\n\n// VARIABLES //\n\nvar FLG = hasToStringTag();\n\n\n// MAIN //\n\n/**\n* Tests if a value is a number object.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number object\n*\n* @example\n* var bool = isNumber( 3.14 );\n* // returns false\n*\n* @example\n* var bool = isNumber( new Number( 3.14 ) );\n* // returns true\n*/\nfunction isNumber( value ) {\n\tif ( typeof value === 'object' ) {\n\t\tif ( value instanceof Number ) {\n\t\t\treturn true;\n\t\t}\n\t\tif ( FLG ) {\n\t\t\treturn test( value );\n\t\t}\n\t\treturn ( nativeClass( value ) === '[object Number]' );\n\t}\n\treturn false;\n}\n\n\n// EXPORTS //\n\nexport default isNumber;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport toString from './tostring.js'; // eslint-disable-line stdlib/no-redeclare\n\n\n// MAIN //\n\n/**\n* Attempts to serialize a value to a string.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value can be serialized\n*/\nfunction test( value ) {\n\ttry {\n\t\ttoString.call( value );\n\t\treturn true;\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\treturn false;\n\t}\n}\n\n\n// EXPORTS //\n\nexport default test;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a number.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a number\n*\n* @example\n* var bool = isNumber( 3.14 );\n* // returns true\n*\n* @example\n* var bool = isNumber( new Number( 3.14 ) );\n* // returns true\n*\n* @example\n* var bool = isNumber( NaN );\n* // returns true\n*\n* @example\n* var bool = isNumber( null );\n* // returns false\n*/\nfunction isNumber( value ) {\n\treturn ( isPrimitive( value ) || isObject( value ) );\n}\n\n\n// EXPORTS //\n\nexport default isNumber;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test if a value is a number.\n*\n* @module @stdlib/assert-is-number\n*\n* @example\n* import isNumber from '@stdlib/assert-is-number';\n*\n* var bool = isNumber( 3.14 );\n* // returns true\n*\n* bool = isNumber( new Number( 3.14 ) );\n* // returns true\n*\n* bool = isNumber( NaN );\n* // returns true\n*\n* bool = isNumber( null );\n* // returns false\n*\n* @example\n* import { isPrimitive as isNumber } from '@stdlib/assert-is-number';\n*\n* var bool = isNumber( 3.14 );\n* // returns true\n*\n* bool = isNumber( NaN );\n* // returns true\n*\n* bool = isNumber( new Number( 3.14 ) );\n* // returns false\n*\n* @example\n* import { isObject as isNumber } from '@stdlib/assert-is-number';\n*\n* var bool = isNumber( 3.14 );\n* // returns false\n*\n* bool = isNumber( new Number( 3.14 ) );\n* // returns true\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'isPrimitive', isPrimitive );\nsetReadOnly( main, 'isObject', isObject );\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Double-precision floating-point positive infinity.\n*\n* @module @stdlib/constants-float64-pinf\n* @type {number}\n*\n* @example\n* import FLOAT64_PINF from '@stdlib/constants-float64-pinf';\n* // returns Infinity\n*/\n\n\n// MAIN //\n\n/**\n* Double-precision floating-point positive infinity.\n*\n* ## Notes\n*\n* Double-precision floating-point positive infinity has the bit sequence\n*\n* ```binarystring\n* 0 11111111111 00000000000000000000 00000000000000000000000000000000\n* ```\n*\n* @constant\n* @type {number}\n* @default Number.POSITIVE_INFINITY\n* @see [IEEE 754]{@link https://en.wikipedia.org/wiki/IEEE_754-1985}\n*/\nvar FLOAT64_PINF = Number.POSITIVE_INFINITY; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default FLOAT64_PINF;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Double-precision floating-point negative infinity.\n*\n* @module @stdlib/constants-float64-ninf\n* @type {number}\n*\n* @example\n* import FLOAT64_NINF from '@stdlib/constants-float64-ninf';\n* // returns -Infinity\n*/\n\n// MODULES //\n\nimport Number from '@stdlib/number-ctor';\n\n\n// MAIN //\n\n/**\n* Double-precision floating-point negative infinity.\n*\n* ## Notes\n*\n* Double-precision floating-point negative infinity has the bit sequence\n*\n* ```binarystring\n* 1 11111111111 00000000000000000000 00000000000000000000000000000000\n* ```\n*\n* @constant\n* @type {number}\n* @default Number.NEGATIVE_INFINITY\n* @see [IEEE 754]{@link https://en.wikipedia.org/wiki/IEEE_754-1985}\n*/\nvar FLOAT64_NINF = Number.NEGATIVE_INFINITY;\n\n\n// EXPORTS //\n\nexport default FLOAT64_NINF;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: implementation (?)\n\n/**\n* Rounds a double-precision floating-point number toward negative infinity.\n*\n* @param {number} x - input value\n* @returns {number} rounded value\n*\n* @example\n* var v = floor( -4.2 );\n* // returns -5.0\n*\n* @example\n* var v = floor( 9.99999 );\n* // returns 9.0\n*\n* @example\n* var v = floor( 0.0 );\n* // returns 0.0\n*\n* @example\n* var v = floor( NaN );\n* // returns NaN\n*/\nvar floor = Math.floor; // eslint-disable-line stdlib/no-builtin-math\n\n\n// EXPORTS //\n\nexport default floor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport floor from '@stdlib/math-base-special-floor';\n\n\n// MAIN //\n\n/**\n* Tests if a finite double-precision floating-point number is an integer.\n*\n* @param {number} x - value to test\n* @returns {boolean} boolean indicating whether the value is an integer\n*\n* @example\n* var bool = isInteger( 1.0 );\n* // returns true\n*\n* @example\n* var bool = isInteger( 3.14 );\n* // returns false\n*/\nfunction isInteger( x ) {\n\treturn (floor(x) === x);\n}\n\n\n// EXPORTS //\n\nexport default isInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport PINF from '@stdlib/constants-float64-pinf';\nimport NINF from '@stdlib/constants-float64-ninf';\nimport isInt from '@stdlib/math-base-assert-is-integer';\n\n\n// MAIN //\n\n/**\n* Tests if a number primitive is an integer value.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a number primitive is an integer value\n*/\nfunction isInteger( value ) {\n\treturn (\n\t\tvalue < PINF &&\n\t\tvalue > NINF &&\n\t\tisInt( value )\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isNumber } from '@stdlib/assert-is-number';\nimport isInt from './integer.js';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a number primitive having an integer value.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number primitive having an integer value\n*\n* @example\n* var bool = isInteger( -3.0 );\n* // returns true\n*\n* @example\n* var bool = isInteger( new Number( -3.0 ) );\n* // returns false\n*/\nfunction isInteger( value ) {\n\treturn (\n\t\tisNumber( value ) &&\n\t\tisInt( value )\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isObject as isNumber } from '@stdlib/assert-is-number';\nimport isInt from './integer.js';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a number object having an integer value.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number object having an integer value\n*\n* @example\n* var bool = isInteger( 3.0 );\n* // returns false\n*\n* @example\n* var bool = isInteger( new Number( 3.0 ) );\n* // returns true\n*/\nfunction isInteger( value ) {\n\treturn (\n\t\tisNumber( value ) &&\n\t\tisInt( value.valueOf() )\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\n/**\n* Tests if a value is an integer.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an integer\n*\n* @example\n* var bool = isInteger( 5.0 );\n* // returns true\n*\n* @example\n* var bool = isInteger( new Number( 5.0 ) );\n* // returns true\n*\n* @example\n* var bool = isInteger( -3.14 );\n* // returns false\n*\n* @example\n* var bool = isInteger( null );\n* // returns false\n*/\nfunction isInteger( value ) {\n\treturn ( isPrimitive( value ) || isObject( value ) );\n}\n\n\n// EXPORTS //\n\nexport default isInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isInteger } from '@stdlib/assert-is-integer';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a number primitive having a nonnegative integer value.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number primitive having a nonnegative integer value\n*\n* @example\n* var bool = isNonNegativeInteger( 3.0 );\n* // returns true\n*\n* @example\n* var bool = isNonNegativeInteger( new Number( 3.0 ) );\n* // returns false\n*/\nfunction isNonNegativeInteger( value ) {\n\treturn (\n\t\tisInteger( value ) &&\n\t\tvalue >= 0\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isNonNegativeInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isObject as isInteger } from '@stdlib/assert-is-integer';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a number object having a nonnegative integer value.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number object having a nonnegative integer value\n*\n* @example\n* var bool = isNonNegativeInteger( 3.0 );\n* // returns false\n*\n* @example\n* var bool = isNonNegativeInteger( new Number( 3.0 ) );\n* // returns true\n*/\nfunction isNonNegativeInteger( value ) {\n\treturn (\n\t\tisInteger( value ) &&\n\t\tvalue.valueOf() >= 0\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isNonNegativeInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a nonnegative integer.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a nonnegative integer\n*\n* @example\n* var bool = isNonNegativeInteger( 5.0 );\n* // returns true\n*\n* @example\n* var bool = isNonNegativeInteger( new Number( 5.0 ) );\n* // returns true\n*\n* @example\n* var bool = isNonNegativeInteger( -5.0 );\n* // returns false\n*\n* @example\n* var bool = isNonNegativeInteger( 3.14 );\n* // returns false\n*\n* @example\n* var bool = isNonNegativeInteger( null );\n* // returns false\n*/\nfunction isNonNegativeInteger( value ) {\n\treturn ( isPrimitive( value ) || isObject( value ) );\n}\n\n\n// EXPORTS //\n\nexport default isNonNegativeInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test if a value is an integer.\n*\n* @module @stdlib/assert-is-integer\n*\n* @example\n* import isInteger from '@stdlib/assert-is-integer';\n*\n* var bool = isInteger( 5.0 );\n* // returns true\n*\n* bool = isInteger( new Number( 5.0 ) );\n* // returns true\n*\n* bool = isInteger( -3.14 );\n* // returns false\n*\n* bool = isInteger( null );\n* // returns false\n*\n* @example\n* // Use interface to check for integer primitives...\n* import { isPrimitive as isInteger } from '@stdlib/assert-is-integer';\n*\n* var bool = isInteger( -3.0 );\n* // returns true\n*\n* bool = isInteger( new Number( -3.0 ) );\n* // returns false\n*\n* @example\n* // Use interface to check for integer objects...\n* import { isObject as isInteger } from '@stdlib/assert-is-integer';\n*\n* var bool = isInteger( 3.0 );\n* // returns false\n*\n* bool = isInteger( new Number( 3.0 ) );\n* // returns true\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'isPrimitive', isPrimitive );\nsetReadOnly( main, 'isObject', isObject );\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test if a value is a nonnegative integer.\n*\n* @module @stdlib/assert-is-nonnegative-integer\n*\n* @example\n* import isNonNegativeInteger from '@stdlib/assert-is-nonnegative-integer';\n*\n* var bool = isNonNegativeInteger( 5.0 );\n* // returns true\n*\n* bool = isNonNegativeInteger( new Number( 5.0 ) );\n* // returns true\n*\n* bool = isNonNegativeInteger( -5.0 );\n* // returns false\n*\n* bool = isNonNegativeInteger( 3.14 );\n* // returns false\n*\n* bool = isNonNegativeInteger( null );\n* // returns false\n*\n* @example\n* import { isPrimitive as isNonNegativeInteger } from '@stdlib/assert-is-nonnegative-integer';\n*\n* var bool = isNonNegativeInteger( 3.0 );\n* // returns true\n*\n* bool = isNonNegativeInteger( new Number( 3.0 ) );\n* // returns false\n*\n* @example\n* import { isObject as isNonNegativeInteger } from '@stdlib/assert-is-nonnegative-integer';\n*\n* var bool = isNonNegativeInteger( 3.0 );\n* // returns false\n*\n* bool = isNonNegativeInteger( new Number( 3.0 ) );\n* // returns true\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'isPrimitive', isPrimitive );\nsetReadOnly( main, 'isObject', isObject );\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasFloat64Array = ( typeof Float64Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Float64Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a Float64Array\n*\n* @example\n* var bool = isFloat64Array( new Float64Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isFloat64Array( [] );\n* // returns false\n*/\nfunction isFloat64Array( value ) {\n\treturn (\n\t\t( hasFloat64Array && value instanceof Float64Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Float64Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isFloat64Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Float64Array === 'function' ) ? Float64Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Float64Array === 'function' ) ? Float64Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of double-precision floating-point numbers in the platform byte order.\n*\n* @module @stdlib/array-float64\n*\n* @example\n* import ctor from '@stdlib/array-float64';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasFloat64ArraySupport from '@stdlib/assert-has-float64array-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasFloat64ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isFloat64Array from '@stdlib/assert-is-float64array';\nimport GlobalFloat64Array from './float64array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Float64Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Float64Array` support\n*\n* @example\n* var bool = hasFloat64ArraySupport();\n* // returns \n*/\nfunction hasFloat64ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalFloat64Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = new GlobalFloat64Array( [ 1.0, 3.14, -3.14, NaN ] );\n\t\tbool = (\n\t\t\tisFloat64Array( arr ) &&\n\t\t\tarr[ 0 ] === 1.0 &&\n\t\t\tarr[ 1 ] === 3.14 &&\n\t\t\tarr[ 2 ] === -3.14 &&\n\t\t\tarr[ 3 ] !== arr[ 3 ]\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasFloat64ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of double-precision floating-point numbers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasFloat32Array = ( typeof Float32Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Float32Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a Float32Array\n*\n* @example\n* var bool = isFloat32Array( new Float32Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isFloat32Array( [] );\n* // returns false\n*/\nfunction isFloat32Array( value ) {\n\treturn (\n\t\t( hasFloat32Array && value instanceof Float32Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Float32Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isFloat32Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Float32Array === 'function' ) ? Float32Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Float32Array === 'function' ) ? Float32Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of single-precision floating-point numbers in the platform byte order.\n*\n* @module @stdlib/array-float32\n*\n* @example\n* import ctor from '@stdlib/array-float32';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasFloat32ArraySupport from '@stdlib/assert-has-float32array-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasFloat32ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isFloat32Array from '@stdlib/assert-is-float32array';\nimport PINF from '@stdlib/constants-float64-pinf';\nimport GlobalFloat32Array from './float32array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Float32Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Float32Array` support\n*\n* @example\n* var bool = hasFloat32ArraySupport();\n* // returns \n*/\nfunction hasFloat32ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalFloat32Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = new GlobalFloat32Array( [ 1.0, 3.14, -3.14, 5.0e40 ] );\n\t\tbool = (\n\t\t\tisFloat32Array( arr ) &&\n\t\t\tarr[ 0 ] === 1.0 &&\n\t\t\tarr[ 1 ] === 3.140000104904175 &&\n\t\t\tarr[ 2 ] === -3.140000104904175 &&\n\t\t\tarr[ 3 ] === PINF\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasFloat32ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of single-precision floating-point numbers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasInt16Array = ( typeof Int16Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is an Int16Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an Int16Array\n*\n* @example\n* var bool = isInt16Array( new Int16Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isInt16Array( [] );\n* // returns false\n*/\nfunction isInt16Array( value ) {\n\treturn (\n\t\t( hasInt16Array && value instanceof Int16Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Int16Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isInt16Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum signed 16-bit integer.\n*\n* @module @stdlib/constants-int16-max\n* @type {integer32}\n*\n* @example\n* import INT16_MAX from '@stdlib/constants-int16-max';\n* // returns 32767\n*/\n\n\n// MAIN //\n\n/**\n* Maximum signed 16-bit integer.\n*\n* ## Notes\n*\n* The number has the value\n*\n* ```tex\n* 2^{15} - 1\n* ```\n*\n* which corresponds to the bit sequence\n*\n* ```binarystring\n* 0111111111111111\n* ```\n*\n* @constant\n* @type {integer32}\n* @default 32767\n*/\nvar INT16_MAX = 32767|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default INT16_MAX;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Int16Array === 'function' ) ? Int16Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Int16Array === 'function' ) ? Int16Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of twos-complement 16-bit signed integers in the platform byte order.\n*\n* @module @stdlib/array-int16\n*\n* @example\n* import ctor from '@stdlib/array-int16';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasInt16ArraySupport from '@stdlib/assert-has-int16array-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasInt16ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isInt16Array from '@stdlib/assert-is-int16array';\nimport INT16_MAX from '@stdlib/constants-int16-max';\nimport INT16_MIN from '@stdlib/constants-int16-min';\nimport GlobalInt16Array from './int16array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Int16Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Int16Array` support\n*\n* @example\n* var bool = hasInt16ArraySupport();\n* // returns \n*/\nfunction hasInt16ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalInt16Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = new GlobalInt16Array( [ 1, 3.14, -3.14, INT16_MAX+1 ] );\n\t\tbool = (\n\t\t\tisInt16Array( arr ) &&\n\t\t\tarr[ 0 ] === 1 &&\n\t\t\tarr[ 1 ] === 3 && // truncation\n\t\t\tarr[ 2 ] === -3 && // truncation\n\t\t\tarr[ 3 ] === INT16_MIN // wrap around\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasInt16ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Minimum signed 16-bit integer.\n*\n* @module @stdlib/constants-int16-min\n* @type {integer32}\n*\n* @example\n* import INT16_MIN from '@stdlib/constants-int16-min';\n* // returns -32768\n*/\n\n\n// MAIN //\n\n/**\n* Minimum signed 16-bit integer.\n*\n* ## Notes\n*\n* The number has the value\n*\n* ```tex\n* -(2^{15})\n* ```\n*\n* which corresponds to the two's complement bit sequence\n*\n* ```binarystring\n* 1000000000000000\n* ```\n*\n* @constant\n* @type {integer32}\n* @default -32768\n*/\nvar INT16_MIN = -32768|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default INT16_MIN;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of twos-complement 16-bit signed integers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasInt32Array = ( typeof Int32Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is an Int32Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an Int32Array\n*\n* @example\n* var bool = isInt32Array( new Int32Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isInt32Array( [] );\n* // returns false\n*/\nfunction isInt32Array( value ) {\n\treturn (\n\t\t( hasInt32Array && value instanceof Int32Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Int32Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isInt32Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum signed 32-bit integer.\n*\n* @module @stdlib/constants-int32-max\n* @type {integer32}\n*\n* @example\n* import INT32_MAX from '@stdlib/constants-int32-max';\n* // returns 2147483647\n*/\n\n\n// MAIN //\n\n/**\n* Maximum signed 32-bit integer.\n*\n* ## Notes\n*\n* The number has the value\n*\n* ```tex\n* 2^{31} - 1\n* ```\n*\n* which corresponds to the bit sequence\n*\n* ```binarystring\n* 01111111111111111111111111111111\n* ```\n*\n* @constant\n* @type {integer32}\n* @default 2147483647\n*/\nvar INT32_MAX = 2147483647|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default INT32_MAX;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Int32Array === 'function' ) ? Int32Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Int32Array === 'function' ) ? Int32Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of twos-complement 32-bit signed integers in the platform byte order.\n*\n* @module @stdlib/array-int32\n*\n* @example\n* import ctor from '@stdlib/array-int32';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasInt32ArraySupport from '@stdlib/assert-has-int32array-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasInt32ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isInt32Array from '@stdlib/assert-is-int32array';\nimport INT32_MAX from '@stdlib/constants-int32-max';\nimport INT32_MIN from '@stdlib/constants-int32-min';\nimport GlobalInt32Array from './int32array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Int32Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Int32Array` support\n*\n* @example\n* var bool = hasInt32ArraySupport();\n* // returns \n*/\nfunction hasInt32ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalInt32Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = new GlobalInt32Array( [ 1, 3.14, -3.14, INT32_MAX+1 ] );\n\t\tbool = (\n\t\t\tisInt32Array( arr ) &&\n\t\t\tarr[ 0 ] === 1 &&\n\t\t\tarr[ 1 ] === 3 && // truncation\n\t\t\tarr[ 2 ] === -3 && // truncation\n\t\t\tarr[ 3 ] === INT32_MIN // wrap around\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasInt32ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Minimum signed 32-bit integer.\n*\n* @module @stdlib/constants-int32-min\n* @type {integer32}\n*\n* @example\n* import INT32_MIN from '@stdlib/constants-int32-min';\n* // returns -2147483648\n*/\n\n\n// MAIN //\n\n/**\n* Minimum signed 32-bit integer.\n*\n* ## Notes\n*\n* The number has the value\n*\n* ```tex\n* -(2^{31})\n* ```\n*\n* which corresponds to the two's complement bit sequence\n*\n* ```binarystring\n* 10000000000000000000000000000000\n* ```\n*\n* @constant\n* @type {integer32}\n* @default -2147483648\n*/\nvar INT32_MIN = -2147483648|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default INT32_MIN;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of twos-complement 32-bit signed integers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasInt8Array = ( typeof Int8Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is an Int8Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an Int8Array\n*\n* @example\n* var bool = isInt8Array( new Int8Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isInt8Array( [] );\n* // returns false\n*/\nfunction isInt8Array( value ) {\n\treturn (\n\t\t( hasInt8Array && value instanceof Int8Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Int8Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isInt8Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum signed 8-bit integer.\n*\n* @module @stdlib/constants-int8-max\n* @type {integer32}\n*\n* @example\n* import INT8_MAX from '@stdlib/constants-int8-max';\n* // returns 127\n*/\n\n\n// MAIN //\n\n/**\n* Maximum signed 8-bit integer.\n*\n* ## Notes\n*\n* The number is given by\n*\n* ```tex\n* 2^{7} - 1\n* ```\n*\n* which corresponds to the bit sequence\n*\n* ```binarystring\n* 01111111\n* ```\n*\n* @constant\n* @type {integer32}\n* @default 127\n*/\nvar INT8_MAX = 127|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default INT8_MAX;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Int8Array === 'function' ) ? Int8Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Int8Array === 'function' ) ? Int8Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of twos-complement 8-bit signed integers in the platform byte order.\n*\n* @module @stdlib/array-int8\n*\n* @example\n* import ctor from '@stdlib/array-int8';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasInt8ArraySupport from '@stdlib/assert-has-int8array-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasInt8ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isInt8Array from '@stdlib/assert-is-int8array';\nimport INT8_MAX from '@stdlib/constants-int8-max';\nimport INT8_MIN from '@stdlib/constants-int8-min';\nimport GlobalInt8Array from './int8array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Int8Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Int8Array` support\n*\n* @example\n* var bool = hasInt8ArraySupport();\n* // returns \n*/\nfunction hasInt8ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalInt8Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = new GlobalInt8Array( [ 1, 3.14, -3.14, INT8_MAX+1 ] );\n\t\tbool = (\n\t\t\tisInt8Array( arr ) &&\n\t\t\tarr[ 0 ] === 1 &&\n\t\t\tarr[ 1 ] === 3 && // truncation\n\t\t\tarr[ 2 ] === -3 && // truncation\n\t\t\tarr[ 3 ] === INT8_MIN // wrap around\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasInt8ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Minimum signed 8-bit integer.\n*\n* @module @stdlib/constants-int8-min\n* @type {integer32}\n*\n* @example\n* import INT8_MIN from '@stdlib/constants-int8-min';\n* // returns -128\n*/\n\n\n// MAIN //\n\n/**\n* Minimum signed 8-bit integer.\n*\n* ## Notes\n*\n* The number is given by\n*\n* ```tex\n* -(2^{7})\n* ```\n*\n* which corresponds to the two's complement bit sequence\n*\n* ```binarystring\n* 10000000\n* ```\n*\n* @constant\n* @type {integer32}\n* @default -128\n*/\nvar INT8_MIN = -128|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default INT8_MIN;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of twos-complement 8-bit signed integers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasUint16Array = ( typeof Uint16Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Uint16Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a Uint16Array\n*\n* @example\n* var bool = isUint16Array( new Uint16Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isUint16Array( [] );\n* // returns false\n*/\nfunction isUint16Array( value ) {\n\treturn (\n\t\t( hasUint16Array && value instanceof Uint16Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Uint16Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isUint16Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum unsigned 16-bit integer.\n*\n* @module @stdlib/constants-uint16-max\n* @type {integer32}\n*\n* @example\n* import UINT16_MAX from '@stdlib/constants-uint16-max';\n* // returns 65535\n*/\n\n\n// MAIN //\n\n/**\n* Maximum unsigned 16-bit integer.\n*\n* ## Notes\n*\n* The number has the value\n*\n* ```tex\n* 2^{16} - 1\n* ```\n*\n* which corresponds to the bit sequence\n*\n* ```binarystring\n* 1111111111111111\n* ```\n*\n* @constant\n* @type {integer32}\n* @default 65535\n*/\nvar UINT16_MAX = 65535|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default UINT16_MAX;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Uint16Array === 'function' ) ? Uint16Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Uint16Array === 'function' ) ? Uint16Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of 16-bit unsigned integers in the platform byte order.\n*\n* @module @stdlib/array-uint16\n*\n* @example\n* import ctor from '@stdlib/array-uint16';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasUint16ArraySupport from '@stdlib/assert-has-uint16array-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasUint16ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isUint16Array from '@stdlib/assert-is-uint16array';\nimport UINT16_MAX from '@stdlib/constants-uint16-max';\nimport GlobalUint16Array from './uint16array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Uint16Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Uint16Array` support\n*\n* @example\n* var bool = hasUint16ArraySupport();\n* // returns \n*/\nfunction hasUint16ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalUint16Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = [ 1, 3.14, -3.14, UINT16_MAX+1, UINT16_MAX+2 ];\n\t\tarr = new GlobalUint16Array( arr );\n\t\tbool = (\n\t\t\tisUint16Array( arr ) &&\n\t\t\tarr[ 0 ] === 1 &&\n\t\t\tarr[ 1 ] === 3 && // truncation\n\t\t\tarr[ 2 ] === UINT16_MAX-2 && // truncation and wrap around\n\t\t\tarr[ 3 ] === 0 && // wrap around\n\t\t\tarr[ 4 ] === 1 // wrap around\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasUint16ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of 16-bit unsigned integers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasUint32Array = ( typeof Uint32Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Uint32Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a Uint32Array\n*\n* @example\n* var bool = isUint32Array( new Uint32Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isUint32Array( [] );\n* // returns false\n*/\nfunction isUint32Array( value ) {\n\treturn (\n\t\t( hasUint32Array && value instanceof Uint32Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Uint32Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isUint32Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum unsigned 32-bit integer.\n*\n* @module @stdlib/constants-uint32-max\n* @type {uinteger32}\n*\n* @example\n* import UINT32_MAX from '@stdlib/constants-uint32-max';\n* // returns 4294967295\n*/\n\n\n// MAIN //\n\n/**\n* Maximum unsigned 32-bit integer.\n*\n* ## Notes\n*\n* The number has the value\n*\n* ```tex\n* 2^{32} - 1\n* ```\n*\n* which corresponds to the bit sequence\n*\n* ```binarystring\n* 11111111111111111111111111111111\n* ```\n*\n* @constant\n* @type {uinteger32}\n* @default 4294967295\n*/\nvar UINT32_MAX = 4294967295;\n\n\n// EXPORTS //\n\nexport default UINT32_MAX;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Uint32Array === 'function' ) ? Uint32Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Uint32Array === 'function' ) ? Uint32Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of 32-bit unsigned integers in the platform byte order.\n*\n* @module @stdlib/array-uint32\n*\n* @example\n* import ctor from '@stdlib/array-uint32';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasUint32ArraySupport from '@stdlib/assert-has-uint32array-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasUint32ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isUint32Array from '@stdlib/assert-is-uint32array';\nimport UINT32_MAX from '@stdlib/constants-uint32-max';\nimport GlobalUint32Array from './uint32array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Uint32Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Uint32Array` support\n*\n* @example\n* var bool = hasUint32ArraySupport();\n* // returns \n*/\nfunction hasUint32ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalUint32Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = [ 1, 3.14, -3.14, UINT32_MAX+1, UINT32_MAX+2 ];\n\t\tarr = new GlobalUint32Array( arr );\n\t\tbool = (\n\t\t\tisUint32Array( arr ) &&\n\t\t\tarr[ 0 ] === 1 &&\n\t\t\tarr[ 1 ] === 3 && // truncation\n\t\t\tarr[ 2 ] === UINT32_MAX-2 && // truncation and wrap around\n\t\t\tarr[ 3 ] === 0 && // wrap around\n\t\t\tarr[ 4 ] === 1 // wrap around\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasUint32ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of 32-bit unsigned integers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasUint8Array = ( typeof Uint8Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Uint8Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a Uint8Array\n*\n* @example\n* var bool = isUint8Array( new Uint8Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isUint8Array( [] );\n* // returns false\n*/\nfunction isUint8Array( value ) {\n\treturn (\n\t\t( hasUint8Array && value instanceof Uint8Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Uint8Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isUint8Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum unsigned 8-bit integer.\n*\n* @module @stdlib/constants-uint8-max\n* @type {integer32}\n*\n* @example\n* import UINT8_MAX from '@stdlib/constants-uint8-max';\n* // returns 255\n*/\n\n\n// MAIN //\n\n/**\n* Maximum unsigned 8-bit integer.\n*\n* ## Notes\n*\n* The number has the value\n*\n* ```tex\n* 2^{8} - 1\n* ```\n*\n* which corresponds to the bit sequence\n*\n* ```binarystring\n* 11111111\n* ```\n*\n* @constant\n* @type {integer32}\n* @default 255\n*/\nvar UINT8_MAX = 255|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default UINT8_MAX;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Uint8Array === 'function' ) ? Uint8Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Uint8Array === 'function' ) ? Uint8Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of 8-bit unsigned integers in the platform byte order.\n*\n* @module @stdlib/array-uint8\n*\n* @example\n* import ctor from '@stdlib/array-uint8';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasUint8ArraySupport from '@stdlib/assert-has-uint8array-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasUint8ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isUint8Array from '@stdlib/assert-is-uint8array';\nimport UINT8_MAX from '@stdlib/constants-uint8-max';\nimport GlobalUint8Array from './uint8array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Uint8Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Uint8Array` support\n*\n* @example\n* var bool = hasUint8ArraySupport();\n* // returns \n*/\nfunction hasUint8ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalUint8Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = [ 1, 3.14, -3.14, UINT8_MAX+1, UINT8_MAX+2 ];\n\t\tarr = new GlobalUint8Array( arr );\n\t\tbool = (\n\t\t\tisUint8Array( arr ) &&\n\t\t\tarr[ 0 ] === 1 &&\n\t\t\tarr[ 1 ] === 3 && // truncation\n\t\t\tarr[ 2 ] === UINT8_MAX-2 && // truncation and wrap around\n\t\t\tarr[ 3 ] === 0 && // wrap around\n\t\t\tarr[ 4 ] === 1 // wrap around\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasUint8ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of 8-bit unsigned integers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasUint8ClampedArray = ( typeof Uint8ClampedArray === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Uint8ClampedArray.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a Uint8ClampedArray\n*\n* @example\n* var bool = isUint8ClampedArray( new Uint8ClampedArray( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isUint8ClampedArray( [] );\n* // returns false\n*/\nfunction isUint8ClampedArray( value ) {\n\treturn (\n\t\t( hasUint8ClampedArray && value instanceof Uint8ClampedArray ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Uint8ClampedArray]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isUint8ClampedArray;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Uint8ClampedArray === 'function' ) ? Uint8ClampedArray : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Uint8ClampedArray === 'function' ) ? Uint8ClampedArray : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of 8-bit unsigned integers in the platform byte order clamped to 0-255.\n*\n* @module @stdlib/array-uint8c\n*\n* @example\n* import ctor from '@stdlib/array-uint8c';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasUint8ClampedArraySupport from '@stdlib/assert-has-uint8clampedarray-support'; // eslint-disable-line id-length\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasUint8ClampedArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isUint8ClampedArray from '@stdlib/assert-is-uint8clampedarray';\nimport GlobalUint8ClampedArray from './uint8clampedarray.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Uint8ClampedArray` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Uint8ClampedArray` support\n*\n* @example\n* var bool = hasUint8ClampedArraySupport();\n* // returns \n*/\nfunction hasUint8ClampedArraySupport() { // eslint-disable-line id-length\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalUint8ClampedArray !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = new GlobalUint8ClampedArray( [ -1, 0, 1, 3.14, 4.99, 255, 256 ] );\n\t\tbool = (\n\t\t\tisUint8ClampedArray( arr ) &&\n\t\t\tarr[ 0 ] === 0 && // clamped\n\t\t\tarr[ 1 ] === 0 &&\n\t\t\tarr[ 2 ] === 1 &&\n\t\t\tarr[ 3 ] === 3 && // round to nearest\n\t\t\tarr[ 4 ] === 5 && // round to nearest\n\t\t\tarr[ 5 ] === 255 &&\n\t\t\tarr[ 6 ] === 255 // clamped\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasUint8ClampedArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of 8-bit unsigned integers in the platform byte order clamped to 0-255.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isInteger from '@stdlib/math-base-assert-is-integer';\nimport MAX_LENGTH from '@stdlib/constants-array-max-array-length';\n\n\n// MAIN //\n\n/**\n* Tests if a value is an array-like object.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is an array-like object\n*\n* @example\n* var bool = isArrayLikeObject( [] );\n* // returns true\n*\n* @example\n* var bool = isArrayLikeObject( { 'length':10 } );\n* // returns true\n*\n* @example\n* var bool = isArrayLikeObject( 'beep' );\n* // returns false\n*/\nfunction isArrayLikeObject( value ) {\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\ttypeof value.length === 'number' &&\n\t\tisInteger( value.length ) &&\n\t\tvalue.length >= 0 &&\n\t\tvalue.length <= MAX_LENGTH\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isArrayLikeObject;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum length of a generic array.\n*\n* @module @stdlib/constants-array-max-array-length\n*\n* @example\n* import MAX_ARRAY_LENGTH from '@stdlib/constants-array-max-array-length';\n* // returns 4294967295\n*/\n\n// MAIN //\n\n/**\n* Maximum length of a generic array.\n*\n* ```tex\n* 2^{32} - 1\n* ```\n*\n* @constant\n* @type {uinteger32}\n* @default 4294967295\n*/\nvar MAX_ARRAY_LENGTH = 4294967295>>>0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default MAX_ARRAY_LENGTH;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isInteger from '@stdlib/math-base-assert-is-integer';\nimport MAX_LENGTH from '@stdlib/constants-array-max-typed-array-length';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a collection.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether a value is a collection\n*\n* @example\n* var bool = isCollection( [] );\n* // returns true\n*\n* @example\n* var bool = isCollection( {} );\n* // returns false\n*/\nfunction isCollection( value ) {\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\ttypeof value.length === 'number' &&\n\t\tisInteger( value.length ) &&\n\t\tvalue.length >= 0 &&\n\t\tvalue.length <= MAX_LENGTH\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isCollection;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum length of a typed array.\n*\n* @module @stdlib/constants-array-max-typed-array-length\n*\n* @example\n* import MAX_TYPED_ARRAY_LENGTH from '@stdlib/constants-array-max-typed-array-length';\n* // returns 9007199254740991\n*/\n\n// MAIN //\n\n/**\n* Maximum length of a typed array.\n*\n* ```tex\n* 2^{53} - 1\n* ```\n*\n* @constant\n* @type {number}\n* @default 9007199254740991\n*/\nvar MAX_TYPED_ARRAY_LENGTH = 9007199254740991;\n\n\n// EXPORTS //\n\nexport default MAX_TYPED_ARRAY_LENGTH;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasArrayBuffer = ( typeof ArrayBuffer === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is an ArrayBuffer.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an ArrayBuffer\n*\n* @example\n* import ArrayBuffer from '@stdlib/array-buffer';\n*\n* var bool = isArrayBuffer( new ArrayBuffer( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isArrayBuffer( [] );\n* // returns false\n*/\nfunction isArrayBuffer( value ) {\n\treturn (\n\t\t( hasArrayBuffer && value instanceof ArrayBuffer ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object ArrayBuffer]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isArrayBuffer;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar f;\n\n\n// FUNCTIONS //\n\n/**\n* Tests if a value is an array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an array\n*\n* @example\n* var bool = isArray( [] );\n* // returns true\n*\n* @example\n* var bool = isArray( {} );\n* // returns false\n*/\nfunction isArray( value ) {\n\treturn ( nativeClass( value ) === '[object Array]' );\n}\n\n\n// MAIN //\n\nif ( Array.isArray ) {\n\tf = Array.isArray;\n} else {\n\tf = isArray;\n}\n\n\n// EXPORTS //\n\nexport default f;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isArray from '@stdlib/assert-is-array';\n\n\n// MAIN //\n\n/**\n* Tests if a value is an object; e.g., `{}`.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an object\n*\n* @example\n* var bool = isObject( {} );\n* // returns true\n*\n* @example\n* var bool = isObject( null );\n* // returns false\n*/\nfunction isObject( value ) {\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\t!isArray( value )\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isObject;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\nvar RE = /./;\n\n\n// EXPORTS //\n\nexport default RE;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Tests if a value is a boolean primitive.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a boolean primitive\n*\n* @example\n* var bool = isBoolean( true );\n* // returns true\n*\n* @example\n* var bool = isBoolean( false );\n* // returns true\n*\n* @example\n* import Boolean from '@stdlib/boolean-ctor';\n*\n* var bool = isBoolean( new Boolean( true ) );\n* // returns false\n*/\nfunction isBoolean( value ) {\n\treturn ( typeof value === 'boolean' );\n}\n\n\n// EXPORTS //\n\nexport default isBoolean;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Returns a boolean.\n*\n* @name Boolean\n* @constructor\n* @type {Function}\n* @param {*} value - input value\n* @returns {(boolean|Boolean)} boolean\n*\n* @example\n* var b = Boolean( null );\n* // returns false\n*\n* b = Boolean( [] );\n* // returns true\n*\n* b = Boolean( {} );\n* // returns true\n*\n* @example\n* var b = new Boolean( false );\n* // returns \n*/\nvar Bool = Boolean; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default Bool;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// eslint-disable-next-line stdlib/no-redeclare\nvar toString = Boolean.prototype.toString; // non-generic\n\n\n// EXPORTS //\n\nexport default toString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport hasToStringTag from '@stdlib/assert-has-tostringtag-support';\nimport nativeClass from '@stdlib/utils-native-class';\nimport Boolean from '@stdlib/boolean-ctor';\nimport test from './try2serialize.js';\n\n\n// VARIABLES //\n\nvar FLG = hasToStringTag();\n\n\n// MAIN //\n\n/**\n* Tests if a value is a boolean object.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a boolean object\n*\n* @example\n* var bool = isBoolean( true );\n* // returns false\n*\n* @example\n* import Boolean from '@stdlib/boolean-ctor';\n*\n* var bool = isBoolean( new Boolean( false ) );\n* // returns true\n*/\nfunction isBoolean( value ) {\n\tif ( typeof value === 'object' ) {\n\t\tif ( value instanceof Boolean ) {\n\t\t\treturn true;\n\t\t}\n\t\tif ( FLG ) {\n\t\t\treturn test( value );\n\t\t}\n\t\treturn ( nativeClass( value ) === '[object Boolean]' );\n\t}\n\treturn false;\n}\n\n\n// EXPORTS //\n\nexport default isBoolean;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport toString from './tostring.js'; // eslint-disable-line stdlib/no-redeclare\n\n\n// MAIN //\n\n/**\n* Attempts to serialize a value to a string.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value can be serialized\n*/\nfunction test( value ) {\n\ttry {\n\t\ttoString.call( value );\n\t\treturn true;\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\treturn false;\n\t}\n}\n\n\n// EXPORTS //\n\nexport default test;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a boolean.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a boolean\n*\n* @example\n* var bool = isBoolean( false );\n* // returns true\n*\n* @example\n* var bool = isBoolean( true );\n* // returns true\n*\n* @example\n* import Boolean from '@stdlib/boolean-ctor';\n*\n* var bool = isBoolean( new Boolean( false ) );\n* // returns true\n*\n* @example\n* import Boolean from '@stdlib/boolean-ctor';\n*\n* var bool = isBoolean( new Boolean( true ) );\n* // returns true\n*/\nfunction isBoolean( value ) {\n\treturn ( isPrimitive( value ) || isObject( value ) );\n}\n\n\n// EXPORTS //\n\nexport default isBoolean;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Returns the global object using code generation.\n*\n* @private\n* @returns {Object} global object\n*/\nfunction getGlobal() {\n\treturn new Function( 'return this;' )(); // eslint-disable-line no-new-func, stdlib/require-globals\n}\n\n\n// EXPORTS //\n\nexport default getGlobal;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test if a value is a boolean.\n*\n* @module @stdlib/assert-is-boolean\n*\n* @example\n* import Boolean from '@stdlib/boolean-ctor';\n* import isBoolean from '@stdlib/assert-is-boolean';\n*\n* var bool = isBoolean( false );\n* // returns true\n*\n* bool = isBoolean( new Boolean( false ) );\n* // returns true\n*\n* @example\n* import Boolean from '@stdlib/boolean-ctor';\n* import { isPrimitive as isBoolean } from '@stdlib/assert-is-boolean';\n*\n* var bool = isBoolean( false );\n* // returns true\n*\n* bool = isBoolean( new Boolean( true ) );\n* // returns false\n*\n* @example\n* import Boolean from '@stdlib/boolean-ctor';\n* import { isObject as isBoolean } from '@stdlib/assert-is-boolean';\n*\n* var bool = isBoolean( true );\n* // returns false\n*\n* bool = isBoolean( new Boolean( false ) );\n* // returns true\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'isPrimitive', isPrimitive );\nsetReadOnly( main, 'isObject', isObject );\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar obj = ( typeof self === 'object' ) ? self : null;\n\n\n// EXPORTS //\n\nexport default obj;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar obj = ( typeof window === 'object' ) ? window : null;\n\n\n// EXPORTS //\n\nexport default obj;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar obj = ( typeof global === 'object' ) ? global : null;\n\n\n// EXPORTS //\n\nexport default obj;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar obj = ( typeof globalThis === 'object' ) ? globalThis : null; // eslint-disable-line no-undef\n\n\n// EXPORTS //\n\nexport default obj;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport getGlobal from '@stdlib/utils-global';\n\n\n// MAIN //\n\nvar root = getGlobal();\nvar nodeList = root.document && root.document.childNodes;\n\n\n// EXPORTS //\n\nexport default nodeList;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isBoolean } from '@stdlib/assert-is-boolean';\nimport format from '@stdlib/string-format';\nimport getThis from './codegen.js';\nimport Self from './self.js';\nimport Win from './window.js';\nimport Global from './global.js';\nimport GlobalThis from './global_this.js';\n\n\n// MAIN //\n\n/**\n* Returns the global object.\n*\n* ## Notes\n*\n* - Using code generation is the **most** reliable way to resolve the global object; however, doing so is likely to violate content security policies (CSPs) in, e.g., Chrome Apps and elsewhere.\n*\n* @param {boolean} [codegen=false] - boolean indicating whether to use code generation to resolve the global object\n* @throws {TypeError} must provide a boolean\n* @throws {Error} unable to resolve global object\n* @returns {Object} global object\n*\n* @example\n* var g = getGlobal();\n* // returns {...}\n*/\nfunction getGlobal( codegen ) {\n\tif ( arguments.length ) {\n\t\tif ( !isBoolean( codegen ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Must provide a boolean. Value: `%s`.', codegen ) );\n\t\t}\n\t\tif ( codegen ) {\n\t\t\treturn getThis();\n\t\t}\n\t\t// Fall through...\n\t}\n\t// Case: 2020 revision of ECMAScript standard\n\tif ( GlobalThis ) {\n\t\treturn GlobalThis;\n\t}\n\t// Case: browsers and web workers\n\tif ( Self ) {\n\t\treturn Self;\n\t}\n\t// Case: browsers\n\tif ( Win ) {\n\t\treturn Win;\n\t}\n\t// Case: Node.js\n\tif ( Global ) {\n\t\treturn Global;\n\t}\n\t// Case: unknown\n\tthrow new Error( 'unexpected error. Unable to resolve global object.' );\n}\n\n\n// EXPORTS //\n\nexport default getGlobal;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\nvar typedarray = Int8Array; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default typedarray;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Returns a regular expression to capture everything that is not a space immediately after the `function` keyword and before the first left parenthesis.\n*\n* @returns {RegExp} regular expression\n*\n* @example\n* var RE_FUNCTION_NAME = reFunctionName();\n*\n* function fname( fcn ) {\n* return RE_FUNCTION_NAME.exec( fcn.toString() )[ 1 ];\n* }\n*\n* var fn = fname( Math.sqrt );\n* // returns 'sqrt'\n*\n* fn = fname( Int8Array );\n* // returns 'Int8Array'\n*\n* fn = fname( Object.prototype.toString );\n* // returns 'toString'\n*\n* fn = fname( function(){} );\n* // returns ''\n*/\nfunction reFunctionName() {\n\treturn /^\\s*function\\s*([^(]*)/i;\n}\n\n\n// EXPORTS //\n\nexport default reFunctionName;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport reFunctionName from './main.js';\n\n\n// MAIN //\n\n/**\n* Captures everything that is not a space immediately after the `function` keyword and before the first left parenthesis.\n*\n* Regular expression: `/^\\s*function\\s*([^(]*)/i`\n*\n* - `/^\\s*`\n* - Match zero or more spaces at beginning\n*\n* - `function`\n* - Match the word `function`\n*\n* - `\\s*`\n* - Match zero or more spaces after the word `function`\n*\n* - `()`\n* - Capture\n*\n* - `[^(]*`\n* - Match anything except a left parenthesis `(` zero or more times\n*\n* - `/i`\n* - ignore case\n*\n* @constant\n* @type {RegExp}\n* @default /^\\s*function\\s*([^(]*)/i\n*/\nvar RE_FUNCTION_NAME = reFunctionName();\n\n\n// EXPORTS //\n\nexport default RE_FUNCTION_NAME;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Tests if a value is object-like.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether a value is object-like\n*\n* @example\n* var bool = isObjectLike( {} );\n* // returns true\n*\n* @example\n* var bool = isObjectLike( [] );\n* // returns true\n*\n* @example\n* var bool = isObjectLike( null );\n* // returns false\n*/\nfunction isObjectLike( value ) {\n\treturn (\n\t\tvalue !== null &&\n\t\ttypeof value === 'object'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isObjectLike;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\nimport { REGEXP as RE } from '@stdlib/regexp-function-name';\nimport isBuffer from '@stdlib/assert-is-buffer';\n\n\n// MAIN //\n\n/**\n* Determines the name of a value's constructor.\n*\n* @param {*} v - input value\n* @returns {string} name of a value's constructor\n*\n* @example\n* var v = constructorName( 'a' );\n* // returns 'String'\n*\n* @example\n* var v = constructorName( 5 );\n* // returns 'Number'\n*\n* @example\n* var v = constructorName( null );\n* // returns 'Null'\n*\n* @example\n* var v = constructorName( undefined );\n* // returns 'Undefined'\n*\n* @example\n* var v = constructorName( function noop() {} );\n* // returns 'Function'\n*/\nfunction constructorName( v ) {\n\tvar match;\n\tvar name;\n\tvar ctor;\n\tname = nativeClass( v ).slice( 8, -1 );\n\tif ( (name === 'Object' || name === 'Error') && v.constructor ) {\n\t\tctor = v.constructor;\n\t\tif ( typeof ctor.name === 'string' ) {\n\t\t\treturn ctor.name;\n\t\t}\n\t\tmatch = RE.exec( ctor.toString() );\n\t\tif ( match ) {\n\t\t\treturn match[ 1 ];\n\t\t}\n\t}\n\tif ( isBuffer( v ) ) {\n\t\treturn 'Buffer';\n\t}\n\treturn name;\n}\n\n\n// EXPORTS //\n\nexport default constructorName;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isObjectLike from '@stdlib/assert-is-object-like';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Buffer instance.\n*\n* @param {*} value - value to validate\n* @returns {boolean} boolean indicating if a value is a Buffer instance\n*\n* @example\n* var v = isBuffer( new Buffer( 'beep' ) );\n* // returns true\n*\n* @example\n* var v = isBuffer( new Buffer( [1,2,3,4] ) );\n* // returns true\n*\n* @example\n* var v = isBuffer( {} );\n* // returns false\n*\n* @example\n* var v = isBuffer( [] );\n* // returns false\n*/\nfunction isBuffer( value ) {\n\treturn (\n\t\tisObjectLike( value ) &&\n\t\t(\n\t\t\t// eslint-disable-next-line no-underscore-dangle\n\t\t\tvalue._isBuffer || // for envs missing Object.prototype.constructor (e.g., Safari 5-7)\n\t\t\t(\n\t\t\t\tvalue.constructor &&\n\n\t\t\t\t// WARNING: `typeof` is not a foolproof check, as certain envs consider RegExp and NodeList instances to be functions\n\t\t\t\ttypeof value.constructor.isBuffer === 'function' &&\n\t\t\t\tvalue.constructor.isBuffer( value )\n\t\t\t)\n\t\t)\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isBuffer;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Regular expression to capture everything that is not a space immediately after the `function` keyword and before the first left parenthesis.\n*\n* @module @stdlib/regexp-function-name\n*\n* @example\n* import reFunctionName from '@stdlib/regexp-function-name';\n* var RE_FUNCTION_NAME = reFunctionName();\n*\n* function fname( fcn ) {\n* return RE_FUNCTION_NAME.exec( fcn.toString() )[ 1 ];\n* }\n*\n* var fn = fname( Math.sqrt );\n* // returns 'sqrt'\n*\n* fn = fname( Int8Array );\n* // returns 'Int8Array'\n*\n* fn = fname( Object.prototype.toString );\n* // returns 'toString'\n*\n* fn = fname( function(){} );\n* // returns ''\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport REGEXP from './regexp.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'REGEXP', REGEXP );\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test if a value is object-like.\n*\n* @module @stdlib/assert-is-object-like\n*\n* @example\n* import isObjectLike from '@stdlib/assert-is-object-like';\n*\n* var bool = isObjectLike( {} );\n* // returns true\n*\n* bool = isObjectLike( [] );\n* // returns true\n*\n* bool = isObjectLike( null );\n* // returns false\n*\n* @example\n* import { isObjectLikeArray as isObjectLike } from '@stdlib/assert-is-object-like';\n*\n* var bool = isObjectLike( [ {}, [] ] );\n* // returns true\n*\n* bool = isObjectLike( [ {}, '3.0' ] );\n* // returns false\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport arrayfun from '@stdlib/assert-tools-array-function';\nimport main from './main.js';\n\n\n// VARIABLES //\n\nvar isObjectLikeArray = arrayfun( main );\n\n\n// MAIN //\n\nsetReadOnly( main, 'isObjectLikeArray', isObjectLikeArray );\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isArray from '@stdlib/assert-is-array';\nimport format from '@stdlib/string-format';\n\n\n// MAIN //\n\n/**\n* Returns a function which tests if every element in an array passes a test condition.\n*\n* @param {Function} predicate - function to apply\n* @throws {TypeError} must provide a function\n* @returns {Function} an array function\n*\n* @example\n* import isOdd from '@stdlib/assert-is-odd';\n*\n* var arr1 = [ 1, 3, 5, 7 ];\n* var arr2 = [ 3, 5, 8 ];\n*\n* var validate = arrayfcn( isOdd );\n*\n* var bool = validate( arr1 );\n* // returns true\n*\n* bool = validate( arr2 );\n* // returns false\n*/\nfunction arrayfcn( predicate ) {\n\tif ( typeof predicate !== 'function' ) {\n\t\tthrow new TypeError( format( 'invalid argument. Must provide a function. Value: `%s`.', predicate ) );\n\t}\n\treturn every;\n\n\t/**\n\t* Tests if every element in an array passes a test condition.\n\t*\n\t* @private\n\t* @param {*} value - value to test\n\t* @returns {boolean} boolean indicating whether a value is an array for which all elements pass a test condition\n\t*/\n\tfunction every( value ) {\n\t\tvar len;\n\t\tvar i;\n\t\tif ( !isArray( value ) ) {\n\t\t\treturn false;\n\t\t}\n\t\tlen = value.length;\n\t\tif ( len === 0 ) {\n\t\t\treturn false;\n\t\t}\n\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\tif ( predicate( value[ i ] ) === false ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}\n}\n\n\n// EXPORTS //\n\nexport default arrayfcn;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Determine a value's type.\n*\n* @module @stdlib/utils-type-of\n*\n* @example\n* import typeOf from '@stdlib/utils-type-of';\n*\n* var str = typeOf( 'a' );\n* // returns 'string'\n*\n* str = typeOf( 5 );\n* // returns 'number'\n*/\n\n// MODULES //\n\nimport usePolyfill from './check.js';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar main = ( usePolyfill() ) ? polyfill : builtin;\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport RE from './fixtures/re.js';\nimport nodeList from './fixtures/nodelist.js';\nimport typedarray from './fixtures/typedarray.js';\n\n\n// MAIN //\n\n/**\n* Checks whether a polyfill is needed when using the `typeof` operator.\n*\n* @private\n* @returns {boolean} boolean indicating whether a polyfill is needed\n*/\nfunction check() {\n\tif (\n\t\t// Chrome 1-12 returns 'function' for regular expression instances (see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/typeof):\n\t\ttypeof RE === 'function' ||\n\n\t\t// Safari 8 returns 'object' for typed array and weak map constructors (underscore #1929):\n\t\ttypeof typedarray === 'object' ||\n\n\t\t// PhantomJS 1.9 returns 'function' for `NodeList` instances (underscore #2236):\n\t\ttypeof nodeList === 'function'\n\t) {\n\t\treturn true;\n\t}\n\treturn false;\n}\n\n\n// EXPORTS //\n\nexport default check;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport ctorName from '@stdlib/utils-constructor-name';\n\n\n// MAIN //\n\n/**\n* Determines a value's type.\n*\n* @param {*} v - input value\n* @returns {string} string indicating the value's type\n*/\nfunction typeOf( v ) {\n\treturn ctorName( v ).toLowerCase();\n}\n\n\n// EXPORTS //\n\nexport default typeOf;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport ctorName from '@stdlib/utils-constructor-name';\n\n\n// NOTES //\n\n/*\n* Built-in `typeof` operator behavior:\n*\n* ```text\n* typeof null => 'object'\n* typeof undefined => 'undefined'\n* typeof 'a' => 'string'\n* typeof 5 => 'number'\n* typeof NaN => 'number'\n* typeof true => 'boolean'\n* typeof false => 'boolean'\n* typeof {} => 'object'\n* typeof [] => 'object'\n* typeof function foo(){} => 'function'\n* typeof function* foo(){} => 'object'\n* typeof Symbol() => 'symbol'\n* ```\n*\n*/\n\n\n// MAIN //\n\n/**\n* Determines a value's type.\n*\n* @param {*} v - input value\n* @returns {string} string indicating the value's type\n*/\nfunction typeOf( v ) {\n\tvar type;\n\n\t// Address `typeof null` => `object` (see http://wiki.ecmascript.org/doku.php?id=harmony:typeof_null):\n\tif ( v === null ) {\n\t\treturn 'null';\n\t}\n\ttype = typeof v;\n\n\t// If the `typeof` operator returned something other than `object`, we are done. Otherwise, we need to check for an internal class name or search for a constructor.\n\tif ( type === 'object' ) {\n\t\treturn ctorName( v ).toLowerCase();\n\t}\n\treturn type;\n}\n\n\n// EXPORTS //\n\nexport default typeOf;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport typeOf from '@stdlib/utils-type-of';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a function.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a function\n*\n* @example\n* function beep() {\n* return 'beep';\n* }\n*\n* var bool = isFunction( beep );\n* // returns true\n*/\nfunction isFunction( value ) {\n\t// Note: cannot use `typeof` directly, as various browser engines incorrectly return `'function'` when operating on non-function objects, such as regular expressions and NodeLists.\n\treturn ( typeOf( value ) === 'function' );\n}\n\n\n// EXPORTS //\n\nexport default isFunction;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isNumber } from '@stdlib/assert-is-number';\nimport defineProperty from '@stdlib/utils-define-property';\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport format from '@stdlib/string-format';\nimport toStr from './tostring.js';\nimport toJSON from './tojson.js';\n\n\n// MAIN //\n\n/**\n* 128-bit complex number constructor.\n*\n* @constructor\n* @param {number} real - real component\n* @param {number} imag - imaginary component\n* @throws {TypeError} must invoke using the `new` keyword\n* @throws {TypeError} real component must be a number\n* @throws {TypeError} imaginary component must be a number\n* @returns {Complex128} 128-bit complex number\n*\n* @example\n* var z = new Complex128( 5.0, 3.0 );\n* // returns \n*/\nfunction Complex128( real, imag ) {\n\tif ( !( this instanceof Complex128 ) ) {\n\t\tthrow new TypeError( 'invalid invocation. Constructor must be called with the `new` keyword.' );\n\t}\n\tif ( !isNumber( real ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Real component must be a number. Value: `%s`.', real ) );\n\t}\n\tif ( !isNumber( imag ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Imaginary component must be a number. Value: `%s`.', imag ) );\n\t}\n\tdefineProperty( this, 're', {\n\t\t'configurable': false,\n\t\t'enumerable': true,\n\t\t'writable': false,\n\t\t'value': real\n\t});\n\tdefineProperty( this, 'im', {\n\t\t'configurable': false,\n\t\t'enumerable': true,\n\t\t'writable': false,\n\t\t'value': imag\n\t});\n\treturn this;\n}\n\n/**\n* Size (in bytes) of each component.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex128\n* @type {integer}\n* @returns {integer} size of each component\n*\n* @example\n* var nbytes = Complex128.BYTES_PER_ELEMENT;\n* // returns 8\n*/\nsetReadOnly( Complex128, 'BYTES_PER_ELEMENT', 8 );\n\n/**\n* Size (in bytes) of each component.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex128.prototype\n* @type {integer}\n* @returns {integer} size of each component\n*\n* @example\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var nbytes = z.BYTES_PER_ELEMENT;\n* // returns 8\n*/\nsetReadOnly( Complex128.prototype, 'BYTES_PER_ELEMENT', 8 );\n\n/**\n* Length (in bytes) of a complex number.\n*\n* @name byteLength\n* @memberof Complex128.prototype\n* @type {integer}\n* @returns {integer} byte length\n*\n* @example\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var nbytes = z.byteLength;\n* // returns 16\n*/\nsetReadOnly( Complex128.prototype, 'byteLength', 16 );\n\n/**\n* Serializes a complex number as a string.\n*\n* @name toString\n* @memberof Complex128.prototype\n* @type {Function}\n* @returns {string} serialized complex number\n*\n* @example\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var str = z.toString();\n* // returns '5 + 3i'\n*/\nsetReadOnly( Complex128.prototype, 'toString', toStr );\n\n/**\n* Serializes a complex number as a JSON object.\n*\n* ## Notes\n*\n* - `JSON.stringify()` implicitly calls this method when stringifying a `Complex128` instance.\n*\n* @name toJSON\n* @memberof Complex128.prototype\n* @type {Function}\n* @returns {Object} serialized complex number\n*\n* @example\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var obj = z.toJSON();\n* // returns { 'type': 'Complex128', 're': 5.0, 'im': 3.0 }\n*/\nsetReadOnly( Complex128.prototype, 'toJSON', toJSON );\n\n\n// EXPORTS //\n\nexport default Complex128;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Serializes a complex number as a string.\n*\n* @private\n* @returns {string} serialized complex number\n*/\nfunction toString() { // eslint-disable-line stdlib/no-redeclare\n\t/* eslint-disable no-invalid-this */\n\tvar str = '' + this.re;\n\tif ( this.im < 0 ) {\n\t\tstr += ' - ' + (-this.im);\n\t} else {\n\t\tstr += ' + ' + this.im;\n\t}\n\tstr += 'i';\n\treturn str;\n}\n\n\n// EXPORTS //\n\nexport default toString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Serializes a complex number as a JSON object.\n*\n* @private\n* @returns {Object} JSON representation\n*/\nfunction toJSON() {\n\t/* eslint-disable no-invalid-this */\n\tvar out = {};\n\tout.type = 'Complex128';\n\tout.re = this.re;\n\tout.im = this.im;\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default toJSON;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar fround = ( typeof Math.fround === 'function' ) ? Math.fround : null; // eslint-disable-line stdlib/no-builtin-math\n\n\n// EXPORTS //\n\nexport default fround;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport Float32Array from '@stdlib/array-float32';\n\n\n// VARIABLES //\n\nvar FLOAT32_VIEW = new Float32Array( 1 );\n\n\n// MAIN //\n\n/**\n* Converts a double-precision floating-point number to the nearest single-precision floating-point number.\n*\n* @param {number} x - double-precision floating-point number\n* @returns {number} nearest single-precision floating-point number\n*\n* @example\n* var y = float64ToFloat32( 1.337 );\n* // returns 1.3370000123977661\n*/\nfunction float64ToFloat32( x ) {\n\tFLOAT32_VIEW[ 0 ] = x;\n\treturn FLOAT32_VIEW[ 0 ];\n}\n\n\n// EXPORTS //\n\nexport default float64ToFloat32;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Convert a double-precision floating-point number to the nearest single-precision floating-point number.\n*\n* @module @stdlib/number-float64-base-to-float32\n*\n* @example\n* import float64ToFloat32 from '@stdlib/number-float64-base-to-float32';\n*\n* var y = float64ToFloat32( 1.337 );\n* // returns 1.3370000123977661\n*/\n\n// MODULES //\n\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar float64ToFloat32;\nif ( typeof builtin === 'function' ) {\n\tfloat64ToFloat32 = builtin;\n} else {\n\tfloat64ToFloat32 = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default float64ToFloat32;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isNumber } from '@stdlib/assert-is-number';\nimport defineProperty from '@stdlib/utils-define-property';\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport float64ToFloat32 from '@stdlib/number-float64-base-to-float32';\nimport format from '@stdlib/string-format';\nimport toStr from './tostring.js';\nimport toJSON from './tojson.js';\n\n\n// MAIN //\n\n/**\n* 64-bit complex number constructor.\n*\n* @constructor\n* @param {number} real - real component\n* @param {number} imag - imaginary component\n* @throws {TypeError} must invoke using the `new` keyword\n* @throws {TypeError} real component must be a number\n* @throws {TypeError} imaginary component must be a number\n* @returns {Complex64} 64-bit complex number\n*\n* @example\n* var z = new Complex64( 5.0, 3.0 );\n* // returns \n*/\nfunction Complex64( real, imag ) {\n\tif ( !( this instanceof Complex64 ) ) {\n\t\tthrow new TypeError( 'invalid invocation. Constructor must be called with the `new` keyword.' );\n\t}\n\tif ( !isNumber( real ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Real component must be a number. Value: `%s`.', real ) );\n\t}\n\tif ( !isNumber( imag ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Imaginary component must be a number. Value: `%s`.', imag ) );\n\t}\n\tdefineProperty( this, 're', {\n\t\t'configurable': false,\n\t\t'enumerable': true,\n\t\t'writable': false,\n\t\t'value': float64ToFloat32( real )\n\t});\n\tdefineProperty( this, 'im', {\n\t\t'configurable': false,\n\t\t'enumerable': true,\n\t\t'writable': false,\n\t\t'value': float64ToFloat32( imag )\n\t});\n\treturn this;\n}\n\n/**\n* Size (in bytes) of each component.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex64\n* @type {integer}\n* @returns {integer} size of each component\n*\n* @example\n* var nbytes = Complex64.BYTES_PER_ELEMENT;\n* // returns 4\n*/\nsetReadOnly( Complex64, 'BYTES_PER_ELEMENT', 4 );\n\n/**\n* Size (in bytes) of each component.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex64.prototype\n* @type {integer}\n* @returns {integer} size of each component\n*\n* @example\n* var z = new Complex64( 5.0, 3.0 );\n*\n* var nbytes = z.BYTES_PER_ELEMENT;\n* // returns 4\n*/\nsetReadOnly( Complex64.prototype, 'BYTES_PER_ELEMENT', 4 );\n\n/**\n* Length (in bytes) of a complex number.\n*\n* @name byteLength\n* @memberof Complex64.prototype\n* @type {integer}\n* @returns {integer} byte length\n*\n* @example\n* var z = new Complex64( 5.0, 3.0 );\n*\n* var nbytes = z.byteLength;\n* // returns 8\n*/\nsetReadOnly( Complex64.prototype, 'byteLength', 8 );\n\n/**\n* Serializes a complex number as a string.\n*\n* @name toString\n* @memberof Complex64.prototype\n* @type {Function}\n* @returns {string} serialized complex number\n*\n* @example\n* var z = new Complex64( 5.0, 3.0 );\n*\n* var str = z.toString();\n* // returns '5 + 3i'\n*/\nsetReadOnly( Complex64.prototype, 'toString', toStr );\n\n/**\n* Serializes a complex number as a JSON object.\n*\n* ## Notes\n*\n* - `JSON.stringify()` implicitly calls this method when stringifying a `Complex64` instance.\n*\n* @name toJSON\n* @memberof Complex64.prototype\n* @type {Function}\n* @returns {Object} serialized complex number\n*\n* @example\n* var z = new Complex64( 5.0, 3.0 );\n*\n* var obj = z.toJSON();\n* // returns { 'type': 'Complex64', 're': 5.0, 'im': 3.0 }\n*/\nsetReadOnly( Complex64.prototype, 'toJSON', toJSON );\n\n\n// EXPORTS //\n\nexport default Complex64;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport Complex128 from '@stdlib/complex-float64';\nimport Complex64 from '@stdlib/complex-float32';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a complex number-like object.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a complex number-like object.\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n* import Complex64 from '@stdlib/complex-float32';\n*\n* var x = new Complex128( 4.0, 2.0 );\n* var bool = isComplexLike( x );\n* // returns true\n*\n* x = new Complex64( 4.0, 2.0 );\n* bool = isComplexLike( x );\n* // returns true\n*/\nfunction isComplexLike( value ) {\n\tif ( value instanceof Complex128 || value instanceof Complex64 ) {\n\t\treturn true;\n\t}\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\ttypeof value.re === 'number' &&\n\t\ttypeof value.im === 'number'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isComplexLike;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isInteger from '@stdlib/math-base-assert-is-integer';\n\n\n// MAIN //\n\n/**\n* Tests if a finite numeric value is an even number.\n*\n* @param {number} x - value to test\n* @returns {boolean} boolean indicating whether the value is an even number\n*\n* @example\n* var bool = isEven( 5.0 );\n* // returns false\n*\n* @example\n* var bool = isEven( -2.0 );\n* // returns true\n*\n* @example\n* var bool = isEven( 0.0 );\n* // returns true\n*\n* @example\n* var bool = isEven( NaN );\n* // returns false\n*/\nfunction isEven( x ) {\n\treturn isInteger( x/2.0 );\n}\n\n\n// EXPORTS //\n\nexport default isEven;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport hasOwnProp from '@stdlib/assert-has-own-property';\nimport Symbol from '@stdlib/symbol-ctor';\n\n\n// MAIN //\n\n/**\n* Tests for native `Symbol.iterator` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Symbol.iterator` support\n*\n* @example\n* var bool = hasIteratorSymbolSupport();\n* // returns \n*/\nfunction hasIteratorSymbolSupport() {\n\treturn (\n\t\ttypeof Symbol === 'function' &&\n\t\ttypeof Symbol( 'foo' ) === 'symbol' &&\n\t\thasOwnProp( Symbol, 'iterator' ) &&\n\t\ttypeof Symbol.iterator === 'symbol'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default hasIteratorSymbolSupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Serializes a complex number as a string.\n*\n* @private\n* @returns {string} serialized complex number\n*/\nfunction toString() { // eslint-disable-line stdlib/no-redeclare\n\t/* eslint-disable no-invalid-this */\n\tvar str = '' + this.re;\n\tif ( this.im < 0 ) {\n\t\tstr += ' - ' + (-this.im);\n\t} else {\n\t\tstr += ' + ' + this.im;\n\t}\n\tstr += 'i';\n\treturn str;\n}\n\n\n// EXPORTS //\n\nexport default toString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Serializes a complex number as a JSON object.\n*\n* @private\n* @returns {Object} JSON representation\n*/\nfunction toJSON() {\n\t/* eslint-disable no-invalid-this */\n\tvar out = {};\n\tout.type = 'Complex64';\n\tout.re = this.re;\n\tout.im = this.im;\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default toJSON;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport hasIteratorSymbolSupport from '@stdlib/assert-has-iterator-symbol-support';\n\n\n// MAIN //\n\n/**\n* Iterator symbol.\n*\n* @name IteratorSymbol\n* @constant\n* @type {(symbol|null)}\n*\n* @example\n* function iterator() {\n* var it;\n* var i;\n*\n* i = -1;\n*\n* it = {};\n* it.next = next;\n* it.return = done;\n*\n* if ( IteratorSymbol ) {\n* it[ IteratorSymbol ] = iterator;\n* }\n* return it;\n*\n* function next() {\n* i += 1;\n* return {\n* 'value': i,\n* 'done': false\n* };\n* }\n*\n* function done( value ) {\n* if ( arguments.length === 0 ) {\n* return {\n* 'done': true\n* };\n* }\n* return {\n* 'value': value,\n* 'done': true\n* };\n* }\n* }\n*\n* var obj = iterator();\n*/\nvar IteratorSymbol = ( hasIteratorSymbolSupport() ) ? Symbol.iterator : null;\n\n\n// EXPORTS //\n\nexport default IteratorSymbol;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport defineProperty from '@stdlib/utils-define-property';\n\n\n// MAIN //\n\n/**\n* Defines a non-enumerable read-only accessor.\n*\n* @param {Object} obj - object on which to define the property\n* @param {(string|symbol)} prop - property name\n* @param {Function} getter - accessor\n*\n* @example\n* function getter() {\n* return 'bar';\n* }\n*\n* var obj = {};\n*\n* setNonEnumerableReadOnlyAccessor( obj, 'foo', getter );\n*\n* try {\n* obj.foo = 'boop';\n* } catch ( err ) {\n* console.error( err.message );\n* }\n*/\nfunction setNonEnumerableReadOnlyAccessor( obj, prop, getter ) { // eslint-disable-line id-length\n\tdefineProperty( obj, prop, {\n\t\t'configurable': false,\n\t\t'enumerable': false,\n\t\t'get': getter\n\t});\n}\n\n\n// EXPORTS //\n\nexport default setNonEnumerableReadOnlyAccessor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Returns the real component of a single-precision complex floating-point number.\n*\n* @param {Complex} z - complex number\n* @returns {number} real component\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n*\n* var z = new Complex64( 5.0, 3.0 );\n*\n* var re = realf( z );\n* // returns 5.0\n*/\nfunction realf( z ) {\n\treturn z.re;\n}\n\n\n// EXPORTS //\n\nexport default realf;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Returns the imaginary component of a single-precision complex floating-point number.\n*\n* @param {Complex} z - complex number\n* @returns {number} imaginary component\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n*\n* var z = new Complex64( 5.0, 3.0 );\n*\n* var im = imagf( z );\n* // returns 3.0\n*/\nfunction imagf( z ) {\n\treturn z.im;\n}\n\n\n// EXPORTS //\n\nexport default imagf;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport Float32Array from '@stdlib/array-float32';\n\n\n// MAIN //\n\n/**\n* Reinterprets a `Complex64Array` as a `Float32Array`.\n*\n* @param {Complex64Array} x - input array\n* @param {NonNegativeInteger} offset - starting index\n* @returns {Float32Array} `Float32Array` view\n*\n* @example\n* import Complex64Array from '@stdlib/array-complex64';\n*\n* var x = new Complex64Array( 10 );\n*\n* var out = reinterpret( x, 0 );\n* // returns \n*\n* var bool = ( out.buffer === x.buffer );\n* // returns true\n*/\nfunction reinterpret( x, offset ) {\n\treturn new Float32Array( x.buffer, x.byteOffset+(x.BYTES_PER_ELEMENT*offset), 2*(x.length-offset) ); // eslint-disable-line max-len\n}\n\n\n// EXPORTS //\n\nexport default reinterpret;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport Float64Array from '@stdlib/array-float64';\n\n\n// MAIN //\n\n/**\n* Reinterprets a `Complex128Array` as a `Float64Array`.\n*\n* @param {Complex128Array} x - input array\n* @param {NonNegativeInteger} offset - starting index\n* @returns {Float64Array} `Float64Array` view\n*\n* @example\n* import Complex128Array from '@stdlib/array-complex128';\n*\n* var x = new Complex128Array( 10 );\n*\n* var out = reinterpret( x, 0 );\n* // returns \n*\n* var bool = ( out.buffer === x.buffer );\n* // returns true\n*/\nfunction reinterpret( x, offset ) {\n\treturn new Float64Array( x.buffer, x.byteOffset+(x.BYTES_PER_ELEMENT*offset), 2*(x.length-offset) ); // eslint-disable-line max-len\n}\n\n\n// EXPORTS //\n\nexport default reinterpret;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// VARIABLES //\n\nvar GETTERS = {\n\t'float64': getFloat64,\n\t'float32': getFloat32,\n\t'int32': getInt32,\n\t'int16': getInt16,\n\t'int8': getInt8,\n\t'uint32': getUint32,\n\t'uint16': getUint16,\n\t'uint8': getUint8,\n\t'uint8c': getUint8c,\n\t'generic': getGeneric,\n\t'default': getArrayLike\n};\n\n\n// FUNCTIONS //\n\n/**\n* Returns an element from a `Float64Array`.\n*\n* @private\n* @param {Float64Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n*\n* var arr = new Float64Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getFloat64( arr, 2 );\n* // returns 3.0\n*/\nfunction getFloat64( arr, idx ) {\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from a `Float32Array`.\n*\n* @private\n* @param {Float32Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Float32Array from '@stdlib/array-float32';\n*\n* var arr = new Float32Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getFloat32( arr, 2 );\n* // returns 3.0\n*/\nfunction getFloat32( arr, idx ) {\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from an `Int32Array`.\n*\n* @private\n* @param {Int32Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Int32Array from '@stdlib/array-int32';\n*\n* var arr = new Int32Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getInt32( arr, 2 );\n* // returns 3\n*/\nfunction getInt32( arr, idx ) { // eslint-disable-line stdlib/jsdoc-doctest-decimal-point\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from an `Int16Array`.\n*\n* @private\n* @param {Int16Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Int16Array from '@stdlib/array-int16';\n*\n* var arr = new Int16Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getInt16( arr, 2 );\n* // returns 3\n*/\nfunction getInt16( arr, idx ) { // eslint-disable-line stdlib/jsdoc-doctest-decimal-point\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from an `Int8Array`.\n*\n* @private\n* @param {Int8Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Int8Array from '@stdlib/array-int8';\n*\n* var arr = new Int8Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getInt8( arr, 2 );\n* // returns 3\n*/\nfunction getInt8( arr, idx ) { // eslint-disable-line stdlib/jsdoc-doctest-decimal-point\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from a `Uint32Array`.\n*\n* @private\n* @param {Uint32Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Uint32Array from '@stdlib/array-uint32';\n*\n* var arr = new Uint32Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getUint32( arr, 2 );\n* // returns 3\n*/\nfunction getUint32( arr, idx ) { // eslint-disable-line stdlib/jsdoc-doctest-decimal-point\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from a `Uint16Array`.\n*\n* @private\n* @param {Uint16Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Uint16Array from '@stdlib/array-uint16';\n*\n* var arr = new Uint16Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getUint16( arr, 2 );\n* // returns 3\n*/\nfunction getUint16( arr, idx ) { // eslint-disable-line stdlib/jsdoc-doctest-decimal-point\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from a `Uint8Array`.\n*\n* @private\n* @param {Uint8Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Uint8Array from '@stdlib/array-uint8';\n*\n* var arr = new Uint8Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getUint8( arr, 2 );\n* // returns 3\n*/\nfunction getUint8( arr, idx ) { // eslint-disable-line stdlib/jsdoc-doctest-decimal-point\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from a `Uint8ClampedArray`.\n*\n* @private\n* @param {Uint8ClampedArray} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Uint8ClampedArray from '@stdlib/array-uint8c';\n*\n* var arr = new Uint8ClampedArray( [ 1, 2, 3, 4 ] );\n*\n* var v = getUint8c( arr, 2 );\n* // returns 3\n*/\nfunction getUint8c( arr, idx ) { // eslint-disable-line stdlib/jsdoc-doctest-decimal-point\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from a generic `Array`.\n*\n* @private\n* @param {Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {*} element value\n*\n* @example\n* var arr = [ 1, 2, 3, 4 ];\n*\n* var v = getGeneric( arr, 2 );\n* // returns 3\n*/\nfunction getGeneric( arr, idx ) {\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from an indexed array-like object.\n*\n* @private\n* @param {Collection} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {*} element value\n*\n* @example\n* var arr = [ 1, 2, 3, 4 ];\n*\n* var v = getArrayLike( arr, 2 );\n* // returns 3\n*/\nfunction getArrayLike( arr, idx ) {\n\treturn arr[ idx ];\n}\n\n\n// MAIN //\n\n/**\n* Returns an accessor function for retrieving an element from an indexed array-like object.\n*\n* @param {string} dtype - array dtype\n* @returns {Function} accessor\n*\n* @example\n* import dtype from '@stdlib/array-dtype';\n*\n* var arr = [ 1, 2, 3, 4 ];\n*\n* var get = getter( dtype( arr ) );\n* var v = get( arr, 2 );\n* // returns 3\n*/\nfunction getter( dtype ) {\n\tvar f = GETTERS[ dtype ];\n\tif ( typeof f === 'function' ) {\n\t\treturn f;\n\t}\n\treturn GETTERS.default;\n}\n\n\n// EXPORTS //\n\nexport default getter;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// VARIABLES //\n\nvar GETTERS = {\n\t'complex128': getComplex128,\n\t'complex64': getComplex64,\n\t'default': getArrayLike\n};\n\n\n// FUNCTIONS //\n\n/**\n* Returns an element from a `Complex128Array`.\n*\n* @private\n* @param {Complex128Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Complex128Array from '@stdlib/array-complex128';\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* var arr = new Complex128Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getComplex128( arr, 1 );\n* // returns \n*\n* var re = real( v );\n* // returns 3.0\n*\n* var im = imag( v );\n* // returns 4.0\n*/\nfunction getComplex128( arr, idx ) {\n\treturn arr.get( idx );\n}\n\n/**\n* Returns an element from a `Complex64Array`.\n*\n* @private\n* @param {Complex64Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Complex64Array from '@stdlib/array-complex64';\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* var arr = new Complex64Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getComplex64( arr, 1 );\n* // returns \n*\n* var re = realf( v );\n* // returns 3.0\n*\n* var im = imagf( v );\n* // returns 4.0\n*/\nfunction getComplex64( arr, idx ) {\n\treturn arr.get( idx );\n}\n\n/**\n* Returns an element from an array-like object supporting the get/set protocol.\n*\n* @private\n* @param {Collection} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {*} element value\n*\n* @example\n* var arr = [ 1, 2, 3, 4 ];\n*\n* function get( idx ) {\n* return arr[ idx ];\n* }\n*\n* function set( value, idx ) {\n* arr[ idx ] = value;\n* }\n*\n* arr.get = get;\n* arr.set = set;\n*\n* var v = getArrayLike( arr, 2 );\n* // returns 3\n*/\nfunction getArrayLike( arr, idx ) {\n\treturn arr.get( idx );\n}\n\n\n// MAIN //\n\n/**\n* Returns an accessor function for retrieving an element from an array-like object supporting the get/set protocol.\n*\n* @param {string} dtype - array dtype\n* @returns {Function} accessor\n*\n* @example\n* import Complex64Array from '@stdlib/array-complex64';\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n* import dtype from '@stdlib/array-dtype';\n*\n* var arr = new Complex64Array( [ 1, 2, 3, 4 ] );\n*\n* var get = getter( dtype( arr ) );\n* var v = get( arr, 1 );\n* // returns \n*\n* var re = realf( v );\n* // returns 3.0\n*\n* var im = imagf( v );\n* // returns 4.0\n*/\nfunction getter( dtype ) {\n\tvar f = GETTERS[ dtype ];\n\tif ( typeof f === 'function' ) {\n\t\treturn f;\n\t}\n\treturn GETTERS.default;\n}\n\n\n// EXPORTS //\n\nexport default getter;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isArrayLikeObject from '@stdlib/assert-is-array-like-object';\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport realf from '@stdlib/complex-realf';\nimport imagf from '@stdlib/complex-imagf';\nimport format from '@stdlib/string-format';\n\n\n// MAIN //\n\n/**\n* Returns an array of iterated values.\n*\n* @private\n* @param {Object} it - iterator\n* @returns {(Array|TypeError)} array or an error\n*/\nfunction fromIterator( it ) {\n\tvar out;\n\tvar v;\n\tvar z;\n\n\tout = [];\n\twhile ( true ) {\n\t\tv = it.next();\n\t\tif ( v.done ) {\n\t\t\tbreak;\n\t\t}\n\t\tz = v.value;\n\t\tif ( isArrayLikeObject( z ) && z.length >= 2 ) {\n\t\t\tout.push( z[ 0 ], z[ 1 ] );\n\t\t} else if ( isComplexLike( z ) ) {\n\t\t\tout.push( realf( z ), imagf( z ) );\n\t\t} else {\n\t\t\treturn new TypeError( format( 'invalid argument. An iterator must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', z ) );\n\t\t}\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default fromIterator;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isArrayLikeObject from '@stdlib/assert-is-array-like-object';\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport realf from '@stdlib/complex-realf';\nimport imagf from '@stdlib/complex-imagf';\nimport format from '@stdlib/string-format';\n\n\n// MAIN //\n\n/**\n* Returns an array of iterated values.\n*\n* @private\n* @param {Object} it - iterator\n* @param {Function} clbk - callback to invoke for each iterated value\n* @param {*} thisArg - invocation context\n* @returns {(Array|TypeError)} array or an error\n*/\nfunction fromIteratorMap( it, clbk, thisArg ) {\n\tvar out;\n\tvar v;\n\tvar z;\n\tvar i;\n\n\tout = [];\n\ti = -1;\n\twhile ( true ) {\n\t\tv = it.next();\n\t\tif ( v.done ) {\n\t\t\tbreak;\n\t\t}\n\t\ti += 1;\n\t\tz = clbk.call( thisArg, v.value, i );\n\t\tif ( isArrayLikeObject( z ) && z.length >= 2 ) {\n\t\t\tout.push( z[ 0 ], z[ 1 ] );\n\t\t} else if ( isComplexLike( z ) ) {\n\t\t\tout.push( realf( z ), imagf( z ) );\n\t\t} else {\n\t\t\treturn new TypeError( format( 'invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', z ) );\n\t\t}\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default fromIteratorMap;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport realf from '@stdlib/complex-realf';\nimport imagf from '@stdlib/complex-imagf';\n\n\n// MAIN //\n\n/**\n* Returns a strided array of real and imaginary components.\n*\n* @private\n* @param {Float32Array} buf - output array\n* @param {Array} arr - array containing complex numbers\n* @returns {(Float32Array|null)} output array or null\n*/\nfunction fromArray( buf, arr ) {\n\tvar len;\n\tvar v;\n\tvar i;\n\tvar j;\n\n\tlen = arr.length;\n\tj = 0;\n\tfor ( i = 0; i < len; i++ ) {\n\t\tv = arr[ i ];\n\t\tif ( !isComplexLike( v ) ) {\n\t\t\treturn null;\n\t\t}\n\t\tbuf[ j ] = realf( v );\n\t\tbuf[ j+1 ] = imagf( v );\n\t\tj += 2; // stride\n\t}\n\treturn buf;\n}\n\n\n// EXPORTS //\n\nexport default fromArray;\n","/* eslint-disable no-restricted-syntax, max-lines, no-invalid-this */\n\n/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isNonNegativeInteger } from '@stdlib/assert-is-nonnegative-integer';\nimport isArrayLikeObject from '@stdlib/assert-is-array-like-object';\nimport isCollection from '@stdlib/assert-is-collection';\nimport isArrayBuffer from '@stdlib/assert-is-arraybuffer';\nimport isObject from '@stdlib/assert-is-object';\nimport isArray from '@stdlib/assert-is-array';\nimport isFunction from '@stdlib/assert-is-function';\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport isEven from '@stdlib/math-base-assert-is-even';\nimport isInteger from '@stdlib/math-base-assert-is-integer';\nimport hasIteratorSymbolSupport from '@stdlib/assert-has-iterator-symbol-support';\nimport ITERATOR_SYMBOL from '@stdlib/symbol-iterator';\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport setReadOnlyAccessor from '@stdlib/utils-define-nonenumerable-read-only-accessor';\nimport Float32Array from '@stdlib/array-float32';\nimport Complex64 from '@stdlib/complex-float32';\nimport format from '@stdlib/string-format';\nimport realf from '@stdlib/complex-realf';\nimport imagf from '@stdlib/complex-imagf';\nimport reinterpret64 from '@stdlib/strided-base-reinterpret-complex64';\nimport reinterpret128 from '@stdlib/strided-base-reinterpret-complex128';\nimport getter from '@stdlib/array-base-getter';\nimport accessorGetter from '@stdlib/array-base-accessor-getter';\nimport fromIterator from './from_iterator.js';\nimport fromIteratorMap from './from_iterator_map.js';\nimport fromArray from './from_array.js';\n\n\n// VARIABLES //\n\nvar BYTES_PER_ELEMENT = Float32Array.BYTES_PER_ELEMENT * 2;\nvar HAS_ITERATOR_SYMBOL = hasIteratorSymbolSupport();\n\n\n// FUNCTIONS //\n\n/**\n* Returns a boolean indicating if a value is a complex typed array.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a complex typed array\n*/\nfunction isComplexArray( value ) {\n\treturn (\n\t\tvalue instanceof Complex64Array ||\n\t\t(\n\t\t\ttypeof value === 'object' &&\n\t\t\tvalue !== null &&\n\t\t\t(\n\t\t\t\tvalue.constructor.name === 'Complex64Array' ||\n\t\t\t\tvalue.constructor.name === 'Complex128Array'\n\t\t\t) &&\n\t\t\ttypeof value._length === 'number' && // eslint-disable-line no-underscore-dangle\n\n\t\t\t// NOTE: we don't perform a more rigorous test here for a typed array for performance reasons, as robustly checking for a typed array instance could require walking the prototype tree and performing relatively expensive constructor checks...\n\t\t\ttypeof value._buffer === 'object' // eslint-disable-line no-underscore-dangle\n\t\t)\n\t);\n}\n\n/**\n* Returns a boolean indicating if a value is a complex typed array constructor.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a complex typed array constructor\n*/\nfunction isComplexArrayConstructor( value ) {\n\treturn (\n\t\tvalue === Complex64Array ||\n\n\t\t// NOTE: weaker test in order to avoid a circular dependency with Complex128Array...\n\t\tvalue.name === 'Complex128Array'\n\t);\n}\n\n/**\n* Returns a boolean indicating if a value is a `Complex64Array`.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a `Complex64Array`\n*/\nfunction isComplex64Array( value ) {\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\tvalue.constructor.name === 'Complex64Array' &&\n\t\tvalue.BYTES_PER_ELEMENT === BYTES_PER_ELEMENT\n\t);\n}\n\n/**\n* Returns a boolean indicating if a value is a `Complex128Array`.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a `Complex128Array`\n*/\nfunction isComplex128Array( value ) {\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\tvalue.constructor.name === 'Complex128Array' &&\n\t\tvalue.BYTES_PER_ELEMENT === BYTES_PER_ELEMENT*2\n\t);\n}\n\n\n// MAIN //\n\n/**\n* 64-bit complex number array constructor.\n*\n* @constructor\n* @param {(NonNegativeInteger|Collection|ArrayBuffer|Iterable)} [arg] - length, typed array, array-like object, buffer, or an iterable\n* @param {NonNegativeInteger} [byteOffset=0] - byte offset\n* @param {NonNegativeInteger} [length] - view length\n* @throws {RangeError} ArrayBuffer byte length must be a multiple of `8`\n* @throws {RangeError} array-like object and typed array input arguments must have a length which is a multiple of two\n* @throws {TypeError} if provided only a single argument, must provide a valid argument\n* @throws {TypeError} byte offset must be a nonnegative integer\n* @throws {RangeError} byte offset must be a multiple of `8`\n* @throws {TypeError} view length must be a positive multiple of `8`\n* @throws {RangeError} must provide sufficient memory to accommodate byte offset and view length requirements\n* @throws {TypeError} an iterator must return either a two element array containing real and imaginary components or a complex number\n* @returns {Complex64Array} complex number array\n*\n* @example\n* var arr = new Complex64Array();\n* // returns \n*\n* var len = arr.length;\n* // returns 0\n*\n* @example\n* var arr = new Complex64Array( 2 );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*\n* @example\n* var arr = new Complex64Array( [ 1.0, -1.0 ] );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* import ArrayBuffer from '@stdlib/array-buffer';\n*\n* var buf = new ArrayBuffer( 16 );\n* var arr = new Complex64Array( buf );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*\n* @example\n* import ArrayBuffer from '@stdlib/array-buffer';\n*\n* var buf = new ArrayBuffer( 16 );\n* var arr = new Complex64Array( buf, 8 );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* import ArrayBuffer from '@stdlib/array-buffer';\n*\n* var buf = new ArrayBuffer( 32 );\n* var arr = new Complex64Array( buf, 8, 2 );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*/\nfunction Complex64Array() {\n\tvar byteOffset;\n\tvar nargs;\n\tvar buf;\n\tvar len;\n\n\tnargs = arguments.length;\n\tif ( !(this instanceof Complex64Array) ) {\n\t\tif ( nargs === 0 ) {\n\t\t\treturn new Complex64Array();\n\t\t}\n\t\tif ( nargs === 1 ) {\n\t\t\treturn new Complex64Array( arguments[0] );\n\t\t}\n\t\tif ( nargs === 2 ) {\n\t\t\treturn new Complex64Array( arguments[0], arguments[1] );\n\t\t}\n\t\treturn new Complex64Array( arguments[0], arguments[1], arguments[2] );\n\t}\n\t// Create the underlying data buffer...\n\tif ( nargs === 0 ) {\n\t\tbuf = new Float32Array( 0 ); // backward-compatibility\n\t} else if ( nargs === 1 ) {\n\t\tif ( isNonNegativeInteger( arguments[0] ) ) {\n\t\t\tbuf = new Float32Array( arguments[0]*2 );\n\t\t} else if ( isCollection( arguments[0] ) ) {\n\t\t\tbuf = arguments[ 0 ];\n\t\t\tlen = buf.length;\n\n\t\t\t// If provided a \"generic\" array, peak at the first value, and, if the value is a complex number, try to process as an array of complex numbers, falling back to \"normal\" typed array initialization if we fail and ensuring consistency if the first value had not been a complex number...\n\t\t\tif ( len && isArray( buf ) && isComplexLike( buf[0] ) ) {\n\t\t\t\tbuf = fromArray( new Float32Array( len*2 ), buf );\n\t\t\t\tif ( buf === null ) {\n\t\t\t\t\t// We failed and we are now forced to allocate a new array :-(\n\t\t\t\t\tif ( !isEven( len ) ) {\n\t\t\t\t\t\tthrow new RangeError( format( 'invalid argument. Array-like object arguments must have a length which is a multiple of two. Length: `%u`.', len ) );\n\t\t\t\t\t}\n\t\t\t\t\t// We failed, so fall back to directly setting values...\n\t\t\t\t\tbuf = new Float32Array( arguments[0] );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ( isComplex64Array( buf ) ) {\n\t\t\t\t\tbuf = reinterpret64( buf, 0 );\n\t\t\t\t} else if ( isComplex128Array( buf ) ) {\n\t\t\t\t\tbuf = reinterpret128( buf, 0 );\n\t\t\t\t} else if ( !isEven( len ) ) {\n\t\t\t\t\tthrow new RangeError( format( 'invalid argument. Array-like object and typed array arguments must have a length which is a multiple of two. Length: `%u`.', len ) );\n\t\t\t\t}\n\t\t\t\tbuf = new Float32Array( buf );\n\t\t\t}\n\t\t} else if ( isArrayBuffer( arguments[0] ) ) {\n\t\t\tbuf = arguments[ 0 ];\n\t\t\tif ( !isInteger( buf.byteLength/BYTES_PER_ELEMENT ) ) {\n\t\t\t\tthrow new RangeError( format( 'invalid argument. ArrayBuffer byte length must be a multiple of %u. Byte length: `%u`.', BYTES_PER_ELEMENT, buf.byteLength ) );\n\t\t\t}\n\t\t\tbuf = new Float32Array( buf );\n\t\t} else if ( isObject( arguments[0] ) ) {\n\t\t\tbuf = arguments[ 0 ];\n\t\t\tif ( HAS_ITERATOR_SYMBOL === false ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Environment lacks Symbol.iterator support. Must provide a length, ArrayBuffer, typed array, or array-like object. Value: `%s`.', buf ) );\n\t\t\t}\n\t\t\tif ( !isFunction( buf[ ITERATOR_SYMBOL ] ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.', buf ) );\n\t\t\t}\n\t\t\tbuf = buf[ ITERATOR_SYMBOL ]();\n\t\t\tif ( !isFunction( buf.next ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.', buf ) );\n\t\t\t}\n\t\t\tbuf = fromIterator( buf );\n\t\t\tif ( buf instanceof Error ) {\n\t\t\t\tthrow buf;\n\t\t\t}\n\t\t\tbuf = new Float32Array( buf );\n\t\t} else {\n\t\t\tthrow new TypeError( format( 'invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.', arguments[0] ) );\n\t\t}\n\t} else {\n\t\tbuf = arguments[ 0 ];\n\t\tif ( !isArrayBuffer( buf ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. First argument must be an ArrayBuffer. Value: `%s`.', buf ) );\n\t\t}\n\t\tbyteOffset = arguments[ 1 ];\n\t\tif ( !isNonNegativeInteger( byteOffset ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Byte offset must be a nonnegative integer. Value: `%s`.', byteOffset ) );\n\t\t}\n\t\tif ( !isInteger( byteOffset/BYTES_PER_ELEMENT ) ) {\n\t\t\tthrow new RangeError( format( 'invalid argument. Byte offset must be a multiple of %u. Value: `%u`.', BYTES_PER_ELEMENT, byteOffset ) );\n\t\t}\n\t\tif ( nargs === 2 ) {\n\t\t\tlen = buf.byteLength - byteOffset;\n\t\t\tif ( !isInteger( len/BYTES_PER_ELEMENT ) ) {\n\t\t\t\tthrow new RangeError( format( 'invalid arguments. ArrayBuffer view byte length must be a multiple of %u. View byte length: `%u`.', BYTES_PER_ELEMENT, len ) );\n\t\t\t}\n\t\t\tbuf = new Float32Array( buf, byteOffset );\n\t\t} else {\n\t\t\tlen = arguments[ 2 ];\n\t\t\tif ( !isNonNegativeInteger( len ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Length must be a nonnegative integer. Value: `%s`.', len ) );\n\t\t\t}\n\t\t\tif ( (len*BYTES_PER_ELEMENT) > (buf.byteLength-byteOffset) ) {\n\t\t\t\tthrow new RangeError( format( 'invalid arguments. ArrayBuffer has insufficient capacity. Either decrease the array length or provide a bigger buffer. Minimum capacity: `%u`.', len*BYTES_PER_ELEMENT ) );\n\t\t\t}\n\t\t\tbuf = new Float32Array( buf, byteOffset, len*2 );\n\t\t}\n\t}\n\tsetReadOnly( this, '_buffer', buf );\n\tsetReadOnly( this, '_length', buf.length/2 );\n\n\treturn this;\n}\n\n/**\n* Size (in bytes) of each array element.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex64Array\n* @readonly\n* @type {PositiveInteger}\n* @default 8\n*\n* @example\n* var nbytes = Complex64Array.BYTES_PER_ELEMENT;\n* // returns 8\n*/\nsetReadOnly( Complex64Array, 'BYTES_PER_ELEMENT', BYTES_PER_ELEMENT );\n\n/**\n* Constructor name.\n*\n* @name name\n* @memberof Complex64Array\n* @readonly\n* @type {string}\n* @default 'Complex64Array'\n*\n* @example\n* var str = Complex64Array.name;\n* // returns 'Complex64Array'\n*/\nsetReadOnly( Complex64Array, 'name', 'Complex64Array' );\n\n/**\n* Creates a new 64-bit complex number array from an array-like object or an iterable.\n*\n* @name from\n* @memberof Complex64Array\n* @type {Function}\n* @param {(Collection|Iterable)} src - array-like object or iterable\n* @param {Function} [clbk] - callback to invoke for each source element\n* @param {*} [thisArg] - context\n* @throws {TypeError} `this` context must be a constructor\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be an array-like object or an iterable\n* @throws {TypeError} second argument must be a function\n* @throws {RangeError} array-like objects must have a length which is a multiple of two\n* @throws {TypeError} an iterator must return either a two element array containing real and imaginary components or a complex number\n* @throws {TypeError} when provided an iterator, a callback must return either a two element array containing real and imaginary components or a complex number\n* @returns {Complex64Array} 64-bit complex number array\n*\n* @example\n* var arr = Complex64Array.from( [ 1.0, -1.0 ] );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n*\n* var arr = Complex64Array.from( [ new Complex64( 1.0, 1.0 ) ] );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* function clbk( v ) {\n* return new Complex64( realf(v)*2.0, imagf(v)*2.0 );\n* }\n*\n* var arr = Complex64Array.from( [ new Complex64( 1.0, 1.0 ) ], clbk );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*/\nsetReadOnly( Complex64Array, 'from', function from( src ) {\n\tvar thisArg;\n\tvar nargs;\n\tvar clbk;\n\tvar out;\n\tvar buf;\n\tvar tmp;\n\tvar get;\n\tvar len;\n\tvar flg;\n\tvar v;\n\tvar i;\n\tvar j;\n\tif ( !isFunction( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` context must be a constructor.' );\n\t}\n\tif ( !isComplexArrayConstructor( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tnargs = arguments.length;\n\tif ( nargs > 1 ) {\n\t\tclbk = arguments[ 1 ];\n\t\tif ( !isFunction( clbk ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be a function. Value: `%s`.', clbk ) );\n\t\t}\n\t\tif ( nargs > 2 ) {\n\t\t\tthisArg = arguments[ 2 ];\n\t\t}\n\t}\n\tif ( isComplexArray( src ) ) {\n\t\tlen = src.length;\n\t\tif ( clbk ) {\n\t\t\tout = new this( len );\n\t\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\t\tj = 0;\n\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\tv = clbk.call( thisArg, src.get( i ), i );\n\t\t\t\tif ( isComplexLike( v ) ) {\n\t\t\t\t\tbuf[ j ] = realf( v );\n\t\t\t\t\tbuf[ j+1 ] = imagf( v );\n\t\t\t\t} else if ( isArrayLikeObject( v ) && v.length >= 2 ) {\n\t\t\t\t\tbuf[ j ] = v[ 0 ];\n\t\t\t\t\tbuf[ j+1 ] = v[ 1 ];\n\t\t\t\t} else {\n\t\t\t\t\tthrow new TypeError( format( 'invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', v ) );\n\t\t\t\t}\n\t\t\t\tj += 2; // stride\n\t\t\t}\n\t\t\treturn out;\n\t\t}\n\t\treturn new this( src );\n\t}\n\tif ( isCollection( src ) ) {\n\t\tif ( clbk ) {\n\t\t\t// Note: array contents affect how we iterate over a provided data source. If only complex number objects, we can extract real and imaginary components. Otherwise, for non-complex number arrays (e.g., `Float64Array`, etc), we assume a strided array where real and imaginary components are interleaved. In the former case, we expect a callback to return real and imaginary components (possibly as a complex number). In the latter case, we expect a callback to return *either* a real or imaginary component.\n\n\t\t\tlen = src.length;\n\t\t\tif ( src.get && src.set ) {\n\t\t\t\tget = accessorGetter( 'default' );\n\t\t\t} else {\n\t\t\t\tget = getter( 'default' );\n\t\t\t}\n\t\t\t// Detect whether we've been provided an array which returns complex number objects...\n\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\tif ( !isComplexLike( get( src, i ) ) ) {\n\t\t\t\t\tflg = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// If an array does not contain only complex number objects, then we assume interleaved real and imaginary components...\n\t\t\tif ( flg ) {\n\t\t\t\tif ( !isEven( len ) ) {\n\t\t\t\t\tthrow new RangeError( format( 'invalid argument. First argument must have a length which is a multiple of %u. Length: `%u`.', 2, len ) );\n\t\t\t\t}\n\t\t\t\tout = new this( len/2 );\n\t\t\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\t\tbuf[ i ] = clbk.call( thisArg, get( src, i ), i );\n\t\t\t\t}\n\t\t\t\treturn out;\n\t\t\t}\n\t\t\t// If an array contains only complex number objects, then we need to extract real and imaginary components...\n\t\t\tout = new this( len );\n\t\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\t\tj = 0;\n\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\tv = clbk.call( thisArg, get( src, i ), i );\n\t\t\t\tif ( isComplexLike( v ) ) {\n\t\t\t\t\tbuf[ j ] = realf( v );\n\t\t\t\t\tbuf[ j+1 ] = imagf( v );\n\t\t\t\t} else if ( isArrayLikeObject( v ) && v.length >= 2 ) {\n\t\t\t\t\tbuf[ j ] = v[ 0 ];\n\t\t\t\t\tbuf[ j+1 ] = v[ 1 ];\n\t\t\t\t} else {\n\t\t\t\t\tthrow new TypeError( format( 'invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', v ) );\n\t\t\t\t}\n\t\t\t\tj += 2; // stride\n\t\t\t}\n\t\t\treturn out;\n\t\t}\n\t\treturn new this( src );\n\t}\n\tif ( isObject( src ) && HAS_ITERATOR_SYMBOL && isFunction( src[ ITERATOR_SYMBOL ] ) ) { // eslint-disable-line max-len\n\t\tbuf = src[ ITERATOR_SYMBOL ]();\n\t\tif ( !isFunction( buf.next ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.', src ) );\n\t\t}\n\t\tif ( clbk ) {\n\t\t\ttmp = fromIteratorMap( buf, clbk, thisArg );\n\t\t} else {\n\t\t\ttmp = fromIterator( buf );\n\t\t}\n\t\tif ( tmp instanceof Error ) {\n\t\t\tthrow tmp;\n\t\t}\n\t\tlen = tmp.length / 2;\n\t\tout = new this( len );\n\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\tbuf[ i ] = tmp[ i ];\n\t\t}\n\t\treturn out;\n\t}\n\tthrow new TypeError( format( 'invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.', src ) );\n});\n\n/**\n* Creates a new 64-bit complex number array from a variable number of arguments.\n*\n* @name of\n* @memberof Complex64Array\n* @type {Function}\n* @param {...*} element - array elements\n* @throws {TypeError} `this` context must be a constructor\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Complex64Array} 64-bit complex number array\n*\n* @example\n* var arr = Complex64Array.of( 1.0, 1.0, 1.0, 1.0 );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*/\nsetReadOnly( Complex64Array, 'of', function of() {\n\tvar args;\n\tvar i;\n\tif ( !isFunction( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` context must be a constructor.' );\n\t}\n\tif ( !isComplexArrayConstructor( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\targs = [];\n\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\targs.push( arguments[ i ] );\n\t}\n\treturn new this( args );\n});\n\n/**\n* Pointer to the underlying data buffer.\n*\n* @name buffer\n* @memberof Complex64Array.prototype\n* @readonly\n* @type {ArrayBuffer}\n*\n* @example\n* var arr = new Complex64Array( 10 );\n*\n* var buf = arr.buffer;\n* // returns \n*/\nsetReadOnlyAccessor( Complex64Array.prototype, 'buffer', function get() {\n\treturn this._buffer.buffer;\n});\n\n/**\n* Size (in bytes) of the array.\n*\n* @name byteLength\n* @memberof Complex64Array.prototype\n* @readonly\n* @type {NonNegativeInteger}\n*\n* @example\n* var arr = new Complex64Array( 10 );\n*\n* var byteLength = arr.byteLength;\n* // returns 80\n*/\nsetReadOnlyAccessor( Complex64Array.prototype, 'byteLength', function get() {\n\treturn this._buffer.byteLength;\n});\n\n/**\n* Offset (in bytes) of the array from the start of its underlying `ArrayBuffer`.\n*\n* @name byteOffset\n* @memberof Complex64Array.prototype\n* @readonly\n* @type {NonNegativeInteger}\n*\n* @example\n* var arr = new Complex64Array( 10 );\n*\n* var byteOffset = arr.byteOffset;\n* // returns 0\n*/\nsetReadOnlyAccessor( Complex64Array.prototype, 'byteOffset', function get() {\n\treturn this._buffer.byteOffset;\n});\n\n/**\n* Size (in bytes) of each array element.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex64Array.prototype\n* @readonly\n* @type {PositiveInteger}\n* @default 8\n*\n* @example\n* var arr = new Complex64Array( 10 );\n*\n* var nbytes = arr.BYTES_PER_ELEMENT;\n* // returns 8\n*/\nsetReadOnly( Complex64Array.prototype, 'BYTES_PER_ELEMENT', Complex64Array.BYTES_PER_ELEMENT );\n\n/**\n* Copies a sequence of elements within the array to the position starting at `target`.\n*\n* @name copyWithin\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {integer} target - index at which to start copying elements\n* @param {integer} start - source index at which to copy elements from\n* @param {integer} [end] - source index at which to stop copying elements from\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Complex64Array} modified array\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* var arr = new Complex64Array( 4 );\n*\n* // Set the array elements:\n* arr.set( new Complex64( 1.0, 1.0 ), 0 );\n* arr.set( new Complex64( 2.0, 2.0 ), 1 );\n* arr.set( new Complex64( 3.0, 3.0 ), 2 );\n* arr.set( new Complex64( 4.0, 4.0 ), 3 );\n*\n* // Copy the first two elements to the last two elements:\n* arr.copyWithin( 2, 0, 2 );\n*\n* // Get the last array element:\n* var z = arr.get( 3 );\n*\n* var re = realf( z );\n* // returns 2.0\n*\n* var im = imagf( z );\n* // returns 2.0\n*/\nsetReadOnly( Complex64Array.prototype, 'copyWithin', function copyWithin( target, start ) {\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\t// FIXME: prefer a functional `copyWithin` implementation which addresses lack of universal browser support (e.g., IE11 and Safari) or ensure that typed arrays are polyfilled\n\tif ( arguments.length === 2 ) {\n\t\tthis._buffer.copyWithin( target*2, start*2 );\n\t} else {\n\t\tthis._buffer.copyWithin( target*2, start*2, arguments[2]*2 );\n\t}\n\treturn this;\n});\n\n/**\n* Returns an iterator for iterating over array key-value pairs.\n*\n* @name entries\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Iterator} iterator\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n*\n* var arr = [\n* new Complex64( 1.0, 1.0 ),\n* new Complex64( 2.0, 2.0 ),\n* new Complex64( 3.0, 3.0 )\n* ];\n* arr = new Complex64Array( arr );\n*\n* // Create an iterator:\n* var it = arr.entries();\n*\n* // Iterate over the key-value pairs...\n* var v = it.next().value;\n* // returns [ 0, ]\n*\n* v = it.next().value;\n* // returns [ 1, ]\n*\n* v = it.next().value;\n* // returns [ 2, ]\n*\n* var bool = it.next().done;\n* // returns true\n*/\nsetReadOnly( Complex64Array.prototype, 'entries', function entries() {\n\tvar buffer;\n\tvar self;\n\tvar iter;\n\tvar len;\n\tvar FLG;\n\tvar i;\n\tvar j;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tself = this;\n\tbuffer = this._buffer;\n\tlen = this._length;\n\n\t// Initialize the iteration indices:\n\ti = -1;\n\tj = -2;\n\n\t// Create an iterator protocol-compliant object:\n\titer = {};\n\tsetReadOnly( iter, 'next', next );\n\tsetReadOnly( iter, 'return', end );\n\n\tif ( ITERATOR_SYMBOL ) {\n\t\tsetReadOnly( iter, ITERATOR_SYMBOL, factory );\n\t}\n\treturn iter;\n\n\t/**\n\t* Returns an iterator protocol-compliant object containing the next iterated value.\n\t*\n\t* @private\n\t* @returns {Object} iterator protocol-compliant object\n\t*/\n\tfunction next() {\n\t\tvar z;\n\t\ti += 1;\n\t\tif ( FLG || i >= len ) {\n\t\t\treturn {\n\t\t\t\t'done': true\n\t\t\t};\n\t\t}\n\t\tj += 2;\n\t\tz = new Complex64( buffer[ j ], buffer[ j+1 ] );\n\t\treturn {\n\t\t\t'value': [ i, z ],\n\t\t\t'done': false\n\t\t};\n\t}\n\n\t/**\n\t* Finishes an iterator.\n\t*\n\t* @private\n\t* @param {*} [value] - value to return\n\t* @returns {Object} iterator protocol-compliant object\n\t*/\n\tfunction end( value ) {\n\t\tFLG = true;\n\t\tif ( arguments.length ) {\n\t\t\treturn {\n\t\t\t\t'value': value,\n\t\t\t\t'done': true\n\t\t\t};\n\t\t}\n\t\treturn {\n\t\t\t'done': true\n\t\t};\n\t}\n\n\t/**\n\t* Returns a new iterator.\n\t*\n\t* @private\n\t* @returns {Iterator} iterator\n\t*/\n\tfunction factory() {\n\t\treturn self.entries();\n\t}\n});\n\n/**\n* Returns an array element.\n*\n* @name get\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {NonNegativeInteger} idx - element index\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} must provide a nonnegative integer\n* @returns {(Complex64|void)} array element\n*\n* @example\n* var arr = new Complex64Array( 10 );\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* var z = arr.get( 0 );\n* // returns \n*\n* var re = realf( z );\n* // returns 0.0\n*\n* var im = imagf( z );\n* // returns 0.0\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n*\n* z = arr.get( 0 );\n* // returns \n*\n* re = realf( z );\n* // returns 1.0\n*\n* im = imagf( z );\n* // returns -1.0\n*\n* z = arr.get( 100 );\n* // returns undefined\n*/\nsetReadOnly( Complex64Array.prototype, 'get', function get( idx ) {\n\tvar buf;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isNonNegativeInteger( idx ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Must provide a nonnegative integer. Value: `%s`.', idx ) );\n\t}\n\tif ( idx >= this._length ) {\n\t\treturn;\n\t}\n\tbuf = this._buffer;\n\tidx *= 2;\n\treturn new Complex64( buf[ idx ], buf[ idx+1 ] );\n});\n\n/**\n* Number of array elements.\n*\n* @name length\n* @memberof Complex64Array.prototype\n* @readonly\n* @type {NonNegativeInteger}\n*\n* @example\n* var arr = new Complex64Array( 10 );\n*\n* var len = arr.length;\n* // returns 10\n*/\nsetReadOnlyAccessor( Complex64Array.prototype, 'length', function get() {\n\treturn this._length;\n});\n\n/**\n* Sets an array element.\n*\n* ## Notes\n*\n* - When provided a typed array, real or complex, we must check whether the source array shares the same buffer as the target array and whether the underlying memory overlaps. In particular, we are concerned with the following scenario:\n*\n* ```text\n* buf: ---------------------\n* src: ---------------------\n* ```\n*\n* In the above, as we copy values from `src`, we will overwrite values in the `src` view, resulting in duplicated values copied into the end of `buf`, which is not intended. Hence, to avoid overwriting source values, we must **copy** source values to a temporary array.\n*\n* In the other overlapping scenario,\n*\n* ```text\n* buf: ---------------------\n* src: ---------------------\n* ```\n*\n* by the time we begin copying into the overlapping region, we are copying from the end of `src`, a non-overlapping region, which means we don't run the risk of copying copied values, rather than the original `src` values as intended.\n*\n*\n* @name set\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {(Collection|Complex|ComplexArray)} value - value(s)\n* @param {NonNegativeInteger} [i=0] - element index at which to start writing values\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be either a complex number, an array-like object, or a complex number array\n* @throws {TypeError} index argument must be a nonnegative integer\n* @throws {RangeError} array-like objects must have a length which is a multiple of two\n* @throws {RangeError} index argument is out-of-bounds\n* @throws {RangeError} target array lacks sufficient storage to accommodate source values\n* @returns {void}\n*\n* @example\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* var arr = new Complex64Array( 10 );\n*\n* var z = arr.get( 0 );\n* // returns \n*\n* var re = realf( z );\n* // returns 0.0\n*\n* var im = imagf( z );\n* // returns 0.0\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n*\n* z = arr.get( 0 );\n* // returns \n*\n* re = realf( z );\n* // returns 1.0\n*\n* im = imagf( z );\n* // returns -1.0\n*/\nsetReadOnly( Complex64Array.prototype, 'set', function set( value ) {\n\t/* eslint-disable no-underscore-dangle */\n\tvar sbuf;\n\tvar idx;\n\tvar buf;\n\tvar tmp;\n\tvar flg;\n\tvar N;\n\tvar v;\n\tvar i;\n\tvar j;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tbuf = this._buffer;\n\tif ( arguments.length > 1 ) {\n\t\tidx = arguments[ 1 ];\n\t\tif ( !isNonNegativeInteger( idx ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Index argument must be a nonnegative integer. Value: `%s`.', idx ) );\n\t\t}\n\t} else {\n\t\tidx = 0;\n\t}\n\tif ( isComplexLike( value ) ) {\n\t\tif ( idx >= this._length ) {\n\t\t\tthrow new RangeError( format( 'invalid argument. Index argument is out-of-bounds. Value: `%u`.', idx ) );\n\t\t}\n\t\tidx *= 2;\n\t\tbuf[ idx ] = realf( value );\n\t\tbuf[ idx+1 ] = imagf( value );\n\t\treturn;\n\t}\n\tif ( isComplexArray( value ) ) {\n\t\tN = value._length;\n\t\tif ( idx+N > this._length ) {\n\t\t\tthrow new RangeError( 'invalid arguments. Target array lacks sufficient storage to accommodate source values.' );\n\t\t}\n\t\tsbuf = value._buffer;\n\n\t\t// Check for overlapping memory...\n\t\tj = buf.byteOffset + (idx*BYTES_PER_ELEMENT);\n\t\tif (\n\t\t\tsbuf.buffer === buf.buffer &&\n\t\t\t(\n\t\t\t\tsbuf.byteOffset < j &&\n\t\t\t\tsbuf.byteOffset+sbuf.byteLength > j\n\t\t\t)\n\t\t) {\n\t\t\t// We need to copy source values...\n\t\t\ttmp = new Float32Array( sbuf.length );\n\t\t\tfor ( i = 0; i < sbuf.length; i++ ) {\n\t\t\t\ttmp[ i ] = sbuf[ i ];\n\t\t\t}\n\t\t\tsbuf = tmp;\n\t\t}\n\t\tidx *= 2;\n\t\tj = 0;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\tbuf[ idx ] = sbuf[ j ];\n\t\t\tbuf[ idx+1 ] = sbuf[ j+1 ];\n\t\t\tidx += 2; // stride\n\t\t\tj += 2; // stride\n\t\t}\n\t\treturn;\n\t}\n\tif ( isCollection( value ) ) {\n\t\t// Detect whether we've been provided an array of complex numbers...\n\t\tN = value.length;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\tif ( !isComplexLike( value[ i ] ) ) {\n\t\t\t\tflg = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t// If an array does not contain only complex numbers, then we assume interleaved real and imaginary components...\n\t\tif ( flg ) {\n\t\t\tif ( !isEven( N ) ) {\n\t\t\t\tthrow new RangeError( format( 'invalid argument. Array-like object arguments must have a length which is a multiple of two. Length: `%u`.', N ) );\n\t\t\t}\n\t\t\tif ( idx+(N/2) > this._length ) {\n\t\t\t\tthrow new RangeError( 'invalid arguments. Target array lacks sufficient storage to accommodate source values.' );\n\t\t\t}\n\t\t\tsbuf = value;\n\n\t\t\t// Check for overlapping memory...\n\t\t\tj = buf.byteOffset + (idx*BYTES_PER_ELEMENT);\n\t\t\tif (\n\t\t\t\tsbuf.buffer === buf.buffer &&\n\t\t\t\t(\n\t\t\t\t\tsbuf.byteOffset < j &&\n\t\t\t\t\tsbuf.byteOffset+sbuf.byteLength > j\n\t\t\t\t)\n\t\t\t) {\n\t\t\t\t// We need to copy source values...\n\t\t\t\ttmp = new Float32Array( N );\n\t\t\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\t\t\ttmp[ i ] = sbuf[ i ];\n\t\t\t\t}\n\t\t\t\tsbuf = tmp;\n\t\t\t}\n\t\t\tidx *= 2;\n\t\t\tN /= 2;\n\t\t\tj = 0;\n\t\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\t\tbuf[ idx ] = sbuf[ j ];\n\t\t\t\tbuf[ idx+1 ] = sbuf[ j+1 ];\n\t\t\t\tidx += 2; // stride\n\t\t\t\tj += 2; // stride\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\t// If an array contains only complex numbers, then we need to extract real and imaginary components...\n\t\tif ( idx+N > this._length ) {\n\t\t\tthrow new RangeError( 'invalid arguments. Target array lacks sufficient storage to accommodate source values.' );\n\t\t}\n\t\tidx *= 2;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\tv = value[ i ];\n\t\t\tbuf[ idx ] = realf( v );\n\t\t\tbuf[ idx+1 ] = imagf( v );\n\t\t\tidx += 2; // stride\n\t\t}\n\t\treturn;\n\t}\n\tthrow new TypeError( format( 'invalid argument. First argument must be either a complex number, an array-like object, or a complex number array. Value: `%s`.', value ) );\n\n\t/* eslint-enable no-underscore-dangle */\n});\n\n\n// EXPORTS //\n\nexport default Complex64Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Returns the real component of a double-precision complex floating-point number.\n*\n* @param {Complex} z - complex number\n* @returns {number} real component\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n*\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var re = real( z );\n* // returns 5.0\n*/\nfunction real( z ) {\n\treturn z.re;\n}\n\n\n// EXPORTS //\n\nexport default real;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Returns the imaginary component of a double-precision complex floating-point number.\n*\n* @param {Complex} z - complex number\n* @returns {number} imaginary component\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n*\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var im = imag( z );\n* // returns 3.0\n*/\nfunction imag( z ) {\n\treturn z.im;\n}\n\n\n// EXPORTS //\n\nexport default imag;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isArrayLikeObject from '@stdlib/assert-is-array-like-object';\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport format from '@stdlib/string-format';\nimport real from '@stdlib/complex-real';\nimport imag from '@stdlib/complex-imag';\n\n\n// MAIN //\n\n/**\n* Returns an array of iterated values.\n*\n* @private\n* @param {Object} it - iterator\n* @returns {(Array|TypeError)} array or an error\n*/\nfunction fromIterator( it ) {\n\tvar out;\n\tvar v;\n\tvar z;\n\n\tout = [];\n\twhile ( true ) {\n\t\tv = it.next();\n\t\tif ( v.done ) {\n\t\t\tbreak;\n\t\t}\n\t\tz = v.value;\n\t\tif ( isArrayLikeObject( z ) && z.length >= 2 ) {\n\t\t\tout.push( z[ 0 ], z[ 1 ] );\n\t\t} else if ( isComplexLike( z ) ) {\n\t\t\tout.push( real( z ), imag( z ) );\n\t\t} else {\n\t\t\treturn new TypeError( format( 'invalid argument. An iterator must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', z ) );\n\t\t}\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default fromIterator;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isArrayLikeObject from '@stdlib/assert-is-array-like-object';\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport format from '@stdlib/string-format';\nimport real from '@stdlib/complex-real';\nimport imag from '@stdlib/complex-imag';\n\n\n// MAIN //\n\n/**\n* Returns an array of iterated values.\n*\n* @private\n* @param {Object} it - iterator\n* @param {Function} clbk - callback to invoke for each iterated value\n* @param {*} thisArg - invocation context\n* @returns {(Array|TypeError)} array or an error\n*/\nfunction fromIteratorMap( it, clbk, thisArg ) {\n\tvar out;\n\tvar v;\n\tvar z;\n\tvar i;\n\n\tout = [];\n\ti = -1;\n\twhile ( true ) {\n\t\tv = it.next();\n\t\tif ( v.done ) {\n\t\t\tbreak;\n\t\t}\n\t\ti += 1;\n\t\tz = clbk.call( thisArg, v.value, i );\n\t\tif ( isArrayLikeObject( z ) && z.length >= 2 ) {\n\t\t\tout.push( z[ 0 ], z[ 1 ] );\n\t\t} else if ( isComplexLike( z ) ) {\n\t\t\tout.push( real( z ), imag( z ) );\n\t\t} else {\n\t\t\treturn new TypeError( format( 'invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', z ) );\n\t\t}\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default fromIteratorMap;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport real from '@stdlib/complex-real';\nimport imag from '@stdlib/complex-imag';\n\n\n// MAIN //\n\n/**\n* Returns a strided array of real and imaginary components.\n*\n* @private\n* @param {Float64Array} buf - output array\n* @param {Array} arr - array containing complex numbers\n* @returns {(Float64Array|null)} output array or null\n*/\nfunction fromArray( buf, arr ) {\n\tvar len;\n\tvar v;\n\tvar i;\n\tvar j;\n\n\tlen = arr.length;\n\tj = 0;\n\tfor ( i = 0; i < len; i++ ) {\n\t\tv = arr[ i ];\n\t\tif ( !isComplexLike( v ) ) {\n\t\t\treturn null;\n\t\t}\n\t\tbuf[ j ] = real( v );\n\t\tbuf[ j+1 ] = imag( v );\n\t\tj += 2; // stride\n\t}\n\treturn buf;\n}\n\n\n// EXPORTS //\n\nexport default fromArray;\n","/* eslint-disable no-restricted-syntax, max-lines, no-invalid-this */\n\n/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isNonNegativeInteger } from '@stdlib/assert-is-nonnegative-integer';\nimport isArrayLikeObject from '@stdlib/assert-is-array-like-object';\nimport isCollection from '@stdlib/assert-is-collection';\nimport isArrayBuffer from '@stdlib/assert-is-arraybuffer';\nimport isObject from '@stdlib/assert-is-object';\nimport isArray from '@stdlib/assert-is-array';\nimport isFunction from '@stdlib/assert-is-function';\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport isEven from '@stdlib/math-base-assert-is-even';\nimport isInteger from '@stdlib/math-base-assert-is-integer';\nimport hasIteratorSymbolSupport from '@stdlib/assert-has-iterator-symbol-support';\nimport ITERATOR_SYMBOL from '@stdlib/symbol-iterator';\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport setReadOnlyAccessor from '@stdlib/utils-define-nonenumerable-read-only-accessor';\nimport Float64Array from '@stdlib/array-float64';\nimport Complex128 from '@stdlib/complex-float64';\nimport real from '@stdlib/complex-real';\nimport imag from '@stdlib/complex-imag';\nimport reinterpret64 from '@stdlib/strided-base-reinterpret-complex64';\nimport reinterpret128 from '@stdlib/strided-base-reinterpret-complex128';\nimport getter from '@stdlib/array-base-getter';\nimport accessorGetter from '@stdlib/array-base-accessor-getter';\nimport format from '@stdlib/string-format';\nimport fromIterator from './from_iterator.js';\nimport fromIteratorMap from './from_iterator_map.js';\nimport fromArray from './from_array.js';\n\n\n// VARIABLES //\n\nvar BYTES_PER_ELEMENT = Float64Array.BYTES_PER_ELEMENT * 2;\nvar HAS_ITERATOR_SYMBOL = hasIteratorSymbolSupport();\n\n\n// FUNCTIONS //\n\n/**\n* Returns a boolean indicating if a value is a complex typed array.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a complex typed array\n*/\nfunction isComplexArray( value ) {\n\treturn (\n\t\tvalue instanceof Complex128Array ||\n\t\t(\n\t\t\ttypeof value === 'object' &&\n\t\t\tvalue !== null &&\n\t\t\t(\n\t\t\t\tvalue.constructor.name === 'Complex64Array' ||\n\t\t\t\tvalue.constructor.name === 'Complex128Array'\n\t\t\t) &&\n\t\t\ttypeof value._length === 'number' && // eslint-disable-line no-underscore-dangle\n\n\t\t\t// NOTE: we don't perform a more rigorous test here for a typed array for performance reasons, as robustly checking for a typed array instance could require walking the prototype tree and performing relatively expensive constructor checks...\n\t\t\ttypeof value._buffer === 'object' // eslint-disable-line no-underscore-dangle\n\t\t)\n\t);\n}\n\n/**\n* Returns a boolean indicating if a value is a complex typed array constructor.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a complex typed array constructor\n*/\nfunction isComplexArrayConstructor( value ) {\n\treturn (\n\t\tvalue === Complex128Array ||\n\n\t\t// NOTE: weaker test in order to avoid a circular dependency with Complex64Array...\n\t\tvalue.name === 'Complex64Array'\n\t);\n}\n\n/**\n* Returns a boolean indicating if a value is a `Complex64Array`.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a `Complex64Array`\n*/\nfunction isComplex64Array( value ) {\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\tvalue.constructor.name === 'Complex64Array' &&\n\t\tvalue.BYTES_PER_ELEMENT === BYTES_PER_ELEMENT/2\n\t);\n}\n\n/**\n* Returns a boolean indicating if a value is a `Complex128Array`.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a `Complex128Array`\n*/\nfunction isComplex128Array( value ) {\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\tvalue.constructor.name === 'Complex128Array' &&\n\t\tvalue.BYTES_PER_ELEMENT === BYTES_PER_ELEMENT\n\t);\n}\n\n\n// MAIN //\n\n/**\n* 128-bit complex number array constructor.\n*\n* @constructor\n* @param {(NonNegativeInteger|Collection|ArrayBuffer|Iterable)} [arg] - length, typed array, array-like object, buffer, or iterable\n* @param {NonNegativeInteger} [byteOffset=0] - byte offset\n* @param {NonNegativeInteger} [length] - view length\n* @throws {RangeError} ArrayBuffer byte length must be a multiple of `16`\n* @throws {RangeError} array-like object and typed array input arguments must have a length which is a multiple of two\n* @throws {TypeError} if provided only a single argument, must provide a valid argument\n* @throws {TypeError} byte offset must be a nonnegative integer\n* @throws {RangeError} byte offset must be a multiple of `16`\n* @throws {TypeError} view length must be a positive multiple of `16`\n* @throws {RangeError} must provide sufficient memory to accommodate byte offset and view length requirements\n* @throws {TypeError} an iterator must return either a two element array containing real and imaginary components or a complex number\n* @returns {Complex128Array} complex number array\n*\n* @example\n* var arr = new Complex128Array();\n* // returns \n*\n* var len = arr.length;\n* // returns 0\n*\n* @example\n* var arr = new Complex128Array( 2 );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*\n* @example\n* var arr = new Complex128Array( [ 1.0, -1.0 ] );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* import ArrayBuffer from '@stdlib/array-buffer';\n*\n* var buf = new ArrayBuffer( 32 );\n* var arr = new Complex128Array( buf );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*\n* @example\n* import ArrayBuffer from '@stdlib/array-buffer';\n*\n* var buf = new ArrayBuffer( 32 );\n* var arr = new Complex128Array( buf, 16 );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* import ArrayBuffer from '@stdlib/array-buffer';\n*\n* var buf = new ArrayBuffer( 64 );\n* var arr = new Complex128Array( buf, 16, 2 );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*/\nfunction Complex128Array() {\n\tvar byteOffset;\n\tvar nargs;\n\tvar buf;\n\tvar len;\n\n\tnargs = arguments.length;\n\tif ( !(this instanceof Complex128Array) ) {\n\t\tif ( nargs === 0 ) {\n\t\t\treturn new Complex128Array();\n\t\t}\n\t\tif ( nargs === 1 ) {\n\t\t\treturn new Complex128Array( arguments[0] );\n\t\t}\n\t\tif ( nargs === 2 ) {\n\t\t\treturn new Complex128Array( arguments[0], arguments[1] );\n\t\t}\n\t\treturn new Complex128Array( arguments[0], arguments[1], arguments[2] );\n\t}\n\t// Create the underlying data buffer...\n\tif ( nargs === 0 ) {\n\t\tbuf = new Float64Array( 0 ); // backward-compatibility\n\t} else if ( nargs === 1 ) {\n\t\tif ( isNonNegativeInteger( arguments[0] ) ) {\n\t\t\tbuf = new Float64Array( arguments[0]*2 );\n\t\t} else if ( isCollection( arguments[0] ) ) {\n\t\t\tbuf = arguments[ 0 ];\n\t\t\tlen = buf.length;\n\n\t\t\t// If provided a \"generic\" array, peak at the first value, and, if the value is a complex number, try to process as an array of complex numbers, falling back to \"normal\" typed array initialization if we fail and ensuring consistency if the first value had not been a complex number...\n\t\t\tif ( len && isArray( buf ) && isComplexLike( buf[0] ) ) {\n\t\t\t\tbuf = fromArray( new Float64Array( len*2 ), buf );\n\t\t\t\tif ( buf === null ) {\n\t\t\t\t\t// We failed and we are now forced to allocate a new array :-(\n\t\t\t\t\tif ( !isEven( len ) ) {\n\t\t\t\t\t\tthrow new RangeError( format( 'invalid argument. Array-like object arguments must have a length which is a multiple of two. Length: `%u`.', len ) );\n\t\t\t\t\t}\n\t\t\t\t\t// We failed, so fall back to directly setting values...\n\t\t\t\t\tbuf = new Float64Array( arguments[0] );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ( isComplex64Array( buf ) ) {\n\t\t\t\t\tbuf = reinterpret64( buf, 0 );\n\t\t\t\t} else if ( isComplex128Array( buf ) ) {\n\t\t\t\t\tbuf = reinterpret128( buf, 0 );\n\t\t\t\t} else if ( !isEven( len ) ) {\n\t\t\t\t\tthrow new RangeError( format( 'invalid argument. Array-like object and typed array arguments must have a length which is a multiple of two. Length: `%u`.', len ) );\n\t\t\t\t}\n\t\t\t\tbuf = new Float64Array( buf );\n\t\t\t}\n\t\t} else if ( isArrayBuffer( arguments[0] ) ) {\n\t\t\tbuf = arguments[ 0 ];\n\t\t\tif ( !isInteger( buf.byteLength/BYTES_PER_ELEMENT ) ) {\n\t\t\t\tthrow new RangeError( format( 'invalid argument. ArrayBuffer byte length must be a multiple of %u. Byte length: `%u`.', BYTES_PER_ELEMENT, buf.byteLength ) );\n\t\t\t}\n\t\t\tbuf = new Float64Array( buf );\n\t\t} else if ( isObject( arguments[0] ) ) {\n\t\t\tbuf = arguments[ 0 ];\n\t\t\tif ( HAS_ITERATOR_SYMBOL === false ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Environment lacks Symbol.iterator support. Must provide a length, ArrayBuffer, typed array, or array-like object. Value: `%s`.', buf ) );\n\t\t\t}\n\t\t\tif ( !isFunction( buf[ ITERATOR_SYMBOL ] ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.', buf ) );\n\t\t\t}\n\t\t\tbuf = buf[ ITERATOR_SYMBOL ]();\n\t\t\tif ( !isFunction( buf.next ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.', buf ) );\n\t\t\t}\n\t\t\tbuf = fromIterator( buf );\n\t\t\tif ( buf instanceof Error ) {\n\t\t\t\tthrow buf;\n\t\t\t}\n\t\t\tbuf = new Float64Array( buf );\n\t\t} else {\n\t\t\tthrow new TypeError( format( 'invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.', arguments[0] ) );\n\t\t}\n\t} else {\n\t\tbuf = arguments[ 0 ];\n\t\tif ( !isArrayBuffer( buf ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. First argument must be an ArrayBuffer. Value: `%s`.', buf ) );\n\t\t}\n\t\tbyteOffset = arguments[ 1 ];\n\t\tif ( !isNonNegativeInteger( byteOffset ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Byte offset must be a nonnegative integer. Value: `%s`.', byteOffset ) );\n\t\t}\n\t\tif ( !isInteger( byteOffset/BYTES_PER_ELEMENT ) ) {\n\t\t\tthrow new RangeError( format( 'invalid argument. Byte offset must be a multiple of %u. Value: `%u`.', BYTES_PER_ELEMENT, byteOffset ) );\n\t\t}\n\t\tif ( nargs === 2 ) {\n\t\t\tlen = buf.byteLength - byteOffset;\n\t\t\tif ( !isInteger( len/BYTES_PER_ELEMENT ) ) {\n\t\t\t\tthrow new RangeError( format( 'invalid arguments. ArrayBuffer view byte length must be a multiple of %u. View byte length: `%u`.', BYTES_PER_ELEMENT, len ) );\n\t\t\t}\n\t\t\tbuf = new Float64Array( buf, byteOffset );\n\t\t} else {\n\t\t\tlen = arguments[ 2 ];\n\t\t\tif ( !isNonNegativeInteger( len ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Length must be a nonnegative integer. Value: `%s`.', len ) );\n\t\t\t}\n\t\t\tif ( (len*BYTES_PER_ELEMENT) > (buf.byteLength-byteOffset) ) {\n\t\t\t\tthrow new RangeError( format( 'invalid arguments. ArrayBuffer has insufficient capacity. Either decrease the array length or provide a bigger buffer. Minimum capacity: `%u`.', len*BYTES_PER_ELEMENT ) );\n\t\t\t}\n\t\t\tbuf = new Float64Array( buf, byteOffset, len*2 );\n\t\t}\n\t}\n\tsetReadOnly( this, '_buffer', buf );\n\tsetReadOnly( this, '_length', buf.length/2 );\n\n\treturn this;\n}\n\n/**\n* Size (in bytes) of each array element.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex128Array\n* @readonly\n* @type {PositiveInteger}\n* @default 16\n*\n* @example\n* var nbytes = Complex128Array.BYTES_PER_ELEMENT;\n* // returns 16\n*/\nsetReadOnly( Complex128Array, 'BYTES_PER_ELEMENT', BYTES_PER_ELEMENT );\n\n/**\n* Constructor name.\n*\n* @name name\n* @memberof Complex128Array\n* @readonly\n* @type {string}\n* @default 'Complex128Array'\n*\n* @example\n* var name = Complex128Array.name;\n* // returns 'Complex128Array'\n*/\nsetReadOnly( Complex128Array, 'name', 'Complex128Array' );\n\n/**\n* Creates a new 128-bit complex number array from an array-like object or an iterable.\n*\n* @name from\n* @memberof Complex128Array\n* @type {Function}\n* @param {(Collection|Object)} src - array-like object or iterable\n* @param {Function} [clbk] - callback to invoke for each source element\n* @param {*} [thisArg] - context\n* @throws {TypeError} `this` context must be a constructor\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be an array-like object or an iterable\n* @throws {TypeError} second argument must be a function\n* @throws {RangeError} array-like objects must have a length which is a multiple of two\n* @throws {TypeError} an iterator must return either a two element array containing real and imaginary components or a complex number\n* @throws {TypeError} when provided an iterator, a callback must return either a two element array containing real and imaginary components or a complex number\n* @returns {Complex128Array} 128-bit complex number array\n*\n* @example\n* var arr = Complex128Array.from( [ 1.0, -1.0 ] );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n*\n* var arr = Complex128Array.from( [ new Complex128( 1.0, 1.0 ) ] );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* function clbk( v ) {\n* return new Complex128( real(v)*2.0, imag(v)*2.0 );\n* }\n*\n* var arr = Complex128Array.from( [ new Complex128( 1.0, 1.0 ) ], clbk );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*/\nsetReadOnly( Complex128Array, 'from', function from( src ) {\n\tvar thisArg;\n\tvar nargs;\n\tvar clbk;\n\tvar out;\n\tvar buf;\n\tvar tmp;\n\tvar get;\n\tvar len;\n\tvar flg;\n\tvar v;\n\tvar i;\n\tvar j;\n\tif ( !isFunction( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` context must be a constructor.' );\n\t}\n\tif ( !isComplexArrayConstructor( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tnargs = arguments.length;\n\tif ( nargs > 1 ) {\n\t\tclbk = arguments[ 1 ];\n\t\tif ( !isFunction( clbk ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be a function. Value: `%s`.', clbk ) );\n\t\t}\n\t\tif ( nargs > 2 ) {\n\t\t\tthisArg = arguments[ 2 ];\n\t\t}\n\t}\n\tif ( isComplexArray( src ) ) {\n\t\tlen = src.length;\n\t\tif ( clbk ) {\n\t\t\tout = new this( len );\n\t\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\t\tj = 0;\n\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\tv = clbk.call( thisArg, src.get( i ), i );\n\t\t\t\tif ( isComplexLike( v ) ) {\n\t\t\t\t\tbuf[ j ] = real( v );\n\t\t\t\t\tbuf[ j+1 ] = imag( v );\n\t\t\t\t} else if ( isArrayLikeObject( v ) && v.length >= 2 ) {\n\t\t\t\t\tbuf[ j ] = v[ 0 ];\n\t\t\t\t\tbuf[ j+1 ] = v[ 1 ];\n\t\t\t\t} else {\n\t\t\t\t\tthrow new TypeError( format( 'invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', v ) );\n\t\t\t\t}\n\t\t\t\tj += 2; // stride\n\t\t\t}\n\t\t\treturn out;\n\t\t}\n\t\treturn new this( src );\n\t}\n\tif ( isCollection( src ) ) {\n\t\tif ( clbk ) {\n\t\t\t// Note: array contents affect how we iterate over a provided data source. If only complex number objects, we can extract real and imaginary components. Otherwise, for non-complex number arrays (e.g., `Float64Array`, etc), we assume a strided array where real and imaginary components are interleaved. In the former case, we expect a callback to return real and imaginary components (possibly as a complex number). In the latter case, we expect a callback to return *either* a real or imaginary component.\n\n\t\t\tlen = src.length;\n\t\t\tif ( src.get && src.set ) {\n\t\t\t\tget = accessorGetter( 'default' );\n\t\t\t} else {\n\t\t\t\tget = getter( 'default' );\n\t\t\t}\n\t\t\t// Detect whether we've been provided an array which returns complex number objects...\n\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\tif ( !isComplexLike( get( src, i ) ) ) {\n\t\t\t\t\tflg = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// If an array does not contain only complex number objects, then we assume interleaved real and imaginary components...\n\t\t\tif ( flg ) {\n\t\t\t\tif ( !isEven( len ) ) {\n\t\t\t\t\tthrow new RangeError( format( 'invalid argument. First argument must have a length which is a multiple of two. Length: `%u`.', len ) );\n\t\t\t\t}\n\t\t\t\tout = new this( len/2 );\n\t\t\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\t\tbuf[ i ] = clbk.call( thisArg, get( src, i ), i );\n\t\t\t\t}\n\t\t\t\treturn out;\n\t\t\t}\n\t\t\t// If an array contains only complex number objects, then we need to extract real and imaginary components...\n\t\t\tout = new this( len );\n\t\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\t\tj = 0;\n\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\tv = clbk.call( thisArg, get( src, i ), i );\n\t\t\t\tif ( isComplexLike( v ) ) {\n\t\t\t\t\tbuf[ j ] = real( v );\n\t\t\t\t\tbuf[ j+1 ] = imag( v );\n\t\t\t\t} else if ( isArrayLikeObject( v ) && v.length >= 2 ) {\n\t\t\t\t\tbuf[ j ] = v[ 0 ];\n\t\t\t\t\tbuf[ j+1 ] = v[ 1 ];\n\t\t\t\t} else {\n\t\t\t\t\tthrow new TypeError( format( 'invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', v ) );\n\t\t\t\t}\n\t\t\t\tj += 2; // stride\n\t\t\t}\n\t\t\treturn out;\n\t\t}\n\t\treturn new this( src );\n\t}\n\tif ( isObject( src ) && HAS_ITERATOR_SYMBOL && isFunction( src[ ITERATOR_SYMBOL ] ) ) { // eslint-disable-line max-len\n\t\tbuf = src[ ITERATOR_SYMBOL ]();\n\t\tif ( !isFunction( buf.next ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.', src ) );\n\t\t}\n\t\tif ( clbk ) {\n\t\t\ttmp = fromIteratorMap( buf, clbk, thisArg );\n\t\t} else {\n\t\t\ttmp = fromIterator( buf );\n\t\t}\n\t\tif ( tmp instanceof Error ) {\n\t\t\tthrow tmp;\n\t\t}\n\t\tlen = tmp.length / 2;\n\t\tout = new this( len );\n\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\tbuf[ i ] = tmp[ i ];\n\t\t}\n\t\treturn out;\n\t}\n\tthrow new TypeError( format( 'invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.', src ) );\n});\n\n/**\n* Creates a new 128-bit complex number array from a variable number of arguments.\n*\n* @name of\n* @memberof Complex128Array\n* @type {Function}\n* @param {...*} element - array elements\n* @throws {TypeError} `this` context must be a constructor\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Complex128Array} 128-bit complex number array\n*\n* @example\n* var arr = Complex128Array.of( 1.0, 1.0, 1.0, 1.0 );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*/\nsetReadOnly( Complex128Array, 'of', function of() {\n\tvar args;\n\tvar i;\n\tif ( !isFunction( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` context must be a constructor.' );\n\t}\n\tif ( !isComplexArrayConstructor( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\targs = [];\n\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\targs.push( arguments[ i ] );\n\t}\n\treturn new this( args );\n});\n\n/**\n* Pointer to the underlying data buffer.\n*\n* @name buffer\n* @memberof Complex128Array.prototype\n* @readonly\n* @type {ArrayBuffer}\n*\n* @example\n* var arr = new Complex128Array( 10 );\n*\n* var buf = arr.buffer;\n* // returns \n*/\nsetReadOnlyAccessor( Complex128Array.prototype, 'buffer', function get() {\n\treturn this._buffer.buffer;\n});\n\n/**\n* Size (in bytes) of the array.\n*\n* @name byteLength\n* @memberof Complex128Array.prototype\n* @readonly\n* @type {NonNegativeInteger}\n*\n* @example\n* var arr = new Complex128Array( 10 );\n*\n* var byteLength = arr.byteLength;\n* // returns 160\n*/\nsetReadOnlyAccessor( Complex128Array.prototype, 'byteLength', function get() {\n\treturn this._buffer.byteLength;\n});\n\n/**\n* Offset (in bytes) of the array from the start of its underlying `ArrayBuffer`.\n*\n* @name byteOffset\n* @memberof Complex128Array.prototype\n* @readonly\n* @type {NonNegativeInteger}\n*\n* @example\n* var arr = new Complex128Array( 10 );\n*\n* var byteOffset = arr.byteOffset;\n* // returns 0\n*/\nsetReadOnlyAccessor( Complex128Array.prototype, 'byteOffset', function get() {\n\treturn this._buffer.byteOffset;\n});\n\n/**\n* Size (in bytes) of each array element.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex128Array.prototype\n* @readonly\n* @type {PositiveInteger}\n* @default 16\n*\n* @example\n* var arr = new Complex128Array( 10 );\n*\n* var nbytes = arr.BYTES_PER_ELEMENT;\n* // returns 16\n*/\nsetReadOnly( Complex128Array.prototype, 'BYTES_PER_ELEMENT', Complex128Array.BYTES_PER_ELEMENT );\n\n/**\n* Copies a sequence of elements within the array to the position starting at `target`.\n*\n* @name copyWithin\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {integer} target - index at which to start copying elements\n* @param {integer} start - source index at which to copy elements from\n* @param {integer} [end] - source index at which to stop copying elements from\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Complex128Array} modified array\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* var arr = new Complex128Array( 4 );\n*\n* // Set the array elements:\n* arr.set( new Complex128( 1.0, 1.0 ), 0 );\n* arr.set( new Complex128( 2.0, 2.0 ), 1 );\n* arr.set( new Complex128( 3.0, 3.0 ), 2 );\n* arr.set( new Complex128( 4.0, 4.0 ), 3 );\n*\n* // Copy the first two elements to the last two elements:\n* arr.copyWithin( 2, 0, 2 );\n*\n* // Get the last array element:\n* var z = arr.get( 3 );\n*\n* var re = real( z );\n* // returns 2.0\n*\n* var im = imag( z );\n* // returns 2.0\n*/\nsetReadOnly( Complex128Array.prototype, 'copyWithin', function copyWithin( target, start ) {\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\t// FIXME: prefer a functional `copyWithin` implementation which addresses lack of universal browser support (e.g., IE11 and Safari) or ensure that typed arrays are polyfilled\n\tif ( arguments.length === 2 ) {\n\t\tthis._buffer.copyWithin( target*2, start*2 );\n\t} else {\n\t\tthis._buffer.copyWithin( target*2, start*2, arguments[2]*2 );\n\t}\n\treturn this;\n});\n\n/**\n* Returns an iterator for iterating over array key-value pairs.\n*\n* @name entries\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Iterator} iterator\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n*\n* var arr = [\n* new Complex128( 1.0, 1.0 ),\n* new Complex128( 2.0, 2.0 ),\n* new Complex128( 3.0, 3.0 )\n* ];\n* arr = new Complex128Array( arr );\n*\n* // Create an iterator:\n* var it = arr.entries();\n*\n* // Iterate over the key-value pairs...\n* var v = it.next().value;\n* // returns [ 0, ]\n*\n* v = it.next().value;\n* // returns [ 1, ]\n*\n* v = it.next().value;\n* // returns [ 2, ]\n*\n* var bool = it.next().done;\n* // returns true\n*/\nsetReadOnly( Complex128Array.prototype, 'entries', function entries() {\n\tvar buffer;\n\tvar self;\n\tvar iter;\n\tvar len;\n\tvar FLG;\n\tvar i;\n\tvar j;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tself = this;\n\tbuffer = this._buffer;\n\tlen = this._length;\n\n\t// Initialize the iteration indices:\n\ti = -1;\n\tj = -2;\n\n\t// Create an iterator protocol-compliant object:\n\titer = {};\n\tsetReadOnly( iter, 'next', next );\n\tsetReadOnly( iter, 'return', end );\n\n\tif ( ITERATOR_SYMBOL ) {\n\t\tsetReadOnly( iter, ITERATOR_SYMBOL, factory );\n\t}\n\treturn iter;\n\n\t/**\n\t* Returns an iterator protocol-compliant object containing the next iterated value.\n\t*\n\t* @private\n\t* @returns {Object} iterator protocol-compliant object\n\t*/\n\tfunction next() {\n\t\tvar z;\n\t\ti += 1;\n\t\tif ( FLG || i >= len ) {\n\t\t\treturn {\n\t\t\t\t'done': true\n\t\t\t};\n\t\t}\n\t\tj += 2;\n\t\tz = new Complex128( buffer[ j ], buffer[ j+1 ] );\n\t\treturn {\n\t\t\t'value': [ i, z ],\n\t\t\t'done': false\n\t\t};\n\t}\n\n\t/**\n\t* Finishes an iterator.\n\t*\n\t* @private\n\t* @param {*} [value] - value to return\n\t* @returns {Object} iterator protocol-compliant object\n\t*/\n\tfunction end( value ) {\n\t\tFLG = true;\n\t\tif ( arguments.length ) {\n\t\t\treturn {\n\t\t\t\t'value': value,\n\t\t\t\t'done': true\n\t\t\t};\n\t\t}\n\t\treturn {\n\t\t\t'done': true\n\t\t};\n\t}\n\n\t/**\n\t* Returns a new iterator.\n\t*\n\t* @private\n\t* @returns {Iterator} iterator\n\t*/\n\tfunction factory() {\n\t\treturn self.entries();\n\t}\n});\n\n/**\n* Returns an array element.\n*\n* @name get\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {NonNegativeInteger} idx - element index\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} must provide a nonnegative integer\n* @returns {(Complex128|void)} array element\n*\n* @example\n* var arr = new Complex128Array( 10 );\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* var z = arr.get( 0 );\n* // returns \n*\n* var re = real( z );\n* // returns 0.0\n*\n* var im = imag( z );\n* // returns 0.0\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n*\n* z = arr.get( 0 );\n* // returns \n*\n* re = real( z );\n* // returns 1.0\n*\n* im = imag( z );\n* // returns -1.0\n*\n* z = arr.get( 100 );\n* // returns undefined\n*/\nsetReadOnly( Complex128Array.prototype, 'get', function get( idx ) {\n\tvar buf;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isNonNegativeInteger( idx ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Must provide a nonnegative integer. Value: `%s`.', idx ) );\n\t}\n\tif ( idx >= this._length ) {\n\t\treturn;\n\t}\n\tbuf = this._buffer;\n\tidx *= 2;\n\treturn new Complex128( buf[ idx ], buf[ idx+1 ] );\n});\n\n/**\n* Number of array elements.\n*\n* @name length\n* @memberof Complex128Array.prototype\n* @readonly\n* @type {NonNegativeInteger}\n*\n* @example\n* var arr = new Complex128Array( 10 );\n*\n* var len = arr.length;\n* // returns 10\n*/\nsetReadOnlyAccessor( Complex128Array.prototype, 'length', function get() {\n\treturn this._length;\n});\n\n/**\n* Sets an array element.\n*\n* ## Notes\n*\n* - When provided a typed array, real or complex, we must check whether the source array shares the same buffer as the target array and whether the underlying memory overlaps. In particular, we are concerned with the following scenario:\n*\n* ```text\n* buf: ---------------------\n* src: ---------------------\n* ```\n*\n* In the above, as we copy values from `src`, we will overwrite values in the `src` view, resulting in duplicated values copied into the end of `buf`, which is not intended. Hence, to avoid overwriting source values, we must **copy** source values to a temporary array.\n*\n* In the other overlapping scenario,\n*\n* ```text\n* buf: ---------------------\n* src: ---------------------\n* ```\n*\n* by the time we begin copying into the overlapping region, we are copying from the end of `src`, a non-overlapping region, which means we don't run the risk of copying copied values, rather than the original `src` values as intended.\n*\n*\n* @name set\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {(Collection|Complex|ComplexArray)} value - value(s)\n* @param {NonNegativeInteger} [i=0] - element index at which to start writing values\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be either a complex number, an array-like object, or a complex number array\n* @throws {TypeError} index argument must be a nonnegative integer\n* @throws {RangeError} array-like objects must have a length which is a multiple of two\n* @throws {RangeError} index argument is out-of-bounds\n* @throws {RangeError} target array lacks sufficient storage to accommodate source values\n* @returns {void}\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* var arr = new Complex128Array( 10 );\n*\n* var z = arr.get( 0 );\n* // returns \n*\n* var re = real( z );\n* // returns 0.0\n*\n* var im = imag( z );\n* // returns 0.0\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n*\n* z = arr.get( 0 );\n* // returns \n*\n* re = real( z );\n* // returns 1.0\n*\n* im = imag( z );\n* // returns -1.0\n*/\nsetReadOnly( Complex128Array.prototype, 'set', function set( value ) {\n\t/* eslint-disable no-underscore-dangle */\n\tvar sbuf;\n\tvar idx;\n\tvar buf;\n\tvar tmp;\n\tvar flg;\n\tvar N;\n\tvar v;\n\tvar i;\n\tvar j;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tbuf = this._buffer;\n\tif ( arguments.length > 1 ) {\n\t\tidx = arguments[ 1 ];\n\t\tif ( !isNonNegativeInteger( idx ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Index argument must be a nonnegative integer. Value: `%s`.', idx ) );\n\t\t}\n\t} else {\n\t\tidx = 0;\n\t}\n\tif ( isComplexLike( value ) ) {\n\t\tif ( idx >= this._length ) {\n\t\t\tthrow new RangeError( format( 'invalid argument. Index argument is out-of-bounds. Value: `%u`.', idx ) );\n\t\t}\n\t\tidx *= 2;\n\t\tbuf[ idx ] = real( value );\n\t\tbuf[ idx+1 ] = imag( value );\n\t\treturn;\n\t}\n\tif ( isComplexArray( value ) ) {\n\t\tN = value._length;\n\t\tif ( idx+N > this._length ) {\n\t\t\tthrow new RangeError( 'invalid arguments. Target array lacks sufficient storage to accommodate source values.' );\n\t\t}\n\t\tsbuf = value._buffer;\n\n\t\t// Check for overlapping memory...\n\t\tj = buf.byteOffset + (idx*BYTES_PER_ELEMENT);\n\t\tif (\n\t\t\tsbuf.buffer === buf.buffer &&\n\t\t\t(\n\t\t\t\tsbuf.byteOffset < j &&\n\t\t\t\tsbuf.byteOffset+sbuf.byteLength > j\n\t\t\t)\n\t\t) {\n\t\t\t// We need to copy source values...\n\t\t\ttmp = new Float64Array( sbuf.length );\n\t\t\tfor ( i = 0; i < sbuf.length; i++ ) {\n\t\t\t\ttmp[ i ] = sbuf[ i ];\n\t\t\t}\n\t\t\tsbuf = tmp;\n\t\t}\n\t\tidx *= 2;\n\t\tj = 0;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\tbuf[ idx ] = sbuf[ j ];\n\t\t\tbuf[ idx+1 ] = sbuf[ j+1 ];\n\t\t\tidx += 2; // stride\n\t\t\tj += 2; // stride\n\t\t}\n\t\treturn;\n\t}\n\tif ( isCollection( value ) ) {\n\t\t// Detect whether we've been provided an array of complex numbers...\n\t\tN = value.length;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\tif ( !isComplexLike( value[ i ] ) ) {\n\t\t\t\tflg = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t// If an array does not contain only complex numbers, then we assume interleaved real and imaginary components...\n\t\tif ( flg ) {\n\t\t\tif ( !isEven( N ) ) {\n\t\t\t\tthrow new RangeError( format( 'invalid argument. Array-like object arguments must have a length which is a multiple of two. Length: `%u`.', N ) );\n\t\t\t}\n\t\t\tif ( idx+(N/2) > this._length ) {\n\t\t\t\tthrow new RangeError( 'invalid arguments. Target array lacks sufficient storage to accommodate source values.' );\n\t\t\t}\n\t\t\tsbuf = value;\n\n\t\t\t// Check for overlapping memory...\n\t\t\tj = buf.byteOffset + (idx*BYTES_PER_ELEMENT);\n\t\t\tif (\n\t\t\t\tsbuf.buffer === buf.buffer &&\n\t\t\t\t(\n\t\t\t\t\tsbuf.byteOffset < j &&\n\t\t\t\t\tsbuf.byteOffset+sbuf.byteLength > j\n\t\t\t\t)\n\t\t\t) {\n\t\t\t\t// We need to copy source values...\n\t\t\t\ttmp = new Float64Array( N );\n\t\t\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\t\t\ttmp[ i ] = sbuf[ i ];\n\t\t\t\t}\n\t\t\t\tsbuf = tmp;\n\t\t\t}\n\t\t\tidx *= 2;\n\t\t\tN /= 2;\n\t\t\tj = 0;\n\t\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\t\tbuf[ idx ] = sbuf[ j ];\n\t\t\t\tbuf[ idx+1 ] = sbuf[ j+1 ];\n\t\t\t\tidx += 2; // stride\n\t\t\t\tj += 2; // stride\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\t// If an array contains only complex numbers, then we need to extract real and imaginary components...\n\t\tif ( idx+N > this._length ) {\n\t\t\tthrow new RangeError( 'invalid arguments. Target array lacks sufficient storage to accommodate source values.' );\n\t\t}\n\t\tidx *= 2;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\tv = value[ i ];\n\t\t\tbuf[ idx ] = real( v );\n\t\t\tbuf[ idx+1 ] = imag( v );\n\t\t\tidx += 2; // stride\n\t\t}\n\t\treturn;\n\t}\n\tthrow new TypeError( format( 'invalid argument. First argument must be either a complex number, an array-like object, or a complex number array. Value: `%s`.', value ) );\n\n\t/* eslint-enable no-underscore-dangle */\n});\n\n\n// EXPORTS //\n\nexport default Complex128Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport Float64Array from '@stdlib/array-float64';\nimport Float32Array from '@stdlib/array-float32';\nimport Int16Array from '@stdlib/array-int16';\nimport Int32Array from '@stdlib/array-int32';\nimport Int8Array from '@stdlib/array-int8';\nimport Uint16Array from '@stdlib/array-uint16';\nimport Uint32Array from '@stdlib/array-uint32';\nimport Uint8Array from '@stdlib/array-uint8';\nimport Uint8ClampedArray from '@stdlib/array-uint8c';\nimport Complex64Array from '@stdlib/array-complex64';\nimport Complex128Array from '@stdlib/array-complex128';\n\n\n// MAIN //\n\n// Mapping from data types to constructors...\nvar ctors = {\n\t'float64': Float64Array,\n\t'float32': Float32Array,\n\t'generic': Array, // TODO: replace with `stdlib` pkg\n\t'int16': Int16Array,\n\t'int32': Int32Array,\n\t'int8': Int8Array,\n\t'uint16': Uint16Array,\n\t'uint32': Uint32Array,\n\t'uint8': Uint8Array,\n\t'uint8c': Uint8ClampedArray,\n\t'complex64': Complex64Array,\n\t'complex128': Complex128Array\n};\n\n\n// EXPORTS //\n\nexport default ctors;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport table from './ctors.js';\n\n\n// MAIN //\n\n/**\n* Returns an array constructor.\n*\n* @param {string} dtype - data type\n* @returns {(Function|null)} constructor or null\n*\n* @example\n* var ctor = ctors( 'float64' );\n* // returns \n*\n* @example\n* var ctor = ctors( 'float' );\n* // returns null\n*/\nfunction ctors( dtype ) {\n\treturn table[ dtype ] || null;\n}\n\n\n// EXPORTS //\n\nexport default ctors;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport filled from '@stdlib/array-base-filled';\n\n\n// MAIN //\n\n/**\n* Returns a zero-filled \"generic\" array.\n*\n* @param {NonNegativeInteger} len - array length\n* @returns {Array} output array\n*\n* @example\n* var out = zeros( 3 );\n* // returns [ 0.0, 0.0, 0.0 ]\n*/\nfunction zeros( len ) {\n\treturn filled( 0.0, len );\n}\n\n\n// EXPORTS //\n\nexport default zeros;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Returns a filled \"generic\" array.\n*\n* @param {*} value - fill value\n* @param {NonNegativeInteger} len - array length\n* @returns {Array} filled array\n*\n* @example\n* var out = filled( 0.0, 3 );\n* // returns [ 0.0, 0.0, 0.0 ]\n*\n* @example\n* var out = filled( 'beep', 3 );\n* // returns [ 'beep', 'beep', 'beep' ]\n*/\nfunction filled( value, len ) {\n\tvar arr;\n\tvar i;\n\n\t// Manually push elements in order to ensure \"fast\" elements...\n\tarr = [];\n\tfor ( i = 0; i < len; i++ ) {\n\t\tarr.push( value );\n\t}\n\treturn arr;\n}\n\n\n// EXPORTS //\n\nexport default filled;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isNonNegativeInteger } from '@stdlib/assert-is-nonnegative-integer';\nimport ctors from '@stdlib/array-ctors';\nimport gzeros from '@stdlib/array-base-zeros';\nimport format from '@stdlib/string-format';\n\n\n// MAIN //\n\n/**\n* Creates a zero-filled array having a specified length.\n*\n* @param {NonNegativeInteger} length - array length\n* @param {string} [dtype=\"float64\"] - data type\n* @throws {TypeError} first argument must be a nonnegative integer\n* @throws {TypeError} second argument must be a recognized data type\n* @returns {(TypedArray|Array|ComplexArray)} array or typed array\n*\n* @example\n* var arr = zeros( 2 );\n* // returns [ 0.0, 0.0 ]\n*\n* @example\n* var arr = zeros( 2, 'float32' );\n* // returns [ 0.0, 0.0 ]\n*/\nfunction zeros( length ) {\n\tvar dtype;\n\tvar ctor;\n\tif ( !isNonNegativeInteger( length ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a nonnegative integer. Value: `%s`.', length ) );\n\t}\n\tif ( arguments.length > 1 ) {\n\t\tdtype = arguments[ 1 ];\n\t} else {\n\t\tdtype = 'float64';\n\t}\n\tif ( dtype === 'generic' ) {\n\t\treturn gzeros( length );\n\t}\n\tctor = ctors( dtype );\n\tif ( ctor === null ) {\n\t\tthrow new TypeError( format( 'invalid argument. Second argument must be a recognized data type. Value: `%s`.', dtype ) );\n\t}\n\treturn new ctor( length ); // WARNING: we assume that, apart from 'generic', the constructors for supported array data types are zero-filled by default\n}\n\n\n// EXPORTS //\n\nexport default zeros;\n","/**\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// MODULES //\n\nimport zeros from '@stdlib/array-zeros';\n\n\n// MAIN //\n\n/**\n* Creates an uninitialized array having a specified length.\n*\n* @private\n* @param {NonNegativeInteger} length - array length\n* @param {string} [dtype=\"float64\"] - data type\n* @throws {TypeError} first argument must be a nonnegative integer\n* @throws {TypeError} second argument must be a recognized data type\n* @returns {(TypedArray|Array|ComplexArray)} array or typed array\n*\n* @example\n* var arr = empty( 2 );\n* // returns \n*\n* @example\n* var arr = empty( 2, 'float32' );\n* // returns \n*/\nfunction empty( length ) {\n\tif ( arguments.length > 1 ) {\n\t\treturn zeros( length, arguments[ 1 ] );\n\t}\n\treturn zeros( length );\n}\n\n\n// EXPORTS //\n\nexport default empty;\n"],"names":["main","Object","defineProperty","isNumber","value","zeros","n","i","out","zeroPad","str","width","right","negative","pad","length","startsWithMinus","substr","lowercase","String","prototype","toLowerCase","uppercase","toUpperCase","formatInteger","token","base","specifier","arg","parseInt","isFinite","Error","toString","precision","padRight","sign","alternate","call","charAt","isString","abs","Math","replace","RE_EXP_POS_DIGITS","RE_EXP_NEG_DIGITS","RE_ONLY_DIGITS","RE_DIGITS_BEFORE_EXP","RE_TRAILING_PERIOD_ZERO","RE_PERIOD_ZERO_EXP","RE_ZERO_BEFORE_EXP","formatDouble","digits","f","parseFloat","toExponential","toFixed","toPrecision","spaces","spacePad","fromCharCode","isnan","isNaN","isArray","Array","initialize","flags","mapping","formatInterpolate","tokens","hasPeriod","flag","num","pos","j","TypeError","padZeros","indexOf","arguments","maxWidth","substring","RE","parse","match","formatTokenize","content","prev","exec","slice","lastIndex","push","format","args","tokenize","interpolate","apply","objectProtoype","toStr","defineGetter","__defineGetter__","defineSetter","__defineSetter__","lookupGetter","__lookupGetter__","lookupSetter","__lookupSetter__","err","hasDefinePropertySupport","builtin","obj","prop","descriptor","hasValue","hasGet","hasSet","__proto__","get","set","defineProperty$1","setNonEnumerableReadOnly","configurable","enumerable","writable","FLG","Symbol","hasToStringTagSupport","toStringTag","has","hasOwnProperty","hasOwnProp","property","Sym","toStrTag","nativeClass","hasToStringTag","v","isOwn","tag","main$b","Number","test","isPrimitive","isObject","setReadOnly","FLOAT64_PINF","POSITIVE_INFINITY","FLOAT64_NINF","NEGATIVE_INFINITY","floor","isInteger","x","PINF","NINF","isInt","valueOf","isNonNegativeInteger","hasFloat64Array","Float64Array","ctor","Float64Array$1","bool","arr","GlobalFloat64Array","NaN","hasFloat64ArraySupport","hasFloat32Array","Float32Array","Float32Array$1","GlobalFloat32Array","hasFloat32ArraySupport","hasInt16Array","Int16Array","Int16Array$1","GlobalInt16Array","INT16_MAX","hasInt16ArraySupport","hasInt32Array","Int32Array","Int32Array$1","GlobalInt32Array","INT32_MAX","hasInt32ArraySupport","hasInt8Array","Int8Array","Int8Array$1","GlobalInt8Array","INT8_MAX","hasInt8ArraySupport","hasUint16Array","Uint16Array","Uint16Array$1","GlobalUint16Array","UINT16_MAX","hasUint16ArraySupport","hasUint32Array","Uint32Array","Uint32Array$1","GlobalUint32Array","UINT32_MAX","hasUint32ArraySupport","hasUint8Array","Uint8Array","Uint8Array$1","GlobalUint8Array","UINT8_MAX","hasUint8ArraySupport","hasUint8ClampedArray","Uint8ClampedArray","Uint8ClampedArray$1","GlobalUint8ClampedArray","hasUint8ClampedArraySupport","isArrayLikeObject","isCollection","hasArrayBuffer","ArrayBuffer","isArrayBuffer","main$1","isBoolean","Bool","Boolean","getGlobal","Function","self","window","global","globalThis","root","codegen","getThis","GlobalThis","Self","Win","Global","nodeList","document","childNodes","typedarray","reFunctionName","RE_FUNCTION_NAME","isObjectLike","constructorName","name","constructor","_isBuffer","isBuffer","REGEXP","predicate","len","arrayfun","ctorName","type","isFunction","typeOf","Complex128","real","imag","this","re","im","fround","FLOAT32_VIEW","float64ToFloat32$1","Complex64","float64ToFloat32","isComplexLike","isEven","hasIteratorSymbolSupport","iterator","IteratorSymbol","setNonEnumerableReadOnlyAccessor","getter","realf","z","imagf","reinterpret","offset","buffer","byteOffset","BYTES_PER_ELEMENT","GETTERS","float64","idx","float32","int32","int16","int8","uint32","uint16","uint8","uint8c","generic","default","dtype","complex128","complex64","fromIterator","it","next","done","fromIteratorMap","clbk","thisArg","fromArray","buf","HAS_ITERATOR_SYMBOL","isComplexArray","Complex64Array","_length","_buffer","isComplexArrayConstructor","isComplex64Array","isComplex128Array","nargs","RangeError","reinterpret64","reinterpret128","byteLength","ITERATOR_SYMBOL","src","tmp","flg","accessorGetter","setReadOnlyAccessor","target","start","copyWithin","iter","entries","sbuf","N","Complex128Array","ctors","table","filled","gzeros","empty"],"mappings":";;AAsBA,IAAIA,EAA0C,mBAA1BC,OAAOC,eAAkCD,OAAOC,eAAiB,KCiCrF,IAAIA,EAAiBD,OAAOC,eCjB5B,SAASC,EAAUC,GAClB,MAA0B,iB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GACvB,IAAItF,EACAzJ,EAIJ,IADAyJ,EAAM,GACAzJ,EAAI,EAAGA,EAAI+O,EAAK/O,IACrByJ,EAAIvE,KAAMrF,GAEX,OAAO4J,CACR,CDTQ4K,CAAQ,EAAKtF,EACrB,CEQA,SAASjP,GAAOU,GACf,IAAIoR,EACAtI,EACJ,IAAMH,GAAsB3I,GAC3B,MAAM,IAAI2D,UAAWgB,EAAQ,+EAAgF3E,IAO9G,GAAe,aAJdoR,EADItN,UAAU9D,OAAS,EACf8D,UAAW,GAEX,WAGR,OAAOgQ,GAAQ9T,GAGhB,GAAc,QADd8I,EAAO6K,GAAOvC,IAEb,MAAM,IAAIzN,UAAWgB,EAAQ,iFAAkFyM,IAEhH,OAAO,IAAItI,EAAM9I,EAClB,CCrBA,SAAS+T,GAAO/T,GACf,OAAK8D,UAAU9D,OAAS,EAChBV,GAAOU,EAAQ8D,UAAW,IAE3BxE,GAAOU,EACf"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index d242429..0000000 --- a/stats.html +++ /dev/null @@ -1,6177 +0,0 @@ - - - - - - - - Rollup Visualizer - - - -
- - - - - From 4a2bd3ef93e48610ef9a25a5f7864d05cab58d72 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Tue, 3 Oct 2023 02:22:18 +0000 Subject: [PATCH 18/75] Auto-generated commit --- .editorconfig | 186 - .eslintrc.js | 1 - .gitattributes | 49 - .github/.keepalive | 1 - .github/PULL_REQUEST_TEMPLATE.md | 7 - .github/workflows/benchmark.yml | 64 - .github/workflows/cancel.yml | 57 - .github/workflows/close_pull_requests.yml | 54 - .github/workflows/examples.yml | 64 - .github/workflows/npm_downloads.yml | 112 - .github/workflows/productionize.yml | 797 --- .github/workflows/publish.yml | 247 - .github/workflows/test.yml | 100 - .github/workflows/test_bundles.yml | 189 - .github/workflows/test_coverage.yml | 128 - .github/workflows/test_install.yml | 86 - .gitignore | 188 - .npmignore | 227 - .npmrc | 28 - CHANGELOG.md | 5 - CITATION.cff | 30 - CODE_OF_CONDUCT.md | 3 - CONTRIBUTING.md | 3 - Makefile | 534 -- README.md | 24 +- benchmark/benchmark.js | 264 - benchmark/benchmark.length.complex128.js | 93 - benchmark/benchmark.length.complex64.js | 93 - benchmark/benchmark.length.float32.js | 93 - benchmark/benchmark.length.float64.js | 93 - benchmark/benchmark.length.generic.js | 93 - benchmark/benchmark.length.int16.js | 93 - benchmark/benchmark.length.int32.js | 93 - benchmark/benchmark.length.int8.js | 93 - benchmark/benchmark.length.uint16.js | 93 - benchmark/benchmark.length.uint32.js | 93 - benchmark/benchmark.length.uint8.js | 93 - benchmark/benchmark.length.uint8c.js | 93 - branches.md | 53 - dist/index.d.ts | 3 - dist/index.js | 9 - dist/index.js.map | 7 - docs/repl.txt | 52 - docs/types/test.ts | 77 - examples/index.js | 33 - lib/index.js | 58 - lib/is_buffer_uint8array.js | 47 - lib/main.js | 101 - lib/polyfill.js | 56 - docs/types/index.d.ts => mod.d.ts | 2 +- mod.js | 4 + mod.js.map | 1 + package.json | 80 +- stats.html | 6177 +++++++++++++++++++++ test/dist/test.js | 60 - test/test.js | 60 - test/test.main.js | 274 - test/test.polyfill.js | 324 -- 58 files changed, 6189 insertions(+), 5853 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 benchmark/benchmark.js delete mode 100644 benchmark/benchmark.length.complex128.js delete mode 100644 benchmark/benchmark.length.complex64.js delete mode 100644 benchmark/benchmark.length.float32.js delete mode 100644 benchmark/benchmark.length.float64.js delete mode 100644 benchmark/benchmark.length.generic.js delete mode 100644 benchmark/benchmark.length.int16.js delete mode 100644 benchmark/benchmark.length.int32.js delete mode 100644 benchmark/benchmark.length.int8.js delete mode 100644 benchmark/benchmark.length.uint16.js delete mode 100644 benchmark/benchmark.length.uint32.js delete mode 100644 benchmark/benchmark.length.uint8.js delete mode 100644 benchmark/benchmark.length.uint8c.js 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/repl.txt delete mode 100644 docs/types/test.ts delete mode 100644 examples/index.js delete mode 100644 lib/index.js delete mode 100644 lib/is_buffer_uint8array.js delete mode 100644 lib/main.js delete mode 100644 lib/polyfill.js rename docs/types/index.d.ts => mod.d.ts (99%) create mode 100644 mod.js create mode 100644 mod.js.map create mode 100644 stats.html delete mode 100644 test/dist/test.js delete mode 100644 test/test.js delete mode 100644 test/test.main.js delete mode 100644 test/test.polyfill.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 3d93e53..0000000 --- a/.github/.keepalive +++ /dev/null @@ -1 +0,0 @@ -2023-10-01T05:29:18.633Z diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index 96f81a8..0000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,7 +0,0 @@ - - -We are excited about your pull request, but unfortunately we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/empty) 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 ddb353e..0000000 --- a/.github/workflows/close_pull_requests.yml +++ /dev/null @@ -1,54 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: close_pull_requests - -# Workflow triggers: -on: - pull_request_target: - types: [opened] - -# Workflow jobs: -jobs: - - # Define job to close all pull requests: - run: - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Close pull request - - name: 'Close pull request' - # Pin action to full length commit SHA corresponding to v3.1.2 - uses: superbrothers/close-pull-request@9c18513d320d7b2c7185fb93396d0c664d5d8448 - with: - comment: | - Thank you for submitting a pull request. :raised_hands: - - We greatly appreciate your willingness to submit a contribution. However, we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). - - We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/empty) 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 dc9e63f..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: '49 1 * * 5' - - # 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 + + + + diff --git a/test/dist/test.js b/test/dist/test.js deleted file mode 100644 index a1828c0..0000000 --- a/test/dist/test.js +++ /dev/null @@ -1,60 +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 proxyquire = require( 'proxyquire' ); -var main = require( './../../dist/main.js' ); -var polyfill = require( './../../dist/polyfill.js' ); -var empty = require( './../../dist' ); - - -// TESTS // - -tape( 'main export is a function', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof empty, 'function', 'main export is a function' ); - t.end(); -}); - -tape( 'if an environment supports Node.js buffer instances inheriting from Uint8Array, the main export supports returning arrays having uninitialized memory', function test( t ) { - var empty = proxyquire( './../dist', { - './is_buffer_uint8array.js': mock - }); - t.strictEqual( empty, main, 'returns expected value' ); - t.end(); - - function mock() { - return true; - } -}); - -tape( 'if an environment does not support Node.js buffer instances inheriting from Uint8Array, the main export supports returning zero-filled arrays', function test( t ) { - var empty = proxyquire( './../dist', { - './is_buffer_uint8array.js': mock - }); - t.strictEqual( empty, polyfill, 'returns expected value' ); - t.end(); - - function mock() { - return false; - } -}); diff --git a/test/test.js b/test/test.js deleted file mode 100644 index 8e62cb8..0000000 --- a/test/test.js +++ /dev/null @@ -1,60 +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 proxyquire = require( 'proxyquire' ); -var main = require( './../lib/main.js' ); -var polyfill = require( './../lib/polyfill.js' ); -var empty = require( './../lib' ); - - -// TESTS // - -tape( 'main export is a function', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof empty, 'function', 'main export is a function' ); - t.end(); -}); - -tape( 'if an environment supports Node.js buffer instances inheriting from Uint8Array, the main export supports returning arrays having uninitialized memory', function test( t ) { - var empty = proxyquire( './../lib', { - './is_buffer_uint8array.js': mock - }); - t.strictEqual( empty, main, 'returns expected value' ); - t.end(); - - function mock() { - return true; - } -}); - -tape( 'if an environment does not support Node.js buffer instances inheriting from Uint8Array, the main export supports returning zero-filled arrays', function test( t ) { - var empty = proxyquire( './../lib', { - './is_buffer_uint8array.js': mock - }); - t.strictEqual( empty, polyfill, 'returns expected value' ); - t.end(); - - function mock() { - return false; - } -}); diff --git a/test/test.main.js b/test/test.main.js deleted file mode 100644 index 3ceb26e..0000000 --- a/test/test.main.js +++ /dev/null @@ -1,274 +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 Float64Array = require( '@stdlib/array-float64' ); -var Float32Array = require( '@stdlib/array-float32' ); -var Int32Array = require( '@stdlib/array-int32' ); -var Uint32Array = require( '@stdlib/array-uint32' ); -var Int16Array = require( '@stdlib/array-int16' ); -var Uint16Array = require( '@stdlib/array-uint16' ); -var Int8Array = require( '@stdlib/array-int8' ); -var Uint8Array = require( '@stdlib/array-uint8' ); -var Uint8ClampedArray = require( '@stdlib/array-uint8c' ); -var Complex64Array = require( '@stdlib/array-complex64' ); -var Complex128Array = require( '@stdlib/array-complex128' ); -var instanceOf = require( '@stdlib/assert-instance-of' ); -var empty = require( './../lib/main.js' ); - - -// TESTS // - -tape( 'main export is a function', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof empty, 'function', 'main export is a function' ); - t.end(); -}); - -tape( 'the function throws an error if provided a value other than a nonnegative integer for the first argument', function test( t ) { - var values; - var i; - - values = [ - '5', - -3, - 3.14, - NaN, - true, - false, - null, - void 0, - [], - {}, - function noop() {} - ]; - - for ( i = 0; i < values.length; i++ ) { - t.throws( badValue( values[i] ), TypeError, 'throws an error when provided '+values[i] ); - } - t.end(); - - function badValue( value ) { - return function badValue() { - empty( value ); - }; - } -}); - -tape( 'the function throws an error if provided a value other than a nonnegative integer for the first argument (dtype)', function test( t ) { - var values; - var i; - - values = [ - '5', - -3, - 3.14, - NaN, - true, - false, - null, - void 0, - [], - {}, - function noop() {} - ]; - - for ( i = 0; i < values.length; i++ ) { - t.throws( badValue( values[i] ), TypeError, 'throws an error when provided '+values[i] ); - } - t.end(); - - function badValue( value ) { - return function badValue() { - empty( value, 'float32' ); - }; - } -}); - -tape( 'the function throws an error if provided an unrecognized data type', function test( t ) { - var values; - var i; - - values = [ - '5', - 'beep', - 'empty', - 'Int32', - 'Uint32', - 'Int16', - 'Uint16', - 'Int8', - 'Uint8', - 'Uint8c', - 'uint8_clamped', - 'Float64', - 'Float32', - 'FLOAT64', - 'FLOAT32', - 'GENERIC' - ]; - - for ( i = 0; i < values.length; i++ ) { - t.throws( badValue( values[i] ), TypeError, 'throws an error when provided '+values[i] ); - } - t.end(); - - function badValue( value ) { - return function badValue() { - empty( 10, value ); - }; - } -}); - -tape( 'the function returns an empty array (default)', function test( t ) { - var arr; - - arr = empty( 5 ); - t.strictEqual( instanceOf( arr, Float64Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=float64)', function test( t ) { - var arr; - - arr = empty( 5, 'float64' ); - t.strictEqual( instanceOf( arr, Float64Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=float32)', function test( t ) { - var arr; - - arr = empty( 5, 'float32' ); - t.strictEqual( instanceOf( arr, Float32Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=complex128)', function test( t ) { - var arr; - - arr = empty( 5, 'complex128' ); - t.strictEqual( instanceOf( arr, Complex128Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=complex64)', function test( t ) { - var arr; - - arr = empty( 5, 'complex64' ); - t.strictEqual( instanceOf( arr, Complex64Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=int32)', function test( t ) { - var arr; - - arr = empty( 5, 'int32' ); - t.strictEqual( instanceOf( arr, Int32Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=uint32)', function test( t ) { - var arr; - - arr = empty( 5, 'uint32' ); - t.strictEqual( instanceOf( arr, Uint32Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=int16)', function test( t ) { - var arr; - - arr = empty( 5, 'int16' ); - t.strictEqual( instanceOf( arr, Int16Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=uint16)', function test( t ) { - var arr; - - arr = empty( 5, 'uint16' ); - t.strictEqual( instanceOf( arr, Uint16Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=int8)', function test( t ) { - var arr; - - arr = empty( 5, 'int8' ); - t.strictEqual( instanceOf( arr, Int8Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=uint8)', function test( t ) { - var arr; - - arr = empty( 5, 'uint8' ); - t.strictEqual( instanceOf( arr, Uint8Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=uint8c)', function test( t ) { - var arr; - - arr = empty( 5, 'uint8c' ); - t.strictEqual( instanceOf( arr, Uint8ClampedArray ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=generic)', function test( t ) { - var expected; - var arr; - - expected = [ 0, 0, 0, 0, 0 ]; - - arr = empty( 5, 'generic' ); - t.strictEqual( instanceOf( arr, Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); diff --git a/test/test.polyfill.js b/test/test.polyfill.js deleted file mode 100644 index 17b99f3..0000000 --- a/test/test.polyfill.js +++ /dev/null @@ -1,324 +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 Float64Array = require( '@stdlib/array-float64' ); -var Float32Array = require( '@stdlib/array-float32' ); -var Int32Array = require( '@stdlib/array-int32' ); -var Uint32Array = require( '@stdlib/array-uint32' ); -var Int16Array = require( '@stdlib/array-int16' ); -var Uint16Array = require( '@stdlib/array-uint16' ); -var Int8Array = require( '@stdlib/array-int8' ); -var Uint8Array = require( '@stdlib/array-uint8' ); -var Uint8ClampedArray = require( '@stdlib/array-uint8c' ); -var Complex64Array = require( '@stdlib/array-complex64' ); -var Complex128Array = require( '@stdlib/array-complex128' ); -var reinterpret64 = require( '@stdlib/strided-base-reinterpret-complex64' ); -var reinterpret128 = require( '@stdlib/strided-base-reinterpret-complex128' ); -var instanceOf = require( '@stdlib/assert-instance-of' ); -var empty = require( './../lib/polyfill.js' ); - - -// TESTS // - -tape( 'main export is a function', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof empty, 'function', 'main export is a function' ); - t.end(); -}); - -tape( 'the function throws an error if provided a value other than a nonnegative integer for the first argument', function test( t ) { - var values; - var i; - - values = [ - '5', - -3, - 3.14, - NaN, - true, - false, - null, - void 0, - [], - {}, - function noop() {} - ]; - - for ( i = 0; i < values.length; i++ ) { - t.throws( badValue( values[i] ), TypeError, 'throws an error when provided '+values[i] ); - } - t.end(); - - function badValue( value ) { - return function badValue() { - empty( value ); - }; - } -}); - -tape( 'the function throws an error if provided a value other than a nonnegative integer for the first argument (dtype)', function test( t ) { - var values; - var i; - - values = [ - '5', - -3, - 3.14, - NaN, - true, - false, - null, - void 0, - [], - {}, - function noop() {} - ]; - - for ( i = 0; i < values.length; i++ ) { - t.throws( badValue( values[i] ), TypeError, 'throws an error when provided '+values[i] ); - } - t.end(); - - function badValue( value ) { - return function badValue() { - empty( value, 'float32' ); - }; - } -}); - -tape( 'the function throws an error if provided an unrecognized data type', function test( t ) { - var values; - var i; - - values = [ - '5', - 'beep', - 'empty', - 'Int32', - 'Uint32', - 'Int16', - 'Uint16', - 'Int8', - 'Uint8', - 'Uint8c', - 'uint8_clamped', - 'Float64', - 'Float32', - 'FLOAT64', - 'FLOAT32', - 'GENERIC' - ]; - - for ( i = 0; i < values.length; i++ ) { - t.throws( badValue( values[i] ), TypeError, 'throws an error when provided '+values[i] ); - } - t.end(); - - function badValue( value ) { - return function badValue() { - empty( 10, value ); - }; - } -}); - -tape( 'the function returns a zero-filled array (default)', function test( t ) { - var expected; - var arr; - - expected = new Float64Array( [ 0.0, 0.0, 0.0, 0.0, 0.0 ] ); - - arr = empty( 5 ); - t.strictEqual( instanceOf( arr, Float64Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=float64)', function test( t ) { - var expected; - var arr; - - expected = new Float64Array( [ 0.0, 0.0, 0.0, 0.0, 0.0 ] ); - - arr = empty( 5, 'float64' ); - t.strictEqual( instanceOf( arr, Float64Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=float32)', function test( t ) { - var expected; - var arr; - - expected = new Float32Array( [ 0.0, 0.0, 0.0, 0.0, 0.0 ] ); - - arr = empty( 5, 'float32' ); - t.strictEqual( instanceOf( arr, Float32Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=complex128)', function test( t ) { - var expected; - var arr; - - expected = new Float64Array( [ 0.0, 0.0, 0.0, 0.0 ] ); - - arr = empty( 2, 'complex128' ); - t.strictEqual( instanceOf( arr, Complex128Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length/2, 'returns expected value' ); - t.deepEqual( reinterpret128( arr, 0 ), expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=complex64)', function test( t ) { - var expected; - var arr; - - expected = new Float32Array( [ 0.0, 0.0, 0.0, 0.0 ] ); - - arr = empty( 2, 'complex64' ); - t.strictEqual( instanceOf( arr, Complex64Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length/2, 'returns expected value' ); - t.deepEqual( reinterpret64( arr, 0 ), expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=int32)', function test( t ) { - var expected; - var arr; - - expected = new Int32Array( [ 0, 0, 0, 0, 0 ] ); - - arr = empty( 5, 'int32' ); - t.strictEqual( instanceOf( arr, Int32Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=uint32)', function test( t ) { - var expected; - var arr; - - expected = new Uint32Array( [ 0, 0, 0, 0, 0 ] ); - - arr = empty( 5, 'uint32' ); - t.strictEqual( instanceOf( arr, Uint32Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=int16)', function test( t ) { - var expected; - var arr; - - expected = new Int16Array( [ 0, 0, 0, 0, 0 ] ); - - arr = empty( 5, 'int16' ); - t.strictEqual( instanceOf( arr, Int16Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=uint16)', function test( t ) { - var expected; - var arr; - - expected = new Uint16Array( [ 0, 0, 0, 0, 0 ] ); - - arr = empty( 5, 'uint16' ); - t.strictEqual( instanceOf( arr, Uint16Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=int8)', function test( t ) { - var expected; - var arr; - - expected = new Int8Array( [ 0, 0, 0, 0, 0 ] ); - - arr = empty( 5, 'int8' ); - t.strictEqual( instanceOf( arr, Int8Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=uint8)', function test( t ) { - var expected; - var arr; - - expected = new Uint8Array( [ 0, 0, 0, 0, 0 ] ); - - arr = empty( 5, 'uint8' ); - t.strictEqual( instanceOf( arr, Uint8Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=uint8c)', function test( t ) { - var expected; - var arr; - - expected = new Uint8ClampedArray( [ 0, 0, 0, 0, 0 ] ); - - arr = empty( 5, 'uint8c' ); - t.strictEqual( instanceOf( arr, Uint8ClampedArray ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=generic)', function test( t ) { - var expected; - var arr; - - expected = [ 0, 0, 0, 0, 0 ]; - - arr = empty( 5, 'generic' ); - t.strictEqual( instanceOf( arr, Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); From 7ace3ae1b32d5fac8310f2c806d7742db94375ce Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Thu, 5 Oct 2023 20:09:43 +0000 Subject: [PATCH 19/75] Transform error messages --- lib/main.js | 6 +++--- package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/main.js b/lib/main.js index e19ce93..e02b26b 100644 --- a/lib/main.js +++ b/lib/main.js @@ -25,7 +25,7 @@ var allocUnsafe = require( '@stdlib/buffer-alloc-unsafe' ); var ctors = require( '@stdlib/array-typed-ctors' ); var zeros = require( '@stdlib/array-base-zeros' ); var bytesPerElement = require( '@stdlib/ndarray-base-bytes-per-element' ); -var format = require( '@stdlib/string-format' ); +var format = require( '@stdlib/error-tools-fmtprodmsg' ); // MAIN // @@ -57,7 +57,7 @@ function empty( length ) { var nb; if ( !isNonNegativeInteger( length ) ) { - throw new TypeError( format( 'invalid argument. First argument must be a nonnegative integer. Value: `%s`.', length ) ); + throw new TypeError( format( '1Zj2d,MG', length ) ); } if ( arguments.length > 1 ) { dtype = arguments[ 1 ]; @@ -69,7 +69,7 @@ function empty( length ) { } nbytes = bytesPerElement( dtype ); if ( nbytes === null ) { - throw new TypeError( format( 'invalid argument. Second argument must be a supported data type. Value: `%s`.', dtype ) ); + throw new TypeError( format( '1ZjMl', dtype ) ); } // Resolve typed array constructor: ctor = ctors( dtype ); diff --git a/package.json b/package.json index 0db15df..b6335c7 100644 --- a/package.json +++ b/package.json @@ -45,7 +45,7 @@ "@stdlib/assert-is-uint8array": "^0.1.1", "@stdlib/buffer-alloc-unsafe": "^0.1.0", "@stdlib/ndarray-base-bytes-per-element": "^0.1.0", - "@stdlib/string-format": "^0.1.1", + "@stdlib/error-tools-fmtprodmsg": "^0.1.1", "@stdlib/types": "^0.1.0" }, "devDependencies": { From 687bd45ca0be097f070acd233916c56371ef0280 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sat, 7 Oct 2023 03:38:00 +0000 Subject: [PATCH 20/75] Remove files --- mod.d.ts | 277 --- mod.js | 4 - mod.js.map | 1 - stats.html | 6177 ---------------------------------------------------- 4 files changed, 6459 deletions(-) delete mode 100644 mod.d.ts delete mode 100644 mod.js delete mode 100644 mod.js.map delete mode 100644 stats.html diff --git a/mod.d.ts b/mod.d.ts deleted file mode 100644 index c071f4d..0000000 --- a/mod.d.ts +++ /dev/null @@ -1,277 +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 - -/// - -import { Complex128Array, Complex64Array, DataType } from '@stdlib/types/array'; - -/** -* Creates an uninitialized array having a specified length. -* -* ## Notes -* -* - In browser environments, the function always returns zero-filled arrays. -* - In Node.js versions `>=3.0.0`, the underlying memory of returned typed arrays is **not** initialized. Memory contents are unknown and may contain **sensitive** data. -* -* @param length - array length -* @param dtype - data type -* @returns empty array -* -* @example -* var arr = empty( 2, 'float64' ); -* // returns -*/ -declare function empty( length: number, dtype: 'float64' ): Float64Array; - -/** -* Creates an uninitialized array having a specified length. -* -* ## Notes -* -* - In browser environments, the function always returns zero-filled arrays. -* - In Node.js versions `>=3.0.0`, the underlying memory of returned typed arrays is **not** initialized. Memory contents are unknown and may contain **sensitive** data. -* -* @param length - array length -* @param dtype - data type -* @returns empty array -* -* @example -* var arr = empty( 2, 'float32' ); -* // returns -*/ -declare function empty( length: number, dtype: 'float32' ): Float32Array; - -/** -* Creates an uninitialized array having a specified length. -* -* ## Notes -* -* - In browser environments, the function always returns zero-filled arrays. -* - In Node.js versions `>=3.0.0`, the underlying memory of returned typed arrays is **not** initialized. Memory contents are unknown and may contain **sensitive** data. -* -* @param length - array length -* @param dtype - data type -* @returns empty array -* -* @example -* var arr = empty( 2, 'complex128' ); -* // returns -*/ -declare function empty( length: number, dtype: 'complex128' ): Complex128Array; - -/** -* Creates an uninitialized array having a specified length. -* -* ## Notes -* -* - In browser environments, the function always returns zero-filled arrays. -* - In Node.js versions `>=3.0.0`, the underlying memory of returned typed arrays is **not** initialized. Memory contents are unknown and may contain **sensitive** data. -* -* @param length - array length -* @param dtype - data type -* @returns empty array -* -* @example -* var arr = empty( 2, 'complex64' ); -* // returns -*/ -declare function empty( length: number, dtype: 'complex64' ): Complex64Array; - -/** -* Creates an uninitialized array having a specified length. -* -* ## Notes -* -* - In browser environments, the function always returns zero-filled arrays. -* - In Node.js versions `>=3.0.0`, the underlying memory of returned typed arrays is **not** initialized. Memory contents are unknown and may contain **sensitive** data. -* -* @param length - array length -* @param dtype - data type -* @returns empty array -* -* @example -* var arr = empty( 2, 'int32' ); -* // returns -*/ -declare function empty( length: number, dtype: 'int32' ): Int32Array; - -/** -* Creates an uninitialized array having a specified length. -* -* ## Notes -* -* - In browser environments, the function always returns zero-filled arrays. -* - In Node.js versions `>=3.0.0`, the underlying memory of returned typed arrays is **not** initialized. Memory contents are unknown and may contain **sensitive** data. -* -* @param length - array length -* @param dtype - data type -* @returns empty array -* -* @example -* var arr = empty( 2, 'int16' ); -* // returns -*/ -declare function empty( length: number, dtype: 'int16' ): Int16Array; - -/** -* Creates an uninitialized array having a specified length. -* -* ## Notes -* -* - In browser environments, the function always returns zero-filled arrays. -* - In Node.js versions `>=3.0.0`, the underlying memory of returned typed arrays is **not** initialized. Memory contents are unknown and may contain **sensitive** data. -* -* @param length - array length -* @param dtype - data type -* @returns empty array -* -* @example -* var arr = empty( 2, 'int8' ); -* // returns -*/ -declare function empty( length: number, dtype: 'int8' ): Int8Array; - -/** -* Creates an uninitialized array having a specified length. -* -* ## Notes -* -* - In browser environments, the function always returns zero-filled arrays. -* - In Node.js versions `>=3.0.0`, the underlying memory of returned typed arrays is **not** initialized. Memory contents are unknown and may contain **sensitive** data. -* -* @param length - array length -* @param dtype - data type -* @returns empty array -* -* @example -* var arr = empty( 2, 'uint32' ); -* // returns -*/ -declare function empty( length: number, dtype: 'uint32' ): Uint32Array; - -/** -* Creates an uninitialized array having a specified length. -* -* ## Notes -* -* - In browser environments, the function always returns zero-filled arrays. -* - In Node.js versions `>=3.0.0`, the underlying memory of returned typed arrays is **not** initialized. Memory contents are unknown and may contain **sensitive** data. -* -* @param length - array length -* @param dtype - data type -* @returns empty array -* -* @example -* var arr = empty( 2, 'uint16' ); -* // returns -*/ -declare function empty( length: number, dtype: 'uint16' ): Uint16Array; - -/** -* Creates an uninitialized array having a specified length. -* -* ## Notes -* -* - In browser environments, the function always returns zero-filled arrays. -* - In Node.js versions `>=3.0.0`, the underlying memory of returned typed arrays is **not** initialized. Memory contents are unknown and may contain **sensitive** data. -* -* @param length - array length -* @param dtype - data type -* @returns empty array -* -* @example -* var arr = empty( 2, 'uint8' ); -* // returns -*/ -declare function empty( length: number, dtype: 'uint8' ): Uint8Array; - -/** -* Creates an uninitialized array having a specified length. -* -* ## Notes -* -* - In browser environments, the function always returns zero-filled arrays. -* - In Node.js versions `>=3.0.0`, the underlying memory of returned typed arrays is **not** initialized. Memory contents are unknown and may contain **sensitive** data. -* -* @param length - array length -* @param dtype - data type -* @returns empty array -* -* @example -* var arr = empty( 2, 'uint8c' ); -* // returns -*/ -declare function empty( length: number, dtype: 'uint8c' ): Uint8ClampedArray; - -/** -* Creates a zero-filled array having a specified length. -* -* @param length - array length -* @param dtype - data type -* @returns zero-filled array -* -* @example -* var arr = empty( 2, 'generic' ); -* // returns -*/ -declare function empty( length: number, dtype: 'generic' ): Array; - -/** -* Creates an uninitialized array having a specified length. -* -* ## Notes -* -* - In browser environments, the function always returns zero-filled arrays. -* - If `dtype` is `'generic'`, the function always returns a zero-filled array. -* - In Node.js versions `>=3.0.0`, the underlying memory of returned typed arrays is **not** initialized. Memory contents are unknown and may contain **sensitive** data. -* -* The function recognizes the following data types: -* -* - `float64`: double-precision floating-point numbers (IEEE 754) -* - `float32`: single-precision floating-point numbers (IEEE 754) -* - `complex128`: double-precision complex floating-point numbers -* - `complex64`: single-precision complex floating-point numbers -* - `int32`: 32-bit two's complement signed integers -* - `uint32`: 32-bit unsigned integers -* - `int16`: 16-bit two's complement signed integers -* - `uint16`: 16-bit unsigned integers -* - `int8`: 8-bit two's complement signed integers -* - `uint8`: 8-bit unsigned integers -* - `uint8c`: 8-bit unsigned integers clamped to `0-255` -* - `generic`: generic JavaScript values -* -* @param length - array length -* @param dtype - data type (default: 'float64') -* @returns empty array -* -* @example -* var arr = empty( 2 ); -* // returns -* -* @example -* var arr = empty( 2, 'float32' ); -* // returns -*/ -declare function empty( length: number, dtype?: DataType ): Float64Array; - - -// EXPORTS // - -export = empty; diff --git a/mod.js b/mod.js deleted file mode 100644 index ce435ce..0000000 --- a/mod.js +++ /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 -/// -var e="function"==typeof Object.defineProperty?Object.defineProperty:null;var r=Object.defineProperty;function t(e){return"number"==typeof e}function n(e){var r,t="";for(r=0;r0&&(r-=1),n=i.toExponential(r)):n=i.toPrecision(e.precision),e.alternate||(n=y.call(n,v,"$1e"),n=y.call(n,b,"e"),n=y.call(n,w,""));break;default:throw new Error("invalid double notation. Value: "+e.specifier)}return n=y.call(n,h,"e+0$1"),n=y.call(n,p,"e-0$1"),e.alternate&&(n=y.call(n,g,"$1."),n=y.call(n,m,"$1.e")),i>=0&&e.sign&&(n=e.sign+n),n=e.specifier===s.call(e.specifier)?s.call(n):c.call(n)}function E(e){var r,t="";for(r=0;r127)throw new Error("invalid character code. Value: "+n.arg);n.arg=_(a)?String(n.arg):T(a)}break;case"e":case"E":case"f":case"F":case"g":case"G":r||(n.precision=6),n.arg=d(n);break;default:throw new Error("invalid specifier: "+n.specifier)}n.maxWidth>=0&&n.arg.length>n.maxWidth&&(n.arg=n.arg.substring(0,n.maxWidth)),n.padZeros?n.arg=i(n.arg,n.width||n.precision,n.padRight):n.width&&(n.arg=A(n.arg,n.width,n.padRight)),l+=n.arg||"",c+=1}return l}var k=/%(?:([1-9]\d*)\$)?([0 +\-#]*)(\*|\d+)?(?:(\.)(\*|\d+)?)?[hlL]?([%A-Za-z])/g;function L(e){var r={mapping:e[1]?parseInt(e[1],10):void 0,flags:e[2],width:e[3],precision:e[5],specifier:e[6]};return"."===e[4]&&void 0===e[5]&&(r.precision="1"),r}function S(e){var r,t,n,i;for(t=[],i=0,n=k.exec(e);n;)(r=e.slice(i,k.lastIndex-n[0].length)).length&&t.push(r),t.push(L(n)),i=k.lastIndex,n=k.exec(e);return(r=e.slice(i)).length&&t.push(r),t}function R(e){return"string"==typeof e}function B(e){var r,t,n;if(!R(e))throw new TypeError(B("invalid argument. First argument must be a string. Value: `%s`.",e));for(r=S(e),(t=new Array(arguments.length))[0]=r,n=1;nne&&oe(e)}function ue(e){return W(e)&&ae(e)}function fe(e){return ee(e)&&ae(e.valueOf())}function le(e){return ue(e)||fe(e)}function ce(e){return ue(e)&&e>=0}function se(e){return fe(e)&&e.valueOf()>=0}function ye(e){return ce(e)||se(e)}Y(le,"isPrimitive",ue),Y(le,"isObject",fe),Y(ye,"isPrimitive",ce),Y(ye,"isObject",se);var he="function"==typeof Float64Array;var pe="function"==typeof Float64Array?Float64Array:null;var ge="function"==typeof Float64Array?Float64Array:void 0;var me=function(){var e,r,t;if("function"!=typeof pe)return!1;try{r=new pe([1,3.14,-3.14,NaN]),t=r,e=(he&&t instanceof Float64Array||"[object Float64Array]"===D(t))&&1===r[0]&&3.14===r[1]&&-3.14===r[2]&&r[3]!=r[3]}catch(r){e=!1}return e}()?ge:function(){throw new Error("not implemented")},we="function"==typeof Float32Array;var be="function"==typeof Float32Array?Float32Array:null;var ve="function"==typeof Float32Array?Float32Array:void 0;var de=function(){var e,r,t;if("function"!=typeof be)return!1;try{r=new be([1,3.14,-3.14,5e40]),t=r,e=(we&&t instanceof Float32Array||"[object Float32Array]"===D(t))&&1===r[0]&&3.140000104904175===r[1]&&-3.140000104904175===r[2]&&r[3]===te}catch(r){e=!1}return e}()?ve:function(){throw new Error("not implemented")},Ee="function"==typeof Int16Array;var Ae="function"==typeof Int16Array?Int16Array:null;var Te="function"==typeof Int16Array?Int16Array:void 0;var _e=function(){var e,r,t;if("function"!=typeof Ae)return!1;try{r=new Ae([1,3.14,-3.14,32768]),t=r,e=(Ee&&t instanceof Int16Array||"[object Int16Array]"===D(t))&&1===r[0]&&3===r[1]&&-3===r[2]&&-32768===r[3]}catch(r){e=!1}return e}()?Te:function(){throw new Error("not implemented")},xe="function"==typeof Int32Array;var je="function"==typeof Int32Array?Int32Array:null;var Ve="function"==typeof Int32Array?Int32Array:void 0;var ke=function(){var e,r,t;if("function"!=typeof je)return!1;try{r=new je([1,3.14,-3.14,2147483648]),t=r,e=(xe&&t instanceof Int32Array||"[object Int32Array]"===D(t))&&1===r[0]&&3===r[1]&&-3===r[2]&&-2147483648===r[3]}catch(r){e=!1}return e}()?Ve:function(){throw new Error("not implemented")},Le="function"==typeof Int8Array;var Se="function"==typeof Int8Array?Int8Array:null;var Re="function"==typeof Int8Array?Int8Array:void 0;var Be=function(){var e,r,t;if("function"!=typeof Se)return!1;try{r=new Se([1,3.14,-3.14,128]),t=r,e=(Le&&t instanceof Int8Array||"[object Int8Array]"===D(t))&&1===r[0]&&3===r[1]&&-3===r[2]&&-128===r[3]}catch(r){e=!1}return e}()?Re:function(){throw new Error("not implemented")},Ie="function"==typeof Uint16Array;var Ce="function"==typeof Uint16Array?Uint16Array:null;var Fe="function"==typeof Uint16Array?Uint16Array:void 0;var Oe=function(){var e,r,t;if("function"!=typeof Ce)return!1;try{r=new Ce(r=[1,3.14,-3.14,65536,65537]),t=r,e=(Ie&&t instanceof Uint16Array||"[object Uint16Array]"===D(t))&&1===r[0]&&3===r[1]&&65533===r[2]&&0===r[3]&&1===r[4]}catch(r){e=!1}return e}()?Fe:function(){throw new Error("not implemented")},Me="function"==typeof Uint32Array;var Ne="function"==typeof Uint32Array?Uint32Array:null;var Ue="function"==typeof Uint32Array?Uint32Array:void 0;var Pe=function(){var e,r,t;if("function"!=typeof Ne)return!1;try{r=new Ne(r=[1,3.14,-3.14,4294967296,4294967297]),t=r,e=(Me&&t instanceof Uint32Array||"[object Uint32Array]"===D(t))&&1===r[0]&&3===r[1]&&4294967293===r[2]&&0===r[3]&&1===r[4]}catch(r){e=!1}return e}()?Ue:function(){throw new Error("not implemented")},Ye="function"==typeof Uint8Array;var We="function"==typeof Uint8Array?Uint8Array:null;var $e="function"==typeof Uint8Array?Uint8Array:void 0;var Ge=function(){var e,r,t;if("function"!=typeof We)return!1;try{r=new We(r=[1,3.14,-3.14,256,257]),t=r,e=(Ye&&t instanceof Uint8Array||"[object Uint8Array]"===D(t))&&1===r[0]&&3===r[1]&&253===r[2]&&0===r[3]&&1===r[4]}catch(r){e=!1}return e}()?$e:function(){throw new Error("not implemented")},Ze="function"==typeof Uint8ClampedArray;var Xe="function"==typeof Uint8ClampedArray?Uint8ClampedArray:null;var ze="function"==typeof Uint8ClampedArray?Uint8ClampedArray:void 0;var Je=function(){var e,r,t;if("function"!=typeof Xe)return!1;try{r=new Xe([-1,0,1,3.14,4.99,255,256]),t=r,e=(Ze&&t instanceof Uint8ClampedArray||"[object Uint8ClampedArray]"===D(t))&&0===r[0]&&0===r[1]&&1===r[2]&&3===r[3]&&5===r[4]&&255===r[5]&&255===r[6]}catch(r){e=!1}return e}()?ze:function(){throw new Error("not implemented")};function qe(e){return"object"==typeof e&&null!==e&&"number"==typeof e.length&&oe(e.length)&&e.length>=0&&e.length<=4294967295}function De(e){return"object"==typeof e&&null!==e&&"number"==typeof e.length&&oe(e.length)&&e.length>=0&&e.length<=9007199254740991}var He="function"==typeof ArrayBuffer;function Ke(e){return He&&e instanceof ArrayBuffer||"[object ArrayBuffer]"===D(e)}var Qe=Array.isArray?Array.isArray:function(e){return"[object Array]"===D(e)};function er(e){return"object"==typeof e&&null!==e&&!Qe(e)}var rr=/./;function tr(e){return"boolean"==typeof e}var nr=Boolean,ir=Boolean.prototype.toString;var or=G();function ar(e){return"object"==typeof e&&(e instanceof nr||(or?function(e){try{return ir.call(e),!0}catch(e){return!1}}(e):"[object Boolean]"===D(e)))}function ur(e){return tr(e)||ar(e)}function fr(){return new Function("return this;")()}Y(ur,"isPrimitive",tr),Y(ur,"isObject",ar);var lr="object"==typeof self?self:null,cr="object"==typeof window?window:null,sr="undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},yr="object"==typeof sr?sr:null,hr="object"==typeof globalThis?globalThis:null;var pr=function(e){if(arguments.length){if(!tr(e))throw new TypeError(B("invalid argument. Must provide a boolean. Value: `%s`.",e));if(e)return fr()}if(hr)return hr;if(lr)return lr;if(cr)return cr;if(yr)return yr;throw new Error("unexpected error. Unable to resolve global object.")}(),gr=pr.document&&pr.document.childNodes,mr=Int8Array;function wr(){return/^\s*function\s*([^(]*)/i}var br=/^\s*function\s*([^(]*)/i;function vr(e){return null!==e&&"object"==typeof e}function dr(e){var r,t,n,i;if(("Object"===(t=D(e).slice(8,-1))||"Error"===t)&&e.constructor){if("string"==typeof(n=e.constructor).name)return n.name;if(r=br.exec(n.toString()))return r[1]}return vr(i=e)&&(i._isBuffer||i.constructor&&"function"==typeof i.constructor.isBuffer&&i.constructor.isBuffer(i))?"Buffer":t}Y(wr,"REGEXP",br),Y(vr,"isObjectLikeArray",function(e){if("function"!=typeof e)throw new TypeError(B("invalid argument. Must provide a function. Value: `%s`.",e));return function(r){var t,n;if(!Qe(r))return!1;if(0===(t=r.length))return!1;for(n=0;n=2)r.push(n[0],n[1]);else{if(!kr(n))return new TypeError(B("invalid argument. An iterator must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",n));r.push(Ir(n),Cr(n))}return r}function Wr(e,r,t){var n,i,o,a;for(n=[],a=-1;!(i=e.next()).done;)if(a+=1,qe(o=r.call(t,i.value,a))&&o.length>=2)n.push(o[0],o[1]);else{if(!kr(o))return new TypeError(B("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",o));n.push(Ir(o),Cr(o))}return n}function $r(e,r){var t,n,i,o;for(t=r.length,o=0,i=0;it.byteLength-e)throw new RangeError(B("invalid arguments. ArrayBuffer has insufficient capacity. Either decrease the array length or provide a bigger buffer. Minimum capacity: `%u`.",n*Gr));t=new de(t,e,2*n)}}return Y(this,"_buffer",t),Y(this,"_length",t.length/2),this}function Hr(e){return e.re}function Kr(e){return e.im}function Qr(e){var r,t,n;for(r=[];!(t=e.next()).done;)if(qe(n=t.value)&&n.length>=2)r.push(n[0],n[1]);else{if(!kr(n))return new TypeError(B("invalid argument. An iterator must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",n));r.push(Hr(n),Kr(n))}return r}function et(e,r,t){var n,i,o,a;for(n=[],a=-1;!(i=e.next()).done;)if(a+=1,qe(o=r.call(t,i.value,a))&&o.length>=2)n.push(o[0],o[1]);else{if(!kr(o))return new TypeError(B("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",o));n.push(Hr(o),Kr(o))}return n}function rt(e,r){var t,n,i,o;for(t=r.length,o=0,i=0;i1){if(!Ar(n=arguments[1]))throw new TypeError(B("invalid argument. Second argument must be a function. Value: `%s`.",n));t>2&&(r=arguments[2])}if(Xr(e)){if(f=e.length,n){for(o=(i=new this(f))._buffer,y=0,s=0;s=2))throw new TypeError(B("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",c));o[y]=c[0],o[y+1]=c[1]}y+=2}return i}return new this(e)}if(De(e)){if(n){for(f=e.length,u=e.get&&e.set?Pr("default"):Nr("default"),s=0;s=2))throw new TypeError(B("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",c));o[y]=c[0],o[y+1]=c[1]}y+=2}return i}return new this(e)}if(er(e)&&Zr&&Ar(e[Rr])){if(!Ar((o=e[Rr]()).next))throw new TypeError(B("invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.",e));if((a=n?Wr(o,n,r):Yr(o))instanceof Error)throw a;for(o=(i=new this(f=a.length/2))._buffer,s=0;s=n)return{done:!0};return r=new Vr(e[a+=2],e[a+1]),{value:[o,r],done:!1}})),Y(t,"return",(function(e){if(i=!0,arguments.length)return{value:e,done:!0};return{done:!0}})),Rr&&Y(t,Rr,(function(){return r.entries()})),t})),Y(Dr.prototype,"get",(function(e){var r;if(!Xr(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!ce(e))throw new TypeError(B("invalid argument. Must provide a nonnegative integer. Value: `%s`.",e));if(!(e>=this._length))return new Vr((r=this._buffer)[e*=2],r[e+1])})),Br(Dr.prototype,"length",(function(){return this._length})),Y(Dr.prototype,"set",(function(e){var r,t,n,i,o,a,u,f,l;if(!Xr(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(n=this._buffer,arguments.length>1){if(!ce(t=arguments[1]))throw new TypeError(B("invalid argument. Index argument must be a nonnegative integer. Value: `%s`.",t))}else t=0;if(kr(e)){if(t>=this._length)throw new RangeError(B("invalid argument. Index argument is out-of-bounds. Value: `%u`.",t));return n[t*=2]=Ir(e),void(n[t+1]=Cr(e))}if(Xr(e)){if(t+(a=e._length)>this._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");if(r=e._buffer,l=n.byteOffset+t*Gr,r.buffer===n.buffer&&r.byteOffsetl){for(i=new de(r.length),f=0;fthis._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");if(r=e,l=n.byteOffset+t*Gr,r.buffer===n.buffer&&r.byteOffsetl){for(i=new de(a),f=0;fthis._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");for(t*=2,f=0;ft.byteLength-e)throw new RangeError(B("invalid arguments. ArrayBuffer has insufficient capacity. Either decrease the array length or provide a bigger buffer. Minimum capacity: `%u`.",n*tt));t=new me(t,e,2*n)}}return Y(this,"_buffer",t),Y(this,"_length",t.length/2),this}Y(ft,"BYTES_PER_ELEMENT",tt),Y(ft,"name","Complex128Array"),Y(ft,"from",(function(e){var r,t,n,i,o,a,u,f,l,c,s,y;if(!Ar(this))throw new TypeError("invalid invocation. `this` context must be a constructor.");if(!ot(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if((t=arguments.length)>1){if(!Ar(n=arguments[1]))throw new TypeError(B("invalid argument. Second argument must be a function. Value: `%s`.",n));t>2&&(r=arguments[2])}if(it(e)){if(f=e.length,n){for(o=(i=new this(f))._buffer,y=0,s=0;s=2))throw new TypeError(B("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",c));o[y]=c[0],o[y+1]=c[1]}y+=2}return i}return new this(e)}if(De(e)){if(n){for(f=e.length,u=e.get&&e.set?Pr("default"):Nr("default"),s=0;s=2))throw new TypeError(B("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",c));o[y]=c[0],o[y+1]=c[1]}y+=2}return i}return new this(e)}if(er(e)&&nt&&Ar(e[Rr])){if(!Ar((o=e[Rr]()).next))throw new TypeError(B("invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.",e));if((a=n?et(o,n,r):Qr(o))instanceof Error)throw a;for(o=(i=new this(f=a.length/2))._buffer,s=0;s=n)return{done:!0};return r=new Tr(e[a+=2],e[a+1]),{value:[o,r],done:!1}})),Y(t,"return",(function(e){if(i=!0,arguments.length)return{value:e,done:!0};return{done:!0}})),Rr&&Y(t,Rr,(function(){return r.entries()})),t})),Y(ft.prototype,"get",(function(e){var r;if(!it(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!ce(e))throw new TypeError(B("invalid argument. Must provide a nonnegative integer. Value: `%s`.",e));if(!(e>=this._length))return new Tr((r=this._buffer)[e*=2],r[e+1])})),Br(ft.prototype,"length",(function(){return this._length})),Y(ft.prototype,"set",(function(e){var r,t,n,i,o,a,u,f,l;if(!it(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(n=this._buffer,arguments.length>1){if(!ce(t=arguments[1]))throw new TypeError(B("invalid argument. Index argument must be a nonnegative integer. Value: `%s`.",t))}else t=0;if(kr(e)){if(t>=this._length)throw new RangeError(B("invalid argument. Index argument is out-of-bounds. Value: `%u`.",t));return n[t*=2]=Hr(e),void(n[t+1]=Kr(e))}if(it(e)){if(t+(a=e._length)>this._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");if(r=e._buffer,l=n.byteOffset+t*tt,r.buffer===n.buffer&&r.byteOffsetl){for(i=new me(r.length),f=0;fthis._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");if(r=e,l=n.byteOffset+t*tt,r.buffer===n.buffer&&r.byteOffsetl){for(i=new me(a),f=0;fthis._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");for(t*=2,f=0;f1?arguments[1]:"float64"))return st(e);if(null===(t=ct(r)))throw new TypeError(B("invalid argument. Second argument must be a recognized data type. Value: `%s`.",r));return new t(e)}function ht(e){return arguments.length>1?yt(e,arguments[1]):yt(e)}export{ht as default}; -//# sourceMappingURL=mod.js.map diff --git a/mod.js.map b/mod.js.map deleted file mode 100644 index ca3f210..0000000 --- a/mod.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"mod.js","sources":["../node_modules/@stdlib/utils-define-property/lib/define_property.js","../node_modules/@stdlib/utils-define-property/lib/builtin.js","../node_modules/@stdlib/string-base-format-interpolate/lib/is_number.js","../node_modules/@stdlib/string-base-format-interpolate/lib/zero_pad.js","../node_modules/@stdlib/string-base-format-interpolate/lib/format_integer.js","../node_modules/@stdlib/string-base-format-interpolate/lib/is_string.js","../node_modules/@stdlib/string-base-format-interpolate/lib/format_double.js","../node_modules/@stdlib/string-base-format-interpolate/lib/space_pad.js","../node_modules/@stdlib/string-base-format-interpolate/lib/main.js","../node_modules/@stdlib/string-base-format-tokenize/lib/main.js","../node_modules/@stdlib/string-format/lib/is_string.js","../node_modules/@stdlib/string-format/lib/main.js","../node_modules/@stdlib/utils-define-property/lib/polyfill.js","../node_modules/@stdlib/utils-define-property/lib/index.js","../node_modules/@stdlib/utils-define-property/lib/has_define_property_support.js","../node_modules/@stdlib/utils-define-nonenumerable-read-only-property/lib/main.js","../node_modules/@stdlib/assert-is-number/lib/primitive.js","../node_modules/@stdlib/assert-has-tostringtag-support/lib/main.js","../node_modules/@stdlib/assert-has-symbol-support/lib/main.js","../node_modules/@stdlib/utils-native-class/lib/tostring.js","../node_modules/@stdlib/assert-has-own-property/lib/main.js","../node_modules/@stdlib/symbol-ctor/lib/main.js","../node_modules/@stdlib/utils-native-class/lib/tostringtag.js","../node_modules/@stdlib/utils-native-class/lib/index.js","../node_modules/@stdlib/utils-native-class/lib/polyfill.js","../node_modules/@stdlib/utils-native-class/lib/main.js","../node_modules/@stdlib/number-ctor/lib/main.js","../node_modules/@stdlib/assert-is-number/lib/tostring.js","../node_modules/@stdlib/assert-is-number/lib/object.js","../node_modules/@stdlib/assert-is-number/lib/try2serialize.js","../node_modules/@stdlib/assert-is-number/lib/main.js","../node_modules/@stdlib/assert-is-number/lib/index.js","../node_modules/@stdlib/constants-float64-pinf/lib/index.js","../node_modules/@stdlib/constants-float64-ninf/lib/index.js","../node_modules/@stdlib/math-base-special-floor/lib/main.js","../node_modules/@stdlib/math-base-assert-is-integer/lib/main.js","../node_modules/@stdlib/assert-is-integer/lib/integer.js","../node_modules/@stdlib/assert-is-integer/lib/primitive.js","../node_modules/@stdlib/assert-is-integer/lib/object.js","../node_modules/@stdlib/assert-is-integer/lib/main.js","../node_modules/@stdlib/assert-is-nonnegative-integer/lib/primitive.js","../node_modules/@stdlib/assert-is-nonnegative-integer/lib/object.js","../node_modules/@stdlib/assert-is-nonnegative-integer/lib/main.js","../node_modules/@stdlib/assert-is-integer/lib/index.js","../node_modules/@stdlib/assert-is-nonnegative-integer/lib/index.js","../node_modules/@stdlib/assert-is-float64array/lib/main.js","../node_modules/@stdlib/assert-has-float64array-support/lib/float64array.js","../node_modules/@stdlib/array-float64/lib/main.js","../node_modules/@stdlib/array-float64/lib/index.js","../node_modules/@stdlib/assert-has-float64array-support/lib/main.js","../node_modules/@stdlib/array-float64/lib/polyfill.js","../node_modules/@stdlib/assert-is-float32array/lib/main.js","../node_modules/@stdlib/assert-has-float32array-support/lib/float32array.js","../node_modules/@stdlib/array-float32/lib/main.js","../node_modules/@stdlib/array-float32/lib/index.js","../node_modules/@stdlib/assert-has-float32array-support/lib/main.js","../node_modules/@stdlib/array-float32/lib/polyfill.js","../node_modules/@stdlib/assert-is-int16array/lib/main.js","../node_modules/@stdlib/constants-int16-max/lib/index.js","../node_modules/@stdlib/assert-has-int16array-support/lib/int16array.js","../node_modules/@stdlib/array-int16/lib/main.js","../node_modules/@stdlib/array-int16/lib/index.js","../node_modules/@stdlib/assert-has-int16array-support/lib/main.js","../node_modules/@stdlib/constants-int16-min/lib/index.js","../node_modules/@stdlib/array-int16/lib/polyfill.js","../node_modules/@stdlib/assert-is-int32array/lib/main.js","../node_modules/@stdlib/constants-int32-max/lib/index.js","../node_modules/@stdlib/assert-has-int32array-support/lib/int32array.js","../node_modules/@stdlib/array-int32/lib/main.js","../node_modules/@stdlib/array-int32/lib/index.js","../node_modules/@stdlib/assert-has-int32array-support/lib/main.js","../node_modules/@stdlib/constants-int32-min/lib/index.js","../node_modules/@stdlib/array-int32/lib/polyfill.js","../node_modules/@stdlib/assert-is-int8array/lib/main.js","../node_modules/@stdlib/constants-int8-max/lib/index.js","../node_modules/@stdlib/assert-has-int8array-support/lib/int8array.js","../node_modules/@stdlib/array-int8/lib/main.js","../node_modules/@stdlib/array-int8/lib/index.js","../node_modules/@stdlib/assert-has-int8array-support/lib/main.js","../node_modules/@stdlib/constants-int8-min/lib/index.js","../node_modules/@stdlib/array-int8/lib/polyfill.js","../node_modules/@stdlib/assert-is-uint16array/lib/main.js","../node_modules/@stdlib/constants-uint16-max/lib/index.js","../node_modules/@stdlib/assert-has-uint16array-support/lib/uint16array.js","../node_modules/@stdlib/array-uint16/lib/main.js","../node_modules/@stdlib/array-uint16/lib/index.js","../node_modules/@stdlib/assert-has-uint16array-support/lib/main.js","../node_modules/@stdlib/array-uint16/lib/polyfill.js","../node_modules/@stdlib/assert-is-uint32array/lib/main.js","../node_modules/@stdlib/constants-uint32-max/lib/index.js","../node_modules/@stdlib/assert-has-uint32array-support/lib/uint32array.js","../node_modules/@stdlib/array-uint32/lib/main.js","../node_modules/@stdlib/array-uint32/lib/index.js","../node_modules/@stdlib/assert-has-uint32array-support/lib/main.js","../node_modules/@stdlib/array-uint32/lib/polyfill.js","../node_modules/@stdlib/assert-is-uint8array/lib/main.js","../node_modules/@stdlib/constants-uint8-max/lib/index.js","../node_modules/@stdlib/assert-has-uint8array-support/lib/uint8array.js","../node_modules/@stdlib/array-uint8/lib/main.js","../node_modules/@stdlib/array-uint8/lib/index.js","../node_modules/@stdlib/assert-has-uint8array-support/lib/main.js","../node_modules/@stdlib/array-uint8/lib/polyfill.js","../node_modules/@stdlib/assert-is-uint8clampedarray/lib/main.js","../node_modules/@stdlib/assert-has-uint8clampedarray-support/lib/uint8clampedarray.js","../node_modules/@stdlib/array-uint8c/lib/main.js","../node_modules/@stdlib/array-uint8c/lib/index.js","../node_modules/@stdlib/assert-has-uint8clampedarray-support/lib/main.js","../node_modules/@stdlib/array-uint8c/lib/polyfill.js","../node_modules/@stdlib/assert-is-array-like-object/lib/main.js","../node_modules/@stdlib/constants-array-max-array-length/lib/index.js","../node_modules/@stdlib/assert-is-collection/lib/main.js","../node_modules/@stdlib/constants-array-max-typed-array-length/lib/index.js","../node_modules/@stdlib/assert-is-arraybuffer/lib/main.js","../node_modules/@stdlib/assert-is-array/lib/main.js","../node_modules/@stdlib/assert-is-object/lib/main.js","../node_modules/@stdlib/utils-type-of/lib/fixtures/re.js","../node_modules/@stdlib/assert-is-boolean/lib/primitive.js","../node_modules/@stdlib/boolean-ctor/lib/main.js","../node_modules/@stdlib/assert-is-boolean/lib/tostring.js","../node_modules/@stdlib/assert-is-boolean/lib/object.js","../node_modules/@stdlib/assert-is-boolean/lib/try2serialize.js","../node_modules/@stdlib/assert-is-boolean/lib/main.js","../node_modules/@stdlib/utils-global/lib/codegen.js","../node_modules/@stdlib/assert-is-boolean/lib/index.js","../node_modules/@stdlib/utils-global/lib/self.js","../node_modules/@stdlib/utils-global/lib/window.js","../node_modules/@stdlib/utils-global/lib/global.js","../node_modules/@stdlib/utils-global/lib/global_this.js","../node_modules/@stdlib/utils-type-of/lib/fixtures/nodelist.js","../node_modules/@stdlib/utils-global/lib/main.js","../node_modules/@stdlib/utils-type-of/lib/fixtures/typedarray.js","../node_modules/@stdlib/regexp-function-name/lib/main.js","../node_modules/@stdlib/regexp-function-name/lib/regexp.js","../node_modules/@stdlib/assert-is-object-like/lib/main.js","../node_modules/@stdlib/utils-constructor-name/lib/main.js","../node_modules/@stdlib/assert-is-buffer/lib/main.js","../node_modules/@stdlib/regexp-function-name/lib/index.js","../node_modules/@stdlib/assert-is-object-like/lib/index.js","../node_modules/@stdlib/assert-tools-array-function/lib/main.js","../node_modules/@stdlib/utils-type-of/lib/index.js","../node_modules/@stdlib/utils-type-of/lib/check.js","../node_modules/@stdlib/utils-type-of/lib/polyfill.js","../node_modules/@stdlib/utils-type-of/lib/main.js","../node_modules/@stdlib/assert-is-function/lib/main.js","../node_modules/@stdlib/complex-float64/lib/main.js","../node_modules/@stdlib/complex-float64/lib/tostring.js","../node_modules/@stdlib/complex-float64/lib/tojson.js","../node_modules/@stdlib/number-float64-base-to-float32/lib/main.js","../node_modules/@stdlib/number-float64-base-to-float32/lib/polyfill.js","../node_modules/@stdlib/number-float64-base-to-float32/lib/index.js","../node_modules/@stdlib/complex-float32/lib/main.js","../node_modules/@stdlib/assert-is-complex-like/lib/main.js","../node_modules/@stdlib/math-base-assert-is-even/lib/main.js","../node_modules/@stdlib/assert-has-iterator-symbol-support/lib/main.js","../node_modules/@stdlib/complex-float32/lib/tostring.js","../node_modules/@stdlib/complex-float32/lib/tojson.js","../node_modules/@stdlib/symbol-iterator/lib/main.js","../node_modules/@stdlib/utils-define-nonenumerable-read-only-accessor/lib/main.js","../node_modules/@stdlib/complex-realf/lib/main.js","../node_modules/@stdlib/complex-imagf/lib/main.js","../node_modules/@stdlib/strided-base-reinterpret-complex64/lib/main.js","../node_modules/@stdlib/strided-base-reinterpret-complex128/lib/main.js","../node_modules/@stdlib/array-base-getter/lib/main.js","../node_modules/@stdlib/array-base-accessor-getter/lib/main.js","../node_modules/@stdlib/array-complex64/lib/from_iterator.js","../node_modules/@stdlib/array-complex64/lib/from_iterator_map.js","../node_modules/@stdlib/array-complex64/lib/from_array.js","../node_modules/@stdlib/array-complex64/lib/main.js","../node_modules/@stdlib/complex-real/lib/main.js","../node_modules/@stdlib/complex-imag/lib/main.js","../node_modules/@stdlib/array-complex128/lib/from_iterator.js","../node_modules/@stdlib/array-complex128/lib/from_iterator_map.js","../node_modules/@stdlib/array-complex128/lib/from_array.js","../node_modules/@stdlib/array-complex128/lib/main.js","../node_modules/@stdlib/array-ctors/lib/ctors.js","../node_modules/@stdlib/array-ctors/lib/main.js","../node_modules/@stdlib/array-base-zeros/lib/main.js","../node_modules/@stdlib/array-base-filled/lib/main.js","../node_modules/@stdlib/array-zeros/lib/main.js","../lib/polyfill.js"],"sourcesContent":["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Object.defineProperty === 'function' ) ? Object.defineProperty : null;\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Defines (or modifies) an object property.\n*\n* ## Notes\n*\n* - Property descriptors come in two flavors: **data descriptors** and **accessor descriptors**. A data descriptor is a property that has a value, which may or may not be writable. An accessor descriptor is a property described by a getter-setter function pair. A descriptor must be one of these two flavors and cannot be both.\n*\n* @name defineProperty\n* @type {Function}\n* @param {Object} obj - object on which to define the property\n* @param {(string|symbol)} prop - property name\n* @param {Object} descriptor - property descriptor\n* @param {boolean} [descriptor.configurable=false] - boolean indicating if property descriptor can be changed and if the property can be deleted from the provided object\n* @param {boolean} [descriptor.enumerable=false] - boolean indicating if the property shows up when enumerating object properties\n* @param {boolean} [descriptor.writable=false] - boolean indicating if the value associated with the property can be changed with an assignment operator\n* @param {*} [descriptor.value] - property value\n* @param {(Function|void)} [descriptor.get=undefined] - function which serves as a getter for the property, or, if no getter, undefined. When the property is accessed, a getter function is called without arguments and with the `this` context set to the object through which the property is accessed (which may not be the object on which the property is defined due to inheritance). The return value will be used as the property value.\n* @param {(Function|void)} [descriptor.set=undefined] - function which serves as a setter for the property, or, if no setter, undefined. When assigning a property value, a setter function is called with one argument (the value being assigned to the property) and with the `this` context set to the object through which the property is assigned.\n* @throws {TypeError} first argument must be an object\n* @throws {TypeError} third argument must be an object\n* @throws {Error} property descriptor cannot have both a value and a setter and/or getter\n* @returns {Object} object with added property\n*\n* @example\n* var obj = {};\n*\n* defineProperty( obj, 'foo', {\n* 'value': 'bar'\n* });\n*\n* var str = obj.foo;\n* // returns 'bar'\n*/\nvar defineProperty = Object.defineProperty;\n\n\n// EXPORTS //\n\nexport default defineProperty;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Tests if a value is a number primitive.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number primitive\n*\n* @example\n* var bool = isNumber( 3.14 );\n* // returns true\n*\n* @example\n* var bool = isNumber( NaN );\n* // returns true\n*\n* @example\n* var bool = isNumber( new Number( 3.14 ) );\n* // returns false\n*/\nfunction isNumber( value ) {\n\treturn ( typeof value === 'number' ); // NOTE: we inline the `isNumber.isPrimitive` function from `@stdlib/assert/is-number` in order to avoid circular dependencies.\n}\n\n\n// EXPORTS //\n\nexport default isNumber;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// FUNCTIONS //\n\n/**\n* Tests if a string starts with a minus sign (`-`).\n*\n* @private\n* @param {string} str - input string\n* @returns {boolean} boolean indicating if a string starts with a minus sign (`-`)\n*/\nfunction startsWithMinus( str ) {\n\treturn str[ 0 ] === '-';\n}\n\n/**\n* Returns a string of `n` zeros.\n*\n* @private\n* @param {number} n - number of zeros\n* @returns {string} string of zeros\n*/\nfunction zeros( n ) {\n\tvar out = '';\n\tvar i;\n\tfor ( i = 0; i < n; i++ ) {\n\t\tout += '0';\n\t}\n\treturn out;\n}\n\n\n// MAIN //\n\n/**\n* Pads a token with zeros to the specified width.\n*\n* @private\n* @param {string} str - token argument\n* @param {number} width - token width\n* @param {boolean} [right=false] - boolean indicating whether to pad to the right\n* @returns {string} padded token argument\n*/\nfunction zeroPad( str, width, right ) {\n\tvar negative = false;\n\tvar pad = width - str.length;\n\tif ( pad < 0 ) {\n\t\treturn str;\n\t}\n\tif ( startsWithMinus( str ) ) {\n\t\tnegative = true;\n\t\tstr = str.substr( 1 );\n\t}\n\tstr = ( right ) ?\n\t\tstr + zeros( pad ) :\n\t\tzeros( pad ) + str;\n\tif ( negative ) {\n\t\tstr = '-' + str;\n\t}\n\treturn str;\n}\n\n\n// EXPORTS //\n\nexport default zeroPad;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isNumber from './is_number.js';\nimport zeroPad from './zero_pad.js';\n\n// NOTE: for the following, we explicitly avoid using stdlib packages in this particular package in order to avoid circular dependencies.\nvar lowercase = String.prototype.toLowerCase;\nvar uppercase = String.prototype.toUpperCase;\n\n\n// MAIN //\n\n/**\n* Formats a token object argument as an integer.\n*\n* @private\n* @param {Object} token - token object\n* @throws {Error} must provide a valid integer\n* @returns {string} formatted token argument\n*/\nfunction formatInteger( token ) {\n\tvar base;\n\tvar out;\n\tvar i;\n\n\tswitch ( token.specifier ) {\n\tcase 'b':\n\t\t// Case: %b (binary)\n\t\tbase = 2;\n\t\tbreak;\n\tcase 'o':\n\t\t// Case: %o (octal)\n\t\tbase = 8;\n\t\tbreak;\n\tcase 'x':\n\tcase 'X':\n\t\t// Case: %x, %X (hexadecimal)\n\t\tbase = 16;\n\t\tbreak;\n\tcase 'd':\n\tcase 'i':\n\tcase 'u':\n\tdefault:\n\t\t// Case: %d, %i, %u (decimal)\n\t\tbase = 10;\n\t\tbreak;\n\t}\n\tout = token.arg;\n\ti = parseInt( out, 10 );\n\tif ( !isFinite( i ) ) { // NOTE: We use the global `isFinite` function here instead of `@stdlib/math/base/assert/is-finite` in order to avoid circular dependencies.\n\t\tif ( !isNumber( out ) ) {\n\t\t\tthrow new Error( 'invalid integer. Value: ' + out );\n\t\t}\n\t\ti = 0;\n\t}\n\tif ( i < 0 && ( token.specifier === 'u' || base !== 10 ) ) {\n\t\ti = 0xffffffff + i + 1;\n\t}\n\tif ( i < 0 ) {\n\t\tout = ( -i ).toString( base );\n\t\tif ( token.precision ) {\n\t\t\tout = zeroPad( out, token.precision, token.padRight );\n\t\t}\n\t\tout = '-' + out;\n\t} else {\n\t\tout = i.toString( base );\n\t\tif ( !i && !token.precision ) {\n\t\t\tout = '';\n\t\t} else if ( token.precision ) {\n\t\t\tout = zeroPad( out, token.precision, token.padRight );\n\t\t}\n\t\tif ( token.sign ) {\n\t\t\tout = token.sign + out;\n\t\t}\n\t}\n\tif ( base === 16 ) {\n\t\tif ( token.alternate ) {\n\t\t\tout = '0x' + out;\n\t\t}\n\t\tout = ( token.specifier === uppercase.call( token.specifier ) ) ?\n\t\t\tuppercase.call( out ) :\n\t\t\tlowercase.call( out );\n\t}\n\tif ( base === 8 ) {\n\t\tif ( token.alternate && out.charAt( 0 ) !== '0' ) {\n\t\t\tout = '0' + out;\n\t\t}\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default formatInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Tests if a value is a string primitive.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a string primitive\n*\n* @example\n* var bool = isString( 'beep' );\n* // returns true\n*\n* @example\n* var bool = isString( new String( 'beep' ) );\n* // returns false\n*/\nfunction isString( value ) {\n\treturn ( typeof value === 'string' ); // NOTE: we inline the `isString.isPrimitive` function from `@stdlib/assert/is-string` in order to avoid circular dependencies.\n}\n\n\n// EXPORTS //\n\nexport default isString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isNumber from './is_number.js';\n\n// NOTE: for the following, we explicitly avoid using stdlib packages in this particular package in order to avoid circular dependencies.\nvar abs = Math.abs; // eslint-disable-line stdlib/no-builtin-math\nvar lowercase = String.prototype.toLowerCase;\nvar uppercase = String.prototype.toUpperCase;\nvar replace = String.prototype.replace;\n\n\n// VARIABLES //\n\nvar RE_EXP_POS_DIGITS = /e\\+(\\d)$/;\nvar RE_EXP_NEG_DIGITS = /e-(\\d)$/;\nvar RE_ONLY_DIGITS = /^(\\d+)$/;\nvar RE_DIGITS_BEFORE_EXP = /^(\\d+)e/;\nvar RE_TRAILING_PERIOD_ZERO = /\\.0$/;\nvar RE_PERIOD_ZERO_EXP = /\\.0*e/;\nvar RE_ZERO_BEFORE_EXP = /(\\..*[^0])0*e/;\n\n\n// MAIN //\n\n/**\n* Formats a token object argument as a floating-point number.\n*\n* @private\n* @param {Object} token - token object\n* @throws {Error} must provide a valid floating-point number\n* @returns {string} formatted token argument\n*/\nfunction formatDouble( token ) {\n\tvar digits;\n\tvar out;\n\tvar f = parseFloat( token.arg );\n\tif ( !isFinite( f ) ) { // NOTE: We use the global `isFinite` function here instead of `@stdlib/math/base/assert/is-finite` in order to avoid circular dependencies.\n\t\tif ( !isNumber( token.arg ) ) {\n\t\t\tthrow new Error( 'invalid floating-point number. Value: ' + out );\n\t\t}\n\t\t// Case: NaN, Infinity, or -Infinity\n\t\tf = token.arg;\n\t}\n\tswitch ( token.specifier ) {\n\tcase 'e':\n\tcase 'E':\n\t\tout = f.toExponential( token.precision );\n\t\tbreak;\n\tcase 'f':\n\tcase 'F':\n\t\tout = f.toFixed( token.precision );\n\t\tbreak;\n\tcase 'g':\n\tcase 'G':\n\t\tif ( abs( f ) < 0.0001 ) {\n\t\t\tdigits = token.precision;\n\t\t\tif ( digits > 0 ) {\n\t\t\t\tdigits -= 1;\n\t\t\t}\n\t\t\tout = f.toExponential( digits );\n\t\t} else {\n\t\t\tout = f.toPrecision( token.precision );\n\t\t}\n\t\tif ( !token.alternate ) {\n\t\t\tout = replace.call( out, RE_ZERO_BEFORE_EXP, '$1e' );\n\t\t\tout = replace.call( out, RE_PERIOD_ZERO_EXP, 'e');\n\t\t\tout = replace.call( out, RE_TRAILING_PERIOD_ZERO, '' );\n\t\t}\n\t\tbreak;\n\tdefault:\n\t\tthrow new Error( 'invalid double notation. Value: ' + token.specifier );\n\t}\n\tout = replace.call( out, RE_EXP_POS_DIGITS, 'e+0$1' );\n\tout = replace.call( out, RE_EXP_NEG_DIGITS, 'e-0$1' );\n\tif ( token.alternate ) {\n\t\tout = replace.call( out, RE_ONLY_DIGITS, '$1.' );\n\t\tout = replace.call( out, RE_DIGITS_BEFORE_EXP, '$1.e' );\n\t}\n\tif ( f >= 0 && token.sign ) {\n\t\tout = token.sign + out;\n\t}\n\tout = ( token.specifier === uppercase.call( token.specifier ) ) ?\n\t\tuppercase.call( out ) :\n\t\tlowercase.call( out );\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default formatDouble;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// FUNCTIONS //\n\n/**\n* Returns `n` spaces.\n*\n* @private\n* @param {number} n - number of spaces\n* @returns {string} string of spaces\n*/\nfunction spaces( n ) {\n\tvar out = '';\n\tvar i;\n\tfor ( i = 0; i < n; i++ ) {\n\t\tout += ' ';\n\t}\n\treturn out;\n}\n\n\n// MAIN //\n\n/**\n* Pads a token with spaces to the specified width.\n*\n* @private\n* @param {string} str - token argument\n* @param {number} width - token width\n* @param {boolean} [right=false] - boolean indicating whether to pad to the right\n* @returns {string} padded token argument\n*/\nfunction spacePad( str, width, right ) {\n\tvar pad = width - str.length;\n\tif ( pad < 0 ) {\n\t\treturn str;\n\t}\n\tstr = ( right ) ?\n\t\tstr + spaces( pad ) :\n\t\tspaces( pad ) + str;\n\treturn str;\n}\n\n\n// EXPORTS //\n\nexport default spacePad;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport formatInteger from './format_integer.js';\nimport isString from './is_string.js';\nimport formatDouble from './format_double.js';\nimport spacePad from './space_pad.js';\nimport zeroPad from './zero_pad.js';\n\n\n// VARIABLES //\n\nvar fromCharCode = String.fromCharCode;\nvar isnan = isNaN; // NOTE: We use the global `isNaN` function here instead of `@stdlib/math/base/assert/is-nan` to avoid circular dependencies.\nvar isArray = Array.isArray; // NOTE: We use the global `Array.isArray` function here instead of `@stdlib/assert/is-array` to avoid circular dependencies.\n\n\n// FUNCTIONS //\n\n/**\n* Initializes token object with properties of supplied format identifier object or default values if not present.\n*\n* @private\n* @param {Object} token - format identifier object\n* @returns {Object} token object\n*/\nfunction initialize( token ) {\n\tvar out = {};\n\tout.specifier = token.specifier;\n\tout.precision = ( token.precision === void 0 ) ? 1 : token.precision;\n\tout.width = token.width;\n\tout.flags = token.flags || '';\n\tout.mapping = token.mapping;\n\treturn out;\n}\n\n\n// MAIN //\n\n/**\n* Generates string from a token array by interpolating values.\n*\n* @param {Array} tokens - string parts and format identifier objects\n* @param {Array} ...args - variable values\n* @throws {TypeError} first argument must be an array\n* @throws {Error} invalid flags\n* @returns {string} formatted string\n*\n* @example\n* var tokens = [ 'beep ', { 'specifier': 's' } ];\n* var out = formatInterpolate( tokens, 'boop' );\n* // returns 'beep boop'\n*/\nfunction formatInterpolate( tokens ) {\n\tvar hasPeriod;\n\tvar flags;\n\tvar token;\n\tvar flag;\n\tvar num;\n\tvar out;\n\tvar pos;\n\tvar i;\n\tvar j;\n\n\tif ( !isArray( tokens ) ) {\n\t\tthrow new TypeError( 'invalid argument. First argument must be an array. Value: `' + tokens + '`.' );\n\t}\n\tout = '';\n\tpos = 1;\n\tfor ( i = 0; i < tokens.length; i++ ) {\n\t\ttoken = tokens[ i ];\n\t\tif ( isString( token ) ) {\n\t\t\tout += token;\n\t\t} else {\n\t\t\thasPeriod = token.precision !== void 0;\n\t\t\ttoken = initialize( token );\n\t\t\tif ( !token.specifier ) {\n\t\t\t\tthrow new TypeError( 'invalid argument. Token is missing `specifier` property. Index: `'+ i +'`. Value: `' + token + '`.' );\n\t\t\t}\n\t\t\tif ( token.mapping ) {\n\t\t\t\tpos = token.mapping;\n\t\t\t}\n\t\t\tflags = token.flags;\n\t\t\tfor ( j = 0; j < flags.length; j++ ) {\n\t\t\t\tflag = flags.charAt( j );\n\t\t\t\tswitch ( flag ) {\n\t\t\t\tcase ' ':\n\t\t\t\t\ttoken.sign = ' ';\n\t\t\t\t\tbreak;\n\t\t\t\tcase '+':\n\t\t\t\t\ttoken.sign = '+';\n\t\t\t\t\tbreak;\n\t\t\t\tcase '-':\n\t\t\t\t\ttoken.padRight = true;\n\t\t\t\t\ttoken.padZeros = false;\n\t\t\t\t\tbreak;\n\t\t\t\tcase '0':\n\t\t\t\t\ttoken.padZeros = flags.indexOf( '-' ) < 0; // NOTE: We use built-in `Array.prototype.indexOf` here instead of `@stdlib/assert/contains` in order to avoid circular dependencies.\n\t\t\t\t\tbreak;\n\t\t\t\tcase '#':\n\t\t\t\t\ttoken.alternate = true;\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tthrow new Error( 'invalid flag: ' + flag );\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( token.width === '*' ) {\n\t\t\t\ttoken.width = parseInt( arguments[ pos ], 10 );\n\t\t\t\tpos += 1;\n\t\t\t\tif ( isnan( token.width ) ) {\n\t\t\t\t\tthrow new TypeError( 'the argument for * width at position ' + pos + ' is not a number. Value: `' + token.width + '`.' );\n\t\t\t\t}\n\t\t\t\tif ( token.width < 0 ) {\n\t\t\t\t\ttoken.padRight = true;\n\t\t\t\t\ttoken.width = -token.width;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( hasPeriod ) {\n\t\t\t\tif ( token.precision === '*' ) {\n\t\t\t\t\ttoken.precision = parseInt( arguments[ pos ], 10 );\n\t\t\t\t\tpos += 1;\n\t\t\t\t\tif ( isnan( token.precision ) ) {\n\t\t\t\t\t\tthrow new TypeError( 'the argument for * precision at position ' + pos + ' is not a number. Value: `' + token.precision + '`.' );\n\t\t\t\t\t}\n\t\t\t\t\tif ( token.precision < 0 ) {\n\t\t\t\t\t\ttoken.precision = 1;\n\t\t\t\t\t\thasPeriod = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\ttoken.arg = arguments[ pos ];\n\t\t\tswitch ( token.specifier ) {\n\t\t\tcase 'b':\n\t\t\tcase 'o':\n\t\t\tcase 'x':\n\t\t\tcase 'X':\n\t\t\tcase 'd':\n\t\t\tcase 'i':\n\t\t\tcase 'u':\n\t\t\t\t// Case: %b (binary), %o (octal), %x, %X (hexadecimal), %d, %i (decimal), %u (unsigned decimal)\n\t\t\t\tif ( hasPeriod ) {\n\t\t\t\t\ttoken.padZeros = false;\n\t\t\t\t}\n\t\t\t\ttoken.arg = formatInteger( token );\n\t\t\t\tbreak;\n\t\t\tcase 's':\n\t\t\t\t// Case: %s (string)\n\t\t\t\ttoken.maxWidth = ( hasPeriod ) ? token.precision : -1;\n\t\t\t\tbreak;\n\t\t\tcase 'c':\n\t\t\t\t// Case: %c (character)\n\t\t\t\tif ( !isnan( token.arg ) ) {\n\t\t\t\t\tnum = parseInt( token.arg, 10 );\n\t\t\t\t\tif ( num < 0 || num > 127 ) {\n\t\t\t\t\t\tthrow new Error( 'invalid character code. Value: ' + token.arg );\n\t\t\t\t\t}\n\t\t\t\t\ttoken.arg = ( isnan( num ) ) ?\n\t\t\t\t\t\tString( token.arg ) :\n\t\t\t\t\t\tfromCharCode( num );\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'e':\n\t\t\tcase 'E':\n\t\t\tcase 'f':\n\t\t\tcase 'F':\n\t\t\tcase 'g':\n\t\t\tcase 'G':\n\t\t\t\t// Case: %e, %E (scientific notation), %f, %F (decimal floating point), %g, %G (uses the shorter of %e/E or %f/F)\n\t\t\t\tif ( !hasPeriod ) {\n\t\t\t\t\ttoken.precision = 6;\n\t\t\t\t}\n\t\t\t\ttoken.arg = formatDouble( token );\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tthrow new Error( 'invalid specifier: ' + token.specifier );\n\t\t\t}\n\t\t\t// Fit argument into field width...\n\t\t\tif ( token.maxWidth >= 0 && token.arg.length > token.maxWidth ) {\n\t\t\t\ttoken.arg = token.arg.substring( 0, token.maxWidth );\n\t\t\t}\n\t\t\tif ( token.padZeros ) {\n\t\t\t\ttoken.arg = zeroPad( token.arg, token.width || token.precision, token.padRight ); // eslint-disable-line max-len\n\t\t\t} else if ( token.width ) {\n\t\t\t\ttoken.arg = spacePad( token.arg, token.width, token.padRight );\n\t\t\t}\n\t\t\tout += token.arg || '';\n\t\t\tpos += 1;\n\t\t}\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default formatInterpolate;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// VARIABLES //\n\nvar RE = /%(?:([1-9]\\d*)\\$)?([0 +\\-#]*)(\\*|\\d+)?(?:(\\.)(\\*|\\d+)?)?[hlL]?([%A-Za-z])/g;\n\n\n// FUNCTIONS //\n\n/**\n* Parses a delimiter.\n*\n* @private\n* @param {Array} match - regular expression match\n* @returns {Object} delimiter token object\n*/\nfunction parse( match ) {\n\tvar token = {\n\t\t'mapping': ( match[ 1 ] ) ? parseInt( match[ 1 ], 10 ) : void 0,\n\t\t'flags': match[ 2 ],\n\t\t'width': match[ 3 ],\n\t\t'precision': match[ 5 ],\n\t\t'specifier': match[ 6 ]\n\t};\n\tif ( match[ 4 ] === '.' && match[ 5 ] === void 0 ) {\n\t\ttoken.precision = '1';\n\t}\n\treturn token;\n}\n\n\n// MAIN //\n\n/**\n* Tokenizes a string into an array of string parts and format identifier objects.\n*\n* @param {string} str - input string\n* @returns {Array} tokens\n*\n* @example\n* var tokens = formatTokenize( 'Hello %s!' );\n* // returns [ 'Hello ', {...}, '!' ]\n*/\nfunction formatTokenize( str ) {\n\tvar content;\n\tvar tokens;\n\tvar match;\n\tvar prev;\n\n\ttokens = [];\n\tprev = 0;\n\tmatch = RE.exec( str );\n\twhile ( match ) {\n\t\tcontent = str.slice( prev, RE.lastIndex - match[ 0 ].length );\n\t\tif ( content.length ) {\n\t\t\ttokens.push( content );\n\t\t}\n\t\ttokens.push( parse( match ) );\n\t\tprev = RE.lastIndex;\n\t\tmatch = RE.exec( str );\n\t}\n\tcontent = str.slice( prev );\n\tif ( content.length ) {\n\t\ttokens.push( content );\n\t}\n\treturn tokens;\n}\n\n\n// EXPORTS //\n\nexport default formatTokenize;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Tests if a value is a string primitive.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a string primitive\n*\n* @example\n* var bool = isString( 'beep' );\n* // returns true\n*\n* @example\n* var bool = isString( new String( 'beep' ) );\n* // returns false\n*/\nfunction isString( value ) {\n\treturn ( typeof value === 'string' ); // NOTE: we inline the `isString.isPrimitive` function from `@stdlib/assert/is-string` in order to avoid circular dependencies.\n}\n\n\n// EXPORTS //\n\nexport default isString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport interpolate from '@stdlib/string-base-format-interpolate';\nimport tokenize from '@stdlib/string-base-format-tokenize';\nimport isString from './is_string.js';\n\n\n// MAIN //\n\n/**\n* Inserts supplied variable values into a format string.\n*\n* @param {string} str - input string\n* @param {Array} ...args - variable values\n* @throws {TypeError} first argument must be a string\n* @throws {Error} invalid flags\n* @returns {string} formatted string\n*\n* @example\n* var str = format( 'Hello %s!', 'world' );\n* // returns 'Hello world!'\n*\n* @example\n* var str = format( 'Pi: ~%.2f', 3.141592653589793 );\n* // returns 'Pi: ~3.14'\n*/\nfunction format( str ) {\n\tvar tokens;\n\tvar args;\n\tvar i;\n\n\tif ( !isString( str ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a string. Value: `%s`.', str ) );\n\t}\n\ttokens = tokenize( str );\n\targs = new Array( arguments.length );\n\targs[ 0 ] = tokens;\n\tfor ( i = 1; i < args.length; i++ ) {\n\t\targs[ i ] = arguments[ i ];\n\t}\n\treturn interpolate.apply( null, args );\n}\n\n\n// EXPORTS //\n\nexport default format;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable no-underscore-dangle, no-proto */\n\n'use strict';\n\n// MODULES //\n\nimport format from '@stdlib/string-format';\n\n\n// VARIABLES //\n\nvar objectProtoype = Object.prototype;\nvar toStr = objectProtoype.toString;\nvar defineGetter = objectProtoype.__defineGetter__;\nvar defineSetter = objectProtoype.__defineSetter__;\nvar lookupGetter = objectProtoype.__lookupGetter__;\nvar lookupSetter = objectProtoype.__lookupSetter__;\n\n\n// MAIN //\n\n/**\n* Defines (or modifies) an object property.\n*\n* ## Notes\n*\n* - Property descriptors come in two flavors: **data descriptors** and **accessor descriptors**. A data descriptor is a property that has a value, which may or may not be writable. An accessor descriptor is a property described by a getter-setter function pair. A descriptor must be one of these two flavors and cannot be both.\n*\n* @param {Object} obj - object on which to define the property\n* @param {string} prop - property name\n* @param {Object} descriptor - property descriptor\n* @param {boolean} [descriptor.configurable=false] - boolean indicating if property descriptor can be changed and if the property can be deleted from the provided object\n* @param {boolean} [descriptor.enumerable=false] - boolean indicating if the property shows up when enumerating object properties\n* @param {boolean} [descriptor.writable=false] - boolean indicating if the value associated with the property can be changed with an assignment operator\n* @param {*} [descriptor.value] - property value\n* @param {(Function|void)} [descriptor.get=undefined] - function which serves as a getter for the property, or, if no getter, undefined. When the property is accessed, a getter function is called without arguments and with the `this` context set to the object through which the property is accessed (which may not be the object on which the property is defined due to inheritance). The return value will be used as the property value.\n* @param {(Function|void)} [descriptor.set=undefined] - function which serves as a setter for the property, or, if no setter, undefined. When assigning a property value, a setter function is called with one argument (the value being assigned to the property) and with the `this` context set to the object through which the property is assigned.\n* @throws {TypeError} first argument must be an object\n* @throws {TypeError} third argument must be an object\n* @throws {Error} property descriptor cannot have both a value and a setter and/or getter\n* @returns {Object} object with added property\n*\n* @example\n* var obj = {};\n*\n* defineProperty( obj, 'foo', {\n* 'value': 'bar'\n* });\n*\n* var str = obj.foo;\n* // returns 'bar'\n*/\nfunction defineProperty( obj, prop, descriptor ) {\n\tvar prototype;\n\tvar hasValue;\n\tvar hasGet;\n\tvar hasSet;\n\n\tif ( typeof obj !== 'object' || obj === null || toStr.call( obj ) === '[object Array]' ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be an object. Value: `%s`.', obj ) );\n\t}\n\tif ( typeof descriptor !== 'object' || descriptor === null || toStr.call( descriptor ) === '[object Array]' ) {\n\t\tthrow new TypeError( format( 'invalid argument. Property descriptor must be an object. Value: `%s`.', descriptor ) );\n\t}\n\thasValue = ( 'value' in descriptor );\n\tif ( hasValue ) {\n\t\tif (\n\t\t\tlookupGetter.call( obj, prop ) ||\n\t\t\tlookupSetter.call( obj, prop )\n\t\t) {\n\t\t\t// Override `__proto__` to avoid touching inherited accessors:\n\t\t\tprototype = obj.__proto__;\n\t\t\tobj.__proto__ = objectProtoype;\n\n\t\t\t// Delete property as existing getters/setters prevent assigning value to specified property:\n\t\t\tdelete obj[ prop ];\n\t\t\tobj[ prop ] = descriptor.value;\n\n\t\t\t// Restore original prototype:\n\t\t\tobj.__proto__ = prototype;\n\t\t} else {\n\t\t\tobj[ prop ] = descriptor.value;\n\t\t}\n\t}\n\thasGet = ( 'get' in descriptor );\n\thasSet = ( 'set' in descriptor );\n\n\tif ( hasValue && ( hasGet || hasSet ) ) {\n\t\tthrow new Error( 'invalid argument. Cannot specify one or more accessors and a value or writable attribute in the property descriptor.' );\n\t}\n\n\tif ( hasGet && defineGetter ) {\n\t\tdefineGetter.call( obj, prop, descriptor.get );\n\t}\n\tif ( hasSet && defineSetter ) {\n\t\tdefineSetter.call( obj, prop, descriptor.set );\n\t}\n\treturn obj;\n}\n\n\n// EXPORTS //\n\nexport default defineProperty;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Define (or modify) an object property.\n*\n* @module @stdlib/utils-define-property\n*\n* @example\n* import defineProperty from '@stdlib/utils-define-property';\n*\n* var obj = {};\n* defineProperty( obj, 'foo', {\n* 'value': 'bar',\n* 'writable': false,\n* 'configurable': false,\n* 'enumerable': false\n* });\n* obj.foo = 'boop'; // => throws\n*/\n\n// MODULES //\n\nimport hasDefinePropertySupport from './has_define_property_support.js';\nimport builtin from './builtin.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar defineProperty;\nif ( hasDefinePropertySupport() ) {\n\tdefineProperty = builtin;\n} else {\n\tdefineProperty = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default defineProperty;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport defineProperty from './define_property.js';\n\n\n// MAIN //\n\n/**\n* Tests for `Object.defineProperty` support.\n*\n* @private\n* @returns {boolean} boolean indicating if an environment has `Object.defineProperty` support\n*\n* @example\n* var bool = hasDefinePropertySupport();\n* // returns \n*/\nfunction hasDefinePropertySupport() {\n\t// Test basic support...\n\ttry {\n\t\tdefineProperty( {}, 'x', {} );\n\t\treturn true;\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\treturn false;\n\t}\n}\n\n\n// EXPORTS //\n\nexport default hasDefinePropertySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport defineProperty from '@stdlib/utils-define-property';\n\n\n// MAIN //\n\n/**\n* Defines a non-enumerable read-only property.\n*\n* @param {Object} obj - object on which to define the property\n* @param {(string|symbol)} prop - property name\n* @param {*} value - value to set\n*\n* @example\n* var obj = {};\n*\n* setNonEnumerableReadOnly( obj, 'foo', 'bar' );\n*\n* try {\n* obj.foo = 'boop';\n* } catch ( err ) {\n* console.error( err.message );\n* }\n*/\nfunction setNonEnumerableReadOnly( obj, prop, value ) {\n\tdefineProperty( obj, prop, {\n\t\t'configurable': false,\n\t\t'enumerable': false,\n\t\t'writable': false,\n\t\t'value': value\n\t});\n}\n\n\n// EXPORTS //\n\nexport default setNonEnumerableReadOnly;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Tests if a value is a number primitive.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number primitive\n*\n* @example\n* var bool = isNumber( 3.14 );\n* // returns true\n*\n* @example\n* var bool = isNumber( NaN );\n* // returns true\n*\n* @example\n* var bool = isNumber( new Number( 3.14 ) );\n* // returns false\n*/\nfunction isNumber( value ) {\n\treturn ( typeof value === 'number' );\n}\n\n\n// EXPORTS //\n\nexport default isNumber;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport hasSymbols from '@stdlib/assert-has-symbol-support';\n\n\n// VARIABLES //\n\nvar FLG = hasSymbols();\n\n\n// MAIN //\n\n/**\n* Tests for native `toStringTag` support.\n*\n* @returns {boolean} boolean indicating if an environment has `toStringTag` support\n*\n* @example\n* var bool = hasToStringTagSupport();\n* // returns \n*/\nfunction hasToStringTagSupport() {\n\treturn ( FLG && typeof Symbol.toStringTag === 'symbol' );\n}\n\n\n// EXPORTS //\n\nexport default hasToStringTagSupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Tests for native `Symbol` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Symbol` support\n*\n* @example\n* var bool = hasSymbolSupport();\n* // returns \n*/\nfunction hasSymbolSupport() {\n\treturn (\n\t\ttypeof Symbol === 'function' &&\n\t\ttypeof Symbol( 'foo' ) === 'symbol'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default hasSymbolSupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar toStr = Object.prototype.toString;\n\n\n// EXPORTS //\n\nexport default toStr;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// FUNCTIONS //\n\nvar has = Object.prototype.hasOwnProperty;\n\n\n// MAIN //\n\n/**\n* Tests if an object has a specified property.\n*\n* @param {*} value - value to test\n* @param {*} property - property to test\n* @returns {boolean} boolean indicating if an object has a specified property\n*\n* @example\n* var beep = {\n* 'boop': true\n* };\n*\n* var bool = hasOwnProp( beep, 'boop' );\n* // returns true\n*\n* @example\n* var beep = {\n* 'boop': true\n* };\n*\n* var bool = hasOwnProp( beep, 'bap' );\n* // returns false\n*/\nfunction hasOwnProp( value, property ) {\n\tif (\n\t\tvalue === void 0 ||\n\t\tvalue === null\n\t) {\n\t\treturn false;\n\t}\n\treturn has.call( value, property );\n}\n\n\n// EXPORTS //\n\nexport default hasOwnProp;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar Sym = ( typeof Symbol === 'function' ) ? Symbol : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default Sym;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport Symbol from '@stdlib/symbol-ctor';\n\n\n// MAIN //\n\nvar toStrTag = ( typeof Symbol === 'function' ) ? Symbol.toStringTag : '';\n\n\n// EXPORTS //\n\nexport default toStrTag;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Return a string value indicating a specification defined classification of an object.\n*\n* @module @stdlib/utils-native-class\n*\n* @example\n* import nativeClass from '@stdlib/utils-native-class';\n*\n* var str = nativeClass( 'a' );\n* // returns '[object String]'\n*\n* str = nativeClass( 5 );\n* // returns '[object Number]'\n*\n* function Beep() {\n* return this;\n* }\n* str = nativeClass( new Beep() );\n* // returns '[object Object]'\n*/\n\n// MODULES //\n\nimport hasToStringTag from '@stdlib/assert-has-tostringtag-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar main;\nif ( hasToStringTag() ) {\n\tmain = polyfill;\n} else {\n\tmain = builtin;\n}\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport hasOwnProp from '@stdlib/assert-has-own-property';\nimport toStringTag from './tostringtag.js';\nimport toStr from './tostring.js';\n\n\n// MAIN //\n\n/**\n* Returns a string value indicating a specification defined classification of an object in environments supporting `Symbol.toStringTag`.\n*\n* @param {*} v - input value\n* @returns {string} string value indicating a specification defined classification of the input value\n*\n* @example\n* var str = nativeClass( 'a' );\n* // returns '[object String]'\n*\n* @example\n* var str = nativeClass( 5 );\n* // returns '[object Number]'\n*\n* @example\n* function Beep() {\n* return this;\n* }\n* var str = nativeClass( new Beep() );\n* // returns '[object Object]'\n*/\nfunction nativeClass( v ) {\n\tvar isOwn;\n\tvar tag;\n\tvar out;\n\n\tif ( v === null || v === void 0 ) {\n\t\treturn toStr.call( v );\n\t}\n\ttag = v[ toStringTag ];\n\tisOwn = hasOwnProp( v, toStringTag );\n\n\t// Attempt to override the `toStringTag` property. For built-ins having a `Symbol.toStringTag` property (e.g., `JSON`, `Math`, etc), the `Symbol.toStringTag` property is read-only (e.g., , so we need to wrap in a `try/catch`.\n\ttry {\n\t\tv[ toStringTag ] = void 0;\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\treturn toStr.call( v );\n\t}\n\tout = toStr.call( v );\n\n\tif ( isOwn ) {\n\t\tv[ toStringTag ] = tag;\n\t} else {\n\t\tdelete v[ toStringTag ];\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default nativeClass;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport toStr from './tostring.js';\n\n\n// MAIN //\n\n/**\n* Returns a string value indicating a specification defined classification (via the internal property `[[Class]]`) of an object.\n*\n* @param {*} v - input value\n* @returns {string} string value indicating a specification defined classification of the input value\n*\n* @example\n* var str = nativeClass( 'a' );\n* // returns '[object String]'\n*\n* @example\n* var str = nativeClass( 5 );\n* // returns '[object Number]'\n*\n* @example\n* function Beep() {\n* return this;\n* }\n* var str = nativeClass( new Beep() );\n* // returns '[object Object]'\n*/\nfunction nativeClass( v ) {\n\treturn toStr.call( v );\n}\n\n\n// EXPORTS //\n\nexport default nativeClass;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// EXPORTS //\n\nexport default Number; // eslint-disable-line stdlib/require-globals\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport Number from '@stdlib/number-ctor';\n\n\n// MAIN //\n\n// eslint-disable-next-line stdlib/no-redeclare\nvar toString = Number.prototype.toString; // non-generic\n\n\n// EXPORTS //\n\nexport default toString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport hasToStringTag from '@stdlib/assert-has-tostringtag-support';\nimport nativeClass from '@stdlib/utils-native-class';\nimport Number from '@stdlib/number-ctor';\nimport test from './try2serialize.js';\n\n\n// VARIABLES //\n\nvar FLG = hasToStringTag();\n\n\n// MAIN //\n\n/**\n* Tests if a value is a number object.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number object\n*\n* @example\n* var bool = isNumber( 3.14 );\n* // returns false\n*\n* @example\n* var bool = isNumber( new Number( 3.14 ) );\n* // returns true\n*/\nfunction isNumber( value ) {\n\tif ( typeof value === 'object' ) {\n\t\tif ( value instanceof Number ) {\n\t\t\treturn true;\n\t\t}\n\t\tif ( FLG ) {\n\t\t\treturn test( value );\n\t\t}\n\t\treturn ( nativeClass( value ) === '[object Number]' );\n\t}\n\treturn false;\n}\n\n\n// EXPORTS //\n\nexport default isNumber;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport toString from './tostring.js'; // eslint-disable-line stdlib/no-redeclare\n\n\n// MAIN //\n\n/**\n* Attempts to serialize a value to a string.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value can be serialized\n*/\nfunction test( value ) {\n\ttry {\n\t\ttoString.call( value );\n\t\treturn true;\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\treturn false;\n\t}\n}\n\n\n// EXPORTS //\n\nexport default test;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a number.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a number\n*\n* @example\n* var bool = isNumber( 3.14 );\n* // returns true\n*\n* @example\n* var bool = isNumber( new Number( 3.14 ) );\n* // returns true\n*\n* @example\n* var bool = isNumber( NaN );\n* // returns true\n*\n* @example\n* var bool = isNumber( null );\n* // returns false\n*/\nfunction isNumber( value ) {\n\treturn ( isPrimitive( value ) || isObject( value ) );\n}\n\n\n// EXPORTS //\n\nexport default isNumber;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test if a value is a number.\n*\n* @module @stdlib/assert-is-number\n*\n* @example\n* import isNumber from '@stdlib/assert-is-number';\n*\n* var bool = isNumber( 3.14 );\n* // returns true\n*\n* bool = isNumber( new Number( 3.14 ) );\n* // returns true\n*\n* bool = isNumber( NaN );\n* // returns true\n*\n* bool = isNumber( null );\n* // returns false\n*\n* @example\n* import { isPrimitive as isNumber } from '@stdlib/assert-is-number';\n*\n* var bool = isNumber( 3.14 );\n* // returns true\n*\n* bool = isNumber( NaN );\n* // returns true\n*\n* bool = isNumber( new Number( 3.14 ) );\n* // returns false\n*\n* @example\n* import { isObject as isNumber } from '@stdlib/assert-is-number';\n*\n* var bool = isNumber( 3.14 );\n* // returns false\n*\n* bool = isNumber( new Number( 3.14 ) );\n* // returns true\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'isPrimitive', isPrimitive );\nsetReadOnly( main, 'isObject', isObject );\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Double-precision floating-point positive infinity.\n*\n* @module @stdlib/constants-float64-pinf\n* @type {number}\n*\n* @example\n* import FLOAT64_PINF from '@stdlib/constants-float64-pinf';\n* // returns Infinity\n*/\n\n\n// MAIN //\n\n/**\n* Double-precision floating-point positive infinity.\n*\n* ## Notes\n*\n* Double-precision floating-point positive infinity has the bit sequence\n*\n* ```binarystring\n* 0 11111111111 00000000000000000000 00000000000000000000000000000000\n* ```\n*\n* @constant\n* @type {number}\n* @default Number.POSITIVE_INFINITY\n* @see [IEEE 754]{@link https://en.wikipedia.org/wiki/IEEE_754-1985}\n*/\nvar FLOAT64_PINF = Number.POSITIVE_INFINITY; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default FLOAT64_PINF;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Double-precision floating-point negative infinity.\n*\n* @module @stdlib/constants-float64-ninf\n* @type {number}\n*\n* @example\n* import FLOAT64_NINF from '@stdlib/constants-float64-ninf';\n* // returns -Infinity\n*/\n\n// MODULES //\n\nimport Number from '@stdlib/number-ctor';\n\n\n// MAIN //\n\n/**\n* Double-precision floating-point negative infinity.\n*\n* ## Notes\n*\n* Double-precision floating-point negative infinity has the bit sequence\n*\n* ```binarystring\n* 1 11111111111 00000000000000000000 00000000000000000000000000000000\n* ```\n*\n* @constant\n* @type {number}\n* @default Number.NEGATIVE_INFINITY\n* @see [IEEE 754]{@link https://en.wikipedia.org/wiki/IEEE_754-1985}\n*/\nvar FLOAT64_NINF = Number.NEGATIVE_INFINITY;\n\n\n// EXPORTS //\n\nexport default FLOAT64_NINF;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: implementation (?)\n\n/**\n* Rounds a double-precision floating-point number toward negative infinity.\n*\n* @param {number} x - input value\n* @returns {number} rounded value\n*\n* @example\n* var v = floor( -4.2 );\n* // returns -5.0\n*\n* @example\n* var v = floor( 9.99999 );\n* // returns 9.0\n*\n* @example\n* var v = floor( 0.0 );\n* // returns 0.0\n*\n* @example\n* var v = floor( NaN );\n* // returns NaN\n*/\nvar floor = Math.floor; // eslint-disable-line stdlib/no-builtin-math\n\n\n// EXPORTS //\n\nexport default floor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport floor from '@stdlib/math-base-special-floor';\n\n\n// MAIN //\n\n/**\n* Tests if a finite double-precision floating-point number is an integer.\n*\n* @param {number} x - value to test\n* @returns {boolean} boolean indicating whether the value is an integer\n*\n* @example\n* var bool = isInteger( 1.0 );\n* // returns true\n*\n* @example\n* var bool = isInteger( 3.14 );\n* // returns false\n*/\nfunction isInteger( x ) {\n\treturn (floor(x) === x);\n}\n\n\n// EXPORTS //\n\nexport default isInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport PINF from '@stdlib/constants-float64-pinf';\nimport NINF from '@stdlib/constants-float64-ninf';\nimport isInt from '@stdlib/math-base-assert-is-integer';\n\n\n// MAIN //\n\n/**\n* Tests if a number primitive is an integer value.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a number primitive is an integer value\n*/\nfunction isInteger( value ) {\n\treturn (\n\t\tvalue < PINF &&\n\t\tvalue > NINF &&\n\t\tisInt( value )\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isNumber } from '@stdlib/assert-is-number';\nimport isInt from './integer.js';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a number primitive having an integer value.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number primitive having an integer value\n*\n* @example\n* var bool = isInteger( -3.0 );\n* // returns true\n*\n* @example\n* var bool = isInteger( new Number( -3.0 ) );\n* // returns false\n*/\nfunction isInteger( value ) {\n\treturn (\n\t\tisNumber( value ) &&\n\t\tisInt( value )\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isObject as isNumber } from '@stdlib/assert-is-number';\nimport isInt from './integer.js';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a number object having an integer value.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number object having an integer value\n*\n* @example\n* var bool = isInteger( 3.0 );\n* // returns false\n*\n* @example\n* var bool = isInteger( new Number( 3.0 ) );\n* // returns true\n*/\nfunction isInteger( value ) {\n\treturn (\n\t\tisNumber( value ) &&\n\t\tisInt( value.valueOf() )\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\n/**\n* Tests if a value is an integer.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an integer\n*\n* @example\n* var bool = isInteger( 5.0 );\n* // returns true\n*\n* @example\n* var bool = isInteger( new Number( 5.0 ) );\n* // returns true\n*\n* @example\n* var bool = isInteger( -3.14 );\n* // returns false\n*\n* @example\n* var bool = isInteger( null );\n* // returns false\n*/\nfunction isInteger( value ) {\n\treturn ( isPrimitive( value ) || isObject( value ) );\n}\n\n\n// EXPORTS //\n\nexport default isInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isInteger } from '@stdlib/assert-is-integer';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a number primitive having a nonnegative integer value.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number primitive having a nonnegative integer value\n*\n* @example\n* var bool = isNonNegativeInteger( 3.0 );\n* // returns true\n*\n* @example\n* var bool = isNonNegativeInteger( new Number( 3.0 ) );\n* // returns false\n*/\nfunction isNonNegativeInteger( value ) {\n\treturn (\n\t\tisInteger( value ) &&\n\t\tvalue >= 0\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isNonNegativeInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isObject as isInteger } from '@stdlib/assert-is-integer';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a number object having a nonnegative integer value.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number object having a nonnegative integer value\n*\n* @example\n* var bool = isNonNegativeInteger( 3.0 );\n* // returns false\n*\n* @example\n* var bool = isNonNegativeInteger( new Number( 3.0 ) );\n* // returns true\n*/\nfunction isNonNegativeInteger( value ) {\n\treturn (\n\t\tisInteger( value ) &&\n\t\tvalue.valueOf() >= 0\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isNonNegativeInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a nonnegative integer.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a nonnegative integer\n*\n* @example\n* var bool = isNonNegativeInteger( 5.0 );\n* // returns true\n*\n* @example\n* var bool = isNonNegativeInteger( new Number( 5.0 ) );\n* // returns true\n*\n* @example\n* var bool = isNonNegativeInteger( -5.0 );\n* // returns false\n*\n* @example\n* var bool = isNonNegativeInteger( 3.14 );\n* // returns false\n*\n* @example\n* var bool = isNonNegativeInteger( null );\n* // returns false\n*/\nfunction isNonNegativeInteger( value ) {\n\treturn ( isPrimitive( value ) || isObject( value ) );\n}\n\n\n// EXPORTS //\n\nexport default isNonNegativeInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test if a value is an integer.\n*\n* @module @stdlib/assert-is-integer\n*\n* @example\n* import isInteger from '@stdlib/assert-is-integer';\n*\n* var bool = isInteger( 5.0 );\n* // returns true\n*\n* bool = isInteger( new Number( 5.0 ) );\n* // returns true\n*\n* bool = isInteger( -3.14 );\n* // returns false\n*\n* bool = isInteger( null );\n* // returns false\n*\n* @example\n* // Use interface to check for integer primitives...\n* import { isPrimitive as isInteger } from '@stdlib/assert-is-integer';\n*\n* var bool = isInteger( -3.0 );\n* // returns true\n*\n* bool = isInteger( new Number( -3.0 ) );\n* // returns false\n*\n* @example\n* // Use interface to check for integer objects...\n* import { isObject as isInteger } from '@stdlib/assert-is-integer';\n*\n* var bool = isInteger( 3.0 );\n* // returns false\n*\n* bool = isInteger( new Number( 3.0 ) );\n* // returns true\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'isPrimitive', isPrimitive );\nsetReadOnly( main, 'isObject', isObject );\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test if a value is a nonnegative integer.\n*\n* @module @stdlib/assert-is-nonnegative-integer\n*\n* @example\n* import isNonNegativeInteger from '@stdlib/assert-is-nonnegative-integer';\n*\n* var bool = isNonNegativeInteger( 5.0 );\n* // returns true\n*\n* bool = isNonNegativeInteger( new Number( 5.0 ) );\n* // returns true\n*\n* bool = isNonNegativeInteger( -5.0 );\n* // returns false\n*\n* bool = isNonNegativeInteger( 3.14 );\n* // returns false\n*\n* bool = isNonNegativeInteger( null );\n* // returns false\n*\n* @example\n* import { isPrimitive as isNonNegativeInteger } from '@stdlib/assert-is-nonnegative-integer';\n*\n* var bool = isNonNegativeInteger( 3.0 );\n* // returns true\n*\n* bool = isNonNegativeInteger( new Number( 3.0 ) );\n* // returns false\n*\n* @example\n* import { isObject as isNonNegativeInteger } from '@stdlib/assert-is-nonnegative-integer';\n*\n* var bool = isNonNegativeInteger( 3.0 );\n* // returns false\n*\n* bool = isNonNegativeInteger( new Number( 3.0 ) );\n* // returns true\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'isPrimitive', isPrimitive );\nsetReadOnly( main, 'isObject', isObject );\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasFloat64Array = ( typeof Float64Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Float64Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a Float64Array\n*\n* @example\n* var bool = isFloat64Array( new Float64Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isFloat64Array( [] );\n* // returns false\n*/\nfunction isFloat64Array( value ) {\n\treturn (\n\t\t( hasFloat64Array && value instanceof Float64Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Float64Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isFloat64Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Float64Array === 'function' ) ? Float64Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Float64Array === 'function' ) ? Float64Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of double-precision floating-point numbers in the platform byte order.\n*\n* @module @stdlib/array-float64\n*\n* @example\n* import ctor from '@stdlib/array-float64';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasFloat64ArraySupport from '@stdlib/assert-has-float64array-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasFloat64ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isFloat64Array from '@stdlib/assert-is-float64array';\nimport GlobalFloat64Array from './float64array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Float64Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Float64Array` support\n*\n* @example\n* var bool = hasFloat64ArraySupport();\n* // returns \n*/\nfunction hasFloat64ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalFloat64Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = new GlobalFloat64Array( [ 1.0, 3.14, -3.14, NaN ] );\n\t\tbool = (\n\t\t\tisFloat64Array( arr ) &&\n\t\t\tarr[ 0 ] === 1.0 &&\n\t\t\tarr[ 1 ] === 3.14 &&\n\t\t\tarr[ 2 ] === -3.14 &&\n\t\t\tarr[ 3 ] !== arr[ 3 ]\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasFloat64ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of double-precision floating-point numbers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasFloat32Array = ( typeof Float32Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Float32Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a Float32Array\n*\n* @example\n* var bool = isFloat32Array( new Float32Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isFloat32Array( [] );\n* // returns false\n*/\nfunction isFloat32Array( value ) {\n\treturn (\n\t\t( hasFloat32Array && value instanceof Float32Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Float32Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isFloat32Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Float32Array === 'function' ) ? Float32Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Float32Array === 'function' ) ? Float32Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of single-precision floating-point numbers in the platform byte order.\n*\n* @module @stdlib/array-float32\n*\n* @example\n* import ctor from '@stdlib/array-float32';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasFloat32ArraySupport from '@stdlib/assert-has-float32array-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasFloat32ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isFloat32Array from '@stdlib/assert-is-float32array';\nimport PINF from '@stdlib/constants-float64-pinf';\nimport GlobalFloat32Array from './float32array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Float32Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Float32Array` support\n*\n* @example\n* var bool = hasFloat32ArraySupport();\n* // returns \n*/\nfunction hasFloat32ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalFloat32Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = new GlobalFloat32Array( [ 1.0, 3.14, -3.14, 5.0e40 ] );\n\t\tbool = (\n\t\t\tisFloat32Array( arr ) &&\n\t\t\tarr[ 0 ] === 1.0 &&\n\t\t\tarr[ 1 ] === 3.140000104904175 &&\n\t\t\tarr[ 2 ] === -3.140000104904175 &&\n\t\t\tarr[ 3 ] === PINF\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasFloat32ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of single-precision floating-point numbers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasInt16Array = ( typeof Int16Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is an Int16Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an Int16Array\n*\n* @example\n* var bool = isInt16Array( new Int16Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isInt16Array( [] );\n* // returns false\n*/\nfunction isInt16Array( value ) {\n\treturn (\n\t\t( hasInt16Array && value instanceof Int16Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Int16Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isInt16Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum signed 16-bit integer.\n*\n* @module @stdlib/constants-int16-max\n* @type {integer32}\n*\n* @example\n* import INT16_MAX from '@stdlib/constants-int16-max';\n* // returns 32767\n*/\n\n\n// MAIN //\n\n/**\n* Maximum signed 16-bit integer.\n*\n* ## Notes\n*\n* The number has the value\n*\n* ```tex\n* 2^{15} - 1\n* ```\n*\n* which corresponds to the bit sequence\n*\n* ```binarystring\n* 0111111111111111\n* ```\n*\n* @constant\n* @type {integer32}\n* @default 32767\n*/\nvar INT16_MAX = 32767|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default INT16_MAX;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Int16Array === 'function' ) ? Int16Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Int16Array === 'function' ) ? Int16Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of twos-complement 16-bit signed integers in the platform byte order.\n*\n* @module @stdlib/array-int16\n*\n* @example\n* import ctor from '@stdlib/array-int16';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasInt16ArraySupport from '@stdlib/assert-has-int16array-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasInt16ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isInt16Array from '@stdlib/assert-is-int16array';\nimport INT16_MAX from '@stdlib/constants-int16-max';\nimport INT16_MIN from '@stdlib/constants-int16-min';\nimport GlobalInt16Array from './int16array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Int16Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Int16Array` support\n*\n* @example\n* var bool = hasInt16ArraySupport();\n* // returns \n*/\nfunction hasInt16ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalInt16Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = new GlobalInt16Array( [ 1, 3.14, -3.14, INT16_MAX+1 ] );\n\t\tbool = (\n\t\t\tisInt16Array( arr ) &&\n\t\t\tarr[ 0 ] === 1 &&\n\t\t\tarr[ 1 ] === 3 && // truncation\n\t\t\tarr[ 2 ] === -3 && // truncation\n\t\t\tarr[ 3 ] === INT16_MIN // wrap around\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasInt16ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Minimum signed 16-bit integer.\n*\n* @module @stdlib/constants-int16-min\n* @type {integer32}\n*\n* @example\n* import INT16_MIN from '@stdlib/constants-int16-min';\n* // returns -32768\n*/\n\n\n// MAIN //\n\n/**\n* Minimum signed 16-bit integer.\n*\n* ## Notes\n*\n* The number has the value\n*\n* ```tex\n* -(2^{15})\n* ```\n*\n* which corresponds to the two's complement bit sequence\n*\n* ```binarystring\n* 1000000000000000\n* ```\n*\n* @constant\n* @type {integer32}\n* @default -32768\n*/\nvar INT16_MIN = -32768|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default INT16_MIN;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of twos-complement 16-bit signed integers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasInt32Array = ( typeof Int32Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is an Int32Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an Int32Array\n*\n* @example\n* var bool = isInt32Array( new Int32Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isInt32Array( [] );\n* // returns false\n*/\nfunction isInt32Array( value ) {\n\treturn (\n\t\t( hasInt32Array && value instanceof Int32Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Int32Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isInt32Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum signed 32-bit integer.\n*\n* @module @stdlib/constants-int32-max\n* @type {integer32}\n*\n* @example\n* import INT32_MAX from '@stdlib/constants-int32-max';\n* // returns 2147483647\n*/\n\n\n// MAIN //\n\n/**\n* Maximum signed 32-bit integer.\n*\n* ## Notes\n*\n* The number has the value\n*\n* ```tex\n* 2^{31} - 1\n* ```\n*\n* which corresponds to the bit sequence\n*\n* ```binarystring\n* 01111111111111111111111111111111\n* ```\n*\n* @constant\n* @type {integer32}\n* @default 2147483647\n*/\nvar INT32_MAX = 2147483647|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default INT32_MAX;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Int32Array === 'function' ) ? Int32Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Int32Array === 'function' ) ? Int32Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of twos-complement 32-bit signed integers in the platform byte order.\n*\n* @module @stdlib/array-int32\n*\n* @example\n* import ctor from '@stdlib/array-int32';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasInt32ArraySupport from '@stdlib/assert-has-int32array-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasInt32ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isInt32Array from '@stdlib/assert-is-int32array';\nimport INT32_MAX from '@stdlib/constants-int32-max';\nimport INT32_MIN from '@stdlib/constants-int32-min';\nimport GlobalInt32Array from './int32array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Int32Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Int32Array` support\n*\n* @example\n* var bool = hasInt32ArraySupport();\n* // returns \n*/\nfunction hasInt32ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalInt32Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = new GlobalInt32Array( [ 1, 3.14, -3.14, INT32_MAX+1 ] );\n\t\tbool = (\n\t\t\tisInt32Array( arr ) &&\n\t\t\tarr[ 0 ] === 1 &&\n\t\t\tarr[ 1 ] === 3 && // truncation\n\t\t\tarr[ 2 ] === -3 && // truncation\n\t\t\tarr[ 3 ] === INT32_MIN // wrap around\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasInt32ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Minimum signed 32-bit integer.\n*\n* @module @stdlib/constants-int32-min\n* @type {integer32}\n*\n* @example\n* import INT32_MIN from '@stdlib/constants-int32-min';\n* // returns -2147483648\n*/\n\n\n// MAIN //\n\n/**\n* Minimum signed 32-bit integer.\n*\n* ## Notes\n*\n* The number has the value\n*\n* ```tex\n* -(2^{31})\n* ```\n*\n* which corresponds to the two's complement bit sequence\n*\n* ```binarystring\n* 10000000000000000000000000000000\n* ```\n*\n* @constant\n* @type {integer32}\n* @default -2147483648\n*/\nvar INT32_MIN = -2147483648|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default INT32_MIN;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of twos-complement 32-bit signed integers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasInt8Array = ( typeof Int8Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is an Int8Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an Int8Array\n*\n* @example\n* var bool = isInt8Array( new Int8Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isInt8Array( [] );\n* // returns false\n*/\nfunction isInt8Array( value ) {\n\treturn (\n\t\t( hasInt8Array && value instanceof Int8Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Int8Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isInt8Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum signed 8-bit integer.\n*\n* @module @stdlib/constants-int8-max\n* @type {integer32}\n*\n* @example\n* import INT8_MAX from '@stdlib/constants-int8-max';\n* // returns 127\n*/\n\n\n// MAIN //\n\n/**\n* Maximum signed 8-bit integer.\n*\n* ## Notes\n*\n* The number is given by\n*\n* ```tex\n* 2^{7} - 1\n* ```\n*\n* which corresponds to the bit sequence\n*\n* ```binarystring\n* 01111111\n* ```\n*\n* @constant\n* @type {integer32}\n* @default 127\n*/\nvar INT8_MAX = 127|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default INT8_MAX;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Int8Array === 'function' ) ? Int8Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Int8Array === 'function' ) ? Int8Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of twos-complement 8-bit signed integers in the platform byte order.\n*\n* @module @stdlib/array-int8\n*\n* @example\n* import ctor from '@stdlib/array-int8';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasInt8ArraySupport from '@stdlib/assert-has-int8array-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasInt8ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isInt8Array from '@stdlib/assert-is-int8array';\nimport INT8_MAX from '@stdlib/constants-int8-max';\nimport INT8_MIN from '@stdlib/constants-int8-min';\nimport GlobalInt8Array from './int8array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Int8Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Int8Array` support\n*\n* @example\n* var bool = hasInt8ArraySupport();\n* // returns \n*/\nfunction hasInt8ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalInt8Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = new GlobalInt8Array( [ 1, 3.14, -3.14, INT8_MAX+1 ] );\n\t\tbool = (\n\t\t\tisInt8Array( arr ) &&\n\t\t\tarr[ 0 ] === 1 &&\n\t\t\tarr[ 1 ] === 3 && // truncation\n\t\t\tarr[ 2 ] === -3 && // truncation\n\t\t\tarr[ 3 ] === INT8_MIN // wrap around\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasInt8ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Minimum signed 8-bit integer.\n*\n* @module @stdlib/constants-int8-min\n* @type {integer32}\n*\n* @example\n* import INT8_MIN from '@stdlib/constants-int8-min';\n* // returns -128\n*/\n\n\n// MAIN //\n\n/**\n* Minimum signed 8-bit integer.\n*\n* ## Notes\n*\n* The number is given by\n*\n* ```tex\n* -(2^{7})\n* ```\n*\n* which corresponds to the two's complement bit sequence\n*\n* ```binarystring\n* 10000000\n* ```\n*\n* @constant\n* @type {integer32}\n* @default -128\n*/\nvar INT8_MIN = -128|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default INT8_MIN;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of twos-complement 8-bit signed integers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasUint16Array = ( typeof Uint16Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Uint16Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a Uint16Array\n*\n* @example\n* var bool = isUint16Array( new Uint16Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isUint16Array( [] );\n* // returns false\n*/\nfunction isUint16Array( value ) {\n\treturn (\n\t\t( hasUint16Array && value instanceof Uint16Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Uint16Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isUint16Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum unsigned 16-bit integer.\n*\n* @module @stdlib/constants-uint16-max\n* @type {integer32}\n*\n* @example\n* import UINT16_MAX from '@stdlib/constants-uint16-max';\n* // returns 65535\n*/\n\n\n// MAIN //\n\n/**\n* Maximum unsigned 16-bit integer.\n*\n* ## Notes\n*\n* The number has the value\n*\n* ```tex\n* 2^{16} - 1\n* ```\n*\n* which corresponds to the bit sequence\n*\n* ```binarystring\n* 1111111111111111\n* ```\n*\n* @constant\n* @type {integer32}\n* @default 65535\n*/\nvar UINT16_MAX = 65535|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default UINT16_MAX;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Uint16Array === 'function' ) ? Uint16Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Uint16Array === 'function' ) ? Uint16Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of 16-bit unsigned integers in the platform byte order.\n*\n* @module @stdlib/array-uint16\n*\n* @example\n* import ctor from '@stdlib/array-uint16';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasUint16ArraySupport from '@stdlib/assert-has-uint16array-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasUint16ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isUint16Array from '@stdlib/assert-is-uint16array';\nimport UINT16_MAX from '@stdlib/constants-uint16-max';\nimport GlobalUint16Array from './uint16array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Uint16Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Uint16Array` support\n*\n* @example\n* var bool = hasUint16ArraySupport();\n* // returns \n*/\nfunction hasUint16ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalUint16Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = [ 1, 3.14, -3.14, UINT16_MAX+1, UINT16_MAX+2 ];\n\t\tarr = new GlobalUint16Array( arr );\n\t\tbool = (\n\t\t\tisUint16Array( arr ) &&\n\t\t\tarr[ 0 ] === 1 &&\n\t\t\tarr[ 1 ] === 3 && // truncation\n\t\t\tarr[ 2 ] === UINT16_MAX-2 && // truncation and wrap around\n\t\t\tarr[ 3 ] === 0 && // wrap around\n\t\t\tarr[ 4 ] === 1 // wrap around\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasUint16ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of 16-bit unsigned integers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasUint32Array = ( typeof Uint32Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Uint32Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a Uint32Array\n*\n* @example\n* var bool = isUint32Array( new Uint32Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isUint32Array( [] );\n* // returns false\n*/\nfunction isUint32Array( value ) {\n\treturn (\n\t\t( hasUint32Array && value instanceof Uint32Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Uint32Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isUint32Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum unsigned 32-bit integer.\n*\n* @module @stdlib/constants-uint32-max\n* @type {uinteger32}\n*\n* @example\n* import UINT32_MAX from '@stdlib/constants-uint32-max';\n* // returns 4294967295\n*/\n\n\n// MAIN //\n\n/**\n* Maximum unsigned 32-bit integer.\n*\n* ## Notes\n*\n* The number has the value\n*\n* ```tex\n* 2^{32} - 1\n* ```\n*\n* which corresponds to the bit sequence\n*\n* ```binarystring\n* 11111111111111111111111111111111\n* ```\n*\n* @constant\n* @type {uinteger32}\n* @default 4294967295\n*/\nvar UINT32_MAX = 4294967295;\n\n\n// EXPORTS //\n\nexport default UINT32_MAX;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Uint32Array === 'function' ) ? Uint32Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Uint32Array === 'function' ) ? Uint32Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of 32-bit unsigned integers in the platform byte order.\n*\n* @module @stdlib/array-uint32\n*\n* @example\n* import ctor from '@stdlib/array-uint32';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasUint32ArraySupport from '@stdlib/assert-has-uint32array-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasUint32ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isUint32Array from '@stdlib/assert-is-uint32array';\nimport UINT32_MAX from '@stdlib/constants-uint32-max';\nimport GlobalUint32Array from './uint32array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Uint32Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Uint32Array` support\n*\n* @example\n* var bool = hasUint32ArraySupport();\n* // returns \n*/\nfunction hasUint32ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalUint32Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = [ 1, 3.14, -3.14, UINT32_MAX+1, UINT32_MAX+2 ];\n\t\tarr = new GlobalUint32Array( arr );\n\t\tbool = (\n\t\t\tisUint32Array( arr ) &&\n\t\t\tarr[ 0 ] === 1 &&\n\t\t\tarr[ 1 ] === 3 && // truncation\n\t\t\tarr[ 2 ] === UINT32_MAX-2 && // truncation and wrap around\n\t\t\tarr[ 3 ] === 0 && // wrap around\n\t\t\tarr[ 4 ] === 1 // wrap around\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasUint32ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of 32-bit unsigned integers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasUint8Array = ( typeof Uint8Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Uint8Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a Uint8Array\n*\n* @example\n* var bool = isUint8Array( new Uint8Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isUint8Array( [] );\n* // returns false\n*/\nfunction isUint8Array( value ) {\n\treturn (\n\t\t( hasUint8Array && value instanceof Uint8Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Uint8Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isUint8Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum unsigned 8-bit integer.\n*\n* @module @stdlib/constants-uint8-max\n* @type {integer32}\n*\n* @example\n* import UINT8_MAX from '@stdlib/constants-uint8-max';\n* // returns 255\n*/\n\n\n// MAIN //\n\n/**\n* Maximum unsigned 8-bit integer.\n*\n* ## Notes\n*\n* The number has the value\n*\n* ```tex\n* 2^{8} - 1\n* ```\n*\n* which corresponds to the bit sequence\n*\n* ```binarystring\n* 11111111\n* ```\n*\n* @constant\n* @type {integer32}\n* @default 255\n*/\nvar UINT8_MAX = 255|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default UINT8_MAX;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Uint8Array === 'function' ) ? Uint8Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Uint8Array === 'function' ) ? Uint8Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of 8-bit unsigned integers in the platform byte order.\n*\n* @module @stdlib/array-uint8\n*\n* @example\n* import ctor from '@stdlib/array-uint8';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasUint8ArraySupport from '@stdlib/assert-has-uint8array-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasUint8ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isUint8Array from '@stdlib/assert-is-uint8array';\nimport UINT8_MAX from '@stdlib/constants-uint8-max';\nimport GlobalUint8Array from './uint8array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Uint8Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Uint8Array` support\n*\n* @example\n* var bool = hasUint8ArraySupport();\n* // returns \n*/\nfunction hasUint8ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalUint8Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = [ 1, 3.14, -3.14, UINT8_MAX+1, UINT8_MAX+2 ];\n\t\tarr = new GlobalUint8Array( arr );\n\t\tbool = (\n\t\t\tisUint8Array( arr ) &&\n\t\t\tarr[ 0 ] === 1 &&\n\t\t\tarr[ 1 ] === 3 && // truncation\n\t\t\tarr[ 2 ] === UINT8_MAX-2 && // truncation and wrap around\n\t\t\tarr[ 3 ] === 0 && // wrap around\n\t\t\tarr[ 4 ] === 1 // wrap around\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasUint8ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of 8-bit unsigned integers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasUint8ClampedArray = ( typeof Uint8ClampedArray === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Uint8ClampedArray.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a Uint8ClampedArray\n*\n* @example\n* var bool = isUint8ClampedArray( new Uint8ClampedArray( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isUint8ClampedArray( [] );\n* // returns false\n*/\nfunction isUint8ClampedArray( value ) {\n\treturn (\n\t\t( hasUint8ClampedArray && value instanceof Uint8ClampedArray ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Uint8ClampedArray]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isUint8ClampedArray;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Uint8ClampedArray === 'function' ) ? Uint8ClampedArray : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Uint8ClampedArray === 'function' ) ? Uint8ClampedArray : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of 8-bit unsigned integers in the platform byte order clamped to 0-255.\n*\n* @module @stdlib/array-uint8c\n*\n* @example\n* import ctor from '@stdlib/array-uint8c';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasUint8ClampedArraySupport from '@stdlib/assert-has-uint8clampedarray-support'; // eslint-disable-line id-length\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasUint8ClampedArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isUint8ClampedArray from '@stdlib/assert-is-uint8clampedarray';\nimport GlobalUint8ClampedArray from './uint8clampedarray.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Uint8ClampedArray` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Uint8ClampedArray` support\n*\n* @example\n* var bool = hasUint8ClampedArraySupport();\n* // returns \n*/\nfunction hasUint8ClampedArraySupport() { // eslint-disable-line id-length\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalUint8ClampedArray !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = new GlobalUint8ClampedArray( [ -1, 0, 1, 3.14, 4.99, 255, 256 ] );\n\t\tbool = (\n\t\t\tisUint8ClampedArray( arr ) &&\n\t\t\tarr[ 0 ] === 0 && // clamped\n\t\t\tarr[ 1 ] === 0 &&\n\t\t\tarr[ 2 ] === 1 &&\n\t\t\tarr[ 3 ] === 3 && // round to nearest\n\t\t\tarr[ 4 ] === 5 && // round to nearest\n\t\t\tarr[ 5 ] === 255 &&\n\t\t\tarr[ 6 ] === 255 // clamped\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasUint8ClampedArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of 8-bit unsigned integers in the platform byte order clamped to 0-255.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isInteger from '@stdlib/math-base-assert-is-integer';\nimport MAX_LENGTH from '@stdlib/constants-array-max-array-length';\n\n\n// MAIN //\n\n/**\n* Tests if a value is an array-like object.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is an array-like object\n*\n* @example\n* var bool = isArrayLikeObject( [] );\n* // returns true\n*\n* @example\n* var bool = isArrayLikeObject( { 'length':10 } );\n* // returns true\n*\n* @example\n* var bool = isArrayLikeObject( 'beep' );\n* // returns false\n*/\nfunction isArrayLikeObject( value ) {\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\ttypeof value.length === 'number' &&\n\t\tisInteger( value.length ) &&\n\t\tvalue.length >= 0 &&\n\t\tvalue.length <= MAX_LENGTH\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isArrayLikeObject;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum length of a generic array.\n*\n* @module @stdlib/constants-array-max-array-length\n*\n* @example\n* import MAX_ARRAY_LENGTH from '@stdlib/constants-array-max-array-length';\n* // returns 4294967295\n*/\n\n// MAIN //\n\n/**\n* Maximum length of a generic array.\n*\n* ```tex\n* 2^{32} - 1\n* ```\n*\n* @constant\n* @type {uinteger32}\n* @default 4294967295\n*/\nvar MAX_ARRAY_LENGTH = 4294967295>>>0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default MAX_ARRAY_LENGTH;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isInteger from '@stdlib/math-base-assert-is-integer';\nimport MAX_LENGTH from '@stdlib/constants-array-max-typed-array-length';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a collection.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether a value is a collection\n*\n* @example\n* var bool = isCollection( [] );\n* // returns true\n*\n* @example\n* var bool = isCollection( {} );\n* // returns false\n*/\nfunction isCollection( value ) {\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\ttypeof value.length === 'number' &&\n\t\tisInteger( value.length ) &&\n\t\tvalue.length >= 0 &&\n\t\tvalue.length <= MAX_LENGTH\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isCollection;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum length of a typed array.\n*\n* @module @stdlib/constants-array-max-typed-array-length\n*\n* @example\n* import MAX_TYPED_ARRAY_LENGTH from '@stdlib/constants-array-max-typed-array-length';\n* // returns 9007199254740991\n*/\n\n// MAIN //\n\n/**\n* Maximum length of a typed array.\n*\n* ```tex\n* 2^{53} - 1\n* ```\n*\n* @constant\n* @type {number}\n* @default 9007199254740991\n*/\nvar MAX_TYPED_ARRAY_LENGTH = 9007199254740991;\n\n\n// EXPORTS //\n\nexport default MAX_TYPED_ARRAY_LENGTH;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasArrayBuffer = ( typeof ArrayBuffer === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is an ArrayBuffer.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an ArrayBuffer\n*\n* @example\n* import ArrayBuffer from '@stdlib/array-buffer';\n*\n* var bool = isArrayBuffer( new ArrayBuffer( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isArrayBuffer( [] );\n* // returns false\n*/\nfunction isArrayBuffer( value ) {\n\treturn (\n\t\t( hasArrayBuffer && value instanceof ArrayBuffer ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object ArrayBuffer]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isArrayBuffer;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar f;\n\n\n// FUNCTIONS //\n\n/**\n* Tests if a value is an array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an array\n*\n* @example\n* var bool = isArray( [] );\n* // returns true\n*\n* @example\n* var bool = isArray( {} );\n* // returns false\n*/\nfunction isArray( value ) {\n\treturn ( nativeClass( value ) === '[object Array]' );\n}\n\n\n// MAIN //\n\nif ( Array.isArray ) {\n\tf = Array.isArray;\n} else {\n\tf = isArray;\n}\n\n\n// EXPORTS //\n\nexport default f;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isArray from '@stdlib/assert-is-array';\n\n\n// MAIN //\n\n/**\n* Tests if a value is an object; e.g., `{}`.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an object\n*\n* @example\n* var bool = isObject( {} );\n* // returns true\n*\n* @example\n* var bool = isObject( null );\n* // returns false\n*/\nfunction isObject( value ) {\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\t!isArray( value )\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isObject;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\nvar RE = /./;\n\n\n// EXPORTS //\n\nexport default RE;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Tests if a value is a boolean primitive.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a boolean primitive\n*\n* @example\n* var bool = isBoolean( true );\n* // returns true\n*\n* @example\n* var bool = isBoolean( false );\n* // returns true\n*\n* @example\n* import Boolean from '@stdlib/boolean-ctor';\n*\n* var bool = isBoolean( new Boolean( true ) );\n* // returns false\n*/\nfunction isBoolean( value ) {\n\treturn ( typeof value === 'boolean' );\n}\n\n\n// EXPORTS //\n\nexport default isBoolean;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Returns a boolean.\n*\n* @name Boolean\n* @constructor\n* @type {Function}\n* @param {*} value - input value\n* @returns {(boolean|Boolean)} boolean\n*\n* @example\n* var b = Boolean( null );\n* // returns false\n*\n* b = Boolean( [] );\n* // returns true\n*\n* b = Boolean( {} );\n* // returns true\n*\n* @example\n* var b = new Boolean( false );\n* // returns \n*/\nvar Bool = Boolean; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default Bool;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// eslint-disable-next-line stdlib/no-redeclare\nvar toString = Boolean.prototype.toString; // non-generic\n\n\n// EXPORTS //\n\nexport default toString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport hasToStringTag from '@stdlib/assert-has-tostringtag-support';\nimport nativeClass from '@stdlib/utils-native-class';\nimport Boolean from '@stdlib/boolean-ctor';\nimport test from './try2serialize.js';\n\n\n// VARIABLES //\n\nvar FLG = hasToStringTag();\n\n\n// MAIN //\n\n/**\n* Tests if a value is a boolean object.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a boolean object\n*\n* @example\n* var bool = isBoolean( true );\n* // returns false\n*\n* @example\n* import Boolean from '@stdlib/boolean-ctor';\n*\n* var bool = isBoolean( new Boolean( false ) );\n* // returns true\n*/\nfunction isBoolean( value ) {\n\tif ( typeof value === 'object' ) {\n\t\tif ( value instanceof Boolean ) {\n\t\t\treturn true;\n\t\t}\n\t\tif ( FLG ) {\n\t\t\treturn test( value );\n\t\t}\n\t\treturn ( nativeClass( value ) === '[object Boolean]' );\n\t}\n\treturn false;\n}\n\n\n// EXPORTS //\n\nexport default isBoolean;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport toString from './tostring.js'; // eslint-disable-line stdlib/no-redeclare\n\n\n// MAIN //\n\n/**\n* Attempts to serialize a value to a string.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value can be serialized\n*/\nfunction test( value ) {\n\ttry {\n\t\ttoString.call( value );\n\t\treturn true;\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\treturn false;\n\t}\n}\n\n\n// EXPORTS //\n\nexport default test;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a boolean.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a boolean\n*\n* @example\n* var bool = isBoolean( false );\n* // returns true\n*\n* @example\n* var bool = isBoolean( true );\n* // returns true\n*\n* @example\n* import Boolean from '@stdlib/boolean-ctor';\n*\n* var bool = isBoolean( new Boolean( false ) );\n* // returns true\n*\n* @example\n* import Boolean from '@stdlib/boolean-ctor';\n*\n* var bool = isBoolean( new Boolean( true ) );\n* // returns true\n*/\nfunction isBoolean( value ) {\n\treturn ( isPrimitive( value ) || isObject( value ) );\n}\n\n\n// EXPORTS //\n\nexport default isBoolean;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Returns the global object using code generation.\n*\n* @private\n* @returns {Object} global object\n*/\nfunction getGlobal() {\n\treturn new Function( 'return this;' )(); // eslint-disable-line no-new-func, stdlib/require-globals\n}\n\n\n// EXPORTS //\n\nexport default getGlobal;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test if a value is a boolean.\n*\n* @module @stdlib/assert-is-boolean\n*\n* @example\n* import Boolean from '@stdlib/boolean-ctor';\n* import isBoolean from '@stdlib/assert-is-boolean';\n*\n* var bool = isBoolean( false );\n* // returns true\n*\n* bool = isBoolean( new Boolean( false ) );\n* // returns true\n*\n* @example\n* import Boolean from '@stdlib/boolean-ctor';\n* import { isPrimitive as isBoolean } from '@stdlib/assert-is-boolean';\n*\n* var bool = isBoolean( false );\n* // returns true\n*\n* bool = isBoolean( new Boolean( true ) );\n* // returns false\n*\n* @example\n* import Boolean from '@stdlib/boolean-ctor';\n* import { isObject as isBoolean } from '@stdlib/assert-is-boolean';\n*\n* var bool = isBoolean( true );\n* // returns false\n*\n* bool = isBoolean( new Boolean( false ) );\n* // returns true\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'isPrimitive', isPrimitive );\nsetReadOnly( main, 'isObject', isObject );\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar obj = ( typeof self === 'object' ) ? self : null;\n\n\n// EXPORTS //\n\nexport default obj;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar obj = ( typeof window === 'object' ) ? window : null;\n\n\n// EXPORTS //\n\nexport default obj;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar obj = ( typeof global === 'object' ) ? global : null;\n\n\n// EXPORTS //\n\nexport default obj;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar obj = ( typeof globalThis === 'object' ) ? globalThis : null; // eslint-disable-line no-undef\n\n\n// EXPORTS //\n\nexport default obj;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport getGlobal from '@stdlib/utils-global';\n\n\n// MAIN //\n\nvar root = getGlobal();\nvar nodeList = root.document && root.document.childNodes;\n\n\n// EXPORTS //\n\nexport default nodeList;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isBoolean } from '@stdlib/assert-is-boolean';\nimport format from '@stdlib/string-format';\nimport getThis from './codegen.js';\nimport Self from './self.js';\nimport Win from './window.js';\nimport Global from './global.js';\nimport GlobalThis from './global_this.js';\n\n\n// MAIN //\n\n/**\n* Returns the global object.\n*\n* ## Notes\n*\n* - Using code generation is the **most** reliable way to resolve the global object; however, doing so is likely to violate content security policies (CSPs) in, e.g., Chrome Apps and elsewhere.\n*\n* @param {boolean} [codegen=false] - boolean indicating whether to use code generation to resolve the global object\n* @throws {TypeError} must provide a boolean\n* @throws {Error} unable to resolve global object\n* @returns {Object} global object\n*\n* @example\n* var g = getGlobal();\n* // returns {...}\n*/\nfunction getGlobal( codegen ) {\n\tif ( arguments.length ) {\n\t\tif ( !isBoolean( codegen ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Must provide a boolean. Value: `%s`.', codegen ) );\n\t\t}\n\t\tif ( codegen ) {\n\t\t\treturn getThis();\n\t\t}\n\t\t// Fall through...\n\t}\n\t// Case: 2020 revision of ECMAScript standard\n\tif ( GlobalThis ) {\n\t\treturn GlobalThis;\n\t}\n\t// Case: browsers and web workers\n\tif ( Self ) {\n\t\treturn Self;\n\t}\n\t// Case: browsers\n\tif ( Win ) {\n\t\treturn Win;\n\t}\n\t// Case: Node.js\n\tif ( Global ) {\n\t\treturn Global;\n\t}\n\t// Case: unknown\n\tthrow new Error( 'unexpected error. Unable to resolve global object.' );\n}\n\n\n// EXPORTS //\n\nexport default getGlobal;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\nvar typedarray = Int8Array; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default typedarray;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Returns a regular expression to capture everything that is not a space immediately after the `function` keyword and before the first left parenthesis.\n*\n* @returns {RegExp} regular expression\n*\n* @example\n* var RE_FUNCTION_NAME = reFunctionName();\n*\n* function fname( fcn ) {\n* return RE_FUNCTION_NAME.exec( fcn.toString() )[ 1 ];\n* }\n*\n* var fn = fname( Math.sqrt );\n* // returns 'sqrt'\n*\n* fn = fname( Int8Array );\n* // returns 'Int8Array'\n*\n* fn = fname( Object.prototype.toString );\n* // returns 'toString'\n*\n* fn = fname( function(){} );\n* // returns ''\n*/\nfunction reFunctionName() {\n\treturn /^\\s*function\\s*([^(]*)/i;\n}\n\n\n// EXPORTS //\n\nexport default reFunctionName;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport reFunctionName from './main.js';\n\n\n// MAIN //\n\n/**\n* Captures everything that is not a space immediately after the `function` keyword and before the first left parenthesis.\n*\n* Regular expression: `/^\\s*function\\s*([^(]*)/i`\n*\n* - `/^\\s*`\n* - Match zero or more spaces at beginning\n*\n* - `function`\n* - Match the word `function`\n*\n* - `\\s*`\n* - Match zero or more spaces after the word `function`\n*\n* - `()`\n* - Capture\n*\n* - `[^(]*`\n* - Match anything except a left parenthesis `(` zero or more times\n*\n* - `/i`\n* - ignore case\n*\n* @constant\n* @type {RegExp}\n* @default /^\\s*function\\s*([^(]*)/i\n*/\nvar RE_FUNCTION_NAME = reFunctionName();\n\n\n// EXPORTS //\n\nexport default RE_FUNCTION_NAME;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Tests if a value is object-like.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether a value is object-like\n*\n* @example\n* var bool = isObjectLike( {} );\n* // returns true\n*\n* @example\n* var bool = isObjectLike( [] );\n* // returns true\n*\n* @example\n* var bool = isObjectLike( null );\n* // returns false\n*/\nfunction isObjectLike( value ) {\n\treturn (\n\t\tvalue !== null &&\n\t\ttypeof value === 'object'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isObjectLike;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\nimport { REGEXP as RE } from '@stdlib/regexp-function-name';\nimport isBuffer from '@stdlib/assert-is-buffer';\n\n\n// MAIN //\n\n/**\n* Determines the name of a value's constructor.\n*\n* @param {*} v - input value\n* @returns {string} name of a value's constructor\n*\n* @example\n* var v = constructorName( 'a' );\n* // returns 'String'\n*\n* @example\n* var v = constructorName( 5 );\n* // returns 'Number'\n*\n* @example\n* var v = constructorName( null );\n* // returns 'Null'\n*\n* @example\n* var v = constructorName( undefined );\n* // returns 'Undefined'\n*\n* @example\n* var v = constructorName( function noop() {} );\n* // returns 'Function'\n*/\nfunction constructorName( v ) {\n\tvar match;\n\tvar name;\n\tvar ctor;\n\tname = nativeClass( v ).slice( 8, -1 );\n\tif ( (name === 'Object' || name === 'Error') && v.constructor ) {\n\t\tctor = v.constructor;\n\t\tif ( typeof ctor.name === 'string' ) {\n\t\t\treturn ctor.name;\n\t\t}\n\t\tmatch = RE.exec( ctor.toString() );\n\t\tif ( match ) {\n\t\t\treturn match[ 1 ];\n\t\t}\n\t}\n\tif ( isBuffer( v ) ) {\n\t\treturn 'Buffer';\n\t}\n\treturn name;\n}\n\n\n// EXPORTS //\n\nexport default constructorName;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isObjectLike from '@stdlib/assert-is-object-like';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Buffer instance.\n*\n* @param {*} value - value to validate\n* @returns {boolean} boolean indicating if a value is a Buffer instance\n*\n* @example\n* var v = isBuffer( new Buffer( 'beep' ) );\n* // returns true\n*\n* @example\n* var v = isBuffer( new Buffer( [1,2,3,4] ) );\n* // returns true\n*\n* @example\n* var v = isBuffer( {} );\n* // returns false\n*\n* @example\n* var v = isBuffer( [] );\n* // returns false\n*/\nfunction isBuffer( value ) {\n\treturn (\n\t\tisObjectLike( value ) &&\n\t\t(\n\t\t\t// eslint-disable-next-line no-underscore-dangle\n\t\t\tvalue._isBuffer || // for envs missing Object.prototype.constructor (e.g., Safari 5-7)\n\t\t\t(\n\t\t\t\tvalue.constructor &&\n\n\t\t\t\t// WARNING: `typeof` is not a foolproof check, as certain envs consider RegExp and NodeList instances to be functions\n\t\t\t\ttypeof value.constructor.isBuffer === 'function' &&\n\t\t\t\tvalue.constructor.isBuffer( value )\n\t\t\t)\n\t\t)\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isBuffer;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Regular expression to capture everything that is not a space immediately after the `function` keyword and before the first left parenthesis.\n*\n* @module @stdlib/regexp-function-name\n*\n* @example\n* import reFunctionName from '@stdlib/regexp-function-name';\n* var RE_FUNCTION_NAME = reFunctionName();\n*\n* function fname( fcn ) {\n* return RE_FUNCTION_NAME.exec( fcn.toString() )[ 1 ];\n* }\n*\n* var fn = fname( Math.sqrt );\n* // returns 'sqrt'\n*\n* fn = fname( Int8Array );\n* // returns 'Int8Array'\n*\n* fn = fname( Object.prototype.toString );\n* // returns 'toString'\n*\n* fn = fname( function(){} );\n* // returns ''\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport REGEXP from './regexp.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'REGEXP', REGEXP );\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test if a value is object-like.\n*\n* @module @stdlib/assert-is-object-like\n*\n* @example\n* import isObjectLike from '@stdlib/assert-is-object-like';\n*\n* var bool = isObjectLike( {} );\n* // returns true\n*\n* bool = isObjectLike( [] );\n* // returns true\n*\n* bool = isObjectLike( null );\n* // returns false\n*\n* @example\n* import { isObjectLikeArray as isObjectLike } from '@stdlib/assert-is-object-like';\n*\n* var bool = isObjectLike( [ {}, [] ] );\n* // returns true\n*\n* bool = isObjectLike( [ {}, '3.0' ] );\n* // returns false\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport arrayfun from '@stdlib/assert-tools-array-function';\nimport main from './main.js';\n\n\n// VARIABLES //\n\nvar isObjectLikeArray = arrayfun( main );\n\n\n// MAIN //\n\nsetReadOnly( main, 'isObjectLikeArray', isObjectLikeArray );\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isArray from '@stdlib/assert-is-array';\nimport format from '@stdlib/string-format';\n\n\n// MAIN //\n\n/**\n* Returns a function which tests if every element in an array passes a test condition.\n*\n* @param {Function} predicate - function to apply\n* @throws {TypeError} must provide a function\n* @returns {Function} an array function\n*\n* @example\n* import isOdd from '@stdlib/assert-is-odd';\n*\n* var arr1 = [ 1, 3, 5, 7 ];\n* var arr2 = [ 3, 5, 8 ];\n*\n* var validate = arrayfcn( isOdd );\n*\n* var bool = validate( arr1 );\n* // returns true\n*\n* bool = validate( arr2 );\n* // returns false\n*/\nfunction arrayfcn( predicate ) {\n\tif ( typeof predicate !== 'function' ) {\n\t\tthrow new TypeError( format( 'invalid argument. Must provide a function. Value: `%s`.', predicate ) );\n\t}\n\treturn every;\n\n\t/**\n\t* Tests if every element in an array passes a test condition.\n\t*\n\t* @private\n\t* @param {*} value - value to test\n\t* @returns {boolean} boolean indicating whether a value is an array for which all elements pass a test condition\n\t*/\n\tfunction every( value ) {\n\t\tvar len;\n\t\tvar i;\n\t\tif ( !isArray( value ) ) {\n\t\t\treturn false;\n\t\t}\n\t\tlen = value.length;\n\t\tif ( len === 0 ) {\n\t\t\treturn false;\n\t\t}\n\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\tif ( predicate( value[ i ] ) === false ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}\n}\n\n\n// EXPORTS //\n\nexport default arrayfcn;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Determine a value's type.\n*\n* @module @stdlib/utils-type-of\n*\n* @example\n* import typeOf from '@stdlib/utils-type-of';\n*\n* var str = typeOf( 'a' );\n* // returns 'string'\n*\n* str = typeOf( 5 );\n* // returns 'number'\n*/\n\n// MODULES //\n\nimport usePolyfill from './check.js';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar main = ( usePolyfill() ) ? polyfill : builtin;\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport RE from './fixtures/re.js';\nimport nodeList from './fixtures/nodelist.js';\nimport typedarray from './fixtures/typedarray.js';\n\n\n// MAIN //\n\n/**\n* Checks whether a polyfill is needed when using the `typeof` operator.\n*\n* @private\n* @returns {boolean} boolean indicating whether a polyfill is needed\n*/\nfunction check() {\n\tif (\n\t\t// Chrome 1-12 returns 'function' for regular expression instances (see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/typeof):\n\t\ttypeof RE === 'function' ||\n\n\t\t// Safari 8 returns 'object' for typed array and weak map constructors (underscore #1929):\n\t\ttypeof typedarray === 'object' ||\n\n\t\t// PhantomJS 1.9 returns 'function' for `NodeList` instances (underscore #2236):\n\t\ttypeof nodeList === 'function'\n\t) {\n\t\treturn true;\n\t}\n\treturn false;\n}\n\n\n// EXPORTS //\n\nexport default check;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport ctorName from '@stdlib/utils-constructor-name';\n\n\n// MAIN //\n\n/**\n* Determines a value's type.\n*\n* @param {*} v - input value\n* @returns {string} string indicating the value's type\n*/\nfunction typeOf( v ) {\n\treturn ctorName( v ).toLowerCase();\n}\n\n\n// EXPORTS //\n\nexport default typeOf;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport ctorName from '@stdlib/utils-constructor-name';\n\n\n// NOTES //\n\n/*\n* Built-in `typeof` operator behavior:\n*\n* ```text\n* typeof null => 'object'\n* typeof undefined => 'undefined'\n* typeof 'a' => 'string'\n* typeof 5 => 'number'\n* typeof NaN => 'number'\n* typeof true => 'boolean'\n* typeof false => 'boolean'\n* typeof {} => 'object'\n* typeof [] => 'object'\n* typeof function foo(){} => 'function'\n* typeof function* foo(){} => 'object'\n* typeof Symbol() => 'symbol'\n* ```\n*\n*/\n\n\n// MAIN //\n\n/**\n* Determines a value's type.\n*\n* @param {*} v - input value\n* @returns {string} string indicating the value's type\n*/\nfunction typeOf( v ) {\n\tvar type;\n\n\t// Address `typeof null` => `object` (see http://wiki.ecmascript.org/doku.php?id=harmony:typeof_null):\n\tif ( v === null ) {\n\t\treturn 'null';\n\t}\n\ttype = typeof v;\n\n\t// If the `typeof` operator returned something other than `object`, we are done. Otherwise, we need to check for an internal class name or search for a constructor.\n\tif ( type === 'object' ) {\n\t\treturn ctorName( v ).toLowerCase();\n\t}\n\treturn type;\n}\n\n\n// EXPORTS //\n\nexport default typeOf;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport typeOf from '@stdlib/utils-type-of';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a function.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a function\n*\n* @example\n* function beep() {\n* return 'beep';\n* }\n*\n* var bool = isFunction( beep );\n* // returns true\n*/\nfunction isFunction( value ) {\n\t// Note: cannot use `typeof` directly, as various browser engines incorrectly return `'function'` when operating on non-function objects, such as regular expressions and NodeLists.\n\treturn ( typeOf( value ) === 'function' );\n}\n\n\n// EXPORTS //\n\nexport default isFunction;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isNumber } from '@stdlib/assert-is-number';\nimport defineProperty from '@stdlib/utils-define-property';\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport format from '@stdlib/string-format';\nimport toStr from './tostring.js';\nimport toJSON from './tojson.js';\n\n\n// MAIN //\n\n/**\n* 128-bit complex number constructor.\n*\n* @constructor\n* @param {number} real - real component\n* @param {number} imag - imaginary component\n* @throws {TypeError} must invoke using the `new` keyword\n* @throws {TypeError} real component must be a number\n* @throws {TypeError} imaginary component must be a number\n* @returns {Complex128} 128-bit complex number\n*\n* @example\n* var z = new Complex128( 5.0, 3.0 );\n* // returns \n*/\nfunction Complex128( real, imag ) {\n\tif ( !( this instanceof Complex128 ) ) {\n\t\tthrow new TypeError( 'invalid invocation. Constructor must be called with the `new` keyword.' );\n\t}\n\tif ( !isNumber( real ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Real component must be a number. Value: `%s`.', real ) );\n\t}\n\tif ( !isNumber( imag ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Imaginary component must be a number. Value: `%s`.', imag ) );\n\t}\n\tdefineProperty( this, 're', {\n\t\t'configurable': false,\n\t\t'enumerable': true,\n\t\t'writable': false,\n\t\t'value': real\n\t});\n\tdefineProperty( this, 'im', {\n\t\t'configurable': false,\n\t\t'enumerable': true,\n\t\t'writable': false,\n\t\t'value': imag\n\t});\n\treturn this;\n}\n\n/**\n* Size (in bytes) of each component.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex128\n* @type {integer}\n* @returns {integer} size of each component\n*\n* @example\n* var nbytes = Complex128.BYTES_PER_ELEMENT;\n* // returns 8\n*/\nsetReadOnly( Complex128, 'BYTES_PER_ELEMENT', 8 );\n\n/**\n* Size (in bytes) of each component.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex128.prototype\n* @type {integer}\n* @returns {integer} size of each component\n*\n* @example\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var nbytes = z.BYTES_PER_ELEMENT;\n* // returns 8\n*/\nsetReadOnly( Complex128.prototype, 'BYTES_PER_ELEMENT', 8 );\n\n/**\n* Length (in bytes) of a complex number.\n*\n* @name byteLength\n* @memberof Complex128.prototype\n* @type {integer}\n* @returns {integer} byte length\n*\n* @example\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var nbytes = z.byteLength;\n* // returns 16\n*/\nsetReadOnly( Complex128.prototype, 'byteLength', 16 );\n\n/**\n* Serializes a complex number as a string.\n*\n* @name toString\n* @memberof Complex128.prototype\n* @type {Function}\n* @returns {string} serialized complex number\n*\n* @example\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var str = z.toString();\n* // returns '5 + 3i'\n*/\nsetReadOnly( Complex128.prototype, 'toString', toStr );\n\n/**\n* Serializes a complex number as a JSON object.\n*\n* ## Notes\n*\n* - `JSON.stringify()` implicitly calls this method when stringifying a `Complex128` instance.\n*\n* @name toJSON\n* @memberof Complex128.prototype\n* @type {Function}\n* @returns {Object} serialized complex number\n*\n* @example\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var obj = z.toJSON();\n* // returns { 'type': 'Complex128', 're': 5.0, 'im': 3.0 }\n*/\nsetReadOnly( Complex128.prototype, 'toJSON', toJSON );\n\n\n// EXPORTS //\n\nexport default Complex128;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Serializes a complex number as a string.\n*\n* @private\n* @returns {string} serialized complex number\n*/\nfunction toString() { // eslint-disable-line stdlib/no-redeclare\n\t/* eslint-disable no-invalid-this */\n\tvar str = '' + this.re;\n\tif ( this.im < 0 ) {\n\t\tstr += ' - ' + (-this.im);\n\t} else {\n\t\tstr += ' + ' + this.im;\n\t}\n\tstr += 'i';\n\treturn str;\n}\n\n\n// EXPORTS //\n\nexport default toString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Serializes a complex number as a JSON object.\n*\n* @private\n* @returns {Object} JSON representation\n*/\nfunction toJSON() {\n\t/* eslint-disable no-invalid-this */\n\tvar out = {};\n\tout.type = 'Complex128';\n\tout.re = this.re;\n\tout.im = this.im;\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default toJSON;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar fround = ( typeof Math.fround === 'function' ) ? Math.fround : null; // eslint-disable-line stdlib/no-builtin-math\n\n\n// EXPORTS //\n\nexport default fround;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport Float32Array from '@stdlib/array-float32';\n\n\n// VARIABLES //\n\nvar FLOAT32_VIEW = new Float32Array( 1 );\n\n\n// MAIN //\n\n/**\n* Converts a double-precision floating-point number to the nearest single-precision floating-point number.\n*\n* @param {number} x - double-precision floating-point number\n* @returns {number} nearest single-precision floating-point number\n*\n* @example\n* var y = float64ToFloat32( 1.337 );\n* // returns 1.3370000123977661\n*/\nfunction float64ToFloat32( x ) {\n\tFLOAT32_VIEW[ 0 ] = x;\n\treturn FLOAT32_VIEW[ 0 ];\n}\n\n\n// EXPORTS //\n\nexport default float64ToFloat32;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Convert a double-precision floating-point number to the nearest single-precision floating-point number.\n*\n* @module @stdlib/number-float64-base-to-float32\n*\n* @example\n* import float64ToFloat32 from '@stdlib/number-float64-base-to-float32';\n*\n* var y = float64ToFloat32( 1.337 );\n* // returns 1.3370000123977661\n*/\n\n// MODULES //\n\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar float64ToFloat32;\nif ( typeof builtin === 'function' ) {\n\tfloat64ToFloat32 = builtin;\n} else {\n\tfloat64ToFloat32 = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default float64ToFloat32;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isNumber } from '@stdlib/assert-is-number';\nimport defineProperty from '@stdlib/utils-define-property';\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport float64ToFloat32 from '@stdlib/number-float64-base-to-float32';\nimport format from '@stdlib/string-format';\nimport toStr from './tostring.js';\nimport toJSON from './tojson.js';\n\n\n// MAIN //\n\n/**\n* 64-bit complex number constructor.\n*\n* @constructor\n* @param {number} real - real component\n* @param {number} imag - imaginary component\n* @throws {TypeError} must invoke using the `new` keyword\n* @throws {TypeError} real component must be a number\n* @throws {TypeError} imaginary component must be a number\n* @returns {Complex64} 64-bit complex number\n*\n* @example\n* var z = new Complex64( 5.0, 3.0 );\n* // returns \n*/\nfunction Complex64( real, imag ) {\n\tif ( !( this instanceof Complex64 ) ) {\n\t\tthrow new TypeError( 'invalid invocation. Constructor must be called with the `new` keyword.' );\n\t}\n\tif ( !isNumber( real ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Real component must be a number. Value: `%s`.', real ) );\n\t}\n\tif ( !isNumber( imag ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Imaginary component must be a number. Value: `%s`.', imag ) );\n\t}\n\tdefineProperty( this, 're', {\n\t\t'configurable': false,\n\t\t'enumerable': true,\n\t\t'writable': false,\n\t\t'value': float64ToFloat32( real )\n\t});\n\tdefineProperty( this, 'im', {\n\t\t'configurable': false,\n\t\t'enumerable': true,\n\t\t'writable': false,\n\t\t'value': float64ToFloat32( imag )\n\t});\n\treturn this;\n}\n\n/**\n* Size (in bytes) of each component.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex64\n* @type {integer}\n* @returns {integer} size of each component\n*\n* @example\n* var nbytes = Complex64.BYTES_PER_ELEMENT;\n* // returns 4\n*/\nsetReadOnly( Complex64, 'BYTES_PER_ELEMENT', 4 );\n\n/**\n* Size (in bytes) of each component.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex64.prototype\n* @type {integer}\n* @returns {integer} size of each component\n*\n* @example\n* var z = new Complex64( 5.0, 3.0 );\n*\n* var nbytes = z.BYTES_PER_ELEMENT;\n* // returns 4\n*/\nsetReadOnly( Complex64.prototype, 'BYTES_PER_ELEMENT', 4 );\n\n/**\n* Length (in bytes) of a complex number.\n*\n* @name byteLength\n* @memberof Complex64.prototype\n* @type {integer}\n* @returns {integer} byte length\n*\n* @example\n* var z = new Complex64( 5.0, 3.0 );\n*\n* var nbytes = z.byteLength;\n* // returns 8\n*/\nsetReadOnly( Complex64.prototype, 'byteLength', 8 );\n\n/**\n* Serializes a complex number as a string.\n*\n* @name toString\n* @memberof Complex64.prototype\n* @type {Function}\n* @returns {string} serialized complex number\n*\n* @example\n* var z = new Complex64( 5.0, 3.0 );\n*\n* var str = z.toString();\n* // returns '5 + 3i'\n*/\nsetReadOnly( Complex64.prototype, 'toString', toStr );\n\n/**\n* Serializes a complex number as a JSON object.\n*\n* ## Notes\n*\n* - `JSON.stringify()` implicitly calls this method when stringifying a `Complex64` instance.\n*\n* @name toJSON\n* @memberof Complex64.prototype\n* @type {Function}\n* @returns {Object} serialized complex number\n*\n* @example\n* var z = new Complex64( 5.0, 3.0 );\n*\n* var obj = z.toJSON();\n* // returns { 'type': 'Complex64', 're': 5.0, 'im': 3.0 }\n*/\nsetReadOnly( Complex64.prototype, 'toJSON', toJSON );\n\n\n// EXPORTS //\n\nexport default Complex64;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport Complex128 from '@stdlib/complex-float64';\nimport Complex64 from '@stdlib/complex-float32';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a complex number-like object.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a complex number-like object.\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n* import Complex64 from '@stdlib/complex-float32';\n*\n* var x = new Complex128( 4.0, 2.0 );\n* var bool = isComplexLike( x );\n* // returns true\n*\n* x = new Complex64( 4.0, 2.0 );\n* bool = isComplexLike( x );\n* // returns true\n*/\nfunction isComplexLike( value ) {\n\tif ( value instanceof Complex128 || value instanceof Complex64 ) {\n\t\treturn true;\n\t}\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\ttypeof value.re === 'number' &&\n\t\ttypeof value.im === 'number'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isComplexLike;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isInteger from '@stdlib/math-base-assert-is-integer';\n\n\n// MAIN //\n\n/**\n* Tests if a finite numeric value is an even number.\n*\n* @param {number} x - value to test\n* @returns {boolean} boolean indicating whether the value is an even number\n*\n* @example\n* var bool = isEven( 5.0 );\n* // returns false\n*\n* @example\n* var bool = isEven( -2.0 );\n* // returns true\n*\n* @example\n* var bool = isEven( 0.0 );\n* // returns true\n*\n* @example\n* var bool = isEven( NaN );\n* // returns false\n*/\nfunction isEven( x ) {\n\treturn isInteger( x/2.0 );\n}\n\n\n// EXPORTS //\n\nexport default isEven;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport hasOwnProp from '@stdlib/assert-has-own-property';\nimport Symbol from '@stdlib/symbol-ctor';\n\n\n// MAIN //\n\n/**\n* Tests for native `Symbol.iterator` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Symbol.iterator` support\n*\n* @example\n* var bool = hasIteratorSymbolSupport();\n* // returns \n*/\nfunction hasIteratorSymbolSupport() {\n\treturn (\n\t\ttypeof Symbol === 'function' &&\n\t\ttypeof Symbol( 'foo' ) === 'symbol' &&\n\t\thasOwnProp( Symbol, 'iterator' ) &&\n\t\ttypeof Symbol.iterator === 'symbol'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default hasIteratorSymbolSupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Serializes a complex number as a string.\n*\n* @private\n* @returns {string} serialized complex number\n*/\nfunction toString() { // eslint-disable-line stdlib/no-redeclare\n\t/* eslint-disable no-invalid-this */\n\tvar str = '' + this.re;\n\tif ( this.im < 0 ) {\n\t\tstr += ' - ' + (-this.im);\n\t} else {\n\t\tstr += ' + ' + this.im;\n\t}\n\tstr += 'i';\n\treturn str;\n}\n\n\n// EXPORTS //\n\nexport default toString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Serializes a complex number as a JSON object.\n*\n* @private\n* @returns {Object} JSON representation\n*/\nfunction toJSON() {\n\t/* eslint-disable no-invalid-this */\n\tvar out = {};\n\tout.type = 'Complex64';\n\tout.re = this.re;\n\tout.im = this.im;\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default toJSON;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport hasIteratorSymbolSupport from '@stdlib/assert-has-iterator-symbol-support';\n\n\n// MAIN //\n\n/**\n* Iterator symbol.\n*\n* @name IteratorSymbol\n* @constant\n* @type {(symbol|null)}\n*\n* @example\n* function iterator() {\n* var it;\n* var i;\n*\n* i = -1;\n*\n* it = {};\n* it.next = next;\n* it.return = done;\n*\n* if ( IteratorSymbol ) {\n* it[ IteratorSymbol ] = iterator;\n* }\n* return it;\n*\n* function next() {\n* i += 1;\n* return {\n* 'value': i,\n* 'done': false\n* };\n* }\n*\n* function done( value ) {\n* if ( arguments.length === 0 ) {\n* return {\n* 'done': true\n* };\n* }\n* return {\n* 'value': value,\n* 'done': true\n* };\n* }\n* }\n*\n* var obj = iterator();\n*/\nvar IteratorSymbol = ( hasIteratorSymbolSupport() ) ? Symbol.iterator : null;\n\n\n// EXPORTS //\n\nexport default IteratorSymbol;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport defineProperty from '@stdlib/utils-define-property';\n\n\n// MAIN //\n\n/**\n* Defines a non-enumerable read-only accessor.\n*\n* @param {Object} obj - object on which to define the property\n* @param {(string|symbol)} prop - property name\n* @param {Function} getter - accessor\n*\n* @example\n* function getter() {\n* return 'bar';\n* }\n*\n* var obj = {};\n*\n* setNonEnumerableReadOnlyAccessor( obj, 'foo', getter );\n*\n* try {\n* obj.foo = 'boop';\n* } catch ( err ) {\n* console.error( err.message );\n* }\n*/\nfunction setNonEnumerableReadOnlyAccessor( obj, prop, getter ) { // eslint-disable-line id-length\n\tdefineProperty( obj, prop, {\n\t\t'configurable': false,\n\t\t'enumerable': false,\n\t\t'get': getter\n\t});\n}\n\n\n// EXPORTS //\n\nexport default setNonEnumerableReadOnlyAccessor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Returns the real component of a single-precision complex floating-point number.\n*\n* @param {Complex} z - complex number\n* @returns {number} real component\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n*\n* var z = new Complex64( 5.0, 3.0 );\n*\n* var re = realf( z );\n* // returns 5.0\n*/\nfunction realf( z ) {\n\treturn z.re;\n}\n\n\n// EXPORTS //\n\nexport default realf;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Returns the imaginary component of a single-precision complex floating-point number.\n*\n* @param {Complex} z - complex number\n* @returns {number} imaginary component\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n*\n* var z = new Complex64( 5.0, 3.0 );\n*\n* var im = imagf( z );\n* // returns 3.0\n*/\nfunction imagf( z ) {\n\treturn z.im;\n}\n\n\n// EXPORTS //\n\nexport default imagf;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport Float32Array from '@stdlib/array-float32';\n\n\n// MAIN //\n\n/**\n* Reinterprets a `Complex64Array` as a `Float32Array`.\n*\n* @param {Complex64Array} x - input array\n* @param {NonNegativeInteger} offset - starting index\n* @returns {Float32Array} `Float32Array` view\n*\n* @example\n* import Complex64Array from '@stdlib/array-complex64';\n*\n* var x = new Complex64Array( 10 );\n*\n* var out = reinterpret( x, 0 );\n* // returns \n*\n* var bool = ( out.buffer === x.buffer );\n* // returns true\n*/\nfunction reinterpret( x, offset ) {\n\treturn new Float32Array( x.buffer, x.byteOffset+(x.BYTES_PER_ELEMENT*offset), 2*(x.length-offset) ); // eslint-disable-line max-len\n}\n\n\n// EXPORTS //\n\nexport default reinterpret;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport Float64Array from '@stdlib/array-float64';\n\n\n// MAIN //\n\n/**\n* Reinterprets a `Complex128Array` as a `Float64Array`.\n*\n* @param {Complex128Array} x - input array\n* @param {NonNegativeInteger} offset - starting index\n* @returns {Float64Array} `Float64Array` view\n*\n* @example\n* import Complex128Array from '@stdlib/array-complex128';\n*\n* var x = new Complex128Array( 10 );\n*\n* var out = reinterpret( x, 0 );\n* // returns \n*\n* var bool = ( out.buffer === x.buffer );\n* // returns true\n*/\nfunction reinterpret( x, offset ) {\n\treturn new Float64Array( x.buffer, x.byteOffset+(x.BYTES_PER_ELEMENT*offset), 2*(x.length-offset) ); // eslint-disable-line max-len\n}\n\n\n// EXPORTS //\n\nexport default reinterpret;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// VARIABLES //\n\nvar GETTERS = {\n\t'float64': getFloat64,\n\t'float32': getFloat32,\n\t'int32': getInt32,\n\t'int16': getInt16,\n\t'int8': getInt8,\n\t'uint32': getUint32,\n\t'uint16': getUint16,\n\t'uint8': getUint8,\n\t'uint8c': getUint8c,\n\t'generic': getGeneric,\n\t'default': getArrayLike\n};\n\n\n// FUNCTIONS //\n\n/**\n* Returns an element from a `Float64Array`.\n*\n* @private\n* @param {Float64Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n*\n* var arr = new Float64Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getFloat64( arr, 2 );\n* // returns 3.0\n*/\nfunction getFloat64( arr, idx ) {\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from a `Float32Array`.\n*\n* @private\n* @param {Float32Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Float32Array from '@stdlib/array-float32';\n*\n* var arr = new Float32Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getFloat32( arr, 2 );\n* // returns 3.0\n*/\nfunction getFloat32( arr, idx ) {\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from an `Int32Array`.\n*\n* @private\n* @param {Int32Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Int32Array from '@stdlib/array-int32';\n*\n* var arr = new Int32Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getInt32( arr, 2 );\n* // returns 3\n*/\nfunction getInt32( arr, idx ) { // eslint-disable-line stdlib/jsdoc-doctest-decimal-point\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from an `Int16Array`.\n*\n* @private\n* @param {Int16Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Int16Array from '@stdlib/array-int16';\n*\n* var arr = new Int16Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getInt16( arr, 2 );\n* // returns 3\n*/\nfunction getInt16( arr, idx ) { // eslint-disable-line stdlib/jsdoc-doctest-decimal-point\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from an `Int8Array`.\n*\n* @private\n* @param {Int8Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Int8Array from '@stdlib/array-int8';\n*\n* var arr = new Int8Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getInt8( arr, 2 );\n* // returns 3\n*/\nfunction getInt8( arr, idx ) { // eslint-disable-line stdlib/jsdoc-doctest-decimal-point\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from a `Uint32Array`.\n*\n* @private\n* @param {Uint32Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Uint32Array from '@stdlib/array-uint32';\n*\n* var arr = new Uint32Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getUint32( arr, 2 );\n* // returns 3\n*/\nfunction getUint32( arr, idx ) { // eslint-disable-line stdlib/jsdoc-doctest-decimal-point\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from a `Uint16Array`.\n*\n* @private\n* @param {Uint16Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Uint16Array from '@stdlib/array-uint16';\n*\n* var arr = new Uint16Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getUint16( arr, 2 );\n* // returns 3\n*/\nfunction getUint16( arr, idx ) { // eslint-disable-line stdlib/jsdoc-doctest-decimal-point\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from a `Uint8Array`.\n*\n* @private\n* @param {Uint8Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Uint8Array from '@stdlib/array-uint8';\n*\n* var arr = new Uint8Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getUint8( arr, 2 );\n* // returns 3\n*/\nfunction getUint8( arr, idx ) { // eslint-disable-line stdlib/jsdoc-doctest-decimal-point\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from a `Uint8ClampedArray`.\n*\n* @private\n* @param {Uint8ClampedArray} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Uint8ClampedArray from '@stdlib/array-uint8c';\n*\n* var arr = new Uint8ClampedArray( [ 1, 2, 3, 4 ] );\n*\n* var v = getUint8c( arr, 2 );\n* // returns 3\n*/\nfunction getUint8c( arr, idx ) { // eslint-disable-line stdlib/jsdoc-doctest-decimal-point\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from a generic `Array`.\n*\n* @private\n* @param {Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {*} element value\n*\n* @example\n* var arr = [ 1, 2, 3, 4 ];\n*\n* var v = getGeneric( arr, 2 );\n* // returns 3\n*/\nfunction getGeneric( arr, idx ) {\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from an indexed array-like object.\n*\n* @private\n* @param {Collection} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {*} element value\n*\n* @example\n* var arr = [ 1, 2, 3, 4 ];\n*\n* var v = getArrayLike( arr, 2 );\n* // returns 3\n*/\nfunction getArrayLike( arr, idx ) {\n\treturn arr[ idx ];\n}\n\n\n// MAIN //\n\n/**\n* Returns an accessor function for retrieving an element from an indexed array-like object.\n*\n* @param {string} dtype - array dtype\n* @returns {Function} accessor\n*\n* @example\n* import dtype from '@stdlib/array-dtype';\n*\n* var arr = [ 1, 2, 3, 4 ];\n*\n* var get = getter( dtype( arr ) );\n* var v = get( arr, 2 );\n* // returns 3\n*/\nfunction getter( dtype ) {\n\tvar f = GETTERS[ dtype ];\n\tif ( typeof f === 'function' ) {\n\t\treturn f;\n\t}\n\treturn GETTERS.default;\n}\n\n\n// EXPORTS //\n\nexport default getter;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// VARIABLES //\n\nvar GETTERS = {\n\t'complex128': getComplex128,\n\t'complex64': getComplex64,\n\t'default': getArrayLike\n};\n\n\n// FUNCTIONS //\n\n/**\n* Returns an element from a `Complex128Array`.\n*\n* @private\n* @param {Complex128Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Complex128Array from '@stdlib/array-complex128';\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* var arr = new Complex128Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getComplex128( arr, 1 );\n* // returns \n*\n* var re = real( v );\n* // returns 3.0\n*\n* var im = imag( v );\n* // returns 4.0\n*/\nfunction getComplex128( arr, idx ) {\n\treturn arr.get( idx );\n}\n\n/**\n* Returns an element from a `Complex64Array`.\n*\n* @private\n* @param {Complex64Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Complex64Array from '@stdlib/array-complex64';\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* var arr = new Complex64Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getComplex64( arr, 1 );\n* // returns \n*\n* var re = realf( v );\n* // returns 3.0\n*\n* var im = imagf( v );\n* // returns 4.0\n*/\nfunction getComplex64( arr, idx ) {\n\treturn arr.get( idx );\n}\n\n/**\n* Returns an element from an array-like object supporting the get/set protocol.\n*\n* @private\n* @param {Collection} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {*} element value\n*\n* @example\n* var arr = [ 1, 2, 3, 4 ];\n*\n* function get( idx ) {\n* return arr[ idx ];\n* }\n*\n* function set( value, idx ) {\n* arr[ idx ] = value;\n* }\n*\n* arr.get = get;\n* arr.set = set;\n*\n* var v = getArrayLike( arr, 2 );\n* // returns 3\n*/\nfunction getArrayLike( arr, idx ) {\n\treturn arr.get( idx );\n}\n\n\n// MAIN //\n\n/**\n* Returns an accessor function for retrieving an element from an array-like object supporting the get/set protocol.\n*\n* @param {string} dtype - array dtype\n* @returns {Function} accessor\n*\n* @example\n* import Complex64Array from '@stdlib/array-complex64';\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n* import dtype from '@stdlib/array-dtype';\n*\n* var arr = new Complex64Array( [ 1, 2, 3, 4 ] );\n*\n* var get = getter( dtype( arr ) );\n* var v = get( arr, 1 );\n* // returns \n*\n* var re = realf( v );\n* // returns 3.0\n*\n* var im = imagf( v );\n* // returns 4.0\n*/\nfunction getter( dtype ) {\n\tvar f = GETTERS[ dtype ];\n\tif ( typeof f === 'function' ) {\n\t\treturn f;\n\t}\n\treturn GETTERS.default;\n}\n\n\n// EXPORTS //\n\nexport default getter;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isArrayLikeObject from '@stdlib/assert-is-array-like-object';\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport realf from '@stdlib/complex-realf';\nimport imagf from '@stdlib/complex-imagf';\nimport format from '@stdlib/string-format';\n\n\n// MAIN //\n\n/**\n* Returns an array of iterated values.\n*\n* @private\n* @param {Object} it - iterator\n* @returns {(Array|TypeError)} array or an error\n*/\nfunction fromIterator( it ) {\n\tvar out;\n\tvar v;\n\tvar z;\n\n\tout = [];\n\twhile ( true ) {\n\t\tv = it.next();\n\t\tif ( v.done ) {\n\t\t\tbreak;\n\t\t}\n\t\tz = v.value;\n\t\tif ( isArrayLikeObject( z ) && z.length >= 2 ) {\n\t\t\tout.push( z[ 0 ], z[ 1 ] );\n\t\t} else if ( isComplexLike( z ) ) {\n\t\t\tout.push( realf( z ), imagf( z ) );\n\t\t} else {\n\t\t\treturn new TypeError( format( 'invalid argument. An iterator must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', z ) );\n\t\t}\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default fromIterator;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isArrayLikeObject from '@stdlib/assert-is-array-like-object';\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport realf from '@stdlib/complex-realf';\nimport imagf from '@stdlib/complex-imagf';\nimport format from '@stdlib/string-format';\n\n\n// MAIN //\n\n/**\n* Returns an array of iterated values.\n*\n* @private\n* @param {Object} it - iterator\n* @param {Function} clbk - callback to invoke for each iterated value\n* @param {*} thisArg - invocation context\n* @returns {(Array|TypeError)} array or an error\n*/\nfunction fromIteratorMap( it, clbk, thisArg ) {\n\tvar out;\n\tvar v;\n\tvar z;\n\tvar i;\n\n\tout = [];\n\ti = -1;\n\twhile ( true ) {\n\t\tv = it.next();\n\t\tif ( v.done ) {\n\t\t\tbreak;\n\t\t}\n\t\ti += 1;\n\t\tz = clbk.call( thisArg, v.value, i );\n\t\tif ( isArrayLikeObject( z ) && z.length >= 2 ) {\n\t\t\tout.push( z[ 0 ], z[ 1 ] );\n\t\t} else if ( isComplexLike( z ) ) {\n\t\t\tout.push( realf( z ), imagf( z ) );\n\t\t} else {\n\t\t\treturn new TypeError( format( 'invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', z ) );\n\t\t}\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default fromIteratorMap;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport realf from '@stdlib/complex-realf';\nimport imagf from '@stdlib/complex-imagf';\n\n\n// MAIN //\n\n/**\n* Returns a strided array of real and imaginary components.\n*\n* @private\n* @param {Float32Array} buf - output array\n* @param {Array} arr - array containing complex numbers\n* @returns {(Float32Array|null)} output array or null\n*/\nfunction fromArray( buf, arr ) {\n\tvar len;\n\tvar v;\n\tvar i;\n\tvar j;\n\n\tlen = arr.length;\n\tj = 0;\n\tfor ( i = 0; i < len; i++ ) {\n\t\tv = arr[ i ];\n\t\tif ( !isComplexLike( v ) ) {\n\t\t\treturn null;\n\t\t}\n\t\tbuf[ j ] = realf( v );\n\t\tbuf[ j+1 ] = imagf( v );\n\t\tj += 2; // stride\n\t}\n\treturn buf;\n}\n\n\n// EXPORTS //\n\nexport default fromArray;\n","/* eslint-disable no-restricted-syntax, max-lines, no-invalid-this */\n\n/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isNonNegativeInteger } from '@stdlib/assert-is-nonnegative-integer';\nimport isArrayLikeObject from '@stdlib/assert-is-array-like-object';\nimport isCollection from '@stdlib/assert-is-collection';\nimport isArrayBuffer from '@stdlib/assert-is-arraybuffer';\nimport isObject from '@stdlib/assert-is-object';\nimport isArray from '@stdlib/assert-is-array';\nimport isFunction from '@stdlib/assert-is-function';\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport isEven from '@stdlib/math-base-assert-is-even';\nimport isInteger from '@stdlib/math-base-assert-is-integer';\nimport hasIteratorSymbolSupport from '@stdlib/assert-has-iterator-symbol-support';\nimport ITERATOR_SYMBOL from '@stdlib/symbol-iterator';\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport setReadOnlyAccessor from '@stdlib/utils-define-nonenumerable-read-only-accessor';\nimport Float32Array from '@stdlib/array-float32';\nimport Complex64 from '@stdlib/complex-float32';\nimport format from '@stdlib/string-format';\nimport realf from '@stdlib/complex-realf';\nimport imagf from '@stdlib/complex-imagf';\nimport reinterpret64 from '@stdlib/strided-base-reinterpret-complex64';\nimport reinterpret128 from '@stdlib/strided-base-reinterpret-complex128';\nimport getter from '@stdlib/array-base-getter';\nimport accessorGetter from '@stdlib/array-base-accessor-getter';\nimport fromIterator from './from_iterator.js';\nimport fromIteratorMap from './from_iterator_map.js';\nimport fromArray from './from_array.js';\n\n\n// VARIABLES //\n\nvar BYTES_PER_ELEMENT = Float32Array.BYTES_PER_ELEMENT * 2;\nvar HAS_ITERATOR_SYMBOL = hasIteratorSymbolSupport();\n\n\n// FUNCTIONS //\n\n/**\n* Returns a boolean indicating if a value is a complex typed array.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a complex typed array\n*/\nfunction isComplexArray( value ) {\n\treturn (\n\t\tvalue instanceof Complex64Array ||\n\t\t(\n\t\t\ttypeof value === 'object' &&\n\t\t\tvalue !== null &&\n\t\t\t(\n\t\t\t\tvalue.constructor.name === 'Complex64Array' ||\n\t\t\t\tvalue.constructor.name === 'Complex128Array'\n\t\t\t) &&\n\t\t\ttypeof value._length === 'number' && // eslint-disable-line no-underscore-dangle\n\n\t\t\t// NOTE: we don't perform a more rigorous test here for a typed array for performance reasons, as robustly checking for a typed array instance could require walking the prototype tree and performing relatively expensive constructor checks...\n\t\t\ttypeof value._buffer === 'object' // eslint-disable-line no-underscore-dangle\n\t\t)\n\t);\n}\n\n/**\n* Returns a boolean indicating if a value is a complex typed array constructor.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a complex typed array constructor\n*/\nfunction isComplexArrayConstructor( value ) {\n\treturn (\n\t\tvalue === Complex64Array ||\n\n\t\t// NOTE: weaker test in order to avoid a circular dependency with Complex128Array...\n\t\tvalue.name === 'Complex128Array'\n\t);\n}\n\n/**\n* Returns a boolean indicating if a value is a `Complex64Array`.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a `Complex64Array`\n*/\nfunction isComplex64Array( value ) {\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\tvalue.constructor.name === 'Complex64Array' &&\n\t\tvalue.BYTES_PER_ELEMENT === BYTES_PER_ELEMENT\n\t);\n}\n\n/**\n* Returns a boolean indicating if a value is a `Complex128Array`.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a `Complex128Array`\n*/\nfunction isComplex128Array( value ) {\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\tvalue.constructor.name === 'Complex128Array' &&\n\t\tvalue.BYTES_PER_ELEMENT === BYTES_PER_ELEMENT*2\n\t);\n}\n\n\n// MAIN //\n\n/**\n* 64-bit complex number array constructor.\n*\n* @constructor\n* @param {(NonNegativeInteger|Collection|ArrayBuffer|Iterable)} [arg] - length, typed array, array-like object, buffer, or an iterable\n* @param {NonNegativeInteger} [byteOffset=0] - byte offset\n* @param {NonNegativeInteger} [length] - view length\n* @throws {RangeError} ArrayBuffer byte length must be a multiple of `8`\n* @throws {RangeError} array-like object and typed array input arguments must have a length which is a multiple of two\n* @throws {TypeError} if provided only a single argument, must provide a valid argument\n* @throws {TypeError} byte offset must be a nonnegative integer\n* @throws {RangeError} byte offset must be a multiple of `8`\n* @throws {TypeError} view length must be a positive multiple of `8`\n* @throws {RangeError} must provide sufficient memory to accommodate byte offset and view length requirements\n* @throws {TypeError} an iterator must return either a two element array containing real and imaginary components or a complex number\n* @returns {Complex64Array} complex number array\n*\n* @example\n* var arr = new Complex64Array();\n* // returns \n*\n* var len = arr.length;\n* // returns 0\n*\n* @example\n* var arr = new Complex64Array( 2 );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*\n* @example\n* var arr = new Complex64Array( [ 1.0, -1.0 ] );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* import ArrayBuffer from '@stdlib/array-buffer';\n*\n* var buf = new ArrayBuffer( 16 );\n* var arr = new Complex64Array( buf );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*\n* @example\n* import ArrayBuffer from '@stdlib/array-buffer';\n*\n* var buf = new ArrayBuffer( 16 );\n* var arr = new Complex64Array( buf, 8 );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* import ArrayBuffer from '@stdlib/array-buffer';\n*\n* var buf = new ArrayBuffer( 32 );\n* var arr = new Complex64Array( buf, 8, 2 );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*/\nfunction Complex64Array() {\n\tvar byteOffset;\n\tvar nargs;\n\tvar buf;\n\tvar len;\n\n\tnargs = arguments.length;\n\tif ( !(this instanceof Complex64Array) ) {\n\t\tif ( nargs === 0 ) {\n\t\t\treturn new Complex64Array();\n\t\t}\n\t\tif ( nargs === 1 ) {\n\t\t\treturn new Complex64Array( arguments[0] );\n\t\t}\n\t\tif ( nargs === 2 ) {\n\t\t\treturn new Complex64Array( arguments[0], arguments[1] );\n\t\t}\n\t\treturn new Complex64Array( arguments[0], arguments[1], arguments[2] );\n\t}\n\t// Create the underlying data buffer...\n\tif ( nargs === 0 ) {\n\t\tbuf = new Float32Array( 0 ); // backward-compatibility\n\t} else if ( nargs === 1 ) {\n\t\tif ( isNonNegativeInteger( arguments[0] ) ) {\n\t\t\tbuf = new Float32Array( arguments[0]*2 );\n\t\t} else if ( isCollection( arguments[0] ) ) {\n\t\t\tbuf = arguments[ 0 ];\n\t\t\tlen = buf.length;\n\n\t\t\t// If provided a \"generic\" array, peak at the first value, and, if the value is a complex number, try to process as an array of complex numbers, falling back to \"normal\" typed array initialization if we fail and ensuring consistency if the first value had not been a complex number...\n\t\t\tif ( len && isArray( buf ) && isComplexLike( buf[0] ) ) {\n\t\t\t\tbuf = fromArray( new Float32Array( len*2 ), buf );\n\t\t\t\tif ( buf === null ) {\n\t\t\t\t\t// We failed and we are now forced to allocate a new array :-(\n\t\t\t\t\tif ( !isEven( len ) ) {\n\t\t\t\t\t\tthrow new RangeError( format( 'invalid argument. Array-like object arguments must have a length which is a multiple of two. Length: `%u`.', len ) );\n\t\t\t\t\t}\n\t\t\t\t\t// We failed, so fall back to directly setting values...\n\t\t\t\t\tbuf = new Float32Array( arguments[0] );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ( isComplex64Array( buf ) ) {\n\t\t\t\t\tbuf = reinterpret64( buf, 0 );\n\t\t\t\t} else if ( isComplex128Array( buf ) ) {\n\t\t\t\t\tbuf = reinterpret128( buf, 0 );\n\t\t\t\t} else if ( !isEven( len ) ) {\n\t\t\t\t\tthrow new RangeError( format( 'invalid argument. Array-like object and typed array arguments must have a length which is a multiple of two. Length: `%u`.', len ) );\n\t\t\t\t}\n\t\t\t\tbuf = new Float32Array( buf );\n\t\t\t}\n\t\t} else if ( isArrayBuffer( arguments[0] ) ) {\n\t\t\tbuf = arguments[ 0 ];\n\t\t\tif ( !isInteger( buf.byteLength/BYTES_PER_ELEMENT ) ) {\n\t\t\t\tthrow new RangeError( format( 'invalid argument. ArrayBuffer byte length must be a multiple of %u. Byte length: `%u`.', BYTES_PER_ELEMENT, buf.byteLength ) );\n\t\t\t}\n\t\t\tbuf = new Float32Array( buf );\n\t\t} else if ( isObject( arguments[0] ) ) {\n\t\t\tbuf = arguments[ 0 ];\n\t\t\tif ( HAS_ITERATOR_SYMBOL === false ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Environment lacks Symbol.iterator support. Must provide a length, ArrayBuffer, typed array, or array-like object. Value: `%s`.', buf ) );\n\t\t\t}\n\t\t\tif ( !isFunction( buf[ ITERATOR_SYMBOL ] ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.', buf ) );\n\t\t\t}\n\t\t\tbuf = buf[ ITERATOR_SYMBOL ]();\n\t\t\tif ( !isFunction( buf.next ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.', buf ) );\n\t\t\t}\n\t\t\tbuf = fromIterator( buf );\n\t\t\tif ( buf instanceof Error ) {\n\t\t\t\tthrow buf;\n\t\t\t}\n\t\t\tbuf = new Float32Array( buf );\n\t\t} else {\n\t\t\tthrow new TypeError( format( 'invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.', arguments[0] ) );\n\t\t}\n\t} else {\n\t\tbuf = arguments[ 0 ];\n\t\tif ( !isArrayBuffer( buf ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. First argument must be an ArrayBuffer. Value: `%s`.', buf ) );\n\t\t}\n\t\tbyteOffset = arguments[ 1 ];\n\t\tif ( !isNonNegativeInteger( byteOffset ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Byte offset must be a nonnegative integer. Value: `%s`.', byteOffset ) );\n\t\t}\n\t\tif ( !isInteger( byteOffset/BYTES_PER_ELEMENT ) ) {\n\t\t\tthrow new RangeError( format( 'invalid argument. Byte offset must be a multiple of %u. Value: `%u`.', BYTES_PER_ELEMENT, byteOffset ) );\n\t\t}\n\t\tif ( nargs === 2 ) {\n\t\t\tlen = buf.byteLength - byteOffset;\n\t\t\tif ( !isInteger( len/BYTES_PER_ELEMENT ) ) {\n\t\t\t\tthrow new RangeError( format( 'invalid arguments. ArrayBuffer view byte length must be a multiple of %u. View byte length: `%u`.', BYTES_PER_ELEMENT, len ) );\n\t\t\t}\n\t\t\tbuf = new Float32Array( buf, byteOffset );\n\t\t} else {\n\t\t\tlen = arguments[ 2 ];\n\t\t\tif ( !isNonNegativeInteger( len ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Length must be a nonnegative integer. Value: `%s`.', len ) );\n\t\t\t}\n\t\t\tif ( (len*BYTES_PER_ELEMENT) > (buf.byteLength-byteOffset) ) {\n\t\t\t\tthrow new RangeError( format( 'invalid arguments. ArrayBuffer has insufficient capacity. Either decrease the array length or provide a bigger buffer. Minimum capacity: `%u`.', len*BYTES_PER_ELEMENT ) );\n\t\t\t}\n\t\t\tbuf = new Float32Array( buf, byteOffset, len*2 );\n\t\t}\n\t}\n\tsetReadOnly( this, '_buffer', buf );\n\tsetReadOnly( this, '_length', buf.length/2 );\n\n\treturn this;\n}\n\n/**\n* Size (in bytes) of each array element.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex64Array\n* @readonly\n* @type {PositiveInteger}\n* @default 8\n*\n* @example\n* var nbytes = Complex64Array.BYTES_PER_ELEMENT;\n* // returns 8\n*/\nsetReadOnly( Complex64Array, 'BYTES_PER_ELEMENT', BYTES_PER_ELEMENT );\n\n/**\n* Constructor name.\n*\n* @name name\n* @memberof Complex64Array\n* @readonly\n* @type {string}\n* @default 'Complex64Array'\n*\n* @example\n* var str = Complex64Array.name;\n* // returns 'Complex64Array'\n*/\nsetReadOnly( Complex64Array, 'name', 'Complex64Array' );\n\n/**\n* Creates a new 64-bit complex number array from an array-like object or an iterable.\n*\n* @name from\n* @memberof Complex64Array\n* @type {Function}\n* @param {(Collection|Iterable)} src - array-like object or iterable\n* @param {Function} [clbk] - callback to invoke for each source element\n* @param {*} [thisArg] - context\n* @throws {TypeError} `this` context must be a constructor\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be an array-like object or an iterable\n* @throws {TypeError} second argument must be a function\n* @throws {RangeError} array-like objects must have a length which is a multiple of two\n* @throws {TypeError} an iterator must return either a two element array containing real and imaginary components or a complex number\n* @throws {TypeError} when provided an iterator, a callback must return either a two element array containing real and imaginary components or a complex number\n* @returns {Complex64Array} 64-bit complex number array\n*\n* @example\n* var arr = Complex64Array.from( [ 1.0, -1.0 ] );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n*\n* var arr = Complex64Array.from( [ new Complex64( 1.0, 1.0 ) ] );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* function clbk( v ) {\n* return new Complex64( realf(v)*2.0, imagf(v)*2.0 );\n* }\n*\n* var arr = Complex64Array.from( [ new Complex64( 1.0, 1.0 ) ], clbk );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*/\nsetReadOnly( Complex64Array, 'from', function from( src ) {\n\tvar thisArg;\n\tvar nargs;\n\tvar clbk;\n\tvar out;\n\tvar buf;\n\tvar tmp;\n\tvar get;\n\tvar len;\n\tvar flg;\n\tvar v;\n\tvar i;\n\tvar j;\n\tif ( !isFunction( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` context must be a constructor.' );\n\t}\n\tif ( !isComplexArrayConstructor( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tnargs = arguments.length;\n\tif ( nargs > 1 ) {\n\t\tclbk = arguments[ 1 ];\n\t\tif ( !isFunction( clbk ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be a function. Value: `%s`.', clbk ) );\n\t\t}\n\t\tif ( nargs > 2 ) {\n\t\t\tthisArg = arguments[ 2 ];\n\t\t}\n\t}\n\tif ( isComplexArray( src ) ) {\n\t\tlen = src.length;\n\t\tif ( clbk ) {\n\t\t\tout = new this( len );\n\t\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\t\tj = 0;\n\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\tv = clbk.call( thisArg, src.get( i ), i );\n\t\t\t\tif ( isComplexLike( v ) ) {\n\t\t\t\t\tbuf[ j ] = realf( v );\n\t\t\t\t\tbuf[ j+1 ] = imagf( v );\n\t\t\t\t} else if ( isArrayLikeObject( v ) && v.length >= 2 ) {\n\t\t\t\t\tbuf[ j ] = v[ 0 ];\n\t\t\t\t\tbuf[ j+1 ] = v[ 1 ];\n\t\t\t\t} else {\n\t\t\t\t\tthrow new TypeError( format( 'invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', v ) );\n\t\t\t\t}\n\t\t\t\tj += 2; // stride\n\t\t\t}\n\t\t\treturn out;\n\t\t}\n\t\treturn new this( src );\n\t}\n\tif ( isCollection( src ) ) {\n\t\tif ( clbk ) {\n\t\t\t// Note: array contents affect how we iterate over a provided data source. If only complex number objects, we can extract real and imaginary components. Otherwise, for non-complex number arrays (e.g., `Float64Array`, etc), we assume a strided array where real and imaginary components are interleaved. In the former case, we expect a callback to return real and imaginary components (possibly as a complex number). In the latter case, we expect a callback to return *either* a real or imaginary component.\n\n\t\t\tlen = src.length;\n\t\t\tif ( src.get && src.set ) {\n\t\t\t\tget = accessorGetter( 'default' );\n\t\t\t} else {\n\t\t\t\tget = getter( 'default' );\n\t\t\t}\n\t\t\t// Detect whether we've been provided an array which returns complex number objects...\n\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\tif ( !isComplexLike( get( src, i ) ) ) {\n\t\t\t\t\tflg = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// If an array does not contain only complex number objects, then we assume interleaved real and imaginary components...\n\t\t\tif ( flg ) {\n\t\t\t\tif ( !isEven( len ) ) {\n\t\t\t\t\tthrow new RangeError( format( 'invalid argument. First argument must have a length which is a multiple of %u. Length: `%u`.', 2, len ) );\n\t\t\t\t}\n\t\t\t\tout = new this( len/2 );\n\t\t\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\t\tbuf[ i ] = clbk.call( thisArg, get( src, i ), i );\n\t\t\t\t}\n\t\t\t\treturn out;\n\t\t\t}\n\t\t\t// If an array contains only complex number objects, then we need to extract real and imaginary components...\n\t\t\tout = new this( len );\n\t\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\t\tj = 0;\n\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\tv = clbk.call( thisArg, get( src, i ), i );\n\t\t\t\tif ( isComplexLike( v ) ) {\n\t\t\t\t\tbuf[ j ] = realf( v );\n\t\t\t\t\tbuf[ j+1 ] = imagf( v );\n\t\t\t\t} else if ( isArrayLikeObject( v ) && v.length >= 2 ) {\n\t\t\t\t\tbuf[ j ] = v[ 0 ];\n\t\t\t\t\tbuf[ j+1 ] = v[ 1 ];\n\t\t\t\t} else {\n\t\t\t\t\tthrow new TypeError( format( 'invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', v ) );\n\t\t\t\t}\n\t\t\t\tj += 2; // stride\n\t\t\t}\n\t\t\treturn out;\n\t\t}\n\t\treturn new this( src );\n\t}\n\tif ( isObject( src ) && HAS_ITERATOR_SYMBOL && isFunction( src[ ITERATOR_SYMBOL ] ) ) { // eslint-disable-line max-len\n\t\tbuf = src[ ITERATOR_SYMBOL ]();\n\t\tif ( !isFunction( buf.next ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.', src ) );\n\t\t}\n\t\tif ( clbk ) {\n\t\t\ttmp = fromIteratorMap( buf, clbk, thisArg );\n\t\t} else {\n\t\t\ttmp = fromIterator( buf );\n\t\t}\n\t\tif ( tmp instanceof Error ) {\n\t\t\tthrow tmp;\n\t\t}\n\t\tlen = tmp.length / 2;\n\t\tout = new this( len );\n\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\tbuf[ i ] = tmp[ i ];\n\t\t}\n\t\treturn out;\n\t}\n\tthrow new TypeError( format( 'invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.', src ) );\n});\n\n/**\n* Creates a new 64-bit complex number array from a variable number of arguments.\n*\n* @name of\n* @memberof Complex64Array\n* @type {Function}\n* @param {...*} element - array elements\n* @throws {TypeError} `this` context must be a constructor\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Complex64Array} 64-bit complex number array\n*\n* @example\n* var arr = Complex64Array.of( 1.0, 1.0, 1.0, 1.0 );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*/\nsetReadOnly( Complex64Array, 'of', function of() {\n\tvar args;\n\tvar i;\n\tif ( !isFunction( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` context must be a constructor.' );\n\t}\n\tif ( !isComplexArrayConstructor( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\targs = [];\n\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\targs.push( arguments[ i ] );\n\t}\n\treturn new this( args );\n});\n\n/**\n* Pointer to the underlying data buffer.\n*\n* @name buffer\n* @memberof Complex64Array.prototype\n* @readonly\n* @type {ArrayBuffer}\n*\n* @example\n* var arr = new Complex64Array( 10 );\n*\n* var buf = arr.buffer;\n* // returns \n*/\nsetReadOnlyAccessor( Complex64Array.prototype, 'buffer', function get() {\n\treturn this._buffer.buffer;\n});\n\n/**\n* Size (in bytes) of the array.\n*\n* @name byteLength\n* @memberof Complex64Array.prototype\n* @readonly\n* @type {NonNegativeInteger}\n*\n* @example\n* var arr = new Complex64Array( 10 );\n*\n* var byteLength = arr.byteLength;\n* // returns 80\n*/\nsetReadOnlyAccessor( Complex64Array.prototype, 'byteLength', function get() {\n\treturn this._buffer.byteLength;\n});\n\n/**\n* Offset (in bytes) of the array from the start of its underlying `ArrayBuffer`.\n*\n* @name byteOffset\n* @memberof Complex64Array.prototype\n* @readonly\n* @type {NonNegativeInteger}\n*\n* @example\n* var arr = new Complex64Array( 10 );\n*\n* var byteOffset = arr.byteOffset;\n* // returns 0\n*/\nsetReadOnlyAccessor( Complex64Array.prototype, 'byteOffset', function get() {\n\treturn this._buffer.byteOffset;\n});\n\n/**\n* Size (in bytes) of each array element.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex64Array.prototype\n* @readonly\n* @type {PositiveInteger}\n* @default 8\n*\n* @example\n* var arr = new Complex64Array( 10 );\n*\n* var nbytes = arr.BYTES_PER_ELEMENT;\n* // returns 8\n*/\nsetReadOnly( Complex64Array.prototype, 'BYTES_PER_ELEMENT', Complex64Array.BYTES_PER_ELEMENT );\n\n/**\n* Copies a sequence of elements within the array to the position starting at `target`.\n*\n* @name copyWithin\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {integer} target - index at which to start copying elements\n* @param {integer} start - source index at which to copy elements from\n* @param {integer} [end] - source index at which to stop copying elements from\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Complex64Array} modified array\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* var arr = new Complex64Array( 4 );\n*\n* // Set the array elements:\n* arr.set( new Complex64( 1.0, 1.0 ), 0 );\n* arr.set( new Complex64( 2.0, 2.0 ), 1 );\n* arr.set( new Complex64( 3.0, 3.0 ), 2 );\n* arr.set( new Complex64( 4.0, 4.0 ), 3 );\n*\n* // Copy the first two elements to the last two elements:\n* arr.copyWithin( 2, 0, 2 );\n*\n* // Get the last array element:\n* var z = arr.get( 3 );\n*\n* var re = realf( z );\n* // returns 2.0\n*\n* var im = imagf( z );\n* // returns 2.0\n*/\nsetReadOnly( Complex64Array.prototype, 'copyWithin', function copyWithin( target, start ) {\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\t// FIXME: prefer a functional `copyWithin` implementation which addresses lack of universal browser support (e.g., IE11 and Safari) or ensure that typed arrays are polyfilled\n\tif ( arguments.length === 2 ) {\n\t\tthis._buffer.copyWithin( target*2, start*2 );\n\t} else {\n\t\tthis._buffer.copyWithin( target*2, start*2, arguments[2]*2 );\n\t}\n\treturn this;\n});\n\n/**\n* Returns an iterator for iterating over array key-value pairs.\n*\n* @name entries\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Iterator} iterator\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n*\n* var arr = [\n* new Complex64( 1.0, 1.0 ),\n* new Complex64( 2.0, 2.0 ),\n* new Complex64( 3.0, 3.0 )\n* ];\n* arr = new Complex64Array( arr );\n*\n* // Create an iterator:\n* var it = arr.entries();\n*\n* // Iterate over the key-value pairs...\n* var v = it.next().value;\n* // returns [ 0, ]\n*\n* v = it.next().value;\n* // returns [ 1, ]\n*\n* v = it.next().value;\n* // returns [ 2, ]\n*\n* var bool = it.next().done;\n* // returns true\n*/\nsetReadOnly( Complex64Array.prototype, 'entries', function entries() {\n\tvar buffer;\n\tvar self;\n\tvar iter;\n\tvar len;\n\tvar FLG;\n\tvar i;\n\tvar j;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tself = this;\n\tbuffer = this._buffer;\n\tlen = this._length;\n\n\t// Initialize the iteration indices:\n\ti = -1;\n\tj = -2;\n\n\t// Create an iterator protocol-compliant object:\n\titer = {};\n\tsetReadOnly( iter, 'next', next );\n\tsetReadOnly( iter, 'return', end );\n\n\tif ( ITERATOR_SYMBOL ) {\n\t\tsetReadOnly( iter, ITERATOR_SYMBOL, factory );\n\t}\n\treturn iter;\n\n\t/**\n\t* Returns an iterator protocol-compliant object containing the next iterated value.\n\t*\n\t* @private\n\t* @returns {Object} iterator protocol-compliant object\n\t*/\n\tfunction next() {\n\t\tvar z;\n\t\ti += 1;\n\t\tif ( FLG || i >= len ) {\n\t\t\treturn {\n\t\t\t\t'done': true\n\t\t\t};\n\t\t}\n\t\tj += 2;\n\t\tz = new Complex64( buffer[ j ], buffer[ j+1 ] );\n\t\treturn {\n\t\t\t'value': [ i, z ],\n\t\t\t'done': false\n\t\t};\n\t}\n\n\t/**\n\t* Finishes an iterator.\n\t*\n\t* @private\n\t* @param {*} [value] - value to return\n\t* @returns {Object} iterator protocol-compliant object\n\t*/\n\tfunction end( value ) {\n\t\tFLG = true;\n\t\tif ( arguments.length ) {\n\t\t\treturn {\n\t\t\t\t'value': value,\n\t\t\t\t'done': true\n\t\t\t};\n\t\t}\n\t\treturn {\n\t\t\t'done': true\n\t\t};\n\t}\n\n\t/**\n\t* Returns a new iterator.\n\t*\n\t* @private\n\t* @returns {Iterator} iterator\n\t*/\n\tfunction factory() {\n\t\treturn self.entries();\n\t}\n});\n\n/**\n* Returns an array element.\n*\n* @name get\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {NonNegativeInteger} idx - element index\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} must provide a nonnegative integer\n* @returns {(Complex64|void)} array element\n*\n* @example\n* var arr = new Complex64Array( 10 );\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* var z = arr.get( 0 );\n* // returns \n*\n* var re = realf( z );\n* // returns 0.0\n*\n* var im = imagf( z );\n* // returns 0.0\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n*\n* z = arr.get( 0 );\n* // returns \n*\n* re = realf( z );\n* // returns 1.0\n*\n* im = imagf( z );\n* // returns -1.0\n*\n* z = arr.get( 100 );\n* // returns undefined\n*/\nsetReadOnly( Complex64Array.prototype, 'get', function get( idx ) {\n\tvar buf;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isNonNegativeInteger( idx ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Must provide a nonnegative integer. Value: `%s`.', idx ) );\n\t}\n\tif ( idx >= this._length ) {\n\t\treturn;\n\t}\n\tbuf = this._buffer;\n\tidx *= 2;\n\treturn new Complex64( buf[ idx ], buf[ idx+1 ] );\n});\n\n/**\n* Number of array elements.\n*\n* @name length\n* @memberof Complex64Array.prototype\n* @readonly\n* @type {NonNegativeInteger}\n*\n* @example\n* var arr = new Complex64Array( 10 );\n*\n* var len = arr.length;\n* // returns 10\n*/\nsetReadOnlyAccessor( Complex64Array.prototype, 'length', function get() {\n\treturn this._length;\n});\n\n/**\n* Sets an array element.\n*\n* ## Notes\n*\n* - When provided a typed array, real or complex, we must check whether the source array shares the same buffer as the target array and whether the underlying memory overlaps. In particular, we are concerned with the following scenario:\n*\n* ```text\n* buf: ---------------------\n* src: ---------------------\n* ```\n*\n* In the above, as we copy values from `src`, we will overwrite values in the `src` view, resulting in duplicated values copied into the end of `buf`, which is not intended. Hence, to avoid overwriting source values, we must **copy** source values to a temporary array.\n*\n* In the other overlapping scenario,\n*\n* ```text\n* buf: ---------------------\n* src: ---------------------\n* ```\n*\n* by the time we begin copying into the overlapping region, we are copying from the end of `src`, a non-overlapping region, which means we don't run the risk of copying copied values, rather than the original `src` values as intended.\n*\n*\n* @name set\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {(Collection|Complex|ComplexArray)} value - value(s)\n* @param {NonNegativeInteger} [i=0] - element index at which to start writing values\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be either a complex number, an array-like object, or a complex number array\n* @throws {TypeError} index argument must be a nonnegative integer\n* @throws {RangeError} array-like objects must have a length which is a multiple of two\n* @throws {RangeError} index argument is out-of-bounds\n* @throws {RangeError} target array lacks sufficient storage to accommodate source values\n* @returns {void}\n*\n* @example\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* var arr = new Complex64Array( 10 );\n*\n* var z = arr.get( 0 );\n* // returns \n*\n* var re = realf( z );\n* // returns 0.0\n*\n* var im = imagf( z );\n* // returns 0.0\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n*\n* z = arr.get( 0 );\n* // returns \n*\n* re = realf( z );\n* // returns 1.0\n*\n* im = imagf( z );\n* // returns -1.0\n*/\nsetReadOnly( Complex64Array.prototype, 'set', function set( value ) {\n\t/* eslint-disable no-underscore-dangle */\n\tvar sbuf;\n\tvar idx;\n\tvar buf;\n\tvar tmp;\n\tvar flg;\n\tvar N;\n\tvar v;\n\tvar i;\n\tvar j;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tbuf = this._buffer;\n\tif ( arguments.length > 1 ) {\n\t\tidx = arguments[ 1 ];\n\t\tif ( !isNonNegativeInteger( idx ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Index argument must be a nonnegative integer. Value: `%s`.', idx ) );\n\t\t}\n\t} else {\n\t\tidx = 0;\n\t}\n\tif ( isComplexLike( value ) ) {\n\t\tif ( idx >= this._length ) {\n\t\t\tthrow new RangeError( format( 'invalid argument. Index argument is out-of-bounds. Value: `%u`.', idx ) );\n\t\t}\n\t\tidx *= 2;\n\t\tbuf[ idx ] = realf( value );\n\t\tbuf[ idx+1 ] = imagf( value );\n\t\treturn;\n\t}\n\tif ( isComplexArray( value ) ) {\n\t\tN = value._length;\n\t\tif ( idx+N > this._length ) {\n\t\t\tthrow new RangeError( 'invalid arguments. Target array lacks sufficient storage to accommodate source values.' );\n\t\t}\n\t\tsbuf = value._buffer;\n\n\t\t// Check for overlapping memory...\n\t\tj = buf.byteOffset + (idx*BYTES_PER_ELEMENT);\n\t\tif (\n\t\t\tsbuf.buffer === buf.buffer &&\n\t\t\t(\n\t\t\t\tsbuf.byteOffset < j &&\n\t\t\t\tsbuf.byteOffset+sbuf.byteLength > j\n\t\t\t)\n\t\t) {\n\t\t\t// We need to copy source values...\n\t\t\ttmp = new Float32Array( sbuf.length );\n\t\t\tfor ( i = 0; i < sbuf.length; i++ ) {\n\t\t\t\ttmp[ i ] = sbuf[ i ];\n\t\t\t}\n\t\t\tsbuf = tmp;\n\t\t}\n\t\tidx *= 2;\n\t\tj = 0;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\tbuf[ idx ] = sbuf[ j ];\n\t\t\tbuf[ idx+1 ] = sbuf[ j+1 ];\n\t\t\tidx += 2; // stride\n\t\t\tj += 2; // stride\n\t\t}\n\t\treturn;\n\t}\n\tif ( isCollection( value ) ) {\n\t\t// Detect whether we've been provided an array of complex numbers...\n\t\tN = value.length;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\tif ( !isComplexLike( value[ i ] ) ) {\n\t\t\t\tflg = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t// If an array does not contain only complex numbers, then we assume interleaved real and imaginary components...\n\t\tif ( flg ) {\n\t\t\tif ( !isEven( N ) ) {\n\t\t\t\tthrow new RangeError( format( 'invalid argument. Array-like object arguments must have a length which is a multiple of two. Length: `%u`.', N ) );\n\t\t\t}\n\t\t\tif ( idx+(N/2) > this._length ) {\n\t\t\t\tthrow new RangeError( 'invalid arguments. Target array lacks sufficient storage to accommodate source values.' );\n\t\t\t}\n\t\t\tsbuf = value;\n\n\t\t\t// Check for overlapping memory...\n\t\t\tj = buf.byteOffset + (idx*BYTES_PER_ELEMENT);\n\t\t\tif (\n\t\t\t\tsbuf.buffer === buf.buffer &&\n\t\t\t\t(\n\t\t\t\t\tsbuf.byteOffset < j &&\n\t\t\t\t\tsbuf.byteOffset+sbuf.byteLength > j\n\t\t\t\t)\n\t\t\t) {\n\t\t\t\t// We need to copy source values...\n\t\t\t\ttmp = new Float32Array( N );\n\t\t\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\t\t\ttmp[ i ] = sbuf[ i ];\n\t\t\t\t}\n\t\t\t\tsbuf = tmp;\n\t\t\t}\n\t\t\tidx *= 2;\n\t\t\tN /= 2;\n\t\t\tj = 0;\n\t\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\t\tbuf[ idx ] = sbuf[ j ];\n\t\t\t\tbuf[ idx+1 ] = sbuf[ j+1 ];\n\t\t\t\tidx += 2; // stride\n\t\t\t\tj += 2; // stride\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\t// If an array contains only complex numbers, then we need to extract real and imaginary components...\n\t\tif ( idx+N > this._length ) {\n\t\t\tthrow new RangeError( 'invalid arguments. Target array lacks sufficient storage to accommodate source values.' );\n\t\t}\n\t\tidx *= 2;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\tv = value[ i ];\n\t\t\tbuf[ idx ] = realf( v );\n\t\t\tbuf[ idx+1 ] = imagf( v );\n\t\t\tidx += 2; // stride\n\t\t}\n\t\treturn;\n\t}\n\tthrow new TypeError( format( 'invalid argument. First argument must be either a complex number, an array-like object, or a complex number array. Value: `%s`.', value ) );\n\n\t/* eslint-enable no-underscore-dangle */\n});\n\n\n// EXPORTS //\n\nexport default Complex64Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Returns the real component of a double-precision complex floating-point number.\n*\n* @param {Complex} z - complex number\n* @returns {number} real component\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n*\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var re = real( z );\n* // returns 5.0\n*/\nfunction real( z ) {\n\treturn z.re;\n}\n\n\n// EXPORTS //\n\nexport default real;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Returns the imaginary component of a double-precision complex floating-point number.\n*\n* @param {Complex} z - complex number\n* @returns {number} imaginary component\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n*\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var im = imag( z );\n* // returns 3.0\n*/\nfunction imag( z ) {\n\treturn z.im;\n}\n\n\n// EXPORTS //\n\nexport default imag;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isArrayLikeObject from '@stdlib/assert-is-array-like-object';\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport format from '@stdlib/string-format';\nimport real from '@stdlib/complex-real';\nimport imag from '@stdlib/complex-imag';\n\n\n// MAIN //\n\n/**\n* Returns an array of iterated values.\n*\n* @private\n* @param {Object} it - iterator\n* @returns {(Array|TypeError)} array or an error\n*/\nfunction fromIterator( it ) {\n\tvar out;\n\tvar v;\n\tvar z;\n\n\tout = [];\n\twhile ( true ) {\n\t\tv = it.next();\n\t\tif ( v.done ) {\n\t\t\tbreak;\n\t\t}\n\t\tz = v.value;\n\t\tif ( isArrayLikeObject( z ) && z.length >= 2 ) {\n\t\t\tout.push( z[ 0 ], z[ 1 ] );\n\t\t} else if ( isComplexLike( z ) ) {\n\t\t\tout.push( real( z ), imag( z ) );\n\t\t} else {\n\t\t\treturn new TypeError( format( 'invalid argument. An iterator must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', z ) );\n\t\t}\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default fromIterator;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isArrayLikeObject from '@stdlib/assert-is-array-like-object';\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport format from '@stdlib/string-format';\nimport real from '@stdlib/complex-real';\nimport imag from '@stdlib/complex-imag';\n\n\n// MAIN //\n\n/**\n* Returns an array of iterated values.\n*\n* @private\n* @param {Object} it - iterator\n* @param {Function} clbk - callback to invoke for each iterated value\n* @param {*} thisArg - invocation context\n* @returns {(Array|TypeError)} array or an error\n*/\nfunction fromIteratorMap( it, clbk, thisArg ) {\n\tvar out;\n\tvar v;\n\tvar z;\n\tvar i;\n\n\tout = [];\n\ti = -1;\n\twhile ( true ) {\n\t\tv = it.next();\n\t\tif ( v.done ) {\n\t\t\tbreak;\n\t\t}\n\t\ti += 1;\n\t\tz = clbk.call( thisArg, v.value, i );\n\t\tif ( isArrayLikeObject( z ) && z.length >= 2 ) {\n\t\t\tout.push( z[ 0 ], z[ 1 ] );\n\t\t} else if ( isComplexLike( z ) ) {\n\t\t\tout.push( real( z ), imag( z ) );\n\t\t} else {\n\t\t\treturn new TypeError( format( 'invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', z ) );\n\t\t}\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default fromIteratorMap;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport real from '@stdlib/complex-real';\nimport imag from '@stdlib/complex-imag';\n\n\n// MAIN //\n\n/**\n* Returns a strided array of real and imaginary components.\n*\n* @private\n* @param {Float64Array} buf - output array\n* @param {Array} arr - array containing complex numbers\n* @returns {(Float64Array|null)} output array or null\n*/\nfunction fromArray( buf, arr ) {\n\tvar len;\n\tvar v;\n\tvar i;\n\tvar j;\n\n\tlen = arr.length;\n\tj = 0;\n\tfor ( i = 0; i < len; i++ ) {\n\t\tv = arr[ i ];\n\t\tif ( !isComplexLike( v ) ) {\n\t\t\treturn null;\n\t\t}\n\t\tbuf[ j ] = real( v );\n\t\tbuf[ j+1 ] = imag( v );\n\t\tj += 2; // stride\n\t}\n\treturn buf;\n}\n\n\n// EXPORTS //\n\nexport default fromArray;\n","/* eslint-disable no-restricted-syntax, max-lines, no-invalid-this */\n\n/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isNonNegativeInteger } from '@stdlib/assert-is-nonnegative-integer';\nimport isArrayLikeObject from '@stdlib/assert-is-array-like-object';\nimport isCollection from '@stdlib/assert-is-collection';\nimport isArrayBuffer from '@stdlib/assert-is-arraybuffer';\nimport isObject from '@stdlib/assert-is-object';\nimport isArray from '@stdlib/assert-is-array';\nimport isFunction from '@stdlib/assert-is-function';\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport isEven from '@stdlib/math-base-assert-is-even';\nimport isInteger from '@stdlib/math-base-assert-is-integer';\nimport hasIteratorSymbolSupport from '@stdlib/assert-has-iterator-symbol-support';\nimport ITERATOR_SYMBOL from '@stdlib/symbol-iterator';\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport setReadOnlyAccessor from '@stdlib/utils-define-nonenumerable-read-only-accessor';\nimport Float64Array from '@stdlib/array-float64';\nimport Complex128 from '@stdlib/complex-float64';\nimport real from '@stdlib/complex-real';\nimport imag from '@stdlib/complex-imag';\nimport reinterpret64 from '@stdlib/strided-base-reinterpret-complex64';\nimport reinterpret128 from '@stdlib/strided-base-reinterpret-complex128';\nimport getter from '@stdlib/array-base-getter';\nimport accessorGetter from '@stdlib/array-base-accessor-getter';\nimport format from '@stdlib/string-format';\nimport fromIterator from './from_iterator.js';\nimport fromIteratorMap from './from_iterator_map.js';\nimport fromArray from './from_array.js';\n\n\n// VARIABLES //\n\nvar BYTES_PER_ELEMENT = Float64Array.BYTES_PER_ELEMENT * 2;\nvar HAS_ITERATOR_SYMBOL = hasIteratorSymbolSupport();\n\n\n// FUNCTIONS //\n\n/**\n* Returns a boolean indicating if a value is a complex typed array.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a complex typed array\n*/\nfunction isComplexArray( value ) {\n\treturn (\n\t\tvalue instanceof Complex128Array ||\n\t\t(\n\t\t\ttypeof value === 'object' &&\n\t\t\tvalue !== null &&\n\t\t\t(\n\t\t\t\tvalue.constructor.name === 'Complex64Array' ||\n\t\t\t\tvalue.constructor.name === 'Complex128Array'\n\t\t\t) &&\n\t\t\ttypeof value._length === 'number' && // eslint-disable-line no-underscore-dangle\n\n\t\t\t// NOTE: we don't perform a more rigorous test here for a typed array for performance reasons, as robustly checking for a typed array instance could require walking the prototype tree and performing relatively expensive constructor checks...\n\t\t\ttypeof value._buffer === 'object' // eslint-disable-line no-underscore-dangle\n\t\t)\n\t);\n}\n\n/**\n* Returns a boolean indicating if a value is a complex typed array constructor.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a complex typed array constructor\n*/\nfunction isComplexArrayConstructor( value ) {\n\treturn (\n\t\tvalue === Complex128Array ||\n\n\t\t// NOTE: weaker test in order to avoid a circular dependency with Complex64Array...\n\t\tvalue.name === 'Complex64Array'\n\t);\n}\n\n/**\n* Returns a boolean indicating if a value is a `Complex64Array`.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a `Complex64Array`\n*/\nfunction isComplex64Array( value ) {\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\tvalue.constructor.name === 'Complex64Array' &&\n\t\tvalue.BYTES_PER_ELEMENT === BYTES_PER_ELEMENT/2\n\t);\n}\n\n/**\n* Returns a boolean indicating if a value is a `Complex128Array`.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a `Complex128Array`\n*/\nfunction isComplex128Array( value ) {\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\tvalue.constructor.name === 'Complex128Array' &&\n\t\tvalue.BYTES_PER_ELEMENT === BYTES_PER_ELEMENT\n\t);\n}\n\n\n// MAIN //\n\n/**\n* 128-bit complex number array constructor.\n*\n* @constructor\n* @param {(NonNegativeInteger|Collection|ArrayBuffer|Iterable)} [arg] - length, typed array, array-like object, buffer, or iterable\n* @param {NonNegativeInteger} [byteOffset=0] - byte offset\n* @param {NonNegativeInteger} [length] - view length\n* @throws {RangeError} ArrayBuffer byte length must be a multiple of `16`\n* @throws {RangeError} array-like object and typed array input arguments must have a length which is a multiple of two\n* @throws {TypeError} if provided only a single argument, must provide a valid argument\n* @throws {TypeError} byte offset must be a nonnegative integer\n* @throws {RangeError} byte offset must be a multiple of `16`\n* @throws {TypeError} view length must be a positive multiple of `16`\n* @throws {RangeError} must provide sufficient memory to accommodate byte offset and view length requirements\n* @throws {TypeError} an iterator must return either a two element array containing real and imaginary components or a complex number\n* @returns {Complex128Array} complex number array\n*\n* @example\n* var arr = new Complex128Array();\n* // returns \n*\n* var len = arr.length;\n* // returns 0\n*\n* @example\n* var arr = new Complex128Array( 2 );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*\n* @example\n* var arr = new Complex128Array( [ 1.0, -1.0 ] );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* import ArrayBuffer from '@stdlib/array-buffer';\n*\n* var buf = new ArrayBuffer( 32 );\n* var arr = new Complex128Array( buf );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*\n* @example\n* import ArrayBuffer from '@stdlib/array-buffer';\n*\n* var buf = new ArrayBuffer( 32 );\n* var arr = new Complex128Array( buf, 16 );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* import ArrayBuffer from '@stdlib/array-buffer';\n*\n* var buf = new ArrayBuffer( 64 );\n* var arr = new Complex128Array( buf, 16, 2 );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*/\nfunction Complex128Array() {\n\tvar byteOffset;\n\tvar nargs;\n\tvar buf;\n\tvar len;\n\n\tnargs = arguments.length;\n\tif ( !(this instanceof Complex128Array) ) {\n\t\tif ( nargs === 0 ) {\n\t\t\treturn new Complex128Array();\n\t\t}\n\t\tif ( nargs === 1 ) {\n\t\t\treturn new Complex128Array( arguments[0] );\n\t\t}\n\t\tif ( nargs === 2 ) {\n\t\t\treturn new Complex128Array( arguments[0], arguments[1] );\n\t\t}\n\t\treturn new Complex128Array( arguments[0], arguments[1], arguments[2] );\n\t}\n\t// Create the underlying data buffer...\n\tif ( nargs === 0 ) {\n\t\tbuf = new Float64Array( 0 ); // backward-compatibility\n\t} else if ( nargs === 1 ) {\n\t\tif ( isNonNegativeInteger( arguments[0] ) ) {\n\t\t\tbuf = new Float64Array( arguments[0]*2 );\n\t\t} else if ( isCollection( arguments[0] ) ) {\n\t\t\tbuf = arguments[ 0 ];\n\t\t\tlen = buf.length;\n\n\t\t\t// If provided a \"generic\" array, peak at the first value, and, if the value is a complex number, try to process as an array of complex numbers, falling back to \"normal\" typed array initialization if we fail and ensuring consistency if the first value had not been a complex number...\n\t\t\tif ( len && isArray( buf ) && isComplexLike( buf[0] ) ) {\n\t\t\t\tbuf = fromArray( new Float64Array( len*2 ), buf );\n\t\t\t\tif ( buf === null ) {\n\t\t\t\t\t// We failed and we are now forced to allocate a new array :-(\n\t\t\t\t\tif ( !isEven( len ) ) {\n\t\t\t\t\t\tthrow new RangeError( format( 'invalid argument. Array-like object arguments must have a length which is a multiple of two. Length: `%u`.', len ) );\n\t\t\t\t\t}\n\t\t\t\t\t// We failed, so fall back to directly setting values...\n\t\t\t\t\tbuf = new Float64Array( arguments[0] );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ( isComplex64Array( buf ) ) {\n\t\t\t\t\tbuf = reinterpret64( buf, 0 );\n\t\t\t\t} else if ( isComplex128Array( buf ) ) {\n\t\t\t\t\tbuf = reinterpret128( buf, 0 );\n\t\t\t\t} else if ( !isEven( len ) ) {\n\t\t\t\t\tthrow new RangeError( format( 'invalid argument. Array-like object and typed array arguments must have a length which is a multiple of two. Length: `%u`.', len ) );\n\t\t\t\t}\n\t\t\t\tbuf = new Float64Array( buf );\n\t\t\t}\n\t\t} else if ( isArrayBuffer( arguments[0] ) ) {\n\t\t\tbuf = arguments[ 0 ];\n\t\t\tif ( !isInteger( buf.byteLength/BYTES_PER_ELEMENT ) ) {\n\t\t\t\tthrow new RangeError( format( 'invalid argument. ArrayBuffer byte length must be a multiple of %u. Byte length: `%u`.', BYTES_PER_ELEMENT, buf.byteLength ) );\n\t\t\t}\n\t\t\tbuf = new Float64Array( buf );\n\t\t} else if ( isObject( arguments[0] ) ) {\n\t\t\tbuf = arguments[ 0 ];\n\t\t\tif ( HAS_ITERATOR_SYMBOL === false ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Environment lacks Symbol.iterator support. Must provide a length, ArrayBuffer, typed array, or array-like object. Value: `%s`.', buf ) );\n\t\t\t}\n\t\t\tif ( !isFunction( buf[ ITERATOR_SYMBOL ] ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.', buf ) );\n\t\t\t}\n\t\t\tbuf = buf[ ITERATOR_SYMBOL ]();\n\t\t\tif ( !isFunction( buf.next ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.', buf ) );\n\t\t\t}\n\t\t\tbuf = fromIterator( buf );\n\t\t\tif ( buf instanceof Error ) {\n\t\t\t\tthrow buf;\n\t\t\t}\n\t\t\tbuf = new Float64Array( buf );\n\t\t} else {\n\t\t\tthrow new TypeError( format( 'invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.', arguments[0] ) );\n\t\t}\n\t} else {\n\t\tbuf = arguments[ 0 ];\n\t\tif ( !isArrayBuffer( buf ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. First argument must be an ArrayBuffer. Value: `%s`.', buf ) );\n\t\t}\n\t\tbyteOffset = arguments[ 1 ];\n\t\tif ( !isNonNegativeInteger( byteOffset ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Byte offset must be a nonnegative integer. Value: `%s`.', byteOffset ) );\n\t\t}\n\t\tif ( !isInteger( byteOffset/BYTES_PER_ELEMENT ) ) {\n\t\t\tthrow new RangeError( format( 'invalid argument. Byte offset must be a multiple of %u. Value: `%u`.', BYTES_PER_ELEMENT, byteOffset ) );\n\t\t}\n\t\tif ( nargs === 2 ) {\n\t\t\tlen = buf.byteLength - byteOffset;\n\t\t\tif ( !isInteger( len/BYTES_PER_ELEMENT ) ) {\n\t\t\t\tthrow new RangeError( format( 'invalid arguments. ArrayBuffer view byte length must be a multiple of %u. View byte length: `%u`.', BYTES_PER_ELEMENT, len ) );\n\t\t\t}\n\t\t\tbuf = new Float64Array( buf, byteOffset );\n\t\t} else {\n\t\t\tlen = arguments[ 2 ];\n\t\t\tif ( !isNonNegativeInteger( len ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Length must be a nonnegative integer. Value: `%s`.', len ) );\n\t\t\t}\n\t\t\tif ( (len*BYTES_PER_ELEMENT) > (buf.byteLength-byteOffset) ) {\n\t\t\t\tthrow new RangeError( format( 'invalid arguments. ArrayBuffer has insufficient capacity. Either decrease the array length or provide a bigger buffer. Minimum capacity: `%u`.', len*BYTES_PER_ELEMENT ) );\n\t\t\t}\n\t\t\tbuf = new Float64Array( buf, byteOffset, len*2 );\n\t\t}\n\t}\n\tsetReadOnly( this, '_buffer', buf );\n\tsetReadOnly( this, '_length', buf.length/2 );\n\n\treturn this;\n}\n\n/**\n* Size (in bytes) of each array element.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex128Array\n* @readonly\n* @type {PositiveInteger}\n* @default 16\n*\n* @example\n* var nbytes = Complex128Array.BYTES_PER_ELEMENT;\n* // returns 16\n*/\nsetReadOnly( Complex128Array, 'BYTES_PER_ELEMENT', BYTES_PER_ELEMENT );\n\n/**\n* Constructor name.\n*\n* @name name\n* @memberof Complex128Array\n* @readonly\n* @type {string}\n* @default 'Complex128Array'\n*\n* @example\n* var name = Complex128Array.name;\n* // returns 'Complex128Array'\n*/\nsetReadOnly( Complex128Array, 'name', 'Complex128Array' );\n\n/**\n* Creates a new 128-bit complex number array from an array-like object or an iterable.\n*\n* @name from\n* @memberof Complex128Array\n* @type {Function}\n* @param {(Collection|Object)} src - array-like object or iterable\n* @param {Function} [clbk] - callback to invoke for each source element\n* @param {*} [thisArg] - context\n* @throws {TypeError} `this` context must be a constructor\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be an array-like object or an iterable\n* @throws {TypeError} second argument must be a function\n* @throws {RangeError} array-like objects must have a length which is a multiple of two\n* @throws {TypeError} an iterator must return either a two element array containing real and imaginary components or a complex number\n* @throws {TypeError} when provided an iterator, a callback must return either a two element array containing real and imaginary components or a complex number\n* @returns {Complex128Array} 128-bit complex number array\n*\n* @example\n* var arr = Complex128Array.from( [ 1.0, -1.0 ] );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n*\n* var arr = Complex128Array.from( [ new Complex128( 1.0, 1.0 ) ] );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* function clbk( v ) {\n* return new Complex128( real(v)*2.0, imag(v)*2.0 );\n* }\n*\n* var arr = Complex128Array.from( [ new Complex128( 1.0, 1.0 ) ], clbk );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*/\nsetReadOnly( Complex128Array, 'from', function from( src ) {\n\tvar thisArg;\n\tvar nargs;\n\tvar clbk;\n\tvar out;\n\tvar buf;\n\tvar tmp;\n\tvar get;\n\tvar len;\n\tvar flg;\n\tvar v;\n\tvar i;\n\tvar j;\n\tif ( !isFunction( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` context must be a constructor.' );\n\t}\n\tif ( !isComplexArrayConstructor( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tnargs = arguments.length;\n\tif ( nargs > 1 ) {\n\t\tclbk = arguments[ 1 ];\n\t\tif ( !isFunction( clbk ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be a function. Value: `%s`.', clbk ) );\n\t\t}\n\t\tif ( nargs > 2 ) {\n\t\t\tthisArg = arguments[ 2 ];\n\t\t}\n\t}\n\tif ( isComplexArray( src ) ) {\n\t\tlen = src.length;\n\t\tif ( clbk ) {\n\t\t\tout = new this( len );\n\t\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\t\tj = 0;\n\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\tv = clbk.call( thisArg, src.get( i ), i );\n\t\t\t\tif ( isComplexLike( v ) ) {\n\t\t\t\t\tbuf[ j ] = real( v );\n\t\t\t\t\tbuf[ j+1 ] = imag( v );\n\t\t\t\t} else if ( isArrayLikeObject( v ) && v.length >= 2 ) {\n\t\t\t\t\tbuf[ j ] = v[ 0 ];\n\t\t\t\t\tbuf[ j+1 ] = v[ 1 ];\n\t\t\t\t} else {\n\t\t\t\t\tthrow new TypeError( format( 'invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', v ) );\n\t\t\t\t}\n\t\t\t\tj += 2; // stride\n\t\t\t}\n\t\t\treturn out;\n\t\t}\n\t\treturn new this( src );\n\t}\n\tif ( isCollection( src ) ) {\n\t\tif ( clbk ) {\n\t\t\t// Note: array contents affect how we iterate over a provided data source. If only complex number objects, we can extract real and imaginary components. Otherwise, for non-complex number arrays (e.g., `Float64Array`, etc), we assume a strided array where real and imaginary components are interleaved. In the former case, we expect a callback to return real and imaginary components (possibly as a complex number). In the latter case, we expect a callback to return *either* a real or imaginary component.\n\n\t\t\tlen = src.length;\n\t\t\tif ( src.get && src.set ) {\n\t\t\t\tget = accessorGetter( 'default' );\n\t\t\t} else {\n\t\t\t\tget = getter( 'default' );\n\t\t\t}\n\t\t\t// Detect whether we've been provided an array which returns complex number objects...\n\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\tif ( !isComplexLike( get( src, i ) ) ) {\n\t\t\t\t\tflg = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// If an array does not contain only complex number objects, then we assume interleaved real and imaginary components...\n\t\t\tif ( flg ) {\n\t\t\t\tif ( !isEven( len ) ) {\n\t\t\t\t\tthrow new RangeError( format( 'invalid argument. First argument must have a length which is a multiple of two. Length: `%u`.', len ) );\n\t\t\t\t}\n\t\t\t\tout = new this( len/2 );\n\t\t\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\t\tbuf[ i ] = clbk.call( thisArg, get( src, i ), i );\n\t\t\t\t}\n\t\t\t\treturn out;\n\t\t\t}\n\t\t\t// If an array contains only complex number objects, then we need to extract real and imaginary components...\n\t\t\tout = new this( len );\n\t\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\t\tj = 0;\n\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\tv = clbk.call( thisArg, get( src, i ), i );\n\t\t\t\tif ( isComplexLike( v ) ) {\n\t\t\t\t\tbuf[ j ] = real( v );\n\t\t\t\t\tbuf[ j+1 ] = imag( v );\n\t\t\t\t} else if ( isArrayLikeObject( v ) && v.length >= 2 ) {\n\t\t\t\t\tbuf[ j ] = v[ 0 ];\n\t\t\t\t\tbuf[ j+1 ] = v[ 1 ];\n\t\t\t\t} else {\n\t\t\t\t\tthrow new TypeError( format( 'invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', v ) );\n\t\t\t\t}\n\t\t\t\tj += 2; // stride\n\t\t\t}\n\t\t\treturn out;\n\t\t}\n\t\treturn new this( src );\n\t}\n\tif ( isObject( src ) && HAS_ITERATOR_SYMBOL && isFunction( src[ ITERATOR_SYMBOL ] ) ) { // eslint-disable-line max-len\n\t\tbuf = src[ ITERATOR_SYMBOL ]();\n\t\tif ( !isFunction( buf.next ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.', src ) );\n\t\t}\n\t\tif ( clbk ) {\n\t\t\ttmp = fromIteratorMap( buf, clbk, thisArg );\n\t\t} else {\n\t\t\ttmp = fromIterator( buf );\n\t\t}\n\t\tif ( tmp instanceof Error ) {\n\t\t\tthrow tmp;\n\t\t}\n\t\tlen = tmp.length / 2;\n\t\tout = new this( len );\n\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\tbuf[ i ] = tmp[ i ];\n\t\t}\n\t\treturn out;\n\t}\n\tthrow new TypeError( format( 'invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.', src ) );\n});\n\n/**\n* Creates a new 128-bit complex number array from a variable number of arguments.\n*\n* @name of\n* @memberof Complex128Array\n* @type {Function}\n* @param {...*} element - array elements\n* @throws {TypeError} `this` context must be a constructor\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Complex128Array} 128-bit complex number array\n*\n* @example\n* var arr = Complex128Array.of( 1.0, 1.0, 1.0, 1.0 );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*/\nsetReadOnly( Complex128Array, 'of', function of() {\n\tvar args;\n\tvar i;\n\tif ( !isFunction( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` context must be a constructor.' );\n\t}\n\tif ( !isComplexArrayConstructor( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\targs = [];\n\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\targs.push( arguments[ i ] );\n\t}\n\treturn new this( args );\n});\n\n/**\n* Pointer to the underlying data buffer.\n*\n* @name buffer\n* @memberof Complex128Array.prototype\n* @readonly\n* @type {ArrayBuffer}\n*\n* @example\n* var arr = new Complex128Array( 10 );\n*\n* var buf = arr.buffer;\n* // returns \n*/\nsetReadOnlyAccessor( Complex128Array.prototype, 'buffer', function get() {\n\treturn this._buffer.buffer;\n});\n\n/**\n* Size (in bytes) of the array.\n*\n* @name byteLength\n* @memberof Complex128Array.prototype\n* @readonly\n* @type {NonNegativeInteger}\n*\n* @example\n* var arr = new Complex128Array( 10 );\n*\n* var byteLength = arr.byteLength;\n* // returns 160\n*/\nsetReadOnlyAccessor( Complex128Array.prototype, 'byteLength', function get() {\n\treturn this._buffer.byteLength;\n});\n\n/**\n* Offset (in bytes) of the array from the start of its underlying `ArrayBuffer`.\n*\n* @name byteOffset\n* @memberof Complex128Array.prototype\n* @readonly\n* @type {NonNegativeInteger}\n*\n* @example\n* var arr = new Complex128Array( 10 );\n*\n* var byteOffset = arr.byteOffset;\n* // returns 0\n*/\nsetReadOnlyAccessor( Complex128Array.prototype, 'byteOffset', function get() {\n\treturn this._buffer.byteOffset;\n});\n\n/**\n* Size (in bytes) of each array element.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex128Array.prototype\n* @readonly\n* @type {PositiveInteger}\n* @default 16\n*\n* @example\n* var arr = new Complex128Array( 10 );\n*\n* var nbytes = arr.BYTES_PER_ELEMENT;\n* // returns 16\n*/\nsetReadOnly( Complex128Array.prototype, 'BYTES_PER_ELEMENT', Complex128Array.BYTES_PER_ELEMENT );\n\n/**\n* Copies a sequence of elements within the array to the position starting at `target`.\n*\n* @name copyWithin\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {integer} target - index at which to start copying elements\n* @param {integer} start - source index at which to copy elements from\n* @param {integer} [end] - source index at which to stop copying elements from\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Complex128Array} modified array\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* var arr = new Complex128Array( 4 );\n*\n* // Set the array elements:\n* arr.set( new Complex128( 1.0, 1.0 ), 0 );\n* arr.set( new Complex128( 2.0, 2.0 ), 1 );\n* arr.set( new Complex128( 3.0, 3.0 ), 2 );\n* arr.set( new Complex128( 4.0, 4.0 ), 3 );\n*\n* // Copy the first two elements to the last two elements:\n* arr.copyWithin( 2, 0, 2 );\n*\n* // Get the last array element:\n* var z = arr.get( 3 );\n*\n* var re = real( z );\n* // returns 2.0\n*\n* var im = imag( z );\n* // returns 2.0\n*/\nsetReadOnly( Complex128Array.prototype, 'copyWithin', function copyWithin( target, start ) {\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\t// FIXME: prefer a functional `copyWithin` implementation which addresses lack of universal browser support (e.g., IE11 and Safari) or ensure that typed arrays are polyfilled\n\tif ( arguments.length === 2 ) {\n\t\tthis._buffer.copyWithin( target*2, start*2 );\n\t} else {\n\t\tthis._buffer.copyWithin( target*2, start*2, arguments[2]*2 );\n\t}\n\treturn this;\n});\n\n/**\n* Returns an iterator for iterating over array key-value pairs.\n*\n* @name entries\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Iterator} iterator\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n*\n* var arr = [\n* new Complex128( 1.0, 1.0 ),\n* new Complex128( 2.0, 2.0 ),\n* new Complex128( 3.0, 3.0 )\n* ];\n* arr = new Complex128Array( arr );\n*\n* // Create an iterator:\n* var it = arr.entries();\n*\n* // Iterate over the key-value pairs...\n* var v = it.next().value;\n* // returns [ 0, ]\n*\n* v = it.next().value;\n* // returns [ 1, ]\n*\n* v = it.next().value;\n* // returns [ 2, ]\n*\n* var bool = it.next().done;\n* // returns true\n*/\nsetReadOnly( Complex128Array.prototype, 'entries', function entries() {\n\tvar buffer;\n\tvar self;\n\tvar iter;\n\tvar len;\n\tvar FLG;\n\tvar i;\n\tvar j;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tself = this;\n\tbuffer = this._buffer;\n\tlen = this._length;\n\n\t// Initialize the iteration indices:\n\ti = -1;\n\tj = -2;\n\n\t// Create an iterator protocol-compliant object:\n\titer = {};\n\tsetReadOnly( iter, 'next', next );\n\tsetReadOnly( iter, 'return', end );\n\n\tif ( ITERATOR_SYMBOL ) {\n\t\tsetReadOnly( iter, ITERATOR_SYMBOL, factory );\n\t}\n\treturn iter;\n\n\t/**\n\t* Returns an iterator protocol-compliant object containing the next iterated value.\n\t*\n\t* @private\n\t* @returns {Object} iterator protocol-compliant object\n\t*/\n\tfunction next() {\n\t\tvar z;\n\t\ti += 1;\n\t\tif ( FLG || i >= len ) {\n\t\t\treturn {\n\t\t\t\t'done': true\n\t\t\t};\n\t\t}\n\t\tj += 2;\n\t\tz = new Complex128( buffer[ j ], buffer[ j+1 ] );\n\t\treturn {\n\t\t\t'value': [ i, z ],\n\t\t\t'done': false\n\t\t};\n\t}\n\n\t/**\n\t* Finishes an iterator.\n\t*\n\t* @private\n\t* @param {*} [value] - value to return\n\t* @returns {Object} iterator protocol-compliant object\n\t*/\n\tfunction end( value ) {\n\t\tFLG = true;\n\t\tif ( arguments.length ) {\n\t\t\treturn {\n\t\t\t\t'value': value,\n\t\t\t\t'done': true\n\t\t\t};\n\t\t}\n\t\treturn {\n\t\t\t'done': true\n\t\t};\n\t}\n\n\t/**\n\t* Returns a new iterator.\n\t*\n\t* @private\n\t* @returns {Iterator} iterator\n\t*/\n\tfunction factory() {\n\t\treturn self.entries();\n\t}\n});\n\n/**\n* Returns an array element.\n*\n* @name get\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {NonNegativeInteger} idx - element index\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} must provide a nonnegative integer\n* @returns {(Complex128|void)} array element\n*\n* @example\n* var arr = new Complex128Array( 10 );\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* var z = arr.get( 0 );\n* // returns \n*\n* var re = real( z );\n* // returns 0.0\n*\n* var im = imag( z );\n* // returns 0.0\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n*\n* z = arr.get( 0 );\n* // returns \n*\n* re = real( z );\n* // returns 1.0\n*\n* im = imag( z );\n* // returns -1.0\n*\n* z = arr.get( 100 );\n* // returns undefined\n*/\nsetReadOnly( Complex128Array.prototype, 'get', function get( idx ) {\n\tvar buf;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isNonNegativeInteger( idx ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Must provide a nonnegative integer. Value: `%s`.', idx ) );\n\t}\n\tif ( idx >= this._length ) {\n\t\treturn;\n\t}\n\tbuf = this._buffer;\n\tidx *= 2;\n\treturn new Complex128( buf[ idx ], buf[ idx+1 ] );\n});\n\n/**\n* Number of array elements.\n*\n* @name length\n* @memberof Complex128Array.prototype\n* @readonly\n* @type {NonNegativeInteger}\n*\n* @example\n* var arr = new Complex128Array( 10 );\n*\n* var len = arr.length;\n* // returns 10\n*/\nsetReadOnlyAccessor( Complex128Array.prototype, 'length', function get() {\n\treturn this._length;\n});\n\n/**\n* Sets an array element.\n*\n* ## Notes\n*\n* - When provided a typed array, real or complex, we must check whether the source array shares the same buffer as the target array and whether the underlying memory overlaps. In particular, we are concerned with the following scenario:\n*\n* ```text\n* buf: ---------------------\n* src: ---------------------\n* ```\n*\n* In the above, as we copy values from `src`, we will overwrite values in the `src` view, resulting in duplicated values copied into the end of `buf`, which is not intended. Hence, to avoid overwriting source values, we must **copy** source values to a temporary array.\n*\n* In the other overlapping scenario,\n*\n* ```text\n* buf: ---------------------\n* src: ---------------------\n* ```\n*\n* by the time we begin copying into the overlapping region, we are copying from the end of `src`, a non-overlapping region, which means we don't run the risk of copying copied values, rather than the original `src` values as intended.\n*\n*\n* @name set\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {(Collection|Complex|ComplexArray)} value - value(s)\n* @param {NonNegativeInteger} [i=0] - element index at which to start writing values\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be either a complex number, an array-like object, or a complex number array\n* @throws {TypeError} index argument must be a nonnegative integer\n* @throws {RangeError} array-like objects must have a length which is a multiple of two\n* @throws {RangeError} index argument is out-of-bounds\n* @throws {RangeError} target array lacks sufficient storage to accommodate source values\n* @returns {void}\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* var arr = new Complex128Array( 10 );\n*\n* var z = arr.get( 0 );\n* // returns \n*\n* var re = real( z );\n* // returns 0.0\n*\n* var im = imag( z );\n* // returns 0.0\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n*\n* z = arr.get( 0 );\n* // returns \n*\n* re = real( z );\n* // returns 1.0\n*\n* im = imag( z );\n* // returns -1.0\n*/\nsetReadOnly( Complex128Array.prototype, 'set', function set( value ) {\n\t/* eslint-disable no-underscore-dangle */\n\tvar sbuf;\n\tvar idx;\n\tvar buf;\n\tvar tmp;\n\tvar flg;\n\tvar N;\n\tvar v;\n\tvar i;\n\tvar j;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tbuf = this._buffer;\n\tif ( arguments.length > 1 ) {\n\t\tidx = arguments[ 1 ];\n\t\tif ( !isNonNegativeInteger( idx ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Index argument must be a nonnegative integer. Value: `%s`.', idx ) );\n\t\t}\n\t} else {\n\t\tidx = 0;\n\t}\n\tif ( isComplexLike( value ) ) {\n\t\tif ( idx >= this._length ) {\n\t\t\tthrow new RangeError( format( 'invalid argument. Index argument is out-of-bounds. Value: `%u`.', idx ) );\n\t\t}\n\t\tidx *= 2;\n\t\tbuf[ idx ] = real( value );\n\t\tbuf[ idx+1 ] = imag( value );\n\t\treturn;\n\t}\n\tif ( isComplexArray( value ) ) {\n\t\tN = value._length;\n\t\tif ( idx+N > this._length ) {\n\t\t\tthrow new RangeError( 'invalid arguments. Target array lacks sufficient storage to accommodate source values.' );\n\t\t}\n\t\tsbuf = value._buffer;\n\n\t\t// Check for overlapping memory...\n\t\tj = buf.byteOffset + (idx*BYTES_PER_ELEMENT);\n\t\tif (\n\t\t\tsbuf.buffer === buf.buffer &&\n\t\t\t(\n\t\t\t\tsbuf.byteOffset < j &&\n\t\t\t\tsbuf.byteOffset+sbuf.byteLength > j\n\t\t\t)\n\t\t) {\n\t\t\t// We need to copy source values...\n\t\t\ttmp = new Float64Array( sbuf.length );\n\t\t\tfor ( i = 0; i < sbuf.length; i++ ) {\n\t\t\t\ttmp[ i ] = sbuf[ i ];\n\t\t\t}\n\t\t\tsbuf = tmp;\n\t\t}\n\t\tidx *= 2;\n\t\tj = 0;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\tbuf[ idx ] = sbuf[ j ];\n\t\t\tbuf[ idx+1 ] = sbuf[ j+1 ];\n\t\t\tidx += 2; // stride\n\t\t\tj += 2; // stride\n\t\t}\n\t\treturn;\n\t}\n\tif ( isCollection( value ) ) {\n\t\t// Detect whether we've been provided an array of complex numbers...\n\t\tN = value.length;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\tif ( !isComplexLike( value[ i ] ) ) {\n\t\t\t\tflg = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t// If an array does not contain only complex numbers, then we assume interleaved real and imaginary components...\n\t\tif ( flg ) {\n\t\t\tif ( !isEven( N ) ) {\n\t\t\t\tthrow new RangeError( format( 'invalid argument. Array-like object arguments must have a length which is a multiple of two. Length: `%u`.', N ) );\n\t\t\t}\n\t\t\tif ( idx+(N/2) > this._length ) {\n\t\t\t\tthrow new RangeError( 'invalid arguments. Target array lacks sufficient storage to accommodate source values.' );\n\t\t\t}\n\t\t\tsbuf = value;\n\n\t\t\t// Check for overlapping memory...\n\t\t\tj = buf.byteOffset + (idx*BYTES_PER_ELEMENT);\n\t\t\tif (\n\t\t\t\tsbuf.buffer === buf.buffer &&\n\t\t\t\t(\n\t\t\t\t\tsbuf.byteOffset < j &&\n\t\t\t\t\tsbuf.byteOffset+sbuf.byteLength > j\n\t\t\t\t)\n\t\t\t) {\n\t\t\t\t// We need to copy source values...\n\t\t\t\ttmp = new Float64Array( N );\n\t\t\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\t\t\ttmp[ i ] = sbuf[ i ];\n\t\t\t\t}\n\t\t\t\tsbuf = tmp;\n\t\t\t}\n\t\t\tidx *= 2;\n\t\t\tN /= 2;\n\t\t\tj = 0;\n\t\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\t\tbuf[ idx ] = sbuf[ j ];\n\t\t\t\tbuf[ idx+1 ] = sbuf[ j+1 ];\n\t\t\t\tidx += 2; // stride\n\t\t\t\tj += 2; // stride\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\t// If an array contains only complex numbers, then we need to extract real and imaginary components...\n\t\tif ( idx+N > this._length ) {\n\t\t\tthrow new RangeError( 'invalid arguments. Target array lacks sufficient storage to accommodate source values.' );\n\t\t}\n\t\tidx *= 2;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\tv = value[ i ];\n\t\t\tbuf[ idx ] = real( v );\n\t\t\tbuf[ idx+1 ] = imag( v );\n\t\t\tidx += 2; // stride\n\t\t}\n\t\treturn;\n\t}\n\tthrow new TypeError( format( 'invalid argument. First argument must be either a complex number, an array-like object, or a complex number array. Value: `%s`.', value ) );\n\n\t/* eslint-enable no-underscore-dangle */\n});\n\n\n// EXPORTS //\n\nexport default Complex128Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport Float64Array from '@stdlib/array-float64';\nimport Float32Array from '@stdlib/array-float32';\nimport Int16Array from '@stdlib/array-int16';\nimport Int32Array from '@stdlib/array-int32';\nimport Int8Array from '@stdlib/array-int8';\nimport Uint16Array from '@stdlib/array-uint16';\nimport Uint32Array from '@stdlib/array-uint32';\nimport Uint8Array from '@stdlib/array-uint8';\nimport Uint8ClampedArray from '@stdlib/array-uint8c';\nimport Complex64Array from '@stdlib/array-complex64';\nimport Complex128Array from '@stdlib/array-complex128';\n\n\n// MAIN //\n\n// Mapping from data types to constructors...\nvar ctors = {\n\t'float64': Float64Array,\n\t'float32': Float32Array,\n\t'generic': Array, // TODO: replace with `stdlib` pkg\n\t'int16': Int16Array,\n\t'int32': Int32Array,\n\t'int8': Int8Array,\n\t'uint16': Uint16Array,\n\t'uint32': Uint32Array,\n\t'uint8': Uint8Array,\n\t'uint8c': Uint8ClampedArray,\n\t'complex64': Complex64Array,\n\t'complex128': Complex128Array\n};\n\n\n// EXPORTS //\n\nexport default ctors;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport table from './ctors.js';\n\n\n// MAIN //\n\n/**\n* Returns an array constructor.\n*\n* @param {string} dtype - data type\n* @returns {(Function|null)} constructor or null\n*\n* @example\n* var ctor = ctors( 'float64' );\n* // returns \n*\n* @example\n* var ctor = ctors( 'float' );\n* // returns null\n*/\nfunction ctors( dtype ) {\n\treturn table[ dtype ] || null;\n}\n\n\n// EXPORTS //\n\nexport default ctors;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport filled from '@stdlib/array-base-filled';\n\n\n// MAIN //\n\n/**\n* Returns a zero-filled \"generic\" array.\n*\n* @param {NonNegativeInteger} len - array length\n* @returns {Array} output array\n*\n* @example\n* var out = zeros( 3 );\n* // returns [ 0.0, 0.0, 0.0 ]\n*/\nfunction zeros( len ) {\n\treturn filled( 0.0, len );\n}\n\n\n// EXPORTS //\n\nexport default zeros;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Returns a filled \"generic\" array.\n*\n* @param {*} value - fill value\n* @param {NonNegativeInteger} len - array length\n* @returns {Array} filled array\n*\n* @example\n* var out = filled( 0.0, 3 );\n* // returns [ 0.0, 0.0, 0.0 ]\n*\n* @example\n* var out = filled( 'beep', 3 );\n* // returns [ 'beep', 'beep', 'beep' ]\n*/\nfunction filled( value, len ) {\n\tvar arr;\n\tvar i;\n\n\t// Manually push elements in order to ensure \"fast\" elements...\n\tarr = [];\n\tfor ( i = 0; i < len; i++ ) {\n\t\tarr.push( value );\n\t}\n\treturn arr;\n}\n\n\n// EXPORTS //\n\nexport default filled;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isNonNegativeInteger } from '@stdlib/assert-is-nonnegative-integer';\nimport ctors from '@stdlib/array-ctors';\nimport gzeros from '@stdlib/array-base-zeros';\nimport format from '@stdlib/string-format';\n\n\n// MAIN //\n\n/**\n* Creates a zero-filled array having a specified length.\n*\n* @param {NonNegativeInteger} length - array length\n* @param {string} [dtype=\"float64\"] - data type\n* @throws {TypeError} first argument must be a nonnegative integer\n* @throws {TypeError} second argument must be a recognized data type\n* @returns {(TypedArray|Array|ComplexArray)} array or typed array\n*\n* @example\n* var arr = zeros( 2 );\n* // returns [ 0.0, 0.0 ]\n*\n* @example\n* var arr = zeros( 2, 'float32' );\n* // returns [ 0.0, 0.0 ]\n*/\nfunction zeros( length ) {\n\tvar dtype;\n\tvar ctor;\n\tif ( !isNonNegativeInteger( length ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a nonnegative integer. Value: `%s`.', length ) );\n\t}\n\tif ( arguments.length > 1 ) {\n\t\tdtype = arguments[ 1 ];\n\t} else {\n\t\tdtype = 'float64';\n\t}\n\tif ( dtype === 'generic' ) {\n\t\treturn gzeros( length );\n\t}\n\tctor = ctors( dtype );\n\tif ( ctor === null ) {\n\t\tthrow new TypeError( format( 'invalid argument. Second argument must be a recognized data type. Value: `%s`.', dtype ) );\n\t}\n\treturn new ctor( length ); // WARNING: we assume that, apart from 'generic', the constructors for supported array data types are zero-filled by default\n}\n\n\n// EXPORTS //\n\nexport default zeros;\n","/**\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// MODULES //\n\nimport zeros from '@stdlib/array-zeros';\n\n\n// MAIN //\n\n/**\n* Creates an uninitialized array having a specified length.\n*\n* @private\n* @param {NonNegativeInteger} length - array length\n* @param {string} [dtype=\"float64\"] - data type\n* @throws {TypeError} first argument must be a nonnegative integer\n* @throws {TypeError} second argument must be a recognized data type\n* @returns {(TypedArray|Array|ComplexArray)} array or typed array\n*\n* @example\n* var arr = empty( 2 );\n* // returns \n*\n* @example\n* var arr = empty( 2, 'float32' );\n* // returns \n*/\nfunction empty( length ) {\n\tif ( arguments.length > 1 ) {\n\t\treturn zeros( length, arguments[ 1 ] );\n\t}\n\treturn zeros( length );\n}\n\n\n// EXPORTS //\n\nexport default empty;\n"],"names":["main","Object","defineProperty","isNumber","value","zeros","n","i","out","zeroPad","str","width","right","negative","pad","length","startsWithMinus","substr","lowercase","String","prototype","toLowerCase","uppercase","toUpperCase","formatInteger","token","base","specifier","arg","parseInt","isFinite","Error","toString","precision","padRight","sign","alternate","call","charAt","isString","abs","Math","replace","RE_EXP_POS_DIGITS","RE_EXP_NEG_DIGITS","RE_ONLY_DIGITS","RE_DIGITS_BEFORE_EXP","RE_TRAILING_PERIOD_ZERO","RE_PERIOD_ZERO_EXP","RE_ZERO_BEFORE_EXP","formatDouble","digits","f","parseFloat","toExponential","toFixed","toPrecision","spaces","spacePad","fromCharCode","isnan","isNaN","isArray","Array","initialize","flags","mapping","formatInterpolate","tokens","hasPeriod","flag","num","pos","j","TypeError","padZeros","indexOf","arguments","maxWidth","substring","RE","parse","match","formatTokenize","content","prev","exec","slice","lastIndex","push","format","args","tokenize","interpolate","apply","objectProtoype","toStr","defineGetter","__defineGetter__","defineSetter","__defineSetter__","lookupGetter","__lookupGetter__","lookupSetter","__lookupSetter__","err","hasDefinePropertySupport","builtin","obj","prop","descriptor","hasValue","hasGet","hasSet","__proto__","get","set","defineProperty$1","setNonEnumerableReadOnly","configurable","enumerable","writable","FLG","Symbol","hasToStringTagSupport","toStringTag","has","hasOwnProperty","hasOwnProp","property","Sym","toStrTag","nativeClass","hasToStringTag","v","isOwn","tag","main$b","Number","test","isPrimitive","isObject","setReadOnly","FLOAT64_PINF","POSITIVE_INFINITY","FLOAT64_NINF","NEGATIVE_INFINITY","floor","isInteger","x","PINF","NINF","isInt","valueOf","isNonNegativeInteger","hasFloat64Array","Float64Array","ctor","Float64Array$1","bool","arr","GlobalFloat64Array","NaN","hasFloat64ArraySupport","hasFloat32Array","Float32Array","Float32Array$1","GlobalFloat32Array","hasFloat32ArraySupport","hasInt16Array","Int16Array","Int16Array$1","GlobalInt16Array","INT16_MAX","hasInt16ArraySupport","hasInt32Array","Int32Array","Int32Array$1","GlobalInt32Array","INT32_MAX","hasInt32ArraySupport","hasInt8Array","Int8Array","Int8Array$1","GlobalInt8Array","INT8_MAX","hasInt8ArraySupport","hasUint16Array","Uint16Array","Uint16Array$1","GlobalUint16Array","UINT16_MAX","hasUint16ArraySupport","hasUint32Array","Uint32Array","Uint32Array$1","GlobalUint32Array","UINT32_MAX","hasUint32ArraySupport","hasUint8Array","Uint8Array","Uint8Array$1","GlobalUint8Array","UINT8_MAX","hasUint8ArraySupport","hasUint8ClampedArray","Uint8ClampedArray","Uint8ClampedArray$1","GlobalUint8ClampedArray","hasUint8ClampedArraySupport","isArrayLikeObject","isCollection","hasArrayBuffer","ArrayBuffer","isArrayBuffer","main$1","isBoolean","Bool","Boolean","getGlobal","Function","self","window","global","globalThis","root","codegen","getThis","GlobalThis","Self","Win","Global","nodeList","document","childNodes","typedarray","reFunctionName","RE_FUNCTION_NAME","isObjectLike","constructorName","name","constructor","_isBuffer","isBuffer","REGEXP","predicate","len","arrayfun","ctorName","type","isFunction","typeOf","Complex128","real","imag","this","re","im","fround","FLOAT32_VIEW","float64ToFloat32$1","Complex64","float64ToFloat32","isComplexLike","isEven","hasIteratorSymbolSupport","iterator","IteratorSymbol","setNonEnumerableReadOnlyAccessor","getter","realf","z","imagf","reinterpret","offset","buffer","byteOffset","BYTES_PER_ELEMENT","GETTERS","float64","idx","float32","int32","int16","int8","uint32","uint16","uint8","uint8c","generic","default","dtype","complex128","complex64","fromIterator","it","next","done","fromIteratorMap","clbk","thisArg","fromArray","buf","HAS_ITERATOR_SYMBOL","isComplexArray","Complex64Array","_length","_buffer","isComplexArrayConstructor","isComplex64Array","isComplex128Array","nargs","RangeError","reinterpret64","reinterpret128","byteLength","ITERATOR_SYMBOL","src","tmp","flg","accessorGetter","setReadOnlyAccessor","target","start","copyWithin","iter","entries","sbuf","N","Complex128Array","ctors","table","filled","gzeros","empty"],"mappings":";;AAsBA,IAAIA,EAA0C,mBAA1BC,OAAOC,eAAkCD,OAAOC,eAAiB,KCiCrF,IAAIA,EAAiBD,OAAOC,eCjB5B,SAASC,EAAUC,GAClB,MAA0B,iBAAVA,CACjB,CCAA,SAASC,EAAOC,GACf,IACIC,EADAC,EAAM,GAEV,IAAMD,EAAI,EAAGA,EAAID,EAAGC,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IvE,KAAMrF,GAEX,OAAO4J,CACR,CDTQ4K,CAAQ,EAAKtF,EACrB,CEQA,SAASjP,GAAOU,GACf,IAAIoR,EACAtI,EACJ,IAAMH,GAAsB3I,GAC3B,MAAM,IAAI2D,UAAWgB,EAAQ,+EAAgF3E,IAO9G,GAAe,aAJdoR,EADItN,UAAU9D,OAAS,EACf8D,UAAW,GAEX,WAGR,OAAOgQ,GAAQ9T,GAGhB,GAAc,QADd8I,EAAO6K,GAAOvC,IAEb,MAAM,IAAIzN,UAAWgB,EAAQ,iFAAkFyM,IAEhH,OAAO,IAAItI,EAAM9I,EAClB,CCrBA,SAAS+T,GAAO/T,GACf,OAAK8D,UAAU9D,OAAS,EAChBV,GAAOU,EAAQ8D,UAAW,IAE3BxE,GAAOU,EACf"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index fd05d1f..0000000 --- a/stats.html +++ /dev/null @@ -1,6177 +0,0 @@ - - - - - - - - Rollup Visualizer - - - -
- - - - - From 6b09cee1db3a5afe2ef1c8fc6144abdd4dcee63d Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sat, 7 Oct 2023 03:38:50 +0000 Subject: [PATCH 21/75] 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 | 24 +- benchmark/benchmark.js | 264 - benchmark/benchmark.length.complex128.js | 93 - benchmark/benchmark.length.complex64.js | 93 - benchmark/benchmark.length.float32.js | 93 - benchmark/benchmark.length.float64.js | 93 - benchmark/benchmark.length.generic.js | 93 - benchmark/benchmark.length.int16.js | 93 - benchmark/benchmark.length.int32.js | 93 - benchmark/benchmark.length.int8.js | 93 - benchmark/benchmark.length.uint16.js | 93 - benchmark/benchmark.length.uint32.js | 93 - benchmark/benchmark.length.uint8.js | 93 - benchmark/benchmark.length.uint8c.js | 93 - branches.md | 53 - dist/index.d.ts | 3 - dist/index.js | 9 - dist/index.js.map | 7 - docs/repl.txt | 52 - docs/types/test.ts | 77 - examples/index.js | 33 - lib/index.js | 58 - lib/is_buffer_uint8array.js | 47 - lib/main.js | 101 - lib/polyfill.js | 56 - docs/types/index.d.ts => mod.d.ts | 2 +- mod.js | 4 + mod.js.map | 1 + package.json | 80 +- stats.html | 6177 +++++++++++++++++++++ test/dist/test.js | 33 - test/test.js | 60 - test/test.main.js | 274 - test/test.polyfill.js | 324 -- 57 files changed, 6189 insertions(+), 5825 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 benchmark/benchmark.js delete mode 100644 benchmark/benchmark.length.complex128.js delete mode 100644 benchmark/benchmark.length.complex64.js delete mode 100644 benchmark/benchmark.length.float32.js delete mode 100644 benchmark/benchmark.length.float64.js delete mode 100644 benchmark/benchmark.length.generic.js delete mode 100644 benchmark/benchmark.length.int16.js delete mode 100644 benchmark/benchmark.length.int32.js delete mode 100644 benchmark/benchmark.length.int8.js delete mode 100644 benchmark/benchmark.length.uint16.js delete mode 100644 benchmark/benchmark.length.uint32.js delete mode 100644 benchmark/benchmark.length.uint8.js delete mode 100644 benchmark/benchmark.length.uint8c.js 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/repl.txt delete mode 100644 docs/types/test.ts delete mode 100644 examples/index.js delete mode 100644 lib/index.js delete mode 100644 lib/is_buffer_uint8array.js delete mode 100644 lib/main.js delete mode 100644 lib/polyfill.js rename docs/types/index.d.ts => mod.d.ts (99%) create mode 100644 mod.js create mode 100644 mod.js.map create mode 100644 stats.html delete mode 100644 test/dist/test.js delete mode 100644 test/test.js delete mode 100644 test/test.main.js delete mode 100644 test/test.polyfill.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 96f81a8..0000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,7 +0,0 @@ - - -We are excited about your pull request, but unfortunately we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/empty) 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 ddb353e..0000000 --- a/.github/workflows/close_pull_requests.yml +++ /dev/null @@ -1,54 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: close_pull_requests - -# Workflow triggers: -on: - pull_request_target: - types: [opened] - -# Workflow jobs: -jobs: - - # Define job to close all pull requests: - run: - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Close pull request - - name: 'Close pull request' - # Pin action to full length commit SHA corresponding to v3.1.2 - uses: superbrothers/close-pull-request@9c18513d320d7b2c7185fb93396d0c664d5d8448 - with: - comment: | - Thank you for submitting a pull request. :raised_hands: - - We greatly appreciate your willingness to submit a contribution. However, we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). - - We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/empty) 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 dc9e63f..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: '49 1 * * 5' - - # 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 + + + + 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 8e62cb8..0000000 --- a/test/test.js +++ /dev/null @@ -1,60 +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 proxyquire = require( 'proxyquire' ); -var main = require( './../lib/main.js' ); -var polyfill = require( './../lib/polyfill.js' ); -var empty = require( './../lib' ); - - -// TESTS // - -tape( 'main export is a function', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof empty, 'function', 'main export is a function' ); - t.end(); -}); - -tape( 'if an environment supports Node.js buffer instances inheriting from Uint8Array, the main export supports returning arrays having uninitialized memory', function test( t ) { - var empty = proxyquire( './../lib', { - './is_buffer_uint8array.js': mock - }); - t.strictEqual( empty, main, 'returns expected value' ); - t.end(); - - function mock() { - return true; - } -}); - -tape( 'if an environment does not support Node.js buffer instances inheriting from Uint8Array, the main export supports returning zero-filled arrays', function test( t ) { - var empty = proxyquire( './../lib', { - './is_buffer_uint8array.js': mock - }); - t.strictEqual( empty, polyfill, 'returns expected value' ); - t.end(); - - function mock() { - return false; - } -}); diff --git a/test/test.main.js b/test/test.main.js deleted file mode 100644 index 3ceb26e..0000000 --- a/test/test.main.js +++ /dev/null @@ -1,274 +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 Float64Array = require( '@stdlib/array-float64' ); -var Float32Array = require( '@stdlib/array-float32' ); -var Int32Array = require( '@stdlib/array-int32' ); -var Uint32Array = require( '@stdlib/array-uint32' ); -var Int16Array = require( '@stdlib/array-int16' ); -var Uint16Array = require( '@stdlib/array-uint16' ); -var Int8Array = require( '@stdlib/array-int8' ); -var Uint8Array = require( '@stdlib/array-uint8' ); -var Uint8ClampedArray = require( '@stdlib/array-uint8c' ); -var Complex64Array = require( '@stdlib/array-complex64' ); -var Complex128Array = require( '@stdlib/array-complex128' ); -var instanceOf = require( '@stdlib/assert-instance-of' ); -var empty = require( './../lib/main.js' ); - - -// TESTS // - -tape( 'main export is a function', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof empty, 'function', 'main export is a function' ); - t.end(); -}); - -tape( 'the function throws an error if provided a value other than a nonnegative integer for the first argument', function test( t ) { - var values; - var i; - - values = [ - '5', - -3, - 3.14, - NaN, - true, - false, - null, - void 0, - [], - {}, - function noop() {} - ]; - - for ( i = 0; i < values.length; i++ ) { - t.throws( badValue( values[i] ), TypeError, 'throws an error when provided '+values[i] ); - } - t.end(); - - function badValue( value ) { - return function badValue() { - empty( value ); - }; - } -}); - -tape( 'the function throws an error if provided a value other than a nonnegative integer for the first argument (dtype)', function test( t ) { - var values; - var i; - - values = [ - '5', - -3, - 3.14, - NaN, - true, - false, - null, - void 0, - [], - {}, - function noop() {} - ]; - - for ( i = 0; i < values.length; i++ ) { - t.throws( badValue( values[i] ), TypeError, 'throws an error when provided '+values[i] ); - } - t.end(); - - function badValue( value ) { - return function badValue() { - empty( value, 'float32' ); - }; - } -}); - -tape( 'the function throws an error if provided an unrecognized data type', function test( t ) { - var values; - var i; - - values = [ - '5', - 'beep', - 'empty', - 'Int32', - 'Uint32', - 'Int16', - 'Uint16', - 'Int8', - 'Uint8', - 'Uint8c', - 'uint8_clamped', - 'Float64', - 'Float32', - 'FLOAT64', - 'FLOAT32', - 'GENERIC' - ]; - - for ( i = 0; i < values.length; i++ ) { - t.throws( badValue( values[i] ), TypeError, 'throws an error when provided '+values[i] ); - } - t.end(); - - function badValue( value ) { - return function badValue() { - empty( 10, value ); - }; - } -}); - -tape( 'the function returns an empty array (default)', function test( t ) { - var arr; - - arr = empty( 5 ); - t.strictEqual( instanceOf( arr, Float64Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=float64)', function test( t ) { - var arr; - - arr = empty( 5, 'float64' ); - t.strictEqual( instanceOf( arr, Float64Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=float32)', function test( t ) { - var arr; - - arr = empty( 5, 'float32' ); - t.strictEqual( instanceOf( arr, Float32Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=complex128)', function test( t ) { - var arr; - - arr = empty( 5, 'complex128' ); - t.strictEqual( instanceOf( arr, Complex128Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=complex64)', function test( t ) { - var arr; - - arr = empty( 5, 'complex64' ); - t.strictEqual( instanceOf( arr, Complex64Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=int32)', function test( t ) { - var arr; - - arr = empty( 5, 'int32' ); - t.strictEqual( instanceOf( arr, Int32Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=uint32)', function test( t ) { - var arr; - - arr = empty( 5, 'uint32' ); - t.strictEqual( instanceOf( arr, Uint32Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=int16)', function test( t ) { - var arr; - - arr = empty( 5, 'int16' ); - t.strictEqual( instanceOf( arr, Int16Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=uint16)', function test( t ) { - var arr; - - arr = empty( 5, 'uint16' ); - t.strictEqual( instanceOf( arr, Uint16Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=int8)', function test( t ) { - var arr; - - arr = empty( 5, 'int8' ); - t.strictEqual( instanceOf( arr, Int8Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=uint8)', function test( t ) { - var arr; - - arr = empty( 5, 'uint8' ); - t.strictEqual( instanceOf( arr, Uint8Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=uint8c)', function test( t ) { - var arr; - - arr = empty( 5, 'uint8c' ); - t.strictEqual( instanceOf( arr, Uint8ClampedArray ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=generic)', function test( t ) { - var expected; - var arr; - - expected = [ 0, 0, 0, 0, 0 ]; - - arr = empty( 5, 'generic' ); - t.strictEqual( instanceOf( arr, Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); diff --git a/test/test.polyfill.js b/test/test.polyfill.js deleted file mode 100644 index 17b99f3..0000000 --- a/test/test.polyfill.js +++ /dev/null @@ -1,324 +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 Float64Array = require( '@stdlib/array-float64' ); -var Float32Array = require( '@stdlib/array-float32' ); -var Int32Array = require( '@stdlib/array-int32' ); -var Uint32Array = require( '@stdlib/array-uint32' ); -var Int16Array = require( '@stdlib/array-int16' ); -var Uint16Array = require( '@stdlib/array-uint16' ); -var Int8Array = require( '@stdlib/array-int8' ); -var Uint8Array = require( '@stdlib/array-uint8' ); -var Uint8ClampedArray = require( '@stdlib/array-uint8c' ); -var Complex64Array = require( '@stdlib/array-complex64' ); -var Complex128Array = require( '@stdlib/array-complex128' ); -var reinterpret64 = require( '@stdlib/strided-base-reinterpret-complex64' ); -var reinterpret128 = require( '@stdlib/strided-base-reinterpret-complex128' ); -var instanceOf = require( '@stdlib/assert-instance-of' ); -var empty = require( './../lib/polyfill.js' ); - - -// TESTS // - -tape( 'main export is a function', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof empty, 'function', 'main export is a function' ); - t.end(); -}); - -tape( 'the function throws an error if provided a value other than a nonnegative integer for the first argument', function test( t ) { - var values; - var i; - - values = [ - '5', - -3, - 3.14, - NaN, - true, - false, - null, - void 0, - [], - {}, - function noop() {} - ]; - - for ( i = 0; i < values.length; i++ ) { - t.throws( badValue( values[i] ), TypeError, 'throws an error when provided '+values[i] ); - } - t.end(); - - function badValue( value ) { - return function badValue() { - empty( value ); - }; - } -}); - -tape( 'the function throws an error if provided a value other than a nonnegative integer for the first argument (dtype)', function test( t ) { - var values; - var i; - - values = [ - '5', - -3, - 3.14, - NaN, - true, - false, - null, - void 0, - [], - {}, - function noop() {} - ]; - - for ( i = 0; i < values.length; i++ ) { - t.throws( badValue( values[i] ), TypeError, 'throws an error when provided '+values[i] ); - } - t.end(); - - function badValue( value ) { - return function badValue() { - empty( value, 'float32' ); - }; - } -}); - -tape( 'the function throws an error if provided an unrecognized data type', function test( t ) { - var values; - var i; - - values = [ - '5', - 'beep', - 'empty', - 'Int32', - 'Uint32', - 'Int16', - 'Uint16', - 'Int8', - 'Uint8', - 'Uint8c', - 'uint8_clamped', - 'Float64', - 'Float32', - 'FLOAT64', - 'FLOAT32', - 'GENERIC' - ]; - - for ( i = 0; i < values.length; i++ ) { - t.throws( badValue( values[i] ), TypeError, 'throws an error when provided '+values[i] ); - } - t.end(); - - function badValue( value ) { - return function badValue() { - empty( 10, value ); - }; - } -}); - -tape( 'the function returns a zero-filled array (default)', function test( t ) { - var expected; - var arr; - - expected = new Float64Array( [ 0.0, 0.0, 0.0, 0.0, 0.0 ] ); - - arr = empty( 5 ); - t.strictEqual( instanceOf( arr, Float64Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=float64)', function test( t ) { - var expected; - var arr; - - expected = new Float64Array( [ 0.0, 0.0, 0.0, 0.0, 0.0 ] ); - - arr = empty( 5, 'float64' ); - t.strictEqual( instanceOf( arr, Float64Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=float32)', function test( t ) { - var expected; - var arr; - - expected = new Float32Array( [ 0.0, 0.0, 0.0, 0.0, 0.0 ] ); - - arr = empty( 5, 'float32' ); - t.strictEqual( instanceOf( arr, Float32Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=complex128)', function test( t ) { - var expected; - var arr; - - expected = new Float64Array( [ 0.0, 0.0, 0.0, 0.0 ] ); - - arr = empty( 2, 'complex128' ); - t.strictEqual( instanceOf( arr, Complex128Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length/2, 'returns expected value' ); - t.deepEqual( reinterpret128( arr, 0 ), expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=complex64)', function test( t ) { - var expected; - var arr; - - expected = new Float32Array( [ 0.0, 0.0, 0.0, 0.0 ] ); - - arr = empty( 2, 'complex64' ); - t.strictEqual( instanceOf( arr, Complex64Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length/2, 'returns expected value' ); - t.deepEqual( reinterpret64( arr, 0 ), expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=int32)', function test( t ) { - var expected; - var arr; - - expected = new Int32Array( [ 0, 0, 0, 0, 0 ] ); - - arr = empty( 5, 'int32' ); - t.strictEqual( instanceOf( arr, Int32Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=uint32)', function test( t ) { - var expected; - var arr; - - expected = new Uint32Array( [ 0, 0, 0, 0, 0 ] ); - - arr = empty( 5, 'uint32' ); - t.strictEqual( instanceOf( arr, Uint32Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=int16)', function test( t ) { - var expected; - var arr; - - expected = new Int16Array( [ 0, 0, 0, 0, 0 ] ); - - arr = empty( 5, 'int16' ); - t.strictEqual( instanceOf( arr, Int16Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=uint16)', function test( t ) { - var expected; - var arr; - - expected = new Uint16Array( [ 0, 0, 0, 0, 0 ] ); - - arr = empty( 5, 'uint16' ); - t.strictEqual( instanceOf( arr, Uint16Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=int8)', function test( t ) { - var expected; - var arr; - - expected = new Int8Array( [ 0, 0, 0, 0, 0 ] ); - - arr = empty( 5, 'int8' ); - t.strictEqual( instanceOf( arr, Int8Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=uint8)', function test( t ) { - var expected; - var arr; - - expected = new Uint8Array( [ 0, 0, 0, 0, 0 ] ); - - arr = empty( 5, 'uint8' ); - t.strictEqual( instanceOf( arr, Uint8Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=uint8c)', function test( t ) { - var expected; - var arr; - - expected = new Uint8ClampedArray( [ 0, 0, 0, 0, 0 ] ); - - arr = empty( 5, 'uint8c' ); - t.strictEqual( instanceOf( arr, Uint8ClampedArray ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=generic)', function test( t ) { - var expected; - var arr; - - expected = [ 0, 0, 0, 0, 0 ]; - - arr = empty( 5, 'generic' ); - t.strictEqual( instanceOf( arr, Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); From 45de7166e42a4797a8426e5604784c8bf7bae8df Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Wed, 1 Nov 2023 17:53:03 +0000 Subject: [PATCH 22/75] Transform error messages --- lib/main.js | 6 +++--- package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/main.js b/lib/main.js index e19ce93..e02b26b 100644 --- a/lib/main.js +++ b/lib/main.js @@ -25,7 +25,7 @@ var allocUnsafe = require( '@stdlib/buffer-alloc-unsafe' ); var ctors = require( '@stdlib/array-typed-ctors' ); var zeros = require( '@stdlib/array-base-zeros' ); var bytesPerElement = require( '@stdlib/ndarray-base-bytes-per-element' ); -var format = require( '@stdlib/string-format' ); +var format = require( '@stdlib/error-tools-fmtprodmsg' ); // MAIN // @@ -57,7 +57,7 @@ function empty( length ) { var nb; if ( !isNonNegativeInteger( length ) ) { - throw new TypeError( format( 'invalid argument. First argument must be a nonnegative integer. Value: `%s`.', length ) ); + throw new TypeError( format( '1Zj2d,MG', length ) ); } if ( arguments.length > 1 ) { dtype = arguments[ 1 ]; @@ -69,7 +69,7 @@ function empty( length ) { } nbytes = bytesPerElement( dtype ); if ( nbytes === null ) { - throw new TypeError( format( 'invalid argument. Second argument must be a supported data type. Value: `%s`.', dtype ) ); + throw new TypeError( format( '1ZjMl', dtype ) ); } // Resolve typed array constructor: ctor = ctors( dtype ); diff --git a/package.json b/package.json index bd5defe..15c1b1c 100644 --- a/package.json +++ b/package.json @@ -45,7 +45,7 @@ "@stdlib/assert-is-uint8array": "^0.1.1", "@stdlib/buffer-alloc-unsafe": "^0.1.0", "@stdlib/ndarray-base-bytes-per-element": "^0.1.0", - "@stdlib/string-format": "^0.1.1", + "@stdlib/error-tools-fmtprodmsg": "^0.1.1", "@stdlib/types": "^0.1.0" }, "devDependencies": { From d65f460ec4ec8379828cbc4824a8079f242f368c Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Fri, 3 Nov 2023 02:41:12 +0000 Subject: [PATCH 23/75] Remove files --- mod.d.ts | 277 --- mod.js | 4 - mod.js.map | 1 - stats.html | 6177 ---------------------------------------------------- 4 files changed, 6459 deletions(-) delete mode 100644 mod.d.ts delete mode 100644 mod.js delete mode 100644 mod.js.map delete mode 100644 stats.html diff --git a/mod.d.ts b/mod.d.ts deleted file mode 100644 index c071f4d..0000000 --- a/mod.d.ts +++ /dev/null @@ -1,277 +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 - -/// - -import { Complex128Array, Complex64Array, DataType } from '@stdlib/types/array'; - -/** -* Creates an uninitialized array having a specified length. -* -* ## Notes -* -* - In browser environments, the function always returns zero-filled arrays. -* - In Node.js versions `>=3.0.0`, the underlying memory of returned typed arrays is **not** initialized. Memory contents are unknown and may contain **sensitive** data. -* -* @param length - array length -* @param dtype - data type -* @returns empty array -* -* @example -* var arr = empty( 2, 'float64' ); -* // returns -*/ -declare function empty( length: number, dtype: 'float64' ): Float64Array; - -/** -* Creates an uninitialized array having a specified length. -* -* ## Notes -* -* - In browser environments, the function always returns zero-filled arrays. -* - In Node.js versions `>=3.0.0`, the underlying memory of returned typed arrays is **not** initialized. Memory contents are unknown and may contain **sensitive** data. -* -* @param length - array length -* @param dtype - data type -* @returns empty array -* -* @example -* var arr = empty( 2, 'float32' ); -* // returns -*/ -declare function empty( length: number, dtype: 'float32' ): Float32Array; - -/** -* Creates an uninitialized array having a specified length. -* -* ## Notes -* -* - In browser environments, the function always returns zero-filled arrays. -* - In Node.js versions `>=3.0.0`, the underlying memory of returned typed arrays is **not** initialized. Memory contents are unknown and may contain **sensitive** data. -* -* @param length - array length -* @param dtype - data type -* @returns empty array -* -* @example -* var arr = empty( 2, 'complex128' ); -* // returns -*/ -declare function empty( length: number, dtype: 'complex128' ): Complex128Array; - -/** -* Creates an uninitialized array having a specified length. -* -* ## Notes -* -* - In browser environments, the function always returns zero-filled arrays. -* - In Node.js versions `>=3.0.0`, the underlying memory of returned typed arrays is **not** initialized. Memory contents are unknown and may contain **sensitive** data. -* -* @param length - array length -* @param dtype - data type -* @returns empty array -* -* @example -* var arr = empty( 2, 'complex64' ); -* // returns -*/ -declare function empty( length: number, dtype: 'complex64' ): Complex64Array; - -/** -* Creates an uninitialized array having a specified length. -* -* ## Notes -* -* - In browser environments, the function always returns zero-filled arrays. -* - In Node.js versions `>=3.0.0`, the underlying memory of returned typed arrays is **not** initialized. Memory contents are unknown and may contain **sensitive** data. -* -* @param length - array length -* @param dtype - data type -* @returns empty array -* -* @example -* var arr = empty( 2, 'int32' ); -* // returns -*/ -declare function empty( length: number, dtype: 'int32' ): Int32Array; - -/** -* Creates an uninitialized array having a specified length. -* -* ## Notes -* -* - In browser environments, the function always returns zero-filled arrays. -* - In Node.js versions `>=3.0.0`, the underlying memory of returned typed arrays is **not** initialized. Memory contents are unknown and may contain **sensitive** data. -* -* @param length - array length -* @param dtype - data type -* @returns empty array -* -* @example -* var arr = empty( 2, 'int16' ); -* // returns -*/ -declare function empty( length: number, dtype: 'int16' ): Int16Array; - -/** -* Creates an uninitialized array having a specified length. -* -* ## Notes -* -* - In browser environments, the function always returns zero-filled arrays. -* - In Node.js versions `>=3.0.0`, the underlying memory of returned typed arrays is **not** initialized. Memory contents are unknown and may contain **sensitive** data. -* -* @param length - array length -* @param dtype - data type -* @returns empty array -* -* @example -* var arr = empty( 2, 'int8' ); -* // returns -*/ -declare function empty( length: number, dtype: 'int8' ): Int8Array; - -/** -* Creates an uninitialized array having a specified length. -* -* ## Notes -* -* - In browser environments, the function always returns zero-filled arrays. -* - In Node.js versions `>=3.0.0`, the underlying memory of returned typed arrays is **not** initialized. Memory contents are unknown and may contain **sensitive** data. -* -* @param length - array length -* @param dtype - data type -* @returns empty array -* -* @example -* var arr = empty( 2, 'uint32' ); -* // returns -*/ -declare function empty( length: number, dtype: 'uint32' ): Uint32Array; - -/** -* Creates an uninitialized array having a specified length. -* -* ## Notes -* -* - In browser environments, the function always returns zero-filled arrays. -* - In Node.js versions `>=3.0.0`, the underlying memory of returned typed arrays is **not** initialized. Memory contents are unknown and may contain **sensitive** data. -* -* @param length - array length -* @param dtype - data type -* @returns empty array -* -* @example -* var arr = empty( 2, 'uint16' ); -* // returns -*/ -declare function empty( length: number, dtype: 'uint16' ): Uint16Array; - -/** -* Creates an uninitialized array having a specified length. -* -* ## Notes -* -* - In browser environments, the function always returns zero-filled arrays. -* - In Node.js versions `>=3.0.0`, the underlying memory of returned typed arrays is **not** initialized. Memory contents are unknown and may contain **sensitive** data. -* -* @param length - array length -* @param dtype - data type -* @returns empty array -* -* @example -* var arr = empty( 2, 'uint8' ); -* // returns -*/ -declare function empty( length: number, dtype: 'uint8' ): Uint8Array; - -/** -* Creates an uninitialized array having a specified length. -* -* ## Notes -* -* - In browser environments, the function always returns zero-filled arrays. -* - In Node.js versions `>=3.0.0`, the underlying memory of returned typed arrays is **not** initialized. Memory contents are unknown and may contain **sensitive** data. -* -* @param length - array length -* @param dtype - data type -* @returns empty array -* -* @example -* var arr = empty( 2, 'uint8c' ); -* // returns -*/ -declare function empty( length: number, dtype: 'uint8c' ): Uint8ClampedArray; - -/** -* Creates a zero-filled array having a specified length. -* -* @param length - array length -* @param dtype - data type -* @returns zero-filled array -* -* @example -* var arr = empty( 2, 'generic' ); -* // returns -*/ -declare function empty( length: number, dtype: 'generic' ): Array; - -/** -* Creates an uninitialized array having a specified length. -* -* ## Notes -* -* - In browser environments, the function always returns zero-filled arrays. -* - If `dtype` is `'generic'`, the function always returns a zero-filled array. -* - In Node.js versions `>=3.0.0`, the underlying memory of returned typed arrays is **not** initialized. Memory contents are unknown and may contain **sensitive** data. -* -* The function recognizes the following data types: -* -* - `float64`: double-precision floating-point numbers (IEEE 754) -* - `float32`: single-precision floating-point numbers (IEEE 754) -* - `complex128`: double-precision complex floating-point numbers -* - `complex64`: single-precision complex floating-point numbers -* - `int32`: 32-bit two's complement signed integers -* - `uint32`: 32-bit unsigned integers -* - `int16`: 16-bit two's complement signed integers -* - `uint16`: 16-bit unsigned integers -* - `int8`: 8-bit two's complement signed integers -* - `uint8`: 8-bit unsigned integers -* - `uint8c`: 8-bit unsigned integers clamped to `0-255` -* - `generic`: generic JavaScript values -* -* @param length - array length -* @param dtype - data type (default: 'float64') -* @returns empty array -* -* @example -* var arr = empty( 2 ); -* // returns -* -* @example -* var arr = empty( 2, 'float32' ); -* // returns -*/ -declare function empty( length: number, dtype?: DataType ): Float64Array; - - -// EXPORTS // - -export = empty; diff --git a/mod.js b/mod.js deleted file mode 100644 index ce435ce..0000000 --- a/mod.js +++ /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 -/// -var e="function"==typeof Object.defineProperty?Object.defineProperty:null;var r=Object.defineProperty;function t(e){return"number"==typeof e}function n(e){var r,t="";for(r=0;r0&&(r-=1),n=i.toExponential(r)):n=i.toPrecision(e.precision),e.alternate||(n=y.call(n,v,"$1e"),n=y.call(n,b,"e"),n=y.call(n,w,""));break;default:throw new Error("invalid double notation. Value: "+e.specifier)}return n=y.call(n,h,"e+0$1"),n=y.call(n,p,"e-0$1"),e.alternate&&(n=y.call(n,g,"$1."),n=y.call(n,m,"$1.e")),i>=0&&e.sign&&(n=e.sign+n),n=e.specifier===s.call(e.specifier)?s.call(n):c.call(n)}function E(e){var r,t="";for(r=0;r127)throw new Error("invalid character code. Value: "+n.arg);n.arg=_(a)?String(n.arg):T(a)}break;case"e":case"E":case"f":case"F":case"g":case"G":r||(n.precision=6),n.arg=d(n);break;default:throw new Error("invalid specifier: "+n.specifier)}n.maxWidth>=0&&n.arg.length>n.maxWidth&&(n.arg=n.arg.substring(0,n.maxWidth)),n.padZeros?n.arg=i(n.arg,n.width||n.precision,n.padRight):n.width&&(n.arg=A(n.arg,n.width,n.padRight)),l+=n.arg||"",c+=1}return l}var k=/%(?:([1-9]\d*)\$)?([0 +\-#]*)(\*|\d+)?(?:(\.)(\*|\d+)?)?[hlL]?([%A-Za-z])/g;function L(e){var r={mapping:e[1]?parseInt(e[1],10):void 0,flags:e[2],width:e[3],precision:e[5],specifier:e[6]};return"."===e[4]&&void 0===e[5]&&(r.precision="1"),r}function S(e){var r,t,n,i;for(t=[],i=0,n=k.exec(e);n;)(r=e.slice(i,k.lastIndex-n[0].length)).length&&t.push(r),t.push(L(n)),i=k.lastIndex,n=k.exec(e);return(r=e.slice(i)).length&&t.push(r),t}function R(e){return"string"==typeof e}function B(e){var r,t,n;if(!R(e))throw new TypeError(B("invalid argument. First argument must be a string. Value: `%s`.",e));for(r=S(e),(t=new Array(arguments.length))[0]=r,n=1;nne&&oe(e)}function ue(e){return W(e)&&ae(e)}function fe(e){return ee(e)&&ae(e.valueOf())}function le(e){return ue(e)||fe(e)}function ce(e){return ue(e)&&e>=0}function se(e){return fe(e)&&e.valueOf()>=0}function ye(e){return ce(e)||se(e)}Y(le,"isPrimitive",ue),Y(le,"isObject",fe),Y(ye,"isPrimitive",ce),Y(ye,"isObject",se);var he="function"==typeof Float64Array;var pe="function"==typeof Float64Array?Float64Array:null;var ge="function"==typeof Float64Array?Float64Array:void 0;var me=function(){var e,r,t;if("function"!=typeof pe)return!1;try{r=new pe([1,3.14,-3.14,NaN]),t=r,e=(he&&t instanceof Float64Array||"[object Float64Array]"===D(t))&&1===r[0]&&3.14===r[1]&&-3.14===r[2]&&r[3]!=r[3]}catch(r){e=!1}return e}()?ge:function(){throw new Error("not implemented")},we="function"==typeof Float32Array;var be="function"==typeof Float32Array?Float32Array:null;var ve="function"==typeof Float32Array?Float32Array:void 0;var de=function(){var e,r,t;if("function"!=typeof be)return!1;try{r=new be([1,3.14,-3.14,5e40]),t=r,e=(we&&t instanceof Float32Array||"[object Float32Array]"===D(t))&&1===r[0]&&3.140000104904175===r[1]&&-3.140000104904175===r[2]&&r[3]===te}catch(r){e=!1}return e}()?ve:function(){throw new Error("not implemented")},Ee="function"==typeof Int16Array;var Ae="function"==typeof Int16Array?Int16Array:null;var Te="function"==typeof Int16Array?Int16Array:void 0;var _e=function(){var e,r,t;if("function"!=typeof Ae)return!1;try{r=new Ae([1,3.14,-3.14,32768]),t=r,e=(Ee&&t instanceof Int16Array||"[object Int16Array]"===D(t))&&1===r[0]&&3===r[1]&&-3===r[2]&&-32768===r[3]}catch(r){e=!1}return e}()?Te:function(){throw new Error("not implemented")},xe="function"==typeof Int32Array;var je="function"==typeof Int32Array?Int32Array:null;var Ve="function"==typeof Int32Array?Int32Array:void 0;var ke=function(){var e,r,t;if("function"!=typeof je)return!1;try{r=new je([1,3.14,-3.14,2147483648]),t=r,e=(xe&&t instanceof Int32Array||"[object Int32Array]"===D(t))&&1===r[0]&&3===r[1]&&-3===r[2]&&-2147483648===r[3]}catch(r){e=!1}return e}()?Ve:function(){throw new Error("not implemented")},Le="function"==typeof Int8Array;var Se="function"==typeof Int8Array?Int8Array:null;var Re="function"==typeof Int8Array?Int8Array:void 0;var Be=function(){var e,r,t;if("function"!=typeof Se)return!1;try{r=new Se([1,3.14,-3.14,128]),t=r,e=(Le&&t instanceof Int8Array||"[object Int8Array]"===D(t))&&1===r[0]&&3===r[1]&&-3===r[2]&&-128===r[3]}catch(r){e=!1}return e}()?Re:function(){throw new Error("not implemented")},Ie="function"==typeof Uint16Array;var Ce="function"==typeof Uint16Array?Uint16Array:null;var Fe="function"==typeof Uint16Array?Uint16Array:void 0;var Oe=function(){var e,r,t;if("function"!=typeof Ce)return!1;try{r=new Ce(r=[1,3.14,-3.14,65536,65537]),t=r,e=(Ie&&t instanceof Uint16Array||"[object Uint16Array]"===D(t))&&1===r[0]&&3===r[1]&&65533===r[2]&&0===r[3]&&1===r[4]}catch(r){e=!1}return e}()?Fe:function(){throw new Error("not implemented")},Me="function"==typeof Uint32Array;var Ne="function"==typeof Uint32Array?Uint32Array:null;var Ue="function"==typeof Uint32Array?Uint32Array:void 0;var Pe=function(){var e,r,t;if("function"!=typeof Ne)return!1;try{r=new Ne(r=[1,3.14,-3.14,4294967296,4294967297]),t=r,e=(Me&&t instanceof Uint32Array||"[object Uint32Array]"===D(t))&&1===r[0]&&3===r[1]&&4294967293===r[2]&&0===r[3]&&1===r[4]}catch(r){e=!1}return e}()?Ue:function(){throw new Error("not implemented")},Ye="function"==typeof Uint8Array;var We="function"==typeof Uint8Array?Uint8Array:null;var $e="function"==typeof Uint8Array?Uint8Array:void 0;var Ge=function(){var e,r,t;if("function"!=typeof We)return!1;try{r=new We(r=[1,3.14,-3.14,256,257]),t=r,e=(Ye&&t instanceof Uint8Array||"[object Uint8Array]"===D(t))&&1===r[0]&&3===r[1]&&253===r[2]&&0===r[3]&&1===r[4]}catch(r){e=!1}return e}()?$e:function(){throw new Error("not implemented")},Ze="function"==typeof Uint8ClampedArray;var Xe="function"==typeof Uint8ClampedArray?Uint8ClampedArray:null;var ze="function"==typeof Uint8ClampedArray?Uint8ClampedArray:void 0;var Je=function(){var e,r,t;if("function"!=typeof Xe)return!1;try{r=new Xe([-1,0,1,3.14,4.99,255,256]),t=r,e=(Ze&&t instanceof Uint8ClampedArray||"[object Uint8ClampedArray]"===D(t))&&0===r[0]&&0===r[1]&&1===r[2]&&3===r[3]&&5===r[4]&&255===r[5]&&255===r[6]}catch(r){e=!1}return e}()?ze:function(){throw new Error("not implemented")};function qe(e){return"object"==typeof e&&null!==e&&"number"==typeof e.length&&oe(e.length)&&e.length>=0&&e.length<=4294967295}function De(e){return"object"==typeof e&&null!==e&&"number"==typeof e.length&&oe(e.length)&&e.length>=0&&e.length<=9007199254740991}var He="function"==typeof ArrayBuffer;function Ke(e){return He&&e instanceof ArrayBuffer||"[object ArrayBuffer]"===D(e)}var Qe=Array.isArray?Array.isArray:function(e){return"[object Array]"===D(e)};function er(e){return"object"==typeof e&&null!==e&&!Qe(e)}var rr=/./;function tr(e){return"boolean"==typeof e}var nr=Boolean,ir=Boolean.prototype.toString;var or=G();function ar(e){return"object"==typeof e&&(e instanceof nr||(or?function(e){try{return ir.call(e),!0}catch(e){return!1}}(e):"[object Boolean]"===D(e)))}function ur(e){return tr(e)||ar(e)}function fr(){return new Function("return this;")()}Y(ur,"isPrimitive",tr),Y(ur,"isObject",ar);var lr="object"==typeof self?self:null,cr="object"==typeof window?window:null,sr="undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},yr="object"==typeof sr?sr:null,hr="object"==typeof globalThis?globalThis:null;var pr=function(e){if(arguments.length){if(!tr(e))throw new TypeError(B("invalid argument. Must provide a boolean. Value: `%s`.",e));if(e)return fr()}if(hr)return hr;if(lr)return lr;if(cr)return cr;if(yr)return yr;throw new Error("unexpected error. Unable to resolve global object.")}(),gr=pr.document&&pr.document.childNodes,mr=Int8Array;function wr(){return/^\s*function\s*([^(]*)/i}var br=/^\s*function\s*([^(]*)/i;function vr(e){return null!==e&&"object"==typeof e}function dr(e){var r,t,n,i;if(("Object"===(t=D(e).slice(8,-1))||"Error"===t)&&e.constructor){if("string"==typeof(n=e.constructor).name)return n.name;if(r=br.exec(n.toString()))return r[1]}return vr(i=e)&&(i._isBuffer||i.constructor&&"function"==typeof i.constructor.isBuffer&&i.constructor.isBuffer(i))?"Buffer":t}Y(wr,"REGEXP",br),Y(vr,"isObjectLikeArray",function(e){if("function"!=typeof e)throw new TypeError(B("invalid argument. Must provide a function. Value: `%s`.",e));return function(r){var t,n;if(!Qe(r))return!1;if(0===(t=r.length))return!1;for(n=0;n=2)r.push(n[0],n[1]);else{if(!kr(n))return new TypeError(B("invalid argument. An iterator must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",n));r.push(Ir(n),Cr(n))}return r}function Wr(e,r,t){var n,i,o,a;for(n=[],a=-1;!(i=e.next()).done;)if(a+=1,qe(o=r.call(t,i.value,a))&&o.length>=2)n.push(o[0],o[1]);else{if(!kr(o))return new TypeError(B("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",o));n.push(Ir(o),Cr(o))}return n}function $r(e,r){var t,n,i,o;for(t=r.length,o=0,i=0;it.byteLength-e)throw new RangeError(B("invalid arguments. ArrayBuffer has insufficient capacity. Either decrease the array length or provide a bigger buffer. Minimum capacity: `%u`.",n*Gr));t=new de(t,e,2*n)}}return Y(this,"_buffer",t),Y(this,"_length",t.length/2),this}function Hr(e){return e.re}function Kr(e){return e.im}function Qr(e){var r,t,n;for(r=[];!(t=e.next()).done;)if(qe(n=t.value)&&n.length>=2)r.push(n[0],n[1]);else{if(!kr(n))return new TypeError(B("invalid argument. An iterator must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",n));r.push(Hr(n),Kr(n))}return r}function et(e,r,t){var n,i,o,a;for(n=[],a=-1;!(i=e.next()).done;)if(a+=1,qe(o=r.call(t,i.value,a))&&o.length>=2)n.push(o[0],o[1]);else{if(!kr(o))return new TypeError(B("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",o));n.push(Hr(o),Kr(o))}return n}function rt(e,r){var t,n,i,o;for(t=r.length,o=0,i=0;i1){if(!Ar(n=arguments[1]))throw new TypeError(B("invalid argument. Second argument must be a function. Value: `%s`.",n));t>2&&(r=arguments[2])}if(Xr(e)){if(f=e.length,n){for(o=(i=new this(f))._buffer,y=0,s=0;s=2))throw new TypeError(B("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",c));o[y]=c[0],o[y+1]=c[1]}y+=2}return i}return new this(e)}if(De(e)){if(n){for(f=e.length,u=e.get&&e.set?Pr("default"):Nr("default"),s=0;s=2))throw new TypeError(B("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",c));o[y]=c[0],o[y+1]=c[1]}y+=2}return i}return new this(e)}if(er(e)&&Zr&&Ar(e[Rr])){if(!Ar((o=e[Rr]()).next))throw new TypeError(B("invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.",e));if((a=n?Wr(o,n,r):Yr(o))instanceof Error)throw a;for(o=(i=new this(f=a.length/2))._buffer,s=0;s=n)return{done:!0};return r=new Vr(e[a+=2],e[a+1]),{value:[o,r],done:!1}})),Y(t,"return",(function(e){if(i=!0,arguments.length)return{value:e,done:!0};return{done:!0}})),Rr&&Y(t,Rr,(function(){return r.entries()})),t})),Y(Dr.prototype,"get",(function(e){var r;if(!Xr(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!ce(e))throw new TypeError(B("invalid argument. Must provide a nonnegative integer. Value: `%s`.",e));if(!(e>=this._length))return new Vr((r=this._buffer)[e*=2],r[e+1])})),Br(Dr.prototype,"length",(function(){return this._length})),Y(Dr.prototype,"set",(function(e){var r,t,n,i,o,a,u,f,l;if(!Xr(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(n=this._buffer,arguments.length>1){if(!ce(t=arguments[1]))throw new TypeError(B("invalid argument. Index argument must be a nonnegative integer. Value: `%s`.",t))}else t=0;if(kr(e)){if(t>=this._length)throw new RangeError(B("invalid argument. Index argument is out-of-bounds. Value: `%u`.",t));return n[t*=2]=Ir(e),void(n[t+1]=Cr(e))}if(Xr(e)){if(t+(a=e._length)>this._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");if(r=e._buffer,l=n.byteOffset+t*Gr,r.buffer===n.buffer&&r.byteOffsetl){for(i=new de(r.length),f=0;fthis._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");if(r=e,l=n.byteOffset+t*Gr,r.buffer===n.buffer&&r.byteOffsetl){for(i=new de(a),f=0;fthis._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");for(t*=2,f=0;ft.byteLength-e)throw new RangeError(B("invalid arguments. ArrayBuffer has insufficient capacity. Either decrease the array length or provide a bigger buffer. Minimum capacity: `%u`.",n*tt));t=new me(t,e,2*n)}}return Y(this,"_buffer",t),Y(this,"_length",t.length/2),this}Y(ft,"BYTES_PER_ELEMENT",tt),Y(ft,"name","Complex128Array"),Y(ft,"from",(function(e){var r,t,n,i,o,a,u,f,l,c,s,y;if(!Ar(this))throw new TypeError("invalid invocation. `this` context must be a constructor.");if(!ot(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if((t=arguments.length)>1){if(!Ar(n=arguments[1]))throw new TypeError(B("invalid argument. Second argument must be a function. Value: `%s`.",n));t>2&&(r=arguments[2])}if(it(e)){if(f=e.length,n){for(o=(i=new this(f))._buffer,y=0,s=0;s=2))throw new TypeError(B("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",c));o[y]=c[0],o[y+1]=c[1]}y+=2}return i}return new this(e)}if(De(e)){if(n){for(f=e.length,u=e.get&&e.set?Pr("default"):Nr("default"),s=0;s=2))throw new TypeError(B("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",c));o[y]=c[0],o[y+1]=c[1]}y+=2}return i}return new this(e)}if(er(e)&&nt&&Ar(e[Rr])){if(!Ar((o=e[Rr]()).next))throw new TypeError(B("invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.",e));if((a=n?et(o,n,r):Qr(o))instanceof Error)throw a;for(o=(i=new this(f=a.length/2))._buffer,s=0;s=n)return{done:!0};return r=new Tr(e[a+=2],e[a+1]),{value:[o,r],done:!1}})),Y(t,"return",(function(e){if(i=!0,arguments.length)return{value:e,done:!0};return{done:!0}})),Rr&&Y(t,Rr,(function(){return r.entries()})),t})),Y(ft.prototype,"get",(function(e){var r;if(!it(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!ce(e))throw new TypeError(B("invalid argument. Must provide a nonnegative integer. Value: `%s`.",e));if(!(e>=this._length))return new Tr((r=this._buffer)[e*=2],r[e+1])})),Br(ft.prototype,"length",(function(){return this._length})),Y(ft.prototype,"set",(function(e){var r,t,n,i,o,a,u,f,l;if(!it(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(n=this._buffer,arguments.length>1){if(!ce(t=arguments[1]))throw new TypeError(B("invalid argument. Index argument must be a nonnegative integer. Value: `%s`.",t))}else t=0;if(kr(e)){if(t>=this._length)throw new RangeError(B("invalid argument. Index argument is out-of-bounds. Value: `%u`.",t));return n[t*=2]=Hr(e),void(n[t+1]=Kr(e))}if(it(e)){if(t+(a=e._length)>this._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");if(r=e._buffer,l=n.byteOffset+t*tt,r.buffer===n.buffer&&r.byteOffsetl){for(i=new me(r.length),f=0;fthis._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");if(r=e,l=n.byteOffset+t*tt,r.buffer===n.buffer&&r.byteOffsetl){for(i=new me(a),f=0;fthis._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");for(t*=2,f=0;f1?arguments[1]:"float64"))return st(e);if(null===(t=ct(r)))throw new TypeError(B("invalid argument. Second argument must be a recognized data type. Value: `%s`.",r));return new t(e)}function ht(e){return arguments.length>1?yt(e,arguments[1]):yt(e)}export{ht as default}; -//# sourceMappingURL=mod.js.map diff --git a/mod.js.map b/mod.js.map deleted file mode 100644 index ca3f210..0000000 --- a/mod.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"mod.js","sources":["../node_modules/@stdlib/utils-define-property/lib/define_property.js","../node_modules/@stdlib/utils-define-property/lib/builtin.js","../node_modules/@stdlib/string-base-format-interpolate/lib/is_number.js","../node_modules/@stdlib/string-base-format-interpolate/lib/zero_pad.js","../node_modules/@stdlib/string-base-format-interpolate/lib/format_integer.js","../node_modules/@stdlib/string-base-format-interpolate/lib/is_string.js","../node_modules/@stdlib/string-base-format-interpolate/lib/format_double.js","../node_modules/@stdlib/string-base-format-interpolate/lib/space_pad.js","../node_modules/@stdlib/string-base-format-interpolate/lib/main.js","../node_modules/@stdlib/string-base-format-tokenize/lib/main.js","../node_modules/@stdlib/string-format/lib/is_string.js","../node_modules/@stdlib/string-format/lib/main.js","../node_modules/@stdlib/utils-define-property/lib/polyfill.js","../node_modules/@stdlib/utils-define-property/lib/index.js","../node_modules/@stdlib/utils-define-property/lib/has_define_property_support.js","../node_modules/@stdlib/utils-define-nonenumerable-read-only-property/lib/main.js","../node_modules/@stdlib/assert-is-number/lib/primitive.js","../node_modules/@stdlib/assert-has-tostringtag-support/lib/main.js","../node_modules/@stdlib/assert-has-symbol-support/lib/main.js","../node_modules/@stdlib/utils-native-class/lib/tostring.js","../node_modules/@stdlib/assert-has-own-property/lib/main.js","../node_modules/@stdlib/symbol-ctor/lib/main.js","../node_modules/@stdlib/utils-native-class/lib/tostringtag.js","../node_modules/@stdlib/utils-native-class/lib/index.js","../node_modules/@stdlib/utils-native-class/lib/polyfill.js","../node_modules/@stdlib/utils-native-class/lib/main.js","../node_modules/@stdlib/number-ctor/lib/main.js","../node_modules/@stdlib/assert-is-number/lib/tostring.js","../node_modules/@stdlib/assert-is-number/lib/object.js","../node_modules/@stdlib/assert-is-number/lib/try2serialize.js","../node_modules/@stdlib/assert-is-number/lib/main.js","../node_modules/@stdlib/assert-is-number/lib/index.js","../node_modules/@stdlib/constants-float64-pinf/lib/index.js","../node_modules/@stdlib/constants-float64-ninf/lib/index.js","../node_modules/@stdlib/math-base-special-floor/lib/main.js","../node_modules/@stdlib/math-base-assert-is-integer/lib/main.js","../node_modules/@stdlib/assert-is-integer/lib/integer.js","../node_modules/@stdlib/assert-is-integer/lib/primitive.js","../node_modules/@stdlib/assert-is-integer/lib/object.js","../node_modules/@stdlib/assert-is-integer/lib/main.js","../node_modules/@stdlib/assert-is-nonnegative-integer/lib/primitive.js","../node_modules/@stdlib/assert-is-nonnegative-integer/lib/object.js","../node_modules/@stdlib/assert-is-nonnegative-integer/lib/main.js","../node_modules/@stdlib/assert-is-integer/lib/index.js","../node_modules/@stdlib/assert-is-nonnegative-integer/lib/index.js","../node_modules/@stdlib/assert-is-float64array/lib/main.js","../node_modules/@stdlib/assert-has-float64array-support/lib/float64array.js","../node_modules/@stdlib/array-float64/lib/main.js","../node_modules/@stdlib/array-float64/lib/index.js","../node_modules/@stdlib/assert-has-float64array-support/lib/main.js","../node_modules/@stdlib/array-float64/lib/polyfill.js","../node_modules/@stdlib/assert-is-float32array/lib/main.js","../node_modules/@stdlib/assert-has-float32array-support/lib/float32array.js","../node_modules/@stdlib/array-float32/lib/main.js","../node_modules/@stdlib/array-float32/lib/index.js","../node_modules/@stdlib/assert-has-float32array-support/lib/main.js","../node_modules/@stdlib/array-float32/lib/polyfill.js","../node_modules/@stdlib/assert-is-int16array/lib/main.js","../node_modules/@stdlib/constants-int16-max/lib/index.js","../node_modules/@stdlib/assert-has-int16array-support/lib/int16array.js","../node_modules/@stdlib/array-int16/lib/main.js","../node_modules/@stdlib/array-int16/lib/index.js","../node_modules/@stdlib/assert-has-int16array-support/lib/main.js","../node_modules/@stdlib/constants-int16-min/lib/index.js","../node_modules/@stdlib/array-int16/lib/polyfill.js","../node_modules/@stdlib/assert-is-int32array/lib/main.js","../node_modules/@stdlib/constants-int32-max/lib/index.js","../node_modules/@stdlib/assert-has-int32array-support/lib/int32array.js","../node_modules/@stdlib/array-int32/lib/main.js","../node_modules/@stdlib/array-int32/lib/index.js","../node_modules/@stdlib/assert-has-int32array-support/lib/main.js","../node_modules/@stdlib/constants-int32-min/lib/index.js","../node_modules/@stdlib/array-int32/lib/polyfill.js","../node_modules/@stdlib/assert-is-int8array/lib/main.js","../node_modules/@stdlib/constants-int8-max/lib/index.js","../node_modules/@stdlib/assert-has-int8array-support/lib/int8array.js","../node_modules/@stdlib/array-int8/lib/main.js","../node_modules/@stdlib/array-int8/lib/index.js","../node_modules/@stdlib/assert-has-int8array-support/lib/main.js","../node_modules/@stdlib/constants-int8-min/lib/index.js","../node_modules/@stdlib/array-int8/lib/polyfill.js","../node_modules/@stdlib/assert-is-uint16array/lib/main.js","../node_modules/@stdlib/constants-uint16-max/lib/index.js","../node_modules/@stdlib/assert-has-uint16array-support/lib/uint16array.js","../node_modules/@stdlib/array-uint16/lib/main.js","../node_modules/@stdlib/array-uint16/lib/index.js","../node_modules/@stdlib/assert-has-uint16array-support/lib/main.js","../node_modules/@stdlib/array-uint16/lib/polyfill.js","../node_modules/@stdlib/assert-is-uint32array/lib/main.js","../node_modules/@stdlib/constants-uint32-max/lib/index.js","../node_modules/@stdlib/assert-has-uint32array-support/lib/uint32array.js","../node_modules/@stdlib/array-uint32/lib/main.js","../node_modules/@stdlib/array-uint32/lib/index.js","../node_modules/@stdlib/assert-has-uint32array-support/lib/main.js","../node_modules/@stdlib/array-uint32/lib/polyfill.js","../node_modules/@stdlib/assert-is-uint8array/lib/main.js","../node_modules/@stdlib/constants-uint8-max/lib/index.js","../node_modules/@stdlib/assert-has-uint8array-support/lib/uint8array.js","../node_modules/@stdlib/array-uint8/lib/main.js","../node_modules/@stdlib/array-uint8/lib/index.js","../node_modules/@stdlib/assert-has-uint8array-support/lib/main.js","../node_modules/@stdlib/array-uint8/lib/polyfill.js","../node_modules/@stdlib/assert-is-uint8clampedarray/lib/main.js","../node_modules/@stdlib/assert-has-uint8clampedarray-support/lib/uint8clampedarray.js","../node_modules/@stdlib/array-uint8c/lib/main.js","../node_modules/@stdlib/array-uint8c/lib/index.js","../node_modules/@stdlib/assert-has-uint8clampedarray-support/lib/main.js","../node_modules/@stdlib/array-uint8c/lib/polyfill.js","../node_modules/@stdlib/assert-is-array-like-object/lib/main.js","../node_modules/@stdlib/constants-array-max-array-length/lib/index.js","../node_modules/@stdlib/assert-is-collection/lib/main.js","../node_modules/@stdlib/constants-array-max-typed-array-length/lib/index.js","../node_modules/@stdlib/assert-is-arraybuffer/lib/main.js","../node_modules/@stdlib/assert-is-array/lib/main.js","../node_modules/@stdlib/assert-is-object/lib/main.js","../node_modules/@stdlib/utils-type-of/lib/fixtures/re.js","../node_modules/@stdlib/assert-is-boolean/lib/primitive.js","../node_modules/@stdlib/boolean-ctor/lib/main.js","../node_modules/@stdlib/assert-is-boolean/lib/tostring.js","../node_modules/@stdlib/assert-is-boolean/lib/object.js","../node_modules/@stdlib/assert-is-boolean/lib/try2serialize.js","../node_modules/@stdlib/assert-is-boolean/lib/main.js","../node_modules/@stdlib/utils-global/lib/codegen.js","../node_modules/@stdlib/assert-is-boolean/lib/index.js","../node_modules/@stdlib/utils-global/lib/self.js","../node_modules/@stdlib/utils-global/lib/window.js","../node_modules/@stdlib/utils-global/lib/global.js","../node_modules/@stdlib/utils-global/lib/global_this.js","../node_modules/@stdlib/utils-type-of/lib/fixtures/nodelist.js","../node_modules/@stdlib/utils-global/lib/main.js","../node_modules/@stdlib/utils-type-of/lib/fixtures/typedarray.js","../node_modules/@stdlib/regexp-function-name/lib/main.js","../node_modules/@stdlib/regexp-function-name/lib/regexp.js","../node_modules/@stdlib/assert-is-object-like/lib/main.js","../node_modules/@stdlib/utils-constructor-name/lib/main.js","../node_modules/@stdlib/assert-is-buffer/lib/main.js","../node_modules/@stdlib/regexp-function-name/lib/index.js","../node_modules/@stdlib/assert-is-object-like/lib/index.js","../node_modules/@stdlib/assert-tools-array-function/lib/main.js","../node_modules/@stdlib/utils-type-of/lib/index.js","../node_modules/@stdlib/utils-type-of/lib/check.js","../node_modules/@stdlib/utils-type-of/lib/polyfill.js","../node_modules/@stdlib/utils-type-of/lib/main.js","../node_modules/@stdlib/assert-is-function/lib/main.js","../node_modules/@stdlib/complex-float64/lib/main.js","../node_modules/@stdlib/complex-float64/lib/tostring.js","../node_modules/@stdlib/complex-float64/lib/tojson.js","../node_modules/@stdlib/number-float64-base-to-float32/lib/main.js","../node_modules/@stdlib/number-float64-base-to-float32/lib/polyfill.js","../node_modules/@stdlib/number-float64-base-to-float32/lib/index.js","../node_modules/@stdlib/complex-float32/lib/main.js","../node_modules/@stdlib/assert-is-complex-like/lib/main.js","../node_modules/@stdlib/math-base-assert-is-even/lib/main.js","../node_modules/@stdlib/assert-has-iterator-symbol-support/lib/main.js","../node_modules/@stdlib/complex-float32/lib/tostring.js","../node_modules/@stdlib/complex-float32/lib/tojson.js","../node_modules/@stdlib/symbol-iterator/lib/main.js","../node_modules/@stdlib/utils-define-nonenumerable-read-only-accessor/lib/main.js","../node_modules/@stdlib/complex-realf/lib/main.js","../node_modules/@stdlib/complex-imagf/lib/main.js","../node_modules/@stdlib/strided-base-reinterpret-complex64/lib/main.js","../node_modules/@stdlib/strided-base-reinterpret-complex128/lib/main.js","../node_modules/@stdlib/array-base-getter/lib/main.js","../node_modules/@stdlib/array-base-accessor-getter/lib/main.js","../node_modules/@stdlib/array-complex64/lib/from_iterator.js","../node_modules/@stdlib/array-complex64/lib/from_iterator_map.js","../node_modules/@stdlib/array-complex64/lib/from_array.js","../node_modules/@stdlib/array-complex64/lib/main.js","../node_modules/@stdlib/complex-real/lib/main.js","../node_modules/@stdlib/complex-imag/lib/main.js","../node_modules/@stdlib/array-complex128/lib/from_iterator.js","../node_modules/@stdlib/array-complex128/lib/from_iterator_map.js","../node_modules/@stdlib/array-complex128/lib/from_array.js","../node_modules/@stdlib/array-complex128/lib/main.js","../node_modules/@stdlib/array-ctors/lib/ctors.js","../node_modules/@stdlib/array-ctors/lib/main.js","../node_modules/@stdlib/array-base-zeros/lib/main.js","../node_modules/@stdlib/array-base-filled/lib/main.js","../node_modules/@stdlib/array-zeros/lib/main.js","../lib/polyfill.js"],"sourcesContent":["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Object.defineProperty === 'function' ) ? Object.defineProperty : null;\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Defines (or modifies) an object property.\n*\n* ## Notes\n*\n* - Property descriptors come in two flavors: **data descriptors** and **accessor descriptors**. A data descriptor is a property that has a value, which may or may not be writable. An accessor descriptor is a property described by a getter-setter function pair. A descriptor must be one of these two flavors and cannot be both.\n*\n* @name defineProperty\n* @type {Function}\n* @param {Object} obj - object on which to define the property\n* @param {(string|symbol)} prop - property name\n* @param {Object} descriptor - property descriptor\n* @param {boolean} [descriptor.configurable=false] - boolean indicating if property descriptor can be changed and if the property can be deleted from the provided object\n* @param {boolean} [descriptor.enumerable=false] - boolean indicating if the property shows up when enumerating object properties\n* @param {boolean} [descriptor.writable=false] - boolean indicating if the value associated with the property can be changed with an assignment operator\n* @param {*} [descriptor.value] - property value\n* @param {(Function|void)} [descriptor.get=undefined] - function which serves as a getter for the property, or, if no getter, undefined. When the property is accessed, a getter function is called without arguments and with the `this` context set to the object through which the property is accessed (which may not be the object on which the property is defined due to inheritance). The return value will be used as the property value.\n* @param {(Function|void)} [descriptor.set=undefined] - function which serves as a setter for the property, or, if no setter, undefined. When assigning a property value, a setter function is called with one argument (the value being assigned to the property) and with the `this` context set to the object through which the property is assigned.\n* @throws {TypeError} first argument must be an object\n* @throws {TypeError} third argument must be an object\n* @throws {Error} property descriptor cannot have both a value and a setter and/or getter\n* @returns {Object} object with added property\n*\n* @example\n* var obj = {};\n*\n* defineProperty( obj, 'foo', {\n* 'value': 'bar'\n* });\n*\n* var str = obj.foo;\n* // returns 'bar'\n*/\nvar defineProperty = Object.defineProperty;\n\n\n// EXPORTS //\n\nexport default defineProperty;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Tests if a value is a number primitive.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number primitive\n*\n* @example\n* var bool = isNumber( 3.14 );\n* // returns true\n*\n* @example\n* var bool = isNumber( NaN );\n* // returns true\n*\n* @example\n* var bool = isNumber( new Number( 3.14 ) );\n* // returns false\n*/\nfunction isNumber( value ) {\n\treturn ( typeof value === 'number' ); // NOTE: we inline the `isNumber.isPrimitive` function from `@stdlib/assert/is-number` in order to avoid circular dependencies.\n}\n\n\n// EXPORTS //\n\nexport default isNumber;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// FUNCTIONS //\n\n/**\n* Tests if a string starts with a minus sign (`-`).\n*\n* @private\n* @param {string} str - input string\n* @returns {boolean} boolean indicating if a string starts with a minus sign (`-`)\n*/\nfunction startsWithMinus( str ) {\n\treturn str[ 0 ] === '-';\n}\n\n/**\n* Returns a string of `n` zeros.\n*\n* @private\n* @param {number} n - number of zeros\n* @returns {string} string of zeros\n*/\nfunction zeros( n ) {\n\tvar out = '';\n\tvar i;\n\tfor ( i = 0; i < n; i++ ) {\n\t\tout += '0';\n\t}\n\treturn out;\n}\n\n\n// MAIN //\n\n/**\n* Pads a token with zeros to the specified width.\n*\n* @private\n* @param {string} str - token argument\n* @param {number} width - token width\n* @param {boolean} [right=false] - boolean indicating whether to pad to the right\n* @returns {string} padded token argument\n*/\nfunction zeroPad( str, width, right ) {\n\tvar negative = false;\n\tvar pad = width - str.length;\n\tif ( pad < 0 ) {\n\t\treturn str;\n\t}\n\tif ( startsWithMinus( str ) ) {\n\t\tnegative = true;\n\t\tstr = str.substr( 1 );\n\t}\n\tstr = ( right ) ?\n\t\tstr + zeros( pad ) :\n\t\tzeros( pad ) + str;\n\tif ( negative ) {\n\t\tstr = '-' + str;\n\t}\n\treturn str;\n}\n\n\n// EXPORTS //\n\nexport default zeroPad;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isNumber from './is_number.js';\nimport zeroPad from './zero_pad.js';\n\n// NOTE: for the following, we explicitly avoid using stdlib packages in this particular package in order to avoid circular dependencies.\nvar lowercase = String.prototype.toLowerCase;\nvar uppercase = String.prototype.toUpperCase;\n\n\n// MAIN //\n\n/**\n* Formats a token object argument as an integer.\n*\n* @private\n* @param {Object} token - token object\n* @throws {Error} must provide a valid integer\n* @returns {string} formatted token argument\n*/\nfunction formatInteger( token ) {\n\tvar base;\n\tvar out;\n\tvar i;\n\n\tswitch ( token.specifier ) {\n\tcase 'b':\n\t\t// Case: %b (binary)\n\t\tbase = 2;\n\t\tbreak;\n\tcase 'o':\n\t\t// Case: %o (octal)\n\t\tbase = 8;\n\t\tbreak;\n\tcase 'x':\n\tcase 'X':\n\t\t// Case: %x, %X (hexadecimal)\n\t\tbase = 16;\n\t\tbreak;\n\tcase 'd':\n\tcase 'i':\n\tcase 'u':\n\tdefault:\n\t\t// Case: %d, %i, %u (decimal)\n\t\tbase = 10;\n\t\tbreak;\n\t}\n\tout = token.arg;\n\ti = parseInt( out, 10 );\n\tif ( !isFinite( i ) ) { // NOTE: We use the global `isFinite` function here instead of `@stdlib/math/base/assert/is-finite` in order to avoid circular dependencies.\n\t\tif ( !isNumber( out ) ) {\n\t\t\tthrow new Error( 'invalid integer. Value: ' + out );\n\t\t}\n\t\ti = 0;\n\t}\n\tif ( i < 0 && ( token.specifier === 'u' || base !== 10 ) ) {\n\t\ti = 0xffffffff + i + 1;\n\t}\n\tif ( i < 0 ) {\n\t\tout = ( -i ).toString( base );\n\t\tif ( token.precision ) {\n\t\t\tout = zeroPad( out, token.precision, token.padRight );\n\t\t}\n\t\tout = '-' + out;\n\t} else {\n\t\tout = i.toString( base );\n\t\tif ( !i && !token.precision ) {\n\t\t\tout = '';\n\t\t} else if ( token.precision ) {\n\t\t\tout = zeroPad( out, token.precision, token.padRight );\n\t\t}\n\t\tif ( token.sign ) {\n\t\t\tout = token.sign + out;\n\t\t}\n\t}\n\tif ( base === 16 ) {\n\t\tif ( token.alternate ) {\n\t\t\tout = '0x' + out;\n\t\t}\n\t\tout = ( token.specifier === uppercase.call( token.specifier ) ) ?\n\t\t\tuppercase.call( out ) :\n\t\t\tlowercase.call( out );\n\t}\n\tif ( base === 8 ) {\n\t\tif ( token.alternate && out.charAt( 0 ) !== '0' ) {\n\t\t\tout = '0' + out;\n\t\t}\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default formatInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Tests if a value is a string primitive.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a string primitive\n*\n* @example\n* var bool = isString( 'beep' );\n* // returns true\n*\n* @example\n* var bool = isString( new String( 'beep' ) );\n* // returns false\n*/\nfunction isString( value ) {\n\treturn ( typeof value === 'string' ); // NOTE: we inline the `isString.isPrimitive` function from `@stdlib/assert/is-string` in order to avoid circular dependencies.\n}\n\n\n// EXPORTS //\n\nexport default isString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isNumber from './is_number.js';\n\n// NOTE: for the following, we explicitly avoid using stdlib packages in this particular package in order to avoid circular dependencies.\nvar abs = Math.abs; // eslint-disable-line stdlib/no-builtin-math\nvar lowercase = String.prototype.toLowerCase;\nvar uppercase = String.prototype.toUpperCase;\nvar replace = String.prototype.replace;\n\n\n// VARIABLES //\n\nvar RE_EXP_POS_DIGITS = /e\\+(\\d)$/;\nvar RE_EXP_NEG_DIGITS = /e-(\\d)$/;\nvar RE_ONLY_DIGITS = /^(\\d+)$/;\nvar RE_DIGITS_BEFORE_EXP = /^(\\d+)e/;\nvar RE_TRAILING_PERIOD_ZERO = /\\.0$/;\nvar RE_PERIOD_ZERO_EXP = /\\.0*e/;\nvar RE_ZERO_BEFORE_EXP = /(\\..*[^0])0*e/;\n\n\n// MAIN //\n\n/**\n* Formats a token object argument as a floating-point number.\n*\n* @private\n* @param {Object} token - token object\n* @throws {Error} must provide a valid floating-point number\n* @returns {string} formatted token argument\n*/\nfunction formatDouble( token ) {\n\tvar digits;\n\tvar out;\n\tvar f = parseFloat( token.arg );\n\tif ( !isFinite( f ) ) { // NOTE: We use the global `isFinite` function here instead of `@stdlib/math/base/assert/is-finite` in order to avoid circular dependencies.\n\t\tif ( !isNumber( token.arg ) ) {\n\t\t\tthrow new Error( 'invalid floating-point number. Value: ' + out );\n\t\t}\n\t\t// Case: NaN, Infinity, or -Infinity\n\t\tf = token.arg;\n\t}\n\tswitch ( token.specifier ) {\n\tcase 'e':\n\tcase 'E':\n\t\tout = f.toExponential( token.precision );\n\t\tbreak;\n\tcase 'f':\n\tcase 'F':\n\t\tout = f.toFixed( token.precision );\n\t\tbreak;\n\tcase 'g':\n\tcase 'G':\n\t\tif ( abs( f ) < 0.0001 ) {\n\t\t\tdigits = token.precision;\n\t\t\tif ( digits > 0 ) {\n\t\t\t\tdigits -= 1;\n\t\t\t}\n\t\t\tout = f.toExponential( digits );\n\t\t} else {\n\t\t\tout = f.toPrecision( token.precision );\n\t\t}\n\t\tif ( !token.alternate ) {\n\t\t\tout = replace.call( out, RE_ZERO_BEFORE_EXP, '$1e' );\n\t\t\tout = replace.call( out, RE_PERIOD_ZERO_EXP, 'e');\n\t\t\tout = replace.call( out, RE_TRAILING_PERIOD_ZERO, '' );\n\t\t}\n\t\tbreak;\n\tdefault:\n\t\tthrow new Error( 'invalid double notation. Value: ' + token.specifier );\n\t}\n\tout = replace.call( out, RE_EXP_POS_DIGITS, 'e+0$1' );\n\tout = replace.call( out, RE_EXP_NEG_DIGITS, 'e-0$1' );\n\tif ( token.alternate ) {\n\t\tout = replace.call( out, RE_ONLY_DIGITS, '$1.' );\n\t\tout = replace.call( out, RE_DIGITS_BEFORE_EXP, '$1.e' );\n\t}\n\tif ( f >= 0 && token.sign ) {\n\t\tout = token.sign + out;\n\t}\n\tout = ( token.specifier === uppercase.call( token.specifier ) ) ?\n\t\tuppercase.call( out ) :\n\t\tlowercase.call( out );\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default formatDouble;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// FUNCTIONS //\n\n/**\n* Returns `n` spaces.\n*\n* @private\n* @param {number} n - number of spaces\n* @returns {string} string of spaces\n*/\nfunction spaces( n ) {\n\tvar out = '';\n\tvar i;\n\tfor ( i = 0; i < n; i++ ) {\n\t\tout += ' ';\n\t}\n\treturn out;\n}\n\n\n// MAIN //\n\n/**\n* Pads a token with spaces to the specified width.\n*\n* @private\n* @param {string} str - token argument\n* @param {number} width - token width\n* @param {boolean} [right=false] - boolean indicating whether to pad to the right\n* @returns {string} padded token argument\n*/\nfunction spacePad( str, width, right ) {\n\tvar pad = width - str.length;\n\tif ( pad < 0 ) {\n\t\treturn str;\n\t}\n\tstr = ( right ) ?\n\t\tstr + spaces( pad ) :\n\t\tspaces( pad ) + str;\n\treturn str;\n}\n\n\n// EXPORTS //\n\nexport default spacePad;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport formatInteger from './format_integer.js';\nimport isString from './is_string.js';\nimport formatDouble from './format_double.js';\nimport spacePad from './space_pad.js';\nimport zeroPad from './zero_pad.js';\n\n\n// VARIABLES //\n\nvar fromCharCode = String.fromCharCode;\nvar isnan = isNaN; // NOTE: We use the global `isNaN` function here instead of `@stdlib/math/base/assert/is-nan` to avoid circular dependencies.\nvar isArray = Array.isArray; // NOTE: We use the global `Array.isArray` function here instead of `@stdlib/assert/is-array` to avoid circular dependencies.\n\n\n// FUNCTIONS //\n\n/**\n* Initializes token object with properties of supplied format identifier object or default values if not present.\n*\n* @private\n* @param {Object} token - format identifier object\n* @returns {Object} token object\n*/\nfunction initialize( token ) {\n\tvar out = {};\n\tout.specifier = token.specifier;\n\tout.precision = ( token.precision === void 0 ) ? 1 : token.precision;\n\tout.width = token.width;\n\tout.flags = token.flags || '';\n\tout.mapping = token.mapping;\n\treturn out;\n}\n\n\n// MAIN //\n\n/**\n* Generates string from a token array by interpolating values.\n*\n* @param {Array} tokens - string parts and format identifier objects\n* @param {Array} ...args - variable values\n* @throws {TypeError} first argument must be an array\n* @throws {Error} invalid flags\n* @returns {string} formatted string\n*\n* @example\n* var tokens = [ 'beep ', { 'specifier': 's' } ];\n* var out = formatInterpolate( tokens, 'boop' );\n* // returns 'beep boop'\n*/\nfunction formatInterpolate( tokens ) {\n\tvar hasPeriod;\n\tvar flags;\n\tvar token;\n\tvar flag;\n\tvar num;\n\tvar out;\n\tvar pos;\n\tvar i;\n\tvar j;\n\n\tif ( !isArray( tokens ) ) {\n\t\tthrow new TypeError( 'invalid argument. First argument must be an array. Value: `' + tokens + '`.' );\n\t}\n\tout = '';\n\tpos = 1;\n\tfor ( i = 0; i < tokens.length; i++ ) {\n\t\ttoken = tokens[ i ];\n\t\tif ( isString( token ) ) {\n\t\t\tout += token;\n\t\t} else {\n\t\t\thasPeriod = token.precision !== void 0;\n\t\t\ttoken = initialize( token );\n\t\t\tif ( !token.specifier ) {\n\t\t\t\tthrow new TypeError( 'invalid argument. Token is missing `specifier` property. Index: `'+ i +'`. Value: `' + token + '`.' );\n\t\t\t}\n\t\t\tif ( token.mapping ) {\n\t\t\t\tpos = token.mapping;\n\t\t\t}\n\t\t\tflags = token.flags;\n\t\t\tfor ( j = 0; j < flags.length; j++ ) {\n\t\t\t\tflag = flags.charAt( j );\n\t\t\t\tswitch ( flag ) {\n\t\t\t\tcase ' ':\n\t\t\t\t\ttoken.sign = ' ';\n\t\t\t\t\tbreak;\n\t\t\t\tcase '+':\n\t\t\t\t\ttoken.sign = '+';\n\t\t\t\t\tbreak;\n\t\t\t\tcase '-':\n\t\t\t\t\ttoken.padRight = true;\n\t\t\t\t\ttoken.padZeros = false;\n\t\t\t\t\tbreak;\n\t\t\t\tcase '0':\n\t\t\t\t\ttoken.padZeros = flags.indexOf( '-' ) < 0; // NOTE: We use built-in `Array.prototype.indexOf` here instead of `@stdlib/assert/contains` in order to avoid circular dependencies.\n\t\t\t\t\tbreak;\n\t\t\t\tcase '#':\n\t\t\t\t\ttoken.alternate = true;\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tthrow new Error( 'invalid flag: ' + flag );\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( token.width === '*' ) {\n\t\t\t\ttoken.width = parseInt( arguments[ pos ], 10 );\n\t\t\t\tpos += 1;\n\t\t\t\tif ( isnan( token.width ) ) {\n\t\t\t\t\tthrow new TypeError( 'the argument for * width at position ' + pos + ' is not a number. Value: `' + token.width + '`.' );\n\t\t\t\t}\n\t\t\t\tif ( token.width < 0 ) {\n\t\t\t\t\ttoken.padRight = true;\n\t\t\t\t\ttoken.width = -token.width;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( hasPeriod ) {\n\t\t\t\tif ( token.precision === '*' ) {\n\t\t\t\t\ttoken.precision = parseInt( arguments[ pos ], 10 );\n\t\t\t\t\tpos += 1;\n\t\t\t\t\tif ( isnan( token.precision ) ) {\n\t\t\t\t\t\tthrow new TypeError( 'the argument for * precision at position ' + pos + ' is not a number. Value: `' + token.precision + '`.' );\n\t\t\t\t\t}\n\t\t\t\t\tif ( token.precision < 0 ) {\n\t\t\t\t\t\ttoken.precision = 1;\n\t\t\t\t\t\thasPeriod = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\ttoken.arg = arguments[ pos ];\n\t\t\tswitch ( token.specifier ) {\n\t\t\tcase 'b':\n\t\t\tcase 'o':\n\t\t\tcase 'x':\n\t\t\tcase 'X':\n\t\t\tcase 'd':\n\t\t\tcase 'i':\n\t\t\tcase 'u':\n\t\t\t\t// Case: %b (binary), %o (octal), %x, %X (hexadecimal), %d, %i (decimal), %u (unsigned decimal)\n\t\t\t\tif ( hasPeriod ) {\n\t\t\t\t\ttoken.padZeros = false;\n\t\t\t\t}\n\t\t\t\ttoken.arg = formatInteger( token );\n\t\t\t\tbreak;\n\t\t\tcase 's':\n\t\t\t\t// Case: %s (string)\n\t\t\t\ttoken.maxWidth = ( hasPeriod ) ? token.precision : -1;\n\t\t\t\tbreak;\n\t\t\tcase 'c':\n\t\t\t\t// Case: %c (character)\n\t\t\t\tif ( !isnan( token.arg ) ) {\n\t\t\t\t\tnum = parseInt( token.arg, 10 );\n\t\t\t\t\tif ( num < 0 || num > 127 ) {\n\t\t\t\t\t\tthrow new Error( 'invalid character code. Value: ' + token.arg );\n\t\t\t\t\t}\n\t\t\t\t\ttoken.arg = ( isnan( num ) ) ?\n\t\t\t\t\t\tString( token.arg ) :\n\t\t\t\t\t\tfromCharCode( num );\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'e':\n\t\t\tcase 'E':\n\t\t\tcase 'f':\n\t\t\tcase 'F':\n\t\t\tcase 'g':\n\t\t\tcase 'G':\n\t\t\t\t// Case: %e, %E (scientific notation), %f, %F (decimal floating point), %g, %G (uses the shorter of %e/E or %f/F)\n\t\t\t\tif ( !hasPeriod ) {\n\t\t\t\t\ttoken.precision = 6;\n\t\t\t\t}\n\t\t\t\ttoken.arg = formatDouble( token );\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tthrow new Error( 'invalid specifier: ' + token.specifier );\n\t\t\t}\n\t\t\t// Fit argument into field width...\n\t\t\tif ( token.maxWidth >= 0 && token.arg.length > token.maxWidth ) {\n\t\t\t\ttoken.arg = token.arg.substring( 0, token.maxWidth );\n\t\t\t}\n\t\t\tif ( token.padZeros ) {\n\t\t\t\ttoken.arg = zeroPad( token.arg, token.width || token.precision, token.padRight ); // eslint-disable-line max-len\n\t\t\t} else if ( token.width ) {\n\t\t\t\ttoken.arg = spacePad( token.arg, token.width, token.padRight );\n\t\t\t}\n\t\t\tout += token.arg || '';\n\t\t\tpos += 1;\n\t\t}\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default formatInterpolate;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// VARIABLES //\n\nvar RE = /%(?:([1-9]\\d*)\\$)?([0 +\\-#]*)(\\*|\\d+)?(?:(\\.)(\\*|\\d+)?)?[hlL]?([%A-Za-z])/g;\n\n\n// FUNCTIONS //\n\n/**\n* Parses a delimiter.\n*\n* @private\n* @param {Array} match - regular expression match\n* @returns {Object} delimiter token object\n*/\nfunction parse( match ) {\n\tvar token = {\n\t\t'mapping': ( match[ 1 ] ) ? parseInt( match[ 1 ], 10 ) : void 0,\n\t\t'flags': match[ 2 ],\n\t\t'width': match[ 3 ],\n\t\t'precision': match[ 5 ],\n\t\t'specifier': match[ 6 ]\n\t};\n\tif ( match[ 4 ] === '.' && match[ 5 ] === void 0 ) {\n\t\ttoken.precision = '1';\n\t}\n\treturn token;\n}\n\n\n// MAIN //\n\n/**\n* Tokenizes a string into an array of string parts and format identifier objects.\n*\n* @param {string} str - input string\n* @returns {Array} tokens\n*\n* @example\n* var tokens = formatTokenize( 'Hello %s!' );\n* // returns [ 'Hello ', {...}, '!' ]\n*/\nfunction formatTokenize( str ) {\n\tvar content;\n\tvar tokens;\n\tvar match;\n\tvar prev;\n\n\ttokens = [];\n\tprev = 0;\n\tmatch = RE.exec( str );\n\twhile ( match ) {\n\t\tcontent = str.slice( prev, RE.lastIndex - match[ 0 ].length );\n\t\tif ( content.length ) {\n\t\t\ttokens.push( content );\n\t\t}\n\t\ttokens.push( parse( match ) );\n\t\tprev = RE.lastIndex;\n\t\tmatch = RE.exec( str );\n\t}\n\tcontent = str.slice( prev );\n\tif ( content.length ) {\n\t\ttokens.push( content );\n\t}\n\treturn tokens;\n}\n\n\n// EXPORTS //\n\nexport default formatTokenize;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Tests if a value is a string primitive.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a string primitive\n*\n* @example\n* var bool = isString( 'beep' );\n* // returns true\n*\n* @example\n* var bool = isString( new String( 'beep' ) );\n* // returns false\n*/\nfunction isString( value ) {\n\treturn ( typeof value === 'string' ); // NOTE: we inline the `isString.isPrimitive` function from `@stdlib/assert/is-string` in order to avoid circular dependencies.\n}\n\n\n// EXPORTS //\n\nexport default isString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport interpolate from '@stdlib/string-base-format-interpolate';\nimport tokenize from '@stdlib/string-base-format-tokenize';\nimport isString from './is_string.js';\n\n\n// MAIN //\n\n/**\n* Inserts supplied variable values into a format string.\n*\n* @param {string} str - input string\n* @param {Array} ...args - variable values\n* @throws {TypeError} first argument must be a string\n* @throws {Error} invalid flags\n* @returns {string} formatted string\n*\n* @example\n* var str = format( 'Hello %s!', 'world' );\n* // returns 'Hello world!'\n*\n* @example\n* var str = format( 'Pi: ~%.2f', 3.141592653589793 );\n* // returns 'Pi: ~3.14'\n*/\nfunction format( str ) {\n\tvar tokens;\n\tvar args;\n\tvar i;\n\n\tif ( !isString( str ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a string. Value: `%s`.', str ) );\n\t}\n\ttokens = tokenize( str );\n\targs = new Array( arguments.length );\n\targs[ 0 ] = tokens;\n\tfor ( i = 1; i < args.length; i++ ) {\n\t\targs[ i ] = arguments[ i ];\n\t}\n\treturn interpolate.apply( null, args );\n}\n\n\n// EXPORTS //\n\nexport default format;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable no-underscore-dangle, no-proto */\n\n'use strict';\n\n// MODULES //\n\nimport format from '@stdlib/string-format';\n\n\n// VARIABLES //\n\nvar objectProtoype = Object.prototype;\nvar toStr = objectProtoype.toString;\nvar defineGetter = objectProtoype.__defineGetter__;\nvar defineSetter = objectProtoype.__defineSetter__;\nvar lookupGetter = objectProtoype.__lookupGetter__;\nvar lookupSetter = objectProtoype.__lookupSetter__;\n\n\n// MAIN //\n\n/**\n* Defines (or modifies) an object property.\n*\n* ## Notes\n*\n* - Property descriptors come in two flavors: **data descriptors** and **accessor descriptors**. A data descriptor is a property that has a value, which may or may not be writable. An accessor descriptor is a property described by a getter-setter function pair. A descriptor must be one of these two flavors and cannot be both.\n*\n* @param {Object} obj - object on which to define the property\n* @param {string} prop - property name\n* @param {Object} descriptor - property descriptor\n* @param {boolean} [descriptor.configurable=false] - boolean indicating if property descriptor can be changed and if the property can be deleted from the provided object\n* @param {boolean} [descriptor.enumerable=false] - boolean indicating if the property shows up when enumerating object properties\n* @param {boolean} [descriptor.writable=false] - boolean indicating if the value associated with the property can be changed with an assignment operator\n* @param {*} [descriptor.value] - property value\n* @param {(Function|void)} [descriptor.get=undefined] - function which serves as a getter for the property, or, if no getter, undefined. When the property is accessed, a getter function is called without arguments and with the `this` context set to the object through which the property is accessed (which may not be the object on which the property is defined due to inheritance). The return value will be used as the property value.\n* @param {(Function|void)} [descriptor.set=undefined] - function which serves as a setter for the property, or, if no setter, undefined. When assigning a property value, a setter function is called with one argument (the value being assigned to the property) and with the `this` context set to the object through which the property is assigned.\n* @throws {TypeError} first argument must be an object\n* @throws {TypeError} third argument must be an object\n* @throws {Error} property descriptor cannot have both a value and a setter and/or getter\n* @returns {Object} object with added property\n*\n* @example\n* var obj = {};\n*\n* defineProperty( obj, 'foo', {\n* 'value': 'bar'\n* });\n*\n* var str = obj.foo;\n* // returns 'bar'\n*/\nfunction defineProperty( obj, prop, descriptor ) {\n\tvar prototype;\n\tvar hasValue;\n\tvar hasGet;\n\tvar hasSet;\n\n\tif ( typeof obj !== 'object' || obj === null || toStr.call( obj ) === '[object Array]' ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be an object. Value: `%s`.', obj ) );\n\t}\n\tif ( typeof descriptor !== 'object' || descriptor === null || toStr.call( descriptor ) === '[object Array]' ) {\n\t\tthrow new TypeError( format( 'invalid argument. Property descriptor must be an object. Value: `%s`.', descriptor ) );\n\t}\n\thasValue = ( 'value' in descriptor );\n\tif ( hasValue ) {\n\t\tif (\n\t\t\tlookupGetter.call( obj, prop ) ||\n\t\t\tlookupSetter.call( obj, prop )\n\t\t) {\n\t\t\t// Override `__proto__` to avoid touching inherited accessors:\n\t\t\tprototype = obj.__proto__;\n\t\t\tobj.__proto__ = objectProtoype;\n\n\t\t\t// Delete property as existing getters/setters prevent assigning value to specified property:\n\t\t\tdelete obj[ prop ];\n\t\t\tobj[ prop ] = descriptor.value;\n\n\t\t\t// Restore original prototype:\n\t\t\tobj.__proto__ = prototype;\n\t\t} else {\n\t\t\tobj[ prop ] = descriptor.value;\n\t\t}\n\t}\n\thasGet = ( 'get' in descriptor );\n\thasSet = ( 'set' in descriptor );\n\n\tif ( hasValue && ( hasGet || hasSet ) ) {\n\t\tthrow new Error( 'invalid argument. Cannot specify one or more accessors and a value or writable attribute in the property descriptor.' );\n\t}\n\n\tif ( hasGet && defineGetter ) {\n\t\tdefineGetter.call( obj, prop, descriptor.get );\n\t}\n\tif ( hasSet && defineSetter ) {\n\t\tdefineSetter.call( obj, prop, descriptor.set );\n\t}\n\treturn obj;\n}\n\n\n// EXPORTS //\n\nexport default defineProperty;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Define (or modify) an object property.\n*\n* @module @stdlib/utils-define-property\n*\n* @example\n* import defineProperty from '@stdlib/utils-define-property';\n*\n* var obj = {};\n* defineProperty( obj, 'foo', {\n* 'value': 'bar',\n* 'writable': false,\n* 'configurable': false,\n* 'enumerable': false\n* });\n* obj.foo = 'boop'; // => throws\n*/\n\n// MODULES //\n\nimport hasDefinePropertySupport from './has_define_property_support.js';\nimport builtin from './builtin.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar defineProperty;\nif ( hasDefinePropertySupport() ) {\n\tdefineProperty = builtin;\n} else {\n\tdefineProperty = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default defineProperty;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport defineProperty from './define_property.js';\n\n\n// MAIN //\n\n/**\n* Tests for `Object.defineProperty` support.\n*\n* @private\n* @returns {boolean} boolean indicating if an environment has `Object.defineProperty` support\n*\n* @example\n* var bool = hasDefinePropertySupport();\n* // returns \n*/\nfunction hasDefinePropertySupport() {\n\t// Test basic support...\n\ttry {\n\t\tdefineProperty( {}, 'x', {} );\n\t\treturn true;\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\treturn false;\n\t}\n}\n\n\n// EXPORTS //\n\nexport default hasDefinePropertySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport defineProperty from '@stdlib/utils-define-property';\n\n\n// MAIN //\n\n/**\n* Defines a non-enumerable read-only property.\n*\n* @param {Object} obj - object on which to define the property\n* @param {(string|symbol)} prop - property name\n* @param {*} value - value to set\n*\n* @example\n* var obj = {};\n*\n* setNonEnumerableReadOnly( obj, 'foo', 'bar' );\n*\n* try {\n* obj.foo = 'boop';\n* } catch ( err ) {\n* console.error( err.message );\n* }\n*/\nfunction setNonEnumerableReadOnly( obj, prop, value ) {\n\tdefineProperty( obj, prop, {\n\t\t'configurable': false,\n\t\t'enumerable': false,\n\t\t'writable': false,\n\t\t'value': value\n\t});\n}\n\n\n// EXPORTS //\n\nexport default setNonEnumerableReadOnly;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Tests if a value is a number primitive.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number primitive\n*\n* @example\n* var bool = isNumber( 3.14 );\n* // returns true\n*\n* @example\n* var bool = isNumber( NaN );\n* // returns true\n*\n* @example\n* var bool = isNumber( new Number( 3.14 ) );\n* // returns false\n*/\nfunction isNumber( value ) {\n\treturn ( typeof value === 'number' );\n}\n\n\n// EXPORTS //\n\nexport default isNumber;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport hasSymbols from '@stdlib/assert-has-symbol-support';\n\n\n// VARIABLES //\n\nvar FLG = hasSymbols();\n\n\n// MAIN //\n\n/**\n* Tests for native `toStringTag` support.\n*\n* @returns {boolean} boolean indicating if an environment has `toStringTag` support\n*\n* @example\n* var bool = hasToStringTagSupport();\n* // returns \n*/\nfunction hasToStringTagSupport() {\n\treturn ( FLG && typeof Symbol.toStringTag === 'symbol' );\n}\n\n\n// EXPORTS //\n\nexport default hasToStringTagSupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Tests for native `Symbol` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Symbol` support\n*\n* @example\n* var bool = hasSymbolSupport();\n* // returns \n*/\nfunction hasSymbolSupport() {\n\treturn (\n\t\ttypeof Symbol === 'function' &&\n\t\ttypeof Symbol( 'foo' ) === 'symbol'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default hasSymbolSupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar toStr = Object.prototype.toString;\n\n\n// EXPORTS //\n\nexport default toStr;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// FUNCTIONS //\n\nvar has = Object.prototype.hasOwnProperty;\n\n\n// MAIN //\n\n/**\n* Tests if an object has a specified property.\n*\n* @param {*} value - value to test\n* @param {*} property - property to test\n* @returns {boolean} boolean indicating if an object has a specified property\n*\n* @example\n* var beep = {\n* 'boop': true\n* };\n*\n* var bool = hasOwnProp( beep, 'boop' );\n* // returns true\n*\n* @example\n* var beep = {\n* 'boop': true\n* };\n*\n* var bool = hasOwnProp( beep, 'bap' );\n* // returns false\n*/\nfunction hasOwnProp( value, property ) {\n\tif (\n\t\tvalue === void 0 ||\n\t\tvalue === null\n\t) {\n\t\treturn false;\n\t}\n\treturn has.call( value, property );\n}\n\n\n// EXPORTS //\n\nexport default hasOwnProp;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar Sym = ( typeof Symbol === 'function' ) ? Symbol : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default Sym;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport Symbol from '@stdlib/symbol-ctor';\n\n\n// MAIN //\n\nvar toStrTag = ( typeof Symbol === 'function' ) ? Symbol.toStringTag : '';\n\n\n// EXPORTS //\n\nexport default toStrTag;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Return a string value indicating a specification defined classification of an object.\n*\n* @module @stdlib/utils-native-class\n*\n* @example\n* import nativeClass from '@stdlib/utils-native-class';\n*\n* var str = nativeClass( 'a' );\n* // returns '[object String]'\n*\n* str = nativeClass( 5 );\n* // returns '[object Number]'\n*\n* function Beep() {\n* return this;\n* }\n* str = nativeClass( new Beep() );\n* // returns '[object Object]'\n*/\n\n// MODULES //\n\nimport hasToStringTag from '@stdlib/assert-has-tostringtag-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar main;\nif ( hasToStringTag() ) {\n\tmain = polyfill;\n} else {\n\tmain = builtin;\n}\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport hasOwnProp from '@stdlib/assert-has-own-property';\nimport toStringTag from './tostringtag.js';\nimport toStr from './tostring.js';\n\n\n// MAIN //\n\n/**\n* Returns a string value indicating a specification defined classification of an object in environments supporting `Symbol.toStringTag`.\n*\n* @param {*} v - input value\n* @returns {string} string value indicating a specification defined classification of the input value\n*\n* @example\n* var str = nativeClass( 'a' );\n* // returns '[object String]'\n*\n* @example\n* var str = nativeClass( 5 );\n* // returns '[object Number]'\n*\n* @example\n* function Beep() {\n* return this;\n* }\n* var str = nativeClass( new Beep() );\n* // returns '[object Object]'\n*/\nfunction nativeClass( v ) {\n\tvar isOwn;\n\tvar tag;\n\tvar out;\n\n\tif ( v === null || v === void 0 ) {\n\t\treturn toStr.call( v );\n\t}\n\ttag = v[ toStringTag ];\n\tisOwn = hasOwnProp( v, toStringTag );\n\n\t// Attempt to override the `toStringTag` property. For built-ins having a `Symbol.toStringTag` property (e.g., `JSON`, `Math`, etc), the `Symbol.toStringTag` property is read-only (e.g., , so we need to wrap in a `try/catch`.\n\ttry {\n\t\tv[ toStringTag ] = void 0;\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\treturn toStr.call( v );\n\t}\n\tout = toStr.call( v );\n\n\tif ( isOwn ) {\n\t\tv[ toStringTag ] = tag;\n\t} else {\n\t\tdelete v[ toStringTag ];\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default nativeClass;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport toStr from './tostring.js';\n\n\n// MAIN //\n\n/**\n* Returns a string value indicating a specification defined classification (via the internal property `[[Class]]`) of an object.\n*\n* @param {*} v - input value\n* @returns {string} string value indicating a specification defined classification of the input value\n*\n* @example\n* var str = nativeClass( 'a' );\n* // returns '[object String]'\n*\n* @example\n* var str = nativeClass( 5 );\n* // returns '[object Number]'\n*\n* @example\n* function Beep() {\n* return this;\n* }\n* var str = nativeClass( new Beep() );\n* // returns '[object Object]'\n*/\nfunction nativeClass( v ) {\n\treturn toStr.call( v );\n}\n\n\n// EXPORTS //\n\nexport default nativeClass;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// EXPORTS //\n\nexport default Number; // eslint-disable-line stdlib/require-globals\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport Number from '@stdlib/number-ctor';\n\n\n// MAIN //\n\n// eslint-disable-next-line stdlib/no-redeclare\nvar toString = Number.prototype.toString; // non-generic\n\n\n// EXPORTS //\n\nexport default toString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport hasToStringTag from '@stdlib/assert-has-tostringtag-support';\nimport nativeClass from '@stdlib/utils-native-class';\nimport Number from '@stdlib/number-ctor';\nimport test from './try2serialize.js';\n\n\n// VARIABLES //\n\nvar FLG = hasToStringTag();\n\n\n// MAIN //\n\n/**\n* Tests if a value is a number object.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number object\n*\n* @example\n* var bool = isNumber( 3.14 );\n* // returns false\n*\n* @example\n* var bool = isNumber( new Number( 3.14 ) );\n* // returns true\n*/\nfunction isNumber( value ) {\n\tif ( typeof value === 'object' ) {\n\t\tif ( value instanceof Number ) {\n\t\t\treturn true;\n\t\t}\n\t\tif ( FLG ) {\n\t\t\treturn test( value );\n\t\t}\n\t\treturn ( nativeClass( value ) === '[object Number]' );\n\t}\n\treturn false;\n}\n\n\n// EXPORTS //\n\nexport default isNumber;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport toString from './tostring.js'; // eslint-disable-line stdlib/no-redeclare\n\n\n// MAIN //\n\n/**\n* Attempts to serialize a value to a string.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value can be serialized\n*/\nfunction test( value ) {\n\ttry {\n\t\ttoString.call( value );\n\t\treturn true;\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\treturn false;\n\t}\n}\n\n\n// EXPORTS //\n\nexport default test;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a number.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a number\n*\n* @example\n* var bool = isNumber( 3.14 );\n* // returns true\n*\n* @example\n* var bool = isNumber( new Number( 3.14 ) );\n* // returns true\n*\n* @example\n* var bool = isNumber( NaN );\n* // returns true\n*\n* @example\n* var bool = isNumber( null );\n* // returns false\n*/\nfunction isNumber( value ) {\n\treturn ( isPrimitive( value ) || isObject( value ) );\n}\n\n\n// EXPORTS //\n\nexport default isNumber;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test if a value is a number.\n*\n* @module @stdlib/assert-is-number\n*\n* @example\n* import isNumber from '@stdlib/assert-is-number';\n*\n* var bool = isNumber( 3.14 );\n* // returns true\n*\n* bool = isNumber( new Number( 3.14 ) );\n* // returns true\n*\n* bool = isNumber( NaN );\n* // returns true\n*\n* bool = isNumber( null );\n* // returns false\n*\n* @example\n* import { isPrimitive as isNumber } from '@stdlib/assert-is-number';\n*\n* var bool = isNumber( 3.14 );\n* // returns true\n*\n* bool = isNumber( NaN );\n* // returns true\n*\n* bool = isNumber( new Number( 3.14 ) );\n* // returns false\n*\n* @example\n* import { isObject as isNumber } from '@stdlib/assert-is-number';\n*\n* var bool = isNumber( 3.14 );\n* // returns false\n*\n* bool = isNumber( new Number( 3.14 ) );\n* // returns true\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'isPrimitive', isPrimitive );\nsetReadOnly( main, 'isObject', isObject );\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Double-precision floating-point positive infinity.\n*\n* @module @stdlib/constants-float64-pinf\n* @type {number}\n*\n* @example\n* import FLOAT64_PINF from '@stdlib/constants-float64-pinf';\n* // returns Infinity\n*/\n\n\n// MAIN //\n\n/**\n* Double-precision floating-point positive infinity.\n*\n* ## Notes\n*\n* Double-precision floating-point positive infinity has the bit sequence\n*\n* ```binarystring\n* 0 11111111111 00000000000000000000 00000000000000000000000000000000\n* ```\n*\n* @constant\n* @type {number}\n* @default Number.POSITIVE_INFINITY\n* @see [IEEE 754]{@link https://en.wikipedia.org/wiki/IEEE_754-1985}\n*/\nvar FLOAT64_PINF = Number.POSITIVE_INFINITY; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default FLOAT64_PINF;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Double-precision floating-point negative infinity.\n*\n* @module @stdlib/constants-float64-ninf\n* @type {number}\n*\n* @example\n* import FLOAT64_NINF from '@stdlib/constants-float64-ninf';\n* // returns -Infinity\n*/\n\n// MODULES //\n\nimport Number from '@stdlib/number-ctor';\n\n\n// MAIN //\n\n/**\n* Double-precision floating-point negative infinity.\n*\n* ## Notes\n*\n* Double-precision floating-point negative infinity has the bit sequence\n*\n* ```binarystring\n* 1 11111111111 00000000000000000000 00000000000000000000000000000000\n* ```\n*\n* @constant\n* @type {number}\n* @default Number.NEGATIVE_INFINITY\n* @see [IEEE 754]{@link https://en.wikipedia.org/wiki/IEEE_754-1985}\n*/\nvar FLOAT64_NINF = Number.NEGATIVE_INFINITY;\n\n\n// EXPORTS //\n\nexport default FLOAT64_NINF;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: implementation (?)\n\n/**\n* Rounds a double-precision floating-point number toward negative infinity.\n*\n* @param {number} x - input value\n* @returns {number} rounded value\n*\n* @example\n* var v = floor( -4.2 );\n* // returns -5.0\n*\n* @example\n* var v = floor( 9.99999 );\n* // returns 9.0\n*\n* @example\n* var v = floor( 0.0 );\n* // returns 0.0\n*\n* @example\n* var v = floor( NaN );\n* // returns NaN\n*/\nvar floor = Math.floor; // eslint-disable-line stdlib/no-builtin-math\n\n\n// EXPORTS //\n\nexport default floor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport floor from '@stdlib/math-base-special-floor';\n\n\n// MAIN //\n\n/**\n* Tests if a finite double-precision floating-point number is an integer.\n*\n* @param {number} x - value to test\n* @returns {boolean} boolean indicating whether the value is an integer\n*\n* @example\n* var bool = isInteger( 1.0 );\n* // returns true\n*\n* @example\n* var bool = isInteger( 3.14 );\n* // returns false\n*/\nfunction isInteger( x ) {\n\treturn (floor(x) === x);\n}\n\n\n// EXPORTS //\n\nexport default isInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport PINF from '@stdlib/constants-float64-pinf';\nimport NINF from '@stdlib/constants-float64-ninf';\nimport isInt from '@stdlib/math-base-assert-is-integer';\n\n\n// MAIN //\n\n/**\n* Tests if a number primitive is an integer value.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a number primitive is an integer value\n*/\nfunction isInteger( value ) {\n\treturn (\n\t\tvalue < PINF &&\n\t\tvalue > NINF &&\n\t\tisInt( value )\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isNumber } from '@stdlib/assert-is-number';\nimport isInt from './integer.js';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a number primitive having an integer value.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number primitive having an integer value\n*\n* @example\n* var bool = isInteger( -3.0 );\n* // returns true\n*\n* @example\n* var bool = isInteger( new Number( -3.0 ) );\n* // returns false\n*/\nfunction isInteger( value ) {\n\treturn (\n\t\tisNumber( value ) &&\n\t\tisInt( value )\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isObject as isNumber } from '@stdlib/assert-is-number';\nimport isInt from './integer.js';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a number object having an integer value.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number object having an integer value\n*\n* @example\n* var bool = isInteger( 3.0 );\n* // returns false\n*\n* @example\n* var bool = isInteger( new Number( 3.0 ) );\n* // returns true\n*/\nfunction isInteger( value ) {\n\treturn (\n\t\tisNumber( value ) &&\n\t\tisInt( value.valueOf() )\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\n/**\n* Tests if a value is an integer.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an integer\n*\n* @example\n* var bool = isInteger( 5.0 );\n* // returns true\n*\n* @example\n* var bool = isInteger( new Number( 5.0 ) );\n* // returns true\n*\n* @example\n* var bool = isInteger( -3.14 );\n* // returns false\n*\n* @example\n* var bool = isInteger( null );\n* // returns false\n*/\nfunction isInteger( value ) {\n\treturn ( isPrimitive( value ) || isObject( value ) );\n}\n\n\n// EXPORTS //\n\nexport default isInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isInteger } from '@stdlib/assert-is-integer';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a number primitive having a nonnegative integer value.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number primitive having a nonnegative integer value\n*\n* @example\n* var bool = isNonNegativeInteger( 3.0 );\n* // returns true\n*\n* @example\n* var bool = isNonNegativeInteger( new Number( 3.0 ) );\n* // returns false\n*/\nfunction isNonNegativeInteger( value ) {\n\treturn (\n\t\tisInteger( value ) &&\n\t\tvalue >= 0\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isNonNegativeInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isObject as isInteger } from '@stdlib/assert-is-integer';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a number object having a nonnegative integer value.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number object having a nonnegative integer value\n*\n* @example\n* var bool = isNonNegativeInteger( 3.0 );\n* // returns false\n*\n* @example\n* var bool = isNonNegativeInteger( new Number( 3.0 ) );\n* // returns true\n*/\nfunction isNonNegativeInteger( value ) {\n\treturn (\n\t\tisInteger( value ) &&\n\t\tvalue.valueOf() >= 0\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isNonNegativeInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a nonnegative integer.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a nonnegative integer\n*\n* @example\n* var bool = isNonNegativeInteger( 5.0 );\n* // returns true\n*\n* @example\n* var bool = isNonNegativeInteger( new Number( 5.0 ) );\n* // returns true\n*\n* @example\n* var bool = isNonNegativeInteger( -5.0 );\n* // returns false\n*\n* @example\n* var bool = isNonNegativeInteger( 3.14 );\n* // returns false\n*\n* @example\n* var bool = isNonNegativeInteger( null );\n* // returns false\n*/\nfunction isNonNegativeInteger( value ) {\n\treturn ( isPrimitive( value ) || isObject( value ) );\n}\n\n\n// EXPORTS //\n\nexport default isNonNegativeInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test if a value is an integer.\n*\n* @module @stdlib/assert-is-integer\n*\n* @example\n* import isInteger from '@stdlib/assert-is-integer';\n*\n* var bool = isInteger( 5.0 );\n* // returns true\n*\n* bool = isInteger( new Number( 5.0 ) );\n* // returns true\n*\n* bool = isInteger( -3.14 );\n* // returns false\n*\n* bool = isInteger( null );\n* // returns false\n*\n* @example\n* // Use interface to check for integer primitives...\n* import { isPrimitive as isInteger } from '@stdlib/assert-is-integer';\n*\n* var bool = isInteger( -3.0 );\n* // returns true\n*\n* bool = isInteger( new Number( -3.0 ) );\n* // returns false\n*\n* @example\n* // Use interface to check for integer objects...\n* import { isObject as isInteger } from '@stdlib/assert-is-integer';\n*\n* var bool = isInteger( 3.0 );\n* // returns false\n*\n* bool = isInteger( new Number( 3.0 ) );\n* // returns true\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'isPrimitive', isPrimitive );\nsetReadOnly( main, 'isObject', isObject );\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test if a value is a nonnegative integer.\n*\n* @module @stdlib/assert-is-nonnegative-integer\n*\n* @example\n* import isNonNegativeInteger from '@stdlib/assert-is-nonnegative-integer';\n*\n* var bool = isNonNegativeInteger( 5.0 );\n* // returns true\n*\n* bool = isNonNegativeInteger( new Number( 5.0 ) );\n* // returns true\n*\n* bool = isNonNegativeInteger( -5.0 );\n* // returns false\n*\n* bool = isNonNegativeInteger( 3.14 );\n* // returns false\n*\n* bool = isNonNegativeInteger( null );\n* // returns false\n*\n* @example\n* import { isPrimitive as isNonNegativeInteger } from '@stdlib/assert-is-nonnegative-integer';\n*\n* var bool = isNonNegativeInteger( 3.0 );\n* // returns true\n*\n* bool = isNonNegativeInteger( new Number( 3.0 ) );\n* // returns false\n*\n* @example\n* import { isObject as isNonNegativeInteger } from '@stdlib/assert-is-nonnegative-integer';\n*\n* var bool = isNonNegativeInteger( 3.0 );\n* // returns false\n*\n* bool = isNonNegativeInteger( new Number( 3.0 ) );\n* // returns true\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'isPrimitive', isPrimitive );\nsetReadOnly( main, 'isObject', isObject );\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasFloat64Array = ( typeof Float64Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Float64Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a Float64Array\n*\n* @example\n* var bool = isFloat64Array( new Float64Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isFloat64Array( [] );\n* // returns false\n*/\nfunction isFloat64Array( value ) {\n\treturn (\n\t\t( hasFloat64Array && value instanceof Float64Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Float64Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isFloat64Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Float64Array === 'function' ) ? Float64Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Float64Array === 'function' ) ? Float64Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of double-precision floating-point numbers in the platform byte order.\n*\n* @module @stdlib/array-float64\n*\n* @example\n* import ctor from '@stdlib/array-float64';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasFloat64ArraySupport from '@stdlib/assert-has-float64array-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasFloat64ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isFloat64Array from '@stdlib/assert-is-float64array';\nimport GlobalFloat64Array from './float64array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Float64Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Float64Array` support\n*\n* @example\n* var bool = hasFloat64ArraySupport();\n* // returns \n*/\nfunction hasFloat64ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalFloat64Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = new GlobalFloat64Array( [ 1.0, 3.14, -3.14, NaN ] );\n\t\tbool = (\n\t\t\tisFloat64Array( arr ) &&\n\t\t\tarr[ 0 ] === 1.0 &&\n\t\t\tarr[ 1 ] === 3.14 &&\n\t\t\tarr[ 2 ] === -3.14 &&\n\t\t\tarr[ 3 ] !== arr[ 3 ]\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasFloat64ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of double-precision floating-point numbers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasFloat32Array = ( typeof Float32Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Float32Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a Float32Array\n*\n* @example\n* var bool = isFloat32Array( new Float32Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isFloat32Array( [] );\n* // returns false\n*/\nfunction isFloat32Array( value ) {\n\treturn (\n\t\t( hasFloat32Array && value instanceof Float32Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Float32Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isFloat32Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Float32Array === 'function' ) ? Float32Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Float32Array === 'function' ) ? Float32Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of single-precision floating-point numbers in the platform byte order.\n*\n* @module @stdlib/array-float32\n*\n* @example\n* import ctor from '@stdlib/array-float32';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasFloat32ArraySupport from '@stdlib/assert-has-float32array-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasFloat32ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isFloat32Array from '@stdlib/assert-is-float32array';\nimport PINF from '@stdlib/constants-float64-pinf';\nimport GlobalFloat32Array from './float32array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Float32Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Float32Array` support\n*\n* @example\n* var bool = hasFloat32ArraySupport();\n* // returns \n*/\nfunction hasFloat32ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalFloat32Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = new GlobalFloat32Array( [ 1.0, 3.14, -3.14, 5.0e40 ] );\n\t\tbool = (\n\t\t\tisFloat32Array( arr ) &&\n\t\t\tarr[ 0 ] === 1.0 &&\n\t\t\tarr[ 1 ] === 3.140000104904175 &&\n\t\t\tarr[ 2 ] === -3.140000104904175 &&\n\t\t\tarr[ 3 ] === PINF\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasFloat32ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of single-precision floating-point numbers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasInt16Array = ( typeof Int16Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is an Int16Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an Int16Array\n*\n* @example\n* var bool = isInt16Array( new Int16Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isInt16Array( [] );\n* // returns false\n*/\nfunction isInt16Array( value ) {\n\treturn (\n\t\t( hasInt16Array && value instanceof Int16Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Int16Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isInt16Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum signed 16-bit integer.\n*\n* @module @stdlib/constants-int16-max\n* @type {integer32}\n*\n* @example\n* import INT16_MAX from '@stdlib/constants-int16-max';\n* // returns 32767\n*/\n\n\n// MAIN //\n\n/**\n* Maximum signed 16-bit integer.\n*\n* ## Notes\n*\n* The number has the value\n*\n* ```tex\n* 2^{15} - 1\n* ```\n*\n* which corresponds to the bit sequence\n*\n* ```binarystring\n* 0111111111111111\n* ```\n*\n* @constant\n* @type {integer32}\n* @default 32767\n*/\nvar INT16_MAX = 32767|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default INT16_MAX;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Int16Array === 'function' ) ? Int16Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Int16Array === 'function' ) ? Int16Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of twos-complement 16-bit signed integers in the platform byte order.\n*\n* @module @stdlib/array-int16\n*\n* @example\n* import ctor from '@stdlib/array-int16';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasInt16ArraySupport from '@stdlib/assert-has-int16array-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasInt16ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isInt16Array from '@stdlib/assert-is-int16array';\nimport INT16_MAX from '@stdlib/constants-int16-max';\nimport INT16_MIN from '@stdlib/constants-int16-min';\nimport GlobalInt16Array from './int16array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Int16Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Int16Array` support\n*\n* @example\n* var bool = hasInt16ArraySupport();\n* // returns \n*/\nfunction hasInt16ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalInt16Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = new GlobalInt16Array( [ 1, 3.14, -3.14, INT16_MAX+1 ] );\n\t\tbool = (\n\t\t\tisInt16Array( arr ) &&\n\t\t\tarr[ 0 ] === 1 &&\n\t\t\tarr[ 1 ] === 3 && // truncation\n\t\t\tarr[ 2 ] === -3 && // truncation\n\t\t\tarr[ 3 ] === INT16_MIN // wrap around\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasInt16ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Minimum signed 16-bit integer.\n*\n* @module @stdlib/constants-int16-min\n* @type {integer32}\n*\n* @example\n* import INT16_MIN from '@stdlib/constants-int16-min';\n* // returns -32768\n*/\n\n\n// MAIN //\n\n/**\n* Minimum signed 16-bit integer.\n*\n* ## Notes\n*\n* The number has the value\n*\n* ```tex\n* -(2^{15})\n* ```\n*\n* which corresponds to the two's complement bit sequence\n*\n* ```binarystring\n* 1000000000000000\n* ```\n*\n* @constant\n* @type {integer32}\n* @default -32768\n*/\nvar INT16_MIN = -32768|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default INT16_MIN;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of twos-complement 16-bit signed integers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasInt32Array = ( typeof Int32Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is an Int32Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an Int32Array\n*\n* @example\n* var bool = isInt32Array( new Int32Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isInt32Array( [] );\n* // returns false\n*/\nfunction isInt32Array( value ) {\n\treturn (\n\t\t( hasInt32Array && value instanceof Int32Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Int32Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isInt32Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum signed 32-bit integer.\n*\n* @module @stdlib/constants-int32-max\n* @type {integer32}\n*\n* @example\n* import INT32_MAX from '@stdlib/constants-int32-max';\n* // returns 2147483647\n*/\n\n\n// MAIN //\n\n/**\n* Maximum signed 32-bit integer.\n*\n* ## Notes\n*\n* The number has the value\n*\n* ```tex\n* 2^{31} - 1\n* ```\n*\n* which corresponds to the bit sequence\n*\n* ```binarystring\n* 01111111111111111111111111111111\n* ```\n*\n* @constant\n* @type {integer32}\n* @default 2147483647\n*/\nvar INT32_MAX = 2147483647|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default INT32_MAX;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Int32Array === 'function' ) ? Int32Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Int32Array === 'function' ) ? Int32Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of twos-complement 32-bit signed integers in the platform byte order.\n*\n* @module @stdlib/array-int32\n*\n* @example\n* import ctor from '@stdlib/array-int32';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasInt32ArraySupport from '@stdlib/assert-has-int32array-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasInt32ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isInt32Array from '@stdlib/assert-is-int32array';\nimport INT32_MAX from '@stdlib/constants-int32-max';\nimport INT32_MIN from '@stdlib/constants-int32-min';\nimport GlobalInt32Array from './int32array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Int32Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Int32Array` support\n*\n* @example\n* var bool = hasInt32ArraySupport();\n* // returns \n*/\nfunction hasInt32ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalInt32Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = new GlobalInt32Array( [ 1, 3.14, -3.14, INT32_MAX+1 ] );\n\t\tbool = (\n\t\t\tisInt32Array( arr ) &&\n\t\t\tarr[ 0 ] === 1 &&\n\t\t\tarr[ 1 ] === 3 && // truncation\n\t\t\tarr[ 2 ] === -3 && // truncation\n\t\t\tarr[ 3 ] === INT32_MIN // wrap around\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasInt32ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Minimum signed 32-bit integer.\n*\n* @module @stdlib/constants-int32-min\n* @type {integer32}\n*\n* @example\n* import INT32_MIN from '@stdlib/constants-int32-min';\n* // returns -2147483648\n*/\n\n\n// MAIN //\n\n/**\n* Minimum signed 32-bit integer.\n*\n* ## Notes\n*\n* The number has the value\n*\n* ```tex\n* -(2^{31})\n* ```\n*\n* which corresponds to the two's complement bit sequence\n*\n* ```binarystring\n* 10000000000000000000000000000000\n* ```\n*\n* @constant\n* @type {integer32}\n* @default -2147483648\n*/\nvar INT32_MIN = -2147483648|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default INT32_MIN;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of twos-complement 32-bit signed integers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasInt8Array = ( typeof Int8Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is an Int8Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an Int8Array\n*\n* @example\n* var bool = isInt8Array( new Int8Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isInt8Array( [] );\n* // returns false\n*/\nfunction isInt8Array( value ) {\n\treturn (\n\t\t( hasInt8Array && value instanceof Int8Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Int8Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isInt8Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum signed 8-bit integer.\n*\n* @module @stdlib/constants-int8-max\n* @type {integer32}\n*\n* @example\n* import INT8_MAX from '@stdlib/constants-int8-max';\n* // returns 127\n*/\n\n\n// MAIN //\n\n/**\n* Maximum signed 8-bit integer.\n*\n* ## Notes\n*\n* The number is given by\n*\n* ```tex\n* 2^{7} - 1\n* ```\n*\n* which corresponds to the bit sequence\n*\n* ```binarystring\n* 01111111\n* ```\n*\n* @constant\n* @type {integer32}\n* @default 127\n*/\nvar INT8_MAX = 127|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default INT8_MAX;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Int8Array === 'function' ) ? Int8Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Int8Array === 'function' ) ? Int8Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of twos-complement 8-bit signed integers in the platform byte order.\n*\n* @module @stdlib/array-int8\n*\n* @example\n* import ctor from '@stdlib/array-int8';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasInt8ArraySupport from '@stdlib/assert-has-int8array-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasInt8ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isInt8Array from '@stdlib/assert-is-int8array';\nimport INT8_MAX from '@stdlib/constants-int8-max';\nimport INT8_MIN from '@stdlib/constants-int8-min';\nimport GlobalInt8Array from './int8array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Int8Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Int8Array` support\n*\n* @example\n* var bool = hasInt8ArraySupport();\n* // returns \n*/\nfunction hasInt8ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalInt8Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = new GlobalInt8Array( [ 1, 3.14, -3.14, INT8_MAX+1 ] );\n\t\tbool = (\n\t\t\tisInt8Array( arr ) &&\n\t\t\tarr[ 0 ] === 1 &&\n\t\t\tarr[ 1 ] === 3 && // truncation\n\t\t\tarr[ 2 ] === -3 && // truncation\n\t\t\tarr[ 3 ] === INT8_MIN // wrap around\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasInt8ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Minimum signed 8-bit integer.\n*\n* @module @stdlib/constants-int8-min\n* @type {integer32}\n*\n* @example\n* import INT8_MIN from '@stdlib/constants-int8-min';\n* // returns -128\n*/\n\n\n// MAIN //\n\n/**\n* Minimum signed 8-bit integer.\n*\n* ## Notes\n*\n* The number is given by\n*\n* ```tex\n* -(2^{7})\n* ```\n*\n* which corresponds to the two's complement bit sequence\n*\n* ```binarystring\n* 10000000\n* ```\n*\n* @constant\n* @type {integer32}\n* @default -128\n*/\nvar INT8_MIN = -128|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default INT8_MIN;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of twos-complement 8-bit signed integers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasUint16Array = ( typeof Uint16Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Uint16Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a Uint16Array\n*\n* @example\n* var bool = isUint16Array( new Uint16Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isUint16Array( [] );\n* // returns false\n*/\nfunction isUint16Array( value ) {\n\treturn (\n\t\t( hasUint16Array && value instanceof Uint16Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Uint16Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isUint16Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum unsigned 16-bit integer.\n*\n* @module @stdlib/constants-uint16-max\n* @type {integer32}\n*\n* @example\n* import UINT16_MAX from '@stdlib/constants-uint16-max';\n* // returns 65535\n*/\n\n\n// MAIN //\n\n/**\n* Maximum unsigned 16-bit integer.\n*\n* ## Notes\n*\n* The number has the value\n*\n* ```tex\n* 2^{16} - 1\n* ```\n*\n* which corresponds to the bit sequence\n*\n* ```binarystring\n* 1111111111111111\n* ```\n*\n* @constant\n* @type {integer32}\n* @default 65535\n*/\nvar UINT16_MAX = 65535|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default UINT16_MAX;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Uint16Array === 'function' ) ? Uint16Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Uint16Array === 'function' ) ? Uint16Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of 16-bit unsigned integers in the platform byte order.\n*\n* @module @stdlib/array-uint16\n*\n* @example\n* import ctor from '@stdlib/array-uint16';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasUint16ArraySupport from '@stdlib/assert-has-uint16array-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasUint16ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isUint16Array from '@stdlib/assert-is-uint16array';\nimport UINT16_MAX from '@stdlib/constants-uint16-max';\nimport GlobalUint16Array from './uint16array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Uint16Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Uint16Array` support\n*\n* @example\n* var bool = hasUint16ArraySupport();\n* // returns \n*/\nfunction hasUint16ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalUint16Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = [ 1, 3.14, -3.14, UINT16_MAX+1, UINT16_MAX+2 ];\n\t\tarr = new GlobalUint16Array( arr );\n\t\tbool = (\n\t\t\tisUint16Array( arr ) &&\n\t\t\tarr[ 0 ] === 1 &&\n\t\t\tarr[ 1 ] === 3 && // truncation\n\t\t\tarr[ 2 ] === UINT16_MAX-2 && // truncation and wrap around\n\t\t\tarr[ 3 ] === 0 && // wrap around\n\t\t\tarr[ 4 ] === 1 // wrap around\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasUint16ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of 16-bit unsigned integers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasUint32Array = ( typeof Uint32Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Uint32Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a Uint32Array\n*\n* @example\n* var bool = isUint32Array( new Uint32Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isUint32Array( [] );\n* // returns false\n*/\nfunction isUint32Array( value ) {\n\treturn (\n\t\t( hasUint32Array && value instanceof Uint32Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Uint32Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isUint32Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum unsigned 32-bit integer.\n*\n* @module @stdlib/constants-uint32-max\n* @type {uinteger32}\n*\n* @example\n* import UINT32_MAX from '@stdlib/constants-uint32-max';\n* // returns 4294967295\n*/\n\n\n// MAIN //\n\n/**\n* Maximum unsigned 32-bit integer.\n*\n* ## Notes\n*\n* The number has the value\n*\n* ```tex\n* 2^{32} - 1\n* ```\n*\n* which corresponds to the bit sequence\n*\n* ```binarystring\n* 11111111111111111111111111111111\n* ```\n*\n* @constant\n* @type {uinteger32}\n* @default 4294967295\n*/\nvar UINT32_MAX = 4294967295;\n\n\n// EXPORTS //\n\nexport default UINT32_MAX;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Uint32Array === 'function' ) ? Uint32Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Uint32Array === 'function' ) ? Uint32Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of 32-bit unsigned integers in the platform byte order.\n*\n* @module @stdlib/array-uint32\n*\n* @example\n* import ctor from '@stdlib/array-uint32';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasUint32ArraySupport from '@stdlib/assert-has-uint32array-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasUint32ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isUint32Array from '@stdlib/assert-is-uint32array';\nimport UINT32_MAX from '@stdlib/constants-uint32-max';\nimport GlobalUint32Array from './uint32array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Uint32Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Uint32Array` support\n*\n* @example\n* var bool = hasUint32ArraySupport();\n* // returns \n*/\nfunction hasUint32ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalUint32Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = [ 1, 3.14, -3.14, UINT32_MAX+1, UINT32_MAX+2 ];\n\t\tarr = new GlobalUint32Array( arr );\n\t\tbool = (\n\t\t\tisUint32Array( arr ) &&\n\t\t\tarr[ 0 ] === 1 &&\n\t\t\tarr[ 1 ] === 3 && // truncation\n\t\t\tarr[ 2 ] === UINT32_MAX-2 && // truncation and wrap around\n\t\t\tarr[ 3 ] === 0 && // wrap around\n\t\t\tarr[ 4 ] === 1 // wrap around\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasUint32ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of 32-bit unsigned integers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasUint8Array = ( typeof Uint8Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Uint8Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a Uint8Array\n*\n* @example\n* var bool = isUint8Array( new Uint8Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isUint8Array( [] );\n* // returns false\n*/\nfunction isUint8Array( value ) {\n\treturn (\n\t\t( hasUint8Array && value instanceof Uint8Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Uint8Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isUint8Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum unsigned 8-bit integer.\n*\n* @module @stdlib/constants-uint8-max\n* @type {integer32}\n*\n* @example\n* import UINT8_MAX from '@stdlib/constants-uint8-max';\n* // returns 255\n*/\n\n\n// MAIN //\n\n/**\n* Maximum unsigned 8-bit integer.\n*\n* ## Notes\n*\n* The number has the value\n*\n* ```tex\n* 2^{8} - 1\n* ```\n*\n* which corresponds to the bit sequence\n*\n* ```binarystring\n* 11111111\n* ```\n*\n* @constant\n* @type {integer32}\n* @default 255\n*/\nvar UINT8_MAX = 255|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default UINT8_MAX;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Uint8Array === 'function' ) ? Uint8Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Uint8Array === 'function' ) ? Uint8Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of 8-bit unsigned integers in the platform byte order.\n*\n* @module @stdlib/array-uint8\n*\n* @example\n* import ctor from '@stdlib/array-uint8';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasUint8ArraySupport from '@stdlib/assert-has-uint8array-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasUint8ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isUint8Array from '@stdlib/assert-is-uint8array';\nimport UINT8_MAX from '@stdlib/constants-uint8-max';\nimport GlobalUint8Array from './uint8array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Uint8Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Uint8Array` support\n*\n* @example\n* var bool = hasUint8ArraySupport();\n* // returns \n*/\nfunction hasUint8ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalUint8Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = [ 1, 3.14, -3.14, UINT8_MAX+1, UINT8_MAX+2 ];\n\t\tarr = new GlobalUint8Array( arr );\n\t\tbool = (\n\t\t\tisUint8Array( arr ) &&\n\t\t\tarr[ 0 ] === 1 &&\n\t\t\tarr[ 1 ] === 3 && // truncation\n\t\t\tarr[ 2 ] === UINT8_MAX-2 && // truncation and wrap around\n\t\t\tarr[ 3 ] === 0 && // wrap around\n\t\t\tarr[ 4 ] === 1 // wrap around\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasUint8ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of 8-bit unsigned integers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasUint8ClampedArray = ( typeof Uint8ClampedArray === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Uint8ClampedArray.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a Uint8ClampedArray\n*\n* @example\n* var bool = isUint8ClampedArray( new Uint8ClampedArray( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isUint8ClampedArray( [] );\n* // returns false\n*/\nfunction isUint8ClampedArray( value ) {\n\treturn (\n\t\t( hasUint8ClampedArray && value instanceof Uint8ClampedArray ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Uint8ClampedArray]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isUint8ClampedArray;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Uint8ClampedArray === 'function' ) ? Uint8ClampedArray : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Uint8ClampedArray === 'function' ) ? Uint8ClampedArray : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of 8-bit unsigned integers in the platform byte order clamped to 0-255.\n*\n* @module @stdlib/array-uint8c\n*\n* @example\n* import ctor from '@stdlib/array-uint8c';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasUint8ClampedArraySupport from '@stdlib/assert-has-uint8clampedarray-support'; // eslint-disable-line id-length\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasUint8ClampedArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isUint8ClampedArray from '@stdlib/assert-is-uint8clampedarray';\nimport GlobalUint8ClampedArray from './uint8clampedarray.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Uint8ClampedArray` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Uint8ClampedArray` support\n*\n* @example\n* var bool = hasUint8ClampedArraySupport();\n* // returns \n*/\nfunction hasUint8ClampedArraySupport() { // eslint-disable-line id-length\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalUint8ClampedArray !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = new GlobalUint8ClampedArray( [ -1, 0, 1, 3.14, 4.99, 255, 256 ] );\n\t\tbool = (\n\t\t\tisUint8ClampedArray( arr ) &&\n\t\t\tarr[ 0 ] === 0 && // clamped\n\t\t\tarr[ 1 ] === 0 &&\n\t\t\tarr[ 2 ] === 1 &&\n\t\t\tarr[ 3 ] === 3 && // round to nearest\n\t\t\tarr[ 4 ] === 5 && // round to nearest\n\t\t\tarr[ 5 ] === 255 &&\n\t\t\tarr[ 6 ] === 255 // clamped\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasUint8ClampedArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of 8-bit unsigned integers in the platform byte order clamped to 0-255.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isInteger from '@stdlib/math-base-assert-is-integer';\nimport MAX_LENGTH from '@stdlib/constants-array-max-array-length';\n\n\n// MAIN //\n\n/**\n* Tests if a value is an array-like object.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is an array-like object\n*\n* @example\n* var bool = isArrayLikeObject( [] );\n* // returns true\n*\n* @example\n* var bool = isArrayLikeObject( { 'length':10 } );\n* // returns true\n*\n* @example\n* var bool = isArrayLikeObject( 'beep' );\n* // returns false\n*/\nfunction isArrayLikeObject( value ) {\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\ttypeof value.length === 'number' &&\n\t\tisInteger( value.length ) &&\n\t\tvalue.length >= 0 &&\n\t\tvalue.length <= MAX_LENGTH\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isArrayLikeObject;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum length of a generic array.\n*\n* @module @stdlib/constants-array-max-array-length\n*\n* @example\n* import MAX_ARRAY_LENGTH from '@stdlib/constants-array-max-array-length';\n* // returns 4294967295\n*/\n\n// MAIN //\n\n/**\n* Maximum length of a generic array.\n*\n* ```tex\n* 2^{32} - 1\n* ```\n*\n* @constant\n* @type {uinteger32}\n* @default 4294967295\n*/\nvar MAX_ARRAY_LENGTH = 4294967295>>>0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default MAX_ARRAY_LENGTH;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isInteger from '@stdlib/math-base-assert-is-integer';\nimport MAX_LENGTH from '@stdlib/constants-array-max-typed-array-length';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a collection.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether a value is a collection\n*\n* @example\n* var bool = isCollection( [] );\n* // returns true\n*\n* @example\n* var bool = isCollection( {} );\n* // returns false\n*/\nfunction isCollection( value ) {\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\ttypeof value.length === 'number' &&\n\t\tisInteger( value.length ) &&\n\t\tvalue.length >= 0 &&\n\t\tvalue.length <= MAX_LENGTH\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isCollection;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum length of a typed array.\n*\n* @module @stdlib/constants-array-max-typed-array-length\n*\n* @example\n* import MAX_TYPED_ARRAY_LENGTH from '@stdlib/constants-array-max-typed-array-length';\n* // returns 9007199254740991\n*/\n\n// MAIN //\n\n/**\n* Maximum length of a typed array.\n*\n* ```tex\n* 2^{53} - 1\n* ```\n*\n* @constant\n* @type {number}\n* @default 9007199254740991\n*/\nvar MAX_TYPED_ARRAY_LENGTH = 9007199254740991;\n\n\n// EXPORTS //\n\nexport default MAX_TYPED_ARRAY_LENGTH;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasArrayBuffer = ( typeof ArrayBuffer === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is an ArrayBuffer.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an ArrayBuffer\n*\n* @example\n* import ArrayBuffer from '@stdlib/array-buffer';\n*\n* var bool = isArrayBuffer( new ArrayBuffer( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isArrayBuffer( [] );\n* // returns false\n*/\nfunction isArrayBuffer( value ) {\n\treturn (\n\t\t( hasArrayBuffer && value instanceof ArrayBuffer ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object ArrayBuffer]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isArrayBuffer;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar f;\n\n\n// FUNCTIONS //\n\n/**\n* Tests if a value is an array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an array\n*\n* @example\n* var bool = isArray( [] );\n* // returns true\n*\n* @example\n* var bool = isArray( {} );\n* // returns false\n*/\nfunction isArray( value ) {\n\treturn ( nativeClass( value ) === '[object Array]' );\n}\n\n\n// MAIN //\n\nif ( Array.isArray ) {\n\tf = Array.isArray;\n} else {\n\tf = isArray;\n}\n\n\n// EXPORTS //\n\nexport default f;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isArray from '@stdlib/assert-is-array';\n\n\n// MAIN //\n\n/**\n* Tests if a value is an object; e.g., `{}`.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an object\n*\n* @example\n* var bool = isObject( {} );\n* // returns true\n*\n* @example\n* var bool = isObject( null );\n* // returns false\n*/\nfunction isObject( value ) {\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\t!isArray( value )\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isObject;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\nvar RE = /./;\n\n\n// EXPORTS //\n\nexport default RE;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Tests if a value is a boolean primitive.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a boolean primitive\n*\n* @example\n* var bool = isBoolean( true );\n* // returns true\n*\n* @example\n* var bool = isBoolean( false );\n* // returns true\n*\n* @example\n* import Boolean from '@stdlib/boolean-ctor';\n*\n* var bool = isBoolean( new Boolean( true ) );\n* // returns false\n*/\nfunction isBoolean( value ) {\n\treturn ( typeof value === 'boolean' );\n}\n\n\n// EXPORTS //\n\nexport default isBoolean;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Returns a boolean.\n*\n* @name Boolean\n* @constructor\n* @type {Function}\n* @param {*} value - input value\n* @returns {(boolean|Boolean)} boolean\n*\n* @example\n* var b = Boolean( null );\n* // returns false\n*\n* b = Boolean( [] );\n* // returns true\n*\n* b = Boolean( {} );\n* // returns true\n*\n* @example\n* var b = new Boolean( false );\n* // returns \n*/\nvar Bool = Boolean; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default Bool;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// eslint-disable-next-line stdlib/no-redeclare\nvar toString = Boolean.prototype.toString; // non-generic\n\n\n// EXPORTS //\n\nexport default toString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport hasToStringTag from '@stdlib/assert-has-tostringtag-support';\nimport nativeClass from '@stdlib/utils-native-class';\nimport Boolean from '@stdlib/boolean-ctor';\nimport test from './try2serialize.js';\n\n\n// VARIABLES //\n\nvar FLG = hasToStringTag();\n\n\n// MAIN //\n\n/**\n* Tests if a value is a boolean object.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a boolean object\n*\n* @example\n* var bool = isBoolean( true );\n* // returns false\n*\n* @example\n* import Boolean from '@stdlib/boolean-ctor';\n*\n* var bool = isBoolean( new Boolean( false ) );\n* // returns true\n*/\nfunction isBoolean( value ) {\n\tif ( typeof value === 'object' ) {\n\t\tif ( value instanceof Boolean ) {\n\t\t\treturn true;\n\t\t}\n\t\tif ( FLG ) {\n\t\t\treturn test( value );\n\t\t}\n\t\treturn ( nativeClass( value ) === '[object Boolean]' );\n\t}\n\treturn false;\n}\n\n\n// EXPORTS //\n\nexport default isBoolean;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport toString from './tostring.js'; // eslint-disable-line stdlib/no-redeclare\n\n\n// MAIN //\n\n/**\n* Attempts to serialize a value to a string.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value can be serialized\n*/\nfunction test( value ) {\n\ttry {\n\t\ttoString.call( value );\n\t\treturn true;\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\treturn false;\n\t}\n}\n\n\n// EXPORTS //\n\nexport default test;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a boolean.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a boolean\n*\n* @example\n* var bool = isBoolean( false );\n* // returns true\n*\n* @example\n* var bool = isBoolean( true );\n* // returns true\n*\n* @example\n* import Boolean from '@stdlib/boolean-ctor';\n*\n* var bool = isBoolean( new Boolean( false ) );\n* // returns true\n*\n* @example\n* import Boolean from '@stdlib/boolean-ctor';\n*\n* var bool = isBoolean( new Boolean( true ) );\n* // returns true\n*/\nfunction isBoolean( value ) {\n\treturn ( isPrimitive( value ) || isObject( value ) );\n}\n\n\n// EXPORTS //\n\nexport default isBoolean;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Returns the global object using code generation.\n*\n* @private\n* @returns {Object} global object\n*/\nfunction getGlobal() {\n\treturn new Function( 'return this;' )(); // eslint-disable-line no-new-func, stdlib/require-globals\n}\n\n\n// EXPORTS //\n\nexport default getGlobal;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test if a value is a boolean.\n*\n* @module @stdlib/assert-is-boolean\n*\n* @example\n* import Boolean from '@stdlib/boolean-ctor';\n* import isBoolean from '@stdlib/assert-is-boolean';\n*\n* var bool = isBoolean( false );\n* // returns true\n*\n* bool = isBoolean( new Boolean( false ) );\n* // returns true\n*\n* @example\n* import Boolean from '@stdlib/boolean-ctor';\n* import { isPrimitive as isBoolean } from '@stdlib/assert-is-boolean';\n*\n* var bool = isBoolean( false );\n* // returns true\n*\n* bool = isBoolean( new Boolean( true ) );\n* // returns false\n*\n* @example\n* import Boolean from '@stdlib/boolean-ctor';\n* import { isObject as isBoolean } from '@stdlib/assert-is-boolean';\n*\n* var bool = isBoolean( true );\n* // returns false\n*\n* bool = isBoolean( new Boolean( false ) );\n* // returns true\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'isPrimitive', isPrimitive );\nsetReadOnly( main, 'isObject', isObject );\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar obj = ( typeof self === 'object' ) ? self : null;\n\n\n// EXPORTS //\n\nexport default obj;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar obj = ( typeof window === 'object' ) ? window : null;\n\n\n// EXPORTS //\n\nexport default obj;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar obj = ( typeof global === 'object' ) ? global : null;\n\n\n// EXPORTS //\n\nexport default obj;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar obj = ( typeof globalThis === 'object' ) ? globalThis : null; // eslint-disable-line no-undef\n\n\n// EXPORTS //\n\nexport default obj;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport getGlobal from '@stdlib/utils-global';\n\n\n// MAIN //\n\nvar root = getGlobal();\nvar nodeList = root.document && root.document.childNodes;\n\n\n// EXPORTS //\n\nexport default nodeList;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isBoolean } from '@stdlib/assert-is-boolean';\nimport format from '@stdlib/string-format';\nimport getThis from './codegen.js';\nimport Self from './self.js';\nimport Win from './window.js';\nimport Global from './global.js';\nimport GlobalThis from './global_this.js';\n\n\n// MAIN //\n\n/**\n* Returns the global object.\n*\n* ## Notes\n*\n* - Using code generation is the **most** reliable way to resolve the global object; however, doing so is likely to violate content security policies (CSPs) in, e.g., Chrome Apps and elsewhere.\n*\n* @param {boolean} [codegen=false] - boolean indicating whether to use code generation to resolve the global object\n* @throws {TypeError} must provide a boolean\n* @throws {Error} unable to resolve global object\n* @returns {Object} global object\n*\n* @example\n* var g = getGlobal();\n* // returns {...}\n*/\nfunction getGlobal( codegen ) {\n\tif ( arguments.length ) {\n\t\tif ( !isBoolean( codegen ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Must provide a boolean. Value: `%s`.', codegen ) );\n\t\t}\n\t\tif ( codegen ) {\n\t\t\treturn getThis();\n\t\t}\n\t\t// Fall through...\n\t}\n\t// Case: 2020 revision of ECMAScript standard\n\tif ( GlobalThis ) {\n\t\treturn GlobalThis;\n\t}\n\t// Case: browsers and web workers\n\tif ( Self ) {\n\t\treturn Self;\n\t}\n\t// Case: browsers\n\tif ( Win ) {\n\t\treturn Win;\n\t}\n\t// Case: Node.js\n\tif ( Global ) {\n\t\treturn Global;\n\t}\n\t// Case: unknown\n\tthrow new Error( 'unexpected error. Unable to resolve global object.' );\n}\n\n\n// EXPORTS //\n\nexport default getGlobal;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\nvar typedarray = Int8Array; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default typedarray;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Returns a regular expression to capture everything that is not a space immediately after the `function` keyword and before the first left parenthesis.\n*\n* @returns {RegExp} regular expression\n*\n* @example\n* var RE_FUNCTION_NAME = reFunctionName();\n*\n* function fname( fcn ) {\n* return RE_FUNCTION_NAME.exec( fcn.toString() )[ 1 ];\n* }\n*\n* var fn = fname( Math.sqrt );\n* // returns 'sqrt'\n*\n* fn = fname( Int8Array );\n* // returns 'Int8Array'\n*\n* fn = fname( Object.prototype.toString );\n* // returns 'toString'\n*\n* fn = fname( function(){} );\n* // returns ''\n*/\nfunction reFunctionName() {\n\treturn /^\\s*function\\s*([^(]*)/i;\n}\n\n\n// EXPORTS //\n\nexport default reFunctionName;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport reFunctionName from './main.js';\n\n\n// MAIN //\n\n/**\n* Captures everything that is not a space immediately after the `function` keyword and before the first left parenthesis.\n*\n* Regular expression: `/^\\s*function\\s*([^(]*)/i`\n*\n* - `/^\\s*`\n* - Match zero or more spaces at beginning\n*\n* - `function`\n* - Match the word `function`\n*\n* - `\\s*`\n* - Match zero or more spaces after the word `function`\n*\n* - `()`\n* - Capture\n*\n* - `[^(]*`\n* - Match anything except a left parenthesis `(` zero or more times\n*\n* - `/i`\n* - ignore case\n*\n* @constant\n* @type {RegExp}\n* @default /^\\s*function\\s*([^(]*)/i\n*/\nvar RE_FUNCTION_NAME = reFunctionName();\n\n\n// EXPORTS //\n\nexport default RE_FUNCTION_NAME;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Tests if a value is object-like.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether a value is object-like\n*\n* @example\n* var bool = isObjectLike( {} );\n* // returns true\n*\n* @example\n* var bool = isObjectLike( [] );\n* // returns true\n*\n* @example\n* var bool = isObjectLike( null );\n* // returns false\n*/\nfunction isObjectLike( value ) {\n\treturn (\n\t\tvalue !== null &&\n\t\ttypeof value === 'object'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isObjectLike;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\nimport { REGEXP as RE } from '@stdlib/regexp-function-name';\nimport isBuffer from '@stdlib/assert-is-buffer';\n\n\n// MAIN //\n\n/**\n* Determines the name of a value's constructor.\n*\n* @param {*} v - input value\n* @returns {string} name of a value's constructor\n*\n* @example\n* var v = constructorName( 'a' );\n* // returns 'String'\n*\n* @example\n* var v = constructorName( 5 );\n* // returns 'Number'\n*\n* @example\n* var v = constructorName( null );\n* // returns 'Null'\n*\n* @example\n* var v = constructorName( undefined );\n* // returns 'Undefined'\n*\n* @example\n* var v = constructorName( function noop() {} );\n* // returns 'Function'\n*/\nfunction constructorName( v ) {\n\tvar match;\n\tvar name;\n\tvar ctor;\n\tname = nativeClass( v ).slice( 8, -1 );\n\tif ( (name === 'Object' || name === 'Error') && v.constructor ) {\n\t\tctor = v.constructor;\n\t\tif ( typeof ctor.name === 'string' ) {\n\t\t\treturn ctor.name;\n\t\t}\n\t\tmatch = RE.exec( ctor.toString() );\n\t\tif ( match ) {\n\t\t\treturn match[ 1 ];\n\t\t}\n\t}\n\tif ( isBuffer( v ) ) {\n\t\treturn 'Buffer';\n\t}\n\treturn name;\n}\n\n\n// EXPORTS //\n\nexport default constructorName;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isObjectLike from '@stdlib/assert-is-object-like';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Buffer instance.\n*\n* @param {*} value - value to validate\n* @returns {boolean} boolean indicating if a value is a Buffer instance\n*\n* @example\n* var v = isBuffer( new Buffer( 'beep' ) );\n* // returns true\n*\n* @example\n* var v = isBuffer( new Buffer( [1,2,3,4] ) );\n* // returns true\n*\n* @example\n* var v = isBuffer( {} );\n* // returns false\n*\n* @example\n* var v = isBuffer( [] );\n* // returns false\n*/\nfunction isBuffer( value ) {\n\treturn (\n\t\tisObjectLike( value ) &&\n\t\t(\n\t\t\t// eslint-disable-next-line no-underscore-dangle\n\t\t\tvalue._isBuffer || // for envs missing Object.prototype.constructor (e.g., Safari 5-7)\n\t\t\t(\n\t\t\t\tvalue.constructor &&\n\n\t\t\t\t// WARNING: `typeof` is not a foolproof check, as certain envs consider RegExp and NodeList instances to be functions\n\t\t\t\ttypeof value.constructor.isBuffer === 'function' &&\n\t\t\t\tvalue.constructor.isBuffer( value )\n\t\t\t)\n\t\t)\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isBuffer;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Regular expression to capture everything that is not a space immediately after the `function` keyword and before the first left parenthesis.\n*\n* @module @stdlib/regexp-function-name\n*\n* @example\n* import reFunctionName from '@stdlib/regexp-function-name';\n* var RE_FUNCTION_NAME = reFunctionName();\n*\n* function fname( fcn ) {\n* return RE_FUNCTION_NAME.exec( fcn.toString() )[ 1 ];\n* }\n*\n* var fn = fname( Math.sqrt );\n* // returns 'sqrt'\n*\n* fn = fname( Int8Array );\n* // returns 'Int8Array'\n*\n* fn = fname( Object.prototype.toString );\n* // returns 'toString'\n*\n* fn = fname( function(){} );\n* // returns ''\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport REGEXP from './regexp.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'REGEXP', REGEXP );\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test if a value is object-like.\n*\n* @module @stdlib/assert-is-object-like\n*\n* @example\n* import isObjectLike from '@stdlib/assert-is-object-like';\n*\n* var bool = isObjectLike( {} );\n* // returns true\n*\n* bool = isObjectLike( [] );\n* // returns true\n*\n* bool = isObjectLike( null );\n* // returns false\n*\n* @example\n* import { isObjectLikeArray as isObjectLike } from '@stdlib/assert-is-object-like';\n*\n* var bool = isObjectLike( [ {}, [] ] );\n* // returns true\n*\n* bool = isObjectLike( [ {}, '3.0' ] );\n* // returns false\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport arrayfun from '@stdlib/assert-tools-array-function';\nimport main from './main.js';\n\n\n// VARIABLES //\n\nvar isObjectLikeArray = arrayfun( main );\n\n\n// MAIN //\n\nsetReadOnly( main, 'isObjectLikeArray', isObjectLikeArray );\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isArray from '@stdlib/assert-is-array';\nimport format from '@stdlib/string-format';\n\n\n// MAIN //\n\n/**\n* Returns a function which tests if every element in an array passes a test condition.\n*\n* @param {Function} predicate - function to apply\n* @throws {TypeError} must provide a function\n* @returns {Function} an array function\n*\n* @example\n* import isOdd from '@stdlib/assert-is-odd';\n*\n* var arr1 = [ 1, 3, 5, 7 ];\n* var arr2 = [ 3, 5, 8 ];\n*\n* var validate = arrayfcn( isOdd );\n*\n* var bool = validate( arr1 );\n* // returns true\n*\n* bool = validate( arr2 );\n* // returns false\n*/\nfunction arrayfcn( predicate ) {\n\tif ( typeof predicate !== 'function' ) {\n\t\tthrow new TypeError( format( 'invalid argument. Must provide a function. Value: `%s`.', predicate ) );\n\t}\n\treturn every;\n\n\t/**\n\t* Tests if every element in an array passes a test condition.\n\t*\n\t* @private\n\t* @param {*} value - value to test\n\t* @returns {boolean} boolean indicating whether a value is an array for which all elements pass a test condition\n\t*/\n\tfunction every( value ) {\n\t\tvar len;\n\t\tvar i;\n\t\tif ( !isArray( value ) ) {\n\t\t\treturn false;\n\t\t}\n\t\tlen = value.length;\n\t\tif ( len === 0 ) {\n\t\t\treturn false;\n\t\t}\n\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\tif ( predicate( value[ i ] ) === false ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}\n}\n\n\n// EXPORTS //\n\nexport default arrayfcn;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Determine a value's type.\n*\n* @module @stdlib/utils-type-of\n*\n* @example\n* import typeOf from '@stdlib/utils-type-of';\n*\n* var str = typeOf( 'a' );\n* // returns 'string'\n*\n* str = typeOf( 5 );\n* // returns 'number'\n*/\n\n// MODULES //\n\nimport usePolyfill from './check.js';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar main = ( usePolyfill() ) ? polyfill : builtin;\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport RE from './fixtures/re.js';\nimport nodeList from './fixtures/nodelist.js';\nimport typedarray from './fixtures/typedarray.js';\n\n\n// MAIN //\n\n/**\n* Checks whether a polyfill is needed when using the `typeof` operator.\n*\n* @private\n* @returns {boolean} boolean indicating whether a polyfill is needed\n*/\nfunction check() {\n\tif (\n\t\t// Chrome 1-12 returns 'function' for regular expression instances (see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/typeof):\n\t\ttypeof RE === 'function' ||\n\n\t\t// Safari 8 returns 'object' for typed array and weak map constructors (underscore #1929):\n\t\ttypeof typedarray === 'object' ||\n\n\t\t// PhantomJS 1.9 returns 'function' for `NodeList` instances (underscore #2236):\n\t\ttypeof nodeList === 'function'\n\t) {\n\t\treturn true;\n\t}\n\treturn false;\n}\n\n\n// EXPORTS //\n\nexport default check;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport ctorName from '@stdlib/utils-constructor-name';\n\n\n// MAIN //\n\n/**\n* Determines a value's type.\n*\n* @param {*} v - input value\n* @returns {string} string indicating the value's type\n*/\nfunction typeOf( v ) {\n\treturn ctorName( v ).toLowerCase();\n}\n\n\n// EXPORTS //\n\nexport default typeOf;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport ctorName from '@stdlib/utils-constructor-name';\n\n\n// NOTES //\n\n/*\n* Built-in `typeof` operator behavior:\n*\n* ```text\n* typeof null => 'object'\n* typeof undefined => 'undefined'\n* typeof 'a' => 'string'\n* typeof 5 => 'number'\n* typeof NaN => 'number'\n* typeof true => 'boolean'\n* typeof false => 'boolean'\n* typeof {} => 'object'\n* typeof [] => 'object'\n* typeof function foo(){} => 'function'\n* typeof function* foo(){} => 'object'\n* typeof Symbol() => 'symbol'\n* ```\n*\n*/\n\n\n// MAIN //\n\n/**\n* Determines a value's type.\n*\n* @param {*} v - input value\n* @returns {string} string indicating the value's type\n*/\nfunction typeOf( v ) {\n\tvar type;\n\n\t// Address `typeof null` => `object` (see http://wiki.ecmascript.org/doku.php?id=harmony:typeof_null):\n\tif ( v === null ) {\n\t\treturn 'null';\n\t}\n\ttype = typeof v;\n\n\t// If the `typeof` operator returned something other than `object`, we are done. Otherwise, we need to check for an internal class name or search for a constructor.\n\tif ( type === 'object' ) {\n\t\treturn ctorName( v ).toLowerCase();\n\t}\n\treturn type;\n}\n\n\n// EXPORTS //\n\nexport default typeOf;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport typeOf from '@stdlib/utils-type-of';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a function.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a function\n*\n* @example\n* function beep() {\n* return 'beep';\n* }\n*\n* var bool = isFunction( beep );\n* // returns true\n*/\nfunction isFunction( value ) {\n\t// Note: cannot use `typeof` directly, as various browser engines incorrectly return `'function'` when operating on non-function objects, such as regular expressions and NodeLists.\n\treturn ( typeOf( value ) === 'function' );\n}\n\n\n// EXPORTS //\n\nexport default isFunction;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isNumber } from '@stdlib/assert-is-number';\nimport defineProperty from '@stdlib/utils-define-property';\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport format from '@stdlib/string-format';\nimport toStr from './tostring.js';\nimport toJSON from './tojson.js';\n\n\n// MAIN //\n\n/**\n* 128-bit complex number constructor.\n*\n* @constructor\n* @param {number} real - real component\n* @param {number} imag - imaginary component\n* @throws {TypeError} must invoke using the `new` keyword\n* @throws {TypeError} real component must be a number\n* @throws {TypeError} imaginary component must be a number\n* @returns {Complex128} 128-bit complex number\n*\n* @example\n* var z = new Complex128( 5.0, 3.0 );\n* // returns \n*/\nfunction Complex128( real, imag ) {\n\tif ( !( this instanceof Complex128 ) ) {\n\t\tthrow new TypeError( 'invalid invocation. Constructor must be called with the `new` keyword.' );\n\t}\n\tif ( !isNumber( real ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Real component must be a number. Value: `%s`.', real ) );\n\t}\n\tif ( !isNumber( imag ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Imaginary component must be a number. Value: `%s`.', imag ) );\n\t}\n\tdefineProperty( this, 're', {\n\t\t'configurable': false,\n\t\t'enumerable': true,\n\t\t'writable': false,\n\t\t'value': real\n\t});\n\tdefineProperty( this, 'im', {\n\t\t'configurable': false,\n\t\t'enumerable': true,\n\t\t'writable': false,\n\t\t'value': imag\n\t});\n\treturn this;\n}\n\n/**\n* Size (in bytes) of each component.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex128\n* @type {integer}\n* @returns {integer} size of each component\n*\n* @example\n* var nbytes = Complex128.BYTES_PER_ELEMENT;\n* // returns 8\n*/\nsetReadOnly( Complex128, 'BYTES_PER_ELEMENT', 8 );\n\n/**\n* Size (in bytes) of each component.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex128.prototype\n* @type {integer}\n* @returns {integer} size of each component\n*\n* @example\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var nbytes = z.BYTES_PER_ELEMENT;\n* // returns 8\n*/\nsetReadOnly( Complex128.prototype, 'BYTES_PER_ELEMENT', 8 );\n\n/**\n* Length (in bytes) of a complex number.\n*\n* @name byteLength\n* @memberof Complex128.prototype\n* @type {integer}\n* @returns {integer} byte length\n*\n* @example\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var nbytes = z.byteLength;\n* // returns 16\n*/\nsetReadOnly( Complex128.prototype, 'byteLength', 16 );\n\n/**\n* Serializes a complex number as a string.\n*\n* @name toString\n* @memberof Complex128.prototype\n* @type {Function}\n* @returns {string} serialized complex number\n*\n* @example\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var str = z.toString();\n* // returns '5 + 3i'\n*/\nsetReadOnly( Complex128.prototype, 'toString', toStr );\n\n/**\n* Serializes a complex number as a JSON object.\n*\n* ## Notes\n*\n* - `JSON.stringify()` implicitly calls this method when stringifying a `Complex128` instance.\n*\n* @name toJSON\n* @memberof Complex128.prototype\n* @type {Function}\n* @returns {Object} serialized complex number\n*\n* @example\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var obj = z.toJSON();\n* // returns { 'type': 'Complex128', 're': 5.0, 'im': 3.0 }\n*/\nsetReadOnly( Complex128.prototype, 'toJSON', toJSON );\n\n\n// EXPORTS //\n\nexport default Complex128;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Serializes a complex number as a string.\n*\n* @private\n* @returns {string} serialized complex number\n*/\nfunction toString() { // eslint-disable-line stdlib/no-redeclare\n\t/* eslint-disable no-invalid-this */\n\tvar str = '' + this.re;\n\tif ( this.im < 0 ) {\n\t\tstr += ' - ' + (-this.im);\n\t} else {\n\t\tstr += ' + ' + this.im;\n\t}\n\tstr += 'i';\n\treturn str;\n}\n\n\n// EXPORTS //\n\nexport default toString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Serializes a complex number as a JSON object.\n*\n* @private\n* @returns {Object} JSON representation\n*/\nfunction toJSON() {\n\t/* eslint-disable no-invalid-this */\n\tvar out = {};\n\tout.type = 'Complex128';\n\tout.re = this.re;\n\tout.im = this.im;\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default toJSON;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar fround = ( typeof Math.fround === 'function' ) ? Math.fround : null; // eslint-disable-line stdlib/no-builtin-math\n\n\n// EXPORTS //\n\nexport default fround;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport Float32Array from '@stdlib/array-float32';\n\n\n// VARIABLES //\n\nvar FLOAT32_VIEW = new Float32Array( 1 );\n\n\n// MAIN //\n\n/**\n* Converts a double-precision floating-point number to the nearest single-precision floating-point number.\n*\n* @param {number} x - double-precision floating-point number\n* @returns {number} nearest single-precision floating-point number\n*\n* @example\n* var y = float64ToFloat32( 1.337 );\n* // returns 1.3370000123977661\n*/\nfunction float64ToFloat32( x ) {\n\tFLOAT32_VIEW[ 0 ] = x;\n\treturn FLOAT32_VIEW[ 0 ];\n}\n\n\n// EXPORTS //\n\nexport default float64ToFloat32;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Convert a double-precision floating-point number to the nearest single-precision floating-point number.\n*\n* @module @stdlib/number-float64-base-to-float32\n*\n* @example\n* import float64ToFloat32 from '@stdlib/number-float64-base-to-float32';\n*\n* var y = float64ToFloat32( 1.337 );\n* // returns 1.3370000123977661\n*/\n\n// MODULES //\n\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar float64ToFloat32;\nif ( typeof builtin === 'function' ) {\n\tfloat64ToFloat32 = builtin;\n} else {\n\tfloat64ToFloat32 = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default float64ToFloat32;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isNumber } from '@stdlib/assert-is-number';\nimport defineProperty from '@stdlib/utils-define-property';\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport float64ToFloat32 from '@stdlib/number-float64-base-to-float32';\nimport format from '@stdlib/string-format';\nimport toStr from './tostring.js';\nimport toJSON from './tojson.js';\n\n\n// MAIN //\n\n/**\n* 64-bit complex number constructor.\n*\n* @constructor\n* @param {number} real - real component\n* @param {number} imag - imaginary component\n* @throws {TypeError} must invoke using the `new` keyword\n* @throws {TypeError} real component must be a number\n* @throws {TypeError} imaginary component must be a number\n* @returns {Complex64} 64-bit complex number\n*\n* @example\n* var z = new Complex64( 5.0, 3.0 );\n* // returns \n*/\nfunction Complex64( real, imag ) {\n\tif ( !( this instanceof Complex64 ) ) {\n\t\tthrow new TypeError( 'invalid invocation. Constructor must be called with the `new` keyword.' );\n\t}\n\tif ( !isNumber( real ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Real component must be a number. Value: `%s`.', real ) );\n\t}\n\tif ( !isNumber( imag ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Imaginary component must be a number. Value: `%s`.', imag ) );\n\t}\n\tdefineProperty( this, 're', {\n\t\t'configurable': false,\n\t\t'enumerable': true,\n\t\t'writable': false,\n\t\t'value': float64ToFloat32( real )\n\t});\n\tdefineProperty( this, 'im', {\n\t\t'configurable': false,\n\t\t'enumerable': true,\n\t\t'writable': false,\n\t\t'value': float64ToFloat32( imag )\n\t});\n\treturn this;\n}\n\n/**\n* Size (in bytes) of each component.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex64\n* @type {integer}\n* @returns {integer} size of each component\n*\n* @example\n* var nbytes = Complex64.BYTES_PER_ELEMENT;\n* // returns 4\n*/\nsetReadOnly( Complex64, 'BYTES_PER_ELEMENT', 4 );\n\n/**\n* Size (in bytes) of each component.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex64.prototype\n* @type {integer}\n* @returns {integer} size of each component\n*\n* @example\n* var z = new Complex64( 5.0, 3.0 );\n*\n* var nbytes = z.BYTES_PER_ELEMENT;\n* // returns 4\n*/\nsetReadOnly( Complex64.prototype, 'BYTES_PER_ELEMENT', 4 );\n\n/**\n* Length (in bytes) of a complex number.\n*\n* @name byteLength\n* @memberof Complex64.prototype\n* @type {integer}\n* @returns {integer} byte length\n*\n* @example\n* var z = new Complex64( 5.0, 3.0 );\n*\n* var nbytes = z.byteLength;\n* // returns 8\n*/\nsetReadOnly( Complex64.prototype, 'byteLength', 8 );\n\n/**\n* Serializes a complex number as a string.\n*\n* @name toString\n* @memberof Complex64.prototype\n* @type {Function}\n* @returns {string} serialized complex number\n*\n* @example\n* var z = new Complex64( 5.0, 3.0 );\n*\n* var str = z.toString();\n* // returns '5 + 3i'\n*/\nsetReadOnly( Complex64.prototype, 'toString', toStr );\n\n/**\n* Serializes a complex number as a JSON object.\n*\n* ## Notes\n*\n* - `JSON.stringify()` implicitly calls this method when stringifying a `Complex64` instance.\n*\n* @name toJSON\n* @memberof Complex64.prototype\n* @type {Function}\n* @returns {Object} serialized complex number\n*\n* @example\n* var z = new Complex64( 5.0, 3.0 );\n*\n* var obj = z.toJSON();\n* // returns { 'type': 'Complex64', 're': 5.0, 'im': 3.0 }\n*/\nsetReadOnly( Complex64.prototype, 'toJSON', toJSON );\n\n\n// EXPORTS //\n\nexport default Complex64;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport Complex128 from '@stdlib/complex-float64';\nimport Complex64 from '@stdlib/complex-float32';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a complex number-like object.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a complex number-like object.\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n* import Complex64 from '@stdlib/complex-float32';\n*\n* var x = new Complex128( 4.0, 2.0 );\n* var bool = isComplexLike( x );\n* // returns true\n*\n* x = new Complex64( 4.0, 2.0 );\n* bool = isComplexLike( x );\n* // returns true\n*/\nfunction isComplexLike( value ) {\n\tif ( value instanceof Complex128 || value instanceof Complex64 ) {\n\t\treturn true;\n\t}\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\ttypeof value.re === 'number' &&\n\t\ttypeof value.im === 'number'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isComplexLike;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isInteger from '@stdlib/math-base-assert-is-integer';\n\n\n// MAIN //\n\n/**\n* Tests if a finite numeric value is an even number.\n*\n* @param {number} x - value to test\n* @returns {boolean} boolean indicating whether the value is an even number\n*\n* @example\n* var bool = isEven( 5.0 );\n* // returns false\n*\n* @example\n* var bool = isEven( -2.0 );\n* // returns true\n*\n* @example\n* var bool = isEven( 0.0 );\n* // returns true\n*\n* @example\n* var bool = isEven( NaN );\n* // returns false\n*/\nfunction isEven( x ) {\n\treturn isInteger( x/2.0 );\n}\n\n\n// EXPORTS //\n\nexport default isEven;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport hasOwnProp from '@stdlib/assert-has-own-property';\nimport Symbol from '@stdlib/symbol-ctor';\n\n\n// MAIN //\n\n/**\n* Tests for native `Symbol.iterator` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Symbol.iterator` support\n*\n* @example\n* var bool = hasIteratorSymbolSupport();\n* // returns \n*/\nfunction hasIteratorSymbolSupport() {\n\treturn (\n\t\ttypeof Symbol === 'function' &&\n\t\ttypeof Symbol( 'foo' ) === 'symbol' &&\n\t\thasOwnProp( Symbol, 'iterator' ) &&\n\t\ttypeof Symbol.iterator === 'symbol'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default hasIteratorSymbolSupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Serializes a complex number as a string.\n*\n* @private\n* @returns {string} serialized complex number\n*/\nfunction toString() { // eslint-disable-line stdlib/no-redeclare\n\t/* eslint-disable no-invalid-this */\n\tvar str = '' + this.re;\n\tif ( this.im < 0 ) {\n\t\tstr += ' - ' + (-this.im);\n\t} else {\n\t\tstr += ' + ' + this.im;\n\t}\n\tstr += 'i';\n\treturn str;\n}\n\n\n// EXPORTS //\n\nexport default toString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Serializes a complex number as a JSON object.\n*\n* @private\n* @returns {Object} JSON representation\n*/\nfunction toJSON() {\n\t/* eslint-disable no-invalid-this */\n\tvar out = {};\n\tout.type = 'Complex64';\n\tout.re = this.re;\n\tout.im = this.im;\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default toJSON;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport hasIteratorSymbolSupport from '@stdlib/assert-has-iterator-symbol-support';\n\n\n// MAIN //\n\n/**\n* Iterator symbol.\n*\n* @name IteratorSymbol\n* @constant\n* @type {(symbol|null)}\n*\n* @example\n* function iterator() {\n* var it;\n* var i;\n*\n* i = -1;\n*\n* it = {};\n* it.next = next;\n* it.return = done;\n*\n* if ( IteratorSymbol ) {\n* it[ IteratorSymbol ] = iterator;\n* }\n* return it;\n*\n* function next() {\n* i += 1;\n* return {\n* 'value': i,\n* 'done': false\n* };\n* }\n*\n* function done( value ) {\n* if ( arguments.length === 0 ) {\n* return {\n* 'done': true\n* };\n* }\n* return {\n* 'value': value,\n* 'done': true\n* };\n* }\n* }\n*\n* var obj = iterator();\n*/\nvar IteratorSymbol = ( hasIteratorSymbolSupport() ) ? Symbol.iterator : null;\n\n\n// EXPORTS //\n\nexport default IteratorSymbol;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport defineProperty from '@stdlib/utils-define-property';\n\n\n// MAIN //\n\n/**\n* Defines a non-enumerable read-only accessor.\n*\n* @param {Object} obj - object on which to define the property\n* @param {(string|symbol)} prop - property name\n* @param {Function} getter - accessor\n*\n* @example\n* function getter() {\n* return 'bar';\n* }\n*\n* var obj = {};\n*\n* setNonEnumerableReadOnlyAccessor( obj, 'foo', getter );\n*\n* try {\n* obj.foo = 'boop';\n* } catch ( err ) {\n* console.error( err.message );\n* }\n*/\nfunction setNonEnumerableReadOnlyAccessor( obj, prop, getter ) { // eslint-disable-line id-length\n\tdefineProperty( obj, prop, {\n\t\t'configurable': false,\n\t\t'enumerable': false,\n\t\t'get': getter\n\t});\n}\n\n\n// EXPORTS //\n\nexport default setNonEnumerableReadOnlyAccessor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Returns the real component of a single-precision complex floating-point number.\n*\n* @param {Complex} z - complex number\n* @returns {number} real component\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n*\n* var z = new Complex64( 5.0, 3.0 );\n*\n* var re = realf( z );\n* // returns 5.0\n*/\nfunction realf( z ) {\n\treturn z.re;\n}\n\n\n// EXPORTS //\n\nexport default realf;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Returns the imaginary component of a single-precision complex floating-point number.\n*\n* @param {Complex} z - complex number\n* @returns {number} imaginary component\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n*\n* var z = new Complex64( 5.0, 3.0 );\n*\n* var im = imagf( z );\n* // returns 3.0\n*/\nfunction imagf( z ) {\n\treturn z.im;\n}\n\n\n// EXPORTS //\n\nexport default imagf;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport Float32Array from '@stdlib/array-float32';\n\n\n// MAIN //\n\n/**\n* Reinterprets a `Complex64Array` as a `Float32Array`.\n*\n* @param {Complex64Array} x - input array\n* @param {NonNegativeInteger} offset - starting index\n* @returns {Float32Array} `Float32Array` view\n*\n* @example\n* import Complex64Array from '@stdlib/array-complex64';\n*\n* var x = new Complex64Array( 10 );\n*\n* var out = reinterpret( x, 0 );\n* // returns \n*\n* var bool = ( out.buffer === x.buffer );\n* // returns true\n*/\nfunction reinterpret( x, offset ) {\n\treturn new Float32Array( x.buffer, x.byteOffset+(x.BYTES_PER_ELEMENT*offset), 2*(x.length-offset) ); // eslint-disable-line max-len\n}\n\n\n// EXPORTS //\n\nexport default reinterpret;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport Float64Array from '@stdlib/array-float64';\n\n\n// MAIN //\n\n/**\n* Reinterprets a `Complex128Array` as a `Float64Array`.\n*\n* @param {Complex128Array} x - input array\n* @param {NonNegativeInteger} offset - starting index\n* @returns {Float64Array} `Float64Array` view\n*\n* @example\n* import Complex128Array from '@stdlib/array-complex128';\n*\n* var x = new Complex128Array( 10 );\n*\n* var out = reinterpret( x, 0 );\n* // returns \n*\n* var bool = ( out.buffer === x.buffer );\n* // returns true\n*/\nfunction reinterpret( x, offset ) {\n\treturn new Float64Array( x.buffer, x.byteOffset+(x.BYTES_PER_ELEMENT*offset), 2*(x.length-offset) ); // eslint-disable-line max-len\n}\n\n\n// EXPORTS //\n\nexport default reinterpret;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// VARIABLES //\n\nvar GETTERS = {\n\t'float64': getFloat64,\n\t'float32': getFloat32,\n\t'int32': getInt32,\n\t'int16': getInt16,\n\t'int8': getInt8,\n\t'uint32': getUint32,\n\t'uint16': getUint16,\n\t'uint8': getUint8,\n\t'uint8c': getUint8c,\n\t'generic': getGeneric,\n\t'default': getArrayLike\n};\n\n\n// FUNCTIONS //\n\n/**\n* Returns an element from a `Float64Array`.\n*\n* @private\n* @param {Float64Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n*\n* var arr = new Float64Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getFloat64( arr, 2 );\n* // returns 3.0\n*/\nfunction getFloat64( arr, idx ) {\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from a `Float32Array`.\n*\n* @private\n* @param {Float32Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Float32Array from '@stdlib/array-float32';\n*\n* var arr = new Float32Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getFloat32( arr, 2 );\n* // returns 3.0\n*/\nfunction getFloat32( arr, idx ) {\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from an `Int32Array`.\n*\n* @private\n* @param {Int32Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Int32Array from '@stdlib/array-int32';\n*\n* var arr = new Int32Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getInt32( arr, 2 );\n* // returns 3\n*/\nfunction getInt32( arr, idx ) { // eslint-disable-line stdlib/jsdoc-doctest-decimal-point\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from an `Int16Array`.\n*\n* @private\n* @param {Int16Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Int16Array from '@stdlib/array-int16';\n*\n* var arr = new Int16Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getInt16( arr, 2 );\n* // returns 3\n*/\nfunction getInt16( arr, idx ) { // eslint-disable-line stdlib/jsdoc-doctest-decimal-point\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from an `Int8Array`.\n*\n* @private\n* @param {Int8Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Int8Array from '@stdlib/array-int8';\n*\n* var arr = new Int8Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getInt8( arr, 2 );\n* // returns 3\n*/\nfunction getInt8( arr, idx ) { // eslint-disable-line stdlib/jsdoc-doctest-decimal-point\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from a `Uint32Array`.\n*\n* @private\n* @param {Uint32Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Uint32Array from '@stdlib/array-uint32';\n*\n* var arr = new Uint32Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getUint32( arr, 2 );\n* // returns 3\n*/\nfunction getUint32( arr, idx ) { // eslint-disable-line stdlib/jsdoc-doctest-decimal-point\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from a `Uint16Array`.\n*\n* @private\n* @param {Uint16Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Uint16Array from '@stdlib/array-uint16';\n*\n* var arr = new Uint16Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getUint16( arr, 2 );\n* // returns 3\n*/\nfunction getUint16( arr, idx ) { // eslint-disable-line stdlib/jsdoc-doctest-decimal-point\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from a `Uint8Array`.\n*\n* @private\n* @param {Uint8Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Uint8Array from '@stdlib/array-uint8';\n*\n* var arr = new Uint8Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getUint8( arr, 2 );\n* // returns 3\n*/\nfunction getUint8( arr, idx ) { // eslint-disable-line stdlib/jsdoc-doctest-decimal-point\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from a `Uint8ClampedArray`.\n*\n* @private\n* @param {Uint8ClampedArray} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Uint8ClampedArray from '@stdlib/array-uint8c';\n*\n* var arr = new Uint8ClampedArray( [ 1, 2, 3, 4 ] );\n*\n* var v = getUint8c( arr, 2 );\n* // returns 3\n*/\nfunction getUint8c( arr, idx ) { // eslint-disable-line stdlib/jsdoc-doctest-decimal-point\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from a generic `Array`.\n*\n* @private\n* @param {Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {*} element value\n*\n* @example\n* var arr = [ 1, 2, 3, 4 ];\n*\n* var v = getGeneric( arr, 2 );\n* // returns 3\n*/\nfunction getGeneric( arr, idx ) {\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from an indexed array-like object.\n*\n* @private\n* @param {Collection} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {*} element value\n*\n* @example\n* var arr = [ 1, 2, 3, 4 ];\n*\n* var v = getArrayLike( arr, 2 );\n* // returns 3\n*/\nfunction getArrayLike( arr, idx ) {\n\treturn arr[ idx ];\n}\n\n\n// MAIN //\n\n/**\n* Returns an accessor function for retrieving an element from an indexed array-like object.\n*\n* @param {string} dtype - array dtype\n* @returns {Function} accessor\n*\n* @example\n* import dtype from '@stdlib/array-dtype';\n*\n* var arr = [ 1, 2, 3, 4 ];\n*\n* var get = getter( dtype( arr ) );\n* var v = get( arr, 2 );\n* // returns 3\n*/\nfunction getter( dtype ) {\n\tvar f = GETTERS[ dtype ];\n\tif ( typeof f === 'function' ) {\n\t\treturn f;\n\t}\n\treturn GETTERS.default;\n}\n\n\n// EXPORTS //\n\nexport default getter;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// VARIABLES //\n\nvar GETTERS = {\n\t'complex128': getComplex128,\n\t'complex64': getComplex64,\n\t'default': getArrayLike\n};\n\n\n// FUNCTIONS //\n\n/**\n* Returns an element from a `Complex128Array`.\n*\n* @private\n* @param {Complex128Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Complex128Array from '@stdlib/array-complex128';\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* var arr = new Complex128Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getComplex128( arr, 1 );\n* // returns \n*\n* var re = real( v );\n* // returns 3.0\n*\n* var im = imag( v );\n* // returns 4.0\n*/\nfunction getComplex128( arr, idx ) {\n\treturn arr.get( idx );\n}\n\n/**\n* Returns an element from a `Complex64Array`.\n*\n* @private\n* @param {Complex64Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Complex64Array from '@stdlib/array-complex64';\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* var arr = new Complex64Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getComplex64( arr, 1 );\n* // returns \n*\n* var re = realf( v );\n* // returns 3.0\n*\n* var im = imagf( v );\n* // returns 4.0\n*/\nfunction getComplex64( arr, idx ) {\n\treturn arr.get( idx );\n}\n\n/**\n* Returns an element from an array-like object supporting the get/set protocol.\n*\n* @private\n* @param {Collection} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {*} element value\n*\n* @example\n* var arr = [ 1, 2, 3, 4 ];\n*\n* function get( idx ) {\n* return arr[ idx ];\n* }\n*\n* function set( value, idx ) {\n* arr[ idx ] = value;\n* }\n*\n* arr.get = get;\n* arr.set = set;\n*\n* var v = getArrayLike( arr, 2 );\n* // returns 3\n*/\nfunction getArrayLike( arr, idx ) {\n\treturn arr.get( idx );\n}\n\n\n// MAIN //\n\n/**\n* Returns an accessor function for retrieving an element from an array-like object supporting the get/set protocol.\n*\n* @param {string} dtype - array dtype\n* @returns {Function} accessor\n*\n* @example\n* import Complex64Array from '@stdlib/array-complex64';\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n* import dtype from '@stdlib/array-dtype';\n*\n* var arr = new Complex64Array( [ 1, 2, 3, 4 ] );\n*\n* var get = getter( dtype( arr ) );\n* var v = get( arr, 1 );\n* // returns \n*\n* var re = realf( v );\n* // returns 3.0\n*\n* var im = imagf( v );\n* // returns 4.0\n*/\nfunction getter( dtype ) {\n\tvar f = GETTERS[ dtype ];\n\tif ( typeof f === 'function' ) {\n\t\treturn f;\n\t}\n\treturn GETTERS.default;\n}\n\n\n// EXPORTS //\n\nexport default getter;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isArrayLikeObject from '@stdlib/assert-is-array-like-object';\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport realf from '@stdlib/complex-realf';\nimport imagf from '@stdlib/complex-imagf';\nimport format from '@stdlib/string-format';\n\n\n// MAIN //\n\n/**\n* Returns an array of iterated values.\n*\n* @private\n* @param {Object} it - iterator\n* @returns {(Array|TypeError)} array or an error\n*/\nfunction fromIterator( it ) {\n\tvar out;\n\tvar v;\n\tvar z;\n\n\tout = [];\n\twhile ( true ) {\n\t\tv = it.next();\n\t\tif ( v.done ) {\n\t\t\tbreak;\n\t\t}\n\t\tz = v.value;\n\t\tif ( isArrayLikeObject( z ) && z.length >= 2 ) {\n\t\t\tout.push( z[ 0 ], z[ 1 ] );\n\t\t} else if ( isComplexLike( z ) ) {\n\t\t\tout.push( realf( z ), imagf( z ) );\n\t\t} else {\n\t\t\treturn new TypeError( format( 'invalid argument. An iterator must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', z ) );\n\t\t}\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default fromIterator;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isArrayLikeObject from '@stdlib/assert-is-array-like-object';\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport realf from '@stdlib/complex-realf';\nimport imagf from '@stdlib/complex-imagf';\nimport format from '@stdlib/string-format';\n\n\n// MAIN //\n\n/**\n* Returns an array of iterated values.\n*\n* @private\n* @param {Object} it - iterator\n* @param {Function} clbk - callback to invoke for each iterated value\n* @param {*} thisArg - invocation context\n* @returns {(Array|TypeError)} array or an error\n*/\nfunction fromIteratorMap( it, clbk, thisArg ) {\n\tvar out;\n\tvar v;\n\tvar z;\n\tvar i;\n\n\tout = [];\n\ti = -1;\n\twhile ( true ) {\n\t\tv = it.next();\n\t\tif ( v.done ) {\n\t\t\tbreak;\n\t\t}\n\t\ti += 1;\n\t\tz = clbk.call( thisArg, v.value, i );\n\t\tif ( isArrayLikeObject( z ) && z.length >= 2 ) {\n\t\t\tout.push( z[ 0 ], z[ 1 ] );\n\t\t} else if ( isComplexLike( z ) ) {\n\t\t\tout.push( realf( z ), imagf( z ) );\n\t\t} else {\n\t\t\treturn new TypeError( format( 'invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', z ) );\n\t\t}\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default fromIteratorMap;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport realf from '@stdlib/complex-realf';\nimport imagf from '@stdlib/complex-imagf';\n\n\n// MAIN //\n\n/**\n* Returns a strided array of real and imaginary components.\n*\n* @private\n* @param {Float32Array} buf - output array\n* @param {Array} arr - array containing complex numbers\n* @returns {(Float32Array|null)} output array or null\n*/\nfunction fromArray( buf, arr ) {\n\tvar len;\n\tvar v;\n\tvar i;\n\tvar j;\n\n\tlen = arr.length;\n\tj = 0;\n\tfor ( i = 0; i < len; i++ ) {\n\t\tv = arr[ i ];\n\t\tif ( !isComplexLike( v ) ) {\n\t\t\treturn null;\n\t\t}\n\t\tbuf[ j ] = realf( v );\n\t\tbuf[ j+1 ] = imagf( v );\n\t\tj += 2; // stride\n\t}\n\treturn buf;\n}\n\n\n// EXPORTS //\n\nexport default fromArray;\n","/* eslint-disable no-restricted-syntax, max-lines, no-invalid-this */\n\n/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isNonNegativeInteger } from '@stdlib/assert-is-nonnegative-integer';\nimport isArrayLikeObject from '@stdlib/assert-is-array-like-object';\nimport isCollection from '@stdlib/assert-is-collection';\nimport isArrayBuffer from '@stdlib/assert-is-arraybuffer';\nimport isObject from '@stdlib/assert-is-object';\nimport isArray from '@stdlib/assert-is-array';\nimport isFunction from '@stdlib/assert-is-function';\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport isEven from '@stdlib/math-base-assert-is-even';\nimport isInteger from '@stdlib/math-base-assert-is-integer';\nimport hasIteratorSymbolSupport from '@stdlib/assert-has-iterator-symbol-support';\nimport ITERATOR_SYMBOL from '@stdlib/symbol-iterator';\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport setReadOnlyAccessor from '@stdlib/utils-define-nonenumerable-read-only-accessor';\nimport Float32Array from '@stdlib/array-float32';\nimport Complex64 from '@stdlib/complex-float32';\nimport format from '@stdlib/string-format';\nimport realf from '@stdlib/complex-realf';\nimport imagf from '@stdlib/complex-imagf';\nimport reinterpret64 from '@stdlib/strided-base-reinterpret-complex64';\nimport reinterpret128 from '@stdlib/strided-base-reinterpret-complex128';\nimport getter from '@stdlib/array-base-getter';\nimport accessorGetter from '@stdlib/array-base-accessor-getter';\nimport fromIterator from './from_iterator.js';\nimport fromIteratorMap from './from_iterator_map.js';\nimport fromArray from './from_array.js';\n\n\n// VARIABLES //\n\nvar BYTES_PER_ELEMENT = Float32Array.BYTES_PER_ELEMENT * 2;\nvar HAS_ITERATOR_SYMBOL = hasIteratorSymbolSupport();\n\n\n// FUNCTIONS //\n\n/**\n* Returns a boolean indicating if a value is a complex typed array.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a complex typed array\n*/\nfunction isComplexArray( value ) {\n\treturn (\n\t\tvalue instanceof Complex64Array ||\n\t\t(\n\t\t\ttypeof value === 'object' &&\n\t\t\tvalue !== null &&\n\t\t\t(\n\t\t\t\tvalue.constructor.name === 'Complex64Array' ||\n\t\t\t\tvalue.constructor.name === 'Complex128Array'\n\t\t\t) &&\n\t\t\ttypeof value._length === 'number' && // eslint-disable-line no-underscore-dangle\n\n\t\t\t// NOTE: we don't perform a more rigorous test here for a typed array for performance reasons, as robustly checking for a typed array instance could require walking the prototype tree and performing relatively expensive constructor checks...\n\t\t\ttypeof value._buffer === 'object' // eslint-disable-line no-underscore-dangle\n\t\t)\n\t);\n}\n\n/**\n* Returns a boolean indicating if a value is a complex typed array constructor.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a complex typed array constructor\n*/\nfunction isComplexArrayConstructor( value ) {\n\treturn (\n\t\tvalue === Complex64Array ||\n\n\t\t// NOTE: weaker test in order to avoid a circular dependency with Complex128Array...\n\t\tvalue.name === 'Complex128Array'\n\t);\n}\n\n/**\n* Returns a boolean indicating if a value is a `Complex64Array`.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a `Complex64Array`\n*/\nfunction isComplex64Array( value ) {\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\tvalue.constructor.name === 'Complex64Array' &&\n\t\tvalue.BYTES_PER_ELEMENT === BYTES_PER_ELEMENT\n\t);\n}\n\n/**\n* Returns a boolean indicating if a value is a `Complex128Array`.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a `Complex128Array`\n*/\nfunction isComplex128Array( value ) {\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\tvalue.constructor.name === 'Complex128Array' &&\n\t\tvalue.BYTES_PER_ELEMENT === BYTES_PER_ELEMENT*2\n\t);\n}\n\n\n// MAIN //\n\n/**\n* 64-bit complex number array constructor.\n*\n* @constructor\n* @param {(NonNegativeInteger|Collection|ArrayBuffer|Iterable)} [arg] - length, typed array, array-like object, buffer, or an iterable\n* @param {NonNegativeInteger} [byteOffset=0] - byte offset\n* @param {NonNegativeInteger} [length] - view length\n* @throws {RangeError} ArrayBuffer byte length must be a multiple of `8`\n* @throws {RangeError} array-like object and typed array input arguments must have a length which is a multiple of two\n* @throws {TypeError} if provided only a single argument, must provide a valid argument\n* @throws {TypeError} byte offset must be a nonnegative integer\n* @throws {RangeError} byte offset must be a multiple of `8`\n* @throws {TypeError} view length must be a positive multiple of `8`\n* @throws {RangeError} must provide sufficient memory to accommodate byte offset and view length requirements\n* @throws {TypeError} an iterator must return either a two element array containing real and imaginary components or a complex number\n* @returns {Complex64Array} complex number array\n*\n* @example\n* var arr = new Complex64Array();\n* // returns \n*\n* var len = arr.length;\n* // returns 0\n*\n* @example\n* var arr = new Complex64Array( 2 );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*\n* @example\n* var arr = new Complex64Array( [ 1.0, -1.0 ] );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* import ArrayBuffer from '@stdlib/array-buffer';\n*\n* var buf = new ArrayBuffer( 16 );\n* var arr = new Complex64Array( buf );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*\n* @example\n* import ArrayBuffer from '@stdlib/array-buffer';\n*\n* var buf = new ArrayBuffer( 16 );\n* var arr = new Complex64Array( buf, 8 );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* import ArrayBuffer from '@stdlib/array-buffer';\n*\n* var buf = new ArrayBuffer( 32 );\n* var arr = new Complex64Array( buf, 8, 2 );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*/\nfunction Complex64Array() {\n\tvar byteOffset;\n\tvar nargs;\n\tvar buf;\n\tvar len;\n\n\tnargs = arguments.length;\n\tif ( !(this instanceof Complex64Array) ) {\n\t\tif ( nargs === 0 ) {\n\t\t\treturn new Complex64Array();\n\t\t}\n\t\tif ( nargs === 1 ) {\n\t\t\treturn new Complex64Array( arguments[0] );\n\t\t}\n\t\tif ( nargs === 2 ) {\n\t\t\treturn new Complex64Array( arguments[0], arguments[1] );\n\t\t}\n\t\treturn new Complex64Array( arguments[0], arguments[1], arguments[2] );\n\t}\n\t// Create the underlying data buffer...\n\tif ( nargs === 0 ) {\n\t\tbuf = new Float32Array( 0 ); // backward-compatibility\n\t} else if ( nargs === 1 ) {\n\t\tif ( isNonNegativeInteger( arguments[0] ) ) {\n\t\t\tbuf = new Float32Array( arguments[0]*2 );\n\t\t} else if ( isCollection( arguments[0] ) ) {\n\t\t\tbuf = arguments[ 0 ];\n\t\t\tlen = buf.length;\n\n\t\t\t// If provided a \"generic\" array, peak at the first value, and, if the value is a complex number, try to process as an array of complex numbers, falling back to \"normal\" typed array initialization if we fail and ensuring consistency if the first value had not been a complex number...\n\t\t\tif ( len && isArray( buf ) && isComplexLike( buf[0] ) ) {\n\t\t\t\tbuf = fromArray( new Float32Array( len*2 ), buf );\n\t\t\t\tif ( buf === null ) {\n\t\t\t\t\t// We failed and we are now forced to allocate a new array :-(\n\t\t\t\t\tif ( !isEven( len ) ) {\n\t\t\t\t\t\tthrow new RangeError( format( 'invalid argument. Array-like object arguments must have a length which is a multiple of two. Length: `%u`.', len ) );\n\t\t\t\t\t}\n\t\t\t\t\t// We failed, so fall back to directly setting values...\n\t\t\t\t\tbuf = new Float32Array( arguments[0] );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ( isComplex64Array( buf ) ) {\n\t\t\t\t\tbuf = reinterpret64( buf, 0 );\n\t\t\t\t} else if ( isComplex128Array( buf ) ) {\n\t\t\t\t\tbuf = reinterpret128( buf, 0 );\n\t\t\t\t} else if ( !isEven( len ) ) {\n\t\t\t\t\tthrow new RangeError( format( 'invalid argument. Array-like object and typed array arguments must have a length which is a multiple of two. Length: `%u`.', len ) );\n\t\t\t\t}\n\t\t\t\tbuf = new Float32Array( buf );\n\t\t\t}\n\t\t} else if ( isArrayBuffer( arguments[0] ) ) {\n\t\t\tbuf = arguments[ 0 ];\n\t\t\tif ( !isInteger( buf.byteLength/BYTES_PER_ELEMENT ) ) {\n\t\t\t\tthrow new RangeError( format( 'invalid argument. ArrayBuffer byte length must be a multiple of %u. Byte length: `%u`.', BYTES_PER_ELEMENT, buf.byteLength ) );\n\t\t\t}\n\t\t\tbuf = new Float32Array( buf );\n\t\t} else if ( isObject( arguments[0] ) ) {\n\t\t\tbuf = arguments[ 0 ];\n\t\t\tif ( HAS_ITERATOR_SYMBOL === false ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Environment lacks Symbol.iterator support. Must provide a length, ArrayBuffer, typed array, or array-like object. Value: `%s`.', buf ) );\n\t\t\t}\n\t\t\tif ( !isFunction( buf[ ITERATOR_SYMBOL ] ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.', buf ) );\n\t\t\t}\n\t\t\tbuf = buf[ ITERATOR_SYMBOL ]();\n\t\t\tif ( !isFunction( buf.next ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.', buf ) );\n\t\t\t}\n\t\t\tbuf = fromIterator( buf );\n\t\t\tif ( buf instanceof Error ) {\n\t\t\t\tthrow buf;\n\t\t\t}\n\t\t\tbuf = new Float32Array( buf );\n\t\t} else {\n\t\t\tthrow new TypeError( format( 'invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.', arguments[0] ) );\n\t\t}\n\t} else {\n\t\tbuf = arguments[ 0 ];\n\t\tif ( !isArrayBuffer( buf ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. First argument must be an ArrayBuffer. Value: `%s`.', buf ) );\n\t\t}\n\t\tbyteOffset = arguments[ 1 ];\n\t\tif ( !isNonNegativeInteger( byteOffset ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Byte offset must be a nonnegative integer. Value: `%s`.', byteOffset ) );\n\t\t}\n\t\tif ( !isInteger( byteOffset/BYTES_PER_ELEMENT ) ) {\n\t\t\tthrow new RangeError( format( 'invalid argument. Byte offset must be a multiple of %u. Value: `%u`.', BYTES_PER_ELEMENT, byteOffset ) );\n\t\t}\n\t\tif ( nargs === 2 ) {\n\t\t\tlen = buf.byteLength - byteOffset;\n\t\t\tif ( !isInteger( len/BYTES_PER_ELEMENT ) ) {\n\t\t\t\tthrow new RangeError( format( 'invalid arguments. ArrayBuffer view byte length must be a multiple of %u. View byte length: `%u`.', BYTES_PER_ELEMENT, len ) );\n\t\t\t}\n\t\t\tbuf = new Float32Array( buf, byteOffset );\n\t\t} else {\n\t\t\tlen = arguments[ 2 ];\n\t\t\tif ( !isNonNegativeInteger( len ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Length must be a nonnegative integer. Value: `%s`.', len ) );\n\t\t\t}\n\t\t\tif ( (len*BYTES_PER_ELEMENT) > (buf.byteLength-byteOffset) ) {\n\t\t\t\tthrow new RangeError( format( 'invalid arguments. ArrayBuffer has insufficient capacity. Either decrease the array length or provide a bigger buffer. Minimum capacity: `%u`.', len*BYTES_PER_ELEMENT ) );\n\t\t\t}\n\t\t\tbuf = new Float32Array( buf, byteOffset, len*2 );\n\t\t}\n\t}\n\tsetReadOnly( this, '_buffer', buf );\n\tsetReadOnly( this, '_length', buf.length/2 );\n\n\treturn this;\n}\n\n/**\n* Size (in bytes) of each array element.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex64Array\n* @readonly\n* @type {PositiveInteger}\n* @default 8\n*\n* @example\n* var nbytes = Complex64Array.BYTES_PER_ELEMENT;\n* // returns 8\n*/\nsetReadOnly( Complex64Array, 'BYTES_PER_ELEMENT', BYTES_PER_ELEMENT );\n\n/**\n* Constructor name.\n*\n* @name name\n* @memberof Complex64Array\n* @readonly\n* @type {string}\n* @default 'Complex64Array'\n*\n* @example\n* var str = Complex64Array.name;\n* // returns 'Complex64Array'\n*/\nsetReadOnly( Complex64Array, 'name', 'Complex64Array' );\n\n/**\n* Creates a new 64-bit complex number array from an array-like object or an iterable.\n*\n* @name from\n* @memberof Complex64Array\n* @type {Function}\n* @param {(Collection|Iterable)} src - array-like object or iterable\n* @param {Function} [clbk] - callback to invoke for each source element\n* @param {*} [thisArg] - context\n* @throws {TypeError} `this` context must be a constructor\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be an array-like object or an iterable\n* @throws {TypeError} second argument must be a function\n* @throws {RangeError} array-like objects must have a length which is a multiple of two\n* @throws {TypeError} an iterator must return either a two element array containing real and imaginary components or a complex number\n* @throws {TypeError} when provided an iterator, a callback must return either a two element array containing real and imaginary components or a complex number\n* @returns {Complex64Array} 64-bit complex number array\n*\n* @example\n* var arr = Complex64Array.from( [ 1.0, -1.0 ] );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n*\n* var arr = Complex64Array.from( [ new Complex64( 1.0, 1.0 ) ] );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* function clbk( v ) {\n* return new Complex64( realf(v)*2.0, imagf(v)*2.0 );\n* }\n*\n* var arr = Complex64Array.from( [ new Complex64( 1.0, 1.0 ) ], clbk );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*/\nsetReadOnly( Complex64Array, 'from', function from( src ) {\n\tvar thisArg;\n\tvar nargs;\n\tvar clbk;\n\tvar out;\n\tvar buf;\n\tvar tmp;\n\tvar get;\n\tvar len;\n\tvar flg;\n\tvar v;\n\tvar i;\n\tvar j;\n\tif ( !isFunction( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` context must be a constructor.' );\n\t}\n\tif ( !isComplexArrayConstructor( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tnargs = arguments.length;\n\tif ( nargs > 1 ) {\n\t\tclbk = arguments[ 1 ];\n\t\tif ( !isFunction( clbk ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be a function. Value: `%s`.', clbk ) );\n\t\t}\n\t\tif ( nargs > 2 ) {\n\t\t\tthisArg = arguments[ 2 ];\n\t\t}\n\t}\n\tif ( isComplexArray( src ) ) {\n\t\tlen = src.length;\n\t\tif ( clbk ) {\n\t\t\tout = new this( len );\n\t\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\t\tj = 0;\n\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\tv = clbk.call( thisArg, src.get( i ), i );\n\t\t\t\tif ( isComplexLike( v ) ) {\n\t\t\t\t\tbuf[ j ] = realf( v );\n\t\t\t\t\tbuf[ j+1 ] = imagf( v );\n\t\t\t\t} else if ( isArrayLikeObject( v ) && v.length >= 2 ) {\n\t\t\t\t\tbuf[ j ] = v[ 0 ];\n\t\t\t\t\tbuf[ j+1 ] = v[ 1 ];\n\t\t\t\t} else {\n\t\t\t\t\tthrow new TypeError( format( 'invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', v ) );\n\t\t\t\t}\n\t\t\t\tj += 2; // stride\n\t\t\t}\n\t\t\treturn out;\n\t\t}\n\t\treturn new this( src );\n\t}\n\tif ( isCollection( src ) ) {\n\t\tif ( clbk ) {\n\t\t\t// Note: array contents affect how we iterate over a provided data source. If only complex number objects, we can extract real and imaginary components. Otherwise, for non-complex number arrays (e.g., `Float64Array`, etc), we assume a strided array where real and imaginary components are interleaved. In the former case, we expect a callback to return real and imaginary components (possibly as a complex number). In the latter case, we expect a callback to return *either* a real or imaginary component.\n\n\t\t\tlen = src.length;\n\t\t\tif ( src.get && src.set ) {\n\t\t\t\tget = accessorGetter( 'default' );\n\t\t\t} else {\n\t\t\t\tget = getter( 'default' );\n\t\t\t}\n\t\t\t// Detect whether we've been provided an array which returns complex number objects...\n\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\tif ( !isComplexLike( get( src, i ) ) ) {\n\t\t\t\t\tflg = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// If an array does not contain only complex number objects, then we assume interleaved real and imaginary components...\n\t\t\tif ( flg ) {\n\t\t\t\tif ( !isEven( len ) ) {\n\t\t\t\t\tthrow new RangeError( format( 'invalid argument. First argument must have a length which is a multiple of %u. Length: `%u`.', 2, len ) );\n\t\t\t\t}\n\t\t\t\tout = new this( len/2 );\n\t\t\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\t\tbuf[ i ] = clbk.call( thisArg, get( src, i ), i );\n\t\t\t\t}\n\t\t\t\treturn out;\n\t\t\t}\n\t\t\t// If an array contains only complex number objects, then we need to extract real and imaginary components...\n\t\t\tout = new this( len );\n\t\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\t\tj = 0;\n\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\tv = clbk.call( thisArg, get( src, i ), i );\n\t\t\t\tif ( isComplexLike( v ) ) {\n\t\t\t\t\tbuf[ j ] = realf( v );\n\t\t\t\t\tbuf[ j+1 ] = imagf( v );\n\t\t\t\t} else if ( isArrayLikeObject( v ) && v.length >= 2 ) {\n\t\t\t\t\tbuf[ j ] = v[ 0 ];\n\t\t\t\t\tbuf[ j+1 ] = v[ 1 ];\n\t\t\t\t} else {\n\t\t\t\t\tthrow new TypeError( format( 'invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', v ) );\n\t\t\t\t}\n\t\t\t\tj += 2; // stride\n\t\t\t}\n\t\t\treturn out;\n\t\t}\n\t\treturn new this( src );\n\t}\n\tif ( isObject( src ) && HAS_ITERATOR_SYMBOL && isFunction( src[ ITERATOR_SYMBOL ] ) ) { // eslint-disable-line max-len\n\t\tbuf = src[ ITERATOR_SYMBOL ]();\n\t\tif ( !isFunction( buf.next ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.', src ) );\n\t\t}\n\t\tif ( clbk ) {\n\t\t\ttmp = fromIteratorMap( buf, clbk, thisArg );\n\t\t} else {\n\t\t\ttmp = fromIterator( buf );\n\t\t}\n\t\tif ( tmp instanceof Error ) {\n\t\t\tthrow tmp;\n\t\t}\n\t\tlen = tmp.length / 2;\n\t\tout = new this( len );\n\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\tbuf[ i ] = tmp[ i ];\n\t\t}\n\t\treturn out;\n\t}\n\tthrow new TypeError( format( 'invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.', src ) );\n});\n\n/**\n* Creates a new 64-bit complex number array from a variable number of arguments.\n*\n* @name of\n* @memberof Complex64Array\n* @type {Function}\n* @param {...*} element - array elements\n* @throws {TypeError} `this` context must be a constructor\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Complex64Array} 64-bit complex number array\n*\n* @example\n* var arr = Complex64Array.of( 1.0, 1.0, 1.0, 1.0 );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*/\nsetReadOnly( Complex64Array, 'of', function of() {\n\tvar args;\n\tvar i;\n\tif ( !isFunction( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` context must be a constructor.' );\n\t}\n\tif ( !isComplexArrayConstructor( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\targs = [];\n\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\targs.push( arguments[ i ] );\n\t}\n\treturn new this( args );\n});\n\n/**\n* Pointer to the underlying data buffer.\n*\n* @name buffer\n* @memberof Complex64Array.prototype\n* @readonly\n* @type {ArrayBuffer}\n*\n* @example\n* var arr = new Complex64Array( 10 );\n*\n* var buf = arr.buffer;\n* // returns \n*/\nsetReadOnlyAccessor( Complex64Array.prototype, 'buffer', function get() {\n\treturn this._buffer.buffer;\n});\n\n/**\n* Size (in bytes) of the array.\n*\n* @name byteLength\n* @memberof Complex64Array.prototype\n* @readonly\n* @type {NonNegativeInteger}\n*\n* @example\n* var arr = new Complex64Array( 10 );\n*\n* var byteLength = arr.byteLength;\n* // returns 80\n*/\nsetReadOnlyAccessor( Complex64Array.prototype, 'byteLength', function get() {\n\treturn this._buffer.byteLength;\n});\n\n/**\n* Offset (in bytes) of the array from the start of its underlying `ArrayBuffer`.\n*\n* @name byteOffset\n* @memberof Complex64Array.prototype\n* @readonly\n* @type {NonNegativeInteger}\n*\n* @example\n* var arr = new Complex64Array( 10 );\n*\n* var byteOffset = arr.byteOffset;\n* // returns 0\n*/\nsetReadOnlyAccessor( Complex64Array.prototype, 'byteOffset', function get() {\n\treturn this._buffer.byteOffset;\n});\n\n/**\n* Size (in bytes) of each array element.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex64Array.prototype\n* @readonly\n* @type {PositiveInteger}\n* @default 8\n*\n* @example\n* var arr = new Complex64Array( 10 );\n*\n* var nbytes = arr.BYTES_PER_ELEMENT;\n* // returns 8\n*/\nsetReadOnly( Complex64Array.prototype, 'BYTES_PER_ELEMENT', Complex64Array.BYTES_PER_ELEMENT );\n\n/**\n* Copies a sequence of elements within the array to the position starting at `target`.\n*\n* @name copyWithin\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {integer} target - index at which to start copying elements\n* @param {integer} start - source index at which to copy elements from\n* @param {integer} [end] - source index at which to stop copying elements from\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Complex64Array} modified array\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* var arr = new Complex64Array( 4 );\n*\n* // Set the array elements:\n* arr.set( new Complex64( 1.0, 1.0 ), 0 );\n* arr.set( new Complex64( 2.0, 2.0 ), 1 );\n* arr.set( new Complex64( 3.0, 3.0 ), 2 );\n* arr.set( new Complex64( 4.0, 4.0 ), 3 );\n*\n* // Copy the first two elements to the last two elements:\n* arr.copyWithin( 2, 0, 2 );\n*\n* // Get the last array element:\n* var z = arr.get( 3 );\n*\n* var re = realf( z );\n* // returns 2.0\n*\n* var im = imagf( z );\n* // returns 2.0\n*/\nsetReadOnly( Complex64Array.prototype, 'copyWithin', function copyWithin( target, start ) {\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\t// FIXME: prefer a functional `copyWithin` implementation which addresses lack of universal browser support (e.g., IE11 and Safari) or ensure that typed arrays are polyfilled\n\tif ( arguments.length === 2 ) {\n\t\tthis._buffer.copyWithin( target*2, start*2 );\n\t} else {\n\t\tthis._buffer.copyWithin( target*2, start*2, arguments[2]*2 );\n\t}\n\treturn this;\n});\n\n/**\n* Returns an iterator for iterating over array key-value pairs.\n*\n* @name entries\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Iterator} iterator\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n*\n* var arr = [\n* new Complex64( 1.0, 1.0 ),\n* new Complex64( 2.0, 2.0 ),\n* new Complex64( 3.0, 3.0 )\n* ];\n* arr = new Complex64Array( arr );\n*\n* // Create an iterator:\n* var it = arr.entries();\n*\n* // Iterate over the key-value pairs...\n* var v = it.next().value;\n* // returns [ 0, ]\n*\n* v = it.next().value;\n* // returns [ 1, ]\n*\n* v = it.next().value;\n* // returns [ 2, ]\n*\n* var bool = it.next().done;\n* // returns true\n*/\nsetReadOnly( Complex64Array.prototype, 'entries', function entries() {\n\tvar buffer;\n\tvar self;\n\tvar iter;\n\tvar len;\n\tvar FLG;\n\tvar i;\n\tvar j;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tself = this;\n\tbuffer = this._buffer;\n\tlen = this._length;\n\n\t// Initialize the iteration indices:\n\ti = -1;\n\tj = -2;\n\n\t// Create an iterator protocol-compliant object:\n\titer = {};\n\tsetReadOnly( iter, 'next', next );\n\tsetReadOnly( iter, 'return', end );\n\n\tif ( ITERATOR_SYMBOL ) {\n\t\tsetReadOnly( iter, ITERATOR_SYMBOL, factory );\n\t}\n\treturn iter;\n\n\t/**\n\t* Returns an iterator protocol-compliant object containing the next iterated value.\n\t*\n\t* @private\n\t* @returns {Object} iterator protocol-compliant object\n\t*/\n\tfunction next() {\n\t\tvar z;\n\t\ti += 1;\n\t\tif ( FLG || i >= len ) {\n\t\t\treturn {\n\t\t\t\t'done': true\n\t\t\t};\n\t\t}\n\t\tj += 2;\n\t\tz = new Complex64( buffer[ j ], buffer[ j+1 ] );\n\t\treturn {\n\t\t\t'value': [ i, z ],\n\t\t\t'done': false\n\t\t};\n\t}\n\n\t/**\n\t* Finishes an iterator.\n\t*\n\t* @private\n\t* @param {*} [value] - value to return\n\t* @returns {Object} iterator protocol-compliant object\n\t*/\n\tfunction end( value ) {\n\t\tFLG = true;\n\t\tif ( arguments.length ) {\n\t\t\treturn {\n\t\t\t\t'value': value,\n\t\t\t\t'done': true\n\t\t\t};\n\t\t}\n\t\treturn {\n\t\t\t'done': true\n\t\t};\n\t}\n\n\t/**\n\t* Returns a new iterator.\n\t*\n\t* @private\n\t* @returns {Iterator} iterator\n\t*/\n\tfunction factory() {\n\t\treturn self.entries();\n\t}\n});\n\n/**\n* Returns an array element.\n*\n* @name get\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {NonNegativeInteger} idx - element index\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} must provide a nonnegative integer\n* @returns {(Complex64|void)} array element\n*\n* @example\n* var arr = new Complex64Array( 10 );\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* var z = arr.get( 0 );\n* // returns \n*\n* var re = realf( z );\n* // returns 0.0\n*\n* var im = imagf( z );\n* // returns 0.0\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n*\n* z = arr.get( 0 );\n* // returns \n*\n* re = realf( z );\n* // returns 1.0\n*\n* im = imagf( z );\n* // returns -1.0\n*\n* z = arr.get( 100 );\n* // returns undefined\n*/\nsetReadOnly( Complex64Array.prototype, 'get', function get( idx ) {\n\tvar buf;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isNonNegativeInteger( idx ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Must provide a nonnegative integer. Value: `%s`.', idx ) );\n\t}\n\tif ( idx >= this._length ) {\n\t\treturn;\n\t}\n\tbuf = this._buffer;\n\tidx *= 2;\n\treturn new Complex64( buf[ idx ], buf[ idx+1 ] );\n});\n\n/**\n* Number of array elements.\n*\n* @name length\n* @memberof Complex64Array.prototype\n* @readonly\n* @type {NonNegativeInteger}\n*\n* @example\n* var arr = new Complex64Array( 10 );\n*\n* var len = arr.length;\n* // returns 10\n*/\nsetReadOnlyAccessor( Complex64Array.prototype, 'length', function get() {\n\treturn this._length;\n});\n\n/**\n* Sets an array element.\n*\n* ## Notes\n*\n* - When provided a typed array, real or complex, we must check whether the source array shares the same buffer as the target array and whether the underlying memory overlaps. In particular, we are concerned with the following scenario:\n*\n* ```text\n* buf: ---------------------\n* src: ---------------------\n* ```\n*\n* In the above, as we copy values from `src`, we will overwrite values in the `src` view, resulting in duplicated values copied into the end of `buf`, which is not intended. Hence, to avoid overwriting source values, we must **copy** source values to a temporary array.\n*\n* In the other overlapping scenario,\n*\n* ```text\n* buf: ---------------------\n* src: ---------------------\n* ```\n*\n* by the time we begin copying into the overlapping region, we are copying from the end of `src`, a non-overlapping region, which means we don't run the risk of copying copied values, rather than the original `src` values as intended.\n*\n*\n* @name set\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {(Collection|Complex|ComplexArray)} value - value(s)\n* @param {NonNegativeInteger} [i=0] - element index at which to start writing values\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be either a complex number, an array-like object, or a complex number array\n* @throws {TypeError} index argument must be a nonnegative integer\n* @throws {RangeError} array-like objects must have a length which is a multiple of two\n* @throws {RangeError} index argument is out-of-bounds\n* @throws {RangeError} target array lacks sufficient storage to accommodate source values\n* @returns {void}\n*\n* @example\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* var arr = new Complex64Array( 10 );\n*\n* var z = arr.get( 0 );\n* // returns \n*\n* var re = realf( z );\n* // returns 0.0\n*\n* var im = imagf( z );\n* // returns 0.0\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n*\n* z = arr.get( 0 );\n* // returns \n*\n* re = realf( z );\n* // returns 1.0\n*\n* im = imagf( z );\n* // returns -1.0\n*/\nsetReadOnly( Complex64Array.prototype, 'set', function set( value ) {\n\t/* eslint-disable no-underscore-dangle */\n\tvar sbuf;\n\tvar idx;\n\tvar buf;\n\tvar tmp;\n\tvar flg;\n\tvar N;\n\tvar v;\n\tvar i;\n\tvar j;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tbuf = this._buffer;\n\tif ( arguments.length > 1 ) {\n\t\tidx = arguments[ 1 ];\n\t\tif ( !isNonNegativeInteger( idx ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Index argument must be a nonnegative integer. Value: `%s`.', idx ) );\n\t\t}\n\t} else {\n\t\tidx = 0;\n\t}\n\tif ( isComplexLike( value ) ) {\n\t\tif ( idx >= this._length ) {\n\t\t\tthrow new RangeError( format( 'invalid argument. Index argument is out-of-bounds. Value: `%u`.', idx ) );\n\t\t}\n\t\tidx *= 2;\n\t\tbuf[ idx ] = realf( value );\n\t\tbuf[ idx+1 ] = imagf( value );\n\t\treturn;\n\t}\n\tif ( isComplexArray( value ) ) {\n\t\tN = value._length;\n\t\tif ( idx+N > this._length ) {\n\t\t\tthrow new RangeError( 'invalid arguments. Target array lacks sufficient storage to accommodate source values.' );\n\t\t}\n\t\tsbuf = value._buffer;\n\n\t\t// Check for overlapping memory...\n\t\tj = buf.byteOffset + (idx*BYTES_PER_ELEMENT);\n\t\tif (\n\t\t\tsbuf.buffer === buf.buffer &&\n\t\t\t(\n\t\t\t\tsbuf.byteOffset < j &&\n\t\t\t\tsbuf.byteOffset+sbuf.byteLength > j\n\t\t\t)\n\t\t) {\n\t\t\t// We need to copy source values...\n\t\t\ttmp = new Float32Array( sbuf.length );\n\t\t\tfor ( i = 0; i < sbuf.length; i++ ) {\n\t\t\t\ttmp[ i ] = sbuf[ i ];\n\t\t\t}\n\t\t\tsbuf = tmp;\n\t\t}\n\t\tidx *= 2;\n\t\tj = 0;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\tbuf[ idx ] = sbuf[ j ];\n\t\t\tbuf[ idx+1 ] = sbuf[ j+1 ];\n\t\t\tidx += 2; // stride\n\t\t\tj += 2; // stride\n\t\t}\n\t\treturn;\n\t}\n\tif ( isCollection( value ) ) {\n\t\t// Detect whether we've been provided an array of complex numbers...\n\t\tN = value.length;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\tif ( !isComplexLike( value[ i ] ) ) {\n\t\t\t\tflg = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t// If an array does not contain only complex numbers, then we assume interleaved real and imaginary components...\n\t\tif ( flg ) {\n\t\t\tif ( !isEven( N ) ) {\n\t\t\t\tthrow new RangeError( format( 'invalid argument. Array-like object arguments must have a length which is a multiple of two. Length: `%u`.', N ) );\n\t\t\t}\n\t\t\tif ( idx+(N/2) > this._length ) {\n\t\t\t\tthrow new RangeError( 'invalid arguments. Target array lacks sufficient storage to accommodate source values.' );\n\t\t\t}\n\t\t\tsbuf = value;\n\n\t\t\t// Check for overlapping memory...\n\t\t\tj = buf.byteOffset + (idx*BYTES_PER_ELEMENT);\n\t\t\tif (\n\t\t\t\tsbuf.buffer === buf.buffer &&\n\t\t\t\t(\n\t\t\t\t\tsbuf.byteOffset < j &&\n\t\t\t\t\tsbuf.byteOffset+sbuf.byteLength > j\n\t\t\t\t)\n\t\t\t) {\n\t\t\t\t// We need to copy source values...\n\t\t\t\ttmp = new Float32Array( N );\n\t\t\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\t\t\ttmp[ i ] = sbuf[ i ];\n\t\t\t\t}\n\t\t\t\tsbuf = tmp;\n\t\t\t}\n\t\t\tidx *= 2;\n\t\t\tN /= 2;\n\t\t\tj = 0;\n\t\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\t\tbuf[ idx ] = sbuf[ j ];\n\t\t\t\tbuf[ idx+1 ] = sbuf[ j+1 ];\n\t\t\t\tidx += 2; // stride\n\t\t\t\tj += 2; // stride\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\t// If an array contains only complex numbers, then we need to extract real and imaginary components...\n\t\tif ( idx+N > this._length ) {\n\t\t\tthrow new RangeError( 'invalid arguments. Target array lacks sufficient storage to accommodate source values.' );\n\t\t}\n\t\tidx *= 2;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\tv = value[ i ];\n\t\t\tbuf[ idx ] = realf( v );\n\t\t\tbuf[ idx+1 ] = imagf( v );\n\t\t\tidx += 2; // stride\n\t\t}\n\t\treturn;\n\t}\n\tthrow new TypeError( format( 'invalid argument. First argument must be either a complex number, an array-like object, or a complex number array. Value: `%s`.', value ) );\n\n\t/* eslint-enable no-underscore-dangle */\n});\n\n\n// EXPORTS //\n\nexport default Complex64Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Returns the real component of a double-precision complex floating-point number.\n*\n* @param {Complex} z - complex number\n* @returns {number} real component\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n*\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var re = real( z );\n* // returns 5.0\n*/\nfunction real( z ) {\n\treturn z.re;\n}\n\n\n// EXPORTS //\n\nexport default real;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Returns the imaginary component of a double-precision complex floating-point number.\n*\n* @param {Complex} z - complex number\n* @returns {number} imaginary component\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n*\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var im = imag( z );\n* // returns 3.0\n*/\nfunction imag( z ) {\n\treturn z.im;\n}\n\n\n// EXPORTS //\n\nexport default imag;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isArrayLikeObject from '@stdlib/assert-is-array-like-object';\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport format from '@stdlib/string-format';\nimport real from '@stdlib/complex-real';\nimport imag from '@stdlib/complex-imag';\n\n\n// MAIN //\n\n/**\n* Returns an array of iterated values.\n*\n* @private\n* @param {Object} it - iterator\n* @returns {(Array|TypeError)} array or an error\n*/\nfunction fromIterator( it ) {\n\tvar out;\n\tvar v;\n\tvar z;\n\n\tout = [];\n\twhile ( true ) {\n\t\tv = it.next();\n\t\tif ( v.done ) {\n\t\t\tbreak;\n\t\t}\n\t\tz = v.value;\n\t\tif ( isArrayLikeObject( z ) && z.length >= 2 ) {\n\t\t\tout.push( z[ 0 ], z[ 1 ] );\n\t\t} else if ( isComplexLike( z ) ) {\n\t\t\tout.push( real( z ), imag( z ) );\n\t\t} else {\n\t\t\treturn new TypeError( format( 'invalid argument. An iterator must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', z ) );\n\t\t}\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default fromIterator;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isArrayLikeObject from '@stdlib/assert-is-array-like-object';\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport format from '@stdlib/string-format';\nimport real from '@stdlib/complex-real';\nimport imag from '@stdlib/complex-imag';\n\n\n// MAIN //\n\n/**\n* Returns an array of iterated values.\n*\n* @private\n* @param {Object} it - iterator\n* @param {Function} clbk - callback to invoke for each iterated value\n* @param {*} thisArg - invocation context\n* @returns {(Array|TypeError)} array or an error\n*/\nfunction fromIteratorMap( it, clbk, thisArg ) {\n\tvar out;\n\tvar v;\n\tvar z;\n\tvar i;\n\n\tout = [];\n\ti = -1;\n\twhile ( true ) {\n\t\tv = it.next();\n\t\tif ( v.done ) {\n\t\t\tbreak;\n\t\t}\n\t\ti += 1;\n\t\tz = clbk.call( thisArg, v.value, i );\n\t\tif ( isArrayLikeObject( z ) && z.length >= 2 ) {\n\t\t\tout.push( z[ 0 ], z[ 1 ] );\n\t\t} else if ( isComplexLike( z ) ) {\n\t\t\tout.push( real( z ), imag( z ) );\n\t\t} else {\n\t\t\treturn new TypeError( format( 'invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', z ) );\n\t\t}\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default fromIteratorMap;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport real from '@stdlib/complex-real';\nimport imag from '@stdlib/complex-imag';\n\n\n// MAIN //\n\n/**\n* Returns a strided array of real and imaginary components.\n*\n* @private\n* @param {Float64Array} buf - output array\n* @param {Array} arr - array containing complex numbers\n* @returns {(Float64Array|null)} output array or null\n*/\nfunction fromArray( buf, arr ) {\n\tvar len;\n\tvar v;\n\tvar i;\n\tvar j;\n\n\tlen = arr.length;\n\tj = 0;\n\tfor ( i = 0; i < len; i++ ) {\n\t\tv = arr[ i ];\n\t\tif ( !isComplexLike( v ) ) {\n\t\t\treturn null;\n\t\t}\n\t\tbuf[ j ] = real( v );\n\t\tbuf[ j+1 ] = imag( v );\n\t\tj += 2; // stride\n\t}\n\treturn buf;\n}\n\n\n// EXPORTS //\n\nexport default fromArray;\n","/* eslint-disable no-restricted-syntax, max-lines, no-invalid-this */\n\n/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isNonNegativeInteger } from '@stdlib/assert-is-nonnegative-integer';\nimport isArrayLikeObject from '@stdlib/assert-is-array-like-object';\nimport isCollection from '@stdlib/assert-is-collection';\nimport isArrayBuffer from '@stdlib/assert-is-arraybuffer';\nimport isObject from '@stdlib/assert-is-object';\nimport isArray from '@stdlib/assert-is-array';\nimport isFunction from '@stdlib/assert-is-function';\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport isEven from '@stdlib/math-base-assert-is-even';\nimport isInteger from '@stdlib/math-base-assert-is-integer';\nimport hasIteratorSymbolSupport from '@stdlib/assert-has-iterator-symbol-support';\nimport ITERATOR_SYMBOL from '@stdlib/symbol-iterator';\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport setReadOnlyAccessor from '@stdlib/utils-define-nonenumerable-read-only-accessor';\nimport Float64Array from '@stdlib/array-float64';\nimport Complex128 from '@stdlib/complex-float64';\nimport real from '@stdlib/complex-real';\nimport imag from '@stdlib/complex-imag';\nimport reinterpret64 from '@stdlib/strided-base-reinterpret-complex64';\nimport reinterpret128 from '@stdlib/strided-base-reinterpret-complex128';\nimport getter from '@stdlib/array-base-getter';\nimport accessorGetter from '@stdlib/array-base-accessor-getter';\nimport format from '@stdlib/string-format';\nimport fromIterator from './from_iterator.js';\nimport fromIteratorMap from './from_iterator_map.js';\nimport fromArray from './from_array.js';\n\n\n// VARIABLES //\n\nvar BYTES_PER_ELEMENT = Float64Array.BYTES_PER_ELEMENT * 2;\nvar HAS_ITERATOR_SYMBOL = hasIteratorSymbolSupport();\n\n\n// FUNCTIONS //\n\n/**\n* Returns a boolean indicating if a value is a complex typed array.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a complex typed array\n*/\nfunction isComplexArray( value ) {\n\treturn (\n\t\tvalue instanceof Complex128Array ||\n\t\t(\n\t\t\ttypeof value === 'object' &&\n\t\t\tvalue !== null &&\n\t\t\t(\n\t\t\t\tvalue.constructor.name === 'Complex64Array' ||\n\t\t\t\tvalue.constructor.name === 'Complex128Array'\n\t\t\t) &&\n\t\t\ttypeof value._length === 'number' && // eslint-disable-line no-underscore-dangle\n\n\t\t\t// NOTE: we don't perform a more rigorous test here for a typed array for performance reasons, as robustly checking for a typed array instance could require walking the prototype tree and performing relatively expensive constructor checks...\n\t\t\ttypeof value._buffer === 'object' // eslint-disable-line no-underscore-dangle\n\t\t)\n\t);\n}\n\n/**\n* Returns a boolean indicating if a value is a complex typed array constructor.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a complex typed array constructor\n*/\nfunction isComplexArrayConstructor( value ) {\n\treturn (\n\t\tvalue === Complex128Array ||\n\n\t\t// NOTE: weaker test in order to avoid a circular dependency with Complex64Array...\n\t\tvalue.name === 'Complex64Array'\n\t);\n}\n\n/**\n* Returns a boolean indicating if a value is a `Complex64Array`.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a `Complex64Array`\n*/\nfunction isComplex64Array( value ) {\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\tvalue.constructor.name === 'Complex64Array' &&\n\t\tvalue.BYTES_PER_ELEMENT === BYTES_PER_ELEMENT/2\n\t);\n}\n\n/**\n* Returns a boolean indicating if a value is a `Complex128Array`.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a `Complex128Array`\n*/\nfunction isComplex128Array( value ) {\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\tvalue.constructor.name === 'Complex128Array' &&\n\t\tvalue.BYTES_PER_ELEMENT === BYTES_PER_ELEMENT\n\t);\n}\n\n\n// MAIN //\n\n/**\n* 128-bit complex number array constructor.\n*\n* @constructor\n* @param {(NonNegativeInteger|Collection|ArrayBuffer|Iterable)} [arg] - length, typed array, array-like object, buffer, or iterable\n* @param {NonNegativeInteger} [byteOffset=0] - byte offset\n* @param {NonNegativeInteger} [length] - view length\n* @throws {RangeError} ArrayBuffer byte length must be a multiple of `16`\n* @throws {RangeError} array-like object and typed array input arguments must have a length which is a multiple of two\n* @throws {TypeError} if provided only a single argument, must provide a valid argument\n* @throws {TypeError} byte offset must be a nonnegative integer\n* @throws {RangeError} byte offset must be a multiple of `16`\n* @throws {TypeError} view length must be a positive multiple of `16`\n* @throws {RangeError} must provide sufficient memory to accommodate byte offset and view length requirements\n* @throws {TypeError} an iterator must return either a two element array containing real and imaginary components or a complex number\n* @returns {Complex128Array} complex number array\n*\n* @example\n* var arr = new Complex128Array();\n* // returns \n*\n* var len = arr.length;\n* // returns 0\n*\n* @example\n* var arr = new Complex128Array( 2 );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*\n* @example\n* var arr = new Complex128Array( [ 1.0, -1.0 ] );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* import ArrayBuffer from '@stdlib/array-buffer';\n*\n* var buf = new ArrayBuffer( 32 );\n* var arr = new Complex128Array( buf );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*\n* @example\n* import ArrayBuffer from '@stdlib/array-buffer';\n*\n* var buf = new ArrayBuffer( 32 );\n* var arr = new Complex128Array( buf, 16 );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* import ArrayBuffer from '@stdlib/array-buffer';\n*\n* var buf = new ArrayBuffer( 64 );\n* var arr = new Complex128Array( buf, 16, 2 );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*/\nfunction Complex128Array() {\n\tvar byteOffset;\n\tvar nargs;\n\tvar buf;\n\tvar len;\n\n\tnargs = arguments.length;\n\tif ( !(this instanceof Complex128Array) ) {\n\t\tif ( nargs === 0 ) {\n\t\t\treturn new Complex128Array();\n\t\t}\n\t\tif ( nargs === 1 ) {\n\t\t\treturn new Complex128Array( arguments[0] );\n\t\t}\n\t\tif ( nargs === 2 ) {\n\t\t\treturn new Complex128Array( arguments[0], arguments[1] );\n\t\t}\n\t\treturn new Complex128Array( arguments[0], arguments[1], arguments[2] );\n\t}\n\t// Create the underlying data buffer...\n\tif ( nargs === 0 ) {\n\t\tbuf = new Float64Array( 0 ); // backward-compatibility\n\t} else if ( nargs === 1 ) {\n\t\tif ( isNonNegativeInteger( arguments[0] ) ) {\n\t\t\tbuf = new Float64Array( arguments[0]*2 );\n\t\t} else if ( isCollection( arguments[0] ) ) {\n\t\t\tbuf = arguments[ 0 ];\n\t\t\tlen = buf.length;\n\n\t\t\t// If provided a \"generic\" array, peak at the first value, and, if the value is a complex number, try to process as an array of complex numbers, falling back to \"normal\" typed array initialization if we fail and ensuring consistency if the first value had not been a complex number...\n\t\t\tif ( len && isArray( buf ) && isComplexLike( buf[0] ) ) {\n\t\t\t\tbuf = fromArray( new Float64Array( len*2 ), buf );\n\t\t\t\tif ( buf === null ) {\n\t\t\t\t\t// We failed and we are now forced to allocate a new array :-(\n\t\t\t\t\tif ( !isEven( len ) ) {\n\t\t\t\t\t\tthrow new RangeError( format( 'invalid argument. Array-like object arguments must have a length which is a multiple of two. Length: `%u`.', len ) );\n\t\t\t\t\t}\n\t\t\t\t\t// We failed, so fall back to directly setting values...\n\t\t\t\t\tbuf = new Float64Array( arguments[0] );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ( isComplex64Array( buf ) ) {\n\t\t\t\t\tbuf = reinterpret64( buf, 0 );\n\t\t\t\t} else if ( isComplex128Array( buf ) ) {\n\t\t\t\t\tbuf = reinterpret128( buf, 0 );\n\t\t\t\t} else if ( !isEven( len ) ) {\n\t\t\t\t\tthrow new RangeError( format( 'invalid argument. Array-like object and typed array arguments must have a length which is a multiple of two. Length: `%u`.', len ) );\n\t\t\t\t}\n\t\t\t\tbuf = new Float64Array( buf );\n\t\t\t}\n\t\t} else if ( isArrayBuffer( arguments[0] ) ) {\n\t\t\tbuf = arguments[ 0 ];\n\t\t\tif ( !isInteger( buf.byteLength/BYTES_PER_ELEMENT ) ) {\n\t\t\t\tthrow new RangeError( format( 'invalid argument. ArrayBuffer byte length must be a multiple of %u. Byte length: `%u`.', BYTES_PER_ELEMENT, buf.byteLength ) );\n\t\t\t}\n\t\t\tbuf = new Float64Array( buf );\n\t\t} else if ( isObject( arguments[0] ) ) {\n\t\t\tbuf = arguments[ 0 ];\n\t\t\tif ( HAS_ITERATOR_SYMBOL === false ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Environment lacks Symbol.iterator support. Must provide a length, ArrayBuffer, typed array, or array-like object. Value: `%s`.', buf ) );\n\t\t\t}\n\t\t\tif ( !isFunction( buf[ ITERATOR_SYMBOL ] ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.', buf ) );\n\t\t\t}\n\t\t\tbuf = buf[ ITERATOR_SYMBOL ]();\n\t\t\tif ( !isFunction( buf.next ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.', buf ) );\n\t\t\t}\n\t\t\tbuf = fromIterator( buf );\n\t\t\tif ( buf instanceof Error ) {\n\t\t\t\tthrow buf;\n\t\t\t}\n\t\t\tbuf = new Float64Array( buf );\n\t\t} else {\n\t\t\tthrow new TypeError( format( 'invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.', arguments[0] ) );\n\t\t}\n\t} else {\n\t\tbuf = arguments[ 0 ];\n\t\tif ( !isArrayBuffer( buf ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. First argument must be an ArrayBuffer. Value: `%s`.', buf ) );\n\t\t}\n\t\tbyteOffset = arguments[ 1 ];\n\t\tif ( !isNonNegativeInteger( byteOffset ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Byte offset must be a nonnegative integer. Value: `%s`.', byteOffset ) );\n\t\t}\n\t\tif ( !isInteger( byteOffset/BYTES_PER_ELEMENT ) ) {\n\t\t\tthrow new RangeError( format( 'invalid argument. Byte offset must be a multiple of %u. Value: `%u`.', BYTES_PER_ELEMENT, byteOffset ) );\n\t\t}\n\t\tif ( nargs === 2 ) {\n\t\t\tlen = buf.byteLength - byteOffset;\n\t\t\tif ( !isInteger( len/BYTES_PER_ELEMENT ) ) {\n\t\t\t\tthrow new RangeError( format( 'invalid arguments. ArrayBuffer view byte length must be a multiple of %u. View byte length: `%u`.', BYTES_PER_ELEMENT, len ) );\n\t\t\t}\n\t\t\tbuf = new Float64Array( buf, byteOffset );\n\t\t} else {\n\t\t\tlen = arguments[ 2 ];\n\t\t\tif ( !isNonNegativeInteger( len ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Length must be a nonnegative integer. Value: `%s`.', len ) );\n\t\t\t}\n\t\t\tif ( (len*BYTES_PER_ELEMENT) > (buf.byteLength-byteOffset) ) {\n\t\t\t\tthrow new RangeError( format( 'invalid arguments. ArrayBuffer has insufficient capacity. Either decrease the array length or provide a bigger buffer. Minimum capacity: `%u`.', len*BYTES_PER_ELEMENT ) );\n\t\t\t}\n\t\t\tbuf = new Float64Array( buf, byteOffset, len*2 );\n\t\t}\n\t}\n\tsetReadOnly( this, '_buffer', buf );\n\tsetReadOnly( this, '_length', buf.length/2 );\n\n\treturn this;\n}\n\n/**\n* Size (in bytes) of each array element.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex128Array\n* @readonly\n* @type {PositiveInteger}\n* @default 16\n*\n* @example\n* var nbytes = Complex128Array.BYTES_PER_ELEMENT;\n* // returns 16\n*/\nsetReadOnly( Complex128Array, 'BYTES_PER_ELEMENT', BYTES_PER_ELEMENT );\n\n/**\n* Constructor name.\n*\n* @name name\n* @memberof Complex128Array\n* @readonly\n* @type {string}\n* @default 'Complex128Array'\n*\n* @example\n* var name = Complex128Array.name;\n* // returns 'Complex128Array'\n*/\nsetReadOnly( Complex128Array, 'name', 'Complex128Array' );\n\n/**\n* Creates a new 128-bit complex number array from an array-like object or an iterable.\n*\n* @name from\n* @memberof Complex128Array\n* @type {Function}\n* @param {(Collection|Object)} src - array-like object or iterable\n* @param {Function} [clbk] - callback to invoke for each source element\n* @param {*} [thisArg] - context\n* @throws {TypeError} `this` context must be a constructor\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be an array-like object or an iterable\n* @throws {TypeError} second argument must be a function\n* @throws {RangeError} array-like objects must have a length which is a multiple of two\n* @throws {TypeError} an iterator must return either a two element array containing real and imaginary components or a complex number\n* @throws {TypeError} when provided an iterator, a callback must return either a two element array containing real and imaginary components or a complex number\n* @returns {Complex128Array} 128-bit complex number array\n*\n* @example\n* var arr = Complex128Array.from( [ 1.0, -1.0 ] );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n*\n* var arr = Complex128Array.from( [ new Complex128( 1.0, 1.0 ) ] );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* function clbk( v ) {\n* return new Complex128( real(v)*2.0, imag(v)*2.0 );\n* }\n*\n* var arr = Complex128Array.from( [ new Complex128( 1.0, 1.0 ) ], clbk );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*/\nsetReadOnly( Complex128Array, 'from', function from( src ) {\n\tvar thisArg;\n\tvar nargs;\n\tvar clbk;\n\tvar out;\n\tvar buf;\n\tvar tmp;\n\tvar get;\n\tvar len;\n\tvar flg;\n\tvar v;\n\tvar i;\n\tvar j;\n\tif ( !isFunction( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` context must be a constructor.' );\n\t}\n\tif ( !isComplexArrayConstructor( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tnargs = arguments.length;\n\tif ( nargs > 1 ) {\n\t\tclbk = arguments[ 1 ];\n\t\tif ( !isFunction( clbk ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be a function. Value: `%s`.', clbk ) );\n\t\t}\n\t\tif ( nargs > 2 ) {\n\t\t\tthisArg = arguments[ 2 ];\n\t\t}\n\t}\n\tif ( isComplexArray( src ) ) {\n\t\tlen = src.length;\n\t\tif ( clbk ) {\n\t\t\tout = new this( len );\n\t\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\t\tj = 0;\n\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\tv = clbk.call( thisArg, src.get( i ), i );\n\t\t\t\tif ( isComplexLike( v ) ) {\n\t\t\t\t\tbuf[ j ] = real( v );\n\t\t\t\t\tbuf[ j+1 ] = imag( v );\n\t\t\t\t} else if ( isArrayLikeObject( v ) && v.length >= 2 ) {\n\t\t\t\t\tbuf[ j ] = v[ 0 ];\n\t\t\t\t\tbuf[ j+1 ] = v[ 1 ];\n\t\t\t\t} else {\n\t\t\t\t\tthrow new TypeError( format( 'invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', v ) );\n\t\t\t\t}\n\t\t\t\tj += 2; // stride\n\t\t\t}\n\t\t\treturn out;\n\t\t}\n\t\treturn new this( src );\n\t}\n\tif ( isCollection( src ) ) {\n\t\tif ( clbk ) {\n\t\t\t// Note: array contents affect how we iterate over a provided data source. If only complex number objects, we can extract real and imaginary components. Otherwise, for non-complex number arrays (e.g., `Float64Array`, etc), we assume a strided array where real and imaginary components are interleaved. In the former case, we expect a callback to return real and imaginary components (possibly as a complex number). In the latter case, we expect a callback to return *either* a real or imaginary component.\n\n\t\t\tlen = src.length;\n\t\t\tif ( src.get && src.set ) {\n\t\t\t\tget = accessorGetter( 'default' );\n\t\t\t} else {\n\t\t\t\tget = getter( 'default' );\n\t\t\t}\n\t\t\t// Detect whether we've been provided an array which returns complex number objects...\n\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\tif ( !isComplexLike( get( src, i ) ) ) {\n\t\t\t\t\tflg = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// If an array does not contain only complex number objects, then we assume interleaved real and imaginary components...\n\t\t\tif ( flg ) {\n\t\t\t\tif ( !isEven( len ) ) {\n\t\t\t\t\tthrow new RangeError( format( 'invalid argument. First argument must have a length which is a multiple of two. Length: `%u`.', len ) );\n\t\t\t\t}\n\t\t\t\tout = new this( len/2 );\n\t\t\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\t\tbuf[ i ] = clbk.call( thisArg, get( src, i ), i );\n\t\t\t\t}\n\t\t\t\treturn out;\n\t\t\t}\n\t\t\t// If an array contains only complex number objects, then we need to extract real and imaginary components...\n\t\t\tout = new this( len );\n\t\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\t\tj = 0;\n\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\tv = clbk.call( thisArg, get( src, i ), i );\n\t\t\t\tif ( isComplexLike( v ) ) {\n\t\t\t\t\tbuf[ j ] = real( v );\n\t\t\t\t\tbuf[ j+1 ] = imag( v );\n\t\t\t\t} else if ( isArrayLikeObject( v ) && v.length >= 2 ) {\n\t\t\t\t\tbuf[ j ] = v[ 0 ];\n\t\t\t\t\tbuf[ j+1 ] = v[ 1 ];\n\t\t\t\t} else {\n\t\t\t\t\tthrow new TypeError( format( 'invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', v ) );\n\t\t\t\t}\n\t\t\t\tj += 2; // stride\n\t\t\t}\n\t\t\treturn out;\n\t\t}\n\t\treturn new this( src );\n\t}\n\tif ( isObject( src ) && HAS_ITERATOR_SYMBOL && isFunction( src[ ITERATOR_SYMBOL ] ) ) { // eslint-disable-line max-len\n\t\tbuf = src[ ITERATOR_SYMBOL ]();\n\t\tif ( !isFunction( buf.next ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.', src ) );\n\t\t}\n\t\tif ( clbk ) {\n\t\t\ttmp = fromIteratorMap( buf, clbk, thisArg );\n\t\t} else {\n\t\t\ttmp = fromIterator( buf );\n\t\t}\n\t\tif ( tmp instanceof Error ) {\n\t\t\tthrow tmp;\n\t\t}\n\t\tlen = tmp.length / 2;\n\t\tout = new this( len );\n\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\tbuf[ i ] = tmp[ i ];\n\t\t}\n\t\treturn out;\n\t}\n\tthrow new TypeError( format( 'invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.', src ) );\n});\n\n/**\n* Creates a new 128-bit complex number array from a variable number of arguments.\n*\n* @name of\n* @memberof Complex128Array\n* @type {Function}\n* @param {...*} element - array elements\n* @throws {TypeError} `this` context must be a constructor\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Complex128Array} 128-bit complex number array\n*\n* @example\n* var arr = Complex128Array.of( 1.0, 1.0, 1.0, 1.0 );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*/\nsetReadOnly( Complex128Array, 'of', function of() {\n\tvar args;\n\tvar i;\n\tif ( !isFunction( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` context must be a constructor.' );\n\t}\n\tif ( !isComplexArrayConstructor( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\targs = [];\n\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\targs.push( arguments[ i ] );\n\t}\n\treturn new this( args );\n});\n\n/**\n* Pointer to the underlying data buffer.\n*\n* @name buffer\n* @memberof Complex128Array.prototype\n* @readonly\n* @type {ArrayBuffer}\n*\n* @example\n* var arr = new Complex128Array( 10 );\n*\n* var buf = arr.buffer;\n* // returns \n*/\nsetReadOnlyAccessor( Complex128Array.prototype, 'buffer', function get() {\n\treturn this._buffer.buffer;\n});\n\n/**\n* Size (in bytes) of the array.\n*\n* @name byteLength\n* @memberof Complex128Array.prototype\n* @readonly\n* @type {NonNegativeInteger}\n*\n* @example\n* var arr = new Complex128Array( 10 );\n*\n* var byteLength = arr.byteLength;\n* // returns 160\n*/\nsetReadOnlyAccessor( Complex128Array.prototype, 'byteLength', function get() {\n\treturn this._buffer.byteLength;\n});\n\n/**\n* Offset (in bytes) of the array from the start of its underlying `ArrayBuffer`.\n*\n* @name byteOffset\n* @memberof Complex128Array.prototype\n* @readonly\n* @type {NonNegativeInteger}\n*\n* @example\n* var arr = new Complex128Array( 10 );\n*\n* var byteOffset = arr.byteOffset;\n* // returns 0\n*/\nsetReadOnlyAccessor( Complex128Array.prototype, 'byteOffset', function get() {\n\treturn this._buffer.byteOffset;\n});\n\n/**\n* Size (in bytes) of each array element.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex128Array.prototype\n* @readonly\n* @type {PositiveInteger}\n* @default 16\n*\n* @example\n* var arr = new Complex128Array( 10 );\n*\n* var nbytes = arr.BYTES_PER_ELEMENT;\n* // returns 16\n*/\nsetReadOnly( Complex128Array.prototype, 'BYTES_PER_ELEMENT', Complex128Array.BYTES_PER_ELEMENT );\n\n/**\n* Copies a sequence of elements within the array to the position starting at `target`.\n*\n* @name copyWithin\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {integer} target - index at which to start copying elements\n* @param {integer} start - source index at which to copy elements from\n* @param {integer} [end] - source index at which to stop copying elements from\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Complex128Array} modified array\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* var arr = new Complex128Array( 4 );\n*\n* // Set the array elements:\n* arr.set( new Complex128( 1.0, 1.0 ), 0 );\n* arr.set( new Complex128( 2.0, 2.0 ), 1 );\n* arr.set( new Complex128( 3.0, 3.0 ), 2 );\n* arr.set( new Complex128( 4.0, 4.0 ), 3 );\n*\n* // Copy the first two elements to the last two elements:\n* arr.copyWithin( 2, 0, 2 );\n*\n* // Get the last array element:\n* var z = arr.get( 3 );\n*\n* var re = real( z );\n* // returns 2.0\n*\n* var im = imag( z );\n* // returns 2.0\n*/\nsetReadOnly( Complex128Array.prototype, 'copyWithin', function copyWithin( target, start ) {\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\t// FIXME: prefer a functional `copyWithin` implementation which addresses lack of universal browser support (e.g., IE11 and Safari) or ensure that typed arrays are polyfilled\n\tif ( arguments.length === 2 ) {\n\t\tthis._buffer.copyWithin( target*2, start*2 );\n\t} else {\n\t\tthis._buffer.copyWithin( target*2, start*2, arguments[2]*2 );\n\t}\n\treturn this;\n});\n\n/**\n* Returns an iterator for iterating over array key-value pairs.\n*\n* @name entries\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Iterator} iterator\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n*\n* var arr = [\n* new Complex128( 1.0, 1.0 ),\n* new Complex128( 2.0, 2.0 ),\n* new Complex128( 3.0, 3.0 )\n* ];\n* arr = new Complex128Array( arr );\n*\n* // Create an iterator:\n* var it = arr.entries();\n*\n* // Iterate over the key-value pairs...\n* var v = it.next().value;\n* // returns [ 0, ]\n*\n* v = it.next().value;\n* // returns [ 1, ]\n*\n* v = it.next().value;\n* // returns [ 2, ]\n*\n* var bool = it.next().done;\n* // returns true\n*/\nsetReadOnly( Complex128Array.prototype, 'entries', function entries() {\n\tvar buffer;\n\tvar self;\n\tvar iter;\n\tvar len;\n\tvar FLG;\n\tvar i;\n\tvar j;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tself = this;\n\tbuffer = this._buffer;\n\tlen = this._length;\n\n\t// Initialize the iteration indices:\n\ti = -1;\n\tj = -2;\n\n\t// Create an iterator protocol-compliant object:\n\titer = {};\n\tsetReadOnly( iter, 'next', next );\n\tsetReadOnly( iter, 'return', end );\n\n\tif ( ITERATOR_SYMBOL ) {\n\t\tsetReadOnly( iter, ITERATOR_SYMBOL, factory );\n\t}\n\treturn iter;\n\n\t/**\n\t* Returns an iterator protocol-compliant object containing the next iterated value.\n\t*\n\t* @private\n\t* @returns {Object} iterator protocol-compliant object\n\t*/\n\tfunction next() {\n\t\tvar z;\n\t\ti += 1;\n\t\tif ( FLG || i >= len ) {\n\t\t\treturn {\n\t\t\t\t'done': true\n\t\t\t};\n\t\t}\n\t\tj += 2;\n\t\tz = new Complex128( buffer[ j ], buffer[ j+1 ] );\n\t\treturn {\n\t\t\t'value': [ i, z ],\n\t\t\t'done': false\n\t\t};\n\t}\n\n\t/**\n\t* Finishes an iterator.\n\t*\n\t* @private\n\t* @param {*} [value] - value to return\n\t* @returns {Object} iterator protocol-compliant object\n\t*/\n\tfunction end( value ) {\n\t\tFLG = true;\n\t\tif ( arguments.length ) {\n\t\t\treturn {\n\t\t\t\t'value': value,\n\t\t\t\t'done': true\n\t\t\t};\n\t\t}\n\t\treturn {\n\t\t\t'done': true\n\t\t};\n\t}\n\n\t/**\n\t* Returns a new iterator.\n\t*\n\t* @private\n\t* @returns {Iterator} iterator\n\t*/\n\tfunction factory() {\n\t\treturn self.entries();\n\t}\n});\n\n/**\n* Returns an array element.\n*\n* @name get\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {NonNegativeInteger} idx - element index\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} must provide a nonnegative integer\n* @returns {(Complex128|void)} array element\n*\n* @example\n* var arr = new Complex128Array( 10 );\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* var z = arr.get( 0 );\n* // returns \n*\n* var re = real( z );\n* // returns 0.0\n*\n* var im = imag( z );\n* // returns 0.0\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n*\n* z = arr.get( 0 );\n* // returns \n*\n* re = real( z );\n* // returns 1.0\n*\n* im = imag( z );\n* // returns -1.0\n*\n* z = arr.get( 100 );\n* // returns undefined\n*/\nsetReadOnly( Complex128Array.prototype, 'get', function get( idx ) {\n\tvar buf;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isNonNegativeInteger( idx ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Must provide a nonnegative integer. Value: `%s`.', idx ) );\n\t}\n\tif ( idx >= this._length ) {\n\t\treturn;\n\t}\n\tbuf = this._buffer;\n\tidx *= 2;\n\treturn new Complex128( buf[ idx ], buf[ idx+1 ] );\n});\n\n/**\n* Number of array elements.\n*\n* @name length\n* @memberof Complex128Array.prototype\n* @readonly\n* @type {NonNegativeInteger}\n*\n* @example\n* var arr = new Complex128Array( 10 );\n*\n* var len = arr.length;\n* // returns 10\n*/\nsetReadOnlyAccessor( Complex128Array.prototype, 'length', function get() {\n\treturn this._length;\n});\n\n/**\n* Sets an array element.\n*\n* ## Notes\n*\n* - When provided a typed array, real or complex, we must check whether the source array shares the same buffer as the target array and whether the underlying memory overlaps. In particular, we are concerned with the following scenario:\n*\n* ```text\n* buf: ---------------------\n* src: ---------------------\n* ```\n*\n* In the above, as we copy values from `src`, we will overwrite values in the `src` view, resulting in duplicated values copied into the end of `buf`, which is not intended. Hence, to avoid overwriting source values, we must **copy** source values to a temporary array.\n*\n* In the other overlapping scenario,\n*\n* ```text\n* buf: ---------------------\n* src: ---------------------\n* ```\n*\n* by the time we begin copying into the overlapping region, we are copying from the end of `src`, a non-overlapping region, which means we don't run the risk of copying copied values, rather than the original `src` values as intended.\n*\n*\n* @name set\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {(Collection|Complex|ComplexArray)} value - value(s)\n* @param {NonNegativeInteger} [i=0] - element index at which to start writing values\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be either a complex number, an array-like object, or a complex number array\n* @throws {TypeError} index argument must be a nonnegative integer\n* @throws {RangeError} array-like objects must have a length which is a multiple of two\n* @throws {RangeError} index argument is out-of-bounds\n* @throws {RangeError} target array lacks sufficient storage to accommodate source values\n* @returns {void}\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* var arr = new Complex128Array( 10 );\n*\n* var z = arr.get( 0 );\n* // returns \n*\n* var re = real( z );\n* // returns 0.0\n*\n* var im = imag( z );\n* // returns 0.0\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n*\n* z = arr.get( 0 );\n* // returns \n*\n* re = real( z );\n* // returns 1.0\n*\n* im = imag( z );\n* // returns -1.0\n*/\nsetReadOnly( Complex128Array.prototype, 'set', function set( value ) {\n\t/* eslint-disable no-underscore-dangle */\n\tvar sbuf;\n\tvar idx;\n\tvar buf;\n\tvar tmp;\n\tvar flg;\n\tvar N;\n\tvar v;\n\tvar i;\n\tvar j;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tbuf = this._buffer;\n\tif ( arguments.length > 1 ) {\n\t\tidx = arguments[ 1 ];\n\t\tif ( !isNonNegativeInteger( idx ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Index argument must be a nonnegative integer. Value: `%s`.', idx ) );\n\t\t}\n\t} else {\n\t\tidx = 0;\n\t}\n\tif ( isComplexLike( value ) ) {\n\t\tif ( idx >= this._length ) {\n\t\t\tthrow new RangeError( format( 'invalid argument. Index argument is out-of-bounds. Value: `%u`.', idx ) );\n\t\t}\n\t\tidx *= 2;\n\t\tbuf[ idx ] = real( value );\n\t\tbuf[ idx+1 ] = imag( value );\n\t\treturn;\n\t}\n\tif ( isComplexArray( value ) ) {\n\t\tN = value._length;\n\t\tif ( idx+N > this._length ) {\n\t\t\tthrow new RangeError( 'invalid arguments. Target array lacks sufficient storage to accommodate source values.' );\n\t\t}\n\t\tsbuf = value._buffer;\n\n\t\t// Check for overlapping memory...\n\t\tj = buf.byteOffset + (idx*BYTES_PER_ELEMENT);\n\t\tif (\n\t\t\tsbuf.buffer === buf.buffer &&\n\t\t\t(\n\t\t\t\tsbuf.byteOffset < j &&\n\t\t\t\tsbuf.byteOffset+sbuf.byteLength > j\n\t\t\t)\n\t\t) {\n\t\t\t// We need to copy source values...\n\t\t\ttmp = new Float64Array( sbuf.length );\n\t\t\tfor ( i = 0; i < sbuf.length; i++ ) {\n\t\t\t\ttmp[ i ] = sbuf[ i ];\n\t\t\t}\n\t\t\tsbuf = tmp;\n\t\t}\n\t\tidx *= 2;\n\t\tj = 0;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\tbuf[ idx ] = sbuf[ j ];\n\t\t\tbuf[ idx+1 ] = sbuf[ j+1 ];\n\t\t\tidx += 2; // stride\n\t\t\tj += 2; // stride\n\t\t}\n\t\treturn;\n\t}\n\tif ( isCollection( value ) ) {\n\t\t// Detect whether we've been provided an array of complex numbers...\n\t\tN = value.length;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\tif ( !isComplexLike( value[ i ] ) ) {\n\t\t\t\tflg = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t// If an array does not contain only complex numbers, then we assume interleaved real and imaginary components...\n\t\tif ( flg ) {\n\t\t\tif ( !isEven( N ) ) {\n\t\t\t\tthrow new RangeError( format( 'invalid argument. Array-like object arguments must have a length which is a multiple of two. Length: `%u`.', N ) );\n\t\t\t}\n\t\t\tif ( idx+(N/2) > this._length ) {\n\t\t\t\tthrow new RangeError( 'invalid arguments. Target array lacks sufficient storage to accommodate source values.' );\n\t\t\t}\n\t\t\tsbuf = value;\n\n\t\t\t// Check for overlapping memory...\n\t\t\tj = buf.byteOffset + (idx*BYTES_PER_ELEMENT);\n\t\t\tif (\n\t\t\t\tsbuf.buffer === buf.buffer &&\n\t\t\t\t(\n\t\t\t\t\tsbuf.byteOffset < j &&\n\t\t\t\t\tsbuf.byteOffset+sbuf.byteLength > j\n\t\t\t\t)\n\t\t\t) {\n\t\t\t\t// We need to copy source values...\n\t\t\t\ttmp = new Float64Array( N );\n\t\t\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\t\t\ttmp[ i ] = sbuf[ i ];\n\t\t\t\t}\n\t\t\t\tsbuf = tmp;\n\t\t\t}\n\t\t\tidx *= 2;\n\t\t\tN /= 2;\n\t\t\tj = 0;\n\t\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\t\tbuf[ idx ] = sbuf[ j ];\n\t\t\t\tbuf[ idx+1 ] = sbuf[ j+1 ];\n\t\t\t\tidx += 2; // stride\n\t\t\t\tj += 2; // stride\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\t// If an array contains only complex numbers, then we need to extract real and imaginary components...\n\t\tif ( idx+N > this._length ) {\n\t\t\tthrow new RangeError( 'invalid arguments. Target array lacks sufficient storage to accommodate source values.' );\n\t\t}\n\t\tidx *= 2;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\tv = value[ i ];\n\t\t\tbuf[ idx ] = real( v );\n\t\t\tbuf[ idx+1 ] = imag( v );\n\t\t\tidx += 2; // stride\n\t\t}\n\t\treturn;\n\t}\n\tthrow new TypeError( format( 'invalid argument. First argument must be either a complex number, an array-like object, or a complex number array. Value: `%s`.', value ) );\n\n\t/* eslint-enable no-underscore-dangle */\n});\n\n\n// EXPORTS //\n\nexport default Complex128Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport Float64Array from '@stdlib/array-float64';\nimport Float32Array from '@stdlib/array-float32';\nimport Int16Array from '@stdlib/array-int16';\nimport Int32Array from '@stdlib/array-int32';\nimport Int8Array from '@stdlib/array-int8';\nimport Uint16Array from '@stdlib/array-uint16';\nimport Uint32Array from '@stdlib/array-uint32';\nimport Uint8Array from '@stdlib/array-uint8';\nimport Uint8ClampedArray from '@stdlib/array-uint8c';\nimport Complex64Array from '@stdlib/array-complex64';\nimport Complex128Array from '@stdlib/array-complex128';\n\n\n// MAIN //\n\n// Mapping from data types to constructors...\nvar ctors = {\n\t'float64': Float64Array,\n\t'float32': Float32Array,\n\t'generic': Array, // TODO: replace with `stdlib` pkg\n\t'int16': Int16Array,\n\t'int32': Int32Array,\n\t'int8': Int8Array,\n\t'uint16': Uint16Array,\n\t'uint32': Uint32Array,\n\t'uint8': Uint8Array,\n\t'uint8c': Uint8ClampedArray,\n\t'complex64': Complex64Array,\n\t'complex128': Complex128Array\n};\n\n\n// EXPORTS //\n\nexport default ctors;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport table from './ctors.js';\n\n\n// MAIN //\n\n/**\n* Returns an array constructor.\n*\n* @param {string} dtype - data type\n* @returns {(Function|null)} constructor or null\n*\n* @example\n* var ctor = ctors( 'float64' );\n* // returns \n*\n* @example\n* var ctor = ctors( 'float' );\n* // returns null\n*/\nfunction ctors( dtype ) {\n\treturn table[ dtype ] || null;\n}\n\n\n// EXPORTS //\n\nexport default ctors;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport filled from '@stdlib/array-base-filled';\n\n\n// MAIN //\n\n/**\n* Returns a zero-filled \"generic\" array.\n*\n* @param {NonNegativeInteger} len - array length\n* @returns {Array} output array\n*\n* @example\n* var out = zeros( 3 );\n* // returns [ 0.0, 0.0, 0.0 ]\n*/\nfunction zeros( len ) {\n\treturn filled( 0.0, len );\n}\n\n\n// EXPORTS //\n\nexport default zeros;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Returns a filled \"generic\" array.\n*\n* @param {*} value - fill value\n* @param {NonNegativeInteger} len - array length\n* @returns {Array} filled array\n*\n* @example\n* var out = filled( 0.0, 3 );\n* // returns [ 0.0, 0.0, 0.0 ]\n*\n* @example\n* var out = filled( 'beep', 3 );\n* // returns [ 'beep', 'beep', 'beep' ]\n*/\nfunction filled( value, len ) {\n\tvar arr;\n\tvar i;\n\n\t// Manually push elements in order to ensure \"fast\" elements...\n\tarr = [];\n\tfor ( i = 0; i < len; i++ ) {\n\t\tarr.push( value );\n\t}\n\treturn arr;\n}\n\n\n// EXPORTS //\n\nexport default filled;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isNonNegativeInteger } from '@stdlib/assert-is-nonnegative-integer';\nimport ctors from '@stdlib/array-ctors';\nimport gzeros from '@stdlib/array-base-zeros';\nimport format from '@stdlib/string-format';\n\n\n// MAIN //\n\n/**\n* Creates a zero-filled array having a specified length.\n*\n* @param {NonNegativeInteger} length - array length\n* @param {string} [dtype=\"float64\"] - data type\n* @throws {TypeError} first argument must be a nonnegative integer\n* @throws {TypeError} second argument must be a recognized data type\n* @returns {(TypedArray|Array|ComplexArray)} array or typed array\n*\n* @example\n* var arr = zeros( 2 );\n* // returns [ 0.0, 0.0 ]\n*\n* @example\n* var arr = zeros( 2, 'float32' );\n* // returns [ 0.0, 0.0 ]\n*/\nfunction zeros( length ) {\n\tvar dtype;\n\tvar ctor;\n\tif ( !isNonNegativeInteger( length ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a nonnegative integer. Value: `%s`.', length ) );\n\t}\n\tif ( arguments.length > 1 ) {\n\t\tdtype = arguments[ 1 ];\n\t} else {\n\t\tdtype = 'float64';\n\t}\n\tif ( dtype === 'generic' ) {\n\t\treturn gzeros( length );\n\t}\n\tctor = ctors( dtype );\n\tif ( ctor === null ) {\n\t\tthrow new TypeError( format( 'invalid argument. Second argument must be a recognized data type. Value: `%s`.', dtype ) );\n\t}\n\treturn new ctor( length ); // WARNING: we assume that, apart from 'generic', the constructors for supported array data types are zero-filled by default\n}\n\n\n// EXPORTS //\n\nexport default zeros;\n","/**\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// MODULES //\n\nimport zeros from '@stdlib/array-zeros';\n\n\n// MAIN //\n\n/**\n* Creates an uninitialized array having a specified length.\n*\n* @private\n* @param {NonNegativeInteger} length - array length\n* @param {string} [dtype=\"float64\"] - data type\n* @throws {TypeError} first argument must be a nonnegative integer\n* @throws {TypeError} second argument must be a recognized data type\n* @returns {(TypedArray|Array|ComplexArray)} array or typed array\n*\n* @example\n* var arr = empty( 2 );\n* // returns \n*\n* @example\n* var arr = empty( 2, 'float32' );\n* // returns \n*/\nfunction empty( length ) {\n\tif ( arguments.length > 1 ) {\n\t\treturn zeros( length, arguments[ 1 ] );\n\t}\n\treturn zeros( length );\n}\n\n\n// EXPORTS //\n\nexport default empty;\n"],"names":["main","Object","defineProperty","isNumber","value","zeros","n","i","out","zeroPad","str","width","right","negative","pad","length","startsWithMinus","substr","lowercase","String","prototype","toLowerCase","uppercase","toUpperCase","formatInteger","token","base","specifier","arg","parseInt","isFinite","Error","toString","precision","padRight","sign","alternate","call","charAt","isString","abs","Math","replace","RE_EXP_POS_DIGITS","RE_EXP_NEG_DIGITS","RE_ONLY_DIGITS","RE_DIGITS_BEFORE_EXP","RE_TRAILING_PERIOD_ZERO","RE_PERIOD_ZERO_EXP","RE_ZERO_BEFORE_EXP","formatDouble","digits","f","parseFloat","toExponential","toFixed","toPrecision","spaces","spacePad","fromCharCode","isnan","isNaN","isArray","Array","initialize","flags","mapping","formatInterpolate","tokens","hasPeriod","flag","num","pos","j","TypeError","padZeros","indexOf","arguments","maxWidth","substring","RE","parse","match","formatTokenize","content","prev","exec","slice","lastIndex","push","format","args","tokenize","interpolate","apply","objectProtoype","toStr","defineGetter","__defineGetter__","defineSetter","__defineSetter__","lookupGetter","__lookupGetter__","lookupSetter","__lookupSetter__","err","hasDefinePropertySupport","builtin","obj","prop","descriptor","hasValue","hasGet","hasSet","__proto__","get","set","defineProperty$1","setNonEnumerableReadOnly","configurable","enumerable","writable","FLG","Symbol","hasToStringTagSupport","toStringTag","has","hasOwnProperty","hasOwnProp","property","Sym","toStrTag","nativeClass","hasToStringTag","v","isOwn","tag","main$b","Number","test","isPrimitive","isObject","setReadOnly","FLOAT64_PINF","POSITIVE_INFINITY","FLOAT64_NINF","NEGATIVE_INFINITY","floor","isInteger","x","PINF","NINF","isInt","valueOf","isNonNegativeInteger","hasFloat64Array","Float64Array","ctor","Float64Array$1","bool","arr","GlobalFloat64Array","NaN","hasFloat64ArraySupport","hasFloat32Array","Float32Array","Float32Array$1","GlobalFloat32Array","hasFloat32ArraySupport","hasInt16Array","Int16Array","Int16Array$1","GlobalInt16Array","INT16_MAX","hasInt16ArraySupport","hasInt32Array","Int32Array","Int32Array$1","GlobalInt32Array","INT32_MAX","hasInt32ArraySupport","hasInt8Array","Int8Array","Int8Array$1","GlobalInt8Array","INT8_MAX","hasInt8ArraySupport","hasUint16Array","Uint16Array","Uint16Array$1","GlobalUint16Array","UINT16_MAX","hasUint16ArraySupport","hasUint32Array","Uint32Array","Uint32Array$1","GlobalUint32Array","UINT32_MAX","hasUint32ArraySupport","hasUint8Array","Uint8Array","Uint8Array$1","GlobalUint8Array","UINT8_MAX","hasUint8ArraySupport","hasUint8ClampedArray","Uint8ClampedArray","Uint8ClampedArray$1","GlobalUint8ClampedArray","hasUint8ClampedArraySupport","isArrayLikeObject","isCollection","hasArrayBuffer","ArrayBuffer","isArrayBuffer","main$1","isBoolean","Bool","Boolean","getGlobal","Function","self","window","global","globalThis","root","codegen","getThis","GlobalThis","Self","Win","Global","nodeList","document","childNodes","typedarray","reFunctionName","RE_FUNCTION_NAME","isObjectLike","constructorName","name","constructor","_isBuffer","isBuffer","REGEXP","predicate","len","arrayfun","ctorName","type","isFunction","typeOf","Complex128","real","imag","this","re","im","fround","FLOAT32_VIEW","float64ToFloat32$1","Complex64","float64ToFloat32","isComplexLike","isEven","hasIteratorSymbolSupport","iterator","IteratorSymbol","setNonEnumerableReadOnlyAccessor","getter","realf","z","imagf","reinterpret","offset","buffer","byteOffset","BYTES_PER_ELEMENT","GETTERS","float64","idx","float32","int32","int16","int8","uint32","uint16","uint8","uint8c","generic","default","dtype","complex128","complex64","fromIterator","it","next","done","fromIteratorMap","clbk","thisArg","fromArray","buf","HAS_ITERATOR_SYMBOL","isComplexArray","Complex64Array","_length","_buffer","isComplexArrayConstructor","isComplex64Array","isComplex128Array","nargs","RangeError","reinterpret64","reinterpret128","byteLength","ITERATOR_SYMBOL","src","tmp","flg","accessorGetter","setReadOnlyAccessor","target","start","copyWithin","iter","entries","sbuf","N","Complex128Array","ctors","table","filled","gzeros","empty"],"mappings":";;AAsBA,IAAIA,EAA0C,mBAA1BC,OAAOC,eAAkCD,OAAOC,eAAiB,KCiCrF,IAAIA,EAAiBD,OAAOC,eCjB5B,SAASC,EAAUC,GAClB,MAA0B,iBAAVA,CACjB,CCAA,SAASC,EAAOC,GACf,IACIC,EADAC,EAAM,GAEV,IAAMD,EAAI,EAAGA,EAAID,EAAGC,IACnBC,GAAO,IAER,OAAOA,CACR,CAcA,SAASC,EAASC,EAAKC,EAAOC,GAC7B,IAAIC,GAAW,EACXC,EAAMH,EAAQD,EAAIK,OACtB,OAAKD,EAAM,IAnCZ,SAA0BJ,GACzB,MAAoB,MAAbA,EAAK,EACb,CAoCMM,CAAiBN,KACrBG,GAAW,EACXH,EAAMA,EAAIO,OAAQ,IAEnBP,EAAM,EACLA,EAAML,EAAOS,GACbT,EAAOS,GAAQJ,EACXG,IACJH,EAAM,IAAMA,IAVLA,CAaT,CCpDA,IAAIQ,EAAYC,OAAOC,UAAUC,YAC7BC,EAAYH,OAAOC,UAAUG,YAajC,SAASC,EAAeC,GACvB,IAAIC,EACAlB,EACAD,EAEJ,OAASkB,EAAME,WACf,IAAK,IAEJD,EAAO,EACP,MACD,IAAK,IAEJA,EAAO,EACP,MACD,IAAK,IACL,IAAK,IAEJA,EAAO,GACP,MAID,QAECA,EAAO,GAKR,GAFAlB,EAAMiB,EAAMG,IACZrB,EAAIsB,SAAUrB,EAAK,KACbsB,SAAUvB,GAAM,C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AA,EACAjR,EAAA,EAAAA,EAAAiU,EAAAjU,IACA+H,EAAAlI,EAAAG,GACAuS,EAAAtB,GAAA3B,GAAAvH,GACAwK,EAAAtB,EAAA,GAAA1B,GAAAxH,GACAkJ,GAAA,CAxDA,CA+DA,ICz/BA,IAAIkD,GAAQ,CACXnD,QAAW3H,GACX6H,QAAWpH,GACX4H,QAAWlO,MACX4N,MAASjH,GACTgH,MAAS1G,GACT4G,KAAQtG,GACRwG,OAAUlG,GACViG,OAAU3F,GACV6F,MAASvF,GACTwF,OAAUlF,GACVuF,UAAaY,GACbb,WAAcqC,ICTf,SAASC,GAAOvC,GACf,OAAOwC,GAAOxC,IAAW,IAC1B,CCNA,SAAS9R,GAAOiP,GACf,OCDD,SAAiBlP,EAAOkP,GACvB,IAAItF,EACAzJ,EAIJ,IADAyJ,EAAM,GACAzJ,EAAI,EAAGA,EAAI+O,EAAK/O,IACrByJ,EAAIvE,KAAMrF,GAEX,OAAO4J,CACR,CDTQ4K,CAAQ,EAAKtF,EACrB,CEQA,SAASjP,GAAOU,GACf,IAAIoR,EACAtI,EACJ,IAAMH,GAAsB3I,GAC3B,MAAM,IAAI2D,UAAWgB,EAAQ,+EAAgF3E,IAO9G,GAAe,aAJdoR,EADItN,UAAU9D,OAAS,EACf8D,UAAW,GAEX,WAGR,OAAOgQ,GAAQ9T,GAGhB,GAAc,QADd8I,EAAO6K,GAAOvC,IAEb,MAAM,IAAIzN,UAAWgB,EAAQ,iFAAkFyM,IAEhH,OAAO,IAAItI,EAAM9I,EAClB,CCrBA,SAAS+T,GAAO/T,GACf,OAAK8D,UAAU9D,OAAS,EAChBV,GAAOU,EAAQ8D,UAAW,IAE3BxE,GAAOU,EACf"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index 7665174..0000000 --- a/stats.html +++ /dev/null @@ -1,6177 +0,0 @@ - - - - - - - - Rollup Visualizer - - - -
- - - - - From 8726820f4f76435e1f5a3e73aec6af9e38302427 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Fri, 3 Nov 2023 02:41:52 +0000 Subject: [PATCH 24/75] 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 | 24 +- benchmark/benchmark.js | 264 - benchmark/benchmark.length.complex128.js | 93 - benchmark/benchmark.length.complex64.js | 93 - benchmark/benchmark.length.float32.js | 93 - benchmark/benchmark.length.float64.js | 93 - benchmark/benchmark.length.generic.js | 93 - benchmark/benchmark.length.int16.js | 93 - benchmark/benchmark.length.int32.js | 93 - benchmark/benchmark.length.int8.js | 93 - benchmark/benchmark.length.uint16.js | 93 - benchmark/benchmark.length.uint32.js | 93 - benchmark/benchmark.length.uint8.js | 93 - benchmark/benchmark.length.uint8c.js | 93 - branches.md | 53 - dist/index.d.ts | 3 - dist/index.js | 9 - dist/index.js.map | 7 - docs/repl.txt | 52 - docs/types/test.ts | 77 - examples/index.js | 33 - lib/index.js | 58 - lib/is_buffer_uint8array.js | 47 - lib/main.js | 101 - lib/polyfill.js | 56 - docs/types/index.d.ts => mod.d.ts | 2 +- mod.js | 4 + mod.js.map | 1 + package.json | 80 +- stats.html | 6177 +++++++++++++++++++++ test/dist/test.js | 33 - test/test.js | 60 - test/test.main.js | 274 - test/test.polyfill.js | 324 -- 58 files changed, 6189 insertions(+), 5834 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 benchmark/benchmark.js delete mode 100644 benchmark/benchmark.length.complex128.js delete mode 100644 benchmark/benchmark.length.complex64.js delete mode 100644 benchmark/benchmark.length.float32.js delete mode 100644 benchmark/benchmark.length.float64.js delete mode 100644 benchmark/benchmark.length.generic.js delete mode 100644 benchmark/benchmark.length.int16.js delete mode 100644 benchmark/benchmark.length.int32.js delete mode 100644 benchmark/benchmark.length.int8.js delete mode 100644 benchmark/benchmark.length.uint16.js delete mode 100644 benchmark/benchmark.length.uint32.js delete mode 100644 benchmark/benchmark.length.uint8.js delete mode 100644 benchmark/benchmark.length.uint8c.js 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/repl.txt delete mode 100644 docs/types/test.ts delete mode 100644 examples/index.js delete mode 100644 lib/index.js delete mode 100644 lib/is_buffer_uint8array.js delete mode 100644 lib/main.js delete mode 100644 lib/polyfill.js rename docs/types/index.d.ts => mod.d.ts (99%) create mode 100644 mod.js create mode 100644 mod.js.map create mode 100644 stats.html delete mode 100644 test/dist/test.js delete mode 100644 test/test.js delete mode 100644 test/test.main.js delete mode 100644 test/test.polyfill.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 9c9ebef..0000000 --- a/.github/.keepalive +++ /dev/null @@ -1 +0,0 @@ -2023-11-01T05:49:23.355Z diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index 96f81a8..0000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,7 +0,0 @@ - - -We are excited about your pull request, but unfortunately we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/empty) 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 ddb353e..0000000 --- a/.github/workflows/close_pull_requests.yml +++ /dev/null @@ -1,54 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: close_pull_requests - -# Workflow triggers: -on: - pull_request_target: - types: [opened] - -# Workflow jobs: -jobs: - - # Define job to close all pull requests: - run: - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Close pull request - - name: 'Close pull request' - # Pin action to full length commit SHA corresponding to v3.1.2 - uses: superbrothers/close-pull-request@9c18513d320d7b2c7185fb93396d0c664d5d8448 - with: - comment: | - Thank you for submitting a pull request. :raised_hands: - - We greatly appreciate your willingness to submit a contribution. However, we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). - - We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/empty) 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 dc9e63f..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: '49 1 * * 5' - - # 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 + + + + 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 8e62cb8..0000000 --- a/test/test.js +++ /dev/null @@ -1,60 +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 proxyquire = require( 'proxyquire' ); -var main = require( './../lib/main.js' ); -var polyfill = require( './../lib/polyfill.js' ); -var empty = require( './../lib' ); - - -// TESTS // - -tape( 'main export is a function', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof empty, 'function', 'main export is a function' ); - t.end(); -}); - -tape( 'if an environment supports Node.js buffer instances inheriting from Uint8Array, the main export supports returning arrays having uninitialized memory', function test( t ) { - var empty = proxyquire( './../lib', { - './is_buffer_uint8array.js': mock - }); - t.strictEqual( empty, main, 'returns expected value' ); - t.end(); - - function mock() { - return true; - } -}); - -tape( 'if an environment does not support Node.js buffer instances inheriting from Uint8Array, the main export supports returning zero-filled arrays', function test( t ) { - var empty = proxyquire( './../lib', { - './is_buffer_uint8array.js': mock - }); - t.strictEqual( empty, polyfill, 'returns expected value' ); - t.end(); - - function mock() { - return false; - } -}); diff --git a/test/test.main.js b/test/test.main.js deleted file mode 100644 index 3ceb26e..0000000 --- a/test/test.main.js +++ /dev/null @@ -1,274 +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 Float64Array = require( '@stdlib/array-float64' ); -var Float32Array = require( '@stdlib/array-float32' ); -var Int32Array = require( '@stdlib/array-int32' ); -var Uint32Array = require( '@stdlib/array-uint32' ); -var Int16Array = require( '@stdlib/array-int16' ); -var Uint16Array = require( '@stdlib/array-uint16' ); -var Int8Array = require( '@stdlib/array-int8' ); -var Uint8Array = require( '@stdlib/array-uint8' ); -var Uint8ClampedArray = require( '@stdlib/array-uint8c' ); -var Complex64Array = require( '@stdlib/array-complex64' ); -var Complex128Array = require( '@stdlib/array-complex128' ); -var instanceOf = require( '@stdlib/assert-instance-of' ); -var empty = require( './../lib/main.js' ); - - -// TESTS // - -tape( 'main export is a function', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof empty, 'function', 'main export is a function' ); - t.end(); -}); - -tape( 'the function throws an error if provided a value other than a nonnegative integer for the first argument', function test( t ) { - var values; - var i; - - values = [ - '5', - -3, - 3.14, - NaN, - true, - false, - null, - void 0, - [], - {}, - function noop() {} - ]; - - for ( i = 0; i < values.length; i++ ) { - t.throws( badValue( values[i] ), TypeError, 'throws an error when provided '+values[i] ); - } - t.end(); - - function badValue( value ) { - return function badValue() { - empty( value ); - }; - } -}); - -tape( 'the function throws an error if provided a value other than a nonnegative integer for the first argument (dtype)', function test( t ) { - var values; - var i; - - values = [ - '5', - -3, - 3.14, - NaN, - true, - false, - null, - void 0, - [], - {}, - function noop() {} - ]; - - for ( i = 0; i < values.length; i++ ) { - t.throws( badValue( values[i] ), TypeError, 'throws an error when provided '+values[i] ); - } - t.end(); - - function badValue( value ) { - return function badValue() { - empty( value, 'float32' ); - }; - } -}); - -tape( 'the function throws an error if provided an unrecognized data type', function test( t ) { - var values; - var i; - - values = [ - '5', - 'beep', - 'empty', - 'Int32', - 'Uint32', - 'Int16', - 'Uint16', - 'Int8', - 'Uint8', - 'Uint8c', - 'uint8_clamped', - 'Float64', - 'Float32', - 'FLOAT64', - 'FLOAT32', - 'GENERIC' - ]; - - for ( i = 0; i < values.length; i++ ) { - t.throws( badValue( values[i] ), TypeError, 'throws an error when provided '+values[i] ); - } - t.end(); - - function badValue( value ) { - return function badValue() { - empty( 10, value ); - }; - } -}); - -tape( 'the function returns an empty array (default)', function test( t ) { - var arr; - - arr = empty( 5 ); - t.strictEqual( instanceOf( arr, Float64Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=float64)', function test( t ) { - var arr; - - arr = empty( 5, 'float64' ); - t.strictEqual( instanceOf( arr, Float64Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=float32)', function test( t ) { - var arr; - - arr = empty( 5, 'float32' ); - t.strictEqual( instanceOf( arr, Float32Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=complex128)', function test( t ) { - var arr; - - arr = empty( 5, 'complex128' ); - t.strictEqual( instanceOf( arr, Complex128Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=complex64)', function test( t ) { - var arr; - - arr = empty( 5, 'complex64' ); - t.strictEqual( instanceOf( arr, Complex64Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=int32)', function test( t ) { - var arr; - - arr = empty( 5, 'int32' ); - t.strictEqual( instanceOf( arr, Int32Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=uint32)', function test( t ) { - var arr; - - arr = empty( 5, 'uint32' ); - t.strictEqual( instanceOf( arr, Uint32Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=int16)', function test( t ) { - var arr; - - arr = empty( 5, 'int16' ); - t.strictEqual( instanceOf( arr, Int16Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=uint16)', function test( t ) { - var arr; - - arr = empty( 5, 'uint16' ); - t.strictEqual( instanceOf( arr, Uint16Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=int8)', function test( t ) { - var arr; - - arr = empty( 5, 'int8' ); - t.strictEqual( instanceOf( arr, Int8Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=uint8)', function test( t ) { - var arr; - - arr = empty( 5, 'uint8' ); - t.strictEqual( instanceOf( arr, Uint8Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=uint8c)', function test( t ) { - var arr; - - arr = empty( 5, 'uint8c' ); - t.strictEqual( instanceOf( arr, Uint8ClampedArray ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=generic)', function test( t ) { - var expected; - var arr; - - expected = [ 0, 0, 0, 0, 0 ]; - - arr = empty( 5, 'generic' ); - t.strictEqual( instanceOf( arr, Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); diff --git a/test/test.polyfill.js b/test/test.polyfill.js deleted file mode 100644 index 17b99f3..0000000 --- a/test/test.polyfill.js +++ /dev/null @@ -1,324 +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 Float64Array = require( '@stdlib/array-float64' ); -var Float32Array = require( '@stdlib/array-float32' ); -var Int32Array = require( '@stdlib/array-int32' ); -var Uint32Array = require( '@stdlib/array-uint32' ); -var Int16Array = require( '@stdlib/array-int16' ); -var Uint16Array = require( '@stdlib/array-uint16' ); -var Int8Array = require( '@stdlib/array-int8' ); -var Uint8Array = require( '@stdlib/array-uint8' ); -var Uint8ClampedArray = require( '@stdlib/array-uint8c' ); -var Complex64Array = require( '@stdlib/array-complex64' ); -var Complex128Array = require( '@stdlib/array-complex128' ); -var reinterpret64 = require( '@stdlib/strided-base-reinterpret-complex64' ); -var reinterpret128 = require( '@stdlib/strided-base-reinterpret-complex128' ); -var instanceOf = require( '@stdlib/assert-instance-of' ); -var empty = require( './../lib/polyfill.js' ); - - -// TESTS // - -tape( 'main export is a function', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof empty, 'function', 'main export is a function' ); - t.end(); -}); - -tape( 'the function throws an error if provided a value other than a nonnegative integer for the first argument', function test( t ) { - var values; - var i; - - values = [ - '5', - -3, - 3.14, - NaN, - true, - false, - null, - void 0, - [], - {}, - function noop() {} - ]; - - for ( i = 0; i < values.length; i++ ) { - t.throws( badValue( values[i] ), TypeError, 'throws an error when provided '+values[i] ); - } - t.end(); - - function badValue( value ) { - return function badValue() { - empty( value ); - }; - } -}); - -tape( 'the function throws an error if provided a value other than a nonnegative integer for the first argument (dtype)', function test( t ) { - var values; - var i; - - values = [ - '5', - -3, - 3.14, - NaN, - true, - false, - null, - void 0, - [], - {}, - function noop() {} - ]; - - for ( i = 0; i < values.length; i++ ) { - t.throws( badValue( values[i] ), TypeError, 'throws an error when provided '+values[i] ); - } - t.end(); - - function badValue( value ) { - return function badValue() { - empty( value, 'float32' ); - }; - } -}); - -tape( 'the function throws an error if provided an unrecognized data type', function test( t ) { - var values; - var i; - - values = [ - '5', - 'beep', - 'empty', - 'Int32', - 'Uint32', - 'Int16', - 'Uint16', - 'Int8', - 'Uint8', - 'Uint8c', - 'uint8_clamped', - 'Float64', - 'Float32', - 'FLOAT64', - 'FLOAT32', - 'GENERIC' - ]; - - for ( i = 0; i < values.length; i++ ) { - t.throws( badValue( values[i] ), TypeError, 'throws an error when provided '+values[i] ); - } - t.end(); - - function badValue( value ) { - return function badValue() { - empty( 10, value ); - }; - } -}); - -tape( 'the function returns a zero-filled array (default)', function test( t ) { - var expected; - var arr; - - expected = new Float64Array( [ 0.0, 0.0, 0.0, 0.0, 0.0 ] ); - - arr = empty( 5 ); - t.strictEqual( instanceOf( arr, Float64Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=float64)', function test( t ) { - var expected; - var arr; - - expected = new Float64Array( [ 0.0, 0.0, 0.0, 0.0, 0.0 ] ); - - arr = empty( 5, 'float64' ); - t.strictEqual( instanceOf( arr, Float64Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=float32)', function test( t ) { - var expected; - var arr; - - expected = new Float32Array( [ 0.0, 0.0, 0.0, 0.0, 0.0 ] ); - - arr = empty( 5, 'float32' ); - t.strictEqual( instanceOf( arr, Float32Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=complex128)', function test( t ) { - var expected; - var arr; - - expected = new Float64Array( [ 0.0, 0.0, 0.0, 0.0 ] ); - - arr = empty( 2, 'complex128' ); - t.strictEqual( instanceOf( arr, Complex128Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length/2, 'returns expected value' ); - t.deepEqual( reinterpret128( arr, 0 ), expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=complex64)', function test( t ) { - var expected; - var arr; - - expected = new Float32Array( [ 0.0, 0.0, 0.0, 0.0 ] ); - - arr = empty( 2, 'complex64' ); - t.strictEqual( instanceOf( arr, Complex64Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length/2, 'returns expected value' ); - t.deepEqual( reinterpret64( arr, 0 ), expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=int32)', function test( t ) { - var expected; - var arr; - - expected = new Int32Array( [ 0, 0, 0, 0, 0 ] ); - - arr = empty( 5, 'int32' ); - t.strictEqual( instanceOf( arr, Int32Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=uint32)', function test( t ) { - var expected; - var arr; - - expected = new Uint32Array( [ 0, 0, 0, 0, 0 ] ); - - arr = empty( 5, 'uint32' ); - t.strictEqual( instanceOf( arr, Uint32Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=int16)', function test( t ) { - var expected; - var arr; - - expected = new Int16Array( [ 0, 0, 0, 0, 0 ] ); - - arr = empty( 5, 'int16' ); - t.strictEqual( instanceOf( arr, Int16Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=uint16)', function test( t ) { - var expected; - var arr; - - expected = new Uint16Array( [ 0, 0, 0, 0, 0 ] ); - - arr = empty( 5, 'uint16' ); - t.strictEqual( instanceOf( arr, Uint16Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=int8)', function test( t ) { - var expected; - var arr; - - expected = new Int8Array( [ 0, 0, 0, 0, 0 ] ); - - arr = empty( 5, 'int8' ); - t.strictEqual( instanceOf( arr, Int8Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=uint8)', function test( t ) { - var expected; - var arr; - - expected = new Uint8Array( [ 0, 0, 0, 0, 0 ] ); - - arr = empty( 5, 'uint8' ); - t.strictEqual( instanceOf( arr, Uint8Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=uint8c)', function test( t ) { - var expected; - var arr; - - expected = new Uint8ClampedArray( [ 0, 0, 0, 0, 0 ] ); - - arr = empty( 5, 'uint8c' ); - t.strictEqual( instanceOf( arr, Uint8ClampedArray ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=generic)', function test( t ) { - var expected; - var arr; - - expected = [ 0, 0, 0, 0, 0 ]; - - arr = empty( 5, 'generic' ); - t.strictEqual( instanceOf( arr, Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); From 73686606041774691df3457c1fdccc1224539a26 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Thu, 9 Nov 2023 10:07:01 +0000 Subject: [PATCH 25/75] Transform error messages --- lib/main.js | 6 +++--- package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/main.js b/lib/main.js index e19ce93..e02b26b 100644 --- a/lib/main.js +++ b/lib/main.js @@ -25,7 +25,7 @@ var allocUnsafe = require( '@stdlib/buffer-alloc-unsafe' ); var ctors = require( '@stdlib/array-typed-ctors' ); var zeros = require( '@stdlib/array-base-zeros' ); var bytesPerElement = require( '@stdlib/ndarray-base-bytes-per-element' ); -var format = require( '@stdlib/string-format' ); +var format = require( '@stdlib/error-tools-fmtprodmsg' ); // MAIN // @@ -57,7 +57,7 @@ function empty( length ) { var nb; if ( !isNonNegativeInteger( length ) ) { - throw new TypeError( format( 'invalid argument. First argument must be a nonnegative integer. Value: `%s`.', length ) ); + throw new TypeError( format( '1Zj2d,MG', length ) ); } if ( arguments.length > 1 ) { dtype = arguments[ 1 ]; @@ -69,7 +69,7 @@ function empty( length ) { } nbytes = bytesPerElement( dtype ); if ( nbytes === null ) { - throw new TypeError( format( 'invalid argument. Second argument must be a supported data type. Value: `%s`.', dtype ) ); + throw new TypeError( format( '1ZjMl', dtype ) ); } // Resolve typed array constructor: ctor = ctors( dtype ); diff --git a/package.json b/package.json index de64304..7bf1889 100644 --- a/package.json +++ b/package.json @@ -45,7 +45,7 @@ "@stdlib/assert-is-uint8array": "^0.1.1", "@stdlib/buffer-alloc-unsafe": "^0.1.0", "@stdlib/ndarray-base-bytes-per-element": "^0.1.0", - "@stdlib/string-format": "^0.1.1", + "@stdlib/error-tools-fmtprodmsg": "^0.1.1", "@stdlib/types": "^0.2.0" }, "devDependencies": { From a2d2f5ff7c1eb2deada1a6c3c755fff19ceb022a Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Thu, 9 Nov 2023 10:48:17 +0000 Subject: [PATCH 26/75] Remove files --- mod.d.ts | 277 --- mod.js | 4 - mod.js.map | 1 - stats.html | 6177 ---------------------------------------------------- 4 files changed, 6459 deletions(-) delete mode 100644 mod.d.ts delete mode 100644 mod.js delete mode 100644 mod.js.map delete mode 100644 stats.html diff --git a/mod.d.ts b/mod.d.ts deleted file mode 100644 index c071f4d..0000000 --- a/mod.d.ts +++ /dev/null @@ -1,277 +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 - -/// - -import { Complex128Array, Complex64Array, DataType } from '@stdlib/types/array'; - -/** -* Creates an uninitialized array having a specified length. -* -* ## Notes -* -* - In browser environments, the function always returns zero-filled arrays. -* - In Node.js versions `>=3.0.0`, the underlying memory of returned typed arrays is **not** initialized. Memory contents are unknown and may contain **sensitive** data. -* -* @param length - array length -* @param dtype - data type -* @returns empty array -* -* @example -* var arr = empty( 2, 'float64' ); -* // returns -*/ -declare function empty( length: number, dtype: 'float64' ): Float64Array; - -/** -* Creates an uninitialized array having a specified length. -* -* ## Notes -* -* - In browser environments, the function always returns zero-filled arrays. -* - In Node.js versions `>=3.0.0`, the underlying memory of returned typed arrays is **not** initialized. Memory contents are unknown and may contain **sensitive** data. -* -* @param length - array length -* @param dtype - data type -* @returns empty array -* -* @example -* var arr = empty( 2, 'float32' ); -* // returns -*/ -declare function empty( length: number, dtype: 'float32' ): Float32Array; - -/** -* Creates an uninitialized array having a specified length. -* -* ## Notes -* -* - In browser environments, the function always returns zero-filled arrays. -* - In Node.js versions `>=3.0.0`, the underlying memory of returned typed arrays is **not** initialized. Memory contents are unknown and may contain **sensitive** data. -* -* @param length - array length -* @param dtype - data type -* @returns empty array -* -* @example -* var arr = empty( 2, 'complex128' ); -* // returns -*/ -declare function empty( length: number, dtype: 'complex128' ): Complex128Array; - -/** -* Creates an uninitialized array having a specified length. -* -* ## Notes -* -* - In browser environments, the function always returns zero-filled arrays. -* - In Node.js versions `>=3.0.0`, the underlying memory of returned typed arrays is **not** initialized. Memory contents are unknown and may contain **sensitive** data. -* -* @param length - array length -* @param dtype - data type -* @returns empty array -* -* @example -* var arr = empty( 2, 'complex64' ); -* // returns -*/ -declare function empty( length: number, dtype: 'complex64' ): Complex64Array; - -/** -* Creates an uninitialized array having a specified length. -* -* ## Notes -* -* - In browser environments, the function always returns zero-filled arrays. -* - In Node.js versions `>=3.0.0`, the underlying memory of returned typed arrays is **not** initialized. Memory contents are unknown and may contain **sensitive** data. -* -* @param length - array length -* @param dtype - data type -* @returns empty array -* -* @example -* var arr = empty( 2, 'int32' ); -* // returns -*/ -declare function empty( length: number, dtype: 'int32' ): Int32Array; - -/** -* Creates an uninitialized array having a specified length. -* -* ## Notes -* -* - In browser environments, the function always returns zero-filled arrays. -* - In Node.js versions `>=3.0.0`, the underlying memory of returned typed arrays is **not** initialized. Memory contents are unknown and may contain **sensitive** data. -* -* @param length - array length -* @param dtype - data type -* @returns empty array -* -* @example -* var arr = empty( 2, 'int16' ); -* // returns -*/ -declare function empty( length: number, dtype: 'int16' ): Int16Array; - -/** -* Creates an uninitialized array having a specified length. -* -* ## Notes -* -* - In browser environments, the function always returns zero-filled arrays. -* - In Node.js versions `>=3.0.0`, the underlying memory of returned typed arrays is **not** initialized. Memory contents are unknown and may contain **sensitive** data. -* -* @param length - array length -* @param dtype - data type -* @returns empty array -* -* @example -* var arr = empty( 2, 'int8' ); -* // returns -*/ -declare function empty( length: number, dtype: 'int8' ): Int8Array; - -/** -* Creates an uninitialized array having a specified length. -* -* ## Notes -* -* - In browser environments, the function always returns zero-filled arrays. -* - In Node.js versions `>=3.0.0`, the underlying memory of returned typed arrays is **not** initialized. Memory contents are unknown and may contain **sensitive** data. -* -* @param length - array length -* @param dtype - data type -* @returns empty array -* -* @example -* var arr = empty( 2, 'uint32' ); -* // returns -*/ -declare function empty( length: number, dtype: 'uint32' ): Uint32Array; - -/** -* Creates an uninitialized array having a specified length. -* -* ## Notes -* -* - In browser environments, the function always returns zero-filled arrays. -* - In Node.js versions `>=3.0.0`, the underlying memory of returned typed arrays is **not** initialized. Memory contents are unknown and may contain **sensitive** data. -* -* @param length - array length -* @param dtype - data type -* @returns empty array -* -* @example -* var arr = empty( 2, 'uint16' ); -* // returns -*/ -declare function empty( length: number, dtype: 'uint16' ): Uint16Array; - -/** -* Creates an uninitialized array having a specified length. -* -* ## Notes -* -* - In browser environments, the function always returns zero-filled arrays. -* - In Node.js versions `>=3.0.0`, the underlying memory of returned typed arrays is **not** initialized. Memory contents are unknown and may contain **sensitive** data. -* -* @param length - array length -* @param dtype - data type -* @returns empty array -* -* @example -* var arr = empty( 2, 'uint8' ); -* // returns -*/ -declare function empty( length: number, dtype: 'uint8' ): Uint8Array; - -/** -* Creates an uninitialized array having a specified length. -* -* ## Notes -* -* - In browser environments, the function always returns zero-filled arrays. -* - In Node.js versions `>=3.0.0`, the underlying memory of returned typed arrays is **not** initialized. Memory contents are unknown and may contain **sensitive** data. -* -* @param length - array length -* @param dtype - data type -* @returns empty array -* -* @example -* var arr = empty( 2, 'uint8c' ); -* // returns -*/ -declare function empty( length: number, dtype: 'uint8c' ): Uint8ClampedArray; - -/** -* Creates a zero-filled array having a specified length. -* -* @param length - array length -* @param dtype - data type -* @returns zero-filled array -* -* @example -* var arr = empty( 2, 'generic' ); -* // returns -*/ -declare function empty( length: number, dtype: 'generic' ): Array; - -/** -* Creates an uninitialized array having a specified length. -* -* ## Notes -* -* - In browser environments, the function always returns zero-filled arrays. -* - If `dtype` is `'generic'`, the function always returns a zero-filled array. -* - In Node.js versions `>=3.0.0`, the underlying memory of returned typed arrays is **not** initialized. Memory contents are unknown and may contain **sensitive** data. -* -* The function recognizes the following data types: -* -* - `float64`: double-precision floating-point numbers (IEEE 754) -* - `float32`: single-precision floating-point numbers (IEEE 754) -* - `complex128`: double-precision complex floating-point numbers -* - `complex64`: single-precision complex floating-point numbers -* - `int32`: 32-bit two's complement signed integers -* - `uint32`: 32-bit unsigned integers -* - `int16`: 16-bit two's complement signed integers -* - `uint16`: 16-bit unsigned integers -* - `int8`: 8-bit two's complement signed integers -* - `uint8`: 8-bit unsigned integers -* - `uint8c`: 8-bit unsigned integers clamped to `0-255` -* - `generic`: generic JavaScript values -* -* @param length - array length -* @param dtype - data type (default: 'float64') -* @returns empty array -* -* @example -* var arr = empty( 2 ); -* // returns -* -* @example -* var arr = empty( 2, 'float32' ); -* // returns -*/ -declare function empty( length: number, dtype?: DataType ): Float64Array; - - -// EXPORTS // - -export = empty; diff --git a/mod.js b/mod.js deleted file mode 100644 index ce435ce..0000000 --- a/mod.js +++ /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 -/// -var e="function"==typeof Object.defineProperty?Object.defineProperty:null;var r=Object.defineProperty;function t(e){return"number"==typeof e}function n(e){var r,t="";for(r=0;r0&&(r-=1),n=i.toExponential(r)):n=i.toPrecision(e.precision),e.alternate||(n=y.call(n,v,"$1e"),n=y.call(n,b,"e"),n=y.call(n,w,""));break;default:throw new Error("invalid double notation. Value: "+e.specifier)}return n=y.call(n,h,"e+0$1"),n=y.call(n,p,"e-0$1"),e.alternate&&(n=y.call(n,g,"$1."),n=y.call(n,m,"$1.e")),i>=0&&e.sign&&(n=e.sign+n),n=e.specifier===s.call(e.specifier)?s.call(n):c.call(n)}function E(e){var r,t="";for(r=0;r127)throw new Error("invalid character code. Value: "+n.arg);n.arg=_(a)?String(n.arg):T(a)}break;case"e":case"E":case"f":case"F":case"g":case"G":r||(n.precision=6),n.arg=d(n);break;default:throw new Error("invalid specifier: "+n.specifier)}n.maxWidth>=0&&n.arg.length>n.maxWidth&&(n.arg=n.arg.substring(0,n.maxWidth)),n.padZeros?n.arg=i(n.arg,n.width||n.precision,n.padRight):n.width&&(n.arg=A(n.arg,n.width,n.padRight)),l+=n.arg||"",c+=1}return l}var k=/%(?:([1-9]\d*)\$)?([0 +\-#]*)(\*|\d+)?(?:(\.)(\*|\d+)?)?[hlL]?([%A-Za-z])/g;function L(e){var r={mapping:e[1]?parseInt(e[1],10):void 0,flags:e[2],width:e[3],precision:e[5],specifier:e[6]};return"."===e[4]&&void 0===e[5]&&(r.precision="1"),r}function S(e){var r,t,n,i;for(t=[],i=0,n=k.exec(e);n;)(r=e.slice(i,k.lastIndex-n[0].length)).length&&t.push(r),t.push(L(n)),i=k.lastIndex,n=k.exec(e);return(r=e.slice(i)).length&&t.push(r),t}function R(e){return"string"==typeof e}function B(e){var r,t,n;if(!R(e))throw new TypeError(B("invalid argument. First argument must be a string. Value: `%s`.",e));for(r=S(e),(t=new Array(arguments.length))[0]=r,n=1;nne&&oe(e)}function ue(e){return W(e)&&ae(e)}function fe(e){return ee(e)&&ae(e.valueOf())}function le(e){return ue(e)||fe(e)}function ce(e){return ue(e)&&e>=0}function se(e){return fe(e)&&e.valueOf()>=0}function ye(e){return ce(e)||se(e)}Y(le,"isPrimitive",ue),Y(le,"isObject",fe),Y(ye,"isPrimitive",ce),Y(ye,"isObject",se);var he="function"==typeof Float64Array;var pe="function"==typeof Float64Array?Float64Array:null;var ge="function"==typeof Float64Array?Float64Array:void 0;var me=function(){var e,r,t;if("function"!=typeof pe)return!1;try{r=new pe([1,3.14,-3.14,NaN]),t=r,e=(he&&t instanceof Float64Array||"[object Float64Array]"===D(t))&&1===r[0]&&3.14===r[1]&&-3.14===r[2]&&r[3]!=r[3]}catch(r){e=!1}return e}()?ge:function(){throw new Error("not implemented")},we="function"==typeof Float32Array;var be="function"==typeof Float32Array?Float32Array:null;var ve="function"==typeof Float32Array?Float32Array:void 0;var de=function(){var e,r,t;if("function"!=typeof be)return!1;try{r=new be([1,3.14,-3.14,5e40]),t=r,e=(we&&t instanceof Float32Array||"[object Float32Array]"===D(t))&&1===r[0]&&3.140000104904175===r[1]&&-3.140000104904175===r[2]&&r[3]===te}catch(r){e=!1}return e}()?ve:function(){throw new Error("not implemented")},Ee="function"==typeof Int16Array;var Ae="function"==typeof Int16Array?Int16Array:null;var Te="function"==typeof Int16Array?Int16Array:void 0;var _e=function(){var e,r,t;if("function"!=typeof Ae)return!1;try{r=new Ae([1,3.14,-3.14,32768]),t=r,e=(Ee&&t instanceof Int16Array||"[object Int16Array]"===D(t))&&1===r[0]&&3===r[1]&&-3===r[2]&&-32768===r[3]}catch(r){e=!1}return e}()?Te:function(){throw new Error("not implemented")},xe="function"==typeof Int32Array;var je="function"==typeof Int32Array?Int32Array:null;var Ve="function"==typeof Int32Array?Int32Array:void 0;var ke=function(){var e,r,t;if("function"!=typeof je)return!1;try{r=new je([1,3.14,-3.14,2147483648]),t=r,e=(xe&&t instanceof Int32Array||"[object Int32Array]"===D(t))&&1===r[0]&&3===r[1]&&-3===r[2]&&-2147483648===r[3]}catch(r){e=!1}return e}()?Ve:function(){throw new Error("not implemented")},Le="function"==typeof Int8Array;var Se="function"==typeof Int8Array?Int8Array:null;var Re="function"==typeof Int8Array?Int8Array:void 0;var Be=function(){var e,r,t;if("function"!=typeof Se)return!1;try{r=new Se([1,3.14,-3.14,128]),t=r,e=(Le&&t instanceof Int8Array||"[object Int8Array]"===D(t))&&1===r[0]&&3===r[1]&&-3===r[2]&&-128===r[3]}catch(r){e=!1}return e}()?Re:function(){throw new Error("not implemented")},Ie="function"==typeof Uint16Array;var Ce="function"==typeof Uint16Array?Uint16Array:null;var Fe="function"==typeof Uint16Array?Uint16Array:void 0;var Oe=function(){var e,r,t;if("function"!=typeof Ce)return!1;try{r=new Ce(r=[1,3.14,-3.14,65536,65537]),t=r,e=(Ie&&t instanceof Uint16Array||"[object Uint16Array]"===D(t))&&1===r[0]&&3===r[1]&&65533===r[2]&&0===r[3]&&1===r[4]}catch(r){e=!1}return e}()?Fe:function(){throw new Error("not implemented")},Me="function"==typeof Uint32Array;var Ne="function"==typeof Uint32Array?Uint32Array:null;var Ue="function"==typeof Uint32Array?Uint32Array:void 0;var Pe=function(){var e,r,t;if("function"!=typeof Ne)return!1;try{r=new Ne(r=[1,3.14,-3.14,4294967296,4294967297]),t=r,e=(Me&&t instanceof Uint32Array||"[object Uint32Array]"===D(t))&&1===r[0]&&3===r[1]&&4294967293===r[2]&&0===r[3]&&1===r[4]}catch(r){e=!1}return e}()?Ue:function(){throw new Error("not implemented")},Ye="function"==typeof Uint8Array;var We="function"==typeof Uint8Array?Uint8Array:null;var $e="function"==typeof Uint8Array?Uint8Array:void 0;var Ge=function(){var e,r,t;if("function"!=typeof We)return!1;try{r=new We(r=[1,3.14,-3.14,256,257]),t=r,e=(Ye&&t instanceof Uint8Array||"[object Uint8Array]"===D(t))&&1===r[0]&&3===r[1]&&253===r[2]&&0===r[3]&&1===r[4]}catch(r){e=!1}return e}()?$e:function(){throw new Error("not implemented")},Ze="function"==typeof Uint8ClampedArray;var Xe="function"==typeof Uint8ClampedArray?Uint8ClampedArray:null;var ze="function"==typeof Uint8ClampedArray?Uint8ClampedArray:void 0;var Je=function(){var e,r,t;if("function"!=typeof Xe)return!1;try{r=new Xe([-1,0,1,3.14,4.99,255,256]),t=r,e=(Ze&&t instanceof Uint8ClampedArray||"[object Uint8ClampedArray]"===D(t))&&0===r[0]&&0===r[1]&&1===r[2]&&3===r[3]&&5===r[4]&&255===r[5]&&255===r[6]}catch(r){e=!1}return e}()?ze:function(){throw new Error("not implemented")};function qe(e){return"object"==typeof e&&null!==e&&"number"==typeof e.length&&oe(e.length)&&e.length>=0&&e.length<=4294967295}function De(e){return"object"==typeof e&&null!==e&&"number"==typeof e.length&&oe(e.length)&&e.length>=0&&e.length<=9007199254740991}var He="function"==typeof ArrayBuffer;function Ke(e){return He&&e instanceof ArrayBuffer||"[object ArrayBuffer]"===D(e)}var Qe=Array.isArray?Array.isArray:function(e){return"[object Array]"===D(e)};function er(e){return"object"==typeof e&&null!==e&&!Qe(e)}var rr=/./;function tr(e){return"boolean"==typeof e}var nr=Boolean,ir=Boolean.prototype.toString;var or=G();function ar(e){return"object"==typeof e&&(e instanceof nr||(or?function(e){try{return ir.call(e),!0}catch(e){return!1}}(e):"[object Boolean]"===D(e)))}function ur(e){return tr(e)||ar(e)}function fr(){return new Function("return this;")()}Y(ur,"isPrimitive",tr),Y(ur,"isObject",ar);var lr="object"==typeof self?self:null,cr="object"==typeof window?window:null,sr="undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},yr="object"==typeof sr?sr:null,hr="object"==typeof globalThis?globalThis:null;var pr=function(e){if(arguments.length){if(!tr(e))throw new TypeError(B("invalid argument. Must provide a boolean. Value: `%s`.",e));if(e)return fr()}if(hr)return hr;if(lr)return lr;if(cr)return cr;if(yr)return yr;throw new Error("unexpected error. Unable to resolve global object.")}(),gr=pr.document&&pr.document.childNodes,mr=Int8Array;function wr(){return/^\s*function\s*([^(]*)/i}var br=/^\s*function\s*([^(]*)/i;function vr(e){return null!==e&&"object"==typeof e}function dr(e){var r,t,n,i;if(("Object"===(t=D(e).slice(8,-1))||"Error"===t)&&e.constructor){if("string"==typeof(n=e.constructor).name)return n.name;if(r=br.exec(n.toString()))return r[1]}return vr(i=e)&&(i._isBuffer||i.constructor&&"function"==typeof i.constructor.isBuffer&&i.constructor.isBuffer(i))?"Buffer":t}Y(wr,"REGEXP",br),Y(vr,"isObjectLikeArray",function(e){if("function"!=typeof e)throw new TypeError(B("invalid argument. Must provide a function. Value: `%s`.",e));return function(r){var t,n;if(!Qe(r))return!1;if(0===(t=r.length))return!1;for(n=0;n=2)r.push(n[0],n[1]);else{if(!kr(n))return new TypeError(B("invalid argument. An iterator must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",n));r.push(Ir(n),Cr(n))}return r}function Wr(e,r,t){var n,i,o,a;for(n=[],a=-1;!(i=e.next()).done;)if(a+=1,qe(o=r.call(t,i.value,a))&&o.length>=2)n.push(o[0],o[1]);else{if(!kr(o))return new TypeError(B("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",o));n.push(Ir(o),Cr(o))}return n}function $r(e,r){var t,n,i,o;for(t=r.length,o=0,i=0;it.byteLength-e)throw new RangeError(B("invalid arguments. ArrayBuffer has insufficient capacity. Either decrease the array length or provide a bigger buffer. Minimum capacity: `%u`.",n*Gr));t=new de(t,e,2*n)}}return Y(this,"_buffer",t),Y(this,"_length",t.length/2),this}function Hr(e){return e.re}function Kr(e){return e.im}function Qr(e){var r,t,n;for(r=[];!(t=e.next()).done;)if(qe(n=t.value)&&n.length>=2)r.push(n[0],n[1]);else{if(!kr(n))return new TypeError(B("invalid argument. An iterator must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",n));r.push(Hr(n),Kr(n))}return r}function et(e,r,t){var n,i,o,a;for(n=[],a=-1;!(i=e.next()).done;)if(a+=1,qe(o=r.call(t,i.value,a))&&o.length>=2)n.push(o[0],o[1]);else{if(!kr(o))return new TypeError(B("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",o));n.push(Hr(o),Kr(o))}return n}function rt(e,r){var t,n,i,o;for(t=r.length,o=0,i=0;i1){if(!Ar(n=arguments[1]))throw new TypeError(B("invalid argument. Second argument must be a function. Value: `%s`.",n));t>2&&(r=arguments[2])}if(Xr(e)){if(f=e.length,n){for(o=(i=new this(f))._buffer,y=0,s=0;s=2))throw new TypeError(B("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",c));o[y]=c[0],o[y+1]=c[1]}y+=2}return i}return new this(e)}if(De(e)){if(n){for(f=e.length,u=e.get&&e.set?Pr("default"):Nr("default"),s=0;s=2))throw new TypeError(B("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",c));o[y]=c[0],o[y+1]=c[1]}y+=2}return i}return new this(e)}if(er(e)&&Zr&&Ar(e[Rr])){if(!Ar((o=e[Rr]()).next))throw new TypeError(B("invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.",e));if((a=n?Wr(o,n,r):Yr(o))instanceof Error)throw a;for(o=(i=new this(f=a.length/2))._buffer,s=0;s=n)return{done:!0};return r=new Vr(e[a+=2],e[a+1]),{value:[o,r],done:!1}})),Y(t,"return",(function(e){if(i=!0,arguments.length)return{value:e,done:!0};return{done:!0}})),Rr&&Y(t,Rr,(function(){return r.entries()})),t})),Y(Dr.prototype,"get",(function(e){var r;if(!Xr(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!ce(e))throw new TypeError(B("invalid argument. Must provide a nonnegative integer. Value: `%s`.",e));if(!(e>=this._length))return new Vr((r=this._buffer)[e*=2],r[e+1])})),Br(Dr.prototype,"length",(function(){return this._length})),Y(Dr.prototype,"set",(function(e){var r,t,n,i,o,a,u,f,l;if(!Xr(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(n=this._buffer,arguments.length>1){if(!ce(t=arguments[1]))throw new TypeError(B("invalid argument. Index argument must be a nonnegative integer. Value: `%s`.",t))}else t=0;if(kr(e)){if(t>=this._length)throw new RangeError(B("invalid argument. Index argument is out-of-bounds. Value: `%u`.",t));return n[t*=2]=Ir(e),void(n[t+1]=Cr(e))}if(Xr(e)){if(t+(a=e._length)>this._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");if(r=e._buffer,l=n.byteOffset+t*Gr,r.buffer===n.buffer&&r.byteOffsetl){for(i=new de(r.length),f=0;fthis._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");if(r=e,l=n.byteOffset+t*Gr,r.buffer===n.buffer&&r.byteOffsetl){for(i=new de(a),f=0;fthis._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");for(t*=2,f=0;ft.byteLength-e)throw new RangeError(B("invalid arguments. ArrayBuffer has insufficient capacity. Either decrease the array length or provide a bigger buffer. Minimum capacity: `%u`.",n*tt));t=new me(t,e,2*n)}}return Y(this,"_buffer",t),Y(this,"_length",t.length/2),this}Y(ft,"BYTES_PER_ELEMENT",tt),Y(ft,"name","Complex128Array"),Y(ft,"from",(function(e){var r,t,n,i,o,a,u,f,l,c,s,y;if(!Ar(this))throw new TypeError("invalid invocation. `this` context must be a constructor.");if(!ot(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if((t=arguments.length)>1){if(!Ar(n=arguments[1]))throw new TypeError(B("invalid argument. Second argument must be a function. Value: `%s`.",n));t>2&&(r=arguments[2])}if(it(e)){if(f=e.length,n){for(o=(i=new this(f))._buffer,y=0,s=0;s=2))throw new TypeError(B("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",c));o[y]=c[0],o[y+1]=c[1]}y+=2}return i}return new this(e)}if(De(e)){if(n){for(f=e.length,u=e.get&&e.set?Pr("default"):Nr("default"),s=0;s=2))throw new TypeError(B("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",c));o[y]=c[0],o[y+1]=c[1]}y+=2}return i}return new this(e)}if(er(e)&&nt&&Ar(e[Rr])){if(!Ar((o=e[Rr]()).next))throw new TypeError(B("invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.",e));if((a=n?et(o,n,r):Qr(o))instanceof Error)throw a;for(o=(i=new this(f=a.length/2))._buffer,s=0;s=n)return{done:!0};return r=new Tr(e[a+=2],e[a+1]),{value:[o,r],done:!1}})),Y(t,"return",(function(e){if(i=!0,arguments.length)return{value:e,done:!0};return{done:!0}})),Rr&&Y(t,Rr,(function(){return r.entries()})),t})),Y(ft.prototype,"get",(function(e){var r;if(!it(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!ce(e))throw new TypeError(B("invalid argument. Must provide a nonnegative integer. Value: `%s`.",e));if(!(e>=this._length))return new Tr((r=this._buffer)[e*=2],r[e+1])})),Br(ft.prototype,"length",(function(){return this._length})),Y(ft.prototype,"set",(function(e){var r,t,n,i,o,a,u,f,l;if(!it(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(n=this._buffer,arguments.length>1){if(!ce(t=arguments[1]))throw new TypeError(B("invalid argument. Index argument must be a nonnegative integer. Value: `%s`.",t))}else t=0;if(kr(e)){if(t>=this._length)throw new RangeError(B("invalid argument. Index argument is out-of-bounds. Value: `%u`.",t));return n[t*=2]=Hr(e),void(n[t+1]=Kr(e))}if(it(e)){if(t+(a=e._length)>this._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");if(r=e._buffer,l=n.byteOffset+t*tt,r.buffer===n.buffer&&r.byteOffsetl){for(i=new me(r.length),f=0;fthis._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");if(r=e,l=n.byteOffset+t*tt,r.buffer===n.buffer&&r.byteOffsetl){for(i=new me(a),f=0;fthis._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");for(t*=2,f=0;f1?arguments[1]:"float64"))return st(e);if(null===(t=ct(r)))throw new TypeError(B("invalid argument. Second argument must be a recognized data type. Value: `%s`.",r));return new t(e)}function ht(e){return arguments.length>1?yt(e,arguments[1]):yt(e)}export{ht as default}; -//# sourceMappingURL=mod.js.map diff --git a/mod.js.map b/mod.js.map deleted file mode 100644 index ca3f210..0000000 --- a/mod.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"mod.js","sources":["../node_modules/@stdlib/utils-define-property/lib/define_property.js","../node_modules/@stdlib/utils-define-property/lib/builtin.js","../node_modules/@stdlib/string-base-format-interpolate/lib/is_number.js","../node_modules/@stdlib/string-base-format-interpolate/lib/zero_pad.js","../node_modules/@stdlib/string-base-format-interpolate/lib/format_integer.js","../node_modules/@stdlib/string-base-format-interpolate/lib/is_string.js","../node_modules/@stdlib/string-base-format-interpolate/lib/format_double.js","../node_modules/@stdlib/string-base-format-interpolate/lib/space_pad.js","../node_modules/@stdlib/string-base-format-interpolate/lib/main.js","../node_modules/@stdlib/string-base-format-tokenize/lib/main.js","../node_modules/@stdlib/string-format/lib/is_string.js","../node_modules/@stdlib/string-format/lib/main.js","../node_modules/@stdlib/utils-define-property/lib/polyfill.js","../node_modules/@stdlib/utils-define-property/lib/index.js","../node_modules/@stdlib/utils-define-property/lib/has_define_property_support.js","../node_modules/@stdlib/utils-define-nonenumerable-read-only-property/lib/main.js","../node_modules/@stdlib/assert-is-number/lib/primitive.js","../node_modules/@stdlib/assert-has-tostringtag-support/lib/main.js","../node_modules/@stdlib/assert-has-symbol-support/lib/main.js","../node_modules/@stdlib/utils-native-class/lib/tostring.js","../node_modules/@stdlib/assert-has-own-property/lib/main.js","../node_modules/@stdlib/symbol-ctor/lib/main.js","../node_modules/@stdlib/utils-native-class/lib/tostringtag.js","../node_modules/@stdlib/utils-native-class/lib/index.js","../node_modules/@stdlib/utils-native-class/lib/polyfill.js","../node_modules/@stdlib/utils-native-class/lib/main.js","../node_modules/@stdlib/number-ctor/lib/main.js","../node_modules/@stdlib/assert-is-number/lib/tostring.js","../node_modules/@stdlib/assert-is-number/lib/object.js","../node_modules/@stdlib/assert-is-number/lib/try2serialize.js","../node_modules/@stdlib/assert-is-number/lib/main.js","../node_modules/@stdlib/assert-is-number/lib/index.js","../node_modules/@stdlib/constants-float64-pinf/lib/index.js","../node_modules/@stdlib/constants-float64-ninf/lib/index.js","../node_modules/@stdlib/math-base-special-floor/lib/main.js","../node_modules/@stdlib/math-base-assert-is-integer/lib/main.js","../node_modules/@stdlib/assert-is-integer/lib/integer.js","../node_modules/@stdlib/assert-is-integer/lib/primitive.js","../node_modules/@stdlib/assert-is-integer/lib/object.js","../node_modules/@stdlib/assert-is-integer/lib/main.js","../node_modules/@stdlib/assert-is-nonnegative-integer/lib/primitive.js","../node_modules/@stdlib/assert-is-nonnegative-integer/lib/object.js","../node_modules/@stdlib/assert-is-nonnegative-integer/lib/main.js","../node_modules/@stdlib/assert-is-integer/lib/index.js","../node_modules/@stdlib/assert-is-nonnegative-integer/lib/index.js","../node_modules/@stdlib/assert-is-float64array/lib/main.js","../node_modules/@stdlib/assert-has-float64array-support/lib/float64array.js","../node_modules/@stdlib/array-float64/lib/main.js","../node_modules/@stdlib/array-float64/lib/index.js","../node_modules/@stdlib/assert-has-float64array-support/lib/main.js","../node_modules/@stdlib/array-float64/lib/polyfill.js","../node_modules/@stdlib/assert-is-float32array/lib/main.js","../node_modules/@stdlib/assert-has-float32array-support/lib/float32array.js","../node_modules/@stdlib/array-float32/lib/main.js","../node_modules/@stdlib/array-float32/lib/index.js","../node_modules/@stdlib/assert-has-float32array-support/lib/main.js","../node_modules/@stdlib/array-float32/lib/polyfill.js","../node_modules/@stdlib/assert-is-int16array/lib/main.js","../node_modules/@stdlib/constants-int16-max/lib/index.js","../node_modules/@stdlib/assert-has-int16array-support/lib/int16array.js","../node_modules/@stdlib/array-int16/lib/main.js","../node_modules/@stdlib/array-int16/lib/index.js","../node_modules/@stdlib/assert-has-int16array-support/lib/main.js","../node_modules/@stdlib/constants-int16-min/lib/index.js","../node_modules/@stdlib/array-int16/lib/polyfill.js","../node_modules/@stdlib/assert-is-int32array/lib/main.js","../node_modules/@stdlib/constants-int32-max/lib/index.js","../node_modules/@stdlib/assert-has-int32array-support/lib/int32array.js","../node_modules/@stdlib/array-int32/lib/main.js","../node_modules/@stdlib/array-int32/lib/index.js","../node_modules/@stdlib/assert-has-int32array-support/lib/main.js","../node_modules/@stdlib/constants-int32-min/lib/index.js","../node_modules/@stdlib/array-int32/lib/polyfill.js","../node_modules/@stdlib/assert-is-int8array/lib/main.js","../node_modules/@stdlib/constants-int8-max/lib/index.js","../node_modules/@stdlib/assert-has-int8array-support/lib/int8array.js","../node_modules/@stdlib/array-int8/lib/main.js","../node_modules/@stdlib/array-int8/lib/index.js","../node_modules/@stdlib/assert-has-int8array-support/lib/main.js","../node_modules/@stdlib/constants-int8-min/lib/index.js","../node_modules/@stdlib/array-int8/lib/polyfill.js","../node_modules/@stdlib/assert-is-uint16array/lib/main.js","../node_modules/@stdlib/constants-uint16-max/lib/index.js","../node_modules/@stdlib/assert-has-uint16array-support/lib/uint16array.js","../node_modules/@stdlib/array-uint16/lib/main.js","../node_modules/@stdlib/array-uint16/lib/index.js","../node_modules/@stdlib/assert-has-uint16array-support/lib/main.js","../node_modules/@stdlib/array-uint16/lib/polyfill.js","../node_modules/@stdlib/assert-is-uint32array/lib/main.js","../node_modules/@stdlib/constants-uint32-max/lib/index.js","../node_modules/@stdlib/assert-has-uint32array-support/lib/uint32array.js","../node_modules/@stdlib/array-uint32/lib/main.js","../node_modules/@stdlib/array-uint32/lib/index.js","../node_modules/@stdlib/assert-has-uint32array-support/lib/main.js","../node_modules/@stdlib/array-uint32/lib/polyfill.js","../node_modules/@stdlib/assert-is-uint8array/lib/main.js","../node_modules/@stdlib/constants-uint8-max/lib/index.js","../node_modules/@stdlib/assert-has-uint8array-support/lib/uint8array.js","../node_modules/@stdlib/array-uint8/lib/main.js","../node_modules/@stdlib/array-uint8/lib/index.js","../node_modules/@stdlib/assert-has-uint8array-support/lib/main.js","../node_modules/@stdlib/array-uint8/lib/polyfill.js","../node_modules/@stdlib/assert-is-uint8clampedarray/lib/main.js","../node_modules/@stdlib/assert-has-uint8clampedarray-support/lib/uint8clampedarray.js","../node_modules/@stdlib/array-uint8c/lib/main.js","../node_modules/@stdlib/array-uint8c/lib/index.js","../node_modules/@stdlib/assert-has-uint8clampedarray-support/lib/main.js","../node_modules/@stdlib/array-uint8c/lib/polyfill.js","../node_modules/@stdlib/assert-is-array-like-object/lib/main.js","../node_modules/@stdlib/constants-array-max-array-length/lib/index.js","../node_modules/@stdlib/assert-is-collection/lib/main.js","../node_modules/@stdlib/constants-array-max-typed-array-length/lib/index.js","../node_modules/@stdlib/assert-is-arraybuffer/lib/main.js","../node_modules/@stdlib/assert-is-array/lib/main.js","../node_modules/@stdlib/assert-is-object/lib/main.js","../node_modules/@stdlib/utils-type-of/lib/fixtures/re.js","../node_modules/@stdlib/assert-is-boolean/lib/primitive.js","../node_modules/@stdlib/boolean-ctor/lib/main.js","../node_modules/@stdlib/assert-is-boolean/lib/tostring.js","../node_modules/@stdlib/assert-is-boolean/lib/object.js","../node_modules/@stdlib/assert-is-boolean/lib/try2serialize.js","../node_modules/@stdlib/assert-is-boolean/lib/main.js","../node_modules/@stdlib/utils-global/lib/codegen.js","../node_modules/@stdlib/assert-is-boolean/lib/index.js","../node_modules/@stdlib/utils-global/lib/self.js","../node_modules/@stdlib/utils-global/lib/window.js","../node_modules/@stdlib/utils-global/lib/global.js","../node_modules/@stdlib/utils-global/lib/global_this.js","../node_modules/@stdlib/utils-type-of/lib/fixtures/nodelist.js","../node_modules/@stdlib/utils-global/lib/main.js","../node_modules/@stdlib/utils-type-of/lib/fixtures/typedarray.js","../node_modules/@stdlib/regexp-function-name/lib/main.js","../node_modules/@stdlib/regexp-function-name/lib/regexp.js","../node_modules/@stdlib/assert-is-object-like/lib/main.js","../node_modules/@stdlib/utils-constructor-name/lib/main.js","../node_modules/@stdlib/assert-is-buffer/lib/main.js","../node_modules/@stdlib/regexp-function-name/lib/index.js","../node_modules/@stdlib/assert-is-object-like/lib/index.js","../node_modules/@stdlib/assert-tools-array-function/lib/main.js","../node_modules/@stdlib/utils-type-of/lib/index.js","../node_modules/@stdlib/utils-type-of/lib/check.js","../node_modules/@stdlib/utils-type-of/lib/polyfill.js","../node_modules/@stdlib/utils-type-of/lib/main.js","../node_modules/@stdlib/assert-is-function/lib/main.js","../node_modules/@stdlib/complex-float64/lib/main.js","../node_modules/@stdlib/complex-float64/lib/tostring.js","../node_modules/@stdlib/complex-float64/lib/tojson.js","../node_modules/@stdlib/number-float64-base-to-float32/lib/main.js","../node_modules/@stdlib/number-float64-base-to-float32/lib/polyfill.js","../node_modules/@stdlib/number-float64-base-to-float32/lib/index.js","../node_modules/@stdlib/complex-float32/lib/main.js","../node_modules/@stdlib/assert-is-complex-like/lib/main.js","../node_modules/@stdlib/math-base-assert-is-even/lib/main.js","../node_modules/@stdlib/assert-has-iterator-symbol-support/lib/main.js","../node_modules/@stdlib/complex-float32/lib/tostring.js","../node_modules/@stdlib/complex-float32/lib/tojson.js","../node_modules/@stdlib/symbol-iterator/lib/main.js","../node_modules/@stdlib/utils-define-nonenumerable-read-only-accessor/lib/main.js","../node_modules/@stdlib/complex-realf/lib/main.js","../node_modules/@stdlib/complex-imagf/lib/main.js","../node_modules/@stdlib/strided-base-reinterpret-complex64/lib/main.js","../node_modules/@stdlib/strided-base-reinterpret-complex128/lib/main.js","../node_modules/@stdlib/array-base-getter/lib/main.js","../node_modules/@stdlib/array-base-accessor-getter/lib/main.js","../node_modules/@stdlib/array-complex64/lib/from_iterator.js","../node_modules/@stdlib/array-complex64/lib/from_iterator_map.js","../node_modules/@stdlib/array-complex64/lib/from_array.js","../node_modules/@stdlib/array-complex64/lib/main.js","../node_modules/@stdlib/complex-real/lib/main.js","../node_modules/@stdlib/complex-imag/lib/main.js","../node_modules/@stdlib/array-complex128/lib/from_iterator.js","../node_modules/@stdlib/array-complex128/lib/from_iterator_map.js","../node_modules/@stdlib/array-complex128/lib/from_array.js","../node_modules/@stdlib/array-complex128/lib/main.js","../node_modules/@stdlib/array-ctors/lib/ctors.js","../node_modules/@stdlib/array-ctors/lib/main.js","../node_modules/@stdlib/array-base-zeros/lib/main.js","../node_modules/@stdlib/array-base-filled/lib/main.js","../node_modules/@stdlib/array-zeros/lib/main.js","../lib/polyfill.js"],"sourcesContent":["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Object.defineProperty === 'function' ) ? Object.defineProperty : null;\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Defines (or modifies) an object property.\n*\n* ## Notes\n*\n* - Property descriptors come in two flavors: **data descriptors** and **accessor descriptors**. A data descriptor is a property that has a value, which may or may not be writable. An accessor descriptor is a property described by a getter-setter function pair. A descriptor must be one of these two flavors and cannot be both.\n*\n* @name defineProperty\n* @type {Function}\n* @param {Object} obj - object on which to define the property\n* @param {(string|symbol)} prop - property name\n* @param {Object} descriptor - property descriptor\n* @param {boolean} [descriptor.configurable=false] - boolean indicating if property descriptor can be changed and if the property can be deleted from the provided object\n* @param {boolean} [descriptor.enumerable=false] - boolean indicating if the property shows up when enumerating object properties\n* @param {boolean} [descriptor.writable=false] - boolean indicating if the value associated with the property can be changed with an assignment operator\n* @param {*} [descriptor.value] - property value\n* @param {(Function|void)} [descriptor.get=undefined] - function which serves as a getter for the property, or, if no getter, undefined. When the property is accessed, a getter function is called without arguments and with the `this` context set to the object through which the property is accessed (which may not be the object on which the property is defined due to inheritance). The return value will be used as the property value.\n* @param {(Function|void)} [descriptor.set=undefined] - function which serves as a setter for the property, or, if no setter, undefined. When assigning a property value, a setter function is called with one argument (the value being assigned to the property) and with the `this` context set to the object through which the property is assigned.\n* @throws {TypeError} first argument must be an object\n* @throws {TypeError} third argument must be an object\n* @throws {Error} property descriptor cannot have both a value and a setter and/or getter\n* @returns {Object} object with added property\n*\n* @example\n* var obj = {};\n*\n* defineProperty( obj, 'foo', {\n* 'value': 'bar'\n* });\n*\n* var str = obj.foo;\n* // returns 'bar'\n*/\nvar defineProperty = Object.defineProperty;\n\n\n// EXPORTS //\n\nexport default defineProperty;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Tests if a value is a number primitive.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number primitive\n*\n* @example\n* var bool = isNumber( 3.14 );\n* // returns true\n*\n* @example\n* var bool = isNumber( NaN );\n* // returns true\n*\n* @example\n* var bool = isNumber( new Number( 3.14 ) );\n* // returns false\n*/\nfunction isNumber( value ) {\n\treturn ( typeof value === 'number' ); // NOTE: we inline the `isNumber.isPrimitive` function from `@stdlib/assert/is-number` in order to avoid circular dependencies.\n}\n\n\n// EXPORTS //\n\nexport default isNumber;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// FUNCTIONS //\n\n/**\n* Tests if a string starts with a minus sign (`-`).\n*\n* @private\n* @param {string} str - input string\n* @returns {boolean} boolean indicating if a string starts with a minus sign (`-`)\n*/\nfunction startsWithMinus( str ) {\n\treturn str[ 0 ] === '-';\n}\n\n/**\n* Returns a string of `n` zeros.\n*\n* @private\n* @param {number} n - number of zeros\n* @returns {string} string of zeros\n*/\nfunction zeros( n ) {\n\tvar out = '';\n\tvar i;\n\tfor ( i = 0; i < n; i++ ) {\n\t\tout += '0';\n\t}\n\treturn out;\n}\n\n\n// MAIN //\n\n/**\n* Pads a token with zeros to the specified width.\n*\n* @private\n* @param {string} str - token argument\n* @param {number} width - token width\n* @param {boolean} [right=false] - boolean indicating whether to pad to the right\n* @returns {string} padded token argument\n*/\nfunction zeroPad( str, width, right ) {\n\tvar negative = false;\n\tvar pad = width - str.length;\n\tif ( pad < 0 ) {\n\t\treturn str;\n\t}\n\tif ( startsWithMinus( str ) ) {\n\t\tnegative = true;\n\t\tstr = str.substr( 1 );\n\t}\n\tstr = ( right ) ?\n\t\tstr + zeros( pad ) :\n\t\tzeros( pad ) + str;\n\tif ( negative ) {\n\t\tstr = '-' + str;\n\t}\n\treturn str;\n}\n\n\n// EXPORTS //\n\nexport default zeroPad;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isNumber from './is_number.js';\nimport zeroPad from './zero_pad.js';\n\n// NOTE: for the following, we explicitly avoid using stdlib packages in this particular package in order to avoid circular dependencies.\nvar lowercase = String.prototype.toLowerCase;\nvar uppercase = String.prototype.toUpperCase;\n\n\n// MAIN //\n\n/**\n* Formats a token object argument as an integer.\n*\n* @private\n* @param {Object} token - token object\n* @throws {Error} must provide a valid integer\n* @returns {string} formatted token argument\n*/\nfunction formatInteger( token ) {\n\tvar base;\n\tvar out;\n\tvar i;\n\n\tswitch ( token.specifier ) {\n\tcase 'b':\n\t\t// Case: %b (binary)\n\t\tbase = 2;\n\t\tbreak;\n\tcase 'o':\n\t\t// Case: %o (octal)\n\t\tbase = 8;\n\t\tbreak;\n\tcase 'x':\n\tcase 'X':\n\t\t// Case: %x, %X (hexadecimal)\n\t\tbase = 16;\n\t\tbreak;\n\tcase 'd':\n\tcase 'i':\n\tcase 'u':\n\tdefault:\n\t\t// Case: %d, %i, %u (decimal)\n\t\tbase = 10;\n\t\tbreak;\n\t}\n\tout = token.arg;\n\ti = parseInt( out, 10 );\n\tif ( !isFinite( i ) ) { // NOTE: We use the global `isFinite` function here instead of `@stdlib/math/base/assert/is-finite` in order to avoid circular dependencies.\n\t\tif ( !isNumber( out ) ) {\n\t\t\tthrow new Error( 'invalid integer. Value: ' + out );\n\t\t}\n\t\ti = 0;\n\t}\n\tif ( i < 0 && ( token.specifier === 'u' || base !== 10 ) ) {\n\t\ti = 0xffffffff + i + 1;\n\t}\n\tif ( i < 0 ) {\n\t\tout = ( -i ).toString( base );\n\t\tif ( token.precision ) {\n\t\t\tout = zeroPad( out, token.precision, token.padRight );\n\t\t}\n\t\tout = '-' + out;\n\t} else {\n\t\tout = i.toString( base );\n\t\tif ( !i && !token.precision ) {\n\t\t\tout = '';\n\t\t} else if ( token.precision ) {\n\t\t\tout = zeroPad( out, token.precision, token.padRight );\n\t\t}\n\t\tif ( token.sign ) {\n\t\t\tout = token.sign + out;\n\t\t}\n\t}\n\tif ( base === 16 ) {\n\t\tif ( token.alternate ) {\n\t\t\tout = '0x' + out;\n\t\t}\n\t\tout = ( token.specifier === uppercase.call( token.specifier ) ) ?\n\t\t\tuppercase.call( out ) :\n\t\t\tlowercase.call( out );\n\t}\n\tif ( base === 8 ) {\n\t\tif ( token.alternate && out.charAt( 0 ) !== '0' ) {\n\t\t\tout = '0' + out;\n\t\t}\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default formatInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Tests if a value is a string primitive.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a string primitive\n*\n* @example\n* var bool = isString( 'beep' );\n* // returns true\n*\n* @example\n* var bool = isString( new String( 'beep' ) );\n* // returns false\n*/\nfunction isString( value ) {\n\treturn ( typeof value === 'string' ); // NOTE: we inline the `isString.isPrimitive` function from `@stdlib/assert/is-string` in order to avoid circular dependencies.\n}\n\n\n// EXPORTS //\n\nexport default isString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isNumber from './is_number.js';\n\n// NOTE: for the following, we explicitly avoid using stdlib packages in this particular package in order to avoid circular dependencies.\nvar abs = Math.abs; // eslint-disable-line stdlib/no-builtin-math\nvar lowercase = String.prototype.toLowerCase;\nvar uppercase = String.prototype.toUpperCase;\nvar replace = String.prototype.replace;\n\n\n// VARIABLES //\n\nvar RE_EXP_POS_DIGITS = /e\\+(\\d)$/;\nvar RE_EXP_NEG_DIGITS = /e-(\\d)$/;\nvar RE_ONLY_DIGITS = /^(\\d+)$/;\nvar RE_DIGITS_BEFORE_EXP = /^(\\d+)e/;\nvar RE_TRAILING_PERIOD_ZERO = /\\.0$/;\nvar RE_PERIOD_ZERO_EXP = /\\.0*e/;\nvar RE_ZERO_BEFORE_EXP = /(\\..*[^0])0*e/;\n\n\n// MAIN //\n\n/**\n* Formats a token object argument as a floating-point number.\n*\n* @private\n* @param {Object} token - token object\n* @throws {Error} must provide a valid floating-point number\n* @returns {string} formatted token argument\n*/\nfunction formatDouble( token ) {\n\tvar digits;\n\tvar out;\n\tvar f = parseFloat( token.arg );\n\tif ( !isFinite( f ) ) { // NOTE: We use the global `isFinite` function here instead of `@stdlib/math/base/assert/is-finite` in order to avoid circular dependencies.\n\t\tif ( !isNumber( token.arg ) ) {\n\t\t\tthrow new Error( 'invalid floating-point number. Value: ' + out );\n\t\t}\n\t\t// Case: NaN, Infinity, or -Infinity\n\t\tf = token.arg;\n\t}\n\tswitch ( token.specifier ) {\n\tcase 'e':\n\tcase 'E':\n\t\tout = f.toExponential( token.precision );\n\t\tbreak;\n\tcase 'f':\n\tcase 'F':\n\t\tout = f.toFixed( token.precision );\n\t\tbreak;\n\tcase 'g':\n\tcase 'G':\n\t\tif ( abs( f ) < 0.0001 ) {\n\t\t\tdigits = token.precision;\n\t\t\tif ( digits > 0 ) {\n\t\t\t\tdigits -= 1;\n\t\t\t}\n\t\t\tout = f.toExponential( digits );\n\t\t} else {\n\t\t\tout = f.toPrecision( token.precision );\n\t\t}\n\t\tif ( !token.alternate ) {\n\t\t\tout = replace.call( out, RE_ZERO_BEFORE_EXP, '$1e' );\n\t\t\tout = replace.call( out, RE_PERIOD_ZERO_EXP, 'e');\n\t\t\tout = replace.call( out, RE_TRAILING_PERIOD_ZERO, '' );\n\t\t}\n\t\tbreak;\n\tdefault:\n\t\tthrow new Error( 'invalid double notation. Value: ' + token.specifier );\n\t}\n\tout = replace.call( out, RE_EXP_POS_DIGITS, 'e+0$1' );\n\tout = replace.call( out, RE_EXP_NEG_DIGITS, 'e-0$1' );\n\tif ( token.alternate ) {\n\t\tout = replace.call( out, RE_ONLY_DIGITS, '$1.' );\n\t\tout = replace.call( out, RE_DIGITS_BEFORE_EXP, '$1.e' );\n\t}\n\tif ( f >= 0 && token.sign ) {\n\t\tout = token.sign + out;\n\t}\n\tout = ( token.specifier === uppercase.call( token.specifier ) ) ?\n\t\tuppercase.call( out ) :\n\t\tlowercase.call( out );\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default formatDouble;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// FUNCTIONS //\n\n/**\n* Returns `n` spaces.\n*\n* @private\n* @param {number} n - number of spaces\n* @returns {string} string of spaces\n*/\nfunction spaces( n ) {\n\tvar out = '';\n\tvar i;\n\tfor ( i = 0; i < n; i++ ) {\n\t\tout += ' ';\n\t}\n\treturn out;\n}\n\n\n// MAIN //\n\n/**\n* Pads a token with spaces to the specified width.\n*\n* @private\n* @param {string} str - token argument\n* @param {number} width - token width\n* @param {boolean} [right=false] - boolean indicating whether to pad to the right\n* @returns {string} padded token argument\n*/\nfunction spacePad( str, width, right ) {\n\tvar pad = width - str.length;\n\tif ( pad < 0 ) {\n\t\treturn str;\n\t}\n\tstr = ( right ) ?\n\t\tstr + spaces( pad ) :\n\t\tspaces( pad ) + str;\n\treturn str;\n}\n\n\n// EXPORTS //\n\nexport default spacePad;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport formatInteger from './format_integer.js';\nimport isString from './is_string.js';\nimport formatDouble from './format_double.js';\nimport spacePad from './space_pad.js';\nimport zeroPad from './zero_pad.js';\n\n\n// VARIABLES //\n\nvar fromCharCode = String.fromCharCode;\nvar isnan = isNaN; // NOTE: We use the global `isNaN` function here instead of `@stdlib/math/base/assert/is-nan` to avoid circular dependencies.\nvar isArray = Array.isArray; // NOTE: We use the global `Array.isArray` function here instead of `@stdlib/assert/is-array` to avoid circular dependencies.\n\n\n// FUNCTIONS //\n\n/**\n* Initializes token object with properties of supplied format identifier object or default values if not present.\n*\n* @private\n* @param {Object} token - format identifier object\n* @returns {Object} token object\n*/\nfunction initialize( token ) {\n\tvar out = {};\n\tout.specifier = token.specifier;\n\tout.precision = ( token.precision === void 0 ) ? 1 : token.precision;\n\tout.width = token.width;\n\tout.flags = token.flags || '';\n\tout.mapping = token.mapping;\n\treturn out;\n}\n\n\n// MAIN //\n\n/**\n* Generates string from a token array by interpolating values.\n*\n* @param {Array} tokens - string parts and format identifier objects\n* @param {Array} ...args - variable values\n* @throws {TypeError} first argument must be an array\n* @throws {Error} invalid flags\n* @returns {string} formatted string\n*\n* @example\n* var tokens = [ 'beep ', { 'specifier': 's' } ];\n* var out = formatInterpolate( tokens, 'boop' );\n* // returns 'beep boop'\n*/\nfunction formatInterpolate( tokens ) {\n\tvar hasPeriod;\n\tvar flags;\n\tvar token;\n\tvar flag;\n\tvar num;\n\tvar out;\n\tvar pos;\n\tvar i;\n\tvar j;\n\n\tif ( !isArray( tokens ) ) {\n\t\tthrow new TypeError( 'invalid argument. First argument must be an array. Value: `' + tokens + '`.' );\n\t}\n\tout = '';\n\tpos = 1;\n\tfor ( i = 0; i < tokens.length; i++ ) {\n\t\ttoken = tokens[ i ];\n\t\tif ( isString( token ) ) {\n\t\t\tout += token;\n\t\t} else {\n\t\t\thasPeriod = token.precision !== void 0;\n\t\t\ttoken = initialize( token );\n\t\t\tif ( !token.specifier ) {\n\t\t\t\tthrow new TypeError( 'invalid argument. Token is missing `specifier` property. Index: `'+ i +'`. Value: `' + token + '`.' );\n\t\t\t}\n\t\t\tif ( token.mapping ) {\n\t\t\t\tpos = token.mapping;\n\t\t\t}\n\t\t\tflags = token.flags;\n\t\t\tfor ( j = 0; j < flags.length; j++ ) {\n\t\t\t\tflag = flags.charAt( j );\n\t\t\t\tswitch ( flag ) {\n\t\t\t\tcase ' ':\n\t\t\t\t\ttoken.sign = ' ';\n\t\t\t\t\tbreak;\n\t\t\t\tcase '+':\n\t\t\t\t\ttoken.sign = '+';\n\t\t\t\t\tbreak;\n\t\t\t\tcase '-':\n\t\t\t\t\ttoken.padRight = true;\n\t\t\t\t\ttoken.padZeros = false;\n\t\t\t\t\tbreak;\n\t\t\t\tcase '0':\n\t\t\t\t\ttoken.padZeros = flags.indexOf( '-' ) < 0; // NOTE: We use built-in `Array.prototype.indexOf` here instead of `@stdlib/assert/contains` in order to avoid circular dependencies.\n\t\t\t\t\tbreak;\n\t\t\t\tcase '#':\n\t\t\t\t\ttoken.alternate = true;\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tthrow new Error( 'invalid flag: ' + flag );\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( token.width === '*' ) {\n\t\t\t\ttoken.width = parseInt( arguments[ pos ], 10 );\n\t\t\t\tpos += 1;\n\t\t\t\tif ( isnan( token.width ) ) {\n\t\t\t\t\tthrow new TypeError( 'the argument for * width at position ' + pos + ' is not a number. Value: `' + token.width + '`.' );\n\t\t\t\t}\n\t\t\t\tif ( token.width < 0 ) {\n\t\t\t\t\ttoken.padRight = true;\n\t\t\t\t\ttoken.width = -token.width;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( hasPeriod ) {\n\t\t\t\tif ( token.precision === '*' ) {\n\t\t\t\t\ttoken.precision = parseInt( arguments[ pos ], 10 );\n\t\t\t\t\tpos += 1;\n\t\t\t\t\tif ( isnan( token.precision ) ) {\n\t\t\t\t\t\tthrow new TypeError( 'the argument for * precision at position ' + pos + ' is not a number. Value: `' + token.precision + '`.' );\n\t\t\t\t\t}\n\t\t\t\t\tif ( token.precision < 0 ) {\n\t\t\t\t\t\ttoken.precision = 1;\n\t\t\t\t\t\thasPeriod = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\ttoken.arg = arguments[ pos ];\n\t\t\tswitch ( token.specifier ) {\n\t\t\tcase 'b':\n\t\t\tcase 'o':\n\t\t\tcase 'x':\n\t\t\tcase 'X':\n\t\t\tcase 'd':\n\t\t\tcase 'i':\n\t\t\tcase 'u':\n\t\t\t\t// Case: %b (binary), %o (octal), %x, %X (hexadecimal), %d, %i (decimal), %u (unsigned decimal)\n\t\t\t\tif ( hasPeriod ) {\n\t\t\t\t\ttoken.padZeros = false;\n\t\t\t\t}\n\t\t\t\ttoken.arg = formatInteger( token );\n\t\t\t\tbreak;\n\t\t\tcase 's':\n\t\t\t\t// Case: %s (string)\n\t\t\t\ttoken.maxWidth = ( hasPeriod ) ? token.precision : -1;\n\t\t\t\tbreak;\n\t\t\tcase 'c':\n\t\t\t\t// Case: %c (character)\n\t\t\t\tif ( !isnan( token.arg ) ) {\n\t\t\t\t\tnum = parseInt( token.arg, 10 );\n\t\t\t\t\tif ( num < 0 || num > 127 ) {\n\t\t\t\t\t\tthrow new Error( 'invalid character code. Value: ' + token.arg );\n\t\t\t\t\t}\n\t\t\t\t\ttoken.arg = ( isnan( num ) ) ?\n\t\t\t\t\t\tString( token.arg ) :\n\t\t\t\t\t\tfromCharCode( num );\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'e':\n\t\t\tcase 'E':\n\t\t\tcase 'f':\n\t\t\tcase 'F':\n\t\t\tcase 'g':\n\t\t\tcase 'G':\n\t\t\t\t// Case: %e, %E (scientific notation), %f, %F (decimal floating point), %g, %G (uses the shorter of %e/E or %f/F)\n\t\t\t\tif ( !hasPeriod ) {\n\t\t\t\t\ttoken.precision = 6;\n\t\t\t\t}\n\t\t\t\ttoken.arg = formatDouble( token );\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tthrow new Error( 'invalid specifier: ' + token.specifier );\n\t\t\t}\n\t\t\t// Fit argument into field width...\n\t\t\tif ( token.maxWidth >= 0 && token.arg.length > token.maxWidth ) {\n\t\t\t\ttoken.arg = token.arg.substring( 0, token.maxWidth );\n\t\t\t}\n\t\t\tif ( token.padZeros ) {\n\t\t\t\ttoken.arg = zeroPad( token.arg, token.width || token.precision, token.padRight ); // eslint-disable-line max-len\n\t\t\t} else if ( token.width ) {\n\t\t\t\ttoken.arg = spacePad( token.arg, token.width, token.padRight );\n\t\t\t}\n\t\t\tout += token.arg || '';\n\t\t\tpos += 1;\n\t\t}\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default formatInterpolate;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// VARIABLES //\n\nvar RE = /%(?:([1-9]\\d*)\\$)?([0 +\\-#]*)(\\*|\\d+)?(?:(\\.)(\\*|\\d+)?)?[hlL]?([%A-Za-z])/g;\n\n\n// FUNCTIONS //\n\n/**\n* Parses a delimiter.\n*\n* @private\n* @param {Array} match - regular expression match\n* @returns {Object} delimiter token object\n*/\nfunction parse( match ) {\n\tvar token = {\n\t\t'mapping': ( match[ 1 ] ) ? parseInt( match[ 1 ], 10 ) : void 0,\n\t\t'flags': match[ 2 ],\n\t\t'width': match[ 3 ],\n\t\t'precision': match[ 5 ],\n\t\t'specifier': match[ 6 ]\n\t};\n\tif ( match[ 4 ] === '.' && match[ 5 ] === void 0 ) {\n\t\ttoken.precision = '1';\n\t}\n\treturn token;\n}\n\n\n// MAIN //\n\n/**\n* Tokenizes a string into an array of string parts and format identifier objects.\n*\n* @param {string} str - input string\n* @returns {Array} tokens\n*\n* @example\n* var tokens = formatTokenize( 'Hello %s!' );\n* // returns [ 'Hello ', {...}, '!' ]\n*/\nfunction formatTokenize( str ) {\n\tvar content;\n\tvar tokens;\n\tvar match;\n\tvar prev;\n\n\ttokens = [];\n\tprev = 0;\n\tmatch = RE.exec( str );\n\twhile ( match ) {\n\t\tcontent = str.slice( prev, RE.lastIndex - match[ 0 ].length );\n\t\tif ( content.length ) {\n\t\t\ttokens.push( content );\n\t\t}\n\t\ttokens.push( parse( match ) );\n\t\tprev = RE.lastIndex;\n\t\tmatch = RE.exec( str );\n\t}\n\tcontent = str.slice( prev );\n\tif ( content.length ) {\n\t\ttokens.push( content );\n\t}\n\treturn tokens;\n}\n\n\n// EXPORTS //\n\nexport default formatTokenize;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Tests if a value is a string primitive.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a string primitive\n*\n* @example\n* var bool = isString( 'beep' );\n* // returns true\n*\n* @example\n* var bool = isString( new String( 'beep' ) );\n* // returns false\n*/\nfunction isString( value ) {\n\treturn ( typeof value === 'string' ); // NOTE: we inline the `isString.isPrimitive` function from `@stdlib/assert/is-string` in order to avoid circular dependencies.\n}\n\n\n// EXPORTS //\n\nexport default isString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport interpolate from '@stdlib/string-base-format-interpolate';\nimport tokenize from '@stdlib/string-base-format-tokenize';\nimport isString from './is_string.js';\n\n\n// MAIN //\n\n/**\n* Inserts supplied variable values into a format string.\n*\n* @param {string} str - input string\n* @param {Array} ...args - variable values\n* @throws {TypeError} first argument must be a string\n* @throws {Error} invalid flags\n* @returns {string} formatted string\n*\n* @example\n* var str = format( 'Hello %s!', 'world' );\n* // returns 'Hello world!'\n*\n* @example\n* var str = format( 'Pi: ~%.2f', 3.141592653589793 );\n* // returns 'Pi: ~3.14'\n*/\nfunction format( str ) {\n\tvar tokens;\n\tvar args;\n\tvar i;\n\n\tif ( !isString( str ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a string. Value: `%s`.', str ) );\n\t}\n\ttokens = tokenize( str );\n\targs = new Array( arguments.length );\n\targs[ 0 ] = tokens;\n\tfor ( i = 1; i < args.length; i++ ) {\n\t\targs[ i ] = arguments[ i ];\n\t}\n\treturn interpolate.apply( null, args );\n}\n\n\n// EXPORTS //\n\nexport default format;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable no-underscore-dangle, no-proto */\n\n'use strict';\n\n// MODULES //\n\nimport format from '@stdlib/string-format';\n\n\n// VARIABLES //\n\nvar objectProtoype = Object.prototype;\nvar toStr = objectProtoype.toString;\nvar defineGetter = objectProtoype.__defineGetter__;\nvar defineSetter = objectProtoype.__defineSetter__;\nvar lookupGetter = objectProtoype.__lookupGetter__;\nvar lookupSetter = objectProtoype.__lookupSetter__;\n\n\n// MAIN //\n\n/**\n* Defines (or modifies) an object property.\n*\n* ## Notes\n*\n* - Property descriptors come in two flavors: **data descriptors** and **accessor descriptors**. A data descriptor is a property that has a value, which may or may not be writable. An accessor descriptor is a property described by a getter-setter function pair. A descriptor must be one of these two flavors and cannot be both.\n*\n* @param {Object} obj - object on which to define the property\n* @param {string} prop - property name\n* @param {Object} descriptor - property descriptor\n* @param {boolean} [descriptor.configurable=false] - boolean indicating if property descriptor can be changed and if the property can be deleted from the provided object\n* @param {boolean} [descriptor.enumerable=false] - boolean indicating if the property shows up when enumerating object properties\n* @param {boolean} [descriptor.writable=false] - boolean indicating if the value associated with the property can be changed with an assignment operator\n* @param {*} [descriptor.value] - property value\n* @param {(Function|void)} [descriptor.get=undefined] - function which serves as a getter for the property, or, if no getter, undefined. When the property is accessed, a getter function is called without arguments and with the `this` context set to the object through which the property is accessed (which may not be the object on which the property is defined due to inheritance). The return value will be used as the property value.\n* @param {(Function|void)} [descriptor.set=undefined] - function which serves as a setter for the property, or, if no setter, undefined. When assigning a property value, a setter function is called with one argument (the value being assigned to the property) and with the `this` context set to the object through which the property is assigned.\n* @throws {TypeError} first argument must be an object\n* @throws {TypeError} third argument must be an object\n* @throws {Error} property descriptor cannot have both a value and a setter and/or getter\n* @returns {Object} object with added property\n*\n* @example\n* var obj = {};\n*\n* defineProperty( obj, 'foo', {\n* 'value': 'bar'\n* });\n*\n* var str = obj.foo;\n* // returns 'bar'\n*/\nfunction defineProperty( obj, prop, descriptor ) {\n\tvar prototype;\n\tvar hasValue;\n\tvar hasGet;\n\tvar hasSet;\n\n\tif ( typeof obj !== 'object' || obj === null || toStr.call( obj ) === '[object Array]' ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be an object. Value: `%s`.', obj ) );\n\t}\n\tif ( typeof descriptor !== 'object' || descriptor === null || toStr.call( descriptor ) === '[object Array]' ) {\n\t\tthrow new TypeError( format( 'invalid argument. Property descriptor must be an object. Value: `%s`.', descriptor ) );\n\t}\n\thasValue = ( 'value' in descriptor );\n\tif ( hasValue ) {\n\t\tif (\n\t\t\tlookupGetter.call( obj, prop ) ||\n\t\t\tlookupSetter.call( obj, prop )\n\t\t) {\n\t\t\t// Override `__proto__` to avoid touching inherited accessors:\n\t\t\tprototype = obj.__proto__;\n\t\t\tobj.__proto__ = objectProtoype;\n\n\t\t\t// Delete property as existing getters/setters prevent assigning value to specified property:\n\t\t\tdelete obj[ prop ];\n\t\t\tobj[ prop ] = descriptor.value;\n\n\t\t\t// Restore original prototype:\n\t\t\tobj.__proto__ = prototype;\n\t\t} else {\n\t\t\tobj[ prop ] = descriptor.value;\n\t\t}\n\t}\n\thasGet = ( 'get' in descriptor );\n\thasSet = ( 'set' in descriptor );\n\n\tif ( hasValue && ( hasGet || hasSet ) ) {\n\t\tthrow new Error( 'invalid argument. Cannot specify one or more accessors and a value or writable attribute in the property descriptor.' );\n\t}\n\n\tif ( hasGet && defineGetter ) {\n\t\tdefineGetter.call( obj, prop, descriptor.get );\n\t}\n\tif ( hasSet && defineSetter ) {\n\t\tdefineSetter.call( obj, prop, descriptor.set );\n\t}\n\treturn obj;\n}\n\n\n// EXPORTS //\n\nexport default defineProperty;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Define (or modify) an object property.\n*\n* @module @stdlib/utils-define-property\n*\n* @example\n* import defineProperty from '@stdlib/utils-define-property';\n*\n* var obj = {};\n* defineProperty( obj, 'foo', {\n* 'value': 'bar',\n* 'writable': false,\n* 'configurable': false,\n* 'enumerable': false\n* });\n* obj.foo = 'boop'; // => throws\n*/\n\n// MODULES //\n\nimport hasDefinePropertySupport from './has_define_property_support.js';\nimport builtin from './builtin.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar defineProperty;\nif ( hasDefinePropertySupport() ) {\n\tdefineProperty = builtin;\n} else {\n\tdefineProperty = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default defineProperty;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport defineProperty from './define_property.js';\n\n\n// MAIN //\n\n/**\n* Tests for `Object.defineProperty` support.\n*\n* @private\n* @returns {boolean} boolean indicating if an environment has `Object.defineProperty` support\n*\n* @example\n* var bool = hasDefinePropertySupport();\n* // returns \n*/\nfunction hasDefinePropertySupport() {\n\t// Test basic support...\n\ttry {\n\t\tdefineProperty( {}, 'x', {} );\n\t\treturn true;\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\treturn false;\n\t}\n}\n\n\n// EXPORTS //\n\nexport default hasDefinePropertySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport defineProperty from '@stdlib/utils-define-property';\n\n\n// MAIN //\n\n/**\n* Defines a non-enumerable read-only property.\n*\n* @param {Object} obj - object on which to define the property\n* @param {(string|symbol)} prop - property name\n* @param {*} value - value to set\n*\n* @example\n* var obj = {};\n*\n* setNonEnumerableReadOnly( obj, 'foo', 'bar' );\n*\n* try {\n* obj.foo = 'boop';\n* } catch ( err ) {\n* console.error( err.message );\n* }\n*/\nfunction setNonEnumerableReadOnly( obj, prop, value ) {\n\tdefineProperty( obj, prop, {\n\t\t'configurable': false,\n\t\t'enumerable': false,\n\t\t'writable': false,\n\t\t'value': value\n\t});\n}\n\n\n// EXPORTS //\n\nexport default setNonEnumerableReadOnly;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Tests if a value is a number primitive.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number primitive\n*\n* @example\n* var bool = isNumber( 3.14 );\n* // returns true\n*\n* @example\n* var bool = isNumber( NaN );\n* // returns true\n*\n* @example\n* var bool = isNumber( new Number( 3.14 ) );\n* // returns false\n*/\nfunction isNumber( value ) {\n\treturn ( typeof value === 'number' );\n}\n\n\n// EXPORTS //\n\nexport default isNumber;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport hasSymbols from '@stdlib/assert-has-symbol-support';\n\n\n// VARIABLES //\n\nvar FLG = hasSymbols();\n\n\n// MAIN //\n\n/**\n* Tests for native `toStringTag` support.\n*\n* @returns {boolean} boolean indicating if an environment has `toStringTag` support\n*\n* @example\n* var bool = hasToStringTagSupport();\n* // returns \n*/\nfunction hasToStringTagSupport() {\n\treturn ( FLG && typeof Symbol.toStringTag === 'symbol' );\n}\n\n\n// EXPORTS //\n\nexport default hasToStringTagSupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Tests for native `Symbol` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Symbol` support\n*\n* @example\n* var bool = hasSymbolSupport();\n* // returns \n*/\nfunction hasSymbolSupport() {\n\treturn (\n\t\ttypeof Symbol === 'function' &&\n\t\ttypeof Symbol( 'foo' ) === 'symbol'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default hasSymbolSupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar toStr = Object.prototype.toString;\n\n\n// EXPORTS //\n\nexport default toStr;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// FUNCTIONS //\n\nvar has = Object.prototype.hasOwnProperty;\n\n\n// MAIN //\n\n/**\n* Tests if an object has a specified property.\n*\n* @param {*} value - value to test\n* @param {*} property - property to test\n* @returns {boolean} boolean indicating if an object has a specified property\n*\n* @example\n* var beep = {\n* 'boop': true\n* };\n*\n* var bool = hasOwnProp( beep, 'boop' );\n* // returns true\n*\n* @example\n* var beep = {\n* 'boop': true\n* };\n*\n* var bool = hasOwnProp( beep, 'bap' );\n* // returns false\n*/\nfunction hasOwnProp( value, property ) {\n\tif (\n\t\tvalue === void 0 ||\n\t\tvalue === null\n\t) {\n\t\treturn false;\n\t}\n\treturn has.call( value, property );\n}\n\n\n// EXPORTS //\n\nexport default hasOwnProp;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar Sym = ( typeof Symbol === 'function' ) ? Symbol : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default Sym;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport Symbol from '@stdlib/symbol-ctor';\n\n\n// MAIN //\n\nvar toStrTag = ( typeof Symbol === 'function' ) ? Symbol.toStringTag : '';\n\n\n// EXPORTS //\n\nexport default toStrTag;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Return a string value indicating a specification defined classification of an object.\n*\n* @module @stdlib/utils-native-class\n*\n* @example\n* import nativeClass from '@stdlib/utils-native-class';\n*\n* var str = nativeClass( 'a' );\n* // returns '[object String]'\n*\n* str = nativeClass( 5 );\n* // returns '[object Number]'\n*\n* function Beep() {\n* return this;\n* }\n* str = nativeClass( new Beep() );\n* // returns '[object Object]'\n*/\n\n// MODULES //\n\nimport hasToStringTag from '@stdlib/assert-has-tostringtag-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar main;\nif ( hasToStringTag() ) {\n\tmain = polyfill;\n} else {\n\tmain = builtin;\n}\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport hasOwnProp from '@stdlib/assert-has-own-property';\nimport toStringTag from './tostringtag.js';\nimport toStr from './tostring.js';\n\n\n// MAIN //\n\n/**\n* Returns a string value indicating a specification defined classification of an object in environments supporting `Symbol.toStringTag`.\n*\n* @param {*} v - input value\n* @returns {string} string value indicating a specification defined classification of the input value\n*\n* @example\n* var str = nativeClass( 'a' );\n* // returns '[object String]'\n*\n* @example\n* var str = nativeClass( 5 );\n* // returns '[object Number]'\n*\n* @example\n* function Beep() {\n* return this;\n* }\n* var str = nativeClass( new Beep() );\n* // returns '[object Object]'\n*/\nfunction nativeClass( v ) {\n\tvar isOwn;\n\tvar tag;\n\tvar out;\n\n\tif ( v === null || v === void 0 ) {\n\t\treturn toStr.call( v );\n\t}\n\ttag = v[ toStringTag ];\n\tisOwn = hasOwnProp( v, toStringTag );\n\n\t// Attempt to override the `toStringTag` property. For built-ins having a `Symbol.toStringTag` property (e.g., `JSON`, `Math`, etc), the `Symbol.toStringTag` property is read-only (e.g., , so we need to wrap in a `try/catch`.\n\ttry {\n\t\tv[ toStringTag ] = void 0;\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\treturn toStr.call( v );\n\t}\n\tout = toStr.call( v );\n\n\tif ( isOwn ) {\n\t\tv[ toStringTag ] = tag;\n\t} else {\n\t\tdelete v[ toStringTag ];\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default nativeClass;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport toStr from './tostring.js';\n\n\n// MAIN //\n\n/**\n* Returns a string value indicating a specification defined classification (via the internal property `[[Class]]`) of an object.\n*\n* @param {*} v - input value\n* @returns {string} string value indicating a specification defined classification of the input value\n*\n* @example\n* var str = nativeClass( 'a' );\n* // returns '[object String]'\n*\n* @example\n* var str = nativeClass( 5 );\n* // returns '[object Number]'\n*\n* @example\n* function Beep() {\n* return this;\n* }\n* var str = nativeClass( new Beep() );\n* // returns '[object Object]'\n*/\nfunction nativeClass( v ) {\n\treturn toStr.call( v );\n}\n\n\n// EXPORTS //\n\nexport default nativeClass;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// EXPORTS //\n\nexport default Number; // eslint-disable-line stdlib/require-globals\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport Number from '@stdlib/number-ctor';\n\n\n// MAIN //\n\n// eslint-disable-next-line stdlib/no-redeclare\nvar toString = Number.prototype.toString; // non-generic\n\n\n// EXPORTS //\n\nexport default toString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport hasToStringTag from '@stdlib/assert-has-tostringtag-support';\nimport nativeClass from '@stdlib/utils-native-class';\nimport Number from '@stdlib/number-ctor';\nimport test from './try2serialize.js';\n\n\n// VARIABLES //\n\nvar FLG = hasToStringTag();\n\n\n// MAIN //\n\n/**\n* Tests if a value is a number object.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number object\n*\n* @example\n* var bool = isNumber( 3.14 );\n* // returns false\n*\n* @example\n* var bool = isNumber( new Number( 3.14 ) );\n* // returns true\n*/\nfunction isNumber( value ) {\n\tif ( typeof value === 'object' ) {\n\t\tif ( value instanceof Number ) {\n\t\t\treturn true;\n\t\t}\n\t\tif ( FLG ) {\n\t\t\treturn test( value );\n\t\t}\n\t\treturn ( nativeClass( value ) === '[object Number]' );\n\t}\n\treturn false;\n}\n\n\n// EXPORTS //\n\nexport default isNumber;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport toString from './tostring.js'; // eslint-disable-line stdlib/no-redeclare\n\n\n// MAIN //\n\n/**\n* Attempts to serialize a value to a string.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value can be serialized\n*/\nfunction test( value ) {\n\ttry {\n\t\ttoString.call( value );\n\t\treturn true;\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\treturn false;\n\t}\n}\n\n\n// EXPORTS //\n\nexport default test;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a number.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a number\n*\n* @example\n* var bool = isNumber( 3.14 );\n* // returns true\n*\n* @example\n* var bool = isNumber( new Number( 3.14 ) );\n* // returns true\n*\n* @example\n* var bool = isNumber( NaN );\n* // returns true\n*\n* @example\n* var bool = isNumber( null );\n* // returns false\n*/\nfunction isNumber( value ) {\n\treturn ( isPrimitive( value ) || isObject( value ) );\n}\n\n\n// EXPORTS //\n\nexport default isNumber;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test if a value is a number.\n*\n* @module @stdlib/assert-is-number\n*\n* @example\n* import isNumber from '@stdlib/assert-is-number';\n*\n* var bool = isNumber( 3.14 );\n* // returns true\n*\n* bool = isNumber( new Number( 3.14 ) );\n* // returns true\n*\n* bool = isNumber( NaN );\n* // returns true\n*\n* bool = isNumber( null );\n* // returns false\n*\n* @example\n* import { isPrimitive as isNumber } from '@stdlib/assert-is-number';\n*\n* var bool = isNumber( 3.14 );\n* // returns true\n*\n* bool = isNumber( NaN );\n* // returns true\n*\n* bool = isNumber( new Number( 3.14 ) );\n* // returns false\n*\n* @example\n* import { isObject as isNumber } from '@stdlib/assert-is-number';\n*\n* var bool = isNumber( 3.14 );\n* // returns false\n*\n* bool = isNumber( new Number( 3.14 ) );\n* // returns true\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'isPrimitive', isPrimitive );\nsetReadOnly( main, 'isObject', isObject );\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Double-precision floating-point positive infinity.\n*\n* @module @stdlib/constants-float64-pinf\n* @type {number}\n*\n* @example\n* import FLOAT64_PINF from '@stdlib/constants-float64-pinf';\n* // returns Infinity\n*/\n\n\n// MAIN //\n\n/**\n* Double-precision floating-point positive infinity.\n*\n* ## Notes\n*\n* Double-precision floating-point positive infinity has the bit sequence\n*\n* ```binarystring\n* 0 11111111111 00000000000000000000 00000000000000000000000000000000\n* ```\n*\n* @constant\n* @type {number}\n* @default Number.POSITIVE_INFINITY\n* @see [IEEE 754]{@link https://en.wikipedia.org/wiki/IEEE_754-1985}\n*/\nvar FLOAT64_PINF = Number.POSITIVE_INFINITY; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default FLOAT64_PINF;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Double-precision floating-point negative infinity.\n*\n* @module @stdlib/constants-float64-ninf\n* @type {number}\n*\n* @example\n* import FLOAT64_NINF from '@stdlib/constants-float64-ninf';\n* // returns -Infinity\n*/\n\n// MODULES //\n\nimport Number from '@stdlib/number-ctor';\n\n\n// MAIN //\n\n/**\n* Double-precision floating-point negative infinity.\n*\n* ## Notes\n*\n* Double-precision floating-point negative infinity has the bit sequence\n*\n* ```binarystring\n* 1 11111111111 00000000000000000000 00000000000000000000000000000000\n* ```\n*\n* @constant\n* @type {number}\n* @default Number.NEGATIVE_INFINITY\n* @see [IEEE 754]{@link https://en.wikipedia.org/wiki/IEEE_754-1985}\n*/\nvar FLOAT64_NINF = Number.NEGATIVE_INFINITY;\n\n\n// EXPORTS //\n\nexport default FLOAT64_NINF;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: implementation (?)\n\n/**\n* Rounds a double-precision floating-point number toward negative infinity.\n*\n* @param {number} x - input value\n* @returns {number} rounded value\n*\n* @example\n* var v = floor( -4.2 );\n* // returns -5.0\n*\n* @example\n* var v = floor( 9.99999 );\n* // returns 9.0\n*\n* @example\n* var v = floor( 0.0 );\n* // returns 0.0\n*\n* @example\n* var v = floor( NaN );\n* // returns NaN\n*/\nvar floor = Math.floor; // eslint-disable-line stdlib/no-builtin-math\n\n\n// EXPORTS //\n\nexport default floor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport floor from '@stdlib/math-base-special-floor';\n\n\n// MAIN //\n\n/**\n* Tests if a finite double-precision floating-point number is an integer.\n*\n* @param {number} x - value to test\n* @returns {boolean} boolean indicating whether the value is an integer\n*\n* @example\n* var bool = isInteger( 1.0 );\n* // returns true\n*\n* @example\n* var bool = isInteger( 3.14 );\n* // returns false\n*/\nfunction isInteger( x ) {\n\treturn (floor(x) === x);\n}\n\n\n// EXPORTS //\n\nexport default isInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport PINF from '@stdlib/constants-float64-pinf';\nimport NINF from '@stdlib/constants-float64-ninf';\nimport isInt from '@stdlib/math-base-assert-is-integer';\n\n\n// MAIN //\n\n/**\n* Tests if a number primitive is an integer value.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a number primitive is an integer value\n*/\nfunction isInteger( value ) {\n\treturn (\n\t\tvalue < PINF &&\n\t\tvalue > NINF &&\n\t\tisInt( value )\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isNumber } from '@stdlib/assert-is-number';\nimport isInt from './integer.js';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a number primitive having an integer value.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number primitive having an integer value\n*\n* @example\n* var bool = isInteger( -3.0 );\n* // returns true\n*\n* @example\n* var bool = isInteger( new Number( -3.0 ) );\n* // returns false\n*/\nfunction isInteger( value ) {\n\treturn (\n\t\tisNumber( value ) &&\n\t\tisInt( value )\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isObject as isNumber } from '@stdlib/assert-is-number';\nimport isInt from './integer.js';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a number object having an integer value.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number object having an integer value\n*\n* @example\n* var bool = isInteger( 3.0 );\n* // returns false\n*\n* @example\n* var bool = isInteger( new Number( 3.0 ) );\n* // returns true\n*/\nfunction isInteger( value ) {\n\treturn (\n\t\tisNumber( value ) &&\n\t\tisInt( value.valueOf() )\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\n/**\n* Tests if a value is an integer.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an integer\n*\n* @example\n* var bool = isInteger( 5.0 );\n* // returns true\n*\n* @example\n* var bool = isInteger( new Number( 5.0 ) );\n* // returns true\n*\n* @example\n* var bool = isInteger( -3.14 );\n* // returns false\n*\n* @example\n* var bool = isInteger( null );\n* // returns false\n*/\nfunction isInteger( value ) {\n\treturn ( isPrimitive( value ) || isObject( value ) );\n}\n\n\n// EXPORTS //\n\nexport default isInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isInteger } from '@stdlib/assert-is-integer';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a number primitive having a nonnegative integer value.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number primitive having a nonnegative integer value\n*\n* @example\n* var bool = isNonNegativeInteger( 3.0 );\n* // returns true\n*\n* @example\n* var bool = isNonNegativeInteger( new Number( 3.0 ) );\n* // returns false\n*/\nfunction isNonNegativeInteger( value ) {\n\treturn (\n\t\tisInteger( value ) &&\n\t\tvalue >= 0\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isNonNegativeInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isObject as isInteger } from '@stdlib/assert-is-integer';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a number object having a nonnegative integer value.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number object having a nonnegative integer value\n*\n* @example\n* var bool = isNonNegativeInteger( 3.0 );\n* // returns false\n*\n* @example\n* var bool = isNonNegativeInteger( new Number( 3.0 ) );\n* // returns true\n*/\nfunction isNonNegativeInteger( value ) {\n\treturn (\n\t\tisInteger( value ) &&\n\t\tvalue.valueOf() >= 0\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isNonNegativeInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a nonnegative integer.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a nonnegative integer\n*\n* @example\n* var bool = isNonNegativeInteger( 5.0 );\n* // returns true\n*\n* @example\n* var bool = isNonNegativeInteger( new Number( 5.0 ) );\n* // returns true\n*\n* @example\n* var bool = isNonNegativeInteger( -5.0 );\n* // returns false\n*\n* @example\n* var bool = isNonNegativeInteger( 3.14 );\n* // returns false\n*\n* @example\n* var bool = isNonNegativeInteger( null );\n* // returns false\n*/\nfunction isNonNegativeInteger( value ) {\n\treturn ( isPrimitive( value ) || isObject( value ) );\n}\n\n\n// EXPORTS //\n\nexport default isNonNegativeInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test if a value is an integer.\n*\n* @module @stdlib/assert-is-integer\n*\n* @example\n* import isInteger from '@stdlib/assert-is-integer';\n*\n* var bool = isInteger( 5.0 );\n* // returns true\n*\n* bool = isInteger( new Number( 5.0 ) );\n* // returns true\n*\n* bool = isInteger( -3.14 );\n* // returns false\n*\n* bool = isInteger( null );\n* // returns false\n*\n* @example\n* // Use interface to check for integer primitives...\n* import { isPrimitive as isInteger } from '@stdlib/assert-is-integer';\n*\n* var bool = isInteger( -3.0 );\n* // returns true\n*\n* bool = isInteger( new Number( -3.0 ) );\n* // returns false\n*\n* @example\n* // Use interface to check for integer objects...\n* import { isObject as isInteger } from '@stdlib/assert-is-integer';\n*\n* var bool = isInteger( 3.0 );\n* // returns false\n*\n* bool = isInteger( new Number( 3.0 ) );\n* // returns true\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'isPrimitive', isPrimitive );\nsetReadOnly( main, 'isObject', isObject );\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test if a value is a nonnegative integer.\n*\n* @module @stdlib/assert-is-nonnegative-integer\n*\n* @example\n* import isNonNegativeInteger from '@stdlib/assert-is-nonnegative-integer';\n*\n* var bool = isNonNegativeInteger( 5.0 );\n* // returns true\n*\n* bool = isNonNegativeInteger( new Number( 5.0 ) );\n* // returns true\n*\n* bool = isNonNegativeInteger( -5.0 );\n* // returns false\n*\n* bool = isNonNegativeInteger( 3.14 );\n* // returns false\n*\n* bool = isNonNegativeInteger( null );\n* // returns false\n*\n* @example\n* import { isPrimitive as isNonNegativeInteger } from '@stdlib/assert-is-nonnegative-integer';\n*\n* var bool = isNonNegativeInteger( 3.0 );\n* // returns true\n*\n* bool = isNonNegativeInteger( new Number( 3.0 ) );\n* // returns false\n*\n* @example\n* import { isObject as isNonNegativeInteger } from '@stdlib/assert-is-nonnegative-integer';\n*\n* var bool = isNonNegativeInteger( 3.0 );\n* // returns false\n*\n* bool = isNonNegativeInteger( new Number( 3.0 ) );\n* // returns true\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'isPrimitive', isPrimitive );\nsetReadOnly( main, 'isObject', isObject );\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasFloat64Array = ( typeof Float64Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Float64Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a Float64Array\n*\n* @example\n* var bool = isFloat64Array( new Float64Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isFloat64Array( [] );\n* // returns false\n*/\nfunction isFloat64Array( value ) {\n\treturn (\n\t\t( hasFloat64Array && value instanceof Float64Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Float64Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isFloat64Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Float64Array === 'function' ) ? Float64Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Float64Array === 'function' ) ? Float64Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of double-precision floating-point numbers in the platform byte order.\n*\n* @module @stdlib/array-float64\n*\n* @example\n* import ctor from '@stdlib/array-float64';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasFloat64ArraySupport from '@stdlib/assert-has-float64array-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasFloat64ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isFloat64Array from '@stdlib/assert-is-float64array';\nimport GlobalFloat64Array from './float64array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Float64Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Float64Array` support\n*\n* @example\n* var bool = hasFloat64ArraySupport();\n* // returns \n*/\nfunction hasFloat64ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalFloat64Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = new GlobalFloat64Array( [ 1.0, 3.14, -3.14, NaN ] );\n\t\tbool = (\n\t\t\tisFloat64Array( arr ) &&\n\t\t\tarr[ 0 ] === 1.0 &&\n\t\t\tarr[ 1 ] === 3.14 &&\n\t\t\tarr[ 2 ] === -3.14 &&\n\t\t\tarr[ 3 ] !== arr[ 3 ]\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasFloat64ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of double-precision floating-point numbers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasFloat32Array = ( typeof Float32Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Float32Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a Float32Array\n*\n* @example\n* var bool = isFloat32Array( new Float32Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isFloat32Array( [] );\n* // returns false\n*/\nfunction isFloat32Array( value ) {\n\treturn (\n\t\t( hasFloat32Array && value instanceof Float32Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Float32Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isFloat32Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Float32Array === 'function' ) ? Float32Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Float32Array === 'function' ) ? Float32Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of single-precision floating-point numbers in the platform byte order.\n*\n* @module @stdlib/array-float32\n*\n* @example\n* import ctor from '@stdlib/array-float32';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasFloat32ArraySupport from '@stdlib/assert-has-float32array-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasFloat32ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isFloat32Array from '@stdlib/assert-is-float32array';\nimport PINF from '@stdlib/constants-float64-pinf';\nimport GlobalFloat32Array from './float32array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Float32Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Float32Array` support\n*\n* @example\n* var bool = hasFloat32ArraySupport();\n* // returns \n*/\nfunction hasFloat32ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalFloat32Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = new GlobalFloat32Array( [ 1.0, 3.14, -3.14, 5.0e40 ] );\n\t\tbool = (\n\t\t\tisFloat32Array( arr ) &&\n\t\t\tarr[ 0 ] === 1.0 &&\n\t\t\tarr[ 1 ] === 3.140000104904175 &&\n\t\t\tarr[ 2 ] === -3.140000104904175 &&\n\t\t\tarr[ 3 ] === PINF\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasFloat32ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of single-precision floating-point numbers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasInt16Array = ( typeof Int16Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is an Int16Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an Int16Array\n*\n* @example\n* var bool = isInt16Array( new Int16Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isInt16Array( [] );\n* // returns false\n*/\nfunction isInt16Array( value ) {\n\treturn (\n\t\t( hasInt16Array && value instanceof Int16Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Int16Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isInt16Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum signed 16-bit integer.\n*\n* @module @stdlib/constants-int16-max\n* @type {integer32}\n*\n* @example\n* import INT16_MAX from '@stdlib/constants-int16-max';\n* // returns 32767\n*/\n\n\n// MAIN //\n\n/**\n* Maximum signed 16-bit integer.\n*\n* ## Notes\n*\n* The number has the value\n*\n* ```tex\n* 2^{15} - 1\n* ```\n*\n* which corresponds to the bit sequence\n*\n* ```binarystring\n* 0111111111111111\n* ```\n*\n* @constant\n* @type {integer32}\n* @default 32767\n*/\nvar INT16_MAX = 32767|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default INT16_MAX;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Int16Array === 'function' ) ? Int16Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Int16Array === 'function' ) ? Int16Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of twos-complement 16-bit signed integers in the platform byte order.\n*\n* @module @stdlib/array-int16\n*\n* @example\n* import ctor from '@stdlib/array-int16';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasInt16ArraySupport from '@stdlib/assert-has-int16array-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasInt16ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isInt16Array from '@stdlib/assert-is-int16array';\nimport INT16_MAX from '@stdlib/constants-int16-max';\nimport INT16_MIN from '@stdlib/constants-int16-min';\nimport GlobalInt16Array from './int16array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Int16Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Int16Array` support\n*\n* @example\n* var bool = hasInt16ArraySupport();\n* // returns \n*/\nfunction hasInt16ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalInt16Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = new GlobalInt16Array( [ 1, 3.14, -3.14, INT16_MAX+1 ] );\n\t\tbool = (\n\t\t\tisInt16Array( arr ) &&\n\t\t\tarr[ 0 ] === 1 &&\n\t\t\tarr[ 1 ] === 3 && // truncation\n\t\t\tarr[ 2 ] === -3 && // truncation\n\t\t\tarr[ 3 ] === INT16_MIN // wrap around\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasInt16ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Minimum signed 16-bit integer.\n*\n* @module @stdlib/constants-int16-min\n* @type {integer32}\n*\n* @example\n* import INT16_MIN from '@stdlib/constants-int16-min';\n* // returns -32768\n*/\n\n\n// MAIN //\n\n/**\n* Minimum signed 16-bit integer.\n*\n* ## Notes\n*\n* The number has the value\n*\n* ```tex\n* -(2^{15})\n* ```\n*\n* which corresponds to the two's complement bit sequence\n*\n* ```binarystring\n* 1000000000000000\n* ```\n*\n* @constant\n* @type {integer32}\n* @default -32768\n*/\nvar INT16_MIN = -32768|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default INT16_MIN;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of twos-complement 16-bit signed integers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasInt32Array = ( typeof Int32Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is an Int32Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an Int32Array\n*\n* @example\n* var bool = isInt32Array( new Int32Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isInt32Array( [] );\n* // returns false\n*/\nfunction isInt32Array( value ) {\n\treturn (\n\t\t( hasInt32Array && value instanceof Int32Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Int32Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isInt32Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum signed 32-bit integer.\n*\n* @module @stdlib/constants-int32-max\n* @type {integer32}\n*\n* @example\n* import INT32_MAX from '@stdlib/constants-int32-max';\n* // returns 2147483647\n*/\n\n\n// MAIN //\n\n/**\n* Maximum signed 32-bit integer.\n*\n* ## Notes\n*\n* The number has the value\n*\n* ```tex\n* 2^{31} - 1\n* ```\n*\n* which corresponds to the bit sequence\n*\n* ```binarystring\n* 01111111111111111111111111111111\n* ```\n*\n* @constant\n* @type {integer32}\n* @default 2147483647\n*/\nvar INT32_MAX = 2147483647|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default INT32_MAX;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Int32Array === 'function' ) ? Int32Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Int32Array === 'function' ) ? Int32Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of twos-complement 32-bit signed integers in the platform byte order.\n*\n* @module @stdlib/array-int32\n*\n* @example\n* import ctor from '@stdlib/array-int32';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasInt32ArraySupport from '@stdlib/assert-has-int32array-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasInt32ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isInt32Array from '@stdlib/assert-is-int32array';\nimport INT32_MAX from '@stdlib/constants-int32-max';\nimport INT32_MIN from '@stdlib/constants-int32-min';\nimport GlobalInt32Array from './int32array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Int32Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Int32Array` support\n*\n* @example\n* var bool = hasInt32ArraySupport();\n* // returns \n*/\nfunction hasInt32ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalInt32Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = new GlobalInt32Array( [ 1, 3.14, -3.14, INT32_MAX+1 ] );\n\t\tbool = (\n\t\t\tisInt32Array( arr ) &&\n\t\t\tarr[ 0 ] === 1 &&\n\t\t\tarr[ 1 ] === 3 && // truncation\n\t\t\tarr[ 2 ] === -3 && // truncation\n\t\t\tarr[ 3 ] === INT32_MIN // wrap around\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasInt32ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Minimum signed 32-bit integer.\n*\n* @module @stdlib/constants-int32-min\n* @type {integer32}\n*\n* @example\n* import INT32_MIN from '@stdlib/constants-int32-min';\n* // returns -2147483648\n*/\n\n\n// MAIN //\n\n/**\n* Minimum signed 32-bit integer.\n*\n* ## Notes\n*\n* The number has the value\n*\n* ```tex\n* -(2^{31})\n* ```\n*\n* which corresponds to the two's complement bit sequence\n*\n* ```binarystring\n* 10000000000000000000000000000000\n* ```\n*\n* @constant\n* @type {integer32}\n* @default -2147483648\n*/\nvar INT32_MIN = -2147483648|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default INT32_MIN;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of twos-complement 32-bit signed integers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasInt8Array = ( typeof Int8Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is an Int8Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an Int8Array\n*\n* @example\n* var bool = isInt8Array( new Int8Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isInt8Array( [] );\n* // returns false\n*/\nfunction isInt8Array( value ) {\n\treturn (\n\t\t( hasInt8Array && value instanceof Int8Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Int8Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isInt8Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum signed 8-bit integer.\n*\n* @module @stdlib/constants-int8-max\n* @type {integer32}\n*\n* @example\n* import INT8_MAX from '@stdlib/constants-int8-max';\n* // returns 127\n*/\n\n\n// MAIN //\n\n/**\n* Maximum signed 8-bit integer.\n*\n* ## Notes\n*\n* The number is given by\n*\n* ```tex\n* 2^{7} - 1\n* ```\n*\n* which corresponds to the bit sequence\n*\n* ```binarystring\n* 01111111\n* ```\n*\n* @constant\n* @type {integer32}\n* @default 127\n*/\nvar INT8_MAX = 127|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default INT8_MAX;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Int8Array === 'function' ) ? Int8Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Int8Array === 'function' ) ? Int8Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of twos-complement 8-bit signed integers in the platform byte order.\n*\n* @module @stdlib/array-int8\n*\n* @example\n* import ctor from '@stdlib/array-int8';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasInt8ArraySupport from '@stdlib/assert-has-int8array-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasInt8ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isInt8Array from '@stdlib/assert-is-int8array';\nimport INT8_MAX from '@stdlib/constants-int8-max';\nimport INT8_MIN from '@stdlib/constants-int8-min';\nimport GlobalInt8Array from './int8array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Int8Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Int8Array` support\n*\n* @example\n* var bool = hasInt8ArraySupport();\n* // returns \n*/\nfunction hasInt8ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalInt8Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = new GlobalInt8Array( [ 1, 3.14, -3.14, INT8_MAX+1 ] );\n\t\tbool = (\n\t\t\tisInt8Array( arr ) &&\n\t\t\tarr[ 0 ] === 1 &&\n\t\t\tarr[ 1 ] === 3 && // truncation\n\t\t\tarr[ 2 ] === -3 && // truncation\n\t\t\tarr[ 3 ] === INT8_MIN // wrap around\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasInt8ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Minimum signed 8-bit integer.\n*\n* @module @stdlib/constants-int8-min\n* @type {integer32}\n*\n* @example\n* import INT8_MIN from '@stdlib/constants-int8-min';\n* // returns -128\n*/\n\n\n// MAIN //\n\n/**\n* Minimum signed 8-bit integer.\n*\n* ## Notes\n*\n* The number is given by\n*\n* ```tex\n* -(2^{7})\n* ```\n*\n* which corresponds to the two's complement bit sequence\n*\n* ```binarystring\n* 10000000\n* ```\n*\n* @constant\n* @type {integer32}\n* @default -128\n*/\nvar INT8_MIN = -128|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default INT8_MIN;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of twos-complement 8-bit signed integers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasUint16Array = ( typeof Uint16Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Uint16Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a Uint16Array\n*\n* @example\n* var bool = isUint16Array( new Uint16Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isUint16Array( [] );\n* // returns false\n*/\nfunction isUint16Array( value ) {\n\treturn (\n\t\t( hasUint16Array && value instanceof Uint16Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Uint16Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isUint16Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum unsigned 16-bit integer.\n*\n* @module @stdlib/constants-uint16-max\n* @type {integer32}\n*\n* @example\n* import UINT16_MAX from '@stdlib/constants-uint16-max';\n* // returns 65535\n*/\n\n\n// MAIN //\n\n/**\n* Maximum unsigned 16-bit integer.\n*\n* ## Notes\n*\n* The number has the value\n*\n* ```tex\n* 2^{16} - 1\n* ```\n*\n* which corresponds to the bit sequence\n*\n* ```binarystring\n* 1111111111111111\n* ```\n*\n* @constant\n* @type {integer32}\n* @default 65535\n*/\nvar UINT16_MAX = 65535|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default UINT16_MAX;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Uint16Array === 'function' ) ? Uint16Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Uint16Array === 'function' ) ? Uint16Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of 16-bit unsigned integers in the platform byte order.\n*\n* @module @stdlib/array-uint16\n*\n* @example\n* import ctor from '@stdlib/array-uint16';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasUint16ArraySupport from '@stdlib/assert-has-uint16array-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasUint16ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isUint16Array from '@stdlib/assert-is-uint16array';\nimport UINT16_MAX from '@stdlib/constants-uint16-max';\nimport GlobalUint16Array from './uint16array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Uint16Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Uint16Array` support\n*\n* @example\n* var bool = hasUint16ArraySupport();\n* // returns \n*/\nfunction hasUint16ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalUint16Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = [ 1, 3.14, -3.14, UINT16_MAX+1, UINT16_MAX+2 ];\n\t\tarr = new GlobalUint16Array( arr );\n\t\tbool = (\n\t\t\tisUint16Array( arr ) &&\n\t\t\tarr[ 0 ] === 1 &&\n\t\t\tarr[ 1 ] === 3 && // truncation\n\t\t\tarr[ 2 ] === UINT16_MAX-2 && // truncation and wrap around\n\t\t\tarr[ 3 ] === 0 && // wrap around\n\t\t\tarr[ 4 ] === 1 // wrap around\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasUint16ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of 16-bit unsigned integers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasUint32Array = ( typeof Uint32Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Uint32Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a Uint32Array\n*\n* @example\n* var bool = isUint32Array( new Uint32Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isUint32Array( [] );\n* // returns false\n*/\nfunction isUint32Array( value ) {\n\treturn (\n\t\t( hasUint32Array && value instanceof Uint32Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Uint32Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isUint32Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum unsigned 32-bit integer.\n*\n* @module @stdlib/constants-uint32-max\n* @type {uinteger32}\n*\n* @example\n* import UINT32_MAX from '@stdlib/constants-uint32-max';\n* // returns 4294967295\n*/\n\n\n// MAIN //\n\n/**\n* Maximum unsigned 32-bit integer.\n*\n* ## Notes\n*\n* The number has the value\n*\n* ```tex\n* 2^{32} - 1\n* ```\n*\n* which corresponds to the bit sequence\n*\n* ```binarystring\n* 11111111111111111111111111111111\n* ```\n*\n* @constant\n* @type {uinteger32}\n* @default 4294967295\n*/\nvar UINT32_MAX = 4294967295;\n\n\n// EXPORTS //\n\nexport default UINT32_MAX;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Uint32Array === 'function' ) ? Uint32Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Uint32Array === 'function' ) ? Uint32Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of 32-bit unsigned integers in the platform byte order.\n*\n* @module @stdlib/array-uint32\n*\n* @example\n* import ctor from '@stdlib/array-uint32';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasUint32ArraySupport from '@stdlib/assert-has-uint32array-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasUint32ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isUint32Array from '@stdlib/assert-is-uint32array';\nimport UINT32_MAX from '@stdlib/constants-uint32-max';\nimport GlobalUint32Array from './uint32array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Uint32Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Uint32Array` support\n*\n* @example\n* var bool = hasUint32ArraySupport();\n* // returns \n*/\nfunction hasUint32ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalUint32Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = [ 1, 3.14, -3.14, UINT32_MAX+1, UINT32_MAX+2 ];\n\t\tarr = new GlobalUint32Array( arr );\n\t\tbool = (\n\t\t\tisUint32Array( arr ) &&\n\t\t\tarr[ 0 ] === 1 &&\n\t\t\tarr[ 1 ] === 3 && // truncation\n\t\t\tarr[ 2 ] === UINT32_MAX-2 && // truncation and wrap around\n\t\t\tarr[ 3 ] === 0 && // wrap around\n\t\t\tarr[ 4 ] === 1 // wrap around\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasUint32ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of 32-bit unsigned integers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasUint8Array = ( typeof Uint8Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Uint8Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a Uint8Array\n*\n* @example\n* var bool = isUint8Array( new Uint8Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isUint8Array( [] );\n* // returns false\n*/\nfunction isUint8Array( value ) {\n\treturn (\n\t\t( hasUint8Array && value instanceof Uint8Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Uint8Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isUint8Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum unsigned 8-bit integer.\n*\n* @module @stdlib/constants-uint8-max\n* @type {integer32}\n*\n* @example\n* import UINT8_MAX from '@stdlib/constants-uint8-max';\n* // returns 255\n*/\n\n\n// MAIN //\n\n/**\n* Maximum unsigned 8-bit integer.\n*\n* ## Notes\n*\n* The number has the value\n*\n* ```tex\n* 2^{8} - 1\n* ```\n*\n* which corresponds to the bit sequence\n*\n* ```binarystring\n* 11111111\n* ```\n*\n* @constant\n* @type {integer32}\n* @default 255\n*/\nvar UINT8_MAX = 255|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default UINT8_MAX;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Uint8Array === 'function' ) ? Uint8Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Uint8Array === 'function' ) ? Uint8Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of 8-bit unsigned integers in the platform byte order.\n*\n* @module @stdlib/array-uint8\n*\n* @example\n* import ctor from '@stdlib/array-uint8';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasUint8ArraySupport from '@stdlib/assert-has-uint8array-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasUint8ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isUint8Array from '@stdlib/assert-is-uint8array';\nimport UINT8_MAX from '@stdlib/constants-uint8-max';\nimport GlobalUint8Array from './uint8array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Uint8Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Uint8Array` support\n*\n* @example\n* var bool = hasUint8ArraySupport();\n* // returns \n*/\nfunction hasUint8ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalUint8Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = [ 1, 3.14, -3.14, UINT8_MAX+1, UINT8_MAX+2 ];\n\t\tarr = new GlobalUint8Array( arr );\n\t\tbool = (\n\t\t\tisUint8Array( arr ) &&\n\t\t\tarr[ 0 ] === 1 &&\n\t\t\tarr[ 1 ] === 3 && // truncation\n\t\t\tarr[ 2 ] === UINT8_MAX-2 && // truncation and wrap around\n\t\t\tarr[ 3 ] === 0 && // wrap around\n\t\t\tarr[ 4 ] === 1 // wrap around\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasUint8ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of 8-bit unsigned integers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasUint8ClampedArray = ( typeof Uint8ClampedArray === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Uint8ClampedArray.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a Uint8ClampedArray\n*\n* @example\n* var bool = isUint8ClampedArray( new Uint8ClampedArray( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isUint8ClampedArray( [] );\n* // returns false\n*/\nfunction isUint8ClampedArray( value ) {\n\treturn (\n\t\t( hasUint8ClampedArray && value instanceof Uint8ClampedArray ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Uint8ClampedArray]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isUint8ClampedArray;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Uint8ClampedArray === 'function' ) ? Uint8ClampedArray : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Uint8ClampedArray === 'function' ) ? Uint8ClampedArray : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of 8-bit unsigned integers in the platform byte order clamped to 0-255.\n*\n* @module @stdlib/array-uint8c\n*\n* @example\n* import ctor from '@stdlib/array-uint8c';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasUint8ClampedArraySupport from '@stdlib/assert-has-uint8clampedarray-support'; // eslint-disable-line id-length\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasUint8ClampedArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isUint8ClampedArray from '@stdlib/assert-is-uint8clampedarray';\nimport GlobalUint8ClampedArray from './uint8clampedarray.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Uint8ClampedArray` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Uint8ClampedArray` support\n*\n* @example\n* var bool = hasUint8ClampedArraySupport();\n* // returns \n*/\nfunction hasUint8ClampedArraySupport() { // eslint-disable-line id-length\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalUint8ClampedArray !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = new GlobalUint8ClampedArray( [ -1, 0, 1, 3.14, 4.99, 255, 256 ] );\n\t\tbool = (\n\t\t\tisUint8ClampedArray( arr ) &&\n\t\t\tarr[ 0 ] === 0 && // clamped\n\t\t\tarr[ 1 ] === 0 &&\n\t\t\tarr[ 2 ] === 1 &&\n\t\t\tarr[ 3 ] === 3 && // round to nearest\n\t\t\tarr[ 4 ] === 5 && // round to nearest\n\t\t\tarr[ 5 ] === 255 &&\n\t\t\tarr[ 6 ] === 255 // clamped\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasUint8ClampedArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of 8-bit unsigned integers in the platform byte order clamped to 0-255.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isInteger from '@stdlib/math-base-assert-is-integer';\nimport MAX_LENGTH from '@stdlib/constants-array-max-array-length';\n\n\n// MAIN //\n\n/**\n* Tests if a value is an array-like object.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is an array-like object\n*\n* @example\n* var bool = isArrayLikeObject( [] );\n* // returns true\n*\n* @example\n* var bool = isArrayLikeObject( { 'length':10 } );\n* // returns true\n*\n* @example\n* var bool = isArrayLikeObject( 'beep' );\n* // returns false\n*/\nfunction isArrayLikeObject( value ) {\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\ttypeof value.length === 'number' &&\n\t\tisInteger( value.length ) &&\n\t\tvalue.length >= 0 &&\n\t\tvalue.length <= MAX_LENGTH\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isArrayLikeObject;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum length of a generic array.\n*\n* @module @stdlib/constants-array-max-array-length\n*\n* @example\n* import MAX_ARRAY_LENGTH from '@stdlib/constants-array-max-array-length';\n* // returns 4294967295\n*/\n\n// MAIN //\n\n/**\n* Maximum length of a generic array.\n*\n* ```tex\n* 2^{32} - 1\n* ```\n*\n* @constant\n* @type {uinteger32}\n* @default 4294967295\n*/\nvar MAX_ARRAY_LENGTH = 4294967295>>>0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default MAX_ARRAY_LENGTH;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isInteger from '@stdlib/math-base-assert-is-integer';\nimport MAX_LENGTH from '@stdlib/constants-array-max-typed-array-length';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a collection.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether a value is a collection\n*\n* @example\n* var bool = isCollection( [] );\n* // returns true\n*\n* @example\n* var bool = isCollection( {} );\n* // returns false\n*/\nfunction isCollection( value ) {\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\ttypeof value.length === 'number' &&\n\t\tisInteger( value.length ) &&\n\t\tvalue.length >= 0 &&\n\t\tvalue.length <= MAX_LENGTH\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isCollection;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum length of a typed array.\n*\n* @module @stdlib/constants-array-max-typed-array-length\n*\n* @example\n* import MAX_TYPED_ARRAY_LENGTH from '@stdlib/constants-array-max-typed-array-length';\n* // returns 9007199254740991\n*/\n\n// MAIN //\n\n/**\n* Maximum length of a typed array.\n*\n* ```tex\n* 2^{53} - 1\n* ```\n*\n* @constant\n* @type {number}\n* @default 9007199254740991\n*/\nvar MAX_TYPED_ARRAY_LENGTH = 9007199254740991;\n\n\n// EXPORTS //\n\nexport default MAX_TYPED_ARRAY_LENGTH;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasArrayBuffer = ( typeof ArrayBuffer === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is an ArrayBuffer.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an ArrayBuffer\n*\n* @example\n* import ArrayBuffer from '@stdlib/array-buffer';\n*\n* var bool = isArrayBuffer( new ArrayBuffer( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isArrayBuffer( [] );\n* // returns false\n*/\nfunction isArrayBuffer( value ) {\n\treturn (\n\t\t( hasArrayBuffer && value instanceof ArrayBuffer ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object ArrayBuffer]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isArrayBuffer;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar f;\n\n\n// FUNCTIONS //\n\n/**\n* Tests if a value is an array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an array\n*\n* @example\n* var bool = isArray( [] );\n* // returns true\n*\n* @example\n* var bool = isArray( {} );\n* // returns false\n*/\nfunction isArray( value ) {\n\treturn ( nativeClass( value ) === '[object Array]' );\n}\n\n\n// MAIN //\n\nif ( Array.isArray ) {\n\tf = Array.isArray;\n} else {\n\tf = isArray;\n}\n\n\n// EXPORTS //\n\nexport default f;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isArray from '@stdlib/assert-is-array';\n\n\n// MAIN //\n\n/**\n* Tests if a value is an object; e.g., `{}`.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an object\n*\n* @example\n* var bool = isObject( {} );\n* // returns true\n*\n* @example\n* var bool = isObject( null );\n* // returns false\n*/\nfunction isObject( value ) {\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\t!isArray( value )\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isObject;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\nvar RE = /./;\n\n\n// EXPORTS //\n\nexport default RE;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Tests if a value is a boolean primitive.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a boolean primitive\n*\n* @example\n* var bool = isBoolean( true );\n* // returns true\n*\n* @example\n* var bool = isBoolean( false );\n* // returns true\n*\n* @example\n* import Boolean from '@stdlib/boolean-ctor';\n*\n* var bool = isBoolean( new Boolean( true ) );\n* // returns false\n*/\nfunction isBoolean( value ) {\n\treturn ( typeof value === 'boolean' );\n}\n\n\n// EXPORTS //\n\nexport default isBoolean;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Returns a boolean.\n*\n* @name Boolean\n* @constructor\n* @type {Function}\n* @param {*} value - input value\n* @returns {(boolean|Boolean)} boolean\n*\n* @example\n* var b = Boolean( null );\n* // returns false\n*\n* b = Boolean( [] );\n* // returns true\n*\n* b = Boolean( {} );\n* // returns true\n*\n* @example\n* var b = new Boolean( false );\n* // returns \n*/\nvar Bool = Boolean; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default Bool;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// eslint-disable-next-line stdlib/no-redeclare\nvar toString = Boolean.prototype.toString; // non-generic\n\n\n// EXPORTS //\n\nexport default toString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport hasToStringTag from '@stdlib/assert-has-tostringtag-support';\nimport nativeClass from '@stdlib/utils-native-class';\nimport Boolean from '@stdlib/boolean-ctor';\nimport test from './try2serialize.js';\n\n\n// VARIABLES //\n\nvar FLG = hasToStringTag();\n\n\n// MAIN //\n\n/**\n* Tests if a value is a boolean object.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a boolean object\n*\n* @example\n* var bool = isBoolean( true );\n* // returns false\n*\n* @example\n* import Boolean from '@stdlib/boolean-ctor';\n*\n* var bool = isBoolean( new Boolean( false ) );\n* // returns true\n*/\nfunction isBoolean( value ) {\n\tif ( typeof value === 'object' ) {\n\t\tif ( value instanceof Boolean ) {\n\t\t\treturn true;\n\t\t}\n\t\tif ( FLG ) {\n\t\t\treturn test( value );\n\t\t}\n\t\treturn ( nativeClass( value ) === '[object Boolean]' );\n\t}\n\treturn false;\n}\n\n\n// EXPORTS //\n\nexport default isBoolean;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport toString from './tostring.js'; // eslint-disable-line stdlib/no-redeclare\n\n\n// MAIN //\n\n/**\n* Attempts to serialize a value to a string.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value can be serialized\n*/\nfunction test( value ) {\n\ttry {\n\t\ttoString.call( value );\n\t\treturn true;\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\treturn false;\n\t}\n}\n\n\n// EXPORTS //\n\nexport default test;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a boolean.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a boolean\n*\n* @example\n* var bool = isBoolean( false );\n* // returns true\n*\n* @example\n* var bool = isBoolean( true );\n* // returns true\n*\n* @example\n* import Boolean from '@stdlib/boolean-ctor';\n*\n* var bool = isBoolean( new Boolean( false ) );\n* // returns true\n*\n* @example\n* import Boolean from '@stdlib/boolean-ctor';\n*\n* var bool = isBoolean( new Boolean( true ) );\n* // returns true\n*/\nfunction isBoolean( value ) {\n\treturn ( isPrimitive( value ) || isObject( value ) );\n}\n\n\n// EXPORTS //\n\nexport default isBoolean;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Returns the global object using code generation.\n*\n* @private\n* @returns {Object} global object\n*/\nfunction getGlobal() {\n\treturn new Function( 'return this;' )(); // eslint-disable-line no-new-func, stdlib/require-globals\n}\n\n\n// EXPORTS //\n\nexport default getGlobal;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test if a value is a boolean.\n*\n* @module @stdlib/assert-is-boolean\n*\n* @example\n* import Boolean from '@stdlib/boolean-ctor';\n* import isBoolean from '@stdlib/assert-is-boolean';\n*\n* var bool = isBoolean( false );\n* // returns true\n*\n* bool = isBoolean( new Boolean( false ) );\n* // returns true\n*\n* @example\n* import Boolean from '@stdlib/boolean-ctor';\n* import { isPrimitive as isBoolean } from '@stdlib/assert-is-boolean';\n*\n* var bool = isBoolean( false );\n* // returns true\n*\n* bool = isBoolean( new Boolean( true ) );\n* // returns false\n*\n* @example\n* import Boolean from '@stdlib/boolean-ctor';\n* import { isObject as isBoolean } from '@stdlib/assert-is-boolean';\n*\n* var bool = isBoolean( true );\n* // returns false\n*\n* bool = isBoolean( new Boolean( false ) );\n* // returns true\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'isPrimitive', isPrimitive );\nsetReadOnly( main, 'isObject', isObject );\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar obj = ( typeof self === 'object' ) ? self : null;\n\n\n// EXPORTS //\n\nexport default obj;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar obj = ( typeof window === 'object' ) ? window : null;\n\n\n// EXPORTS //\n\nexport default obj;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar obj = ( typeof global === 'object' ) ? global : null;\n\n\n// EXPORTS //\n\nexport default obj;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar obj = ( typeof globalThis === 'object' ) ? globalThis : null; // eslint-disable-line no-undef\n\n\n// EXPORTS //\n\nexport default obj;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport getGlobal from '@stdlib/utils-global';\n\n\n// MAIN //\n\nvar root = getGlobal();\nvar nodeList = root.document && root.document.childNodes;\n\n\n// EXPORTS //\n\nexport default nodeList;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isBoolean } from '@stdlib/assert-is-boolean';\nimport format from '@stdlib/string-format';\nimport getThis from './codegen.js';\nimport Self from './self.js';\nimport Win from './window.js';\nimport Global from './global.js';\nimport GlobalThis from './global_this.js';\n\n\n// MAIN //\n\n/**\n* Returns the global object.\n*\n* ## Notes\n*\n* - Using code generation is the **most** reliable way to resolve the global object; however, doing so is likely to violate content security policies (CSPs) in, e.g., Chrome Apps and elsewhere.\n*\n* @param {boolean} [codegen=false] - boolean indicating whether to use code generation to resolve the global object\n* @throws {TypeError} must provide a boolean\n* @throws {Error} unable to resolve global object\n* @returns {Object} global object\n*\n* @example\n* var g = getGlobal();\n* // returns {...}\n*/\nfunction getGlobal( codegen ) {\n\tif ( arguments.length ) {\n\t\tif ( !isBoolean( codegen ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Must provide a boolean. Value: `%s`.', codegen ) );\n\t\t}\n\t\tif ( codegen ) {\n\t\t\treturn getThis();\n\t\t}\n\t\t// Fall through...\n\t}\n\t// Case: 2020 revision of ECMAScript standard\n\tif ( GlobalThis ) {\n\t\treturn GlobalThis;\n\t}\n\t// Case: browsers and web workers\n\tif ( Self ) {\n\t\treturn Self;\n\t}\n\t// Case: browsers\n\tif ( Win ) {\n\t\treturn Win;\n\t}\n\t// Case: Node.js\n\tif ( Global ) {\n\t\treturn Global;\n\t}\n\t// Case: unknown\n\tthrow new Error( 'unexpected error. Unable to resolve global object.' );\n}\n\n\n// EXPORTS //\n\nexport default getGlobal;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\nvar typedarray = Int8Array; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default typedarray;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Returns a regular expression to capture everything that is not a space immediately after the `function` keyword and before the first left parenthesis.\n*\n* @returns {RegExp} regular expression\n*\n* @example\n* var RE_FUNCTION_NAME = reFunctionName();\n*\n* function fname( fcn ) {\n* return RE_FUNCTION_NAME.exec( fcn.toString() )[ 1 ];\n* }\n*\n* var fn = fname( Math.sqrt );\n* // returns 'sqrt'\n*\n* fn = fname( Int8Array );\n* // returns 'Int8Array'\n*\n* fn = fname( Object.prototype.toString );\n* // returns 'toString'\n*\n* fn = fname( function(){} );\n* // returns ''\n*/\nfunction reFunctionName() {\n\treturn /^\\s*function\\s*([^(]*)/i;\n}\n\n\n// EXPORTS //\n\nexport default reFunctionName;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport reFunctionName from './main.js';\n\n\n// MAIN //\n\n/**\n* Captures everything that is not a space immediately after the `function` keyword and before the first left parenthesis.\n*\n* Regular expression: `/^\\s*function\\s*([^(]*)/i`\n*\n* - `/^\\s*`\n* - Match zero or more spaces at beginning\n*\n* - `function`\n* - Match the word `function`\n*\n* - `\\s*`\n* - Match zero or more spaces after the word `function`\n*\n* - `()`\n* - Capture\n*\n* - `[^(]*`\n* - Match anything except a left parenthesis `(` zero or more times\n*\n* - `/i`\n* - ignore case\n*\n* @constant\n* @type {RegExp}\n* @default /^\\s*function\\s*([^(]*)/i\n*/\nvar RE_FUNCTION_NAME = reFunctionName();\n\n\n// EXPORTS //\n\nexport default RE_FUNCTION_NAME;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Tests if a value is object-like.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether a value is object-like\n*\n* @example\n* var bool = isObjectLike( {} );\n* // returns true\n*\n* @example\n* var bool = isObjectLike( [] );\n* // returns true\n*\n* @example\n* var bool = isObjectLike( null );\n* // returns false\n*/\nfunction isObjectLike( value ) {\n\treturn (\n\t\tvalue !== null &&\n\t\ttypeof value === 'object'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isObjectLike;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\nimport { REGEXP as RE } from '@stdlib/regexp-function-name';\nimport isBuffer from '@stdlib/assert-is-buffer';\n\n\n// MAIN //\n\n/**\n* Determines the name of a value's constructor.\n*\n* @param {*} v - input value\n* @returns {string} name of a value's constructor\n*\n* @example\n* var v = constructorName( 'a' );\n* // returns 'String'\n*\n* @example\n* var v = constructorName( 5 );\n* // returns 'Number'\n*\n* @example\n* var v = constructorName( null );\n* // returns 'Null'\n*\n* @example\n* var v = constructorName( undefined );\n* // returns 'Undefined'\n*\n* @example\n* var v = constructorName( function noop() {} );\n* // returns 'Function'\n*/\nfunction constructorName( v ) {\n\tvar match;\n\tvar name;\n\tvar ctor;\n\tname = nativeClass( v ).slice( 8, -1 );\n\tif ( (name === 'Object' || name === 'Error') && v.constructor ) {\n\t\tctor = v.constructor;\n\t\tif ( typeof ctor.name === 'string' ) {\n\t\t\treturn ctor.name;\n\t\t}\n\t\tmatch = RE.exec( ctor.toString() );\n\t\tif ( match ) {\n\t\t\treturn match[ 1 ];\n\t\t}\n\t}\n\tif ( isBuffer( v ) ) {\n\t\treturn 'Buffer';\n\t}\n\treturn name;\n}\n\n\n// EXPORTS //\n\nexport default constructorName;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isObjectLike from '@stdlib/assert-is-object-like';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Buffer instance.\n*\n* @param {*} value - value to validate\n* @returns {boolean} boolean indicating if a value is a Buffer instance\n*\n* @example\n* var v = isBuffer( new Buffer( 'beep' ) );\n* // returns true\n*\n* @example\n* var v = isBuffer( new Buffer( [1,2,3,4] ) );\n* // returns true\n*\n* @example\n* var v = isBuffer( {} );\n* // returns false\n*\n* @example\n* var v = isBuffer( [] );\n* // returns false\n*/\nfunction isBuffer( value ) {\n\treturn (\n\t\tisObjectLike( value ) &&\n\t\t(\n\t\t\t// eslint-disable-next-line no-underscore-dangle\n\t\t\tvalue._isBuffer || // for envs missing Object.prototype.constructor (e.g., Safari 5-7)\n\t\t\t(\n\t\t\t\tvalue.constructor &&\n\n\t\t\t\t// WARNING: `typeof` is not a foolproof check, as certain envs consider RegExp and NodeList instances to be functions\n\t\t\t\ttypeof value.constructor.isBuffer === 'function' &&\n\t\t\t\tvalue.constructor.isBuffer( value )\n\t\t\t)\n\t\t)\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isBuffer;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Regular expression to capture everything that is not a space immediately after the `function` keyword and before the first left parenthesis.\n*\n* @module @stdlib/regexp-function-name\n*\n* @example\n* import reFunctionName from '@stdlib/regexp-function-name';\n* var RE_FUNCTION_NAME = reFunctionName();\n*\n* function fname( fcn ) {\n* return RE_FUNCTION_NAME.exec( fcn.toString() )[ 1 ];\n* }\n*\n* var fn = fname( Math.sqrt );\n* // returns 'sqrt'\n*\n* fn = fname( Int8Array );\n* // returns 'Int8Array'\n*\n* fn = fname( Object.prototype.toString );\n* // returns 'toString'\n*\n* fn = fname( function(){} );\n* // returns ''\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport REGEXP from './regexp.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'REGEXP', REGEXP );\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test if a value is object-like.\n*\n* @module @stdlib/assert-is-object-like\n*\n* @example\n* import isObjectLike from '@stdlib/assert-is-object-like';\n*\n* var bool = isObjectLike( {} );\n* // returns true\n*\n* bool = isObjectLike( [] );\n* // returns true\n*\n* bool = isObjectLike( null );\n* // returns false\n*\n* @example\n* import { isObjectLikeArray as isObjectLike } from '@stdlib/assert-is-object-like';\n*\n* var bool = isObjectLike( [ {}, [] ] );\n* // returns true\n*\n* bool = isObjectLike( [ {}, '3.0' ] );\n* // returns false\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport arrayfun from '@stdlib/assert-tools-array-function';\nimport main from './main.js';\n\n\n// VARIABLES //\n\nvar isObjectLikeArray = arrayfun( main );\n\n\n// MAIN //\n\nsetReadOnly( main, 'isObjectLikeArray', isObjectLikeArray );\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isArray from '@stdlib/assert-is-array';\nimport format from '@stdlib/string-format';\n\n\n// MAIN //\n\n/**\n* Returns a function which tests if every element in an array passes a test condition.\n*\n* @param {Function} predicate - function to apply\n* @throws {TypeError} must provide a function\n* @returns {Function} an array function\n*\n* @example\n* import isOdd from '@stdlib/assert-is-odd';\n*\n* var arr1 = [ 1, 3, 5, 7 ];\n* var arr2 = [ 3, 5, 8 ];\n*\n* var validate = arrayfcn( isOdd );\n*\n* var bool = validate( arr1 );\n* // returns true\n*\n* bool = validate( arr2 );\n* // returns false\n*/\nfunction arrayfcn( predicate ) {\n\tif ( typeof predicate !== 'function' ) {\n\t\tthrow new TypeError( format( 'invalid argument. Must provide a function. Value: `%s`.', predicate ) );\n\t}\n\treturn every;\n\n\t/**\n\t* Tests if every element in an array passes a test condition.\n\t*\n\t* @private\n\t* @param {*} value - value to test\n\t* @returns {boolean} boolean indicating whether a value is an array for which all elements pass a test condition\n\t*/\n\tfunction every( value ) {\n\t\tvar len;\n\t\tvar i;\n\t\tif ( !isArray( value ) ) {\n\t\t\treturn false;\n\t\t}\n\t\tlen = value.length;\n\t\tif ( len === 0 ) {\n\t\t\treturn false;\n\t\t}\n\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\tif ( predicate( value[ i ] ) === false ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}\n}\n\n\n// EXPORTS //\n\nexport default arrayfcn;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Determine a value's type.\n*\n* @module @stdlib/utils-type-of\n*\n* @example\n* import typeOf from '@stdlib/utils-type-of';\n*\n* var str = typeOf( 'a' );\n* // returns 'string'\n*\n* str = typeOf( 5 );\n* // returns 'number'\n*/\n\n// MODULES //\n\nimport usePolyfill from './check.js';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar main = ( usePolyfill() ) ? polyfill : builtin;\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport RE from './fixtures/re.js';\nimport nodeList from './fixtures/nodelist.js';\nimport typedarray from './fixtures/typedarray.js';\n\n\n// MAIN //\n\n/**\n* Checks whether a polyfill is needed when using the `typeof` operator.\n*\n* @private\n* @returns {boolean} boolean indicating whether a polyfill is needed\n*/\nfunction check() {\n\tif (\n\t\t// Chrome 1-12 returns 'function' for regular expression instances (see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/typeof):\n\t\ttypeof RE === 'function' ||\n\n\t\t// Safari 8 returns 'object' for typed array and weak map constructors (underscore #1929):\n\t\ttypeof typedarray === 'object' ||\n\n\t\t// PhantomJS 1.9 returns 'function' for `NodeList` instances (underscore #2236):\n\t\ttypeof nodeList === 'function'\n\t) {\n\t\treturn true;\n\t}\n\treturn false;\n}\n\n\n// EXPORTS //\n\nexport default check;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport ctorName from '@stdlib/utils-constructor-name';\n\n\n// MAIN //\n\n/**\n* Determines a value's type.\n*\n* @param {*} v - input value\n* @returns {string} string indicating the value's type\n*/\nfunction typeOf( v ) {\n\treturn ctorName( v ).toLowerCase();\n}\n\n\n// EXPORTS //\n\nexport default typeOf;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport ctorName from '@stdlib/utils-constructor-name';\n\n\n// NOTES //\n\n/*\n* Built-in `typeof` operator behavior:\n*\n* ```text\n* typeof null => 'object'\n* typeof undefined => 'undefined'\n* typeof 'a' => 'string'\n* typeof 5 => 'number'\n* typeof NaN => 'number'\n* typeof true => 'boolean'\n* typeof false => 'boolean'\n* typeof {} => 'object'\n* typeof [] => 'object'\n* typeof function foo(){} => 'function'\n* typeof function* foo(){} => 'object'\n* typeof Symbol() => 'symbol'\n* ```\n*\n*/\n\n\n// MAIN //\n\n/**\n* Determines a value's type.\n*\n* @param {*} v - input value\n* @returns {string} string indicating the value's type\n*/\nfunction typeOf( v ) {\n\tvar type;\n\n\t// Address `typeof null` => `object` (see http://wiki.ecmascript.org/doku.php?id=harmony:typeof_null):\n\tif ( v === null ) {\n\t\treturn 'null';\n\t}\n\ttype = typeof v;\n\n\t// If the `typeof` operator returned something other than `object`, we are done. Otherwise, we need to check for an internal class name or search for a constructor.\n\tif ( type === 'object' ) {\n\t\treturn ctorName( v ).toLowerCase();\n\t}\n\treturn type;\n}\n\n\n// EXPORTS //\n\nexport default typeOf;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport typeOf from '@stdlib/utils-type-of';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a function.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a function\n*\n* @example\n* function beep() {\n* return 'beep';\n* }\n*\n* var bool = isFunction( beep );\n* // returns true\n*/\nfunction isFunction( value ) {\n\t// Note: cannot use `typeof` directly, as various browser engines incorrectly return `'function'` when operating on non-function objects, such as regular expressions and NodeLists.\n\treturn ( typeOf( value ) === 'function' );\n}\n\n\n// EXPORTS //\n\nexport default isFunction;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isNumber } from '@stdlib/assert-is-number';\nimport defineProperty from '@stdlib/utils-define-property';\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport format from '@stdlib/string-format';\nimport toStr from './tostring.js';\nimport toJSON from './tojson.js';\n\n\n// MAIN //\n\n/**\n* 128-bit complex number constructor.\n*\n* @constructor\n* @param {number} real - real component\n* @param {number} imag - imaginary component\n* @throws {TypeError} must invoke using the `new` keyword\n* @throws {TypeError} real component must be a number\n* @throws {TypeError} imaginary component must be a number\n* @returns {Complex128} 128-bit complex number\n*\n* @example\n* var z = new Complex128( 5.0, 3.0 );\n* // returns \n*/\nfunction Complex128( real, imag ) {\n\tif ( !( this instanceof Complex128 ) ) {\n\t\tthrow new TypeError( 'invalid invocation. Constructor must be called with the `new` keyword.' );\n\t}\n\tif ( !isNumber( real ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Real component must be a number. Value: `%s`.', real ) );\n\t}\n\tif ( !isNumber( imag ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Imaginary component must be a number. Value: `%s`.', imag ) );\n\t}\n\tdefineProperty( this, 're', {\n\t\t'configurable': false,\n\t\t'enumerable': true,\n\t\t'writable': false,\n\t\t'value': real\n\t});\n\tdefineProperty( this, 'im', {\n\t\t'configurable': false,\n\t\t'enumerable': true,\n\t\t'writable': false,\n\t\t'value': imag\n\t});\n\treturn this;\n}\n\n/**\n* Size (in bytes) of each component.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex128\n* @type {integer}\n* @returns {integer} size of each component\n*\n* @example\n* var nbytes = Complex128.BYTES_PER_ELEMENT;\n* // returns 8\n*/\nsetReadOnly( Complex128, 'BYTES_PER_ELEMENT', 8 );\n\n/**\n* Size (in bytes) of each component.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex128.prototype\n* @type {integer}\n* @returns {integer} size of each component\n*\n* @example\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var nbytes = z.BYTES_PER_ELEMENT;\n* // returns 8\n*/\nsetReadOnly( Complex128.prototype, 'BYTES_PER_ELEMENT', 8 );\n\n/**\n* Length (in bytes) of a complex number.\n*\n* @name byteLength\n* @memberof Complex128.prototype\n* @type {integer}\n* @returns {integer} byte length\n*\n* @example\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var nbytes = z.byteLength;\n* // returns 16\n*/\nsetReadOnly( Complex128.prototype, 'byteLength', 16 );\n\n/**\n* Serializes a complex number as a string.\n*\n* @name toString\n* @memberof Complex128.prototype\n* @type {Function}\n* @returns {string} serialized complex number\n*\n* @example\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var str = z.toString();\n* // returns '5 + 3i'\n*/\nsetReadOnly( Complex128.prototype, 'toString', toStr );\n\n/**\n* Serializes a complex number as a JSON object.\n*\n* ## Notes\n*\n* - `JSON.stringify()` implicitly calls this method when stringifying a `Complex128` instance.\n*\n* @name toJSON\n* @memberof Complex128.prototype\n* @type {Function}\n* @returns {Object} serialized complex number\n*\n* @example\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var obj = z.toJSON();\n* // returns { 'type': 'Complex128', 're': 5.0, 'im': 3.0 }\n*/\nsetReadOnly( Complex128.prototype, 'toJSON', toJSON );\n\n\n// EXPORTS //\n\nexport default Complex128;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Serializes a complex number as a string.\n*\n* @private\n* @returns {string} serialized complex number\n*/\nfunction toString() { // eslint-disable-line stdlib/no-redeclare\n\t/* eslint-disable no-invalid-this */\n\tvar str = '' + this.re;\n\tif ( this.im < 0 ) {\n\t\tstr += ' - ' + (-this.im);\n\t} else {\n\t\tstr += ' + ' + this.im;\n\t}\n\tstr += 'i';\n\treturn str;\n}\n\n\n// EXPORTS //\n\nexport default toString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Serializes a complex number as a JSON object.\n*\n* @private\n* @returns {Object} JSON representation\n*/\nfunction toJSON() {\n\t/* eslint-disable no-invalid-this */\n\tvar out = {};\n\tout.type = 'Complex128';\n\tout.re = this.re;\n\tout.im = this.im;\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default toJSON;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar fround = ( typeof Math.fround === 'function' ) ? Math.fround : null; // eslint-disable-line stdlib/no-builtin-math\n\n\n// EXPORTS //\n\nexport default fround;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport Float32Array from '@stdlib/array-float32';\n\n\n// VARIABLES //\n\nvar FLOAT32_VIEW = new Float32Array( 1 );\n\n\n// MAIN //\n\n/**\n* Converts a double-precision floating-point number to the nearest single-precision floating-point number.\n*\n* @param {number} x - double-precision floating-point number\n* @returns {number} nearest single-precision floating-point number\n*\n* @example\n* var y = float64ToFloat32( 1.337 );\n* // returns 1.3370000123977661\n*/\nfunction float64ToFloat32( x ) {\n\tFLOAT32_VIEW[ 0 ] = x;\n\treturn FLOAT32_VIEW[ 0 ];\n}\n\n\n// EXPORTS //\n\nexport default float64ToFloat32;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Convert a double-precision floating-point number to the nearest single-precision floating-point number.\n*\n* @module @stdlib/number-float64-base-to-float32\n*\n* @example\n* import float64ToFloat32 from '@stdlib/number-float64-base-to-float32';\n*\n* var y = float64ToFloat32( 1.337 );\n* // returns 1.3370000123977661\n*/\n\n// MODULES //\n\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar float64ToFloat32;\nif ( typeof builtin === 'function' ) {\n\tfloat64ToFloat32 = builtin;\n} else {\n\tfloat64ToFloat32 = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default float64ToFloat32;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isNumber } from '@stdlib/assert-is-number';\nimport defineProperty from '@stdlib/utils-define-property';\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport float64ToFloat32 from '@stdlib/number-float64-base-to-float32';\nimport format from '@stdlib/string-format';\nimport toStr from './tostring.js';\nimport toJSON from './tojson.js';\n\n\n// MAIN //\n\n/**\n* 64-bit complex number constructor.\n*\n* @constructor\n* @param {number} real - real component\n* @param {number} imag - imaginary component\n* @throws {TypeError} must invoke using the `new` keyword\n* @throws {TypeError} real component must be a number\n* @throws {TypeError} imaginary component must be a number\n* @returns {Complex64} 64-bit complex number\n*\n* @example\n* var z = new Complex64( 5.0, 3.0 );\n* // returns \n*/\nfunction Complex64( real, imag ) {\n\tif ( !( this instanceof Complex64 ) ) {\n\t\tthrow new TypeError( 'invalid invocation. Constructor must be called with the `new` keyword.' );\n\t}\n\tif ( !isNumber( real ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Real component must be a number. Value: `%s`.', real ) );\n\t}\n\tif ( !isNumber( imag ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Imaginary component must be a number. Value: `%s`.', imag ) );\n\t}\n\tdefineProperty( this, 're', {\n\t\t'configurable': false,\n\t\t'enumerable': true,\n\t\t'writable': false,\n\t\t'value': float64ToFloat32( real )\n\t});\n\tdefineProperty( this, 'im', {\n\t\t'configurable': false,\n\t\t'enumerable': true,\n\t\t'writable': false,\n\t\t'value': float64ToFloat32( imag )\n\t});\n\treturn this;\n}\n\n/**\n* Size (in bytes) of each component.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex64\n* @type {integer}\n* @returns {integer} size of each component\n*\n* @example\n* var nbytes = Complex64.BYTES_PER_ELEMENT;\n* // returns 4\n*/\nsetReadOnly( Complex64, 'BYTES_PER_ELEMENT', 4 );\n\n/**\n* Size (in bytes) of each component.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex64.prototype\n* @type {integer}\n* @returns {integer} size of each component\n*\n* @example\n* var z = new Complex64( 5.0, 3.0 );\n*\n* var nbytes = z.BYTES_PER_ELEMENT;\n* // returns 4\n*/\nsetReadOnly( Complex64.prototype, 'BYTES_PER_ELEMENT', 4 );\n\n/**\n* Length (in bytes) of a complex number.\n*\n* @name byteLength\n* @memberof Complex64.prototype\n* @type {integer}\n* @returns {integer} byte length\n*\n* @example\n* var z = new Complex64( 5.0, 3.0 );\n*\n* var nbytes = z.byteLength;\n* // returns 8\n*/\nsetReadOnly( Complex64.prototype, 'byteLength', 8 );\n\n/**\n* Serializes a complex number as a string.\n*\n* @name toString\n* @memberof Complex64.prototype\n* @type {Function}\n* @returns {string} serialized complex number\n*\n* @example\n* var z = new Complex64( 5.0, 3.0 );\n*\n* var str = z.toString();\n* // returns '5 + 3i'\n*/\nsetReadOnly( Complex64.prototype, 'toString', toStr );\n\n/**\n* Serializes a complex number as a JSON object.\n*\n* ## Notes\n*\n* - `JSON.stringify()` implicitly calls this method when stringifying a `Complex64` instance.\n*\n* @name toJSON\n* @memberof Complex64.prototype\n* @type {Function}\n* @returns {Object} serialized complex number\n*\n* @example\n* var z = new Complex64( 5.0, 3.0 );\n*\n* var obj = z.toJSON();\n* // returns { 'type': 'Complex64', 're': 5.0, 'im': 3.0 }\n*/\nsetReadOnly( Complex64.prototype, 'toJSON', toJSON );\n\n\n// EXPORTS //\n\nexport default Complex64;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport Complex128 from '@stdlib/complex-float64';\nimport Complex64 from '@stdlib/complex-float32';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a complex number-like object.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a complex number-like object.\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n* import Complex64 from '@stdlib/complex-float32';\n*\n* var x = new Complex128( 4.0, 2.0 );\n* var bool = isComplexLike( x );\n* // returns true\n*\n* x = new Complex64( 4.0, 2.0 );\n* bool = isComplexLike( x );\n* // returns true\n*/\nfunction isComplexLike( value ) {\n\tif ( value instanceof Complex128 || value instanceof Complex64 ) {\n\t\treturn true;\n\t}\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\ttypeof value.re === 'number' &&\n\t\ttypeof value.im === 'number'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isComplexLike;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isInteger from '@stdlib/math-base-assert-is-integer';\n\n\n// MAIN //\n\n/**\n* Tests if a finite numeric value is an even number.\n*\n* @param {number} x - value to test\n* @returns {boolean} boolean indicating whether the value is an even number\n*\n* @example\n* var bool = isEven( 5.0 );\n* // returns false\n*\n* @example\n* var bool = isEven( -2.0 );\n* // returns true\n*\n* @example\n* var bool = isEven( 0.0 );\n* // returns true\n*\n* @example\n* var bool = isEven( NaN );\n* // returns false\n*/\nfunction isEven( x ) {\n\treturn isInteger( x/2.0 );\n}\n\n\n// EXPORTS //\n\nexport default isEven;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport hasOwnProp from '@stdlib/assert-has-own-property';\nimport Symbol from '@stdlib/symbol-ctor';\n\n\n// MAIN //\n\n/**\n* Tests for native `Symbol.iterator` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Symbol.iterator` support\n*\n* @example\n* var bool = hasIteratorSymbolSupport();\n* // returns \n*/\nfunction hasIteratorSymbolSupport() {\n\treturn (\n\t\ttypeof Symbol === 'function' &&\n\t\ttypeof Symbol( 'foo' ) === 'symbol' &&\n\t\thasOwnProp( Symbol, 'iterator' ) &&\n\t\ttypeof Symbol.iterator === 'symbol'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default hasIteratorSymbolSupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Serializes a complex number as a string.\n*\n* @private\n* @returns {string} serialized complex number\n*/\nfunction toString() { // eslint-disable-line stdlib/no-redeclare\n\t/* eslint-disable no-invalid-this */\n\tvar str = '' + this.re;\n\tif ( this.im < 0 ) {\n\t\tstr += ' - ' + (-this.im);\n\t} else {\n\t\tstr += ' + ' + this.im;\n\t}\n\tstr += 'i';\n\treturn str;\n}\n\n\n// EXPORTS //\n\nexport default toString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Serializes a complex number as a JSON object.\n*\n* @private\n* @returns {Object} JSON representation\n*/\nfunction toJSON() {\n\t/* eslint-disable no-invalid-this */\n\tvar out = {};\n\tout.type = 'Complex64';\n\tout.re = this.re;\n\tout.im = this.im;\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default toJSON;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport hasIteratorSymbolSupport from '@stdlib/assert-has-iterator-symbol-support';\n\n\n// MAIN //\n\n/**\n* Iterator symbol.\n*\n* @name IteratorSymbol\n* @constant\n* @type {(symbol|null)}\n*\n* @example\n* function iterator() {\n* var it;\n* var i;\n*\n* i = -1;\n*\n* it = {};\n* it.next = next;\n* it.return = done;\n*\n* if ( IteratorSymbol ) {\n* it[ IteratorSymbol ] = iterator;\n* }\n* return it;\n*\n* function next() {\n* i += 1;\n* return {\n* 'value': i,\n* 'done': false\n* };\n* }\n*\n* function done( value ) {\n* if ( arguments.length === 0 ) {\n* return {\n* 'done': true\n* };\n* }\n* return {\n* 'value': value,\n* 'done': true\n* };\n* }\n* }\n*\n* var obj = iterator();\n*/\nvar IteratorSymbol = ( hasIteratorSymbolSupport() ) ? Symbol.iterator : null;\n\n\n// EXPORTS //\n\nexport default IteratorSymbol;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport defineProperty from '@stdlib/utils-define-property';\n\n\n// MAIN //\n\n/**\n* Defines a non-enumerable read-only accessor.\n*\n* @param {Object} obj - object on which to define the property\n* @param {(string|symbol)} prop - property name\n* @param {Function} getter - accessor\n*\n* @example\n* function getter() {\n* return 'bar';\n* }\n*\n* var obj = {};\n*\n* setNonEnumerableReadOnlyAccessor( obj, 'foo', getter );\n*\n* try {\n* obj.foo = 'boop';\n* } catch ( err ) {\n* console.error( err.message );\n* }\n*/\nfunction setNonEnumerableReadOnlyAccessor( obj, prop, getter ) { // eslint-disable-line id-length\n\tdefineProperty( obj, prop, {\n\t\t'configurable': false,\n\t\t'enumerable': false,\n\t\t'get': getter\n\t});\n}\n\n\n// EXPORTS //\n\nexport default setNonEnumerableReadOnlyAccessor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Returns the real component of a single-precision complex floating-point number.\n*\n* @param {Complex} z - complex number\n* @returns {number} real component\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n*\n* var z = new Complex64( 5.0, 3.0 );\n*\n* var re = realf( z );\n* // returns 5.0\n*/\nfunction realf( z ) {\n\treturn z.re;\n}\n\n\n// EXPORTS //\n\nexport default realf;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Returns the imaginary component of a single-precision complex floating-point number.\n*\n* @param {Complex} z - complex number\n* @returns {number} imaginary component\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n*\n* var z = new Complex64( 5.0, 3.0 );\n*\n* var im = imagf( z );\n* // returns 3.0\n*/\nfunction imagf( z ) {\n\treturn z.im;\n}\n\n\n// EXPORTS //\n\nexport default imagf;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport Float32Array from '@stdlib/array-float32';\n\n\n// MAIN //\n\n/**\n* Reinterprets a `Complex64Array` as a `Float32Array`.\n*\n* @param {Complex64Array} x - input array\n* @param {NonNegativeInteger} offset - starting index\n* @returns {Float32Array} `Float32Array` view\n*\n* @example\n* import Complex64Array from '@stdlib/array-complex64';\n*\n* var x = new Complex64Array( 10 );\n*\n* var out = reinterpret( x, 0 );\n* // returns \n*\n* var bool = ( out.buffer === x.buffer );\n* // returns true\n*/\nfunction reinterpret( x, offset ) {\n\treturn new Float32Array( x.buffer, x.byteOffset+(x.BYTES_PER_ELEMENT*offset), 2*(x.length-offset) ); // eslint-disable-line max-len\n}\n\n\n// EXPORTS //\n\nexport default reinterpret;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport Float64Array from '@stdlib/array-float64';\n\n\n// MAIN //\n\n/**\n* Reinterprets a `Complex128Array` as a `Float64Array`.\n*\n* @param {Complex128Array} x - input array\n* @param {NonNegativeInteger} offset - starting index\n* @returns {Float64Array} `Float64Array` view\n*\n* @example\n* import Complex128Array from '@stdlib/array-complex128';\n*\n* var x = new Complex128Array( 10 );\n*\n* var out = reinterpret( x, 0 );\n* // returns \n*\n* var bool = ( out.buffer === x.buffer );\n* // returns true\n*/\nfunction reinterpret( x, offset ) {\n\treturn new Float64Array( x.buffer, x.byteOffset+(x.BYTES_PER_ELEMENT*offset), 2*(x.length-offset) ); // eslint-disable-line max-len\n}\n\n\n// EXPORTS //\n\nexport default reinterpret;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// VARIABLES //\n\nvar GETTERS = {\n\t'float64': getFloat64,\n\t'float32': getFloat32,\n\t'int32': getInt32,\n\t'int16': getInt16,\n\t'int8': getInt8,\n\t'uint32': getUint32,\n\t'uint16': getUint16,\n\t'uint8': getUint8,\n\t'uint8c': getUint8c,\n\t'generic': getGeneric,\n\t'default': getArrayLike\n};\n\n\n// FUNCTIONS //\n\n/**\n* Returns an element from a `Float64Array`.\n*\n* @private\n* @param {Float64Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n*\n* var arr = new Float64Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getFloat64( arr, 2 );\n* // returns 3.0\n*/\nfunction getFloat64( arr, idx ) {\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from a `Float32Array`.\n*\n* @private\n* @param {Float32Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Float32Array from '@stdlib/array-float32';\n*\n* var arr = new Float32Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getFloat32( arr, 2 );\n* // returns 3.0\n*/\nfunction getFloat32( arr, idx ) {\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from an `Int32Array`.\n*\n* @private\n* @param {Int32Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Int32Array from '@stdlib/array-int32';\n*\n* var arr = new Int32Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getInt32( arr, 2 );\n* // returns 3\n*/\nfunction getInt32( arr, idx ) { // eslint-disable-line stdlib/jsdoc-doctest-decimal-point\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from an `Int16Array`.\n*\n* @private\n* @param {Int16Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Int16Array from '@stdlib/array-int16';\n*\n* var arr = new Int16Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getInt16( arr, 2 );\n* // returns 3\n*/\nfunction getInt16( arr, idx ) { // eslint-disable-line stdlib/jsdoc-doctest-decimal-point\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from an `Int8Array`.\n*\n* @private\n* @param {Int8Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Int8Array from '@stdlib/array-int8';\n*\n* var arr = new Int8Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getInt8( arr, 2 );\n* // returns 3\n*/\nfunction getInt8( arr, idx ) { // eslint-disable-line stdlib/jsdoc-doctest-decimal-point\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from a `Uint32Array`.\n*\n* @private\n* @param {Uint32Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Uint32Array from '@stdlib/array-uint32';\n*\n* var arr = new Uint32Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getUint32( arr, 2 );\n* // returns 3\n*/\nfunction getUint32( arr, idx ) { // eslint-disable-line stdlib/jsdoc-doctest-decimal-point\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from a `Uint16Array`.\n*\n* @private\n* @param {Uint16Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Uint16Array from '@stdlib/array-uint16';\n*\n* var arr = new Uint16Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getUint16( arr, 2 );\n* // returns 3\n*/\nfunction getUint16( arr, idx ) { // eslint-disable-line stdlib/jsdoc-doctest-decimal-point\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from a `Uint8Array`.\n*\n* @private\n* @param {Uint8Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Uint8Array from '@stdlib/array-uint8';\n*\n* var arr = new Uint8Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getUint8( arr, 2 );\n* // returns 3\n*/\nfunction getUint8( arr, idx ) { // eslint-disable-line stdlib/jsdoc-doctest-decimal-point\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from a `Uint8ClampedArray`.\n*\n* @private\n* @param {Uint8ClampedArray} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Uint8ClampedArray from '@stdlib/array-uint8c';\n*\n* var arr = new Uint8ClampedArray( [ 1, 2, 3, 4 ] );\n*\n* var v = getUint8c( arr, 2 );\n* // returns 3\n*/\nfunction getUint8c( arr, idx ) { // eslint-disable-line stdlib/jsdoc-doctest-decimal-point\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from a generic `Array`.\n*\n* @private\n* @param {Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {*} element value\n*\n* @example\n* var arr = [ 1, 2, 3, 4 ];\n*\n* var v = getGeneric( arr, 2 );\n* // returns 3\n*/\nfunction getGeneric( arr, idx ) {\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from an indexed array-like object.\n*\n* @private\n* @param {Collection} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {*} element value\n*\n* @example\n* var arr = [ 1, 2, 3, 4 ];\n*\n* var v = getArrayLike( arr, 2 );\n* // returns 3\n*/\nfunction getArrayLike( arr, idx ) {\n\treturn arr[ idx ];\n}\n\n\n// MAIN //\n\n/**\n* Returns an accessor function for retrieving an element from an indexed array-like object.\n*\n* @param {string} dtype - array dtype\n* @returns {Function} accessor\n*\n* @example\n* import dtype from '@stdlib/array-dtype';\n*\n* var arr = [ 1, 2, 3, 4 ];\n*\n* var get = getter( dtype( arr ) );\n* var v = get( arr, 2 );\n* // returns 3\n*/\nfunction getter( dtype ) {\n\tvar f = GETTERS[ dtype ];\n\tif ( typeof f === 'function' ) {\n\t\treturn f;\n\t}\n\treturn GETTERS.default;\n}\n\n\n// EXPORTS //\n\nexport default getter;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// VARIABLES //\n\nvar GETTERS = {\n\t'complex128': getComplex128,\n\t'complex64': getComplex64,\n\t'default': getArrayLike\n};\n\n\n// FUNCTIONS //\n\n/**\n* Returns an element from a `Complex128Array`.\n*\n* @private\n* @param {Complex128Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Complex128Array from '@stdlib/array-complex128';\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* var arr = new Complex128Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getComplex128( arr, 1 );\n* // returns \n*\n* var re = real( v );\n* // returns 3.0\n*\n* var im = imag( v );\n* // returns 4.0\n*/\nfunction getComplex128( arr, idx ) {\n\treturn arr.get( idx );\n}\n\n/**\n* Returns an element from a `Complex64Array`.\n*\n* @private\n* @param {Complex64Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Complex64Array from '@stdlib/array-complex64';\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* var arr = new Complex64Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getComplex64( arr, 1 );\n* // returns \n*\n* var re = realf( v );\n* // returns 3.0\n*\n* var im = imagf( v );\n* // returns 4.0\n*/\nfunction getComplex64( arr, idx ) {\n\treturn arr.get( idx );\n}\n\n/**\n* Returns an element from an array-like object supporting the get/set protocol.\n*\n* @private\n* @param {Collection} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {*} element value\n*\n* @example\n* var arr = [ 1, 2, 3, 4 ];\n*\n* function get( idx ) {\n* return arr[ idx ];\n* }\n*\n* function set( value, idx ) {\n* arr[ idx ] = value;\n* }\n*\n* arr.get = get;\n* arr.set = set;\n*\n* var v = getArrayLike( arr, 2 );\n* // returns 3\n*/\nfunction getArrayLike( arr, idx ) {\n\treturn arr.get( idx );\n}\n\n\n// MAIN //\n\n/**\n* Returns an accessor function for retrieving an element from an array-like object supporting the get/set protocol.\n*\n* @param {string} dtype - array dtype\n* @returns {Function} accessor\n*\n* @example\n* import Complex64Array from '@stdlib/array-complex64';\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n* import dtype from '@stdlib/array-dtype';\n*\n* var arr = new Complex64Array( [ 1, 2, 3, 4 ] );\n*\n* var get = getter( dtype( arr ) );\n* var v = get( arr, 1 );\n* // returns \n*\n* var re = realf( v );\n* // returns 3.0\n*\n* var im = imagf( v );\n* // returns 4.0\n*/\nfunction getter( dtype ) {\n\tvar f = GETTERS[ dtype ];\n\tif ( typeof f === 'function' ) {\n\t\treturn f;\n\t}\n\treturn GETTERS.default;\n}\n\n\n// EXPORTS //\n\nexport default getter;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isArrayLikeObject from '@stdlib/assert-is-array-like-object';\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport realf from '@stdlib/complex-realf';\nimport imagf from '@stdlib/complex-imagf';\nimport format from '@stdlib/string-format';\n\n\n// MAIN //\n\n/**\n* Returns an array of iterated values.\n*\n* @private\n* @param {Object} it - iterator\n* @returns {(Array|TypeError)} array or an error\n*/\nfunction fromIterator( it ) {\n\tvar out;\n\tvar v;\n\tvar z;\n\n\tout = [];\n\twhile ( true ) {\n\t\tv = it.next();\n\t\tif ( v.done ) {\n\t\t\tbreak;\n\t\t}\n\t\tz = v.value;\n\t\tif ( isArrayLikeObject( z ) && z.length >= 2 ) {\n\t\t\tout.push( z[ 0 ], z[ 1 ] );\n\t\t} else if ( isComplexLike( z ) ) {\n\t\t\tout.push( realf( z ), imagf( z ) );\n\t\t} else {\n\t\t\treturn new TypeError( format( 'invalid argument. An iterator must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', z ) );\n\t\t}\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default fromIterator;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isArrayLikeObject from '@stdlib/assert-is-array-like-object';\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport realf from '@stdlib/complex-realf';\nimport imagf from '@stdlib/complex-imagf';\nimport format from '@stdlib/string-format';\n\n\n// MAIN //\n\n/**\n* Returns an array of iterated values.\n*\n* @private\n* @param {Object} it - iterator\n* @param {Function} clbk - callback to invoke for each iterated value\n* @param {*} thisArg - invocation context\n* @returns {(Array|TypeError)} array or an error\n*/\nfunction fromIteratorMap( it, clbk, thisArg ) {\n\tvar out;\n\tvar v;\n\tvar z;\n\tvar i;\n\n\tout = [];\n\ti = -1;\n\twhile ( true ) {\n\t\tv = it.next();\n\t\tif ( v.done ) {\n\t\t\tbreak;\n\t\t}\n\t\ti += 1;\n\t\tz = clbk.call( thisArg, v.value, i );\n\t\tif ( isArrayLikeObject( z ) && z.length >= 2 ) {\n\t\t\tout.push( z[ 0 ], z[ 1 ] );\n\t\t} else if ( isComplexLike( z ) ) {\n\t\t\tout.push( realf( z ), imagf( z ) );\n\t\t} else {\n\t\t\treturn new TypeError( format( 'invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', z ) );\n\t\t}\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default fromIteratorMap;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport realf from '@stdlib/complex-realf';\nimport imagf from '@stdlib/complex-imagf';\n\n\n// MAIN //\n\n/**\n* Returns a strided array of real and imaginary components.\n*\n* @private\n* @param {Float32Array} buf - output array\n* @param {Array} arr - array containing complex numbers\n* @returns {(Float32Array|null)} output array or null\n*/\nfunction fromArray( buf, arr ) {\n\tvar len;\n\tvar v;\n\tvar i;\n\tvar j;\n\n\tlen = arr.length;\n\tj = 0;\n\tfor ( i = 0; i < len; i++ ) {\n\t\tv = arr[ i ];\n\t\tif ( !isComplexLike( v ) ) {\n\t\t\treturn null;\n\t\t}\n\t\tbuf[ j ] = realf( v );\n\t\tbuf[ j+1 ] = imagf( v );\n\t\tj += 2; // stride\n\t}\n\treturn buf;\n}\n\n\n// EXPORTS //\n\nexport default fromArray;\n","/* eslint-disable no-restricted-syntax, max-lines, no-invalid-this */\n\n/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isNonNegativeInteger } from '@stdlib/assert-is-nonnegative-integer';\nimport isArrayLikeObject from '@stdlib/assert-is-array-like-object';\nimport isCollection from '@stdlib/assert-is-collection';\nimport isArrayBuffer from '@stdlib/assert-is-arraybuffer';\nimport isObject from '@stdlib/assert-is-object';\nimport isArray from '@stdlib/assert-is-array';\nimport isFunction from '@stdlib/assert-is-function';\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport isEven from '@stdlib/math-base-assert-is-even';\nimport isInteger from '@stdlib/math-base-assert-is-integer';\nimport hasIteratorSymbolSupport from '@stdlib/assert-has-iterator-symbol-support';\nimport ITERATOR_SYMBOL from '@stdlib/symbol-iterator';\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport setReadOnlyAccessor from '@stdlib/utils-define-nonenumerable-read-only-accessor';\nimport Float32Array from '@stdlib/array-float32';\nimport Complex64 from '@stdlib/complex-float32';\nimport format from '@stdlib/string-format';\nimport realf from '@stdlib/complex-realf';\nimport imagf from '@stdlib/complex-imagf';\nimport reinterpret64 from '@stdlib/strided-base-reinterpret-complex64';\nimport reinterpret128 from '@stdlib/strided-base-reinterpret-complex128';\nimport getter from '@stdlib/array-base-getter';\nimport accessorGetter from '@stdlib/array-base-accessor-getter';\nimport fromIterator from './from_iterator.js';\nimport fromIteratorMap from './from_iterator_map.js';\nimport fromArray from './from_array.js';\n\n\n// VARIABLES //\n\nvar BYTES_PER_ELEMENT = Float32Array.BYTES_PER_ELEMENT * 2;\nvar HAS_ITERATOR_SYMBOL = hasIteratorSymbolSupport();\n\n\n// FUNCTIONS //\n\n/**\n* Returns a boolean indicating if a value is a complex typed array.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a complex typed array\n*/\nfunction isComplexArray( value ) {\n\treturn (\n\t\tvalue instanceof Complex64Array ||\n\t\t(\n\t\t\ttypeof value === 'object' &&\n\t\t\tvalue !== null &&\n\t\t\t(\n\t\t\t\tvalue.constructor.name === 'Complex64Array' ||\n\t\t\t\tvalue.constructor.name === 'Complex128Array'\n\t\t\t) &&\n\t\t\ttypeof value._length === 'number' && // eslint-disable-line no-underscore-dangle\n\n\t\t\t// NOTE: we don't perform a more rigorous test here for a typed array for performance reasons, as robustly checking for a typed array instance could require walking the prototype tree and performing relatively expensive constructor checks...\n\t\t\ttypeof value._buffer === 'object' // eslint-disable-line no-underscore-dangle\n\t\t)\n\t);\n}\n\n/**\n* Returns a boolean indicating if a value is a complex typed array constructor.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a complex typed array constructor\n*/\nfunction isComplexArrayConstructor( value ) {\n\treturn (\n\t\tvalue === Complex64Array ||\n\n\t\t// NOTE: weaker test in order to avoid a circular dependency with Complex128Array...\n\t\tvalue.name === 'Complex128Array'\n\t);\n}\n\n/**\n* Returns a boolean indicating if a value is a `Complex64Array`.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a `Complex64Array`\n*/\nfunction isComplex64Array( value ) {\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\tvalue.constructor.name === 'Complex64Array' &&\n\t\tvalue.BYTES_PER_ELEMENT === BYTES_PER_ELEMENT\n\t);\n}\n\n/**\n* Returns a boolean indicating if a value is a `Complex128Array`.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a `Complex128Array`\n*/\nfunction isComplex128Array( value ) {\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\tvalue.constructor.name === 'Complex128Array' &&\n\t\tvalue.BYTES_PER_ELEMENT === BYTES_PER_ELEMENT*2\n\t);\n}\n\n\n// MAIN //\n\n/**\n* 64-bit complex number array constructor.\n*\n* @constructor\n* @param {(NonNegativeInteger|Collection|ArrayBuffer|Iterable)} [arg] - length, typed array, array-like object, buffer, or an iterable\n* @param {NonNegativeInteger} [byteOffset=0] - byte offset\n* @param {NonNegativeInteger} [length] - view length\n* @throws {RangeError} ArrayBuffer byte length must be a multiple of `8`\n* @throws {RangeError} array-like object and typed array input arguments must have a length which is a multiple of two\n* @throws {TypeError} if provided only a single argument, must provide a valid argument\n* @throws {TypeError} byte offset must be a nonnegative integer\n* @throws {RangeError} byte offset must be a multiple of `8`\n* @throws {TypeError} view length must be a positive multiple of `8`\n* @throws {RangeError} must provide sufficient memory to accommodate byte offset and view length requirements\n* @throws {TypeError} an iterator must return either a two element array containing real and imaginary components or a complex number\n* @returns {Complex64Array} complex number array\n*\n* @example\n* var arr = new Complex64Array();\n* // returns \n*\n* var len = arr.length;\n* // returns 0\n*\n* @example\n* var arr = new Complex64Array( 2 );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*\n* @example\n* var arr = new Complex64Array( [ 1.0, -1.0 ] );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* import ArrayBuffer from '@stdlib/array-buffer';\n*\n* var buf = new ArrayBuffer( 16 );\n* var arr = new Complex64Array( buf );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*\n* @example\n* import ArrayBuffer from '@stdlib/array-buffer';\n*\n* var buf = new ArrayBuffer( 16 );\n* var arr = new Complex64Array( buf, 8 );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* import ArrayBuffer from '@stdlib/array-buffer';\n*\n* var buf = new ArrayBuffer( 32 );\n* var arr = new Complex64Array( buf, 8, 2 );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*/\nfunction Complex64Array() {\n\tvar byteOffset;\n\tvar nargs;\n\tvar buf;\n\tvar len;\n\n\tnargs = arguments.length;\n\tif ( !(this instanceof Complex64Array) ) {\n\t\tif ( nargs === 0 ) {\n\t\t\treturn new Complex64Array();\n\t\t}\n\t\tif ( nargs === 1 ) {\n\t\t\treturn new Complex64Array( arguments[0] );\n\t\t}\n\t\tif ( nargs === 2 ) {\n\t\t\treturn new Complex64Array( arguments[0], arguments[1] );\n\t\t}\n\t\treturn new Complex64Array( arguments[0], arguments[1], arguments[2] );\n\t}\n\t// Create the underlying data buffer...\n\tif ( nargs === 0 ) {\n\t\tbuf = new Float32Array( 0 ); // backward-compatibility\n\t} else if ( nargs === 1 ) {\n\t\tif ( isNonNegativeInteger( arguments[0] ) ) {\n\t\t\tbuf = new Float32Array( arguments[0]*2 );\n\t\t} else if ( isCollection( arguments[0] ) ) {\n\t\t\tbuf = arguments[ 0 ];\n\t\t\tlen = buf.length;\n\n\t\t\t// If provided a \"generic\" array, peak at the first value, and, if the value is a complex number, try to process as an array of complex numbers, falling back to \"normal\" typed array initialization if we fail and ensuring consistency if the first value had not been a complex number...\n\t\t\tif ( len && isArray( buf ) && isComplexLike( buf[0] ) ) {\n\t\t\t\tbuf = fromArray( new Float32Array( len*2 ), buf );\n\t\t\t\tif ( buf === null ) {\n\t\t\t\t\t// We failed and we are now forced to allocate a new array :-(\n\t\t\t\t\tif ( !isEven( len ) ) {\n\t\t\t\t\t\tthrow new RangeError( format( 'invalid argument. Array-like object arguments must have a length which is a multiple of two. Length: `%u`.', len ) );\n\t\t\t\t\t}\n\t\t\t\t\t// We failed, so fall back to directly setting values...\n\t\t\t\t\tbuf = new Float32Array( arguments[0] );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ( isComplex64Array( buf ) ) {\n\t\t\t\t\tbuf = reinterpret64( buf, 0 );\n\t\t\t\t} else if ( isComplex128Array( buf ) ) {\n\t\t\t\t\tbuf = reinterpret128( buf, 0 );\n\t\t\t\t} else if ( !isEven( len ) ) {\n\t\t\t\t\tthrow new RangeError( format( 'invalid argument. Array-like object and typed array arguments must have a length which is a multiple of two. Length: `%u`.', len ) );\n\t\t\t\t}\n\t\t\t\tbuf = new Float32Array( buf );\n\t\t\t}\n\t\t} else if ( isArrayBuffer( arguments[0] ) ) {\n\t\t\tbuf = arguments[ 0 ];\n\t\t\tif ( !isInteger( buf.byteLength/BYTES_PER_ELEMENT ) ) {\n\t\t\t\tthrow new RangeError( format( 'invalid argument. ArrayBuffer byte length must be a multiple of %u. Byte length: `%u`.', BYTES_PER_ELEMENT, buf.byteLength ) );\n\t\t\t}\n\t\t\tbuf = new Float32Array( buf );\n\t\t} else if ( isObject( arguments[0] ) ) {\n\t\t\tbuf = arguments[ 0 ];\n\t\t\tif ( HAS_ITERATOR_SYMBOL === false ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Environment lacks Symbol.iterator support. Must provide a length, ArrayBuffer, typed array, or array-like object. Value: `%s`.', buf ) );\n\t\t\t}\n\t\t\tif ( !isFunction( buf[ ITERATOR_SYMBOL ] ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.', buf ) );\n\t\t\t}\n\t\t\tbuf = buf[ ITERATOR_SYMBOL ]();\n\t\t\tif ( !isFunction( buf.next ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.', buf ) );\n\t\t\t}\n\t\t\tbuf = fromIterator( buf );\n\t\t\tif ( buf instanceof Error ) {\n\t\t\t\tthrow buf;\n\t\t\t}\n\t\t\tbuf = new Float32Array( buf );\n\t\t} else {\n\t\t\tthrow new TypeError( format( 'invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.', arguments[0] ) );\n\t\t}\n\t} else {\n\t\tbuf = arguments[ 0 ];\n\t\tif ( !isArrayBuffer( buf ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. First argument must be an ArrayBuffer. Value: `%s`.', buf ) );\n\t\t}\n\t\tbyteOffset = arguments[ 1 ];\n\t\tif ( !isNonNegativeInteger( byteOffset ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Byte offset must be a nonnegative integer. Value: `%s`.', byteOffset ) );\n\t\t}\n\t\tif ( !isInteger( byteOffset/BYTES_PER_ELEMENT ) ) {\n\t\t\tthrow new RangeError( format( 'invalid argument. Byte offset must be a multiple of %u. Value: `%u`.', BYTES_PER_ELEMENT, byteOffset ) );\n\t\t}\n\t\tif ( nargs === 2 ) {\n\t\t\tlen = buf.byteLength - byteOffset;\n\t\t\tif ( !isInteger( len/BYTES_PER_ELEMENT ) ) {\n\t\t\t\tthrow new RangeError( format( 'invalid arguments. ArrayBuffer view byte length must be a multiple of %u. View byte length: `%u`.', BYTES_PER_ELEMENT, len ) );\n\t\t\t}\n\t\t\tbuf = new Float32Array( buf, byteOffset );\n\t\t} else {\n\t\t\tlen = arguments[ 2 ];\n\t\t\tif ( !isNonNegativeInteger( len ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Length must be a nonnegative integer. Value: `%s`.', len ) );\n\t\t\t}\n\t\t\tif ( (len*BYTES_PER_ELEMENT) > (buf.byteLength-byteOffset) ) {\n\t\t\t\tthrow new RangeError( format( 'invalid arguments. ArrayBuffer has insufficient capacity. Either decrease the array length or provide a bigger buffer. Minimum capacity: `%u`.', len*BYTES_PER_ELEMENT ) );\n\t\t\t}\n\t\t\tbuf = new Float32Array( buf, byteOffset, len*2 );\n\t\t}\n\t}\n\tsetReadOnly( this, '_buffer', buf );\n\tsetReadOnly( this, '_length', buf.length/2 );\n\n\treturn this;\n}\n\n/**\n* Size (in bytes) of each array element.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex64Array\n* @readonly\n* @type {PositiveInteger}\n* @default 8\n*\n* @example\n* var nbytes = Complex64Array.BYTES_PER_ELEMENT;\n* // returns 8\n*/\nsetReadOnly( Complex64Array, 'BYTES_PER_ELEMENT', BYTES_PER_ELEMENT );\n\n/**\n* Constructor name.\n*\n* @name name\n* @memberof Complex64Array\n* @readonly\n* @type {string}\n* @default 'Complex64Array'\n*\n* @example\n* var str = Complex64Array.name;\n* // returns 'Complex64Array'\n*/\nsetReadOnly( Complex64Array, 'name', 'Complex64Array' );\n\n/**\n* Creates a new 64-bit complex number array from an array-like object or an iterable.\n*\n* @name from\n* @memberof Complex64Array\n* @type {Function}\n* @param {(Collection|Iterable)} src - array-like object or iterable\n* @param {Function} [clbk] - callback to invoke for each source element\n* @param {*} [thisArg] - context\n* @throws {TypeError} `this` context must be a constructor\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be an array-like object or an iterable\n* @throws {TypeError} second argument must be a function\n* @throws {RangeError} array-like objects must have a length which is a multiple of two\n* @throws {TypeError} an iterator must return either a two element array containing real and imaginary components or a complex number\n* @throws {TypeError} when provided an iterator, a callback must return either a two element array containing real and imaginary components or a complex number\n* @returns {Complex64Array} 64-bit complex number array\n*\n* @example\n* var arr = Complex64Array.from( [ 1.0, -1.0 ] );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n*\n* var arr = Complex64Array.from( [ new Complex64( 1.0, 1.0 ) ] );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* function clbk( v ) {\n* return new Complex64( realf(v)*2.0, imagf(v)*2.0 );\n* }\n*\n* var arr = Complex64Array.from( [ new Complex64( 1.0, 1.0 ) ], clbk );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*/\nsetReadOnly( Complex64Array, 'from', function from( src ) {\n\tvar thisArg;\n\tvar nargs;\n\tvar clbk;\n\tvar out;\n\tvar buf;\n\tvar tmp;\n\tvar get;\n\tvar len;\n\tvar flg;\n\tvar v;\n\tvar i;\n\tvar j;\n\tif ( !isFunction( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` context must be a constructor.' );\n\t}\n\tif ( !isComplexArrayConstructor( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tnargs = arguments.length;\n\tif ( nargs > 1 ) {\n\t\tclbk = arguments[ 1 ];\n\t\tif ( !isFunction( clbk ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be a function. Value: `%s`.', clbk ) );\n\t\t}\n\t\tif ( nargs > 2 ) {\n\t\t\tthisArg = arguments[ 2 ];\n\t\t}\n\t}\n\tif ( isComplexArray( src ) ) {\n\t\tlen = src.length;\n\t\tif ( clbk ) {\n\t\t\tout = new this( len );\n\t\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\t\tj = 0;\n\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\tv = clbk.call( thisArg, src.get( i ), i );\n\t\t\t\tif ( isComplexLike( v ) ) {\n\t\t\t\t\tbuf[ j ] = realf( v );\n\t\t\t\t\tbuf[ j+1 ] = imagf( v );\n\t\t\t\t} else if ( isArrayLikeObject( v ) && v.length >= 2 ) {\n\t\t\t\t\tbuf[ j ] = v[ 0 ];\n\t\t\t\t\tbuf[ j+1 ] = v[ 1 ];\n\t\t\t\t} else {\n\t\t\t\t\tthrow new TypeError( format( 'invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', v ) );\n\t\t\t\t}\n\t\t\t\tj += 2; // stride\n\t\t\t}\n\t\t\treturn out;\n\t\t}\n\t\treturn new this( src );\n\t}\n\tif ( isCollection( src ) ) {\n\t\tif ( clbk ) {\n\t\t\t// Note: array contents affect how we iterate over a provided data source. If only complex number objects, we can extract real and imaginary components. Otherwise, for non-complex number arrays (e.g., `Float64Array`, etc), we assume a strided array where real and imaginary components are interleaved. In the former case, we expect a callback to return real and imaginary components (possibly as a complex number). In the latter case, we expect a callback to return *either* a real or imaginary component.\n\n\t\t\tlen = src.length;\n\t\t\tif ( src.get && src.set ) {\n\t\t\t\tget = accessorGetter( 'default' );\n\t\t\t} else {\n\t\t\t\tget = getter( 'default' );\n\t\t\t}\n\t\t\t// Detect whether we've been provided an array which returns complex number objects...\n\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\tif ( !isComplexLike( get( src, i ) ) ) {\n\t\t\t\t\tflg = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// If an array does not contain only complex number objects, then we assume interleaved real and imaginary components...\n\t\t\tif ( flg ) {\n\t\t\t\tif ( !isEven( len ) ) {\n\t\t\t\t\tthrow new RangeError( format( 'invalid argument. First argument must have a length which is a multiple of %u. Length: `%u`.', 2, len ) );\n\t\t\t\t}\n\t\t\t\tout = new this( len/2 );\n\t\t\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\t\tbuf[ i ] = clbk.call( thisArg, get( src, i ), i );\n\t\t\t\t}\n\t\t\t\treturn out;\n\t\t\t}\n\t\t\t// If an array contains only complex number objects, then we need to extract real and imaginary components...\n\t\t\tout = new this( len );\n\t\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\t\tj = 0;\n\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\tv = clbk.call( thisArg, get( src, i ), i );\n\t\t\t\tif ( isComplexLike( v ) ) {\n\t\t\t\t\tbuf[ j ] = realf( v );\n\t\t\t\t\tbuf[ j+1 ] = imagf( v );\n\t\t\t\t} else if ( isArrayLikeObject( v ) && v.length >= 2 ) {\n\t\t\t\t\tbuf[ j ] = v[ 0 ];\n\t\t\t\t\tbuf[ j+1 ] = v[ 1 ];\n\t\t\t\t} else {\n\t\t\t\t\tthrow new TypeError( format( 'invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', v ) );\n\t\t\t\t}\n\t\t\t\tj += 2; // stride\n\t\t\t}\n\t\t\treturn out;\n\t\t}\n\t\treturn new this( src );\n\t}\n\tif ( isObject( src ) && HAS_ITERATOR_SYMBOL && isFunction( src[ ITERATOR_SYMBOL ] ) ) { // eslint-disable-line max-len\n\t\tbuf = src[ ITERATOR_SYMBOL ]();\n\t\tif ( !isFunction( buf.next ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.', src ) );\n\t\t}\n\t\tif ( clbk ) {\n\t\t\ttmp = fromIteratorMap( buf, clbk, thisArg );\n\t\t} else {\n\t\t\ttmp = fromIterator( buf );\n\t\t}\n\t\tif ( tmp instanceof Error ) {\n\t\t\tthrow tmp;\n\t\t}\n\t\tlen = tmp.length / 2;\n\t\tout = new this( len );\n\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\tbuf[ i ] = tmp[ i ];\n\t\t}\n\t\treturn out;\n\t}\n\tthrow new TypeError( format( 'invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.', src ) );\n});\n\n/**\n* Creates a new 64-bit complex number array from a variable number of arguments.\n*\n* @name of\n* @memberof Complex64Array\n* @type {Function}\n* @param {...*} element - array elements\n* @throws {TypeError} `this` context must be a constructor\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Complex64Array} 64-bit complex number array\n*\n* @example\n* var arr = Complex64Array.of( 1.0, 1.0, 1.0, 1.0 );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*/\nsetReadOnly( Complex64Array, 'of', function of() {\n\tvar args;\n\tvar i;\n\tif ( !isFunction( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` context must be a constructor.' );\n\t}\n\tif ( !isComplexArrayConstructor( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\targs = [];\n\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\targs.push( arguments[ i ] );\n\t}\n\treturn new this( args );\n});\n\n/**\n* Pointer to the underlying data buffer.\n*\n* @name buffer\n* @memberof Complex64Array.prototype\n* @readonly\n* @type {ArrayBuffer}\n*\n* @example\n* var arr = new Complex64Array( 10 );\n*\n* var buf = arr.buffer;\n* // returns \n*/\nsetReadOnlyAccessor( Complex64Array.prototype, 'buffer', function get() {\n\treturn this._buffer.buffer;\n});\n\n/**\n* Size (in bytes) of the array.\n*\n* @name byteLength\n* @memberof Complex64Array.prototype\n* @readonly\n* @type {NonNegativeInteger}\n*\n* @example\n* var arr = new Complex64Array( 10 );\n*\n* var byteLength = arr.byteLength;\n* // returns 80\n*/\nsetReadOnlyAccessor( Complex64Array.prototype, 'byteLength', function get() {\n\treturn this._buffer.byteLength;\n});\n\n/**\n* Offset (in bytes) of the array from the start of its underlying `ArrayBuffer`.\n*\n* @name byteOffset\n* @memberof Complex64Array.prototype\n* @readonly\n* @type {NonNegativeInteger}\n*\n* @example\n* var arr = new Complex64Array( 10 );\n*\n* var byteOffset = arr.byteOffset;\n* // returns 0\n*/\nsetReadOnlyAccessor( Complex64Array.prototype, 'byteOffset', function get() {\n\treturn this._buffer.byteOffset;\n});\n\n/**\n* Size (in bytes) of each array element.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex64Array.prototype\n* @readonly\n* @type {PositiveInteger}\n* @default 8\n*\n* @example\n* var arr = new Complex64Array( 10 );\n*\n* var nbytes = arr.BYTES_PER_ELEMENT;\n* // returns 8\n*/\nsetReadOnly( Complex64Array.prototype, 'BYTES_PER_ELEMENT', Complex64Array.BYTES_PER_ELEMENT );\n\n/**\n* Copies a sequence of elements within the array to the position starting at `target`.\n*\n* @name copyWithin\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {integer} target - index at which to start copying elements\n* @param {integer} start - source index at which to copy elements from\n* @param {integer} [end] - source index at which to stop copying elements from\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Complex64Array} modified array\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* var arr = new Complex64Array( 4 );\n*\n* // Set the array elements:\n* arr.set( new Complex64( 1.0, 1.0 ), 0 );\n* arr.set( new Complex64( 2.0, 2.0 ), 1 );\n* arr.set( new Complex64( 3.0, 3.0 ), 2 );\n* arr.set( new Complex64( 4.0, 4.0 ), 3 );\n*\n* // Copy the first two elements to the last two elements:\n* arr.copyWithin( 2, 0, 2 );\n*\n* // Get the last array element:\n* var z = arr.get( 3 );\n*\n* var re = realf( z );\n* // returns 2.0\n*\n* var im = imagf( z );\n* // returns 2.0\n*/\nsetReadOnly( Complex64Array.prototype, 'copyWithin', function copyWithin( target, start ) {\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\t// FIXME: prefer a functional `copyWithin` implementation which addresses lack of universal browser support (e.g., IE11 and Safari) or ensure that typed arrays are polyfilled\n\tif ( arguments.length === 2 ) {\n\t\tthis._buffer.copyWithin( target*2, start*2 );\n\t} else {\n\t\tthis._buffer.copyWithin( target*2, start*2, arguments[2]*2 );\n\t}\n\treturn this;\n});\n\n/**\n* Returns an iterator for iterating over array key-value pairs.\n*\n* @name entries\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Iterator} iterator\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n*\n* var arr = [\n* new Complex64( 1.0, 1.0 ),\n* new Complex64( 2.0, 2.0 ),\n* new Complex64( 3.0, 3.0 )\n* ];\n* arr = new Complex64Array( arr );\n*\n* // Create an iterator:\n* var it = arr.entries();\n*\n* // Iterate over the key-value pairs...\n* var v = it.next().value;\n* // returns [ 0, ]\n*\n* v = it.next().value;\n* // returns [ 1, ]\n*\n* v = it.next().value;\n* // returns [ 2, ]\n*\n* var bool = it.next().done;\n* // returns true\n*/\nsetReadOnly( Complex64Array.prototype, 'entries', function entries() {\n\tvar buffer;\n\tvar self;\n\tvar iter;\n\tvar len;\n\tvar FLG;\n\tvar i;\n\tvar j;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tself = this;\n\tbuffer = this._buffer;\n\tlen = this._length;\n\n\t// Initialize the iteration indices:\n\ti = -1;\n\tj = -2;\n\n\t// Create an iterator protocol-compliant object:\n\titer = {};\n\tsetReadOnly( iter, 'next', next );\n\tsetReadOnly( iter, 'return', end );\n\n\tif ( ITERATOR_SYMBOL ) {\n\t\tsetReadOnly( iter, ITERATOR_SYMBOL, factory );\n\t}\n\treturn iter;\n\n\t/**\n\t* Returns an iterator protocol-compliant object containing the next iterated value.\n\t*\n\t* @private\n\t* @returns {Object} iterator protocol-compliant object\n\t*/\n\tfunction next() {\n\t\tvar z;\n\t\ti += 1;\n\t\tif ( FLG || i >= len ) {\n\t\t\treturn {\n\t\t\t\t'done': true\n\t\t\t};\n\t\t}\n\t\tj += 2;\n\t\tz = new Complex64( buffer[ j ], buffer[ j+1 ] );\n\t\treturn {\n\t\t\t'value': [ i, z ],\n\t\t\t'done': false\n\t\t};\n\t}\n\n\t/**\n\t* Finishes an iterator.\n\t*\n\t* @private\n\t* @param {*} [value] - value to return\n\t* @returns {Object} iterator protocol-compliant object\n\t*/\n\tfunction end( value ) {\n\t\tFLG = true;\n\t\tif ( arguments.length ) {\n\t\t\treturn {\n\t\t\t\t'value': value,\n\t\t\t\t'done': true\n\t\t\t};\n\t\t}\n\t\treturn {\n\t\t\t'done': true\n\t\t};\n\t}\n\n\t/**\n\t* Returns a new iterator.\n\t*\n\t* @private\n\t* @returns {Iterator} iterator\n\t*/\n\tfunction factory() {\n\t\treturn self.entries();\n\t}\n});\n\n/**\n* Returns an array element.\n*\n* @name get\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {NonNegativeInteger} idx - element index\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} must provide a nonnegative integer\n* @returns {(Complex64|void)} array element\n*\n* @example\n* var arr = new Complex64Array( 10 );\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* var z = arr.get( 0 );\n* // returns \n*\n* var re = realf( z );\n* // returns 0.0\n*\n* var im = imagf( z );\n* // returns 0.0\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n*\n* z = arr.get( 0 );\n* // returns \n*\n* re = realf( z );\n* // returns 1.0\n*\n* im = imagf( z );\n* // returns -1.0\n*\n* z = arr.get( 100 );\n* // returns undefined\n*/\nsetReadOnly( Complex64Array.prototype, 'get', function get( idx ) {\n\tvar buf;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isNonNegativeInteger( idx ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Must provide a nonnegative integer. Value: `%s`.', idx ) );\n\t}\n\tif ( idx >= this._length ) {\n\t\treturn;\n\t}\n\tbuf = this._buffer;\n\tidx *= 2;\n\treturn new Complex64( buf[ idx ], buf[ idx+1 ] );\n});\n\n/**\n* Number of array elements.\n*\n* @name length\n* @memberof Complex64Array.prototype\n* @readonly\n* @type {NonNegativeInteger}\n*\n* @example\n* var arr = new Complex64Array( 10 );\n*\n* var len = arr.length;\n* // returns 10\n*/\nsetReadOnlyAccessor( Complex64Array.prototype, 'length', function get() {\n\treturn this._length;\n});\n\n/**\n* Sets an array element.\n*\n* ## Notes\n*\n* - When provided a typed array, real or complex, we must check whether the source array shares the same buffer as the target array and whether the underlying memory overlaps. In particular, we are concerned with the following scenario:\n*\n* ```text\n* buf: ---------------------\n* src: ---------------------\n* ```\n*\n* In the above, as we copy values from `src`, we will overwrite values in the `src` view, resulting in duplicated values copied into the end of `buf`, which is not intended. Hence, to avoid overwriting source values, we must **copy** source values to a temporary array.\n*\n* In the other overlapping scenario,\n*\n* ```text\n* buf: ---------------------\n* src: ---------------------\n* ```\n*\n* by the time we begin copying into the overlapping region, we are copying from the end of `src`, a non-overlapping region, which means we don't run the risk of copying copied values, rather than the original `src` values as intended.\n*\n*\n* @name set\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {(Collection|Complex|ComplexArray)} value - value(s)\n* @param {NonNegativeInteger} [i=0] - element index at which to start writing values\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be either a complex number, an array-like object, or a complex number array\n* @throws {TypeError} index argument must be a nonnegative integer\n* @throws {RangeError} array-like objects must have a length which is a multiple of two\n* @throws {RangeError} index argument is out-of-bounds\n* @throws {RangeError} target array lacks sufficient storage to accommodate source values\n* @returns {void}\n*\n* @example\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* var arr = new Complex64Array( 10 );\n*\n* var z = arr.get( 0 );\n* // returns \n*\n* var re = realf( z );\n* // returns 0.0\n*\n* var im = imagf( z );\n* // returns 0.0\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n*\n* z = arr.get( 0 );\n* // returns \n*\n* re = realf( z );\n* // returns 1.0\n*\n* im = imagf( z );\n* // returns -1.0\n*/\nsetReadOnly( Complex64Array.prototype, 'set', function set( value ) {\n\t/* eslint-disable no-underscore-dangle */\n\tvar sbuf;\n\tvar idx;\n\tvar buf;\n\tvar tmp;\n\tvar flg;\n\tvar N;\n\tvar v;\n\tvar i;\n\tvar j;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tbuf = this._buffer;\n\tif ( arguments.length > 1 ) {\n\t\tidx = arguments[ 1 ];\n\t\tif ( !isNonNegativeInteger( idx ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Index argument must be a nonnegative integer. Value: `%s`.', idx ) );\n\t\t}\n\t} else {\n\t\tidx = 0;\n\t}\n\tif ( isComplexLike( value ) ) {\n\t\tif ( idx >= this._length ) {\n\t\t\tthrow new RangeError( format( 'invalid argument. Index argument is out-of-bounds. Value: `%u`.', idx ) );\n\t\t}\n\t\tidx *= 2;\n\t\tbuf[ idx ] = realf( value );\n\t\tbuf[ idx+1 ] = imagf( value );\n\t\treturn;\n\t}\n\tif ( isComplexArray( value ) ) {\n\t\tN = value._length;\n\t\tif ( idx+N > this._length ) {\n\t\t\tthrow new RangeError( 'invalid arguments. Target array lacks sufficient storage to accommodate source values.' );\n\t\t}\n\t\tsbuf = value._buffer;\n\n\t\t// Check for overlapping memory...\n\t\tj = buf.byteOffset + (idx*BYTES_PER_ELEMENT);\n\t\tif (\n\t\t\tsbuf.buffer === buf.buffer &&\n\t\t\t(\n\t\t\t\tsbuf.byteOffset < j &&\n\t\t\t\tsbuf.byteOffset+sbuf.byteLength > j\n\t\t\t)\n\t\t) {\n\t\t\t// We need to copy source values...\n\t\t\ttmp = new Float32Array( sbuf.length );\n\t\t\tfor ( i = 0; i < sbuf.length; i++ ) {\n\t\t\t\ttmp[ i ] = sbuf[ i ];\n\t\t\t}\n\t\t\tsbuf = tmp;\n\t\t}\n\t\tidx *= 2;\n\t\tj = 0;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\tbuf[ idx ] = sbuf[ j ];\n\t\t\tbuf[ idx+1 ] = sbuf[ j+1 ];\n\t\t\tidx += 2; // stride\n\t\t\tj += 2; // stride\n\t\t}\n\t\treturn;\n\t}\n\tif ( isCollection( value ) ) {\n\t\t// Detect whether we've been provided an array of complex numbers...\n\t\tN = value.length;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\tif ( !isComplexLike( value[ i ] ) ) {\n\t\t\t\tflg = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t// If an array does not contain only complex numbers, then we assume interleaved real and imaginary components...\n\t\tif ( flg ) {\n\t\t\tif ( !isEven( N ) ) {\n\t\t\t\tthrow new RangeError( format( 'invalid argument. Array-like object arguments must have a length which is a multiple of two. Length: `%u`.', N ) );\n\t\t\t}\n\t\t\tif ( idx+(N/2) > this._length ) {\n\t\t\t\tthrow new RangeError( 'invalid arguments. Target array lacks sufficient storage to accommodate source values.' );\n\t\t\t}\n\t\t\tsbuf = value;\n\n\t\t\t// Check for overlapping memory...\n\t\t\tj = buf.byteOffset + (idx*BYTES_PER_ELEMENT);\n\t\t\tif (\n\t\t\t\tsbuf.buffer === buf.buffer &&\n\t\t\t\t(\n\t\t\t\t\tsbuf.byteOffset < j &&\n\t\t\t\t\tsbuf.byteOffset+sbuf.byteLength > j\n\t\t\t\t)\n\t\t\t) {\n\t\t\t\t// We need to copy source values...\n\t\t\t\ttmp = new Float32Array( N );\n\t\t\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\t\t\ttmp[ i ] = sbuf[ i ];\n\t\t\t\t}\n\t\t\t\tsbuf = tmp;\n\t\t\t}\n\t\t\tidx *= 2;\n\t\t\tN /= 2;\n\t\t\tj = 0;\n\t\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\t\tbuf[ idx ] = sbuf[ j ];\n\t\t\t\tbuf[ idx+1 ] = sbuf[ j+1 ];\n\t\t\t\tidx += 2; // stride\n\t\t\t\tj += 2; // stride\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\t// If an array contains only complex numbers, then we need to extract real and imaginary components...\n\t\tif ( idx+N > this._length ) {\n\t\t\tthrow new RangeError( 'invalid arguments. Target array lacks sufficient storage to accommodate source values.' );\n\t\t}\n\t\tidx *= 2;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\tv = value[ i ];\n\t\t\tbuf[ idx ] = realf( v );\n\t\t\tbuf[ idx+1 ] = imagf( v );\n\t\t\tidx += 2; // stride\n\t\t}\n\t\treturn;\n\t}\n\tthrow new TypeError( format( 'invalid argument. First argument must be either a complex number, an array-like object, or a complex number array. Value: `%s`.', value ) );\n\n\t/* eslint-enable no-underscore-dangle */\n});\n\n\n// EXPORTS //\n\nexport default Complex64Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Returns the real component of a double-precision complex floating-point number.\n*\n* @param {Complex} z - complex number\n* @returns {number} real component\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n*\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var re = real( z );\n* // returns 5.0\n*/\nfunction real( z ) {\n\treturn z.re;\n}\n\n\n// EXPORTS //\n\nexport default real;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Returns the imaginary component of a double-precision complex floating-point number.\n*\n* @param {Complex} z - complex number\n* @returns {number} imaginary component\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n*\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var im = imag( z );\n* // returns 3.0\n*/\nfunction imag( z ) {\n\treturn z.im;\n}\n\n\n// EXPORTS //\n\nexport default imag;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isArrayLikeObject from '@stdlib/assert-is-array-like-object';\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport format from '@stdlib/string-format';\nimport real from '@stdlib/complex-real';\nimport imag from '@stdlib/complex-imag';\n\n\n// MAIN //\n\n/**\n* Returns an array of iterated values.\n*\n* @private\n* @param {Object} it - iterator\n* @returns {(Array|TypeError)} array or an error\n*/\nfunction fromIterator( it ) {\n\tvar out;\n\tvar v;\n\tvar z;\n\n\tout = [];\n\twhile ( true ) {\n\t\tv = it.next();\n\t\tif ( v.done ) {\n\t\t\tbreak;\n\t\t}\n\t\tz = v.value;\n\t\tif ( isArrayLikeObject( z ) && z.length >= 2 ) {\n\t\t\tout.push( z[ 0 ], z[ 1 ] );\n\t\t} else if ( isComplexLike( z ) ) {\n\t\t\tout.push( real( z ), imag( z ) );\n\t\t} else {\n\t\t\treturn new TypeError( format( 'invalid argument. An iterator must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', z ) );\n\t\t}\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default fromIterator;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isArrayLikeObject from '@stdlib/assert-is-array-like-object';\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport format from '@stdlib/string-format';\nimport real from '@stdlib/complex-real';\nimport imag from '@stdlib/complex-imag';\n\n\n// MAIN //\n\n/**\n* Returns an array of iterated values.\n*\n* @private\n* @param {Object} it - iterator\n* @param {Function} clbk - callback to invoke for each iterated value\n* @param {*} thisArg - invocation context\n* @returns {(Array|TypeError)} array or an error\n*/\nfunction fromIteratorMap( it, clbk, thisArg ) {\n\tvar out;\n\tvar v;\n\tvar z;\n\tvar i;\n\n\tout = [];\n\ti = -1;\n\twhile ( true ) {\n\t\tv = it.next();\n\t\tif ( v.done ) {\n\t\t\tbreak;\n\t\t}\n\t\ti += 1;\n\t\tz = clbk.call( thisArg, v.value, i );\n\t\tif ( isArrayLikeObject( z ) && z.length >= 2 ) {\n\t\t\tout.push( z[ 0 ], z[ 1 ] );\n\t\t} else if ( isComplexLike( z ) ) {\n\t\t\tout.push( real( z ), imag( z ) );\n\t\t} else {\n\t\t\treturn new TypeError( format( 'invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', z ) );\n\t\t}\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default fromIteratorMap;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport real from '@stdlib/complex-real';\nimport imag from '@stdlib/complex-imag';\n\n\n// MAIN //\n\n/**\n* Returns a strided array of real and imaginary components.\n*\n* @private\n* @param {Float64Array} buf - output array\n* @param {Array} arr - array containing complex numbers\n* @returns {(Float64Array|null)} output array or null\n*/\nfunction fromArray( buf, arr ) {\n\tvar len;\n\tvar v;\n\tvar i;\n\tvar j;\n\n\tlen = arr.length;\n\tj = 0;\n\tfor ( i = 0; i < len; i++ ) {\n\t\tv = arr[ i ];\n\t\tif ( !isComplexLike( v ) ) {\n\t\t\treturn null;\n\t\t}\n\t\tbuf[ j ] = real( v );\n\t\tbuf[ j+1 ] = imag( v );\n\t\tj += 2; // stride\n\t}\n\treturn buf;\n}\n\n\n// EXPORTS //\n\nexport default fromArray;\n","/* eslint-disable no-restricted-syntax, max-lines, no-invalid-this */\n\n/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isNonNegativeInteger } from '@stdlib/assert-is-nonnegative-integer';\nimport isArrayLikeObject from '@stdlib/assert-is-array-like-object';\nimport isCollection from '@stdlib/assert-is-collection';\nimport isArrayBuffer from '@stdlib/assert-is-arraybuffer';\nimport isObject from '@stdlib/assert-is-object';\nimport isArray from '@stdlib/assert-is-array';\nimport isFunction from '@stdlib/assert-is-function';\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport isEven from '@stdlib/math-base-assert-is-even';\nimport isInteger from '@stdlib/math-base-assert-is-integer';\nimport hasIteratorSymbolSupport from '@stdlib/assert-has-iterator-symbol-support';\nimport ITERATOR_SYMBOL from '@stdlib/symbol-iterator';\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport setReadOnlyAccessor from '@stdlib/utils-define-nonenumerable-read-only-accessor';\nimport Float64Array from '@stdlib/array-float64';\nimport Complex128 from '@stdlib/complex-float64';\nimport real from '@stdlib/complex-real';\nimport imag from '@stdlib/complex-imag';\nimport reinterpret64 from '@stdlib/strided-base-reinterpret-complex64';\nimport reinterpret128 from '@stdlib/strided-base-reinterpret-complex128';\nimport getter from '@stdlib/array-base-getter';\nimport accessorGetter from '@stdlib/array-base-accessor-getter';\nimport format from '@stdlib/string-format';\nimport fromIterator from './from_iterator.js';\nimport fromIteratorMap from './from_iterator_map.js';\nimport fromArray from './from_array.js';\n\n\n// VARIABLES //\n\nvar BYTES_PER_ELEMENT = Float64Array.BYTES_PER_ELEMENT * 2;\nvar HAS_ITERATOR_SYMBOL = hasIteratorSymbolSupport();\n\n\n// FUNCTIONS //\n\n/**\n* Returns a boolean indicating if a value is a complex typed array.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a complex typed array\n*/\nfunction isComplexArray( value ) {\n\treturn (\n\t\tvalue instanceof Complex128Array ||\n\t\t(\n\t\t\ttypeof value === 'object' &&\n\t\t\tvalue !== null &&\n\t\t\t(\n\t\t\t\tvalue.constructor.name === 'Complex64Array' ||\n\t\t\t\tvalue.constructor.name === 'Complex128Array'\n\t\t\t) &&\n\t\t\ttypeof value._length === 'number' && // eslint-disable-line no-underscore-dangle\n\n\t\t\t// NOTE: we don't perform a more rigorous test here for a typed array for performance reasons, as robustly checking for a typed array instance could require walking the prototype tree and performing relatively expensive constructor checks...\n\t\t\ttypeof value._buffer === 'object' // eslint-disable-line no-underscore-dangle\n\t\t)\n\t);\n}\n\n/**\n* Returns a boolean indicating if a value is a complex typed array constructor.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a complex typed array constructor\n*/\nfunction isComplexArrayConstructor( value ) {\n\treturn (\n\t\tvalue === Complex128Array ||\n\n\t\t// NOTE: weaker test in order to avoid a circular dependency with Complex64Array...\n\t\tvalue.name === 'Complex64Array'\n\t);\n}\n\n/**\n* Returns a boolean indicating if a value is a `Complex64Array`.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a `Complex64Array`\n*/\nfunction isComplex64Array( value ) {\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\tvalue.constructor.name === 'Complex64Array' &&\n\t\tvalue.BYTES_PER_ELEMENT === BYTES_PER_ELEMENT/2\n\t);\n}\n\n/**\n* Returns a boolean indicating if a value is a `Complex128Array`.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a `Complex128Array`\n*/\nfunction isComplex128Array( value ) {\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\tvalue.constructor.name === 'Complex128Array' &&\n\t\tvalue.BYTES_PER_ELEMENT === BYTES_PER_ELEMENT\n\t);\n}\n\n\n// MAIN //\n\n/**\n* 128-bit complex number array constructor.\n*\n* @constructor\n* @param {(NonNegativeInteger|Collection|ArrayBuffer|Iterable)} [arg] - length, typed array, array-like object, buffer, or iterable\n* @param {NonNegativeInteger} [byteOffset=0] - byte offset\n* @param {NonNegativeInteger} [length] - view length\n* @throws {RangeError} ArrayBuffer byte length must be a multiple of `16`\n* @throws {RangeError} array-like object and typed array input arguments must have a length which is a multiple of two\n* @throws {TypeError} if provided only a single argument, must provide a valid argument\n* @throws {TypeError} byte offset must be a nonnegative integer\n* @throws {RangeError} byte offset must be a multiple of `16`\n* @throws {TypeError} view length must be a positive multiple of `16`\n* @throws {RangeError} must provide sufficient memory to accommodate byte offset and view length requirements\n* @throws {TypeError} an iterator must return either a two element array containing real and imaginary components or a complex number\n* @returns {Complex128Array} complex number array\n*\n* @example\n* var arr = new Complex128Array();\n* // returns \n*\n* var len = arr.length;\n* // returns 0\n*\n* @example\n* var arr = new Complex128Array( 2 );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*\n* @example\n* var arr = new Complex128Array( [ 1.0, -1.0 ] );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* import ArrayBuffer from '@stdlib/array-buffer';\n*\n* var buf = new ArrayBuffer( 32 );\n* var arr = new Complex128Array( buf );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*\n* @example\n* import ArrayBuffer from '@stdlib/array-buffer';\n*\n* var buf = new ArrayBuffer( 32 );\n* var arr = new Complex128Array( buf, 16 );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* import ArrayBuffer from '@stdlib/array-buffer';\n*\n* var buf = new ArrayBuffer( 64 );\n* var arr = new Complex128Array( buf, 16, 2 );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*/\nfunction Complex128Array() {\n\tvar byteOffset;\n\tvar nargs;\n\tvar buf;\n\tvar len;\n\n\tnargs = arguments.length;\n\tif ( !(this instanceof Complex128Array) ) {\n\t\tif ( nargs === 0 ) {\n\t\t\treturn new Complex128Array();\n\t\t}\n\t\tif ( nargs === 1 ) {\n\t\t\treturn new Complex128Array( arguments[0] );\n\t\t}\n\t\tif ( nargs === 2 ) {\n\t\t\treturn new Complex128Array( arguments[0], arguments[1] );\n\t\t}\n\t\treturn new Complex128Array( arguments[0], arguments[1], arguments[2] );\n\t}\n\t// Create the underlying data buffer...\n\tif ( nargs === 0 ) {\n\t\tbuf = new Float64Array( 0 ); // backward-compatibility\n\t} else if ( nargs === 1 ) {\n\t\tif ( isNonNegativeInteger( arguments[0] ) ) {\n\t\t\tbuf = new Float64Array( arguments[0]*2 );\n\t\t} else if ( isCollection( arguments[0] ) ) {\n\t\t\tbuf = arguments[ 0 ];\n\t\t\tlen = buf.length;\n\n\t\t\t// If provided a \"generic\" array, peak at the first value, and, if the value is a complex number, try to process as an array of complex numbers, falling back to \"normal\" typed array initialization if we fail and ensuring consistency if the first value had not been a complex number...\n\t\t\tif ( len && isArray( buf ) && isComplexLike( buf[0] ) ) {\n\t\t\t\tbuf = fromArray( new Float64Array( len*2 ), buf );\n\t\t\t\tif ( buf === null ) {\n\t\t\t\t\t// We failed and we are now forced to allocate a new array :-(\n\t\t\t\t\tif ( !isEven( len ) ) {\n\t\t\t\t\t\tthrow new RangeError( format( 'invalid argument. Array-like object arguments must have a length which is a multiple of two. Length: `%u`.', len ) );\n\t\t\t\t\t}\n\t\t\t\t\t// We failed, so fall back to directly setting values...\n\t\t\t\t\tbuf = new Float64Array( arguments[0] );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ( isComplex64Array( buf ) ) {\n\t\t\t\t\tbuf = reinterpret64( buf, 0 );\n\t\t\t\t} else if ( isComplex128Array( buf ) ) {\n\t\t\t\t\tbuf = reinterpret128( buf, 0 );\n\t\t\t\t} else if ( !isEven( len ) ) {\n\t\t\t\t\tthrow new RangeError( format( 'invalid argument. Array-like object and typed array arguments must have a length which is a multiple of two. Length: `%u`.', len ) );\n\t\t\t\t}\n\t\t\t\tbuf = new Float64Array( buf );\n\t\t\t}\n\t\t} else if ( isArrayBuffer( arguments[0] ) ) {\n\t\t\tbuf = arguments[ 0 ];\n\t\t\tif ( !isInteger( buf.byteLength/BYTES_PER_ELEMENT ) ) {\n\t\t\t\tthrow new RangeError( format( 'invalid argument. ArrayBuffer byte length must be a multiple of %u. Byte length: `%u`.', BYTES_PER_ELEMENT, buf.byteLength ) );\n\t\t\t}\n\t\t\tbuf = new Float64Array( buf );\n\t\t} else if ( isObject( arguments[0] ) ) {\n\t\t\tbuf = arguments[ 0 ];\n\t\t\tif ( HAS_ITERATOR_SYMBOL === false ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Environment lacks Symbol.iterator support. Must provide a length, ArrayBuffer, typed array, or array-like object. Value: `%s`.', buf ) );\n\t\t\t}\n\t\t\tif ( !isFunction( buf[ ITERATOR_SYMBOL ] ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.', buf ) );\n\t\t\t}\n\t\t\tbuf = buf[ ITERATOR_SYMBOL ]();\n\t\t\tif ( !isFunction( buf.next ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.', buf ) );\n\t\t\t}\n\t\t\tbuf = fromIterator( buf );\n\t\t\tif ( buf instanceof Error ) {\n\t\t\t\tthrow buf;\n\t\t\t}\n\t\t\tbuf = new Float64Array( buf );\n\t\t} else {\n\t\t\tthrow new TypeError( format( 'invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.', arguments[0] ) );\n\t\t}\n\t} else {\n\t\tbuf = arguments[ 0 ];\n\t\tif ( !isArrayBuffer( buf ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. First argument must be an ArrayBuffer. Value: `%s`.', buf ) );\n\t\t}\n\t\tbyteOffset = arguments[ 1 ];\n\t\tif ( !isNonNegativeInteger( byteOffset ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Byte offset must be a nonnegative integer. Value: `%s`.', byteOffset ) );\n\t\t}\n\t\tif ( !isInteger( byteOffset/BYTES_PER_ELEMENT ) ) {\n\t\t\tthrow new RangeError( format( 'invalid argument. Byte offset must be a multiple of %u. Value: `%u`.', BYTES_PER_ELEMENT, byteOffset ) );\n\t\t}\n\t\tif ( nargs === 2 ) {\n\t\t\tlen = buf.byteLength - byteOffset;\n\t\t\tif ( !isInteger( len/BYTES_PER_ELEMENT ) ) {\n\t\t\t\tthrow new RangeError( format( 'invalid arguments. ArrayBuffer view byte length must be a multiple of %u. View byte length: `%u`.', BYTES_PER_ELEMENT, len ) );\n\t\t\t}\n\t\t\tbuf = new Float64Array( buf, byteOffset );\n\t\t} else {\n\t\t\tlen = arguments[ 2 ];\n\t\t\tif ( !isNonNegativeInteger( len ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Length must be a nonnegative integer. Value: `%s`.', len ) );\n\t\t\t}\n\t\t\tif ( (len*BYTES_PER_ELEMENT) > (buf.byteLength-byteOffset) ) {\n\t\t\t\tthrow new RangeError( format( 'invalid arguments. ArrayBuffer has insufficient capacity. Either decrease the array length or provide a bigger buffer. Minimum capacity: `%u`.', len*BYTES_PER_ELEMENT ) );\n\t\t\t}\n\t\t\tbuf = new Float64Array( buf, byteOffset, len*2 );\n\t\t}\n\t}\n\tsetReadOnly( this, '_buffer', buf );\n\tsetReadOnly( this, '_length', buf.length/2 );\n\n\treturn this;\n}\n\n/**\n* Size (in bytes) of each array element.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex128Array\n* @readonly\n* @type {PositiveInteger}\n* @default 16\n*\n* @example\n* var nbytes = Complex128Array.BYTES_PER_ELEMENT;\n* // returns 16\n*/\nsetReadOnly( Complex128Array, 'BYTES_PER_ELEMENT', BYTES_PER_ELEMENT );\n\n/**\n* Constructor name.\n*\n* @name name\n* @memberof Complex128Array\n* @readonly\n* @type {string}\n* @default 'Complex128Array'\n*\n* @example\n* var name = Complex128Array.name;\n* // returns 'Complex128Array'\n*/\nsetReadOnly( Complex128Array, 'name', 'Complex128Array' );\n\n/**\n* Creates a new 128-bit complex number array from an array-like object or an iterable.\n*\n* @name from\n* @memberof Complex128Array\n* @type {Function}\n* @param {(Collection|Object)} src - array-like object or iterable\n* @param {Function} [clbk] - callback to invoke for each source element\n* @param {*} [thisArg] - context\n* @throws {TypeError} `this` context must be a constructor\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be an array-like object or an iterable\n* @throws {TypeError} second argument must be a function\n* @throws {RangeError} array-like objects must have a length which is a multiple of two\n* @throws {TypeError} an iterator must return either a two element array containing real and imaginary components or a complex number\n* @throws {TypeError} when provided an iterator, a callback must return either a two element array containing real and imaginary components or a complex number\n* @returns {Complex128Array} 128-bit complex number array\n*\n* @example\n* var arr = Complex128Array.from( [ 1.0, -1.0 ] );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n*\n* var arr = Complex128Array.from( [ new Complex128( 1.0, 1.0 ) ] );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* function clbk( v ) {\n* return new Complex128( real(v)*2.0, imag(v)*2.0 );\n* }\n*\n* var arr = Complex128Array.from( [ new Complex128( 1.0, 1.0 ) ], clbk );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*/\nsetReadOnly( Complex128Array, 'from', function from( src ) {\n\tvar thisArg;\n\tvar nargs;\n\tvar clbk;\n\tvar out;\n\tvar buf;\n\tvar tmp;\n\tvar get;\n\tvar len;\n\tvar flg;\n\tvar v;\n\tvar i;\n\tvar j;\n\tif ( !isFunction( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` context must be a constructor.' );\n\t}\n\tif ( !isComplexArrayConstructor( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tnargs = arguments.length;\n\tif ( nargs > 1 ) {\n\t\tclbk = arguments[ 1 ];\n\t\tif ( !isFunction( clbk ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be a function. Value: `%s`.', clbk ) );\n\t\t}\n\t\tif ( nargs > 2 ) {\n\t\t\tthisArg = arguments[ 2 ];\n\t\t}\n\t}\n\tif ( isComplexArray( src ) ) {\n\t\tlen = src.length;\n\t\tif ( clbk ) {\n\t\t\tout = new this( len );\n\t\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\t\tj = 0;\n\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\tv = clbk.call( thisArg, src.get( i ), i );\n\t\t\t\tif ( isComplexLike( v ) ) {\n\t\t\t\t\tbuf[ j ] = real( v );\n\t\t\t\t\tbuf[ j+1 ] = imag( v );\n\t\t\t\t} else if ( isArrayLikeObject( v ) && v.length >= 2 ) {\n\t\t\t\t\tbuf[ j ] = v[ 0 ];\n\t\t\t\t\tbuf[ j+1 ] = v[ 1 ];\n\t\t\t\t} else {\n\t\t\t\t\tthrow new TypeError( format( 'invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', v ) );\n\t\t\t\t}\n\t\t\t\tj += 2; // stride\n\t\t\t}\n\t\t\treturn out;\n\t\t}\n\t\treturn new this( src );\n\t}\n\tif ( isCollection( src ) ) {\n\t\tif ( clbk ) {\n\t\t\t// Note: array contents affect how we iterate over a provided data source. If only complex number objects, we can extract real and imaginary components. Otherwise, for non-complex number arrays (e.g., `Float64Array`, etc), we assume a strided array where real and imaginary components are interleaved. In the former case, we expect a callback to return real and imaginary components (possibly as a complex number). In the latter case, we expect a callback to return *either* a real or imaginary component.\n\n\t\t\tlen = src.length;\n\t\t\tif ( src.get && src.set ) {\n\t\t\t\tget = accessorGetter( 'default' );\n\t\t\t} else {\n\t\t\t\tget = getter( 'default' );\n\t\t\t}\n\t\t\t// Detect whether we've been provided an array which returns complex number objects...\n\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\tif ( !isComplexLike( get( src, i ) ) ) {\n\t\t\t\t\tflg = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// If an array does not contain only complex number objects, then we assume interleaved real and imaginary components...\n\t\t\tif ( flg ) {\n\t\t\t\tif ( !isEven( len ) ) {\n\t\t\t\t\tthrow new RangeError( format( 'invalid argument. First argument must have a length which is a multiple of two. Length: `%u`.', len ) );\n\t\t\t\t}\n\t\t\t\tout = new this( len/2 );\n\t\t\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\t\tbuf[ i ] = clbk.call( thisArg, get( src, i ), i );\n\t\t\t\t}\n\t\t\t\treturn out;\n\t\t\t}\n\t\t\t// If an array contains only complex number objects, then we need to extract real and imaginary components...\n\t\t\tout = new this( len );\n\t\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\t\tj = 0;\n\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\tv = clbk.call( thisArg, get( src, i ), i );\n\t\t\t\tif ( isComplexLike( v ) ) {\n\t\t\t\t\tbuf[ j ] = real( v );\n\t\t\t\t\tbuf[ j+1 ] = imag( v );\n\t\t\t\t} else if ( isArrayLikeObject( v ) && v.length >= 2 ) {\n\t\t\t\t\tbuf[ j ] = v[ 0 ];\n\t\t\t\t\tbuf[ j+1 ] = v[ 1 ];\n\t\t\t\t} else {\n\t\t\t\t\tthrow new TypeError( format( 'invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', v ) );\n\t\t\t\t}\n\t\t\t\tj += 2; // stride\n\t\t\t}\n\t\t\treturn out;\n\t\t}\n\t\treturn new this( src );\n\t}\n\tif ( isObject( src ) && HAS_ITERATOR_SYMBOL && isFunction( src[ ITERATOR_SYMBOL ] ) ) { // eslint-disable-line max-len\n\t\tbuf = src[ ITERATOR_SYMBOL ]();\n\t\tif ( !isFunction( buf.next ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.', src ) );\n\t\t}\n\t\tif ( clbk ) {\n\t\t\ttmp = fromIteratorMap( buf, clbk, thisArg );\n\t\t} else {\n\t\t\ttmp = fromIterator( buf );\n\t\t}\n\t\tif ( tmp instanceof Error ) {\n\t\t\tthrow tmp;\n\t\t}\n\t\tlen = tmp.length / 2;\n\t\tout = new this( len );\n\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\tbuf[ i ] = tmp[ i ];\n\t\t}\n\t\treturn out;\n\t}\n\tthrow new TypeError( format( 'invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.', src ) );\n});\n\n/**\n* Creates a new 128-bit complex number array from a variable number of arguments.\n*\n* @name of\n* @memberof Complex128Array\n* @type {Function}\n* @param {...*} element - array elements\n* @throws {TypeError} `this` context must be a constructor\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Complex128Array} 128-bit complex number array\n*\n* @example\n* var arr = Complex128Array.of( 1.0, 1.0, 1.0, 1.0 );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*/\nsetReadOnly( Complex128Array, 'of', function of() {\n\tvar args;\n\tvar i;\n\tif ( !isFunction( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` context must be a constructor.' );\n\t}\n\tif ( !isComplexArrayConstructor( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\targs = [];\n\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\targs.push( arguments[ i ] );\n\t}\n\treturn new this( args );\n});\n\n/**\n* Pointer to the underlying data buffer.\n*\n* @name buffer\n* @memberof Complex128Array.prototype\n* @readonly\n* @type {ArrayBuffer}\n*\n* @example\n* var arr = new Complex128Array( 10 );\n*\n* var buf = arr.buffer;\n* // returns \n*/\nsetReadOnlyAccessor( Complex128Array.prototype, 'buffer', function get() {\n\treturn this._buffer.buffer;\n});\n\n/**\n* Size (in bytes) of the array.\n*\n* @name byteLength\n* @memberof Complex128Array.prototype\n* @readonly\n* @type {NonNegativeInteger}\n*\n* @example\n* var arr = new Complex128Array( 10 );\n*\n* var byteLength = arr.byteLength;\n* // returns 160\n*/\nsetReadOnlyAccessor( Complex128Array.prototype, 'byteLength', function get() {\n\treturn this._buffer.byteLength;\n});\n\n/**\n* Offset (in bytes) of the array from the start of its underlying `ArrayBuffer`.\n*\n* @name byteOffset\n* @memberof Complex128Array.prototype\n* @readonly\n* @type {NonNegativeInteger}\n*\n* @example\n* var arr = new Complex128Array( 10 );\n*\n* var byteOffset = arr.byteOffset;\n* // returns 0\n*/\nsetReadOnlyAccessor( Complex128Array.prototype, 'byteOffset', function get() {\n\treturn this._buffer.byteOffset;\n});\n\n/**\n* Size (in bytes) of each array element.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex128Array.prototype\n* @readonly\n* @type {PositiveInteger}\n* @default 16\n*\n* @example\n* var arr = new Complex128Array( 10 );\n*\n* var nbytes = arr.BYTES_PER_ELEMENT;\n* // returns 16\n*/\nsetReadOnly( Complex128Array.prototype, 'BYTES_PER_ELEMENT', Complex128Array.BYTES_PER_ELEMENT );\n\n/**\n* Copies a sequence of elements within the array to the position starting at `target`.\n*\n* @name copyWithin\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {integer} target - index at which to start copying elements\n* @param {integer} start - source index at which to copy elements from\n* @param {integer} [end] - source index at which to stop copying elements from\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Complex128Array} modified array\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* var arr = new Complex128Array( 4 );\n*\n* // Set the array elements:\n* arr.set( new Complex128( 1.0, 1.0 ), 0 );\n* arr.set( new Complex128( 2.0, 2.0 ), 1 );\n* arr.set( new Complex128( 3.0, 3.0 ), 2 );\n* arr.set( new Complex128( 4.0, 4.0 ), 3 );\n*\n* // Copy the first two elements to the last two elements:\n* arr.copyWithin( 2, 0, 2 );\n*\n* // Get the last array element:\n* var z = arr.get( 3 );\n*\n* var re = real( z );\n* // returns 2.0\n*\n* var im = imag( z );\n* // returns 2.0\n*/\nsetReadOnly( Complex128Array.prototype, 'copyWithin', function copyWithin( target, start ) {\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\t// FIXME: prefer a functional `copyWithin` implementation which addresses lack of universal browser support (e.g., IE11 and Safari) or ensure that typed arrays are polyfilled\n\tif ( arguments.length === 2 ) {\n\t\tthis._buffer.copyWithin( target*2, start*2 );\n\t} else {\n\t\tthis._buffer.copyWithin( target*2, start*2, arguments[2]*2 );\n\t}\n\treturn this;\n});\n\n/**\n* Returns an iterator for iterating over array key-value pairs.\n*\n* @name entries\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Iterator} iterator\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n*\n* var arr = [\n* new Complex128( 1.0, 1.0 ),\n* new Complex128( 2.0, 2.0 ),\n* new Complex128( 3.0, 3.0 )\n* ];\n* arr = new Complex128Array( arr );\n*\n* // Create an iterator:\n* var it = arr.entries();\n*\n* // Iterate over the key-value pairs...\n* var v = it.next().value;\n* // returns [ 0, ]\n*\n* v = it.next().value;\n* // returns [ 1, ]\n*\n* v = it.next().value;\n* // returns [ 2, ]\n*\n* var bool = it.next().done;\n* // returns true\n*/\nsetReadOnly( Complex128Array.prototype, 'entries', function entries() {\n\tvar buffer;\n\tvar self;\n\tvar iter;\n\tvar len;\n\tvar FLG;\n\tvar i;\n\tvar j;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tself = this;\n\tbuffer = this._buffer;\n\tlen = this._length;\n\n\t// Initialize the iteration indices:\n\ti = -1;\n\tj = -2;\n\n\t// Create an iterator protocol-compliant object:\n\titer = {};\n\tsetReadOnly( iter, 'next', next );\n\tsetReadOnly( iter, 'return', end );\n\n\tif ( ITERATOR_SYMBOL ) {\n\t\tsetReadOnly( iter, ITERATOR_SYMBOL, factory );\n\t}\n\treturn iter;\n\n\t/**\n\t* Returns an iterator protocol-compliant object containing the next iterated value.\n\t*\n\t* @private\n\t* @returns {Object} iterator protocol-compliant object\n\t*/\n\tfunction next() {\n\t\tvar z;\n\t\ti += 1;\n\t\tif ( FLG || i >= len ) {\n\t\t\treturn {\n\t\t\t\t'done': true\n\t\t\t};\n\t\t}\n\t\tj += 2;\n\t\tz = new Complex128( buffer[ j ], buffer[ j+1 ] );\n\t\treturn {\n\t\t\t'value': [ i, z ],\n\t\t\t'done': false\n\t\t};\n\t}\n\n\t/**\n\t* Finishes an iterator.\n\t*\n\t* @private\n\t* @param {*} [value] - value to return\n\t* @returns {Object} iterator protocol-compliant object\n\t*/\n\tfunction end( value ) {\n\t\tFLG = true;\n\t\tif ( arguments.length ) {\n\t\t\treturn {\n\t\t\t\t'value': value,\n\t\t\t\t'done': true\n\t\t\t};\n\t\t}\n\t\treturn {\n\t\t\t'done': true\n\t\t};\n\t}\n\n\t/**\n\t* Returns a new iterator.\n\t*\n\t* @private\n\t* @returns {Iterator} iterator\n\t*/\n\tfunction factory() {\n\t\treturn self.entries();\n\t}\n});\n\n/**\n* Returns an array element.\n*\n* @name get\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {NonNegativeInteger} idx - element index\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} must provide a nonnegative integer\n* @returns {(Complex128|void)} array element\n*\n* @example\n* var arr = new Complex128Array( 10 );\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* var z = arr.get( 0 );\n* // returns \n*\n* var re = real( z );\n* // returns 0.0\n*\n* var im = imag( z );\n* // returns 0.0\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n*\n* z = arr.get( 0 );\n* // returns \n*\n* re = real( z );\n* // returns 1.0\n*\n* im = imag( z );\n* // returns -1.0\n*\n* z = arr.get( 100 );\n* // returns undefined\n*/\nsetReadOnly( Complex128Array.prototype, 'get', function get( idx ) {\n\tvar buf;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isNonNegativeInteger( idx ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Must provide a nonnegative integer. Value: `%s`.', idx ) );\n\t}\n\tif ( idx >= this._length ) {\n\t\treturn;\n\t}\n\tbuf = this._buffer;\n\tidx *= 2;\n\treturn new Complex128( buf[ idx ], buf[ idx+1 ] );\n});\n\n/**\n* Number of array elements.\n*\n* @name length\n* @memberof Complex128Array.prototype\n* @readonly\n* @type {NonNegativeInteger}\n*\n* @example\n* var arr = new Complex128Array( 10 );\n*\n* var len = arr.length;\n* // returns 10\n*/\nsetReadOnlyAccessor( Complex128Array.prototype, 'length', function get() {\n\treturn this._length;\n});\n\n/**\n* Sets an array element.\n*\n* ## Notes\n*\n* - When provided a typed array, real or complex, we must check whether the source array shares the same buffer as the target array and whether the underlying memory overlaps. In particular, we are concerned with the following scenario:\n*\n* ```text\n* buf: ---------------------\n* src: ---------------------\n* ```\n*\n* In the above, as we copy values from `src`, we will overwrite values in the `src` view, resulting in duplicated values copied into the end of `buf`, which is not intended. Hence, to avoid overwriting source values, we must **copy** source values to a temporary array.\n*\n* In the other overlapping scenario,\n*\n* ```text\n* buf: ---------------------\n* src: ---------------------\n* ```\n*\n* by the time we begin copying into the overlapping region, we are copying from the end of `src`, a non-overlapping region, which means we don't run the risk of copying copied values, rather than the original `src` values as intended.\n*\n*\n* @name set\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {(Collection|Complex|ComplexArray)} value - value(s)\n* @param {NonNegativeInteger} [i=0] - element index at which to start writing values\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be either a complex number, an array-like object, or a complex number array\n* @throws {TypeError} index argument must be a nonnegative integer\n* @throws {RangeError} array-like objects must have a length which is a multiple of two\n* @throws {RangeError} index argument is out-of-bounds\n* @throws {RangeError} target array lacks sufficient storage to accommodate source values\n* @returns {void}\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* var arr = new Complex128Array( 10 );\n*\n* var z = arr.get( 0 );\n* // returns \n*\n* var re = real( z );\n* // returns 0.0\n*\n* var im = imag( z );\n* // returns 0.0\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n*\n* z = arr.get( 0 );\n* // returns \n*\n* re = real( z );\n* // returns 1.0\n*\n* im = imag( z );\n* // returns -1.0\n*/\nsetReadOnly( Complex128Array.prototype, 'set', function set( value ) {\n\t/* eslint-disable no-underscore-dangle */\n\tvar sbuf;\n\tvar idx;\n\tvar buf;\n\tvar tmp;\n\tvar flg;\n\tvar N;\n\tvar v;\n\tvar i;\n\tvar j;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tbuf = this._buffer;\n\tif ( arguments.length > 1 ) {\n\t\tidx = arguments[ 1 ];\n\t\tif ( !isNonNegativeInteger( idx ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Index argument must be a nonnegative integer. Value: `%s`.', idx ) );\n\t\t}\n\t} else {\n\t\tidx = 0;\n\t}\n\tif ( isComplexLike( value ) ) {\n\t\tif ( idx >= this._length ) {\n\t\t\tthrow new RangeError( format( 'invalid argument. Index argument is out-of-bounds. Value: `%u`.', idx ) );\n\t\t}\n\t\tidx *= 2;\n\t\tbuf[ idx ] = real( value );\n\t\tbuf[ idx+1 ] = imag( value );\n\t\treturn;\n\t}\n\tif ( isComplexArray( value ) ) {\n\t\tN = value._length;\n\t\tif ( idx+N > this._length ) {\n\t\t\tthrow new RangeError( 'invalid arguments. Target array lacks sufficient storage to accommodate source values.' );\n\t\t}\n\t\tsbuf = value._buffer;\n\n\t\t// Check for overlapping memory...\n\t\tj = buf.byteOffset + (idx*BYTES_PER_ELEMENT);\n\t\tif (\n\t\t\tsbuf.buffer === buf.buffer &&\n\t\t\t(\n\t\t\t\tsbuf.byteOffset < j &&\n\t\t\t\tsbuf.byteOffset+sbuf.byteLength > j\n\t\t\t)\n\t\t) {\n\t\t\t// We need to copy source values...\n\t\t\ttmp = new Float64Array( sbuf.length );\n\t\t\tfor ( i = 0; i < sbuf.length; i++ ) {\n\t\t\t\ttmp[ i ] = sbuf[ i ];\n\t\t\t}\n\t\t\tsbuf = tmp;\n\t\t}\n\t\tidx *= 2;\n\t\tj = 0;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\tbuf[ idx ] = sbuf[ j ];\n\t\t\tbuf[ idx+1 ] = sbuf[ j+1 ];\n\t\t\tidx += 2; // stride\n\t\t\tj += 2; // stride\n\t\t}\n\t\treturn;\n\t}\n\tif ( isCollection( value ) ) {\n\t\t// Detect whether we've been provided an array of complex numbers...\n\t\tN = value.length;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\tif ( !isComplexLike( value[ i ] ) ) {\n\t\t\t\tflg = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t// If an array does not contain only complex numbers, then we assume interleaved real and imaginary components...\n\t\tif ( flg ) {\n\t\t\tif ( !isEven( N ) ) {\n\t\t\t\tthrow new RangeError( format( 'invalid argument. Array-like object arguments must have a length which is a multiple of two. Length: `%u`.', N ) );\n\t\t\t}\n\t\t\tif ( idx+(N/2) > this._length ) {\n\t\t\t\tthrow new RangeError( 'invalid arguments. Target array lacks sufficient storage to accommodate source values.' );\n\t\t\t}\n\t\t\tsbuf = value;\n\n\t\t\t// Check for overlapping memory...\n\t\t\tj = buf.byteOffset + (idx*BYTES_PER_ELEMENT);\n\t\t\tif (\n\t\t\t\tsbuf.buffer === buf.buffer &&\n\t\t\t\t(\n\t\t\t\t\tsbuf.byteOffset < j &&\n\t\t\t\t\tsbuf.byteOffset+sbuf.byteLength > j\n\t\t\t\t)\n\t\t\t) {\n\t\t\t\t// We need to copy source values...\n\t\t\t\ttmp = new Float64Array( N );\n\t\t\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\t\t\ttmp[ i ] = sbuf[ i ];\n\t\t\t\t}\n\t\t\t\tsbuf = tmp;\n\t\t\t}\n\t\t\tidx *= 2;\n\t\t\tN /= 2;\n\t\t\tj = 0;\n\t\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\t\tbuf[ idx ] = sbuf[ j ];\n\t\t\t\tbuf[ idx+1 ] = sbuf[ j+1 ];\n\t\t\t\tidx += 2; // stride\n\t\t\t\tj += 2; // stride\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\t// If an array contains only complex numbers, then we need to extract real and imaginary components...\n\t\tif ( idx+N > this._length ) {\n\t\t\tthrow new RangeError( 'invalid arguments. Target array lacks sufficient storage to accommodate source values.' );\n\t\t}\n\t\tidx *= 2;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\tv = value[ i ];\n\t\t\tbuf[ idx ] = real( v );\n\t\t\tbuf[ idx+1 ] = imag( v );\n\t\t\tidx += 2; // stride\n\t\t}\n\t\treturn;\n\t}\n\tthrow new TypeError( format( 'invalid argument. First argument must be either a complex number, an array-like object, or a complex number array. Value: `%s`.', value ) );\n\n\t/* eslint-enable no-underscore-dangle */\n});\n\n\n// EXPORTS //\n\nexport default Complex128Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport Float64Array from '@stdlib/array-float64';\nimport Float32Array from '@stdlib/array-float32';\nimport Int16Array from '@stdlib/array-int16';\nimport Int32Array from '@stdlib/array-int32';\nimport Int8Array from '@stdlib/array-int8';\nimport Uint16Array from '@stdlib/array-uint16';\nimport Uint32Array from '@stdlib/array-uint32';\nimport Uint8Array from '@stdlib/array-uint8';\nimport Uint8ClampedArray from '@stdlib/array-uint8c';\nimport Complex64Array from '@stdlib/array-complex64';\nimport Complex128Array from '@stdlib/array-complex128';\n\n\n// MAIN //\n\n// Mapping from data types to constructors...\nvar ctors = {\n\t'float64': Float64Array,\n\t'float32': Float32Array,\n\t'generic': Array, // TODO: replace with `stdlib` pkg\n\t'int16': Int16Array,\n\t'int32': Int32Array,\n\t'int8': Int8Array,\n\t'uint16': Uint16Array,\n\t'uint32': Uint32Array,\n\t'uint8': Uint8Array,\n\t'uint8c': Uint8ClampedArray,\n\t'complex64': Complex64Array,\n\t'complex128': Complex128Array\n};\n\n\n// EXPORTS //\n\nexport default ctors;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport table from './ctors.js';\n\n\n// MAIN //\n\n/**\n* Returns an array constructor.\n*\n* @param {string} dtype - data type\n* @returns {(Function|null)} constructor or null\n*\n* @example\n* var ctor = ctors( 'float64' );\n* // returns \n*\n* @example\n* var ctor = ctors( 'float' );\n* // returns null\n*/\nfunction ctors( dtype ) {\n\treturn table[ dtype ] || null;\n}\n\n\n// EXPORTS //\n\nexport default ctors;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport filled from '@stdlib/array-base-filled';\n\n\n// MAIN //\n\n/**\n* Returns a zero-filled \"generic\" array.\n*\n* @param {NonNegativeInteger} len - array length\n* @returns {Array} output array\n*\n* @example\n* var out = zeros( 3 );\n* // returns [ 0.0, 0.0, 0.0 ]\n*/\nfunction zeros( len ) {\n\treturn filled( 0.0, len );\n}\n\n\n// EXPORTS //\n\nexport default zeros;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Returns a filled \"generic\" array.\n*\n* @param {*} value - fill value\n* @param {NonNegativeInteger} len - array length\n* @returns {Array} filled array\n*\n* @example\n* var out = filled( 0.0, 3 );\n* // returns [ 0.0, 0.0, 0.0 ]\n*\n* @example\n* var out = filled( 'beep', 3 );\n* // returns [ 'beep', 'beep', 'beep' ]\n*/\nfunction filled( value, len ) {\n\tvar arr;\n\tvar i;\n\n\t// Manually push elements in order to ensure \"fast\" elements...\n\tarr = [];\n\tfor ( i = 0; i < len; i++ ) {\n\t\tarr.push( value );\n\t}\n\treturn arr;\n}\n\n\n// EXPORTS //\n\nexport default filled;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isNonNegativeInteger } from '@stdlib/assert-is-nonnegative-integer';\nimport ctors from '@stdlib/array-ctors';\nimport gzeros from '@stdlib/array-base-zeros';\nimport format from '@stdlib/string-format';\n\n\n// MAIN //\n\n/**\n* Creates a zero-filled array having a specified length.\n*\n* @param {NonNegativeInteger} length - array length\n* @param {string} [dtype=\"float64\"] - data type\n* @throws {TypeError} first argument must be a nonnegative integer\n* @throws {TypeError} second argument must be a recognized data type\n* @returns {(TypedArray|Array|ComplexArray)} array or typed array\n*\n* @example\n* var arr = zeros( 2 );\n* // returns [ 0.0, 0.0 ]\n*\n* @example\n* var arr = zeros( 2, 'float32' );\n* // returns [ 0.0, 0.0 ]\n*/\nfunction zeros( length ) {\n\tvar dtype;\n\tvar ctor;\n\tif ( !isNonNegativeInteger( length ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a nonnegative integer. Value: `%s`.', length ) );\n\t}\n\tif ( arguments.length > 1 ) {\n\t\tdtype = arguments[ 1 ];\n\t} else {\n\t\tdtype = 'float64';\n\t}\n\tif ( dtype === 'generic' ) {\n\t\treturn gzeros( length );\n\t}\n\tctor = ctors( dtype );\n\tif ( ctor === null ) {\n\t\tthrow new TypeError( format( 'invalid argument. Second argument must be a recognized data type. Value: `%s`.', dtype ) );\n\t}\n\treturn new ctor( length ); // WARNING: we assume that, apart from 'generic', the constructors for supported array data types are zero-filled by default\n}\n\n\n// EXPORTS //\n\nexport default zeros;\n","/**\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// MODULES //\n\nimport zeros from '@stdlib/array-zeros';\n\n\n// MAIN //\n\n/**\n* Creates an uninitialized array having a specified length.\n*\n* @private\n* @param {NonNegativeInteger} length - array length\n* @param {string} [dtype=\"float64\"] - data type\n* @throws {TypeError} first argument must be a nonnegative integer\n* @throws {TypeError} second argument must be a recognized data type\n* @returns {(TypedArray|Array|ComplexArray)} array or typed array\n*\n* @example\n* var arr = empty( 2 );\n* // returns \n*\n* @example\n* var arr = empty( 2, 'float32' );\n* // returns \n*/\nfunction empty( length ) {\n\tif ( arguments.length > 1 ) {\n\t\treturn zeros( length, arguments[ 1 ] );\n\t}\n\treturn zeros( length );\n}\n\n\n// EXPORTS //\n\nexport default empty;\n"],"names":["main","Object","defineProperty","isNumber","value","zeros","n","i","out","zeroPad","str","width","right","negative","pad","length","startsWithMinus","substr","lowercase","String","prototype","toLowerCase","uppercase","toUpperCase","formatInteger","token","base","specifier","arg","parseInt","isFinite","Error","toString","precision","padRight","sign","alternate","call","charAt","isString","abs","Math","replace","RE_EXP_POS_DIGITS","RE_EXP_NEG_DIGITS","RE_ONLY_DIGITS","RE_DIGITS_BEFORE_EXP","RE_TRAILING_PERIOD_ZERO","RE_PERIOD_ZERO_EXP","RE_ZERO_BEFORE_EXP","formatDouble","digits","f","parseFloat","toExponential","toFixed","toPrecision","spaces","spacePad","fromCharCode","isnan","isNaN","isArray","Array","initialize","flags","mapping","formatInterpolate","tokens","hasPeriod","flag","num","pos","j","TypeError","padZeros","indexOf","arguments","maxWidth","substring","RE","parse","match","formatTokenize","content","prev","exec","slice","lastIndex","push","format","args","tokenize","interpolate","apply","objectProtoype","toStr","defineGetter","__defineGetter__","defineSetter","__defineSetter__","lookupGetter","__lookupGetter__","lookupSetter","__lookupSetter__","err","hasDefinePropertySupport","builtin","obj","prop","descriptor","hasValue","hasGet","hasSet","__proto__","get","set","defineProperty$1","setNonEnumerableReadOnly","configurable","enumerable","writable","FLG","Symbol","hasToStringTagSupport","toStringTag","has","hasOwnProperty","hasOwnProp","property","Sym","toStrTag","nativeClass","hasToStringTag","v","isOwn","tag","main$b","Number","test","isPrimitive","isObject","setReadOnly","FLOAT64_PINF","POSITIVE_INFINITY","FLOAT64_NINF","NEGATIVE_INFINITY","floor","isInteger","x","PINF","NINF","isInt","valueOf","isNonNegativeInteger","hasFloat64Array","Float64Array","ctor","Float64Array$1","bool","arr","GlobalFloat64Array","NaN","hasFloat64ArraySupport","hasFloat32Array","Float32Array","Float32Array$1","GlobalFloat32Array","hasFloat32ArraySupport","hasInt16Array","Int16Array","Int16Array$1","GlobalInt16Array","INT16_MAX","hasInt16ArraySupport","hasInt32Array","Int32Array","Int32Array$1","GlobalInt32Array","INT32_MAX","hasInt32ArraySupport","hasInt8Array","Int8Array","Int8Array$1","GlobalInt8Array","INT8_MAX","hasInt8ArraySupport","hasUint16Array","Uint16Array","Uint16Array$1","GlobalUint16Array","UINT16_MAX","hasUint16ArraySupport","hasUint32Array","Uint32Array","Uint32Array$1","GlobalUint32Array","UINT32_MAX","hasUint32ArraySupport","hasUint8Array","Uint8Array","Uint8Array$1","GlobalUint8Array","UINT8_MAX","hasUint8ArraySupport","hasUint8ClampedArray","Uint8ClampedArray","Uint8ClampedArray$1","GlobalUint8ClampedArray","hasUint8ClampedArraySupport","isArrayLikeObject","isCollection","hasArrayBuffer","ArrayBuffer","isArrayBuffer","main$1","isBoolean","Bool","Boolean","getGlobal","Function","self","window","global","globalThis","root","codegen","getThis","GlobalThis","Self","Win","Global","nodeList","document","childNodes","typedarray","reFunctionName","RE_FUNCTION_NAME","isObjectLike","constructorName","name","constructor","_isBuffer","isBuffer","REGEXP","predicate","len","arrayfun","ctorName","type","isFunction","typeOf","Complex128","real","imag","this","re","im","fround","FLOAT32_VIEW","float64ToFloat32$1","Complex64","float64ToFloat32","isComplexLike","isEven","hasIteratorSymbolSupport","iterator","IteratorSymbol","setNonEnumerableReadOnlyAccessor","getter","realf","z","imagf","reinterpret","offset","buffer","byteOffset","BYTES_PER_ELEMENT","GETTERS","float64","idx","float32","int32","int16","int8","uint32","uint16","uint8","uint8c","generic","default","dtype","complex128","complex64","fromIterator","it","next","done","fromIteratorMap","clbk","thisArg","fromArray","buf","HAS_ITERATOR_SYMBOL","isComplexArray","Complex64Array","_length","_buffer","isComplexArrayConstructor","isComplex64Array","isComplex128Array","nargs","RangeError","reinterpret64","reinterpret128","byteLength","ITERATOR_SYMBOL","src","tmp","flg","accessorGetter","setReadOnlyAccessor","target","start","copyWithin","iter","entries","sbuf","N","Complex128Array","ctors","table","filled","gzeros","empty"],"mappings":";;AAsBA,IAAIA,EAA0C,mBAA1BC,OAAOC,eAAkCD,OAAOC,eAAiB,KCiCrF,IAAIA,EAAiBD,OAAOC,eCjB5B,SAASC,EAAUC,GAClB,MAA0B,iBAAVA,CACjB,CCAA,SAASC,EAAOC,GACf,IACIC,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,GACAzJ,EAAI,EAAGA,EAAI+O,EAAK/O,IACrByJ,EAAIvE,KAAMrF,GAEX,OAAO4J,CACR,CDTQ4K,CAAQ,EAAKtF,EACrB,CEQA,SAASjP,GAAOU,GACf,IAAIoR,EACAtI,EACJ,IAAMH,GAAsB3I,GAC3B,MAAM,IAAI2D,UAAWgB,EAAQ,+EAAgF3E,IAO9G,GAAe,aAJdoR,EADItN,UAAU9D,OAAS,EACf8D,UAAW,GAEX,WAGR,OAAOgQ,GAAQ9T,GAGhB,GAAc,QADd8I,EAAO6K,GAAOvC,IAEb,MAAM,IAAIzN,UAAWgB,EAAQ,iFAAkFyM,IAEhH,OAAO,IAAItI,EAAM9I,EAClB,CCrBA,SAAS+T,GAAO/T,GACf,OAAK8D,UAAU9D,OAAS,EAChBV,GAAOU,EAAQ8D,UAAW,IAE3BxE,GAAOU,EACf"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index 891bffb..0000000 --- a/stats.html +++ /dev/null @@ -1,6177 +0,0 @@ - - - - - - - - Rollup Visualizer - - - -
- - - - - From 73c7446a2877fd114e4553ec2325de3796da5a39 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Thu, 9 Nov 2023 10:49:27 +0000 Subject: [PATCH 27/75] 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 | 34 +- benchmark/benchmark.js | 264 - benchmark/benchmark.length.complex128.js | 93 - benchmark/benchmark.length.complex64.js | 93 - benchmark/benchmark.length.float32.js | 93 - benchmark/benchmark.length.float64.js | 93 - benchmark/benchmark.length.generic.js | 93 - benchmark/benchmark.length.int16.js | 93 - benchmark/benchmark.length.int32.js | 93 - benchmark/benchmark.length.int8.js | 93 - benchmark/benchmark.length.uint16.js | 93 - benchmark/benchmark.length.uint32.js | 93 - benchmark/benchmark.length.uint8.js | 93 - benchmark/benchmark.length.uint8c.js | 93 - branches.md | 53 - dist/index.d.ts | 3 - dist/index.js | 9 - dist/index.js.map | 7 - docs/repl.txt | 52 - docs/types/test.ts | 77 - examples/index.js | 33 - lib/index.js | 58 - lib/is_buffer_uint8array.js | 47 - lib/main.js | 101 - lib/polyfill.js | 56 - docs/types/index.d.ts => mod.d.ts | 2 +- mod.js | 4 + mod.js.map | 1 + package.json | 80 +- stats.html | 6177 +++++++++++++++++++++ test/dist/test.js | 33 - test/test.js | 60 - test/test.main.js | 274 - test/test.polyfill.js | 324 -- 57 files changed, 6194 insertions(+), 5838 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 benchmark/benchmark.js delete mode 100644 benchmark/benchmark.length.complex128.js delete mode 100644 benchmark/benchmark.length.complex64.js delete mode 100644 benchmark/benchmark.length.float32.js delete mode 100644 benchmark/benchmark.length.float64.js delete mode 100644 benchmark/benchmark.length.generic.js delete mode 100644 benchmark/benchmark.length.int16.js delete mode 100644 benchmark/benchmark.length.int32.js delete mode 100644 benchmark/benchmark.length.int8.js delete mode 100644 benchmark/benchmark.length.uint16.js delete mode 100644 benchmark/benchmark.length.uint32.js delete mode 100644 benchmark/benchmark.length.uint8.js delete mode 100644 benchmark/benchmark.length.uint8c.js 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/repl.txt delete mode 100644 docs/types/test.ts delete mode 100644 examples/index.js delete mode 100644 lib/index.js delete mode 100644 lib/is_buffer_uint8array.js delete mode 100644 lib/main.js delete mode 100644 lib/polyfill.js rename docs/types/index.d.ts => mod.d.ts (99%) create mode 100644 mod.js create mode 100644 mod.js.map create mode 100644 stats.html delete mode 100644 test/dist/test.js delete mode 100644 test/test.js delete mode 100644 test/test.main.js delete mode 100644 test/test.polyfill.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 96f81a8..0000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,7 +0,0 @@ - - -We are excited about your pull request, but unfortunately we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/empty) 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 ddb353e..0000000 --- a/.github/workflows/close_pull_requests.yml +++ /dev/null @@ -1,54 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: close_pull_requests - -# Workflow triggers: -on: - pull_request_target: - types: [opened] - -# Workflow jobs: -jobs: - - # Define job to close all pull requests: - run: - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Close pull request - - name: 'Close pull request' - # Pin action to full length commit SHA corresponding to v3.1.2 - uses: superbrothers/close-pull-request@9c18513d320d7b2c7185fb93396d0c664d5d8448 - with: - comment: | - Thank you for submitting a pull request. :raised_hands: - - We greatly appreciate your willingness to submit a contribution. However, we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). - - We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/empty) 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 dc9e63f..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: '49 1 * * 5' - - # 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 + + + + 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 8e62cb8..0000000 --- a/test/test.js +++ /dev/null @@ -1,60 +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 proxyquire = require( 'proxyquire' ); -var main = require( './../lib/main.js' ); -var polyfill = require( './../lib/polyfill.js' ); -var empty = require( './../lib' ); - - -// TESTS // - -tape( 'main export is a function', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof empty, 'function', 'main export is a function' ); - t.end(); -}); - -tape( 'if an environment supports Node.js buffer instances inheriting from Uint8Array, the main export supports returning arrays having uninitialized memory', function test( t ) { - var empty = proxyquire( './../lib', { - './is_buffer_uint8array.js': mock - }); - t.strictEqual( empty, main, 'returns expected value' ); - t.end(); - - function mock() { - return true; - } -}); - -tape( 'if an environment does not support Node.js buffer instances inheriting from Uint8Array, the main export supports returning zero-filled arrays', function test( t ) { - var empty = proxyquire( './../lib', { - './is_buffer_uint8array.js': mock - }); - t.strictEqual( empty, polyfill, 'returns expected value' ); - t.end(); - - function mock() { - return false; - } -}); diff --git a/test/test.main.js b/test/test.main.js deleted file mode 100644 index 3ceb26e..0000000 --- a/test/test.main.js +++ /dev/null @@ -1,274 +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 Float64Array = require( '@stdlib/array-float64' ); -var Float32Array = require( '@stdlib/array-float32' ); -var Int32Array = require( '@stdlib/array-int32' ); -var Uint32Array = require( '@stdlib/array-uint32' ); -var Int16Array = require( '@stdlib/array-int16' ); -var Uint16Array = require( '@stdlib/array-uint16' ); -var Int8Array = require( '@stdlib/array-int8' ); -var Uint8Array = require( '@stdlib/array-uint8' ); -var Uint8ClampedArray = require( '@stdlib/array-uint8c' ); -var Complex64Array = require( '@stdlib/array-complex64' ); -var Complex128Array = require( '@stdlib/array-complex128' ); -var instanceOf = require( '@stdlib/assert-instance-of' ); -var empty = require( './../lib/main.js' ); - - -// TESTS // - -tape( 'main export is a function', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof empty, 'function', 'main export is a function' ); - t.end(); -}); - -tape( 'the function throws an error if provided a value other than a nonnegative integer for the first argument', function test( t ) { - var values; - var i; - - values = [ - '5', - -3, - 3.14, - NaN, - true, - false, - null, - void 0, - [], - {}, - function noop() {} - ]; - - for ( i = 0; i < values.length; i++ ) { - t.throws( badValue( values[i] ), TypeError, 'throws an error when provided '+values[i] ); - } - t.end(); - - function badValue( value ) { - return function badValue() { - empty( value ); - }; - } -}); - -tape( 'the function throws an error if provided a value other than a nonnegative integer for the first argument (dtype)', function test( t ) { - var values; - var i; - - values = [ - '5', - -3, - 3.14, - NaN, - true, - false, - null, - void 0, - [], - {}, - function noop() {} - ]; - - for ( i = 0; i < values.length; i++ ) { - t.throws( badValue( values[i] ), TypeError, 'throws an error when provided '+values[i] ); - } - t.end(); - - function badValue( value ) { - return function badValue() { - empty( value, 'float32' ); - }; - } -}); - -tape( 'the function throws an error if provided an unrecognized data type', function test( t ) { - var values; - var i; - - values = [ - '5', - 'beep', - 'empty', - 'Int32', - 'Uint32', - 'Int16', - 'Uint16', - 'Int8', - 'Uint8', - 'Uint8c', - 'uint8_clamped', - 'Float64', - 'Float32', - 'FLOAT64', - 'FLOAT32', - 'GENERIC' - ]; - - for ( i = 0; i < values.length; i++ ) { - t.throws( badValue( values[i] ), TypeError, 'throws an error when provided '+values[i] ); - } - t.end(); - - function badValue( value ) { - return function badValue() { - empty( 10, value ); - }; - } -}); - -tape( 'the function returns an empty array (default)', function test( t ) { - var arr; - - arr = empty( 5 ); - t.strictEqual( instanceOf( arr, Float64Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=float64)', function test( t ) { - var arr; - - arr = empty( 5, 'float64' ); - t.strictEqual( instanceOf( arr, Float64Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=float32)', function test( t ) { - var arr; - - arr = empty( 5, 'float32' ); - t.strictEqual( instanceOf( arr, Float32Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=complex128)', function test( t ) { - var arr; - - arr = empty( 5, 'complex128' ); - t.strictEqual( instanceOf( arr, Complex128Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=complex64)', function test( t ) { - var arr; - - arr = empty( 5, 'complex64' ); - t.strictEqual( instanceOf( arr, Complex64Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=int32)', function test( t ) { - var arr; - - arr = empty( 5, 'int32' ); - t.strictEqual( instanceOf( arr, Int32Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=uint32)', function test( t ) { - var arr; - - arr = empty( 5, 'uint32' ); - t.strictEqual( instanceOf( arr, Uint32Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=int16)', function test( t ) { - var arr; - - arr = empty( 5, 'int16' ); - t.strictEqual( instanceOf( arr, Int16Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=uint16)', function test( t ) { - var arr; - - arr = empty( 5, 'uint16' ); - t.strictEqual( instanceOf( arr, Uint16Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=int8)', function test( t ) { - var arr; - - arr = empty( 5, 'int8' ); - t.strictEqual( instanceOf( arr, Int8Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=uint8)', function test( t ) { - var arr; - - arr = empty( 5, 'uint8' ); - t.strictEqual( instanceOf( arr, Uint8Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=uint8c)', function test( t ) { - var arr; - - arr = empty( 5, 'uint8c' ); - t.strictEqual( instanceOf( arr, Uint8ClampedArray ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=generic)', function test( t ) { - var expected; - var arr; - - expected = [ 0, 0, 0, 0, 0 ]; - - arr = empty( 5, 'generic' ); - t.strictEqual( instanceOf( arr, Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); diff --git a/test/test.polyfill.js b/test/test.polyfill.js deleted file mode 100644 index 17b99f3..0000000 --- a/test/test.polyfill.js +++ /dev/null @@ -1,324 +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 Float64Array = require( '@stdlib/array-float64' ); -var Float32Array = require( '@stdlib/array-float32' ); -var Int32Array = require( '@stdlib/array-int32' ); -var Uint32Array = require( '@stdlib/array-uint32' ); -var Int16Array = require( '@stdlib/array-int16' ); -var Uint16Array = require( '@stdlib/array-uint16' ); -var Int8Array = require( '@stdlib/array-int8' ); -var Uint8Array = require( '@stdlib/array-uint8' ); -var Uint8ClampedArray = require( '@stdlib/array-uint8c' ); -var Complex64Array = require( '@stdlib/array-complex64' ); -var Complex128Array = require( '@stdlib/array-complex128' ); -var reinterpret64 = require( '@stdlib/strided-base-reinterpret-complex64' ); -var reinterpret128 = require( '@stdlib/strided-base-reinterpret-complex128' ); -var instanceOf = require( '@stdlib/assert-instance-of' ); -var empty = require( './../lib/polyfill.js' ); - - -// TESTS // - -tape( 'main export is a function', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof empty, 'function', 'main export is a function' ); - t.end(); -}); - -tape( 'the function throws an error if provided a value other than a nonnegative integer for the first argument', function test( t ) { - var values; - var i; - - values = [ - '5', - -3, - 3.14, - NaN, - true, - false, - null, - void 0, - [], - {}, - function noop() {} - ]; - - for ( i = 0; i < values.length; i++ ) { - t.throws( badValue( values[i] ), TypeError, 'throws an error when provided '+values[i] ); - } - t.end(); - - function badValue( value ) { - return function badValue() { - empty( value ); - }; - } -}); - -tape( 'the function throws an error if provided a value other than a nonnegative integer for the first argument (dtype)', function test( t ) { - var values; - var i; - - values = [ - '5', - -3, - 3.14, - NaN, - true, - false, - null, - void 0, - [], - {}, - function noop() {} - ]; - - for ( i = 0; i < values.length; i++ ) { - t.throws( badValue( values[i] ), TypeError, 'throws an error when provided '+values[i] ); - } - t.end(); - - function badValue( value ) { - return function badValue() { - empty( value, 'float32' ); - }; - } -}); - -tape( 'the function throws an error if provided an unrecognized data type', function test( t ) { - var values; - var i; - - values = [ - '5', - 'beep', - 'empty', - 'Int32', - 'Uint32', - 'Int16', - 'Uint16', - 'Int8', - 'Uint8', - 'Uint8c', - 'uint8_clamped', - 'Float64', - 'Float32', - 'FLOAT64', - 'FLOAT32', - 'GENERIC' - ]; - - for ( i = 0; i < values.length; i++ ) { - t.throws( badValue( values[i] ), TypeError, 'throws an error when provided '+values[i] ); - } - t.end(); - - function badValue( value ) { - return function badValue() { - empty( 10, value ); - }; - } -}); - -tape( 'the function returns a zero-filled array (default)', function test( t ) { - var expected; - var arr; - - expected = new Float64Array( [ 0.0, 0.0, 0.0, 0.0, 0.0 ] ); - - arr = empty( 5 ); - t.strictEqual( instanceOf( arr, Float64Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=float64)', function test( t ) { - var expected; - var arr; - - expected = new Float64Array( [ 0.0, 0.0, 0.0, 0.0, 0.0 ] ); - - arr = empty( 5, 'float64' ); - t.strictEqual( instanceOf( arr, Float64Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=float32)', function test( t ) { - var expected; - var arr; - - expected = new Float32Array( [ 0.0, 0.0, 0.0, 0.0, 0.0 ] ); - - arr = empty( 5, 'float32' ); - t.strictEqual( instanceOf( arr, Float32Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=complex128)', function test( t ) { - var expected; - var arr; - - expected = new Float64Array( [ 0.0, 0.0, 0.0, 0.0 ] ); - - arr = empty( 2, 'complex128' ); - t.strictEqual( instanceOf( arr, Complex128Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length/2, 'returns expected value' ); - t.deepEqual( reinterpret128( arr, 0 ), expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=complex64)', function test( t ) { - var expected; - var arr; - - expected = new Float32Array( [ 0.0, 0.0, 0.0, 0.0 ] ); - - arr = empty( 2, 'complex64' ); - t.strictEqual( instanceOf( arr, Complex64Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length/2, 'returns expected value' ); - t.deepEqual( reinterpret64( arr, 0 ), expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=int32)', function test( t ) { - var expected; - var arr; - - expected = new Int32Array( [ 0, 0, 0, 0, 0 ] ); - - arr = empty( 5, 'int32' ); - t.strictEqual( instanceOf( arr, Int32Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=uint32)', function test( t ) { - var expected; - var arr; - - expected = new Uint32Array( [ 0, 0, 0, 0, 0 ] ); - - arr = empty( 5, 'uint32' ); - t.strictEqual( instanceOf( arr, Uint32Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=int16)', function test( t ) { - var expected; - var arr; - - expected = new Int16Array( [ 0, 0, 0, 0, 0 ] ); - - arr = empty( 5, 'int16' ); - t.strictEqual( instanceOf( arr, Int16Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=uint16)', function test( t ) { - var expected; - var arr; - - expected = new Uint16Array( [ 0, 0, 0, 0, 0 ] ); - - arr = empty( 5, 'uint16' ); - t.strictEqual( instanceOf( arr, Uint16Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=int8)', function test( t ) { - var expected; - var arr; - - expected = new Int8Array( [ 0, 0, 0, 0, 0 ] ); - - arr = empty( 5, 'int8' ); - t.strictEqual( instanceOf( arr, Int8Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=uint8)', function test( t ) { - var expected; - var arr; - - expected = new Uint8Array( [ 0, 0, 0, 0, 0 ] ); - - arr = empty( 5, 'uint8' ); - t.strictEqual( instanceOf( arr, Uint8Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=uint8c)', function test( t ) { - var expected; - var arr; - - expected = new Uint8ClampedArray( [ 0, 0, 0, 0, 0 ] ); - - arr = empty( 5, 'uint8c' ); - t.strictEqual( instanceOf( arr, Uint8ClampedArray ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=generic)', function test( t ) { - var expected; - var arr; - - expected = [ 0, 0, 0, 0, 0 ]; - - arr = empty( 5, 'generic' ); - t.strictEqual( instanceOf( arr, Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); From 9b30eb4a93c39e01aee5b6bc3b06dcfcee5be68f Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Fri, 1 Dec 2023 13:59:25 +0000 Subject: [PATCH 28/75] Transform error messages --- lib/main.js | 6 +++--- package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/main.js b/lib/main.js index e19ce93..e02b26b 100644 --- a/lib/main.js +++ b/lib/main.js @@ -25,7 +25,7 @@ var allocUnsafe = require( '@stdlib/buffer-alloc-unsafe' ); var ctors = require( '@stdlib/array-typed-ctors' ); var zeros = require( '@stdlib/array-base-zeros' ); var bytesPerElement = require( '@stdlib/ndarray-base-bytes-per-element' ); -var format = require( '@stdlib/string-format' ); +var format = require( '@stdlib/error-tools-fmtprodmsg' ); // MAIN // @@ -57,7 +57,7 @@ function empty( length ) { var nb; if ( !isNonNegativeInteger( length ) ) { - throw new TypeError( format( 'invalid argument. First argument must be a nonnegative integer. Value: `%s`.', length ) ); + throw new TypeError( format( '1Zj2d,MG', length ) ); } if ( arguments.length > 1 ) { dtype = arguments[ 1 ]; @@ -69,7 +69,7 @@ function empty( length ) { } nbytes = bytesPerElement( dtype ); if ( nbytes === null ) { - throw new TypeError( format( 'invalid argument. Second argument must be a supported data type. Value: `%s`.', dtype ) ); + throw new TypeError( format( '1ZjMl', dtype ) ); } // Resolve typed array constructor: ctor = ctors( dtype ); diff --git a/package.json b/package.json index 40c3509..9a9eb82 100644 --- a/package.json +++ b/package.json @@ -45,7 +45,7 @@ "@stdlib/assert-is-uint8array": "^0.1.1", "@stdlib/buffer-alloc-unsafe": "^0.1.0", "@stdlib/ndarray-base-bytes-per-element": "^0.1.0", - "@stdlib/string-format": "^0.1.1", + "@stdlib/error-tools-fmtprodmsg": "^0.1.1", "@stdlib/types": "^0.2.0" }, "devDependencies": { From a1ba7c8af931059f7c6c6ed57bde98cb6610988b Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sat, 2 Dec 2023 12:10:26 +0000 Subject: [PATCH 29/75] Remove files --- mod.d.ts | 277 --- mod.js | 4 - mod.js.map | 1 - stats.html | 6177 ---------------------------------------------------- 4 files changed, 6459 deletions(-) delete mode 100644 mod.d.ts delete mode 100644 mod.js delete mode 100644 mod.js.map delete mode 100644 stats.html diff --git a/mod.d.ts b/mod.d.ts deleted file mode 100644 index c071f4d..0000000 --- a/mod.d.ts +++ /dev/null @@ -1,277 +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 - -/// - -import { Complex128Array, Complex64Array, DataType } from '@stdlib/types/array'; - -/** -* Creates an uninitialized array having a specified length. -* -* ## Notes -* -* - In browser environments, the function always returns zero-filled arrays. -* - In Node.js versions `>=3.0.0`, the underlying memory of returned typed arrays is **not** initialized. Memory contents are unknown and may contain **sensitive** data. -* -* @param length - array length -* @param dtype - data type -* @returns empty array -* -* @example -* var arr = empty( 2, 'float64' ); -* // returns -*/ -declare function empty( length: number, dtype: 'float64' ): Float64Array; - -/** -* Creates an uninitialized array having a specified length. -* -* ## Notes -* -* - In browser environments, the function always returns zero-filled arrays. -* - In Node.js versions `>=3.0.0`, the underlying memory of returned typed arrays is **not** initialized. Memory contents are unknown and may contain **sensitive** data. -* -* @param length - array length -* @param dtype - data type -* @returns empty array -* -* @example -* var arr = empty( 2, 'float32' ); -* // returns -*/ -declare function empty( length: number, dtype: 'float32' ): Float32Array; - -/** -* Creates an uninitialized array having a specified length. -* -* ## Notes -* -* - In browser environments, the function always returns zero-filled arrays. -* - In Node.js versions `>=3.0.0`, the underlying memory of returned typed arrays is **not** initialized. Memory contents are unknown and may contain **sensitive** data. -* -* @param length - array length -* @param dtype - data type -* @returns empty array -* -* @example -* var arr = empty( 2, 'complex128' ); -* // returns -*/ -declare function empty( length: number, dtype: 'complex128' ): Complex128Array; - -/** -* Creates an uninitialized array having a specified length. -* -* ## Notes -* -* - In browser environments, the function always returns zero-filled arrays. -* - In Node.js versions `>=3.0.0`, the underlying memory of returned typed arrays is **not** initialized. Memory contents are unknown and may contain **sensitive** data. -* -* @param length - array length -* @param dtype - data type -* @returns empty array -* -* @example -* var arr = empty( 2, 'complex64' ); -* // returns -*/ -declare function empty( length: number, dtype: 'complex64' ): Complex64Array; - -/** -* Creates an uninitialized array having a specified length. -* -* ## Notes -* -* - In browser environments, the function always returns zero-filled arrays. -* - In Node.js versions `>=3.0.0`, the underlying memory of returned typed arrays is **not** initialized. Memory contents are unknown and may contain **sensitive** data. -* -* @param length - array length -* @param dtype - data type -* @returns empty array -* -* @example -* var arr = empty( 2, 'int32' ); -* // returns -*/ -declare function empty( length: number, dtype: 'int32' ): Int32Array; - -/** -* Creates an uninitialized array having a specified length. -* -* ## Notes -* -* - In browser environments, the function always returns zero-filled arrays. -* - In Node.js versions `>=3.0.0`, the underlying memory of returned typed arrays is **not** initialized. Memory contents are unknown and may contain **sensitive** data. -* -* @param length - array length -* @param dtype - data type -* @returns empty array -* -* @example -* var arr = empty( 2, 'int16' ); -* // returns -*/ -declare function empty( length: number, dtype: 'int16' ): Int16Array; - -/** -* Creates an uninitialized array having a specified length. -* -* ## Notes -* -* - In browser environments, the function always returns zero-filled arrays. -* - In Node.js versions `>=3.0.0`, the underlying memory of returned typed arrays is **not** initialized. Memory contents are unknown and may contain **sensitive** data. -* -* @param length - array length -* @param dtype - data type -* @returns empty array -* -* @example -* var arr = empty( 2, 'int8' ); -* // returns -*/ -declare function empty( length: number, dtype: 'int8' ): Int8Array; - -/** -* Creates an uninitialized array having a specified length. -* -* ## Notes -* -* - In browser environments, the function always returns zero-filled arrays. -* - In Node.js versions `>=3.0.0`, the underlying memory of returned typed arrays is **not** initialized. Memory contents are unknown and may contain **sensitive** data. -* -* @param length - array length -* @param dtype - data type -* @returns empty array -* -* @example -* var arr = empty( 2, 'uint32' ); -* // returns -*/ -declare function empty( length: number, dtype: 'uint32' ): Uint32Array; - -/** -* Creates an uninitialized array having a specified length. -* -* ## Notes -* -* - In browser environments, the function always returns zero-filled arrays. -* - In Node.js versions `>=3.0.0`, the underlying memory of returned typed arrays is **not** initialized. Memory contents are unknown and may contain **sensitive** data. -* -* @param length - array length -* @param dtype - data type -* @returns empty array -* -* @example -* var arr = empty( 2, 'uint16' ); -* // returns -*/ -declare function empty( length: number, dtype: 'uint16' ): Uint16Array; - -/** -* Creates an uninitialized array having a specified length. -* -* ## Notes -* -* - In browser environments, the function always returns zero-filled arrays. -* - In Node.js versions `>=3.0.0`, the underlying memory of returned typed arrays is **not** initialized. Memory contents are unknown and may contain **sensitive** data. -* -* @param length - array length -* @param dtype - data type -* @returns empty array -* -* @example -* var arr = empty( 2, 'uint8' ); -* // returns -*/ -declare function empty( length: number, dtype: 'uint8' ): Uint8Array; - -/** -* Creates an uninitialized array having a specified length. -* -* ## Notes -* -* - In browser environments, the function always returns zero-filled arrays. -* - In Node.js versions `>=3.0.0`, the underlying memory of returned typed arrays is **not** initialized. Memory contents are unknown and may contain **sensitive** data. -* -* @param length - array length -* @param dtype - data type -* @returns empty array -* -* @example -* var arr = empty( 2, 'uint8c' ); -* // returns -*/ -declare function empty( length: number, dtype: 'uint8c' ): Uint8ClampedArray; - -/** -* Creates a zero-filled array having a specified length. -* -* @param length - array length -* @param dtype - data type -* @returns zero-filled array -* -* @example -* var arr = empty( 2, 'generic' ); -* // returns -*/ -declare function empty( length: number, dtype: 'generic' ): Array; - -/** -* Creates an uninitialized array having a specified length. -* -* ## Notes -* -* - In browser environments, the function always returns zero-filled arrays. -* - If `dtype` is `'generic'`, the function always returns a zero-filled array. -* - In Node.js versions `>=3.0.0`, the underlying memory of returned typed arrays is **not** initialized. Memory contents are unknown and may contain **sensitive** data. -* -* The function recognizes the following data types: -* -* - `float64`: double-precision floating-point numbers (IEEE 754) -* - `float32`: single-precision floating-point numbers (IEEE 754) -* - `complex128`: double-precision complex floating-point numbers -* - `complex64`: single-precision complex floating-point numbers -* - `int32`: 32-bit two's complement signed integers -* - `uint32`: 32-bit unsigned integers -* - `int16`: 16-bit two's complement signed integers -* - `uint16`: 16-bit unsigned integers -* - `int8`: 8-bit two's complement signed integers -* - `uint8`: 8-bit unsigned integers -* - `uint8c`: 8-bit unsigned integers clamped to `0-255` -* - `generic`: generic JavaScript values -* -* @param length - array length -* @param dtype - data type (default: 'float64') -* @returns empty array -* -* @example -* var arr = empty( 2 ); -* // returns -* -* @example -* var arr = empty( 2, 'float32' ); -* // returns -*/ -declare function empty( length: number, dtype?: DataType ): Float64Array; - - -// EXPORTS // - -export = empty; diff --git a/mod.js b/mod.js deleted file mode 100644 index ce435ce..0000000 --- a/mod.js +++ /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 -/// -var e="function"==typeof Object.defineProperty?Object.defineProperty:null;var r=Object.defineProperty;function t(e){return"number"==typeof e}function n(e){var r,t="";for(r=0;r0&&(r-=1),n=i.toExponential(r)):n=i.toPrecision(e.precision),e.alternate||(n=y.call(n,v,"$1e"),n=y.call(n,b,"e"),n=y.call(n,w,""));break;default:throw new Error("invalid double notation. Value: "+e.specifier)}return n=y.call(n,h,"e+0$1"),n=y.call(n,p,"e-0$1"),e.alternate&&(n=y.call(n,g,"$1."),n=y.call(n,m,"$1.e")),i>=0&&e.sign&&(n=e.sign+n),n=e.specifier===s.call(e.specifier)?s.call(n):c.call(n)}function E(e){var r,t="";for(r=0;r127)throw new Error("invalid character code. Value: "+n.arg);n.arg=_(a)?String(n.arg):T(a)}break;case"e":case"E":case"f":case"F":case"g":case"G":r||(n.precision=6),n.arg=d(n);break;default:throw new Error("invalid specifier: "+n.specifier)}n.maxWidth>=0&&n.arg.length>n.maxWidth&&(n.arg=n.arg.substring(0,n.maxWidth)),n.padZeros?n.arg=i(n.arg,n.width||n.precision,n.padRight):n.width&&(n.arg=A(n.arg,n.width,n.padRight)),l+=n.arg||"",c+=1}return l}var k=/%(?:([1-9]\d*)\$)?([0 +\-#]*)(\*|\d+)?(?:(\.)(\*|\d+)?)?[hlL]?([%A-Za-z])/g;function L(e){var r={mapping:e[1]?parseInt(e[1],10):void 0,flags:e[2],width:e[3],precision:e[5],specifier:e[6]};return"."===e[4]&&void 0===e[5]&&(r.precision="1"),r}function S(e){var r,t,n,i;for(t=[],i=0,n=k.exec(e);n;)(r=e.slice(i,k.lastIndex-n[0].length)).length&&t.push(r),t.push(L(n)),i=k.lastIndex,n=k.exec(e);return(r=e.slice(i)).length&&t.push(r),t}function R(e){return"string"==typeof e}function B(e){var r,t,n;if(!R(e))throw new TypeError(B("invalid argument. First argument must be a string. Value: `%s`.",e));for(r=S(e),(t=new Array(arguments.length))[0]=r,n=1;nne&&oe(e)}function ue(e){return W(e)&&ae(e)}function fe(e){return ee(e)&&ae(e.valueOf())}function le(e){return ue(e)||fe(e)}function ce(e){return ue(e)&&e>=0}function se(e){return fe(e)&&e.valueOf()>=0}function ye(e){return ce(e)||se(e)}Y(le,"isPrimitive",ue),Y(le,"isObject",fe),Y(ye,"isPrimitive",ce),Y(ye,"isObject",se);var he="function"==typeof Float64Array;var pe="function"==typeof Float64Array?Float64Array:null;var ge="function"==typeof Float64Array?Float64Array:void 0;var me=function(){var e,r,t;if("function"!=typeof pe)return!1;try{r=new pe([1,3.14,-3.14,NaN]),t=r,e=(he&&t instanceof Float64Array||"[object Float64Array]"===D(t))&&1===r[0]&&3.14===r[1]&&-3.14===r[2]&&r[3]!=r[3]}catch(r){e=!1}return e}()?ge:function(){throw new Error("not implemented")},we="function"==typeof Float32Array;var be="function"==typeof Float32Array?Float32Array:null;var ve="function"==typeof Float32Array?Float32Array:void 0;var de=function(){var e,r,t;if("function"!=typeof be)return!1;try{r=new be([1,3.14,-3.14,5e40]),t=r,e=(we&&t instanceof Float32Array||"[object Float32Array]"===D(t))&&1===r[0]&&3.140000104904175===r[1]&&-3.140000104904175===r[2]&&r[3]===te}catch(r){e=!1}return e}()?ve:function(){throw new Error("not implemented")},Ee="function"==typeof Int16Array;var Ae="function"==typeof Int16Array?Int16Array:null;var Te="function"==typeof Int16Array?Int16Array:void 0;var _e=function(){var e,r,t;if("function"!=typeof Ae)return!1;try{r=new Ae([1,3.14,-3.14,32768]),t=r,e=(Ee&&t instanceof Int16Array||"[object Int16Array]"===D(t))&&1===r[0]&&3===r[1]&&-3===r[2]&&-32768===r[3]}catch(r){e=!1}return e}()?Te:function(){throw new Error("not implemented")},xe="function"==typeof Int32Array;var je="function"==typeof Int32Array?Int32Array:null;var Ve="function"==typeof Int32Array?Int32Array:void 0;var ke=function(){var e,r,t;if("function"!=typeof je)return!1;try{r=new je([1,3.14,-3.14,2147483648]),t=r,e=(xe&&t instanceof Int32Array||"[object Int32Array]"===D(t))&&1===r[0]&&3===r[1]&&-3===r[2]&&-2147483648===r[3]}catch(r){e=!1}return e}()?Ve:function(){throw new Error("not implemented")},Le="function"==typeof Int8Array;var Se="function"==typeof Int8Array?Int8Array:null;var Re="function"==typeof Int8Array?Int8Array:void 0;var Be=function(){var e,r,t;if("function"!=typeof Se)return!1;try{r=new Se([1,3.14,-3.14,128]),t=r,e=(Le&&t instanceof Int8Array||"[object Int8Array]"===D(t))&&1===r[0]&&3===r[1]&&-3===r[2]&&-128===r[3]}catch(r){e=!1}return e}()?Re:function(){throw new Error("not implemented")},Ie="function"==typeof Uint16Array;var Ce="function"==typeof Uint16Array?Uint16Array:null;var Fe="function"==typeof Uint16Array?Uint16Array:void 0;var Oe=function(){var e,r,t;if("function"!=typeof Ce)return!1;try{r=new Ce(r=[1,3.14,-3.14,65536,65537]),t=r,e=(Ie&&t instanceof Uint16Array||"[object Uint16Array]"===D(t))&&1===r[0]&&3===r[1]&&65533===r[2]&&0===r[3]&&1===r[4]}catch(r){e=!1}return e}()?Fe:function(){throw new Error("not implemented")},Me="function"==typeof Uint32Array;var Ne="function"==typeof Uint32Array?Uint32Array:null;var Ue="function"==typeof Uint32Array?Uint32Array:void 0;var Pe=function(){var e,r,t;if("function"!=typeof Ne)return!1;try{r=new Ne(r=[1,3.14,-3.14,4294967296,4294967297]),t=r,e=(Me&&t instanceof Uint32Array||"[object Uint32Array]"===D(t))&&1===r[0]&&3===r[1]&&4294967293===r[2]&&0===r[3]&&1===r[4]}catch(r){e=!1}return e}()?Ue:function(){throw new Error("not implemented")},Ye="function"==typeof Uint8Array;var We="function"==typeof Uint8Array?Uint8Array:null;var $e="function"==typeof Uint8Array?Uint8Array:void 0;var Ge=function(){var e,r,t;if("function"!=typeof We)return!1;try{r=new We(r=[1,3.14,-3.14,256,257]),t=r,e=(Ye&&t instanceof Uint8Array||"[object Uint8Array]"===D(t))&&1===r[0]&&3===r[1]&&253===r[2]&&0===r[3]&&1===r[4]}catch(r){e=!1}return e}()?$e:function(){throw new Error("not implemented")},Ze="function"==typeof Uint8ClampedArray;var Xe="function"==typeof Uint8ClampedArray?Uint8ClampedArray:null;var ze="function"==typeof Uint8ClampedArray?Uint8ClampedArray:void 0;var Je=function(){var e,r,t;if("function"!=typeof Xe)return!1;try{r=new Xe([-1,0,1,3.14,4.99,255,256]),t=r,e=(Ze&&t instanceof Uint8ClampedArray||"[object Uint8ClampedArray]"===D(t))&&0===r[0]&&0===r[1]&&1===r[2]&&3===r[3]&&5===r[4]&&255===r[5]&&255===r[6]}catch(r){e=!1}return e}()?ze:function(){throw new Error("not implemented")};function qe(e){return"object"==typeof e&&null!==e&&"number"==typeof e.length&&oe(e.length)&&e.length>=0&&e.length<=4294967295}function De(e){return"object"==typeof e&&null!==e&&"number"==typeof e.length&&oe(e.length)&&e.length>=0&&e.length<=9007199254740991}var He="function"==typeof ArrayBuffer;function Ke(e){return He&&e instanceof ArrayBuffer||"[object ArrayBuffer]"===D(e)}var Qe=Array.isArray?Array.isArray:function(e){return"[object Array]"===D(e)};function er(e){return"object"==typeof e&&null!==e&&!Qe(e)}var rr=/./;function tr(e){return"boolean"==typeof e}var nr=Boolean,ir=Boolean.prototype.toString;var or=G();function ar(e){return"object"==typeof e&&(e instanceof nr||(or?function(e){try{return ir.call(e),!0}catch(e){return!1}}(e):"[object Boolean]"===D(e)))}function ur(e){return tr(e)||ar(e)}function fr(){return new Function("return this;")()}Y(ur,"isPrimitive",tr),Y(ur,"isObject",ar);var lr="object"==typeof self?self:null,cr="object"==typeof window?window:null,sr="undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},yr="object"==typeof sr?sr:null,hr="object"==typeof globalThis?globalThis:null;var pr=function(e){if(arguments.length){if(!tr(e))throw new TypeError(B("invalid argument. Must provide a boolean. Value: `%s`.",e));if(e)return fr()}if(hr)return hr;if(lr)return lr;if(cr)return cr;if(yr)return yr;throw new Error("unexpected error. Unable to resolve global object.")}(),gr=pr.document&&pr.document.childNodes,mr=Int8Array;function wr(){return/^\s*function\s*([^(]*)/i}var br=/^\s*function\s*([^(]*)/i;function vr(e){return null!==e&&"object"==typeof e}function dr(e){var r,t,n,i;if(("Object"===(t=D(e).slice(8,-1))||"Error"===t)&&e.constructor){if("string"==typeof(n=e.constructor).name)return n.name;if(r=br.exec(n.toString()))return r[1]}return vr(i=e)&&(i._isBuffer||i.constructor&&"function"==typeof i.constructor.isBuffer&&i.constructor.isBuffer(i))?"Buffer":t}Y(wr,"REGEXP",br),Y(vr,"isObjectLikeArray",function(e){if("function"!=typeof e)throw new TypeError(B("invalid argument. Must provide a function. Value: `%s`.",e));return function(r){var t,n;if(!Qe(r))return!1;if(0===(t=r.length))return!1;for(n=0;n=2)r.push(n[0],n[1]);else{if(!kr(n))return new TypeError(B("invalid argument. An iterator must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",n));r.push(Ir(n),Cr(n))}return r}function Wr(e,r,t){var n,i,o,a;for(n=[],a=-1;!(i=e.next()).done;)if(a+=1,qe(o=r.call(t,i.value,a))&&o.length>=2)n.push(o[0],o[1]);else{if(!kr(o))return new TypeError(B("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",o));n.push(Ir(o),Cr(o))}return n}function $r(e,r){var t,n,i,o;for(t=r.length,o=0,i=0;it.byteLength-e)throw new RangeError(B("invalid arguments. ArrayBuffer has insufficient capacity. Either decrease the array length or provide a bigger buffer. Minimum capacity: `%u`.",n*Gr));t=new de(t,e,2*n)}}return Y(this,"_buffer",t),Y(this,"_length",t.length/2),this}function Hr(e){return e.re}function Kr(e){return e.im}function Qr(e){var r,t,n;for(r=[];!(t=e.next()).done;)if(qe(n=t.value)&&n.length>=2)r.push(n[0],n[1]);else{if(!kr(n))return new TypeError(B("invalid argument. An iterator must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",n));r.push(Hr(n),Kr(n))}return r}function et(e,r,t){var n,i,o,a;for(n=[],a=-1;!(i=e.next()).done;)if(a+=1,qe(o=r.call(t,i.value,a))&&o.length>=2)n.push(o[0],o[1]);else{if(!kr(o))return new TypeError(B("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",o));n.push(Hr(o),Kr(o))}return n}function rt(e,r){var t,n,i,o;for(t=r.length,o=0,i=0;i1){if(!Ar(n=arguments[1]))throw new TypeError(B("invalid argument. Second argument must be a function. Value: `%s`.",n));t>2&&(r=arguments[2])}if(Xr(e)){if(f=e.length,n){for(o=(i=new this(f))._buffer,y=0,s=0;s=2))throw new TypeError(B("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",c));o[y]=c[0],o[y+1]=c[1]}y+=2}return i}return new this(e)}if(De(e)){if(n){for(f=e.length,u=e.get&&e.set?Pr("default"):Nr("default"),s=0;s=2))throw new TypeError(B("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",c));o[y]=c[0],o[y+1]=c[1]}y+=2}return i}return new this(e)}if(er(e)&&Zr&&Ar(e[Rr])){if(!Ar((o=e[Rr]()).next))throw new TypeError(B("invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.",e));if((a=n?Wr(o,n,r):Yr(o))instanceof Error)throw a;for(o=(i=new this(f=a.length/2))._buffer,s=0;s=n)return{done:!0};return r=new Vr(e[a+=2],e[a+1]),{value:[o,r],done:!1}})),Y(t,"return",(function(e){if(i=!0,arguments.length)return{value:e,done:!0};return{done:!0}})),Rr&&Y(t,Rr,(function(){return r.entries()})),t})),Y(Dr.prototype,"get",(function(e){var r;if(!Xr(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!ce(e))throw new TypeError(B("invalid argument. Must provide a nonnegative integer. Value: `%s`.",e));if(!(e>=this._length))return new Vr((r=this._buffer)[e*=2],r[e+1])})),Br(Dr.prototype,"length",(function(){return this._length})),Y(Dr.prototype,"set",(function(e){var r,t,n,i,o,a,u,f,l;if(!Xr(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(n=this._buffer,arguments.length>1){if(!ce(t=arguments[1]))throw new TypeError(B("invalid argument. Index argument must be a nonnegative integer. Value: `%s`.",t))}else t=0;if(kr(e)){if(t>=this._length)throw new RangeError(B("invalid argument. Index argument is out-of-bounds. Value: `%u`.",t));return n[t*=2]=Ir(e),void(n[t+1]=Cr(e))}if(Xr(e)){if(t+(a=e._length)>this._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");if(r=e._buffer,l=n.byteOffset+t*Gr,r.buffer===n.buffer&&r.byteOffsetl){for(i=new de(r.length),f=0;fthis._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");if(r=e,l=n.byteOffset+t*Gr,r.buffer===n.buffer&&r.byteOffsetl){for(i=new de(a),f=0;fthis._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");for(t*=2,f=0;ft.byteLength-e)throw new RangeError(B("invalid arguments. ArrayBuffer has insufficient capacity. Either decrease the array length or provide a bigger buffer. Minimum capacity: `%u`.",n*tt));t=new me(t,e,2*n)}}return Y(this,"_buffer",t),Y(this,"_length",t.length/2),this}Y(ft,"BYTES_PER_ELEMENT",tt),Y(ft,"name","Complex128Array"),Y(ft,"from",(function(e){var r,t,n,i,o,a,u,f,l,c,s,y;if(!Ar(this))throw new TypeError("invalid invocation. `this` context must be a constructor.");if(!ot(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if((t=arguments.length)>1){if(!Ar(n=arguments[1]))throw new TypeError(B("invalid argument. Second argument must be a function. Value: `%s`.",n));t>2&&(r=arguments[2])}if(it(e)){if(f=e.length,n){for(o=(i=new this(f))._buffer,y=0,s=0;s=2))throw new TypeError(B("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",c));o[y]=c[0],o[y+1]=c[1]}y+=2}return i}return new this(e)}if(De(e)){if(n){for(f=e.length,u=e.get&&e.set?Pr("default"):Nr("default"),s=0;s=2))throw new TypeError(B("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",c));o[y]=c[0],o[y+1]=c[1]}y+=2}return i}return new this(e)}if(er(e)&&nt&&Ar(e[Rr])){if(!Ar((o=e[Rr]()).next))throw new TypeError(B("invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.",e));if((a=n?et(o,n,r):Qr(o))instanceof Error)throw a;for(o=(i=new this(f=a.length/2))._buffer,s=0;s=n)return{done:!0};return r=new Tr(e[a+=2],e[a+1]),{value:[o,r],done:!1}})),Y(t,"return",(function(e){if(i=!0,arguments.length)return{value:e,done:!0};return{done:!0}})),Rr&&Y(t,Rr,(function(){return r.entries()})),t})),Y(ft.prototype,"get",(function(e){var r;if(!it(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!ce(e))throw new TypeError(B("invalid argument. Must provide a nonnegative integer. Value: `%s`.",e));if(!(e>=this._length))return new Tr((r=this._buffer)[e*=2],r[e+1])})),Br(ft.prototype,"length",(function(){return this._length})),Y(ft.prototype,"set",(function(e){var r,t,n,i,o,a,u,f,l;if(!it(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(n=this._buffer,arguments.length>1){if(!ce(t=arguments[1]))throw new TypeError(B("invalid argument. Index argument must be a nonnegative integer. Value: `%s`.",t))}else t=0;if(kr(e)){if(t>=this._length)throw new RangeError(B("invalid argument. Index argument is out-of-bounds. Value: `%u`.",t));return n[t*=2]=Hr(e),void(n[t+1]=Kr(e))}if(it(e)){if(t+(a=e._length)>this._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");if(r=e._buffer,l=n.byteOffset+t*tt,r.buffer===n.buffer&&r.byteOffsetl){for(i=new me(r.length),f=0;fthis._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");if(r=e,l=n.byteOffset+t*tt,r.buffer===n.buffer&&r.byteOffsetl){for(i=new me(a),f=0;fthis._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");for(t*=2,f=0;f1?arguments[1]:"float64"))return st(e);if(null===(t=ct(r)))throw new TypeError(B("invalid argument. Second argument must be a recognized data type. Value: `%s`.",r));return new t(e)}function ht(e){return arguments.length>1?yt(e,arguments[1]):yt(e)}export{ht as default}; -//# sourceMappingURL=mod.js.map diff --git a/mod.js.map b/mod.js.map deleted file mode 100644 index ca3f210..0000000 --- a/mod.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"mod.js","sources":["../node_modules/@stdlib/utils-define-property/lib/define_property.js","../node_modules/@stdlib/utils-define-property/lib/builtin.js","../node_modules/@stdlib/string-base-format-interpolate/lib/is_number.js","../node_modules/@stdlib/string-base-format-interpolate/lib/zero_pad.js","../node_modules/@stdlib/string-base-format-interpolate/lib/format_integer.js","../node_modules/@stdlib/string-base-format-interpolate/lib/is_string.js","../node_modules/@stdlib/string-base-format-interpolate/lib/format_double.js","../node_modules/@stdlib/string-base-format-interpolate/lib/space_pad.js","../node_modules/@stdlib/string-base-format-interpolate/lib/main.js","../node_modules/@stdlib/string-base-format-tokenize/lib/main.js","../node_modules/@stdlib/string-format/lib/is_string.js","../node_modules/@stdlib/string-format/lib/main.js","../node_modules/@stdlib/utils-define-property/lib/polyfill.js","../node_modules/@stdlib/utils-define-property/lib/index.js","../node_modules/@stdlib/utils-define-property/lib/has_define_property_support.js","../node_modules/@stdlib/utils-define-nonenumerable-read-only-property/lib/main.js","../node_modules/@stdlib/assert-is-number/lib/primitive.js","../node_modules/@stdlib/assert-has-tostringtag-support/lib/main.js","../node_modules/@stdlib/assert-has-symbol-support/lib/main.js","../node_modules/@stdlib/utils-native-class/lib/tostring.js","../node_modules/@stdlib/assert-has-own-property/lib/main.js","../node_modules/@stdlib/symbol-ctor/lib/main.js","../node_modules/@stdlib/utils-native-class/lib/tostringtag.js","../node_modules/@stdlib/utils-native-class/lib/index.js","../node_modules/@stdlib/utils-native-class/lib/polyfill.js","../node_modules/@stdlib/utils-native-class/lib/main.js","../node_modules/@stdlib/number-ctor/lib/main.js","../node_modules/@stdlib/assert-is-number/lib/tostring.js","../node_modules/@stdlib/assert-is-number/lib/object.js","../node_modules/@stdlib/assert-is-number/lib/try2serialize.js","../node_modules/@stdlib/assert-is-number/lib/main.js","../node_modules/@stdlib/assert-is-number/lib/index.js","../node_modules/@stdlib/constants-float64-pinf/lib/index.js","../node_modules/@stdlib/constants-float64-ninf/lib/index.js","../node_modules/@stdlib/math-base-special-floor/lib/main.js","../node_modules/@stdlib/math-base-assert-is-integer/lib/main.js","../node_modules/@stdlib/assert-is-integer/lib/integer.js","../node_modules/@stdlib/assert-is-integer/lib/primitive.js","../node_modules/@stdlib/assert-is-integer/lib/object.js","../node_modules/@stdlib/assert-is-integer/lib/main.js","../node_modules/@stdlib/assert-is-nonnegative-integer/lib/primitive.js","../node_modules/@stdlib/assert-is-nonnegative-integer/lib/object.js","../node_modules/@stdlib/assert-is-nonnegative-integer/lib/main.js","../node_modules/@stdlib/assert-is-integer/lib/index.js","../node_modules/@stdlib/assert-is-nonnegative-integer/lib/index.js","../node_modules/@stdlib/assert-is-float64array/lib/main.js","../node_modules/@stdlib/assert-has-float64array-support/lib/float64array.js","../node_modules/@stdlib/array-float64/lib/main.js","../node_modules/@stdlib/array-float64/lib/index.js","../node_modules/@stdlib/assert-has-float64array-support/lib/main.js","../node_modules/@stdlib/array-float64/lib/polyfill.js","../node_modules/@stdlib/assert-is-float32array/lib/main.js","../node_modules/@stdlib/assert-has-float32array-support/lib/float32array.js","../node_modules/@stdlib/array-float32/lib/main.js","../node_modules/@stdlib/array-float32/lib/index.js","../node_modules/@stdlib/assert-has-float32array-support/lib/main.js","../node_modules/@stdlib/array-float32/lib/polyfill.js","../node_modules/@stdlib/assert-is-int16array/lib/main.js","../node_modules/@stdlib/constants-int16-max/lib/index.js","../node_modules/@stdlib/assert-has-int16array-support/lib/int16array.js","../node_modules/@stdlib/array-int16/lib/main.js","../node_modules/@stdlib/array-int16/lib/index.js","../node_modules/@stdlib/assert-has-int16array-support/lib/main.js","../node_modules/@stdlib/constants-int16-min/lib/index.js","../node_modules/@stdlib/array-int16/lib/polyfill.js","../node_modules/@stdlib/assert-is-int32array/lib/main.js","../node_modules/@stdlib/constants-int32-max/lib/index.js","../node_modules/@stdlib/assert-has-int32array-support/lib/int32array.js","../node_modules/@stdlib/array-int32/lib/main.js","../node_modules/@stdlib/array-int32/lib/index.js","../node_modules/@stdlib/assert-has-int32array-support/lib/main.js","../node_modules/@stdlib/constants-int32-min/lib/index.js","../node_modules/@stdlib/array-int32/lib/polyfill.js","../node_modules/@stdlib/assert-is-int8array/lib/main.js","../node_modules/@stdlib/constants-int8-max/lib/index.js","../node_modules/@stdlib/assert-has-int8array-support/lib/int8array.js","../node_modules/@stdlib/array-int8/lib/main.js","../node_modules/@stdlib/array-int8/lib/index.js","../node_modules/@stdlib/assert-has-int8array-support/lib/main.js","../node_modules/@stdlib/constants-int8-min/lib/index.js","../node_modules/@stdlib/array-int8/lib/polyfill.js","../node_modules/@stdlib/assert-is-uint16array/lib/main.js","../node_modules/@stdlib/constants-uint16-max/lib/index.js","../node_modules/@stdlib/assert-has-uint16array-support/lib/uint16array.js","../node_modules/@stdlib/array-uint16/lib/main.js","../node_modules/@stdlib/array-uint16/lib/index.js","../node_modules/@stdlib/assert-has-uint16array-support/lib/main.js","../node_modules/@stdlib/array-uint16/lib/polyfill.js","../node_modules/@stdlib/assert-is-uint32array/lib/main.js","../node_modules/@stdlib/constants-uint32-max/lib/index.js","../node_modules/@stdlib/assert-has-uint32array-support/lib/uint32array.js","../node_modules/@stdlib/array-uint32/lib/main.js","../node_modules/@stdlib/array-uint32/lib/index.js","../node_modules/@stdlib/assert-has-uint32array-support/lib/main.js","../node_modules/@stdlib/array-uint32/lib/polyfill.js","../node_modules/@stdlib/assert-is-uint8array/lib/main.js","../node_modules/@stdlib/constants-uint8-max/lib/index.js","../node_modules/@stdlib/assert-has-uint8array-support/lib/uint8array.js","../node_modules/@stdlib/array-uint8/lib/main.js","../node_modules/@stdlib/array-uint8/lib/index.js","../node_modules/@stdlib/assert-has-uint8array-support/lib/main.js","../node_modules/@stdlib/array-uint8/lib/polyfill.js","../node_modules/@stdlib/assert-is-uint8clampedarray/lib/main.js","../node_modules/@stdlib/assert-has-uint8clampedarray-support/lib/uint8clampedarray.js","../node_modules/@stdlib/array-uint8c/lib/main.js","../node_modules/@stdlib/array-uint8c/lib/index.js","../node_modules/@stdlib/assert-has-uint8clampedarray-support/lib/main.js","../node_modules/@stdlib/array-uint8c/lib/polyfill.js","../node_modules/@stdlib/assert-is-array-like-object/lib/main.js","../node_modules/@stdlib/constants-array-max-array-length/lib/index.js","../node_modules/@stdlib/assert-is-collection/lib/main.js","../node_modules/@stdlib/constants-array-max-typed-array-length/lib/index.js","../node_modules/@stdlib/assert-is-arraybuffer/lib/main.js","../node_modules/@stdlib/assert-is-array/lib/main.js","../node_modules/@stdlib/assert-is-object/lib/main.js","../node_modules/@stdlib/utils-type-of/lib/fixtures/re.js","../node_modules/@stdlib/assert-is-boolean/lib/primitive.js","../node_modules/@stdlib/boolean-ctor/lib/main.js","../node_modules/@stdlib/assert-is-boolean/lib/tostring.js","../node_modules/@stdlib/assert-is-boolean/lib/object.js","../node_modules/@stdlib/assert-is-boolean/lib/try2serialize.js","../node_modules/@stdlib/assert-is-boolean/lib/main.js","../node_modules/@stdlib/utils-global/lib/codegen.js","../node_modules/@stdlib/assert-is-boolean/lib/index.js","../node_modules/@stdlib/utils-global/lib/self.js","../node_modules/@stdlib/utils-global/lib/window.js","../node_modules/@stdlib/utils-global/lib/global.js","../node_modules/@stdlib/utils-global/lib/global_this.js","../node_modules/@stdlib/utils-type-of/lib/fixtures/nodelist.js","../node_modules/@stdlib/utils-global/lib/main.js","../node_modules/@stdlib/utils-type-of/lib/fixtures/typedarray.js","../node_modules/@stdlib/regexp-function-name/lib/main.js","../node_modules/@stdlib/regexp-function-name/lib/regexp.js","../node_modules/@stdlib/assert-is-object-like/lib/main.js","../node_modules/@stdlib/utils-constructor-name/lib/main.js","../node_modules/@stdlib/assert-is-buffer/lib/main.js","../node_modules/@stdlib/regexp-function-name/lib/index.js","../node_modules/@stdlib/assert-is-object-like/lib/index.js","../node_modules/@stdlib/assert-tools-array-function/lib/main.js","../node_modules/@stdlib/utils-type-of/lib/index.js","../node_modules/@stdlib/utils-type-of/lib/check.js","../node_modules/@stdlib/utils-type-of/lib/polyfill.js","../node_modules/@stdlib/utils-type-of/lib/main.js","../node_modules/@stdlib/assert-is-function/lib/main.js","../node_modules/@stdlib/complex-float64/lib/main.js","../node_modules/@stdlib/complex-float64/lib/tostring.js","../node_modules/@stdlib/complex-float64/lib/tojson.js","../node_modules/@stdlib/number-float64-base-to-float32/lib/main.js","../node_modules/@stdlib/number-float64-base-to-float32/lib/polyfill.js","../node_modules/@stdlib/number-float64-base-to-float32/lib/index.js","../node_modules/@stdlib/complex-float32/lib/main.js","../node_modules/@stdlib/assert-is-complex-like/lib/main.js","../node_modules/@stdlib/math-base-assert-is-even/lib/main.js","../node_modules/@stdlib/assert-has-iterator-symbol-support/lib/main.js","../node_modules/@stdlib/complex-float32/lib/tostring.js","../node_modules/@stdlib/complex-float32/lib/tojson.js","../node_modules/@stdlib/symbol-iterator/lib/main.js","../node_modules/@stdlib/utils-define-nonenumerable-read-only-accessor/lib/main.js","../node_modules/@stdlib/complex-realf/lib/main.js","../node_modules/@stdlib/complex-imagf/lib/main.js","../node_modules/@stdlib/strided-base-reinterpret-complex64/lib/main.js","../node_modules/@stdlib/strided-base-reinterpret-complex128/lib/main.js","../node_modules/@stdlib/array-base-getter/lib/main.js","../node_modules/@stdlib/array-base-accessor-getter/lib/main.js","../node_modules/@stdlib/array-complex64/lib/from_iterator.js","../node_modules/@stdlib/array-complex64/lib/from_iterator_map.js","../node_modules/@stdlib/array-complex64/lib/from_array.js","../node_modules/@stdlib/array-complex64/lib/main.js","../node_modules/@stdlib/complex-real/lib/main.js","../node_modules/@stdlib/complex-imag/lib/main.js","../node_modules/@stdlib/array-complex128/lib/from_iterator.js","../node_modules/@stdlib/array-complex128/lib/from_iterator_map.js","../node_modules/@stdlib/array-complex128/lib/from_array.js","../node_modules/@stdlib/array-complex128/lib/main.js","../node_modules/@stdlib/array-ctors/lib/ctors.js","../node_modules/@stdlib/array-ctors/lib/main.js","../node_modules/@stdlib/array-base-zeros/lib/main.js","../node_modules/@stdlib/array-base-filled/lib/main.js","../node_modules/@stdlib/array-zeros/lib/main.js","../lib/polyfill.js"],"sourcesContent":["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Object.defineProperty === 'function' ) ? Object.defineProperty : null;\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Defines (or modifies) an object property.\n*\n* ## Notes\n*\n* - Property descriptors come in two flavors: **data descriptors** and **accessor descriptors**. A data descriptor is a property that has a value, which may or may not be writable. An accessor descriptor is a property described by a getter-setter function pair. A descriptor must be one of these two flavors and cannot be both.\n*\n* @name defineProperty\n* @type {Function}\n* @param {Object} obj - object on which to define the property\n* @param {(string|symbol)} prop - property name\n* @param {Object} descriptor - property descriptor\n* @param {boolean} [descriptor.configurable=false] - boolean indicating if property descriptor can be changed and if the property can be deleted from the provided object\n* @param {boolean} [descriptor.enumerable=false] - boolean indicating if the property shows up when enumerating object properties\n* @param {boolean} [descriptor.writable=false] - boolean indicating if the value associated with the property can be changed with an assignment operator\n* @param {*} [descriptor.value] - property value\n* @param {(Function|void)} [descriptor.get=undefined] - function which serves as a getter for the property, or, if no getter, undefined. When the property is accessed, a getter function is called without arguments and with the `this` context set to the object through which the property is accessed (which may not be the object on which the property is defined due to inheritance). The return value will be used as the property value.\n* @param {(Function|void)} [descriptor.set=undefined] - function which serves as a setter for the property, or, if no setter, undefined. When assigning a property value, a setter function is called with one argument (the value being assigned to the property) and with the `this` context set to the object through which the property is assigned.\n* @throws {TypeError} first argument must be an object\n* @throws {TypeError} third argument must be an object\n* @throws {Error} property descriptor cannot have both a value and a setter and/or getter\n* @returns {Object} object with added property\n*\n* @example\n* var obj = {};\n*\n* defineProperty( obj, 'foo', {\n* 'value': 'bar'\n* });\n*\n* var str = obj.foo;\n* // returns 'bar'\n*/\nvar defineProperty = Object.defineProperty;\n\n\n// EXPORTS //\n\nexport default defineProperty;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Tests if a value is a number primitive.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number primitive\n*\n* @example\n* var bool = isNumber( 3.14 );\n* // returns true\n*\n* @example\n* var bool = isNumber( NaN );\n* // returns true\n*\n* @example\n* var bool = isNumber( new Number( 3.14 ) );\n* // returns false\n*/\nfunction isNumber( value ) {\n\treturn ( typeof value === 'number' ); // NOTE: we inline the `isNumber.isPrimitive` function from `@stdlib/assert/is-number` in order to avoid circular dependencies.\n}\n\n\n// EXPORTS //\n\nexport default isNumber;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// FUNCTIONS //\n\n/**\n* Tests if a string starts with a minus sign (`-`).\n*\n* @private\n* @param {string} str - input string\n* @returns {boolean} boolean indicating if a string starts with a minus sign (`-`)\n*/\nfunction startsWithMinus( str ) {\n\treturn str[ 0 ] === '-';\n}\n\n/**\n* Returns a string of `n` zeros.\n*\n* @private\n* @param {number} n - number of zeros\n* @returns {string} string of zeros\n*/\nfunction zeros( n ) {\n\tvar out = '';\n\tvar i;\n\tfor ( i = 0; i < n; i++ ) {\n\t\tout += '0';\n\t}\n\treturn out;\n}\n\n\n// MAIN //\n\n/**\n* Pads a token with zeros to the specified width.\n*\n* @private\n* @param {string} str - token argument\n* @param {number} width - token width\n* @param {boolean} [right=false] - boolean indicating whether to pad to the right\n* @returns {string} padded token argument\n*/\nfunction zeroPad( str, width, right ) {\n\tvar negative = false;\n\tvar pad = width - str.length;\n\tif ( pad < 0 ) {\n\t\treturn str;\n\t}\n\tif ( startsWithMinus( str ) ) {\n\t\tnegative = true;\n\t\tstr = str.substr( 1 );\n\t}\n\tstr = ( right ) ?\n\t\tstr + zeros( pad ) :\n\t\tzeros( pad ) + str;\n\tif ( negative ) {\n\t\tstr = '-' + str;\n\t}\n\treturn str;\n}\n\n\n// EXPORTS //\n\nexport default zeroPad;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isNumber from './is_number.js';\nimport zeroPad from './zero_pad.js';\n\n// NOTE: for the following, we explicitly avoid using stdlib packages in this particular package in order to avoid circular dependencies.\nvar lowercase = String.prototype.toLowerCase;\nvar uppercase = String.prototype.toUpperCase;\n\n\n// MAIN //\n\n/**\n* Formats a token object argument as an integer.\n*\n* @private\n* @param {Object} token - token object\n* @throws {Error} must provide a valid integer\n* @returns {string} formatted token argument\n*/\nfunction formatInteger( token ) {\n\tvar base;\n\tvar out;\n\tvar i;\n\n\tswitch ( token.specifier ) {\n\tcase 'b':\n\t\t// Case: %b (binary)\n\t\tbase = 2;\n\t\tbreak;\n\tcase 'o':\n\t\t// Case: %o (octal)\n\t\tbase = 8;\n\t\tbreak;\n\tcase 'x':\n\tcase 'X':\n\t\t// Case: %x, %X (hexadecimal)\n\t\tbase = 16;\n\t\tbreak;\n\tcase 'd':\n\tcase 'i':\n\tcase 'u':\n\tdefault:\n\t\t// Case: %d, %i, %u (decimal)\n\t\tbase = 10;\n\t\tbreak;\n\t}\n\tout = token.arg;\n\ti = parseInt( out, 10 );\n\tif ( !isFinite( i ) ) { // NOTE: We use the global `isFinite` function here instead of `@stdlib/math/base/assert/is-finite` in order to avoid circular dependencies.\n\t\tif ( !isNumber( out ) ) {\n\t\t\tthrow new Error( 'invalid integer. Value: ' + out );\n\t\t}\n\t\ti = 0;\n\t}\n\tif ( i < 0 && ( token.specifier === 'u' || base !== 10 ) ) {\n\t\ti = 0xffffffff + i + 1;\n\t}\n\tif ( i < 0 ) {\n\t\tout = ( -i ).toString( base );\n\t\tif ( token.precision ) {\n\t\t\tout = zeroPad( out, token.precision, token.padRight );\n\t\t}\n\t\tout = '-' + out;\n\t} else {\n\t\tout = i.toString( base );\n\t\tif ( !i && !token.precision ) {\n\t\t\tout = '';\n\t\t} else if ( token.precision ) {\n\t\t\tout = zeroPad( out, token.precision, token.padRight );\n\t\t}\n\t\tif ( token.sign ) {\n\t\t\tout = token.sign + out;\n\t\t}\n\t}\n\tif ( base === 16 ) {\n\t\tif ( token.alternate ) {\n\t\t\tout = '0x' + out;\n\t\t}\n\t\tout = ( token.specifier === uppercase.call( token.specifier ) ) ?\n\t\t\tuppercase.call( out ) :\n\t\t\tlowercase.call( out );\n\t}\n\tif ( base === 8 ) {\n\t\tif ( token.alternate && out.charAt( 0 ) !== '0' ) {\n\t\t\tout = '0' + out;\n\t\t}\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default formatInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Tests if a value is a string primitive.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a string primitive\n*\n* @example\n* var bool = isString( 'beep' );\n* // returns true\n*\n* @example\n* var bool = isString( new String( 'beep' ) );\n* // returns false\n*/\nfunction isString( value ) {\n\treturn ( typeof value === 'string' ); // NOTE: we inline the `isString.isPrimitive` function from `@stdlib/assert/is-string` in order to avoid circular dependencies.\n}\n\n\n// EXPORTS //\n\nexport default isString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isNumber from './is_number.js';\n\n// NOTE: for the following, we explicitly avoid using stdlib packages in this particular package in order to avoid circular dependencies.\nvar abs = Math.abs; // eslint-disable-line stdlib/no-builtin-math\nvar lowercase = String.prototype.toLowerCase;\nvar uppercase = String.prototype.toUpperCase;\nvar replace = String.prototype.replace;\n\n\n// VARIABLES //\n\nvar RE_EXP_POS_DIGITS = /e\\+(\\d)$/;\nvar RE_EXP_NEG_DIGITS = /e-(\\d)$/;\nvar RE_ONLY_DIGITS = /^(\\d+)$/;\nvar RE_DIGITS_BEFORE_EXP = /^(\\d+)e/;\nvar RE_TRAILING_PERIOD_ZERO = /\\.0$/;\nvar RE_PERIOD_ZERO_EXP = /\\.0*e/;\nvar RE_ZERO_BEFORE_EXP = /(\\..*[^0])0*e/;\n\n\n// MAIN //\n\n/**\n* Formats a token object argument as a floating-point number.\n*\n* @private\n* @param {Object} token - token object\n* @throws {Error} must provide a valid floating-point number\n* @returns {string} formatted token argument\n*/\nfunction formatDouble( token ) {\n\tvar digits;\n\tvar out;\n\tvar f = parseFloat( token.arg );\n\tif ( !isFinite( f ) ) { // NOTE: We use the global `isFinite` function here instead of `@stdlib/math/base/assert/is-finite` in order to avoid circular dependencies.\n\t\tif ( !isNumber( token.arg ) ) {\n\t\t\tthrow new Error( 'invalid floating-point number. Value: ' + out );\n\t\t}\n\t\t// Case: NaN, Infinity, or -Infinity\n\t\tf = token.arg;\n\t}\n\tswitch ( token.specifier ) {\n\tcase 'e':\n\tcase 'E':\n\t\tout = f.toExponential( token.precision );\n\t\tbreak;\n\tcase 'f':\n\tcase 'F':\n\t\tout = f.toFixed( token.precision );\n\t\tbreak;\n\tcase 'g':\n\tcase 'G':\n\t\tif ( abs( f ) < 0.0001 ) {\n\t\t\tdigits = token.precision;\n\t\t\tif ( digits > 0 ) {\n\t\t\t\tdigits -= 1;\n\t\t\t}\n\t\t\tout = f.toExponential( digits );\n\t\t} else {\n\t\t\tout = f.toPrecision( token.precision );\n\t\t}\n\t\tif ( !token.alternate ) {\n\t\t\tout = replace.call( out, RE_ZERO_BEFORE_EXP, '$1e' );\n\t\t\tout = replace.call( out, RE_PERIOD_ZERO_EXP, 'e');\n\t\t\tout = replace.call( out, RE_TRAILING_PERIOD_ZERO, '' );\n\t\t}\n\t\tbreak;\n\tdefault:\n\t\tthrow new Error( 'invalid double notation. Value: ' + token.specifier );\n\t}\n\tout = replace.call( out, RE_EXP_POS_DIGITS, 'e+0$1' );\n\tout = replace.call( out, RE_EXP_NEG_DIGITS, 'e-0$1' );\n\tif ( token.alternate ) {\n\t\tout = replace.call( out, RE_ONLY_DIGITS, '$1.' );\n\t\tout = replace.call( out, RE_DIGITS_BEFORE_EXP, '$1.e' );\n\t}\n\tif ( f >= 0 && token.sign ) {\n\t\tout = token.sign + out;\n\t}\n\tout = ( token.specifier === uppercase.call( token.specifier ) ) ?\n\t\tuppercase.call( out ) :\n\t\tlowercase.call( out );\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default formatDouble;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// FUNCTIONS //\n\n/**\n* Returns `n` spaces.\n*\n* @private\n* @param {number} n - number of spaces\n* @returns {string} string of spaces\n*/\nfunction spaces( n ) {\n\tvar out = '';\n\tvar i;\n\tfor ( i = 0; i < n; i++ ) {\n\t\tout += ' ';\n\t}\n\treturn out;\n}\n\n\n// MAIN //\n\n/**\n* Pads a token with spaces to the specified width.\n*\n* @private\n* @param {string} str - token argument\n* @param {number} width - token width\n* @param {boolean} [right=false] - boolean indicating whether to pad to the right\n* @returns {string} padded token argument\n*/\nfunction spacePad( str, width, right ) {\n\tvar pad = width - str.length;\n\tif ( pad < 0 ) {\n\t\treturn str;\n\t}\n\tstr = ( right ) ?\n\t\tstr + spaces( pad ) :\n\t\tspaces( pad ) + str;\n\treturn str;\n}\n\n\n// EXPORTS //\n\nexport default spacePad;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport formatInteger from './format_integer.js';\nimport isString from './is_string.js';\nimport formatDouble from './format_double.js';\nimport spacePad from './space_pad.js';\nimport zeroPad from './zero_pad.js';\n\n\n// VARIABLES //\n\nvar fromCharCode = String.fromCharCode;\nvar isnan = isNaN; // NOTE: We use the global `isNaN` function here instead of `@stdlib/math/base/assert/is-nan` to avoid circular dependencies.\nvar isArray = Array.isArray; // NOTE: We use the global `Array.isArray` function here instead of `@stdlib/assert/is-array` to avoid circular dependencies.\n\n\n// FUNCTIONS //\n\n/**\n* Initializes token object with properties of supplied format identifier object or default values if not present.\n*\n* @private\n* @param {Object} token - format identifier object\n* @returns {Object} token object\n*/\nfunction initialize( token ) {\n\tvar out = {};\n\tout.specifier = token.specifier;\n\tout.precision = ( token.precision === void 0 ) ? 1 : token.precision;\n\tout.width = token.width;\n\tout.flags = token.flags || '';\n\tout.mapping = token.mapping;\n\treturn out;\n}\n\n\n// MAIN //\n\n/**\n* Generates string from a token array by interpolating values.\n*\n* @param {Array} tokens - string parts and format identifier objects\n* @param {Array} ...args - variable values\n* @throws {TypeError} first argument must be an array\n* @throws {Error} invalid flags\n* @returns {string} formatted string\n*\n* @example\n* var tokens = [ 'beep ', { 'specifier': 's' } ];\n* var out = formatInterpolate( tokens, 'boop' );\n* // returns 'beep boop'\n*/\nfunction formatInterpolate( tokens ) {\n\tvar hasPeriod;\n\tvar flags;\n\tvar token;\n\tvar flag;\n\tvar num;\n\tvar out;\n\tvar pos;\n\tvar i;\n\tvar j;\n\n\tif ( !isArray( tokens ) ) {\n\t\tthrow new TypeError( 'invalid argument. First argument must be an array. Value: `' + tokens + '`.' );\n\t}\n\tout = '';\n\tpos = 1;\n\tfor ( i = 0; i < tokens.length; i++ ) {\n\t\ttoken = tokens[ i ];\n\t\tif ( isString( token ) ) {\n\t\t\tout += token;\n\t\t} else {\n\t\t\thasPeriod = token.precision !== void 0;\n\t\t\ttoken = initialize( token );\n\t\t\tif ( !token.specifier ) {\n\t\t\t\tthrow new TypeError( 'invalid argument. Token is missing `specifier` property. Index: `'+ i +'`. Value: `' + token + '`.' );\n\t\t\t}\n\t\t\tif ( token.mapping ) {\n\t\t\t\tpos = token.mapping;\n\t\t\t}\n\t\t\tflags = token.flags;\n\t\t\tfor ( j = 0; j < flags.length; j++ ) {\n\t\t\t\tflag = flags.charAt( j );\n\t\t\t\tswitch ( flag ) {\n\t\t\t\tcase ' ':\n\t\t\t\t\ttoken.sign = ' ';\n\t\t\t\t\tbreak;\n\t\t\t\tcase '+':\n\t\t\t\t\ttoken.sign = '+';\n\t\t\t\t\tbreak;\n\t\t\t\tcase '-':\n\t\t\t\t\ttoken.padRight = true;\n\t\t\t\t\ttoken.padZeros = false;\n\t\t\t\t\tbreak;\n\t\t\t\tcase '0':\n\t\t\t\t\ttoken.padZeros = flags.indexOf( '-' ) < 0; // NOTE: We use built-in `Array.prototype.indexOf` here instead of `@stdlib/assert/contains` in order to avoid circular dependencies.\n\t\t\t\t\tbreak;\n\t\t\t\tcase '#':\n\t\t\t\t\ttoken.alternate = true;\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tthrow new Error( 'invalid flag: ' + flag );\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( token.width === '*' ) {\n\t\t\t\ttoken.width = parseInt( arguments[ pos ], 10 );\n\t\t\t\tpos += 1;\n\t\t\t\tif ( isnan( token.width ) ) {\n\t\t\t\t\tthrow new TypeError( 'the argument for * width at position ' + pos + ' is not a number. Value: `' + token.width + '`.' );\n\t\t\t\t}\n\t\t\t\tif ( token.width < 0 ) {\n\t\t\t\t\ttoken.padRight = true;\n\t\t\t\t\ttoken.width = -token.width;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( hasPeriod ) {\n\t\t\t\tif ( token.precision === '*' ) {\n\t\t\t\t\ttoken.precision = parseInt( arguments[ pos ], 10 );\n\t\t\t\t\tpos += 1;\n\t\t\t\t\tif ( isnan( token.precision ) ) {\n\t\t\t\t\t\tthrow new TypeError( 'the argument for * precision at position ' + pos + ' is not a number. Value: `' + token.precision + '`.' );\n\t\t\t\t\t}\n\t\t\t\t\tif ( token.precision < 0 ) {\n\t\t\t\t\t\ttoken.precision = 1;\n\t\t\t\t\t\thasPeriod = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\ttoken.arg = arguments[ pos ];\n\t\t\tswitch ( token.specifier ) {\n\t\t\tcase 'b':\n\t\t\tcase 'o':\n\t\t\tcase 'x':\n\t\t\tcase 'X':\n\t\t\tcase 'd':\n\t\t\tcase 'i':\n\t\t\tcase 'u':\n\t\t\t\t// Case: %b (binary), %o (octal), %x, %X (hexadecimal), %d, %i (decimal), %u (unsigned decimal)\n\t\t\t\tif ( hasPeriod ) {\n\t\t\t\t\ttoken.padZeros = false;\n\t\t\t\t}\n\t\t\t\ttoken.arg = formatInteger( token );\n\t\t\t\tbreak;\n\t\t\tcase 's':\n\t\t\t\t// Case: %s (string)\n\t\t\t\ttoken.maxWidth = ( hasPeriod ) ? token.precision : -1;\n\t\t\t\tbreak;\n\t\t\tcase 'c':\n\t\t\t\t// Case: %c (character)\n\t\t\t\tif ( !isnan( token.arg ) ) {\n\t\t\t\t\tnum = parseInt( token.arg, 10 );\n\t\t\t\t\tif ( num < 0 || num > 127 ) {\n\t\t\t\t\t\tthrow new Error( 'invalid character code. Value: ' + token.arg );\n\t\t\t\t\t}\n\t\t\t\t\ttoken.arg = ( isnan( num ) ) ?\n\t\t\t\t\t\tString( token.arg ) :\n\t\t\t\t\t\tfromCharCode( num );\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'e':\n\t\t\tcase 'E':\n\t\t\tcase 'f':\n\t\t\tcase 'F':\n\t\t\tcase 'g':\n\t\t\tcase 'G':\n\t\t\t\t// Case: %e, %E (scientific notation), %f, %F (decimal floating point), %g, %G (uses the shorter of %e/E or %f/F)\n\t\t\t\tif ( !hasPeriod ) {\n\t\t\t\t\ttoken.precision = 6;\n\t\t\t\t}\n\t\t\t\ttoken.arg = formatDouble( token );\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tthrow new Error( 'invalid specifier: ' + token.specifier );\n\t\t\t}\n\t\t\t// Fit argument into field width...\n\t\t\tif ( token.maxWidth >= 0 && token.arg.length > token.maxWidth ) {\n\t\t\t\ttoken.arg = token.arg.substring( 0, token.maxWidth );\n\t\t\t}\n\t\t\tif ( token.padZeros ) {\n\t\t\t\ttoken.arg = zeroPad( token.arg, token.width || token.precision, token.padRight ); // eslint-disable-line max-len\n\t\t\t} else if ( token.width ) {\n\t\t\t\ttoken.arg = spacePad( token.arg, token.width, token.padRight );\n\t\t\t}\n\t\t\tout += token.arg || '';\n\t\t\tpos += 1;\n\t\t}\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default formatInterpolate;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// VARIABLES //\n\nvar RE = /%(?:([1-9]\\d*)\\$)?([0 +\\-#]*)(\\*|\\d+)?(?:(\\.)(\\*|\\d+)?)?[hlL]?([%A-Za-z])/g;\n\n\n// FUNCTIONS //\n\n/**\n* Parses a delimiter.\n*\n* @private\n* @param {Array} match - regular expression match\n* @returns {Object} delimiter token object\n*/\nfunction parse( match ) {\n\tvar token = {\n\t\t'mapping': ( match[ 1 ] ) ? parseInt( match[ 1 ], 10 ) : void 0,\n\t\t'flags': match[ 2 ],\n\t\t'width': match[ 3 ],\n\t\t'precision': match[ 5 ],\n\t\t'specifier': match[ 6 ]\n\t};\n\tif ( match[ 4 ] === '.' && match[ 5 ] === void 0 ) {\n\t\ttoken.precision = '1';\n\t}\n\treturn token;\n}\n\n\n// MAIN //\n\n/**\n* Tokenizes a string into an array of string parts and format identifier objects.\n*\n* @param {string} str - input string\n* @returns {Array} tokens\n*\n* @example\n* var tokens = formatTokenize( 'Hello %s!' );\n* // returns [ 'Hello ', {...}, '!' ]\n*/\nfunction formatTokenize( str ) {\n\tvar content;\n\tvar tokens;\n\tvar match;\n\tvar prev;\n\n\ttokens = [];\n\tprev = 0;\n\tmatch = RE.exec( str );\n\twhile ( match ) {\n\t\tcontent = str.slice( prev, RE.lastIndex - match[ 0 ].length );\n\t\tif ( content.length ) {\n\t\t\ttokens.push( content );\n\t\t}\n\t\ttokens.push( parse( match ) );\n\t\tprev = RE.lastIndex;\n\t\tmatch = RE.exec( str );\n\t}\n\tcontent = str.slice( prev );\n\tif ( content.length ) {\n\t\ttokens.push( content );\n\t}\n\treturn tokens;\n}\n\n\n// EXPORTS //\n\nexport default formatTokenize;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Tests if a value is a string primitive.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a string primitive\n*\n* @example\n* var bool = isString( 'beep' );\n* // returns true\n*\n* @example\n* var bool = isString( new String( 'beep' ) );\n* // returns false\n*/\nfunction isString( value ) {\n\treturn ( typeof value === 'string' ); // NOTE: we inline the `isString.isPrimitive` function from `@stdlib/assert/is-string` in order to avoid circular dependencies.\n}\n\n\n// EXPORTS //\n\nexport default isString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport interpolate from '@stdlib/string-base-format-interpolate';\nimport tokenize from '@stdlib/string-base-format-tokenize';\nimport isString from './is_string.js';\n\n\n// MAIN //\n\n/**\n* Inserts supplied variable values into a format string.\n*\n* @param {string} str - input string\n* @param {Array} ...args - variable values\n* @throws {TypeError} first argument must be a string\n* @throws {Error} invalid flags\n* @returns {string} formatted string\n*\n* @example\n* var str = format( 'Hello %s!', 'world' );\n* // returns 'Hello world!'\n*\n* @example\n* var str = format( 'Pi: ~%.2f', 3.141592653589793 );\n* // returns 'Pi: ~3.14'\n*/\nfunction format( str ) {\n\tvar tokens;\n\tvar args;\n\tvar i;\n\n\tif ( !isString( str ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a string. Value: `%s`.', str ) );\n\t}\n\ttokens = tokenize( str );\n\targs = new Array( arguments.length );\n\targs[ 0 ] = tokens;\n\tfor ( i = 1; i < args.length; i++ ) {\n\t\targs[ i ] = arguments[ i ];\n\t}\n\treturn interpolate.apply( null, args );\n}\n\n\n// EXPORTS //\n\nexport default format;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable no-underscore-dangle, no-proto */\n\n'use strict';\n\n// MODULES //\n\nimport format from '@stdlib/string-format';\n\n\n// VARIABLES //\n\nvar objectProtoype = Object.prototype;\nvar toStr = objectProtoype.toString;\nvar defineGetter = objectProtoype.__defineGetter__;\nvar defineSetter = objectProtoype.__defineSetter__;\nvar lookupGetter = objectProtoype.__lookupGetter__;\nvar lookupSetter = objectProtoype.__lookupSetter__;\n\n\n// MAIN //\n\n/**\n* Defines (or modifies) an object property.\n*\n* ## Notes\n*\n* - Property descriptors come in two flavors: **data descriptors** and **accessor descriptors**. A data descriptor is a property that has a value, which may or may not be writable. An accessor descriptor is a property described by a getter-setter function pair. A descriptor must be one of these two flavors and cannot be both.\n*\n* @param {Object} obj - object on which to define the property\n* @param {string} prop - property name\n* @param {Object} descriptor - property descriptor\n* @param {boolean} [descriptor.configurable=false] - boolean indicating if property descriptor can be changed and if the property can be deleted from the provided object\n* @param {boolean} [descriptor.enumerable=false] - boolean indicating if the property shows up when enumerating object properties\n* @param {boolean} [descriptor.writable=false] - boolean indicating if the value associated with the property can be changed with an assignment operator\n* @param {*} [descriptor.value] - property value\n* @param {(Function|void)} [descriptor.get=undefined] - function which serves as a getter for the property, or, if no getter, undefined. When the property is accessed, a getter function is called without arguments and with the `this` context set to the object through which the property is accessed (which may not be the object on which the property is defined due to inheritance). The return value will be used as the property value.\n* @param {(Function|void)} [descriptor.set=undefined] - function which serves as a setter for the property, or, if no setter, undefined. When assigning a property value, a setter function is called with one argument (the value being assigned to the property) and with the `this` context set to the object through which the property is assigned.\n* @throws {TypeError} first argument must be an object\n* @throws {TypeError} third argument must be an object\n* @throws {Error} property descriptor cannot have both a value and a setter and/or getter\n* @returns {Object} object with added property\n*\n* @example\n* var obj = {};\n*\n* defineProperty( obj, 'foo', {\n* 'value': 'bar'\n* });\n*\n* var str = obj.foo;\n* // returns 'bar'\n*/\nfunction defineProperty( obj, prop, descriptor ) {\n\tvar prototype;\n\tvar hasValue;\n\tvar hasGet;\n\tvar hasSet;\n\n\tif ( typeof obj !== 'object' || obj === null || toStr.call( obj ) === '[object Array]' ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be an object. Value: `%s`.', obj ) );\n\t}\n\tif ( typeof descriptor !== 'object' || descriptor === null || toStr.call( descriptor ) === '[object Array]' ) {\n\t\tthrow new TypeError( format( 'invalid argument. Property descriptor must be an object. Value: `%s`.', descriptor ) );\n\t}\n\thasValue = ( 'value' in descriptor );\n\tif ( hasValue ) {\n\t\tif (\n\t\t\tlookupGetter.call( obj, prop ) ||\n\t\t\tlookupSetter.call( obj, prop )\n\t\t) {\n\t\t\t// Override `__proto__` to avoid touching inherited accessors:\n\t\t\tprototype = obj.__proto__;\n\t\t\tobj.__proto__ = objectProtoype;\n\n\t\t\t// Delete property as existing getters/setters prevent assigning value to specified property:\n\t\t\tdelete obj[ prop ];\n\t\t\tobj[ prop ] = descriptor.value;\n\n\t\t\t// Restore original prototype:\n\t\t\tobj.__proto__ = prototype;\n\t\t} else {\n\t\t\tobj[ prop ] = descriptor.value;\n\t\t}\n\t}\n\thasGet = ( 'get' in descriptor );\n\thasSet = ( 'set' in descriptor );\n\n\tif ( hasValue && ( hasGet || hasSet ) ) {\n\t\tthrow new Error( 'invalid argument. Cannot specify one or more accessors and a value or writable attribute in the property descriptor.' );\n\t}\n\n\tif ( hasGet && defineGetter ) {\n\t\tdefineGetter.call( obj, prop, descriptor.get );\n\t}\n\tif ( hasSet && defineSetter ) {\n\t\tdefineSetter.call( obj, prop, descriptor.set );\n\t}\n\treturn obj;\n}\n\n\n// EXPORTS //\n\nexport default defineProperty;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Define (or modify) an object property.\n*\n* @module @stdlib/utils-define-property\n*\n* @example\n* import defineProperty from '@stdlib/utils-define-property';\n*\n* var obj = {};\n* defineProperty( obj, 'foo', {\n* 'value': 'bar',\n* 'writable': false,\n* 'configurable': false,\n* 'enumerable': false\n* });\n* obj.foo = 'boop'; // => throws\n*/\n\n// MODULES //\n\nimport hasDefinePropertySupport from './has_define_property_support.js';\nimport builtin from './builtin.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar defineProperty;\nif ( hasDefinePropertySupport() ) {\n\tdefineProperty = builtin;\n} else {\n\tdefineProperty = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default defineProperty;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport defineProperty from './define_property.js';\n\n\n// MAIN //\n\n/**\n* Tests for `Object.defineProperty` support.\n*\n* @private\n* @returns {boolean} boolean indicating if an environment has `Object.defineProperty` support\n*\n* @example\n* var bool = hasDefinePropertySupport();\n* // returns \n*/\nfunction hasDefinePropertySupport() {\n\t// Test basic support...\n\ttry {\n\t\tdefineProperty( {}, 'x', {} );\n\t\treturn true;\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\treturn false;\n\t}\n}\n\n\n// EXPORTS //\n\nexport default hasDefinePropertySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport defineProperty from '@stdlib/utils-define-property';\n\n\n// MAIN //\n\n/**\n* Defines a non-enumerable read-only property.\n*\n* @param {Object} obj - object on which to define the property\n* @param {(string|symbol)} prop - property name\n* @param {*} value - value to set\n*\n* @example\n* var obj = {};\n*\n* setNonEnumerableReadOnly( obj, 'foo', 'bar' );\n*\n* try {\n* obj.foo = 'boop';\n* } catch ( err ) {\n* console.error( err.message );\n* }\n*/\nfunction setNonEnumerableReadOnly( obj, prop, value ) {\n\tdefineProperty( obj, prop, {\n\t\t'configurable': false,\n\t\t'enumerable': false,\n\t\t'writable': false,\n\t\t'value': value\n\t});\n}\n\n\n// EXPORTS //\n\nexport default setNonEnumerableReadOnly;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Tests if a value is a number primitive.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number primitive\n*\n* @example\n* var bool = isNumber( 3.14 );\n* // returns true\n*\n* @example\n* var bool = isNumber( NaN );\n* // returns true\n*\n* @example\n* var bool = isNumber( new Number( 3.14 ) );\n* // returns false\n*/\nfunction isNumber( value ) {\n\treturn ( typeof value === 'number' );\n}\n\n\n// EXPORTS //\n\nexport default isNumber;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport hasSymbols from '@stdlib/assert-has-symbol-support';\n\n\n// VARIABLES //\n\nvar FLG = hasSymbols();\n\n\n// MAIN //\n\n/**\n* Tests for native `toStringTag` support.\n*\n* @returns {boolean} boolean indicating if an environment has `toStringTag` support\n*\n* @example\n* var bool = hasToStringTagSupport();\n* // returns \n*/\nfunction hasToStringTagSupport() {\n\treturn ( FLG && typeof Symbol.toStringTag === 'symbol' );\n}\n\n\n// EXPORTS //\n\nexport default hasToStringTagSupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Tests for native `Symbol` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Symbol` support\n*\n* @example\n* var bool = hasSymbolSupport();\n* // returns \n*/\nfunction hasSymbolSupport() {\n\treturn (\n\t\ttypeof Symbol === 'function' &&\n\t\ttypeof Symbol( 'foo' ) === 'symbol'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default hasSymbolSupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar toStr = Object.prototype.toString;\n\n\n// EXPORTS //\n\nexport default toStr;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// FUNCTIONS //\n\nvar has = Object.prototype.hasOwnProperty;\n\n\n// MAIN //\n\n/**\n* Tests if an object has a specified property.\n*\n* @param {*} value - value to test\n* @param {*} property - property to test\n* @returns {boolean} boolean indicating if an object has a specified property\n*\n* @example\n* var beep = {\n* 'boop': true\n* };\n*\n* var bool = hasOwnProp( beep, 'boop' );\n* // returns true\n*\n* @example\n* var beep = {\n* 'boop': true\n* };\n*\n* var bool = hasOwnProp( beep, 'bap' );\n* // returns false\n*/\nfunction hasOwnProp( value, property ) {\n\tif (\n\t\tvalue === void 0 ||\n\t\tvalue === null\n\t) {\n\t\treturn false;\n\t}\n\treturn has.call( value, property );\n}\n\n\n// EXPORTS //\n\nexport default hasOwnProp;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar Sym = ( typeof Symbol === 'function' ) ? Symbol : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default Sym;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport Symbol from '@stdlib/symbol-ctor';\n\n\n// MAIN //\n\nvar toStrTag = ( typeof Symbol === 'function' ) ? Symbol.toStringTag : '';\n\n\n// EXPORTS //\n\nexport default toStrTag;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Return a string value indicating a specification defined classification of an object.\n*\n* @module @stdlib/utils-native-class\n*\n* @example\n* import nativeClass from '@stdlib/utils-native-class';\n*\n* var str = nativeClass( 'a' );\n* // returns '[object String]'\n*\n* str = nativeClass( 5 );\n* // returns '[object Number]'\n*\n* function Beep() {\n* return this;\n* }\n* str = nativeClass( new Beep() );\n* // returns '[object Object]'\n*/\n\n// MODULES //\n\nimport hasToStringTag from '@stdlib/assert-has-tostringtag-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar main;\nif ( hasToStringTag() ) {\n\tmain = polyfill;\n} else {\n\tmain = builtin;\n}\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport hasOwnProp from '@stdlib/assert-has-own-property';\nimport toStringTag from './tostringtag.js';\nimport toStr from './tostring.js';\n\n\n// MAIN //\n\n/**\n* Returns a string value indicating a specification defined classification of an object in environments supporting `Symbol.toStringTag`.\n*\n* @param {*} v - input value\n* @returns {string} string value indicating a specification defined classification of the input value\n*\n* @example\n* var str = nativeClass( 'a' );\n* // returns '[object String]'\n*\n* @example\n* var str = nativeClass( 5 );\n* // returns '[object Number]'\n*\n* @example\n* function Beep() {\n* return this;\n* }\n* var str = nativeClass( new Beep() );\n* // returns '[object Object]'\n*/\nfunction nativeClass( v ) {\n\tvar isOwn;\n\tvar tag;\n\tvar out;\n\n\tif ( v === null || v === void 0 ) {\n\t\treturn toStr.call( v );\n\t}\n\ttag = v[ toStringTag ];\n\tisOwn = hasOwnProp( v, toStringTag );\n\n\t// Attempt to override the `toStringTag` property. For built-ins having a `Symbol.toStringTag` property (e.g., `JSON`, `Math`, etc), the `Symbol.toStringTag` property is read-only (e.g., , so we need to wrap in a `try/catch`.\n\ttry {\n\t\tv[ toStringTag ] = void 0;\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\treturn toStr.call( v );\n\t}\n\tout = toStr.call( v );\n\n\tif ( isOwn ) {\n\t\tv[ toStringTag ] = tag;\n\t} else {\n\t\tdelete v[ toStringTag ];\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default nativeClass;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport toStr from './tostring.js';\n\n\n// MAIN //\n\n/**\n* Returns a string value indicating a specification defined classification (via the internal property `[[Class]]`) of an object.\n*\n* @param {*} v - input value\n* @returns {string} string value indicating a specification defined classification of the input value\n*\n* @example\n* var str = nativeClass( 'a' );\n* // returns '[object String]'\n*\n* @example\n* var str = nativeClass( 5 );\n* // returns '[object Number]'\n*\n* @example\n* function Beep() {\n* return this;\n* }\n* var str = nativeClass( new Beep() );\n* // returns '[object Object]'\n*/\nfunction nativeClass( v ) {\n\treturn toStr.call( v );\n}\n\n\n// EXPORTS //\n\nexport default nativeClass;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// EXPORTS //\n\nexport default Number; // eslint-disable-line stdlib/require-globals\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport Number from '@stdlib/number-ctor';\n\n\n// MAIN //\n\n// eslint-disable-next-line stdlib/no-redeclare\nvar toString = Number.prototype.toString; // non-generic\n\n\n// EXPORTS //\n\nexport default toString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport hasToStringTag from '@stdlib/assert-has-tostringtag-support';\nimport nativeClass from '@stdlib/utils-native-class';\nimport Number from '@stdlib/number-ctor';\nimport test from './try2serialize.js';\n\n\n// VARIABLES //\n\nvar FLG = hasToStringTag();\n\n\n// MAIN //\n\n/**\n* Tests if a value is a number object.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number object\n*\n* @example\n* var bool = isNumber( 3.14 );\n* // returns false\n*\n* @example\n* var bool = isNumber( new Number( 3.14 ) );\n* // returns true\n*/\nfunction isNumber( value ) {\n\tif ( typeof value === 'object' ) {\n\t\tif ( value instanceof Number ) {\n\t\t\treturn true;\n\t\t}\n\t\tif ( FLG ) {\n\t\t\treturn test( value );\n\t\t}\n\t\treturn ( nativeClass( value ) === '[object Number]' );\n\t}\n\treturn false;\n}\n\n\n// EXPORTS //\n\nexport default isNumber;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport toString from './tostring.js'; // eslint-disable-line stdlib/no-redeclare\n\n\n// MAIN //\n\n/**\n* Attempts to serialize a value to a string.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value can be serialized\n*/\nfunction test( value ) {\n\ttry {\n\t\ttoString.call( value );\n\t\treturn true;\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\treturn false;\n\t}\n}\n\n\n// EXPORTS //\n\nexport default test;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a number.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a number\n*\n* @example\n* var bool = isNumber( 3.14 );\n* // returns true\n*\n* @example\n* var bool = isNumber( new Number( 3.14 ) );\n* // returns true\n*\n* @example\n* var bool = isNumber( NaN );\n* // returns true\n*\n* @example\n* var bool = isNumber( null );\n* // returns false\n*/\nfunction isNumber( value ) {\n\treturn ( isPrimitive( value ) || isObject( value ) );\n}\n\n\n// EXPORTS //\n\nexport default isNumber;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test if a value is a number.\n*\n* @module @stdlib/assert-is-number\n*\n* @example\n* import isNumber from '@stdlib/assert-is-number';\n*\n* var bool = isNumber( 3.14 );\n* // returns true\n*\n* bool = isNumber( new Number( 3.14 ) );\n* // returns true\n*\n* bool = isNumber( NaN );\n* // returns true\n*\n* bool = isNumber( null );\n* // returns false\n*\n* @example\n* import { isPrimitive as isNumber } from '@stdlib/assert-is-number';\n*\n* var bool = isNumber( 3.14 );\n* // returns true\n*\n* bool = isNumber( NaN );\n* // returns true\n*\n* bool = isNumber( new Number( 3.14 ) );\n* // returns false\n*\n* @example\n* import { isObject as isNumber } from '@stdlib/assert-is-number';\n*\n* var bool = isNumber( 3.14 );\n* // returns false\n*\n* bool = isNumber( new Number( 3.14 ) );\n* // returns true\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'isPrimitive', isPrimitive );\nsetReadOnly( main, 'isObject', isObject );\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Double-precision floating-point positive infinity.\n*\n* @module @stdlib/constants-float64-pinf\n* @type {number}\n*\n* @example\n* import FLOAT64_PINF from '@stdlib/constants-float64-pinf';\n* // returns Infinity\n*/\n\n\n// MAIN //\n\n/**\n* Double-precision floating-point positive infinity.\n*\n* ## Notes\n*\n* Double-precision floating-point positive infinity has the bit sequence\n*\n* ```binarystring\n* 0 11111111111 00000000000000000000 00000000000000000000000000000000\n* ```\n*\n* @constant\n* @type {number}\n* @default Number.POSITIVE_INFINITY\n* @see [IEEE 754]{@link https://en.wikipedia.org/wiki/IEEE_754-1985}\n*/\nvar FLOAT64_PINF = Number.POSITIVE_INFINITY; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default FLOAT64_PINF;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Double-precision floating-point negative infinity.\n*\n* @module @stdlib/constants-float64-ninf\n* @type {number}\n*\n* @example\n* import FLOAT64_NINF from '@stdlib/constants-float64-ninf';\n* // returns -Infinity\n*/\n\n// MODULES //\n\nimport Number from '@stdlib/number-ctor';\n\n\n// MAIN //\n\n/**\n* Double-precision floating-point negative infinity.\n*\n* ## Notes\n*\n* Double-precision floating-point negative infinity has the bit sequence\n*\n* ```binarystring\n* 1 11111111111 00000000000000000000 00000000000000000000000000000000\n* ```\n*\n* @constant\n* @type {number}\n* @default Number.NEGATIVE_INFINITY\n* @see [IEEE 754]{@link https://en.wikipedia.org/wiki/IEEE_754-1985}\n*/\nvar FLOAT64_NINF = Number.NEGATIVE_INFINITY;\n\n\n// EXPORTS //\n\nexport default FLOAT64_NINF;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: implementation (?)\n\n/**\n* Rounds a double-precision floating-point number toward negative infinity.\n*\n* @param {number} x - input value\n* @returns {number} rounded value\n*\n* @example\n* var v = floor( -4.2 );\n* // returns -5.0\n*\n* @example\n* var v = floor( 9.99999 );\n* // returns 9.0\n*\n* @example\n* var v = floor( 0.0 );\n* // returns 0.0\n*\n* @example\n* var v = floor( NaN );\n* // returns NaN\n*/\nvar floor = Math.floor; // eslint-disable-line stdlib/no-builtin-math\n\n\n// EXPORTS //\n\nexport default floor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport floor from '@stdlib/math-base-special-floor';\n\n\n// MAIN //\n\n/**\n* Tests if a finite double-precision floating-point number is an integer.\n*\n* @param {number} x - value to test\n* @returns {boolean} boolean indicating whether the value is an integer\n*\n* @example\n* var bool = isInteger( 1.0 );\n* // returns true\n*\n* @example\n* var bool = isInteger( 3.14 );\n* // returns false\n*/\nfunction isInteger( x ) {\n\treturn (floor(x) === x);\n}\n\n\n// EXPORTS //\n\nexport default isInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport PINF from '@stdlib/constants-float64-pinf';\nimport NINF from '@stdlib/constants-float64-ninf';\nimport isInt from '@stdlib/math-base-assert-is-integer';\n\n\n// MAIN //\n\n/**\n* Tests if a number primitive is an integer value.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a number primitive is an integer value\n*/\nfunction isInteger( value ) {\n\treturn (\n\t\tvalue < PINF &&\n\t\tvalue > NINF &&\n\t\tisInt( value )\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isNumber } from '@stdlib/assert-is-number';\nimport isInt from './integer.js';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a number primitive having an integer value.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number primitive having an integer value\n*\n* @example\n* var bool = isInteger( -3.0 );\n* // returns true\n*\n* @example\n* var bool = isInteger( new Number( -3.0 ) );\n* // returns false\n*/\nfunction isInteger( value ) {\n\treturn (\n\t\tisNumber( value ) &&\n\t\tisInt( value )\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isObject as isNumber } from '@stdlib/assert-is-number';\nimport isInt from './integer.js';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a number object having an integer value.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number object having an integer value\n*\n* @example\n* var bool = isInteger( 3.0 );\n* // returns false\n*\n* @example\n* var bool = isInteger( new Number( 3.0 ) );\n* // returns true\n*/\nfunction isInteger( value ) {\n\treturn (\n\t\tisNumber( value ) &&\n\t\tisInt( value.valueOf() )\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\n/**\n* Tests if a value is an integer.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an integer\n*\n* @example\n* var bool = isInteger( 5.0 );\n* // returns true\n*\n* @example\n* var bool = isInteger( new Number( 5.0 ) );\n* // returns true\n*\n* @example\n* var bool = isInteger( -3.14 );\n* // returns false\n*\n* @example\n* var bool = isInteger( null );\n* // returns false\n*/\nfunction isInteger( value ) {\n\treturn ( isPrimitive( value ) || isObject( value ) );\n}\n\n\n// EXPORTS //\n\nexport default isInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isInteger } from '@stdlib/assert-is-integer';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a number primitive having a nonnegative integer value.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number primitive having a nonnegative integer value\n*\n* @example\n* var bool = isNonNegativeInteger( 3.0 );\n* // returns true\n*\n* @example\n* var bool = isNonNegativeInteger( new Number( 3.0 ) );\n* // returns false\n*/\nfunction isNonNegativeInteger( value ) {\n\treturn (\n\t\tisInteger( value ) &&\n\t\tvalue >= 0\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isNonNegativeInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isObject as isInteger } from '@stdlib/assert-is-integer';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a number object having a nonnegative integer value.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number object having a nonnegative integer value\n*\n* @example\n* var bool = isNonNegativeInteger( 3.0 );\n* // returns false\n*\n* @example\n* var bool = isNonNegativeInteger( new Number( 3.0 ) );\n* // returns true\n*/\nfunction isNonNegativeInteger( value ) {\n\treturn (\n\t\tisInteger( value ) &&\n\t\tvalue.valueOf() >= 0\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isNonNegativeInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a nonnegative integer.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a nonnegative integer\n*\n* @example\n* var bool = isNonNegativeInteger( 5.0 );\n* // returns true\n*\n* @example\n* var bool = isNonNegativeInteger( new Number( 5.0 ) );\n* // returns true\n*\n* @example\n* var bool = isNonNegativeInteger( -5.0 );\n* // returns false\n*\n* @example\n* var bool = isNonNegativeInteger( 3.14 );\n* // returns false\n*\n* @example\n* var bool = isNonNegativeInteger( null );\n* // returns false\n*/\nfunction isNonNegativeInteger( value ) {\n\treturn ( isPrimitive( value ) || isObject( value ) );\n}\n\n\n// EXPORTS //\n\nexport default isNonNegativeInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test if a value is an integer.\n*\n* @module @stdlib/assert-is-integer\n*\n* @example\n* import isInteger from '@stdlib/assert-is-integer';\n*\n* var bool = isInteger( 5.0 );\n* // returns true\n*\n* bool = isInteger( new Number( 5.0 ) );\n* // returns true\n*\n* bool = isInteger( -3.14 );\n* // returns false\n*\n* bool = isInteger( null );\n* // returns false\n*\n* @example\n* // Use interface to check for integer primitives...\n* import { isPrimitive as isInteger } from '@stdlib/assert-is-integer';\n*\n* var bool = isInteger( -3.0 );\n* // returns true\n*\n* bool = isInteger( new Number( -3.0 ) );\n* // returns false\n*\n* @example\n* // Use interface to check for integer objects...\n* import { isObject as isInteger } from '@stdlib/assert-is-integer';\n*\n* var bool = isInteger( 3.0 );\n* // returns false\n*\n* bool = isInteger( new Number( 3.0 ) );\n* // returns true\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'isPrimitive', isPrimitive );\nsetReadOnly( main, 'isObject', isObject );\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test if a value is a nonnegative integer.\n*\n* @module @stdlib/assert-is-nonnegative-integer\n*\n* @example\n* import isNonNegativeInteger from '@stdlib/assert-is-nonnegative-integer';\n*\n* var bool = isNonNegativeInteger( 5.0 );\n* // returns true\n*\n* bool = isNonNegativeInteger( new Number( 5.0 ) );\n* // returns true\n*\n* bool = isNonNegativeInteger( -5.0 );\n* // returns false\n*\n* bool = isNonNegativeInteger( 3.14 );\n* // returns false\n*\n* bool = isNonNegativeInteger( null );\n* // returns false\n*\n* @example\n* import { isPrimitive as isNonNegativeInteger } from '@stdlib/assert-is-nonnegative-integer';\n*\n* var bool = isNonNegativeInteger( 3.0 );\n* // returns true\n*\n* bool = isNonNegativeInteger( new Number( 3.0 ) );\n* // returns false\n*\n* @example\n* import { isObject as isNonNegativeInteger } from '@stdlib/assert-is-nonnegative-integer';\n*\n* var bool = isNonNegativeInteger( 3.0 );\n* // returns false\n*\n* bool = isNonNegativeInteger( new Number( 3.0 ) );\n* // returns true\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'isPrimitive', isPrimitive );\nsetReadOnly( main, 'isObject', isObject );\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasFloat64Array = ( typeof Float64Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Float64Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a Float64Array\n*\n* @example\n* var bool = isFloat64Array( new Float64Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isFloat64Array( [] );\n* // returns false\n*/\nfunction isFloat64Array( value ) {\n\treturn (\n\t\t( hasFloat64Array && value instanceof Float64Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Float64Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isFloat64Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Float64Array === 'function' ) ? Float64Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Float64Array === 'function' ) ? Float64Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of double-precision floating-point numbers in the platform byte order.\n*\n* @module @stdlib/array-float64\n*\n* @example\n* import ctor from '@stdlib/array-float64';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasFloat64ArraySupport from '@stdlib/assert-has-float64array-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasFloat64ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isFloat64Array from '@stdlib/assert-is-float64array';\nimport GlobalFloat64Array from './float64array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Float64Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Float64Array` support\n*\n* @example\n* var bool = hasFloat64ArraySupport();\n* // returns \n*/\nfunction hasFloat64ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalFloat64Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = new GlobalFloat64Array( [ 1.0, 3.14, -3.14, NaN ] );\n\t\tbool = (\n\t\t\tisFloat64Array( arr ) &&\n\t\t\tarr[ 0 ] === 1.0 &&\n\t\t\tarr[ 1 ] === 3.14 &&\n\t\t\tarr[ 2 ] === -3.14 &&\n\t\t\tarr[ 3 ] !== arr[ 3 ]\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasFloat64ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of double-precision floating-point numbers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasFloat32Array = ( typeof Float32Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Float32Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a Float32Array\n*\n* @example\n* var bool = isFloat32Array( new Float32Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isFloat32Array( [] );\n* // returns false\n*/\nfunction isFloat32Array( value ) {\n\treturn (\n\t\t( hasFloat32Array && value instanceof Float32Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Float32Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isFloat32Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Float32Array === 'function' ) ? Float32Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Float32Array === 'function' ) ? Float32Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of single-precision floating-point numbers in the platform byte order.\n*\n* @module @stdlib/array-float32\n*\n* @example\n* import ctor from '@stdlib/array-float32';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasFloat32ArraySupport from '@stdlib/assert-has-float32array-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasFloat32ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isFloat32Array from '@stdlib/assert-is-float32array';\nimport PINF from '@stdlib/constants-float64-pinf';\nimport GlobalFloat32Array from './float32array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Float32Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Float32Array` support\n*\n* @example\n* var bool = hasFloat32ArraySupport();\n* // returns \n*/\nfunction hasFloat32ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalFloat32Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = new GlobalFloat32Array( [ 1.0, 3.14, -3.14, 5.0e40 ] );\n\t\tbool = (\n\t\t\tisFloat32Array( arr ) &&\n\t\t\tarr[ 0 ] === 1.0 &&\n\t\t\tarr[ 1 ] === 3.140000104904175 &&\n\t\t\tarr[ 2 ] === -3.140000104904175 &&\n\t\t\tarr[ 3 ] === PINF\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasFloat32ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of single-precision floating-point numbers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasInt16Array = ( typeof Int16Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is an Int16Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an Int16Array\n*\n* @example\n* var bool = isInt16Array( new Int16Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isInt16Array( [] );\n* // returns false\n*/\nfunction isInt16Array( value ) {\n\treturn (\n\t\t( hasInt16Array && value instanceof Int16Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Int16Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isInt16Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum signed 16-bit integer.\n*\n* @module @stdlib/constants-int16-max\n* @type {integer32}\n*\n* @example\n* import INT16_MAX from '@stdlib/constants-int16-max';\n* // returns 32767\n*/\n\n\n// MAIN //\n\n/**\n* Maximum signed 16-bit integer.\n*\n* ## Notes\n*\n* The number has the value\n*\n* ```tex\n* 2^{15} - 1\n* ```\n*\n* which corresponds to the bit sequence\n*\n* ```binarystring\n* 0111111111111111\n* ```\n*\n* @constant\n* @type {integer32}\n* @default 32767\n*/\nvar INT16_MAX = 32767|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default INT16_MAX;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Int16Array === 'function' ) ? Int16Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Int16Array === 'function' ) ? Int16Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of twos-complement 16-bit signed integers in the platform byte order.\n*\n* @module @stdlib/array-int16\n*\n* @example\n* import ctor from '@stdlib/array-int16';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasInt16ArraySupport from '@stdlib/assert-has-int16array-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasInt16ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isInt16Array from '@stdlib/assert-is-int16array';\nimport INT16_MAX from '@stdlib/constants-int16-max';\nimport INT16_MIN from '@stdlib/constants-int16-min';\nimport GlobalInt16Array from './int16array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Int16Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Int16Array` support\n*\n* @example\n* var bool = hasInt16ArraySupport();\n* // returns \n*/\nfunction hasInt16ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalInt16Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = new GlobalInt16Array( [ 1, 3.14, -3.14, INT16_MAX+1 ] );\n\t\tbool = (\n\t\t\tisInt16Array( arr ) &&\n\t\t\tarr[ 0 ] === 1 &&\n\t\t\tarr[ 1 ] === 3 && // truncation\n\t\t\tarr[ 2 ] === -3 && // truncation\n\t\t\tarr[ 3 ] === INT16_MIN // wrap around\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasInt16ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Minimum signed 16-bit integer.\n*\n* @module @stdlib/constants-int16-min\n* @type {integer32}\n*\n* @example\n* import INT16_MIN from '@stdlib/constants-int16-min';\n* // returns -32768\n*/\n\n\n// MAIN //\n\n/**\n* Minimum signed 16-bit integer.\n*\n* ## Notes\n*\n* The number has the value\n*\n* ```tex\n* -(2^{15})\n* ```\n*\n* which corresponds to the two's complement bit sequence\n*\n* ```binarystring\n* 1000000000000000\n* ```\n*\n* @constant\n* @type {integer32}\n* @default -32768\n*/\nvar INT16_MIN = -32768|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default INT16_MIN;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of twos-complement 16-bit signed integers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasInt32Array = ( typeof Int32Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is an Int32Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an Int32Array\n*\n* @example\n* var bool = isInt32Array( new Int32Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isInt32Array( [] );\n* // returns false\n*/\nfunction isInt32Array( value ) {\n\treturn (\n\t\t( hasInt32Array && value instanceof Int32Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Int32Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isInt32Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum signed 32-bit integer.\n*\n* @module @stdlib/constants-int32-max\n* @type {integer32}\n*\n* @example\n* import INT32_MAX from '@stdlib/constants-int32-max';\n* // returns 2147483647\n*/\n\n\n// MAIN //\n\n/**\n* Maximum signed 32-bit integer.\n*\n* ## Notes\n*\n* The number has the value\n*\n* ```tex\n* 2^{31} - 1\n* ```\n*\n* which corresponds to the bit sequence\n*\n* ```binarystring\n* 01111111111111111111111111111111\n* ```\n*\n* @constant\n* @type {integer32}\n* @default 2147483647\n*/\nvar INT32_MAX = 2147483647|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default INT32_MAX;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Int32Array === 'function' ) ? Int32Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Int32Array === 'function' ) ? Int32Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of twos-complement 32-bit signed integers in the platform byte order.\n*\n* @module @stdlib/array-int32\n*\n* @example\n* import ctor from '@stdlib/array-int32';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasInt32ArraySupport from '@stdlib/assert-has-int32array-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasInt32ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isInt32Array from '@stdlib/assert-is-int32array';\nimport INT32_MAX from '@stdlib/constants-int32-max';\nimport INT32_MIN from '@stdlib/constants-int32-min';\nimport GlobalInt32Array from './int32array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Int32Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Int32Array` support\n*\n* @example\n* var bool = hasInt32ArraySupport();\n* // returns \n*/\nfunction hasInt32ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalInt32Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = new GlobalInt32Array( [ 1, 3.14, -3.14, INT32_MAX+1 ] );\n\t\tbool = (\n\t\t\tisInt32Array( arr ) &&\n\t\t\tarr[ 0 ] === 1 &&\n\t\t\tarr[ 1 ] === 3 && // truncation\n\t\t\tarr[ 2 ] === -3 && // truncation\n\t\t\tarr[ 3 ] === INT32_MIN // wrap around\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasInt32ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Minimum signed 32-bit integer.\n*\n* @module @stdlib/constants-int32-min\n* @type {integer32}\n*\n* @example\n* import INT32_MIN from '@stdlib/constants-int32-min';\n* // returns -2147483648\n*/\n\n\n// MAIN //\n\n/**\n* Minimum signed 32-bit integer.\n*\n* ## Notes\n*\n* The number has the value\n*\n* ```tex\n* -(2^{31})\n* ```\n*\n* which corresponds to the two's complement bit sequence\n*\n* ```binarystring\n* 10000000000000000000000000000000\n* ```\n*\n* @constant\n* @type {integer32}\n* @default -2147483648\n*/\nvar INT32_MIN = -2147483648|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default INT32_MIN;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of twos-complement 32-bit signed integers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasInt8Array = ( typeof Int8Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is an Int8Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an Int8Array\n*\n* @example\n* var bool = isInt8Array( new Int8Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isInt8Array( [] );\n* // returns false\n*/\nfunction isInt8Array( value ) {\n\treturn (\n\t\t( hasInt8Array && value instanceof Int8Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Int8Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isInt8Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum signed 8-bit integer.\n*\n* @module @stdlib/constants-int8-max\n* @type {integer32}\n*\n* @example\n* import INT8_MAX from '@stdlib/constants-int8-max';\n* // returns 127\n*/\n\n\n// MAIN //\n\n/**\n* Maximum signed 8-bit integer.\n*\n* ## Notes\n*\n* The number is given by\n*\n* ```tex\n* 2^{7} - 1\n* ```\n*\n* which corresponds to the bit sequence\n*\n* ```binarystring\n* 01111111\n* ```\n*\n* @constant\n* @type {integer32}\n* @default 127\n*/\nvar INT8_MAX = 127|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default INT8_MAX;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Int8Array === 'function' ) ? Int8Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Int8Array === 'function' ) ? Int8Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of twos-complement 8-bit signed integers in the platform byte order.\n*\n* @module @stdlib/array-int8\n*\n* @example\n* import ctor from '@stdlib/array-int8';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasInt8ArraySupport from '@stdlib/assert-has-int8array-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasInt8ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isInt8Array from '@stdlib/assert-is-int8array';\nimport INT8_MAX from '@stdlib/constants-int8-max';\nimport INT8_MIN from '@stdlib/constants-int8-min';\nimport GlobalInt8Array from './int8array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Int8Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Int8Array` support\n*\n* @example\n* var bool = hasInt8ArraySupport();\n* // returns \n*/\nfunction hasInt8ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalInt8Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = new GlobalInt8Array( [ 1, 3.14, -3.14, INT8_MAX+1 ] );\n\t\tbool = (\n\t\t\tisInt8Array( arr ) &&\n\t\t\tarr[ 0 ] === 1 &&\n\t\t\tarr[ 1 ] === 3 && // truncation\n\t\t\tarr[ 2 ] === -3 && // truncation\n\t\t\tarr[ 3 ] === INT8_MIN // wrap around\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasInt8ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Minimum signed 8-bit integer.\n*\n* @module @stdlib/constants-int8-min\n* @type {integer32}\n*\n* @example\n* import INT8_MIN from '@stdlib/constants-int8-min';\n* // returns -128\n*/\n\n\n// MAIN //\n\n/**\n* Minimum signed 8-bit integer.\n*\n* ## Notes\n*\n* The number is given by\n*\n* ```tex\n* -(2^{7})\n* ```\n*\n* which corresponds to the two's complement bit sequence\n*\n* ```binarystring\n* 10000000\n* ```\n*\n* @constant\n* @type {integer32}\n* @default -128\n*/\nvar INT8_MIN = -128|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default INT8_MIN;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of twos-complement 8-bit signed integers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasUint16Array = ( typeof Uint16Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Uint16Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a Uint16Array\n*\n* @example\n* var bool = isUint16Array( new Uint16Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isUint16Array( [] );\n* // returns false\n*/\nfunction isUint16Array( value ) {\n\treturn (\n\t\t( hasUint16Array && value instanceof Uint16Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Uint16Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isUint16Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum unsigned 16-bit integer.\n*\n* @module @stdlib/constants-uint16-max\n* @type {integer32}\n*\n* @example\n* import UINT16_MAX from '@stdlib/constants-uint16-max';\n* // returns 65535\n*/\n\n\n// MAIN //\n\n/**\n* Maximum unsigned 16-bit integer.\n*\n* ## Notes\n*\n* The number has the value\n*\n* ```tex\n* 2^{16} - 1\n* ```\n*\n* which corresponds to the bit sequence\n*\n* ```binarystring\n* 1111111111111111\n* ```\n*\n* @constant\n* @type {integer32}\n* @default 65535\n*/\nvar UINT16_MAX = 65535|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default UINT16_MAX;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Uint16Array === 'function' ) ? Uint16Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Uint16Array === 'function' ) ? Uint16Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of 16-bit unsigned integers in the platform byte order.\n*\n* @module @stdlib/array-uint16\n*\n* @example\n* import ctor from '@stdlib/array-uint16';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasUint16ArraySupport from '@stdlib/assert-has-uint16array-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasUint16ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isUint16Array from '@stdlib/assert-is-uint16array';\nimport UINT16_MAX from '@stdlib/constants-uint16-max';\nimport GlobalUint16Array from './uint16array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Uint16Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Uint16Array` support\n*\n* @example\n* var bool = hasUint16ArraySupport();\n* // returns \n*/\nfunction hasUint16ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalUint16Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = [ 1, 3.14, -3.14, UINT16_MAX+1, UINT16_MAX+2 ];\n\t\tarr = new GlobalUint16Array( arr );\n\t\tbool = (\n\t\t\tisUint16Array( arr ) &&\n\t\t\tarr[ 0 ] === 1 &&\n\t\t\tarr[ 1 ] === 3 && // truncation\n\t\t\tarr[ 2 ] === UINT16_MAX-2 && // truncation and wrap around\n\t\t\tarr[ 3 ] === 0 && // wrap around\n\t\t\tarr[ 4 ] === 1 // wrap around\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasUint16ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of 16-bit unsigned integers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasUint32Array = ( typeof Uint32Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Uint32Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a Uint32Array\n*\n* @example\n* var bool = isUint32Array( new Uint32Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isUint32Array( [] );\n* // returns false\n*/\nfunction isUint32Array( value ) {\n\treturn (\n\t\t( hasUint32Array && value instanceof Uint32Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Uint32Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isUint32Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum unsigned 32-bit integer.\n*\n* @module @stdlib/constants-uint32-max\n* @type {uinteger32}\n*\n* @example\n* import UINT32_MAX from '@stdlib/constants-uint32-max';\n* // returns 4294967295\n*/\n\n\n// MAIN //\n\n/**\n* Maximum unsigned 32-bit integer.\n*\n* ## Notes\n*\n* The number has the value\n*\n* ```tex\n* 2^{32} - 1\n* ```\n*\n* which corresponds to the bit sequence\n*\n* ```binarystring\n* 11111111111111111111111111111111\n* ```\n*\n* @constant\n* @type {uinteger32}\n* @default 4294967295\n*/\nvar UINT32_MAX = 4294967295;\n\n\n// EXPORTS //\n\nexport default UINT32_MAX;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Uint32Array === 'function' ) ? Uint32Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Uint32Array === 'function' ) ? Uint32Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of 32-bit unsigned integers in the platform byte order.\n*\n* @module @stdlib/array-uint32\n*\n* @example\n* import ctor from '@stdlib/array-uint32';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasUint32ArraySupport from '@stdlib/assert-has-uint32array-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasUint32ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isUint32Array from '@stdlib/assert-is-uint32array';\nimport UINT32_MAX from '@stdlib/constants-uint32-max';\nimport GlobalUint32Array from './uint32array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Uint32Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Uint32Array` support\n*\n* @example\n* var bool = hasUint32ArraySupport();\n* // returns \n*/\nfunction hasUint32ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalUint32Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = [ 1, 3.14, -3.14, UINT32_MAX+1, UINT32_MAX+2 ];\n\t\tarr = new GlobalUint32Array( arr );\n\t\tbool = (\n\t\t\tisUint32Array( arr ) &&\n\t\t\tarr[ 0 ] === 1 &&\n\t\t\tarr[ 1 ] === 3 && // truncation\n\t\t\tarr[ 2 ] === UINT32_MAX-2 && // truncation and wrap around\n\t\t\tarr[ 3 ] === 0 && // wrap around\n\t\t\tarr[ 4 ] === 1 // wrap around\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasUint32ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of 32-bit unsigned integers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasUint8Array = ( typeof Uint8Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Uint8Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a Uint8Array\n*\n* @example\n* var bool = isUint8Array( new Uint8Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isUint8Array( [] );\n* // returns false\n*/\nfunction isUint8Array( value ) {\n\treturn (\n\t\t( hasUint8Array && value instanceof Uint8Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Uint8Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isUint8Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum unsigned 8-bit integer.\n*\n* @module @stdlib/constants-uint8-max\n* @type {integer32}\n*\n* @example\n* import UINT8_MAX from '@stdlib/constants-uint8-max';\n* // returns 255\n*/\n\n\n// MAIN //\n\n/**\n* Maximum unsigned 8-bit integer.\n*\n* ## Notes\n*\n* The number has the value\n*\n* ```tex\n* 2^{8} - 1\n* ```\n*\n* which corresponds to the bit sequence\n*\n* ```binarystring\n* 11111111\n* ```\n*\n* @constant\n* @type {integer32}\n* @default 255\n*/\nvar UINT8_MAX = 255|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default UINT8_MAX;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Uint8Array === 'function' ) ? Uint8Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Uint8Array === 'function' ) ? Uint8Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of 8-bit unsigned integers in the platform byte order.\n*\n* @module @stdlib/array-uint8\n*\n* @example\n* import ctor from '@stdlib/array-uint8';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasUint8ArraySupport from '@stdlib/assert-has-uint8array-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasUint8ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isUint8Array from '@stdlib/assert-is-uint8array';\nimport UINT8_MAX from '@stdlib/constants-uint8-max';\nimport GlobalUint8Array from './uint8array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Uint8Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Uint8Array` support\n*\n* @example\n* var bool = hasUint8ArraySupport();\n* // returns \n*/\nfunction hasUint8ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalUint8Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = [ 1, 3.14, -3.14, UINT8_MAX+1, UINT8_MAX+2 ];\n\t\tarr = new GlobalUint8Array( arr );\n\t\tbool = (\n\t\t\tisUint8Array( arr ) &&\n\t\t\tarr[ 0 ] === 1 &&\n\t\t\tarr[ 1 ] === 3 && // truncation\n\t\t\tarr[ 2 ] === UINT8_MAX-2 && // truncation and wrap around\n\t\t\tarr[ 3 ] === 0 && // wrap around\n\t\t\tarr[ 4 ] === 1 // wrap around\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasUint8ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of 8-bit unsigned integers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasUint8ClampedArray = ( typeof Uint8ClampedArray === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Uint8ClampedArray.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a Uint8ClampedArray\n*\n* @example\n* var bool = isUint8ClampedArray( new Uint8ClampedArray( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isUint8ClampedArray( [] );\n* // returns false\n*/\nfunction isUint8ClampedArray( value ) {\n\treturn (\n\t\t( hasUint8ClampedArray && value instanceof Uint8ClampedArray ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Uint8ClampedArray]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isUint8ClampedArray;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Uint8ClampedArray === 'function' ) ? Uint8ClampedArray : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Uint8ClampedArray === 'function' ) ? Uint8ClampedArray : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of 8-bit unsigned integers in the platform byte order clamped to 0-255.\n*\n* @module @stdlib/array-uint8c\n*\n* @example\n* import ctor from '@stdlib/array-uint8c';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasUint8ClampedArraySupport from '@stdlib/assert-has-uint8clampedarray-support'; // eslint-disable-line id-length\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasUint8ClampedArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isUint8ClampedArray from '@stdlib/assert-is-uint8clampedarray';\nimport GlobalUint8ClampedArray from './uint8clampedarray.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Uint8ClampedArray` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Uint8ClampedArray` support\n*\n* @example\n* var bool = hasUint8ClampedArraySupport();\n* // returns \n*/\nfunction hasUint8ClampedArraySupport() { // eslint-disable-line id-length\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalUint8ClampedArray !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = new GlobalUint8ClampedArray( [ -1, 0, 1, 3.14, 4.99, 255, 256 ] );\n\t\tbool = (\n\t\t\tisUint8ClampedArray( arr ) &&\n\t\t\tarr[ 0 ] === 0 && // clamped\n\t\t\tarr[ 1 ] === 0 &&\n\t\t\tarr[ 2 ] === 1 &&\n\t\t\tarr[ 3 ] === 3 && // round to nearest\n\t\t\tarr[ 4 ] === 5 && // round to nearest\n\t\t\tarr[ 5 ] === 255 &&\n\t\t\tarr[ 6 ] === 255 // clamped\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasUint8ClampedArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of 8-bit unsigned integers in the platform byte order clamped to 0-255.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isInteger from '@stdlib/math-base-assert-is-integer';\nimport MAX_LENGTH from '@stdlib/constants-array-max-array-length';\n\n\n// MAIN //\n\n/**\n* Tests if a value is an array-like object.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is an array-like object\n*\n* @example\n* var bool = isArrayLikeObject( [] );\n* // returns true\n*\n* @example\n* var bool = isArrayLikeObject( { 'length':10 } );\n* // returns true\n*\n* @example\n* var bool = isArrayLikeObject( 'beep' );\n* // returns false\n*/\nfunction isArrayLikeObject( value ) {\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\ttypeof value.length === 'number' &&\n\t\tisInteger( value.length ) &&\n\t\tvalue.length >= 0 &&\n\t\tvalue.length <= MAX_LENGTH\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isArrayLikeObject;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum length of a generic array.\n*\n* @module @stdlib/constants-array-max-array-length\n*\n* @example\n* import MAX_ARRAY_LENGTH from '@stdlib/constants-array-max-array-length';\n* // returns 4294967295\n*/\n\n// MAIN //\n\n/**\n* Maximum length of a generic array.\n*\n* ```tex\n* 2^{32} - 1\n* ```\n*\n* @constant\n* @type {uinteger32}\n* @default 4294967295\n*/\nvar MAX_ARRAY_LENGTH = 4294967295>>>0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default MAX_ARRAY_LENGTH;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isInteger from '@stdlib/math-base-assert-is-integer';\nimport MAX_LENGTH from '@stdlib/constants-array-max-typed-array-length';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a collection.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether a value is a collection\n*\n* @example\n* var bool = isCollection( [] );\n* // returns true\n*\n* @example\n* var bool = isCollection( {} );\n* // returns false\n*/\nfunction isCollection( value ) {\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\ttypeof value.length === 'number' &&\n\t\tisInteger( value.length ) &&\n\t\tvalue.length >= 0 &&\n\t\tvalue.length <= MAX_LENGTH\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isCollection;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum length of a typed array.\n*\n* @module @stdlib/constants-array-max-typed-array-length\n*\n* @example\n* import MAX_TYPED_ARRAY_LENGTH from '@stdlib/constants-array-max-typed-array-length';\n* // returns 9007199254740991\n*/\n\n// MAIN //\n\n/**\n* Maximum length of a typed array.\n*\n* ```tex\n* 2^{53} - 1\n* ```\n*\n* @constant\n* @type {number}\n* @default 9007199254740991\n*/\nvar MAX_TYPED_ARRAY_LENGTH = 9007199254740991;\n\n\n// EXPORTS //\n\nexport default MAX_TYPED_ARRAY_LENGTH;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasArrayBuffer = ( typeof ArrayBuffer === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is an ArrayBuffer.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an ArrayBuffer\n*\n* @example\n* import ArrayBuffer from '@stdlib/array-buffer';\n*\n* var bool = isArrayBuffer( new ArrayBuffer( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isArrayBuffer( [] );\n* // returns false\n*/\nfunction isArrayBuffer( value ) {\n\treturn (\n\t\t( hasArrayBuffer && value instanceof ArrayBuffer ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object ArrayBuffer]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isArrayBuffer;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar f;\n\n\n// FUNCTIONS //\n\n/**\n* Tests if a value is an array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an array\n*\n* @example\n* var bool = isArray( [] );\n* // returns true\n*\n* @example\n* var bool = isArray( {} );\n* // returns false\n*/\nfunction isArray( value ) {\n\treturn ( nativeClass( value ) === '[object Array]' );\n}\n\n\n// MAIN //\n\nif ( Array.isArray ) {\n\tf = Array.isArray;\n} else {\n\tf = isArray;\n}\n\n\n// EXPORTS //\n\nexport default f;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isArray from '@stdlib/assert-is-array';\n\n\n// MAIN //\n\n/**\n* Tests if a value is an object; e.g., `{}`.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an object\n*\n* @example\n* var bool = isObject( {} );\n* // returns true\n*\n* @example\n* var bool = isObject( null );\n* // returns false\n*/\nfunction isObject( value ) {\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\t!isArray( value )\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isObject;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\nvar RE = /./;\n\n\n// EXPORTS //\n\nexport default RE;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Tests if a value is a boolean primitive.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a boolean primitive\n*\n* @example\n* var bool = isBoolean( true );\n* // returns true\n*\n* @example\n* var bool = isBoolean( false );\n* // returns true\n*\n* @example\n* import Boolean from '@stdlib/boolean-ctor';\n*\n* var bool = isBoolean( new Boolean( true ) );\n* // returns false\n*/\nfunction isBoolean( value ) {\n\treturn ( typeof value === 'boolean' );\n}\n\n\n// EXPORTS //\n\nexport default isBoolean;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Returns a boolean.\n*\n* @name Boolean\n* @constructor\n* @type {Function}\n* @param {*} value - input value\n* @returns {(boolean|Boolean)} boolean\n*\n* @example\n* var b = Boolean( null );\n* // returns false\n*\n* b = Boolean( [] );\n* // returns true\n*\n* b = Boolean( {} );\n* // returns true\n*\n* @example\n* var b = new Boolean( false );\n* // returns \n*/\nvar Bool = Boolean; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default Bool;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// eslint-disable-next-line stdlib/no-redeclare\nvar toString = Boolean.prototype.toString; // non-generic\n\n\n// EXPORTS //\n\nexport default toString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport hasToStringTag from '@stdlib/assert-has-tostringtag-support';\nimport nativeClass from '@stdlib/utils-native-class';\nimport Boolean from '@stdlib/boolean-ctor';\nimport test from './try2serialize.js';\n\n\n// VARIABLES //\n\nvar FLG = hasToStringTag();\n\n\n// MAIN //\n\n/**\n* Tests if a value is a boolean object.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a boolean object\n*\n* @example\n* var bool = isBoolean( true );\n* // returns false\n*\n* @example\n* import Boolean from '@stdlib/boolean-ctor';\n*\n* var bool = isBoolean( new Boolean( false ) );\n* // returns true\n*/\nfunction isBoolean( value ) {\n\tif ( typeof value === 'object' ) {\n\t\tif ( value instanceof Boolean ) {\n\t\t\treturn true;\n\t\t}\n\t\tif ( FLG ) {\n\t\t\treturn test( value );\n\t\t}\n\t\treturn ( nativeClass( value ) === '[object Boolean]' );\n\t}\n\treturn false;\n}\n\n\n// EXPORTS //\n\nexport default isBoolean;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport toString from './tostring.js'; // eslint-disable-line stdlib/no-redeclare\n\n\n// MAIN //\n\n/**\n* Attempts to serialize a value to a string.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value can be serialized\n*/\nfunction test( value ) {\n\ttry {\n\t\ttoString.call( value );\n\t\treturn true;\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\treturn false;\n\t}\n}\n\n\n// EXPORTS //\n\nexport default test;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a boolean.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a boolean\n*\n* @example\n* var bool = isBoolean( false );\n* // returns true\n*\n* @example\n* var bool = isBoolean( true );\n* // returns true\n*\n* @example\n* import Boolean from '@stdlib/boolean-ctor';\n*\n* var bool = isBoolean( new Boolean( false ) );\n* // returns true\n*\n* @example\n* import Boolean from '@stdlib/boolean-ctor';\n*\n* var bool = isBoolean( new Boolean( true ) );\n* // returns true\n*/\nfunction isBoolean( value ) {\n\treturn ( isPrimitive( value ) || isObject( value ) );\n}\n\n\n// EXPORTS //\n\nexport default isBoolean;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Returns the global object using code generation.\n*\n* @private\n* @returns {Object} global object\n*/\nfunction getGlobal() {\n\treturn new Function( 'return this;' )(); // eslint-disable-line no-new-func, stdlib/require-globals\n}\n\n\n// EXPORTS //\n\nexport default getGlobal;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test if a value is a boolean.\n*\n* @module @stdlib/assert-is-boolean\n*\n* @example\n* import Boolean from '@stdlib/boolean-ctor';\n* import isBoolean from '@stdlib/assert-is-boolean';\n*\n* var bool = isBoolean( false );\n* // returns true\n*\n* bool = isBoolean( new Boolean( false ) );\n* // returns true\n*\n* @example\n* import Boolean from '@stdlib/boolean-ctor';\n* import { isPrimitive as isBoolean } from '@stdlib/assert-is-boolean';\n*\n* var bool = isBoolean( false );\n* // returns true\n*\n* bool = isBoolean( new Boolean( true ) );\n* // returns false\n*\n* @example\n* import Boolean from '@stdlib/boolean-ctor';\n* import { isObject as isBoolean } from '@stdlib/assert-is-boolean';\n*\n* var bool = isBoolean( true );\n* // returns false\n*\n* bool = isBoolean( new Boolean( false ) );\n* // returns true\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'isPrimitive', isPrimitive );\nsetReadOnly( main, 'isObject', isObject );\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar obj = ( typeof self === 'object' ) ? self : null;\n\n\n// EXPORTS //\n\nexport default obj;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar obj = ( typeof window === 'object' ) ? window : null;\n\n\n// EXPORTS //\n\nexport default obj;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar obj = ( typeof global === 'object' ) ? global : null;\n\n\n// EXPORTS //\n\nexport default obj;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar obj = ( typeof globalThis === 'object' ) ? globalThis : null; // eslint-disable-line no-undef\n\n\n// EXPORTS //\n\nexport default obj;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport getGlobal from '@stdlib/utils-global';\n\n\n// MAIN //\n\nvar root = getGlobal();\nvar nodeList = root.document && root.document.childNodes;\n\n\n// EXPORTS //\n\nexport default nodeList;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isBoolean } from '@stdlib/assert-is-boolean';\nimport format from '@stdlib/string-format';\nimport getThis from './codegen.js';\nimport Self from './self.js';\nimport Win from './window.js';\nimport Global from './global.js';\nimport GlobalThis from './global_this.js';\n\n\n// MAIN //\n\n/**\n* Returns the global object.\n*\n* ## Notes\n*\n* - Using code generation is the **most** reliable way to resolve the global object; however, doing so is likely to violate content security policies (CSPs) in, e.g., Chrome Apps and elsewhere.\n*\n* @param {boolean} [codegen=false] - boolean indicating whether to use code generation to resolve the global object\n* @throws {TypeError} must provide a boolean\n* @throws {Error} unable to resolve global object\n* @returns {Object} global object\n*\n* @example\n* var g = getGlobal();\n* // returns {...}\n*/\nfunction getGlobal( codegen ) {\n\tif ( arguments.length ) {\n\t\tif ( !isBoolean( codegen ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Must provide a boolean. Value: `%s`.', codegen ) );\n\t\t}\n\t\tif ( codegen ) {\n\t\t\treturn getThis();\n\t\t}\n\t\t// Fall through...\n\t}\n\t// Case: 2020 revision of ECMAScript standard\n\tif ( GlobalThis ) {\n\t\treturn GlobalThis;\n\t}\n\t// Case: browsers and web workers\n\tif ( Self ) {\n\t\treturn Self;\n\t}\n\t// Case: browsers\n\tif ( Win ) {\n\t\treturn Win;\n\t}\n\t// Case: Node.js\n\tif ( Global ) {\n\t\treturn Global;\n\t}\n\t// Case: unknown\n\tthrow new Error( 'unexpected error. Unable to resolve global object.' );\n}\n\n\n// EXPORTS //\n\nexport default getGlobal;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\nvar typedarray = Int8Array; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default typedarray;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Returns a regular expression to capture everything that is not a space immediately after the `function` keyword and before the first left parenthesis.\n*\n* @returns {RegExp} regular expression\n*\n* @example\n* var RE_FUNCTION_NAME = reFunctionName();\n*\n* function fname( fcn ) {\n* return RE_FUNCTION_NAME.exec( fcn.toString() )[ 1 ];\n* }\n*\n* var fn = fname( Math.sqrt );\n* // returns 'sqrt'\n*\n* fn = fname( Int8Array );\n* // returns 'Int8Array'\n*\n* fn = fname( Object.prototype.toString );\n* // returns 'toString'\n*\n* fn = fname( function(){} );\n* // returns ''\n*/\nfunction reFunctionName() {\n\treturn /^\\s*function\\s*([^(]*)/i;\n}\n\n\n// EXPORTS //\n\nexport default reFunctionName;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport reFunctionName from './main.js';\n\n\n// MAIN //\n\n/**\n* Captures everything that is not a space immediately after the `function` keyword and before the first left parenthesis.\n*\n* Regular expression: `/^\\s*function\\s*([^(]*)/i`\n*\n* - `/^\\s*`\n* - Match zero or more spaces at beginning\n*\n* - `function`\n* - Match the word `function`\n*\n* - `\\s*`\n* - Match zero or more spaces after the word `function`\n*\n* - `()`\n* - Capture\n*\n* - `[^(]*`\n* - Match anything except a left parenthesis `(` zero or more times\n*\n* - `/i`\n* - ignore case\n*\n* @constant\n* @type {RegExp}\n* @default /^\\s*function\\s*([^(]*)/i\n*/\nvar RE_FUNCTION_NAME = reFunctionName();\n\n\n// EXPORTS //\n\nexport default RE_FUNCTION_NAME;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Tests if a value is object-like.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether a value is object-like\n*\n* @example\n* var bool = isObjectLike( {} );\n* // returns true\n*\n* @example\n* var bool = isObjectLike( [] );\n* // returns true\n*\n* @example\n* var bool = isObjectLike( null );\n* // returns false\n*/\nfunction isObjectLike( value ) {\n\treturn (\n\t\tvalue !== null &&\n\t\ttypeof value === 'object'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isObjectLike;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\nimport { REGEXP as RE } from '@stdlib/regexp-function-name';\nimport isBuffer from '@stdlib/assert-is-buffer';\n\n\n// MAIN //\n\n/**\n* Determines the name of a value's constructor.\n*\n* @param {*} v - input value\n* @returns {string} name of a value's constructor\n*\n* @example\n* var v = constructorName( 'a' );\n* // returns 'String'\n*\n* @example\n* var v = constructorName( 5 );\n* // returns 'Number'\n*\n* @example\n* var v = constructorName( null );\n* // returns 'Null'\n*\n* @example\n* var v = constructorName( undefined );\n* // returns 'Undefined'\n*\n* @example\n* var v = constructorName( function noop() {} );\n* // returns 'Function'\n*/\nfunction constructorName( v ) {\n\tvar match;\n\tvar name;\n\tvar ctor;\n\tname = nativeClass( v ).slice( 8, -1 );\n\tif ( (name === 'Object' || name === 'Error') && v.constructor ) {\n\t\tctor = v.constructor;\n\t\tif ( typeof ctor.name === 'string' ) {\n\t\t\treturn ctor.name;\n\t\t}\n\t\tmatch = RE.exec( ctor.toString() );\n\t\tif ( match ) {\n\t\t\treturn match[ 1 ];\n\t\t}\n\t}\n\tif ( isBuffer( v ) ) {\n\t\treturn 'Buffer';\n\t}\n\treturn name;\n}\n\n\n// EXPORTS //\n\nexport default constructorName;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isObjectLike from '@stdlib/assert-is-object-like';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Buffer instance.\n*\n* @param {*} value - value to validate\n* @returns {boolean} boolean indicating if a value is a Buffer instance\n*\n* @example\n* var v = isBuffer( new Buffer( 'beep' ) );\n* // returns true\n*\n* @example\n* var v = isBuffer( new Buffer( [1,2,3,4] ) );\n* // returns true\n*\n* @example\n* var v = isBuffer( {} );\n* // returns false\n*\n* @example\n* var v = isBuffer( [] );\n* // returns false\n*/\nfunction isBuffer( value ) {\n\treturn (\n\t\tisObjectLike( value ) &&\n\t\t(\n\t\t\t// eslint-disable-next-line no-underscore-dangle\n\t\t\tvalue._isBuffer || // for envs missing Object.prototype.constructor (e.g., Safari 5-7)\n\t\t\t(\n\t\t\t\tvalue.constructor &&\n\n\t\t\t\t// WARNING: `typeof` is not a foolproof check, as certain envs consider RegExp and NodeList instances to be functions\n\t\t\t\ttypeof value.constructor.isBuffer === 'function' &&\n\t\t\t\tvalue.constructor.isBuffer( value )\n\t\t\t)\n\t\t)\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isBuffer;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Regular expression to capture everything that is not a space immediately after the `function` keyword and before the first left parenthesis.\n*\n* @module @stdlib/regexp-function-name\n*\n* @example\n* import reFunctionName from '@stdlib/regexp-function-name';\n* var RE_FUNCTION_NAME = reFunctionName();\n*\n* function fname( fcn ) {\n* return RE_FUNCTION_NAME.exec( fcn.toString() )[ 1 ];\n* }\n*\n* var fn = fname( Math.sqrt );\n* // returns 'sqrt'\n*\n* fn = fname( Int8Array );\n* // returns 'Int8Array'\n*\n* fn = fname( Object.prototype.toString );\n* // returns 'toString'\n*\n* fn = fname( function(){} );\n* // returns ''\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport REGEXP from './regexp.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'REGEXP', REGEXP );\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test if a value is object-like.\n*\n* @module @stdlib/assert-is-object-like\n*\n* @example\n* import isObjectLike from '@stdlib/assert-is-object-like';\n*\n* var bool = isObjectLike( {} );\n* // returns true\n*\n* bool = isObjectLike( [] );\n* // returns true\n*\n* bool = isObjectLike( null );\n* // returns false\n*\n* @example\n* import { isObjectLikeArray as isObjectLike } from '@stdlib/assert-is-object-like';\n*\n* var bool = isObjectLike( [ {}, [] ] );\n* // returns true\n*\n* bool = isObjectLike( [ {}, '3.0' ] );\n* // returns false\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport arrayfun from '@stdlib/assert-tools-array-function';\nimport main from './main.js';\n\n\n// VARIABLES //\n\nvar isObjectLikeArray = arrayfun( main );\n\n\n// MAIN //\n\nsetReadOnly( main, 'isObjectLikeArray', isObjectLikeArray );\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isArray from '@stdlib/assert-is-array';\nimport format from '@stdlib/string-format';\n\n\n// MAIN //\n\n/**\n* Returns a function which tests if every element in an array passes a test condition.\n*\n* @param {Function} predicate - function to apply\n* @throws {TypeError} must provide a function\n* @returns {Function} an array function\n*\n* @example\n* import isOdd from '@stdlib/assert-is-odd';\n*\n* var arr1 = [ 1, 3, 5, 7 ];\n* var arr2 = [ 3, 5, 8 ];\n*\n* var validate = arrayfcn( isOdd );\n*\n* var bool = validate( arr1 );\n* // returns true\n*\n* bool = validate( arr2 );\n* // returns false\n*/\nfunction arrayfcn( predicate ) {\n\tif ( typeof predicate !== 'function' ) {\n\t\tthrow new TypeError( format( 'invalid argument. Must provide a function. Value: `%s`.', predicate ) );\n\t}\n\treturn every;\n\n\t/**\n\t* Tests if every element in an array passes a test condition.\n\t*\n\t* @private\n\t* @param {*} value - value to test\n\t* @returns {boolean} boolean indicating whether a value is an array for which all elements pass a test condition\n\t*/\n\tfunction every( value ) {\n\t\tvar len;\n\t\tvar i;\n\t\tif ( !isArray( value ) ) {\n\t\t\treturn false;\n\t\t}\n\t\tlen = value.length;\n\t\tif ( len === 0 ) {\n\t\t\treturn false;\n\t\t}\n\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\tif ( predicate( value[ i ] ) === false ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}\n}\n\n\n// EXPORTS //\n\nexport default arrayfcn;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Determine a value's type.\n*\n* @module @stdlib/utils-type-of\n*\n* @example\n* import typeOf from '@stdlib/utils-type-of';\n*\n* var str = typeOf( 'a' );\n* // returns 'string'\n*\n* str = typeOf( 5 );\n* // returns 'number'\n*/\n\n// MODULES //\n\nimport usePolyfill from './check.js';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar main = ( usePolyfill() ) ? polyfill : builtin;\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport RE from './fixtures/re.js';\nimport nodeList from './fixtures/nodelist.js';\nimport typedarray from './fixtures/typedarray.js';\n\n\n// MAIN //\n\n/**\n* Checks whether a polyfill is needed when using the `typeof` operator.\n*\n* @private\n* @returns {boolean} boolean indicating whether a polyfill is needed\n*/\nfunction check() {\n\tif (\n\t\t// Chrome 1-12 returns 'function' for regular expression instances (see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/typeof):\n\t\ttypeof RE === 'function' ||\n\n\t\t// Safari 8 returns 'object' for typed array and weak map constructors (underscore #1929):\n\t\ttypeof typedarray === 'object' ||\n\n\t\t// PhantomJS 1.9 returns 'function' for `NodeList` instances (underscore #2236):\n\t\ttypeof nodeList === 'function'\n\t) {\n\t\treturn true;\n\t}\n\treturn false;\n}\n\n\n// EXPORTS //\n\nexport default check;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport ctorName from '@stdlib/utils-constructor-name';\n\n\n// MAIN //\n\n/**\n* Determines a value's type.\n*\n* @param {*} v - input value\n* @returns {string} string indicating the value's type\n*/\nfunction typeOf( v ) {\n\treturn ctorName( v ).toLowerCase();\n}\n\n\n// EXPORTS //\n\nexport default typeOf;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport ctorName from '@stdlib/utils-constructor-name';\n\n\n// NOTES //\n\n/*\n* Built-in `typeof` operator behavior:\n*\n* ```text\n* typeof null => 'object'\n* typeof undefined => 'undefined'\n* typeof 'a' => 'string'\n* typeof 5 => 'number'\n* typeof NaN => 'number'\n* typeof true => 'boolean'\n* typeof false => 'boolean'\n* typeof {} => 'object'\n* typeof [] => 'object'\n* typeof function foo(){} => 'function'\n* typeof function* foo(){} => 'object'\n* typeof Symbol() => 'symbol'\n* ```\n*\n*/\n\n\n// MAIN //\n\n/**\n* Determines a value's type.\n*\n* @param {*} v - input value\n* @returns {string} string indicating the value's type\n*/\nfunction typeOf( v ) {\n\tvar type;\n\n\t// Address `typeof null` => `object` (see http://wiki.ecmascript.org/doku.php?id=harmony:typeof_null):\n\tif ( v === null ) {\n\t\treturn 'null';\n\t}\n\ttype = typeof v;\n\n\t// If the `typeof` operator returned something other than `object`, we are done. Otherwise, we need to check for an internal class name or search for a constructor.\n\tif ( type === 'object' ) {\n\t\treturn ctorName( v ).toLowerCase();\n\t}\n\treturn type;\n}\n\n\n// EXPORTS //\n\nexport default typeOf;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport typeOf from '@stdlib/utils-type-of';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a function.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a function\n*\n* @example\n* function beep() {\n* return 'beep';\n* }\n*\n* var bool = isFunction( beep );\n* // returns true\n*/\nfunction isFunction( value ) {\n\t// Note: cannot use `typeof` directly, as various browser engines incorrectly return `'function'` when operating on non-function objects, such as regular expressions and NodeLists.\n\treturn ( typeOf( value ) === 'function' );\n}\n\n\n// EXPORTS //\n\nexport default isFunction;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isNumber } from '@stdlib/assert-is-number';\nimport defineProperty from '@stdlib/utils-define-property';\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport format from '@stdlib/string-format';\nimport toStr from './tostring.js';\nimport toJSON from './tojson.js';\n\n\n// MAIN //\n\n/**\n* 128-bit complex number constructor.\n*\n* @constructor\n* @param {number} real - real component\n* @param {number} imag - imaginary component\n* @throws {TypeError} must invoke using the `new` keyword\n* @throws {TypeError} real component must be a number\n* @throws {TypeError} imaginary component must be a number\n* @returns {Complex128} 128-bit complex number\n*\n* @example\n* var z = new Complex128( 5.0, 3.0 );\n* // returns \n*/\nfunction Complex128( real, imag ) {\n\tif ( !( this instanceof Complex128 ) ) {\n\t\tthrow new TypeError( 'invalid invocation. Constructor must be called with the `new` keyword.' );\n\t}\n\tif ( !isNumber( real ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Real component must be a number. Value: `%s`.', real ) );\n\t}\n\tif ( !isNumber( imag ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Imaginary component must be a number. Value: `%s`.', imag ) );\n\t}\n\tdefineProperty( this, 're', {\n\t\t'configurable': false,\n\t\t'enumerable': true,\n\t\t'writable': false,\n\t\t'value': real\n\t});\n\tdefineProperty( this, 'im', {\n\t\t'configurable': false,\n\t\t'enumerable': true,\n\t\t'writable': false,\n\t\t'value': imag\n\t});\n\treturn this;\n}\n\n/**\n* Size (in bytes) of each component.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex128\n* @type {integer}\n* @returns {integer} size of each component\n*\n* @example\n* var nbytes = Complex128.BYTES_PER_ELEMENT;\n* // returns 8\n*/\nsetReadOnly( Complex128, 'BYTES_PER_ELEMENT', 8 );\n\n/**\n* Size (in bytes) of each component.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex128.prototype\n* @type {integer}\n* @returns {integer} size of each component\n*\n* @example\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var nbytes = z.BYTES_PER_ELEMENT;\n* // returns 8\n*/\nsetReadOnly( Complex128.prototype, 'BYTES_PER_ELEMENT', 8 );\n\n/**\n* Length (in bytes) of a complex number.\n*\n* @name byteLength\n* @memberof Complex128.prototype\n* @type {integer}\n* @returns {integer} byte length\n*\n* @example\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var nbytes = z.byteLength;\n* // returns 16\n*/\nsetReadOnly( Complex128.prototype, 'byteLength', 16 );\n\n/**\n* Serializes a complex number as a string.\n*\n* @name toString\n* @memberof Complex128.prototype\n* @type {Function}\n* @returns {string} serialized complex number\n*\n* @example\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var str = z.toString();\n* // returns '5 + 3i'\n*/\nsetReadOnly( Complex128.prototype, 'toString', toStr );\n\n/**\n* Serializes a complex number as a JSON object.\n*\n* ## Notes\n*\n* - `JSON.stringify()` implicitly calls this method when stringifying a `Complex128` instance.\n*\n* @name toJSON\n* @memberof Complex128.prototype\n* @type {Function}\n* @returns {Object} serialized complex number\n*\n* @example\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var obj = z.toJSON();\n* // returns { 'type': 'Complex128', 're': 5.0, 'im': 3.0 }\n*/\nsetReadOnly( Complex128.prototype, 'toJSON', toJSON );\n\n\n// EXPORTS //\n\nexport default Complex128;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Serializes a complex number as a string.\n*\n* @private\n* @returns {string} serialized complex number\n*/\nfunction toString() { // eslint-disable-line stdlib/no-redeclare\n\t/* eslint-disable no-invalid-this */\n\tvar str = '' + this.re;\n\tif ( this.im < 0 ) {\n\t\tstr += ' - ' + (-this.im);\n\t} else {\n\t\tstr += ' + ' + this.im;\n\t}\n\tstr += 'i';\n\treturn str;\n}\n\n\n// EXPORTS //\n\nexport default toString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Serializes a complex number as a JSON object.\n*\n* @private\n* @returns {Object} JSON representation\n*/\nfunction toJSON() {\n\t/* eslint-disable no-invalid-this */\n\tvar out = {};\n\tout.type = 'Complex128';\n\tout.re = this.re;\n\tout.im = this.im;\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default toJSON;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar fround = ( typeof Math.fround === 'function' ) ? Math.fround : null; // eslint-disable-line stdlib/no-builtin-math\n\n\n// EXPORTS //\n\nexport default fround;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport Float32Array from '@stdlib/array-float32';\n\n\n// VARIABLES //\n\nvar FLOAT32_VIEW = new Float32Array( 1 );\n\n\n// MAIN //\n\n/**\n* Converts a double-precision floating-point number to the nearest single-precision floating-point number.\n*\n* @param {number} x - double-precision floating-point number\n* @returns {number} nearest single-precision floating-point number\n*\n* @example\n* var y = float64ToFloat32( 1.337 );\n* // returns 1.3370000123977661\n*/\nfunction float64ToFloat32( x ) {\n\tFLOAT32_VIEW[ 0 ] = x;\n\treturn FLOAT32_VIEW[ 0 ];\n}\n\n\n// EXPORTS //\n\nexport default float64ToFloat32;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Convert a double-precision floating-point number to the nearest single-precision floating-point number.\n*\n* @module @stdlib/number-float64-base-to-float32\n*\n* @example\n* import float64ToFloat32 from '@stdlib/number-float64-base-to-float32';\n*\n* var y = float64ToFloat32( 1.337 );\n* // returns 1.3370000123977661\n*/\n\n// MODULES //\n\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar float64ToFloat32;\nif ( typeof builtin === 'function' ) {\n\tfloat64ToFloat32 = builtin;\n} else {\n\tfloat64ToFloat32 = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default float64ToFloat32;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isNumber } from '@stdlib/assert-is-number';\nimport defineProperty from '@stdlib/utils-define-property';\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport float64ToFloat32 from '@stdlib/number-float64-base-to-float32';\nimport format from '@stdlib/string-format';\nimport toStr from './tostring.js';\nimport toJSON from './tojson.js';\n\n\n// MAIN //\n\n/**\n* 64-bit complex number constructor.\n*\n* @constructor\n* @param {number} real - real component\n* @param {number} imag - imaginary component\n* @throws {TypeError} must invoke using the `new` keyword\n* @throws {TypeError} real component must be a number\n* @throws {TypeError} imaginary component must be a number\n* @returns {Complex64} 64-bit complex number\n*\n* @example\n* var z = new Complex64( 5.0, 3.0 );\n* // returns \n*/\nfunction Complex64( real, imag ) {\n\tif ( !( this instanceof Complex64 ) ) {\n\t\tthrow new TypeError( 'invalid invocation. Constructor must be called with the `new` keyword.' );\n\t}\n\tif ( !isNumber( real ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Real component must be a number. Value: `%s`.', real ) );\n\t}\n\tif ( !isNumber( imag ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Imaginary component must be a number. Value: `%s`.', imag ) );\n\t}\n\tdefineProperty( this, 're', {\n\t\t'configurable': false,\n\t\t'enumerable': true,\n\t\t'writable': false,\n\t\t'value': float64ToFloat32( real )\n\t});\n\tdefineProperty( this, 'im', {\n\t\t'configurable': false,\n\t\t'enumerable': true,\n\t\t'writable': false,\n\t\t'value': float64ToFloat32( imag )\n\t});\n\treturn this;\n}\n\n/**\n* Size (in bytes) of each component.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex64\n* @type {integer}\n* @returns {integer} size of each component\n*\n* @example\n* var nbytes = Complex64.BYTES_PER_ELEMENT;\n* // returns 4\n*/\nsetReadOnly( Complex64, 'BYTES_PER_ELEMENT', 4 );\n\n/**\n* Size (in bytes) of each component.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex64.prototype\n* @type {integer}\n* @returns {integer} size of each component\n*\n* @example\n* var z = new Complex64( 5.0, 3.0 );\n*\n* var nbytes = z.BYTES_PER_ELEMENT;\n* // returns 4\n*/\nsetReadOnly( Complex64.prototype, 'BYTES_PER_ELEMENT', 4 );\n\n/**\n* Length (in bytes) of a complex number.\n*\n* @name byteLength\n* @memberof Complex64.prototype\n* @type {integer}\n* @returns {integer} byte length\n*\n* @example\n* var z = new Complex64( 5.0, 3.0 );\n*\n* var nbytes = z.byteLength;\n* // returns 8\n*/\nsetReadOnly( Complex64.prototype, 'byteLength', 8 );\n\n/**\n* Serializes a complex number as a string.\n*\n* @name toString\n* @memberof Complex64.prototype\n* @type {Function}\n* @returns {string} serialized complex number\n*\n* @example\n* var z = new Complex64( 5.0, 3.0 );\n*\n* var str = z.toString();\n* // returns '5 + 3i'\n*/\nsetReadOnly( Complex64.prototype, 'toString', toStr );\n\n/**\n* Serializes a complex number as a JSON object.\n*\n* ## Notes\n*\n* - `JSON.stringify()` implicitly calls this method when stringifying a `Complex64` instance.\n*\n* @name toJSON\n* @memberof Complex64.prototype\n* @type {Function}\n* @returns {Object} serialized complex number\n*\n* @example\n* var z = new Complex64( 5.0, 3.0 );\n*\n* var obj = z.toJSON();\n* // returns { 'type': 'Complex64', 're': 5.0, 'im': 3.0 }\n*/\nsetReadOnly( Complex64.prototype, 'toJSON', toJSON );\n\n\n// EXPORTS //\n\nexport default Complex64;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport Complex128 from '@stdlib/complex-float64';\nimport Complex64 from '@stdlib/complex-float32';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a complex number-like object.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a complex number-like object.\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n* import Complex64 from '@stdlib/complex-float32';\n*\n* var x = new Complex128( 4.0, 2.0 );\n* var bool = isComplexLike( x );\n* // returns true\n*\n* x = new Complex64( 4.0, 2.0 );\n* bool = isComplexLike( x );\n* // returns true\n*/\nfunction isComplexLike( value ) {\n\tif ( value instanceof Complex128 || value instanceof Complex64 ) {\n\t\treturn true;\n\t}\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\ttypeof value.re === 'number' &&\n\t\ttypeof value.im === 'number'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isComplexLike;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isInteger from '@stdlib/math-base-assert-is-integer';\n\n\n// MAIN //\n\n/**\n* Tests if a finite numeric value is an even number.\n*\n* @param {number} x - value to test\n* @returns {boolean} boolean indicating whether the value is an even number\n*\n* @example\n* var bool = isEven( 5.0 );\n* // returns false\n*\n* @example\n* var bool = isEven( -2.0 );\n* // returns true\n*\n* @example\n* var bool = isEven( 0.0 );\n* // returns true\n*\n* @example\n* var bool = isEven( NaN );\n* // returns false\n*/\nfunction isEven( x ) {\n\treturn isInteger( x/2.0 );\n}\n\n\n// EXPORTS //\n\nexport default isEven;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport hasOwnProp from '@stdlib/assert-has-own-property';\nimport Symbol from '@stdlib/symbol-ctor';\n\n\n// MAIN //\n\n/**\n* Tests for native `Symbol.iterator` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Symbol.iterator` support\n*\n* @example\n* var bool = hasIteratorSymbolSupport();\n* // returns \n*/\nfunction hasIteratorSymbolSupport() {\n\treturn (\n\t\ttypeof Symbol === 'function' &&\n\t\ttypeof Symbol( 'foo' ) === 'symbol' &&\n\t\thasOwnProp( Symbol, 'iterator' ) &&\n\t\ttypeof Symbol.iterator === 'symbol'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default hasIteratorSymbolSupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Serializes a complex number as a string.\n*\n* @private\n* @returns {string} serialized complex number\n*/\nfunction toString() { // eslint-disable-line stdlib/no-redeclare\n\t/* eslint-disable no-invalid-this */\n\tvar str = '' + this.re;\n\tif ( this.im < 0 ) {\n\t\tstr += ' - ' + (-this.im);\n\t} else {\n\t\tstr += ' + ' + this.im;\n\t}\n\tstr += 'i';\n\treturn str;\n}\n\n\n// EXPORTS //\n\nexport default toString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Serializes a complex number as a JSON object.\n*\n* @private\n* @returns {Object} JSON representation\n*/\nfunction toJSON() {\n\t/* eslint-disable no-invalid-this */\n\tvar out = {};\n\tout.type = 'Complex64';\n\tout.re = this.re;\n\tout.im = this.im;\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default toJSON;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport hasIteratorSymbolSupport from '@stdlib/assert-has-iterator-symbol-support';\n\n\n// MAIN //\n\n/**\n* Iterator symbol.\n*\n* @name IteratorSymbol\n* @constant\n* @type {(symbol|null)}\n*\n* @example\n* function iterator() {\n* var it;\n* var i;\n*\n* i = -1;\n*\n* it = {};\n* it.next = next;\n* it.return = done;\n*\n* if ( IteratorSymbol ) {\n* it[ IteratorSymbol ] = iterator;\n* }\n* return it;\n*\n* function next() {\n* i += 1;\n* return {\n* 'value': i,\n* 'done': false\n* };\n* }\n*\n* function done( value ) {\n* if ( arguments.length === 0 ) {\n* return {\n* 'done': true\n* };\n* }\n* return {\n* 'value': value,\n* 'done': true\n* };\n* }\n* }\n*\n* var obj = iterator();\n*/\nvar IteratorSymbol = ( hasIteratorSymbolSupport() ) ? Symbol.iterator : null;\n\n\n// EXPORTS //\n\nexport default IteratorSymbol;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport defineProperty from '@stdlib/utils-define-property';\n\n\n// MAIN //\n\n/**\n* Defines a non-enumerable read-only accessor.\n*\n* @param {Object} obj - object on which to define the property\n* @param {(string|symbol)} prop - property name\n* @param {Function} getter - accessor\n*\n* @example\n* function getter() {\n* return 'bar';\n* }\n*\n* var obj = {};\n*\n* setNonEnumerableReadOnlyAccessor( obj, 'foo', getter );\n*\n* try {\n* obj.foo = 'boop';\n* } catch ( err ) {\n* console.error( err.message );\n* }\n*/\nfunction setNonEnumerableReadOnlyAccessor( obj, prop, getter ) { // eslint-disable-line id-length\n\tdefineProperty( obj, prop, {\n\t\t'configurable': false,\n\t\t'enumerable': false,\n\t\t'get': getter\n\t});\n}\n\n\n// EXPORTS //\n\nexport default setNonEnumerableReadOnlyAccessor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Returns the real component of a single-precision complex floating-point number.\n*\n* @param {Complex} z - complex number\n* @returns {number} real component\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n*\n* var z = new Complex64( 5.0, 3.0 );\n*\n* var re = realf( z );\n* // returns 5.0\n*/\nfunction realf( z ) {\n\treturn z.re;\n}\n\n\n// EXPORTS //\n\nexport default realf;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Returns the imaginary component of a single-precision complex floating-point number.\n*\n* @param {Complex} z - complex number\n* @returns {number} imaginary component\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n*\n* var z = new Complex64( 5.0, 3.0 );\n*\n* var im = imagf( z );\n* // returns 3.0\n*/\nfunction imagf( z ) {\n\treturn z.im;\n}\n\n\n// EXPORTS //\n\nexport default imagf;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport Float32Array from '@stdlib/array-float32';\n\n\n// MAIN //\n\n/**\n* Reinterprets a `Complex64Array` as a `Float32Array`.\n*\n* @param {Complex64Array} x - input array\n* @param {NonNegativeInteger} offset - starting index\n* @returns {Float32Array} `Float32Array` view\n*\n* @example\n* import Complex64Array from '@stdlib/array-complex64';\n*\n* var x = new Complex64Array( 10 );\n*\n* var out = reinterpret( x, 0 );\n* // returns \n*\n* var bool = ( out.buffer === x.buffer );\n* // returns true\n*/\nfunction reinterpret( x, offset ) {\n\treturn new Float32Array( x.buffer, x.byteOffset+(x.BYTES_PER_ELEMENT*offset), 2*(x.length-offset) ); // eslint-disable-line max-len\n}\n\n\n// EXPORTS //\n\nexport default reinterpret;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport Float64Array from '@stdlib/array-float64';\n\n\n// MAIN //\n\n/**\n* Reinterprets a `Complex128Array` as a `Float64Array`.\n*\n* @param {Complex128Array} x - input array\n* @param {NonNegativeInteger} offset - starting index\n* @returns {Float64Array} `Float64Array` view\n*\n* @example\n* import Complex128Array from '@stdlib/array-complex128';\n*\n* var x = new Complex128Array( 10 );\n*\n* var out = reinterpret( x, 0 );\n* // returns \n*\n* var bool = ( out.buffer === x.buffer );\n* // returns true\n*/\nfunction reinterpret( x, offset ) {\n\treturn new Float64Array( x.buffer, x.byteOffset+(x.BYTES_PER_ELEMENT*offset), 2*(x.length-offset) ); // eslint-disable-line max-len\n}\n\n\n// EXPORTS //\n\nexport default reinterpret;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// VARIABLES //\n\nvar GETTERS = {\n\t'float64': getFloat64,\n\t'float32': getFloat32,\n\t'int32': getInt32,\n\t'int16': getInt16,\n\t'int8': getInt8,\n\t'uint32': getUint32,\n\t'uint16': getUint16,\n\t'uint8': getUint8,\n\t'uint8c': getUint8c,\n\t'generic': getGeneric,\n\t'default': getArrayLike\n};\n\n\n// FUNCTIONS //\n\n/**\n* Returns an element from a `Float64Array`.\n*\n* @private\n* @param {Float64Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n*\n* var arr = new Float64Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getFloat64( arr, 2 );\n* // returns 3.0\n*/\nfunction getFloat64( arr, idx ) {\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from a `Float32Array`.\n*\n* @private\n* @param {Float32Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Float32Array from '@stdlib/array-float32';\n*\n* var arr = new Float32Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getFloat32( arr, 2 );\n* // returns 3.0\n*/\nfunction getFloat32( arr, idx ) {\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from an `Int32Array`.\n*\n* @private\n* @param {Int32Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Int32Array from '@stdlib/array-int32';\n*\n* var arr = new Int32Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getInt32( arr, 2 );\n* // returns 3\n*/\nfunction getInt32( arr, idx ) { // eslint-disable-line stdlib/jsdoc-doctest-decimal-point\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from an `Int16Array`.\n*\n* @private\n* @param {Int16Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Int16Array from '@stdlib/array-int16';\n*\n* var arr = new Int16Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getInt16( arr, 2 );\n* // returns 3\n*/\nfunction getInt16( arr, idx ) { // eslint-disable-line stdlib/jsdoc-doctest-decimal-point\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from an `Int8Array`.\n*\n* @private\n* @param {Int8Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Int8Array from '@stdlib/array-int8';\n*\n* var arr = new Int8Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getInt8( arr, 2 );\n* // returns 3\n*/\nfunction getInt8( arr, idx ) { // eslint-disable-line stdlib/jsdoc-doctest-decimal-point\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from a `Uint32Array`.\n*\n* @private\n* @param {Uint32Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Uint32Array from '@stdlib/array-uint32';\n*\n* var arr = new Uint32Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getUint32( arr, 2 );\n* // returns 3\n*/\nfunction getUint32( arr, idx ) { // eslint-disable-line stdlib/jsdoc-doctest-decimal-point\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from a `Uint16Array`.\n*\n* @private\n* @param {Uint16Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Uint16Array from '@stdlib/array-uint16';\n*\n* var arr = new Uint16Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getUint16( arr, 2 );\n* // returns 3\n*/\nfunction getUint16( arr, idx ) { // eslint-disable-line stdlib/jsdoc-doctest-decimal-point\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from a `Uint8Array`.\n*\n* @private\n* @param {Uint8Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Uint8Array from '@stdlib/array-uint8';\n*\n* var arr = new Uint8Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getUint8( arr, 2 );\n* // returns 3\n*/\nfunction getUint8( arr, idx ) { // eslint-disable-line stdlib/jsdoc-doctest-decimal-point\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from a `Uint8ClampedArray`.\n*\n* @private\n* @param {Uint8ClampedArray} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Uint8ClampedArray from '@stdlib/array-uint8c';\n*\n* var arr = new Uint8ClampedArray( [ 1, 2, 3, 4 ] );\n*\n* var v = getUint8c( arr, 2 );\n* // returns 3\n*/\nfunction getUint8c( arr, idx ) { // eslint-disable-line stdlib/jsdoc-doctest-decimal-point\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from a generic `Array`.\n*\n* @private\n* @param {Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {*} element value\n*\n* @example\n* var arr = [ 1, 2, 3, 4 ];\n*\n* var v = getGeneric( arr, 2 );\n* // returns 3\n*/\nfunction getGeneric( arr, idx ) {\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from an indexed array-like object.\n*\n* @private\n* @param {Collection} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {*} element value\n*\n* @example\n* var arr = [ 1, 2, 3, 4 ];\n*\n* var v = getArrayLike( arr, 2 );\n* // returns 3\n*/\nfunction getArrayLike( arr, idx ) {\n\treturn arr[ idx ];\n}\n\n\n// MAIN //\n\n/**\n* Returns an accessor function for retrieving an element from an indexed array-like object.\n*\n* @param {string} dtype - array dtype\n* @returns {Function} accessor\n*\n* @example\n* import dtype from '@stdlib/array-dtype';\n*\n* var arr = [ 1, 2, 3, 4 ];\n*\n* var get = getter( dtype( arr ) );\n* var v = get( arr, 2 );\n* // returns 3\n*/\nfunction getter( dtype ) {\n\tvar f = GETTERS[ dtype ];\n\tif ( typeof f === 'function' ) {\n\t\treturn f;\n\t}\n\treturn GETTERS.default;\n}\n\n\n// EXPORTS //\n\nexport default getter;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// VARIABLES //\n\nvar GETTERS = {\n\t'complex128': getComplex128,\n\t'complex64': getComplex64,\n\t'default': getArrayLike\n};\n\n\n// FUNCTIONS //\n\n/**\n* Returns an element from a `Complex128Array`.\n*\n* @private\n* @param {Complex128Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Complex128Array from '@stdlib/array-complex128';\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* var arr = new Complex128Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getComplex128( arr, 1 );\n* // returns \n*\n* var re = real( v );\n* // returns 3.0\n*\n* var im = imag( v );\n* // returns 4.0\n*/\nfunction getComplex128( arr, idx ) {\n\treturn arr.get( idx );\n}\n\n/**\n* Returns an element from a `Complex64Array`.\n*\n* @private\n* @param {Complex64Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Complex64Array from '@stdlib/array-complex64';\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* var arr = new Complex64Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getComplex64( arr, 1 );\n* // returns \n*\n* var re = realf( v );\n* // returns 3.0\n*\n* var im = imagf( v );\n* // returns 4.0\n*/\nfunction getComplex64( arr, idx ) {\n\treturn arr.get( idx );\n}\n\n/**\n* Returns an element from an array-like object supporting the get/set protocol.\n*\n* @private\n* @param {Collection} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {*} element value\n*\n* @example\n* var arr = [ 1, 2, 3, 4 ];\n*\n* function get( idx ) {\n* return arr[ idx ];\n* }\n*\n* function set( value, idx ) {\n* arr[ idx ] = value;\n* }\n*\n* arr.get = get;\n* arr.set = set;\n*\n* var v = getArrayLike( arr, 2 );\n* // returns 3\n*/\nfunction getArrayLike( arr, idx ) {\n\treturn arr.get( idx );\n}\n\n\n// MAIN //\n\n/**\n* Returns an accessor function for retrieving an element from an array-like object supporting the get/set protocol.\n*\n* @param {string} dtype - array dtype\n* @returns {Function} accessor\n*\n* @example\n* import Complex64Array from '@stdlib/array-complex64';\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n* import dtype from '@stdlib/array-dtype';\n*\n* var arr = new Complex64Array( [ 1, 2, 3, 4 ] );\n*\n* var get = getter( dtype( arr ) );\n* var v = get( arr, 1 );\n* // returns \n*\n* var re = realf( v );\n* // returns 3.0\n*\n* var im = imagf( v );\n* // returns 4.0\n*/\nfunction getter( dtype ) {\n\tvar f = GETTERS[ dtype ];\n\tif ( typeof f === 'function' ) {\n\t\treturn f;\n\t}\n\treturn GETTERS.default;\n}\n\n\n// EXPORTS //\n\nexport default getter;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isArrayLikeObject from '@stdlib/assert-is-array-like-object';\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport realf from '@stdlib/complex-realf';\nimport imagf from '@stdlib/complex-imagf';\nimport format from '@stdlib/string-format';\n\n\n// MAIN //\n\n/**\n* Returns an array of iterated values.\n*\n* @private\n* @param {Object} it - iterator\n* @returns {(Array|TypeError)} array or an error\n*/\nfunction fromIterator( it ) {\n\tvar out;\n\tvar v;\n\tvar z;\n\n\tout = [];\n\twhile ( true ) {\n\t\tv = it.next();\n\t\tif ( v.done ) {\n\t\t\tbreak;\n\t\t}\n\t\tz = v.value;\n\t\tif ( isArrayLikeObject( z ) && z.length >= 2 ) {\n\t\t\tout.push( z[ 0 ], z[ 1 ] );\n\t\t} else if ( isComplexLike( z ) ) {\n\t\t\tout.push( realf( z ), imagf( z ) );\n\t\t} else {\n\t\t\treturn new TypeError( format( 'invalid argument. An iterator must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', z ) );\n\t\t}\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default fromIterator;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isArrayLikeObject from '@stdlib/assert-is-array-like-object';\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport realf from '@stdlib/complex-realf';\nimport imagf from '@stdlib/complex-imagf';\nimport format from '@stdlib/string-format';\n\n\n// MAIN //\n\n/**\n* Returns an array of iterated values.\n*\n* @private\n* @param {Object} it - iterator\n* @param {Function} clbk - callback to invoke for each iterated value\n* @param {*} thisArg - invocation context\n* @returns {(Array|TypeError)} array or an error\n*/\nfunction fromIteratorMap( it, clbk, thisArg ) {\n\tvar out;\n\tvar v;\n\tvar z;\n\tvar i;\n\n\tout = [];\n\ti = -1;\n\twhile ( true ) {\n\t\tv = it.next();\n\t\tif ( v.done ) {\n\t\t\tbreak;\n\t\t}\n\t\ti += 1;\n\t\tz = clbk.call( thisArg, v.value, i );\n\t\tif ( isArrayLikeObject( z ) && z.length >= 2 ) {\n\t\t\tout.push( z[ 0 ], z[ 1 ] );\n\t\t} else if ( isComplexLike( z ) ) {\n\t\t\tout.push( realf( z ), imagf( z ) );\n\t\t} else {\n\t\t\treturn new TypeError( format( 'invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', z ) );\n\t\t}\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default fromIteratorMap;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport realf from '@stdlib/complex-realf';\nimport imagf from '@stdlib/complex-imagf';\n\n\n// MAIN //\n\n/**\n* Returns a strided array of real and imaginary components.\n*\n* @private\n* @param {Float32Array} buf - output array\n* @param {Array} arr - array containing complex numbers\n* @returns {(Float32Array|null)} output array or null\n*/\nfunction fromArray( buf, arr ) {\n\tvar len;\n\tvar v;\n\tvar i;\n\tvar j;\n\n\tlen = arr.length;\n\tj = 0;\n\tfor ( i = 0; i < len; i++ ) {\n\t\tv = arr[ i ];\n\t\tif ( !isComplexLike( v ) ) {\n\t\t\treturn null;\n\t\t}\n\t\tbuf[ j ] = realf( v );\n\t\tbuf[ j+1 ] = imagf( v );\n\t\tj += 2; // stride\n\t}\n\treturn buf;\n}\n\n\n// EXPORTS //\n\nexport default fromArray;\n","/* eslint-disable no-restricted-syntax, max-lines, no-invalid-this */\n\n/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isNonNegativeInteger } from '@stdlib/assert-is-nonnegative-integer';\nimport isArrayLikeObject from '@stdlib/assert-is-array-like-object';\nimport isCollection from '@stdlib/assert-is-collection';\nimport isArrayBuffer from '@stdlib/assert-is-arraybuffer';\nimport isObject from '@stdlib/assert-is-object';\nimport isArray from '@stdlib/assert-is-array';\nimport isFunction from '@stdlib/assert-is-function';\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport isEven from '@stdlib/math-base-assert-is-even';\nimport isInteger from '@stdlib/math-base-assert-is-integer';\nimport hasIteratorSymbolSupport from '@stdlib/assert-has-iterator-symbol-support';\nimport ITERATOR_SYMBOL from '@stdlib/symbol-iterator';\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport setReadOnlyAccessor from '@stdlib/utils-define-nonenumerable-read-only-accessor';\nimport Float32Array from '@stdlib/array-float32';\nimport Complex64 from '@stdlib/complex-float32';\nimport format from '@stdlib/string-format';\nimport realf from '@stdlib/complex-realf';\nimport imagf from '@stdlib/complex-imagf';\nimport reinterpret64 from '@stdlib/strided-base-reinterpret-complex64';\nimport reinterpret128 from '@stdlib/strided-base-reinterpret-complex128';\nimport getter from '@stdlib/array-base-getter';\nimport accessorGetter from '@stdlib/array-base-accessor-getter';\nimport fromIterator from './from_iterator.js';\nimport fromIteratorMap from './from_iterator_map.js';\nimport fromArray from './from_array.js';\n\n\n// VARIABLES //\n\nvar BYTES_PER_ELEMENT = Float32Array.BYTES_PER_ELEMENT * 2;\nvar HAS_ITERATOR_SYMBOL = hasIteratorSymbolSupport();\n\n\n// FUNCTIONS //\n\n/**\n* Returns a boolean indicating if a value is a complex typed array.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a complex typed array\n*/\nfunction isComplexArray( value ) {\n\treturn (\n\t\tvalue instanceof Complex64Array ||\n\t\t(\n\t\t\ttypeof value === 'object' &&\n\t\t\tvalue !== null &&\n\t\t\t(\n\t\t\t\tvalue.constructor.name === 'Complex64Array' ||\n\t\t\t\tvalue.constructor.name === 'Complex128Array'\n\t\t\t) &&\n\t\t\ttypeof value._length === 'number' && // eslint-disable-line no-underscore-dangle\n\n\t\t\t// NOTE: we don't perform a more rigorous test here for a typed array for performance reasons, as robustly checking for a typed array instance could require walking the prototype tree and performing relatively expensive constructor checks...\n\t\t\ttypeof value._buffer === 'object' // eslint-disable-line no-underscore-dangle\n\t\t)\n\t);\n}\n\n/**\n* Returns a boolean indicating if a value is a complex typed array constructor.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a complex typed array constructor\n*/\nfunction isComplexArrayConstructor( value ) {\n\treturn (\n\t\tvalue === Complex64Array ||\n\n\t\t// NOTE: weaker test in order to avoid a circular dependency with Complex128Array...\n\t\tvalue.name === 'Complex128Array'\n\t);\n}\n\n/**\n* Returns a boolean indicating if a value is a `Complex64Array`.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a `Complex64Array`\n*/\nfunction isComplex64Array( value ) {\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\tvalue.constructor.name === 'Complex64Array' &&\n\t\tvalue.BYTES_PER_ELEMENT === BYTES_PER_ELEMENT\n\t);\n}\n\n/**\n* Returns a boolean indicating if a value is a `Complex128Array`.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a `Complex128Array`\n*/\nfunction isComplex128Array( value ) {\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\tvalue.constructor.name === 'Complex128Array' &&\n\t\tvalue.BYTES_PER_ELEMENT === BYTES_PER_ELEMENT*2\n\t);\n}\n\n\n// MAIN //\n\n/**\n* 64-bit complex number array constructor.\n*\n* @constructor\n* @param {(NonNegativeInteger|Collection|ArrayBuffer|Iterable)} [arg] - length, typed array, array-like object, buffer, or an iterable\n* @param {NonNegativeInteger} [byteOffset=0] - byte offset\n* @param {NonNegativeInteger} [length] - view length\n* @throws {RangeError} ArrayBuffer byte length must be a multiple of `8`\n* @throws {RangeError} array-like object and typed array input arguments must have a length which is a multiple of two\n* @throws {TypeError} if provided only a single argument, must provide a valid argument\n* @throws {TypeError} byte offset must be a nonnegative integer\n* @throws {RangeError} byte offset must be a multiple of `8`\n* @throws {TypeError} view length must be a positive multiple of `8`\n* @throws {RangeError} must provide sufficient memory to accommodate byte offset and view length requirements\n* @throws {TypeError} an iterator must return either a two element array containing real and imaginary components or a complex number\n* @returns {Complex64Array} complex number array\n*\n* @example\n* var arr = new Complex64Array();\n* // returns \n*\n* var len = arr.length;\n* // returns 0\n*\n* @example\n* var arr = new Complex64Array( 2 );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*\n* @example\n* var arr = new Complex64Array( [ 1.0, -1.0 ] );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* import ArrayBuffer from '@stdlib/array-buffer';\n*\n* var buf = new ArrayBuffer( 16 );\n* var arr = new Complex64Array( buf );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*\n* @example\n* import ArrayBuffer from '@stdlib/array-buffer';\n*\n* var buf = new ArrayBuffer( 16 );\n* var arr = new Complex64Array( buf, 8 );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* import ArrayBuffer from '@stdlib/array-buffer';\n*\n* var buf = new ArrayBuffer( 32 );\n* var arr = new Complex64Array( buf, 8, 2 );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*/\nfunction Complex64Array() {\n\tvar byteOffset;\n\tvar nargs;\n\tvar buf;\n\tvar len;\n\n\tnargs = arguments.length;\n\tif ( !(this instanceof Complex64Array) ) {\n\t\tif ( nargs === 0 ) {\n\t\t\treturn new Complex64Array();\n\t\t}\n\t\tif ( nargs === 1 ) {\n\t\t\treturn new Complex64Array( arguments[0] );\n\t\t}\n\t\tif ( nargs === 2 ) {\n\t\t\treturn new Complex64Array( arguments[0], arguments[1] );\n\t\t}\n\t\treturn new Complex64Array( arguments[0], arguments[1], arguments[2] );\n\t}\n\t// Create the underlying data buffer...\n\tif ( nargs === 0 ) {\n\t\tbuf = new Float32Array( 0 ); // backward-compatibility\n\t} else if ( nargs === 1 ) {\n\t\tif ( isNonNegativeInteger( arguments[0] ) ) {\n\t\t\tbuf = new Float32Array( arguments[0]*2 );\n\t\t} else if ( isCollection( arguments[0] ) ) {\n\t\t\tbuf = arguments[ 0 ];\n\t\t\tlen = buf.length;\n\n\t\t\t// If provided a \"generic\" array, peak at the first value, and, if the value is a complex number, try to process as an array of complex numbers, falling back to \"normal\" typed array initialization if we fail and ensuring consistency if the first value had not been a complex number...\n\t\t\tif ( len && isArray( buf ) && isComplexLike( buf[0] ) ) {\n\t\t\t\tbuf = fromArray( new Float32Array( len*2 ), buf );\n\t\t\t\tif ( buf === null ) {\n\t\t\t\t\t// We failed and we are now forced to allocate a new array :-(\n\t\t\t\t\tif ( !isEven( len ) ) {\n\t\t\t\t\t\tthrow new RangeError( format( 'invalid argument. Array-like object arguments must have a length which is a multiple of two. Length: `%u`.', len ) );\n\t\t\t\t\t}\n\t\t\t\t\t// We failed, so fall back to directly setting values...\n\t\t\t\t\tbuf = new Float32Array( arguments[0] );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ( isComplex64Array( buf ) ) {\n\t\t\t\t\tbuf = reinterpret64( buf, 0 );\n\t\t\t\t} else if ( isComplex128Array( buf ) ) {\n\t\t\t\t\tbuf = reinterpret128( buf, 0 );\n\t\t\t\t} else if ( !isEven( len ) ) {\n\t\t\t\t\tthrow new RangeError( format( 'invalid argument. Array-like object and typed array arguments must have a length which is a multiple of two. Length: `%u`.', len ) );\n\t\t\t\t}\n\t\t\t\tbuf = new Float32Array( buf );\n\t\t\t}\n\t\t} else if ( isArrayBuffer( arguments[0] ) ) {\n\t\t\tbuf = arguments[ 0 ];\n\t\t\tif ( !isInteger( buf.byteLength/BYTES_PER_ELEMENT ) ) {\n\t\t\t\tthrow new RangeError( format( 'invalid argument. ArrayBuffer byte length must be a multiple of %u. Byte length: `%u`.', BYTES_PER_ELEMENT, buf.byteLength ) );\n\t\t\t}\n\t\t\tbuf = new Float32Array( buf );\n\t\t} else if ( isObject( arguments[0] ) ) {\n\t\t\tbuf = arguments[ 0 ];\n\t\t\tif ( HAS_ITERATOR_SYMBOL === false ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Environment lacks Symbol.iterator support. Must provide a length, ArrayBuffer, typed array, or array-like object. Value: `%s`.', buf ) );\n\t\t\t}\n\t\t\tif ( !isFunction( buf[ ITERATOR_SYMBOL ] ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.', buf ) );\n\t\t\t}\n\t\t\tbuf = buf[ ITERATOR_SYMBOL ]();\n\t\t\tif ( !isFunction( buf.next ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.', buf ) );\n\t\t\t}\n\t\t\tbuf = fromIterator( buf );\n\t\t\tif ( buf instanceof Error ) {\n\t\t\t\tthrow buf;\n\t\t\t}\n\t\t\tbuf = new Float32Array( buf );\n\t\t} else {\n\t\t\tthrow new TypeError( format( 'invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.', arguments[0] ) );\n\t\t}\n\t} else {\n\t\tbuf = arguments[ 0 ];\n\t\tif ( !isArrayBuffer( buf ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. First argument must be an ArrayBuffer. Value: `%s`.', buf ) );\n\t\t}\n\t\tbyteOffset = arguments[ 1 ];\n\t\tif ( !isNonNegativeInteger( byteOffset ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Byte offset must be a nonnegative integer. Value: `%s`.', byteOffset ) );\n\t\t}\n\t\tif ( !isInteger( byteOffset/BYTES_PER_ELEMENT ) ) {\n\t\t\tthrow new RangeError( format( 'invalid argument. Byte offset must be a multiple of %u. Value: `%u`.', BYTES_PER_ELEMENT, byteOffset ) );\n\t\t}\n\t\tif ( nargs === 2 ) {\n\t\t\tlen = buf.byteLength - byteOffset;\n\t\t\tif ( !isInteger( len/BYTES_PER_ELEMENT ) ) {\n\t\t\t\tthrow new RangeError( format( 'invalid arguments. ArrayBuffer view byte length must be a multiple of %u. View byte length: `%u`.', BYTES_PER_ELEMENT, len ) );\n\t\t\t}\n\t\t\tbuf = new Float32Array( buf, byteOffset );\n\t\t} else {\n\t\t\tlen = arguments[ 2 ];\n\t\t\tif ( !isNonNegativeInteger( len ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Length must be a nonnegative integer. Value: `%s`.', len ) );\n\t\t\t}\n\t\t\tif ( (len*BYTES_PER_ELEMENT) > (buf.byteLength-byteOffset) ) {\n\t\t\t\tthrow new RangeError( format( 'invalid arguments. ArrayBuffer has insufficient capacity. Either decrease the array length or provide a bigger buffer. Minimum capacity: `%u`.', len*BYTES_PER_ELEMENT ) );\n\t\t\t}\n\t\t\tbuf = new Float32Array( buf, byteOffset, len*2 );\n\t\t}\n\t}\n\tsetReadOnly( this, '_buffer', buf );\n\tsetReadOnly( this, '_length', buf.length/2 );\n\n\treturn this;\n}\n\n/**\n* Size (in bytes) of each array element.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex64Array\n* @readonly\n* @type {PositiveInteger}\n* @default 8\n*\n* @example\n* var nbytes = Complex64Array.BYTES_PER_ELEMENT;\n* // returns 8\n*/\nsetReadOnly( Complex64Array, 'BYTES_PER_ELEMENT', BYTES_PER_ELEMENT );\n\n/**\n* Constructor name.\n*\n* @name name\n* @memberof Complex64Array\n* @readonly\n* @type {string}\n* @default 'Complex64Array'\n*\n* @example\n* var str = Complex64Array.name;\n* // returns 'Complex64Array'\n*/\nsetReadOnly( Complex64Array, 'name', 'Complex64Array' );\n\n/**\n* Creates a new 64-bit complex number array from an array-like object or an iterable.\n*\n* @name from\n* @memberof Complex64Array\n* @type {Function}\n* @param {(Collection|Iterable)} src - array-like object or iterable\n* @param {Function} [clbk] - callback to invoke for each source element\n* @param {*} [thisArg] - context\n* @throws {TypeError} `this` context must be a constructor\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be an array-like object or an iterable\n* @throws {TypeError} second argument must be a function\n* @throws {RangeError} array-like objects must have a length which is a multiple of two\n* @throws {TypeError} an iterator must return either a two element array containing real and imaginary components or a complex number\n* @throws {TypeError} when provided an iterator, a callback must return either a two element array containing real and imaginary components or a complex number\n* @returns {Complex64Array} 64-bit complex number array\n*\n* @example\n* var arr = Complex64Array.from( [ 1.0, -1.0 ] );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n*\n* var arr = Complex64Array.from( [ new Complex64( 1.0, 1.0 ) ] );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* function clbk( v ) {\n* return new Complex64( realf(v)*2.0, imagf(v)*2.0 );\n* }\n*\n* var arr = Complex64Array.from( [ new Complex64( 1.0, 1.0 ) ], clbk );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*/\nsetReadOnly( Complex64Array, 'from', function from( src ) {\n\tvar thisArg;\n\tvar nargs;\n\tvar clbk;\n\tvar out;\n\tvar buf;\n\tvar tmp;\n\tvar get;\n\tvar len;\n\tvar flg;\n\tvar v;\n\tvar i;\n\tvar j;\n\tif ( !isFunction( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` context must be a constructor.' );\n\t}\n\tif ( !isComplexArrayConstructor( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tnargs = arguments.length;\n\tif ( nargs > 1 ) {\n\t\tclbk = arguments[ 1 ];\n\t\tif ( !isFunction( clbk ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be a function. Value: `%s`.', clbk ) );\n\t\t}\n\t\tif ( nargs > 2 ) {\n\t\t\tthisArg = arguments[ 2 ];\n\t\t}\n\t}\n\tif ( isComplexArray( src ) ) {\n\t\tlen = src.length;\n\t\tif ( clbk ) {\n\t\t\tout = new this( len );\n\t\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\t\tj = 0;\n\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\tv = clbk.call( thisArg, src.get( i ), i );\n\t\t\t\tif ( isComplexLike( v ) ) {\n\t\t\t\t\tbuf[ j ] = realf( v );\n\t\t\t\t\tbuf[ j+1 ] = imagf( v );\n\t\t\t\t} else if ( isArrayLikeObject( v ) && v.length >= 2 ) {\n\t\t\t\t\tbuf[ j ] = v[ 0 ];\n\t\t\t\t\tbuf[ j+1 ] = v[ 1 ];\n\t\t\t\t} else {\n\t\t\t\t\tthrow new TypeError( format( 'invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', v ) );\n\t\t\t\t}\n\t\t\t\tj += 2; // stride\n\t\t\t}\n\t\t\treturn out;\n\t\t}\n\t\treturn new this( src );\n\t}\n\tif ( isCollection( src ) ) {\n\t\tif ( clbk ) {\n\t\t\t// Note: array contents affect how we iterate over a provided data source. If only complex number objects, we can extract real and imaginary components. Otherwise, for non-complex number arrays (e.g., `Float64Array`, etc), we assume a strided array where real and imaginary components are interleaved. In the former case, we expect a callback to return real and imaginary components (possibly as a complex number). In the latter case, we expect a callback to return *either* a real or imaginary component.\n\n\t\t\tlen = src.length;\n\t\t\tif ( src.get && src.set ) {\n\t\t\t\tget = accessorGetter( 'default' );\n\t\t\t} else {\n\t\t\t\tget = getter( 'default' );\n\t\t\t}\n\t\t\t// Detect whether we've been provided an array which returns complex number objects...\n\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\tif ( !isComplexLike( get( src, i ) ) ) {\n\t\t\t\t\tflg = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// If an array does not contain only complex number objects, then we assume interleaved real and imaginary components...\n\t\t\tif ( flg ) {\n\t\t\t\tif ( !isEven( len ) ) {\n\t\t\t\t\tthrow new RangeError( format( 'invalid argument. First argument must have a length which is a multiple of %u. Length: `%u`.', 2, len ) );\n\t\t\t\t}\n\t\t\t\tout = new this( len/2 );\n\t\t\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\t\tbuf[ i ] = clbk.call( thisArg, get( src, i ), i );\n\t\t\t\t}\n\t\t\t\treturn out;\n\t\t\t}\n\t\t\t// If an array contains only complex number objects, then we need to extract real and imaginary components...\n\t\t\tout = new this( len );\n\t\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\t\tj = 0;\n\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\tv = clbk.call( thisArg, get( src, i ), i );\n\t\t\t\tif ( isComplexLike( v ) ) {\n\t\t\t\t\tbuf[ j ] = realf( v );\n\t\t\t\t\tbuf[ j+1 ] = imagf( v );\n\t\t\t\t} else if ( isArrayLikeObject( v ) && v.length >= 2 ) {\n\t\t\t\t\tbuf[ j ] = v[ 0 ];\n\t\t\t\t\tbuf[ j+1 ] = v[ 1 ];\n\t\t\t\t} else {\n\t\t\t\t\tthrow new TypeError( format( 'invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', v ) );\n\t\t\t\t}\n\t\t\t\tj += 2; // stride\n\t\t\t}\n\t\t\treturn out;\n\t\t}\n\t\treturn new this( src );\n\t}\n\tif ( isObject( src ) && HAS_ITERATOR_SYMBOL && isFunction( src[ ITERATOR_SYMBOL ] ) ) { // eslint-disable-line max-len\n\t\tbuf = src[ ITERATOR_SYMBOL ]();\n\t\tif ( !isFunction( buf.next ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.', src ) );\n\t\t}\n\t\tif ( clbk ) {\n\t\t\ttmp = fromIteratorMap( buf, clbk, thisArg );\n\t\t} else {\n\t\t\ttmp = fromIterator( buf );\n\t\t}\n\t\tif ( tmp instanceof Error ) {\n\t\t\tthrow tmp;\n\t\t}\n\t\tlen = tmp.length / 2;\n\t\tout = new this( len );\n\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\tbuf[ i ] = tmp[ i ];\n\t\t}\n\t\treturn out;\n\t}\n\tthrow new TypeError( format( 'invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.', src ) );\n});\n\n/**\n* Creates a new 64-bit complex number array from a variable number of arguments.\n*\n* @name of\n* @memberof Complex64Array\n* @type {Function}\n* @param {...*} element - array elements\n* @throws {TypeError} `this` context must be a constructor\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Complex64Array} 64-bit complex number array\n*\n* @example\n* var arr = Complex64Array.of( 1.0, 1.0, 1.0, 1.0 );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*/\nsetReadOnly( Complex64Array, 'of', function of() {\n\tvar args;\n\tvar i;\n\tif ( !isFunction( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` context must be a constructor.' );\n\t}\n\tif ( !isComplexArrayConstructor( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\targs = [];\n\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\targs.push( arguments[ i ] );\n\t}\n\treturn new this( args );\n});\n\n/**\n* Pointer to the underlying data buffer.\n*\n* @name buffer\n* @memberof Complex64Array.prototype\n* @readonly\n* @type {ArrayBuffer}\n*\n* @example\n* var arr = new Complex64Array( 10 );\n*\n* var buf = arr.buffer;\n* // returns \n*/\nsetReadOnlyAccessor( Complex64Array.prototype, 'buffer', function get() {\n\treturn this._buffer.buffer;\n});\n\n/**\n* Size (in bytes) of the array.\n*\n* @name byteLength\n* @memberof Complex64Array.prototype\n* @readonly\n* @type {NonNegativeInteger}\n*\n* @example\n* var arr = new Complex64Array( 10 );\n*\n* var byteLength = arr.byteLength;\n* // returns 80\n*/\nsetReadOnlyAccessor( Complex64Array.prototype, 'byteLength', function get() {\n\treturn this._buffer.byteLength;\n});\n\n/**\n* Offset (in bytes) of the array from the start of its underlying `ArrayBuffer`.\n*\n* @name byteOffset\n* @memberof Complex64Array.prototype\n* @readonly\n* @type {NonNegativeInteger}\n*\n* @example\n* var arr = new Complex64Array( 10 );\n*\n* var byteOffset = arr.byteOffset;\n* // returns 0\n*/\nsetReadOnlyAccessor( Complex64Array.prototype, 'byteOffset', function get() {\n\treturn this._buffer.byteOffset;\n});\n\n/**\n* Size (in bytes) of each array element.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex64Array.prototype\n* @readonly\n* @type {PositiveInteger}\n* @default 8\n*\n* @example\n* var arr = new Complex64Array( 10 );\n*\n* var nbytes = arr.BYTES_PER_ELEMENT;\n* // returns 8\n*/\nsetReadOnly( Complex64Array.prototype, 'BYTES_PER_ELEMENT', Complex64Array.BYTES_PER_ELEMENT );\n\n/**\n* Copies a sequence of elements within the array to the position starting at `target`.\n*\n* @name copyWithin\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {integer} target - index at which to start copying elements\n* @param {integer} start - source index at which to copy elements from\n* @param {integer} [end] - source index at which to stop copying elements from\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Complex64Array} modified array\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* var arr = new Complex64Array( 4 );\n*\n* // Set the array elements:\n* arr.set( new Complex64( 1.0, 1.0 ), 0 );\n* arr.set( new Complex64( 2.0, 2.0 ), 1 );\n* arr.set( new Complex64( 3.0, 3.0 ), 2 );\n* arr.set( new Complex64( 4.0, 4.0 ), 3 );\n*\n* // Copy the first two elements to the last two elements:\n* arr.copyWithin( 2, 0, 2 );\n*\n* // Get the last array element:\n* var z = arr.get( 3 );\n*\n* var re = realf( z );\n* // returns 2.0\n*\n* var im = imagf( z );\n* // returns 2.0\n*/\nsetReadOnly( Complex64Array.prototype, 'copyWithin', function copyWithin( target, start ) {\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\t// FIXME: prefer a functional `copyWithin` implementation which addresses lack of universal browser support (e.g., IE11 and Safari) or ensure that typed arrays are polyfilled\n\tif ( arguments.length === 2 ) {\n\t\tthis._buffer.copyWithin( target*2, start*2 );\n\t} else {\n\t\tthis._buffer.copyWithin( target*2, start*2, arguments[2]*2 );\n\t}\n\treturn this;\n});\n\n/**\n* Returns an iterator for iterating over array key-value pairs.\n*\n* @name entries\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Iterator} iterator\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n*\n* var arr = [\n* new Complex64( 1.0, 1.0 ),\n* new Complex64( 2.0, 2.0 ),\n* new Complex64( 3.0, 3.0 )\n* ];\n* arr = new Complex64Array( arr );\n*\n* // Create an iterator:\n* var it = arr.entries();\n*\n* // Iterate over the key-value pairs...\n* var v = it.next().value;\n* // returns [ 0, ]\n*\n* v = it.next().value;\n* // returns [ 1, ]\n*\n* v = it.next().value;\n* // returns [ 2, ]\n*\n* var bool = it.next().done;\n* // returns true\n*/\nsetReadOnly( Complex64Array.prototype, 'entries', function entries() {\n\tvar buffer;\n\tvar self;\n\tvar iter;\n\tvar len;\n\tvar FLG;\n\tvar i;\n\tvar j;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tself = this;\n\tbuffer = this._buffer;\n\tlen = this._length;\n\n\t// Initialize the iteration indices:\n\ti = -1;\n\tj = -2;\n\n\t// Create an iterator protocol-compliant object:\n\titer = {};\n\tsetReadOnly( iter, 'next', next );\n\tsetReadOnly( iter, 'return', end );\n\n\tif ( ITERATOR_SYMBOL ) {\n\t\tsetReadOnly( iter, ITERATOR_SYMBOL, factory );\n\t}\n\treturn iter;\n\n\t/**\n\t* Returns an iterator protocol-compliant object containing the next iterated value.\n\t*\n\t* @private\n\t* @returns {Object} iterator protocol-compliant object\n\t*/\n\tfunction next() {\n\t\tvar z;\n\t\ti += 1;\n\t\tif ( FLG || i >= len ) {\n\t\t\treturn {\n\t\t\t\t'done': true\n\t\t\t};\n\t\t}\n\t\tj += 2;\n\t\tz = new Complex64( buffer[ j ], buffer[ j+1 ] );\n\t\treturn {\n\t\t\t'value': [ i, z ],\n\t\t\t'done': false\n\t\t};\n\t}\n\n\t/**\n\t* Finishes an iterator.\n\t*\n\t* @private\n\t* @param {*} [value] - value to return\n\t* @returns {Object} iterator protocol-compliant object\n\t*/\n\tfunction end( value ) {\n\t\tFLG = true;\n\t\tif ( arguments.length ) {\n\t\t\treturn {\n\t\t\t\t'value': value,\n\t\t\t\t'done': true\n\t\t\t};\n\t\t}\n\t\treturn {\n\t\t\t'done': true\n\t\t};\n\t}\n\n\t/**\n\t* Returns a new iterator.\n\t*\n\t* @private\n\t* @returns {Iterator} iterator\n\t*/\n\tfunction factory() {\n\t\treturn self.entries();\n\t}\n});\n\n/**\n* Returns an array element.\n*\n* @name get\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {NonNegativeInteger} idx - element index\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} must provide a nonnegative integer\n* @returns {(Complex64|void)} array element\n*\n* @example\n* var arr = new Complex64Array( 10 );\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* var z = arr.get( 0 );\n* // returns \n*\n* var re = realf( z );\n* // returns 0.0\n*\n* var im = imagf( z );\n* // returns 0.0\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n*\n* z = arr.get( 0 );\n* // returns \n*\n* re = realf( z );\n* // returns 1.0\n*\n* im = imagf( z );\n* // returns -1.0\n*\n* z = arr.get( 100 );\n* // returns undefined\n*/\nsetReadOnly( Complex64Array.prototype, 'get', function get( idx ) {\n\tvar buf;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isNonNegativeInteger( idx ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Must provide a nonnegative integer. Value: `%s`.', idx ) );\n\t}\n\tif ( idx >= this._length ) {\n\t\treturn;\n\t}\n\tbuf = this._buffer;\n\tidx *= 2;\n\treturn new Complex64( buf[ idx ], buf[ idx+1 ] );\n});\n\n/**\n* Number of array elements.\n*\n* @name length\n* @memberof Complex64Array.prototype\n* @readonly\n* @type {NonNegativeInteger}\n*\n* @example\n* var arr = new Complex64Array( 10 );\n*\n* var len = arr.length;\n* // returns 10\n*/\nsetReadOnlyAccessor( Complex64Array.prototype, 'length', function get() {\n\treturn this._length;\n});\n\n/**\n* Sets an array element.\n*\n* ## Notes\n*\n* - When provided a typed array, real or complex, we must check whether the source array shares the same buffer as the target array and whether the underlying memory overlaps. In particular, we are concerned with the following scenario:\n*\n* ```text\n* buf: ---------------------\n* src: ---------------------\n* ```\n*\n* In the above, as we copy values from `src`, we will overwrite values in the `src` view, resulting in duplicated values copied into the end of `buf`, which is not intended. Hence, to avoid overwriting source values, we must **copy** source values to a temporary array.\n*\n* In the other overlapping scenario,\n*\n* ```text\n* buf: ---------------------\n* src: ---------------------\n* ```\n*\n* by the time we begin copying into the overlapping region, we are copying from the end of `src`, a non-overlapping region, which means we don't run the risk of copying copied values, rather than the original `src` values as intended.\n*\n*\n* @name set\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {(Collection|Complex|ComplexArray)} value - value(s)\n* @param {NonNegativeInteger} [i=0] - element index at which to start writing values\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be either a complex number, an array-like object, or a complex number array\n* @throws {TypeError} index argument must be a nonnegative integer\n* @throws {RangeError} array-like objects must have a length which is a multiple of two\n* @throws {RangeError} index argument is out-of-bounds\n* @throws {RangeError} target array lacks sufficient storage to accommodate source values\n* @returns {void}\n*\n* @example\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* var arr = new Complex64Array( 10 );\n*\n* var z = arr.get( 0 );\n* // returns \n*\n* var re = realf( z );\n* // returns 0.0\n*\n* var im = imagf( z );\n* // returns 0.0\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n*\n* z = arr.get( 0 );\n* // returns \n*\n* re = realf( z );\n* // returns 1.0\n*\n* im = imagf( z );\n* // returns -1.0\n*/\nsetReadOnly( Complex64Array.prototype, 'set', function set( value ) {\n\t/* eslint-disable no-underscore-dangle */\n\tvar sbuf;\n\tvar idx;\n\tvar buf;\n\tvar tmp;\n\tvar flg;\n\tvar N;\n\tvar v;\n\tvar i;\n\tvar j;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tbuf = this._buffer;\n\tif ( arguments.length > 1 ) {\n\t\tidx = arguments[ 1 ];\n\t\tif ( !isNonNegativeInteger( idx ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Index argument must be a nonnegative integer. Value: `%s`.', idx ) );\n\t\t}\n\t} else {\n\t\tidx = 0;\n\t}\n\tif ( isComplexLike( value ) ) {\n\t\tif ( idx >= this._length ) {\n\t\t\tthrow new RangeError( format( 'invalid argument. Index argument is out-of-bounds. Value: `%u`.', idx ) );\n\t\t}\n\t\tidx *= 2;\n\t\tbuf[ idx ] = realf( value );\n\t\tbuf[ idx+1 ] = imagf( value );\n\t\treturn;\n\t}\n\tif ( isComplexArray( value ) ) {\n\t\tN = value._length;\n\t\tif ( idx+N > this._length ) {\n\t\t\tthrow new RangeError( 'invalid arguments. Target array lacks sufficient storage to accommodate source values.' );\n\t\t}\n\t\tsbuf = value._buffer;\n\n\t\t// Check for overlapping memory...\n\t\tj = buf.byteOffset + (idx*BYTES_PER_ELEMENT);\n\t\tif (\n\t\t\tsbuf.buffer === buf.buffer &&\n\t\t\t(\n\t\t\t\tsbuf.byteOffset < j &&\n\t\t\t\tsbuf.byteOffset+sbuf.byteLength > j\n\t\t\t)\n\t\t) {\n\t\t\t// We need to copy source values...\n\t\t\ttmp = new Float32Array( sbuf.length );\n\t\t\tfor ( i = 0; i < sbuf.length; i++ ) {\n\t\t\t\ttmp[ i ] = sbuf[ i ];\n\t\t\t}\n\t\t\tsbuf = tmp;\n\t\t}\n\t\tidx *= 2;\n\t\tj = 0;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\tbuf[ idx ] = sbuf[ j ];\n\t\t\tbuf[ idx+1 ] = sbuf[ j+1 ];\n\t\t\tidx += 2; // stride\n\t\t\tj += 2; // stride\n\t\t}\n\t\treturn;\n\t}\n\tif ( isCollection( value ) ) {\n\t\t// Detect whether we've been provided an array of complex numbers...\n\t\tN = value.length;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\tif ( !isComplexLike( value[ i ] ) ) {\n\t\t\t\tflg = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t// If an array does not contain only complex numbers, then we assume interleaved real and imaginary components...\n\t\tif ( flg ) {\n\t\t\tif ( !isEven( N ) ) {\n\t\t\t\tthrow new RangeError( format( 'invalid argument. Array-like object arguments must have a length which is a multiple of two. Length: `%u`.', N ) );\n\t\t\t}\n\t\t\tif ( idx+(N/2) > this._length ) {\n\t\t\t\tthrow new RangeError( 'invalid arguments. Target array lacks sufficient storage to accommodate source values.' );\n\t\t\t}\n\t\t\tsbuf = value;\n\n\t\t\t// Check for overlapping memory...\n\t\t\tj = buf.byteOffset + (idx*BYTES_PER_ELEMENT);\n\t\t\tif (\n\t\t\t\tsbuf.buffer === buf.buffer &&\n\t\t\t\t(\n\t\t\t\t\tsbuf.byteOffset < j &&\n\t\t\t\t\tsbuf.byteOffset+sbuf.byteLength > j\n\t\t\t\t)\n\t\t\t) {\n\t\t\t\t// We need to copy source values...\n\t\t\t\ttmp = new Float32Array( N );\n\t\t\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\t\t\ttmp[ i ] = sbuf[ i ];\n\t\t\t\t}\n\t\t\t\tsbuf = tmp;\n\t\t\t}\n\t\t\tidx *= 2;\n\t\t\tN /= 2;\n\t\t\tj = 0;\n\t\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\t\tbuf[ idx ] = sbuf[ j ];\n\t\t\t\tbuf[ idx+1 ] = sbuf[ j+1 ];\n\t\t\t\tidx += 2; // stride\n\t\t\t\tj += 2; // stride\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\t// If an array contains only complex numbers, then we need to extract real and imaginary components...\n\t\tif ( idx+N > this._length ) {\n\t\t\tthrow new RangeError( 'invalid arguments. Target array lacks sufficient storage to accommodate source values.' );\n\t\t}\n\t\tidx *= 2;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\tv = value[ i ];\n\t\t\tbuf[ idx ] = realf( v );\n\t\t\tbuf[ idx+1 ] = imagf( v );\n\t\t\tidx += 2; // stride\n\t\t}\n\t\treturn;\n\t}\n\tthrow new TypeError( format( 'invalid argument. First argument must be either a complex number, an array-like object, or a complex number array. Value: `%s`.', value ) );\n\n\t/* eslint-enable no-underscore-dangle */\n});\n\n\n// EXPORTS //\n\nexport default Complex64Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Returns the real component of a double-precision complex floating-point number.\n*\n* @param {Complex} z - complex number\n* @returns {number} real component\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n*\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var re = real( z );\n* // returns 5.0\n*/\nfunction real( z ) {\n\treturn z.re;\n}\n\n\n// EXPORTS //\n\nexport default real;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Returns the imaginary component of a double-precision complex floating-point number.\n*\n* @param {Complex} z - complex number\n* @returns {number} imaginary component\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n*\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var im = imag( z );\n* // returns 3.0\n*/\nfunction imag( z ) {\n\treturn z.im;\n}\n\n\n// EXPORTS //\n\nexport default imag;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isArrayLikeObject from '@stdlib/assert-is-array-like-object';\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport format from '@stdlib/string-format';\nimport real from '@stdlib/complex-real';\nimport imag from '@stdlib/complex-imag';\n\n\n// MAIN //\n\n/**\n* Returns an array of iterated values.\n*\n* @private\n* @param {Object} it - iterator\n* @returns {(Array|TypeError)} array or an error\n*/\nfunction fromIterator( it ) {\n\tvar out;\n\tvar v;\n\tvar z;\n\n\tout = [];\n\twhile ( true ) {\n\t\tv = it.next();\n\t\tif ( v.done ) {\n\t\t\tbreak;\n\t\t}\n\t\tz = v.value;\n\t\tif ( isArrayLikeObject( z ) && z.length >= 2 ) {\n\t\t\tout.push( z[ 0 ], z[ 1 ] );\n\t\t} else if ( isComplexLike( z ) ) {\n\t\t\tout.push( real( z ), imag( z ) );\n\t\t} else {\n\t\t\treturn new TypeError( format( 'invalid argument. An iterator must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', z ) );\n\t\t}\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default fromIterator;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isArrayLikeObject from '@stdlib/assert-is-array-like-object';\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport format from '@stdlib/string-format';\nimport real from '@stdlib/complex-real';\nimport imag from '@stdlib/complex-imag';\n\n\n// MAIN //\n\n/**\n* Returns an array of iterated values.\n*\n* @private\n* @param {Object} it - iterator\n* @param {Function} clbk - callback to invoke for each iterated value\n* @param {*} thisArg - invocation context\n* @returns {(Array|TypeError)} array or an error\n*/\nfunction fromIteratorMap( it, clbk, thisArg ) {\n\tvar out;\n\tvar v;\n\tvar z;\n\tvar i;\n\n\tout = [];\n\ti = -1;\n\twhile ( true ) {\n\t\tv = it.next();\n\t\tif ( v.done ) {\n\t\t\tbreak;\n\t\t}\n\t\ti += 1;\n\t\tz = clbk.call( thisArg, v.value, i );\n\t\tif ( isArrayLikeObject( z ) && z.length >= 2 ) {\n\t\t\tout.push( z[ 0 ], z[ 1 ] );\n\t\t} else if ( isComplexLike( z ) ) {\n\t\t\tout.push( real( z ), imag( z ) );\n\t\t} else {\n\t\t\treturn new TypeError( format( 'invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', z ) );\n\t\t}\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default fromIteratorMap;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport real from '@stdlib/complex-real';\nimport imag from '@stdlib/complex-imag';\n\n\n// MAIN //\n\n/**\n* Returns a strided array of real and imaginary components.\n*\n* @private\n* @param {Float64Array} buf - output array\n* @param {Array} arr - array containing complex numbers\n* @returns {(Float64Array|null)} output array or null\n*/\nfunction fromArray( buf, arr ) {\n\tvar len;\n\tvar v;\n\tvar i;\n\tvar j;\n\n\tlen = arr.length;\n\tj = 0;\n\tfor ( i = 0; i < len; i++ ) {\n\t\tv = arr[ i ];\n\t\tif ( !isComplexLike( v ) ) {\n\t\t\treturn null;\n\t\t}\n\t\tbuf[ j ] = real( v );\n\t\tbuf[ j+1 ] = imag( v );\n\t\tj += 2; // stride\n\t}\n\treturn buf;\n}\n\n\n// EXPORTS //\n\nexport default fromArray;\n","/* eslint-disable no-restricted-syntax, max-lines, no-invalid-this */\n\n/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isNonNegativeInteger } from '@stdlib/assert-is-nonnegative-integer';\nimport isArrayLikeObject from '@stdlib/assert-is-array-like-object';\nimport isCollection from '@stdlib/assert-is-collection';\nimport isArrayBuffer from '@stdlib/assert-is-arraybuffer';\nimport isObject from '@stdlib/assert-is-object';\nimport isArray from '@stdlib/assert-is-array';\nimport isFunction from '@stdlib/assert-is-function';\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport isEven from '@stdlib/math-base-assert-is-even';\nimport isInteger from '@stdlib/math-base-assert-is-integer';\nimport hasIteratorSymbolSupport from '@stdlib/assert-has-iterator-symbol-support';\nimport ITERATOR_SYMBOL from '@stdlib/symbol-iterator';\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport setReadOnlyAccessor from '@stdlib/utils-define-nonenumerable-read-only-accessor';\nimport Float64Array from '@stdlib/array-float64';\nimport Complex128 from '@stdlib/complex-float64';\nimport real from '@stdlib/complex-real';\nimport imag from '@stdlib/complex-imag';\nimport reinterpret64 from '@stdlib/strided-base-reinterpret-complex64';\nimport reinterpret128 from '@stdlib/strided-base-reinterpret-complex128';\nimport getter from '@stdlib/array-base-getter';\nimport accessorGetter from '@stdlib/array-base-accessor-getter';\nimport format from '@stdlib/string-format';\nimport fromIterator from './from_iterator.js';\nimport fromIteratorMap from './from_iterator_map.js';\nimport fromArray from './from_array.js';\n\n\n// VARIABLES //\n\nvar BYTES_PER_ELEMENT = Float64Array.BYTES_PER_ELEMENT * 2;\nvar HAS_ITERATOR_SYMBOL = hasIteratorSymbolSupport();\n\n\n// FUNCTIONS //\n\n/**\n* Returns a boolean indicating if a value is a complex typed array.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a complex typed array\n*/\nfunction isComplexArray( value ) {\n\treturn (\n\t\tvalue instanceof Complex128Array ||\n\t\t(\n\t\t\ttypeof value === 'object' &&\n\t\t\tvalue !== null &&\n\t\t\t(\n\t\t\t\tvalue.constructor.name === 'Complex64Array' ||\n\t\t\t\tvalue.constructor.name === 'Complex128Array'\n\t\t\t) &&\n\t\t\ttypeof value._length === 'number' && // eslint-disable-line no-underscore-dangle\n\n\t\t\t// NOTE: we don't perform a more rigorous test here for a typed array for performance reasons, as robustly checking for a typed array instance could require walking the prototype tree and performing relatively expensive constructor checks...\n\t\t\ttypeof value._buffer === 'object' // eslint-disable-line no-underscore-dangle\n\t\t)\n\t);\n}\n\n/**\n* Returns a boolean indicating if a value is a complex typed array constructor.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a complex typed array constructor\n*/\nfunction isComplexArrayConstructor( value ) {\n\treturn (\n\t\tvalue === Complex128Array ||\n\n\t\t// NOTE: weaker test in order to avoid a circular dependency with Complex64Array...\n\t\tvalue.name === 'Complex64Array'\n\t);\n}\n\n/**\n* Returns a boolean indicating if a value is a `Complex64Array`.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a `Complex64Array`\n*/\nfunction isComplex64Array( value ) {\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\tvalue.constructor.name === 'Complex64Array' &&\n\t\tvalue.BYTES_PER_ELEMENT === BYTES_PER_ELEMENT/2\n\t);\n}\n\n/**\n* Returns a boolean indicating if a value is a `Complex128Array`.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a `Complex128Array`\n*/\nfunction isComplex128Array( value ) {\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\tvalue.constructor.name === 'Complex128Array' &&\n\t\tvalue.BYTES_PER_ELEMENT === BYTES_PER_ELEMENT\n\t);\n}\n\n\n// MAIN //\n\n/**\n* 128-bit complex number array constructor.\n*\n* @constructor\n* @param {(NonNegativeInteger|Collection|ArrayBuffer|Iterable)} [arg] - length, typed array, array-like object, buffer, or iterable\n* @param {NonNegativeInteger} [byteOffset=0] - byte offset\n* @param {NonNegativeInteger} [length] - view length\n* @throws {RangeError} ArrayBuffer byte length must be a multiple of `16`\n* @throws {RangeError} array-like object and typed array input arguments must have a length which is a multiple of two\n* @throws {TypeError} if provided only a single argument, must provide a valid argument\n* @throws {TypeError} byte offset must be a nonnegative integer\n* @throws {RangeError} byte offset must be a multiple of `16`\n* @throws {TypeError} view length must be a positive multiple of `16`\n* @throws {RangeError} must provide sufficient memory to accommodate byte offset and view length requirements\n* @throws {TypeError} an iterator must return either a two element array containing real and imaginary components or a complex number\n* @returns {Complex128Array} complex number array\n*\n* @example\n* var arr = new Complex128Array();\n* // returns \n*\n* var len = arr.length;\n* // returns 0\n*\n* @example\n* var arr = new Complex128Array( 2 );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*\n* @example\n* var arr = new Complex128Array( [ 1.0, -1.0 ] );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* import ArrayBuffer from '@stdlib/array-buffer';\n*\n* var buf = new ArrayBuffer( 32 );\n* var arr = new Complex128Array( buf );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*\n* @example\n* import ArrayBuffer from '@stdlib/array-buffer';\n*\n* var buf = new ArrayBuffer( 32 );\n* var arr = new Complex128Array( buf, 16 );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* import ArrayBuffer from '@stdlib/array-buffer';\n*\n* var buf = new ArrayBuffer( 64 );\n* var arr = new Complex128Array( buf, 16, 2 );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*/\nfunction Complex128Array() {\n\tvar byteOffset;\n\tvar nargs;\n\tvar buf;\n\tvar len;\n\n\tnargs = arguments.length;\n\tif ( !(this instanceof Complex128Array) ) {\n\t\tif ( nargs === 0 ) {\n\t\t\treturn new Complex128Array();\n\t\t}\n\t\tif ( nargs === 1 ) {\n\t\t\treturn new Complex128Array( arguments[0] );\n\t\t}\n\t\tif ( nargs === 2 ) {\n\t\t\treturn new Complex128Array( arguments[0], arguments[1] );\n\t\t}\n\t\treturn new Complex128Array( arguments[0], arguments[1], arguments[2] );\n\t}\n\t// Create the underlying data buffer...\n\tif ( nargs === 0 ) {\n\t\tbuf = new Float64Array( 0 ); // backward-compatibility\n\t} else if ( nargs === 1 ) {\n\t\tif ( isNonNegativeInteger( arguments[0] ) ) {\n\t\t\tbuf = new Float64Array( arguments[0]*2 );\n\t\t} else if ( isCollection( arguments[0] ) ) {\n\t\t\tbuf = arguments[ 0 ];\n\t\t\tlen = buf.length;\n\n\t\t\t// If provided a \"generic\" array, peak at the first value, and, if the value is a complex number, try to process as an array of complex numbers, falling back to \"normal\" typed array initialization if we fail and ensuring consistency if the first value had not been a complex number...\n\t\t\tif ( len && isArray( buf ) && isComplexLike( buf[0] ) ) {\n\t\t\t\tbuf = fromArray( new Float64Array( len*2 ), buf );\n\t\t\t\tif ( buf === null ) {\n\t\t\t\t\t// We failed and we are now forced to allocate a new array :-(\n\t\t\t\t\tif ( !isEven( len ) ) {\n\t\t\t\t\t\tthrow new RangeError( format( 'invalid argument. Array-like object arguments must have a length which is a multiple of two. Length: `%u`.', len ) );\n\t\t\t\t\t}\n\t\t\t\t\t// We failed, so fall back to directly setting values...\n\t\t\t\t\tbuf = new Float64Array( arguments[0] );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ( isComplex64Array( buf ) ) {\n\t\t\t\t\tbuf = reinterpret64( buf, 0 );\n\t\t\t\t} else if ( isComplex128Array( buf ) ) {\n\t\t\t\t\tbuf = reinterpret128( buf, 0 );\n\t\t\t\t} else if ( !isEven( len ) ) {\n\t\t\t\t\tthrow new RangeError( format( 'invalid argument. Array-like object and typed array arguments must have a length which is a multiple of two. Length: `%u`.', len ) );\n\t\t\t\t}\n\t\t\t\tbuf = new Float64Array( buf );\n\t\t\t}\n\t\t} else if ( isArrayBuffer( arguments[0] ) ) {\n\t\t\tbuf = arguments[ 0 ];\n\t\t\tif ( !isInteger( buf.byteLength/BYTES_PER_ELEMENT ) ) {\n\t\t\t\tthrow new RangeError( format( 'invalid argument. ArrayBuffer byte length must be a multiple of %u. Byte length: `%u`.', BYTES_PER_ELEMENT, buf.byteLength ) );\n\t\t\t}\n\t\t\tbuf = new Float64Array( buf );\n\t\t} else if ( isObject( arguments[0] ) ) {\n\t\t\tbuf = arguments[ 0 ];\n\t\t\tif ( HAS_ITERATOR_SYMBOL === false ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Environment lacks Symbol.iterator support. Must provide a length, ArrayBuffer, typed array, or array-like object. Value: `%s`.', buf ) );\n\t\t\t}\n\t\t\tif ( !isFunction( buf[ ITERATOR_SYMBOL ] ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.', buf ) );\n\t\t\t}\n\t\t\tbuf = buf[ ITERATOR_SYMBOL ]();\n\t\t\tif ( !isFunction( buf.next ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.', buf ) );\n\t\t\t}\n\t\t\tbuf = fromIterator( buf );\n\t\t\tif ( buf instanceof Error ) {\n\t\t\t\tthrow buf;\n\t\t\t}\n\t\t\tbuf = new Float64Array( buf );\n\t\t} else {\n\t\t\tthrow new TypeError( format( 'invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.', arguments[0] ) );\n\t\t}\n\t} else {\n\t\tbuf = arguments[ 0 ];\n\t\tif ( !isArrayBuffer( buf ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. First argument must be an ArrayBuffer. Value: `%s`.', buf ) );\n\t\t}\n\t\tbyteOffset = arguments[ 1 ];\n\t\tif ( !isNonNegativeInteger( byteOffset ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Byte offset must be a nonnegative integer. Value: `%s`.', byteOffset ) );\n\t\t}\n\t\tif ( !isInteger( byteOffset/BYTES_PER_ELEMENT ) ) {\n\t\t\tthrow new RangeError( format( 'invalid argument. Byte offset must be a multiple of %u. Value: `%u`.', BYTES_PER_ELEMENT, byteOffset ) );\n\t\t}\n\t\tif ( nargs === 2 ) {\n\t\t\tlen = buf.byteLength - byteOffset;\n\t\t\tif ( !isInteger( len/BYTES_PER_ELEMENT ) ) {\n\t\t\t\tthrow new RangeError( format( 'invalid arguments. ArrayBuffer view byte length must be a multiple of %u. View byte length: `%u`.', BYTES_PER_ELEMENT, len ) );\n\t\t\t}\n\t\t\tbuf = new Float64Array( buf, byteOffset );\n\t\t} else {\n\t\t\tlen = arguments[ 2 ];\n\t\t\tif ( !isNonNegativeInteger( len ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Length must be a nonnegative integer. Value: `%s`.', len ) );\n\t\t\t}\n\t\t\tif ( (len*BYTES_PER_ELEMENT) > (buf.byteLength-byteOffset) ) {\n\t\t\t\tthrow new RangeError( format( 'invalid arguments. ArrayBuffer has insufficient capacity. Either decrease the array length or provide a bigger buffer. Minimum capacity: `%u`.', len*BYTES_PER_ELEMENT ) );\n\t\t\t}\n\t\t\tbuf = new Float64Array( buf, byteOffset, len*2 );\n\t\t}\n\t}\n\tsetReadOnly( this, '_buffer', buf );\n\tsetReadOnly( this, '_length', buf.length/2 );\n\n\treturn this;\n}\n\n/**\n* Size (in bytes) of each array element.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex128Array\n* @readonly\n* @type {PositiveInteger}\n* @default 16\n*\n* @example\n* var nbytes = Complex128Array.BYTES_PER_ELEMENT;\n* // returns 16\n*/\nsetReadOnly( Complex128Array, 'BYTES_PER_ELEMENT', BYTES_PER_ELEMENT );\n\n/**\n* Constructor name.\n*\n* @name name\n* @memberof Complex128Array\n* @readonly\n* @type {string}\n* @default 'Complex128Array'\n*\n* @example\n* var name = Complex128Array.name;\n* // returns 'Complex128Array'\n*/\nsetReadOnly( Complex128Array, 'name', 'Complex128Array' );\n\n/**\n* Creates a new 128-bit complex number array from an array-like object or an iterable.\n*\n* @name from\n* @memberof Complex128Array\n* @type {Function}\n* @param {(Collection|Object)} src - array-like object or iterable\n* @param {Function} [clbk] - callback to invoke for each source element\n* @param {*} [thisArg] - context\n* @throws {TypeError} `this` context must be a constructor\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be an array-like object or an iterable\n* @throws {TypeError} second argument must be a function\n* @throws {RangeError} array-like objects must have a length which is a multiple of two\n* @throws {TypeError} an iterator must return either a two element array containing real and imaginary components or a complex number\n* @throws {TypeError} when provided an iterator, a callback must return either a two element array containing real and imaginary components or a complex number\n* @returns {Complex128Array} 128-bit complex number array\n*\n* @example\n* var arr = Complex128Array.from( [ 1.0, -1.0 ] );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n*\n* var arr = Complex128Array.from( [ new Complex128( 1.0, 1.0 ) ] );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* function clbk( v ) {\n* return new Complex128( real(v)*2.0, imag(v)*2.0 );\n* }\n*\n* var arr = Complex128Array.from( [ new Complex128( 1.0, 1.0 ) ], clbk );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*/\nsetReadOnly( Complex128Array, 'from', function from( src ) {\n\tvar thisArg;\n\tvar nargs;\n\tvar clbk;\n\tvar out;\n\tvar buf;\n\tvar tmp;\n\tvar get;\n\tvar len;\n\tvar flg;\n\tvar v;\n\tvar i;\n\tvar j;\n\tif ( !isFunction( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` context must be a constructor.' );\n\t}\n\tif ( !isComplexArrayConstructor( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tnargs = arguments.length;\n\tif ( nargs > 1 ) {\n\t\tclbk = arguments[ 1 ];\n\t\tif ( !isFunction( clbk ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be a function. Value: `%s`.', clbk ) );\n\t\t}\n\t\tif ( nargs > 2 ) {\n\t\t\tthisArg = arguments[ 2 ];\n\t\t}\n\t}\n\tif ( isComplexArray( src ) ) {\n\t\tlen = src.length;\n\t\tif ( clbk ) {\n\t\t\tout = new this( len );\n\t\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\t\tj = 0;\n\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\tv = clbk.call( thisArg, src.get( i ), i );\n\t\t\t\tif ( isComplexLike( v ) ) {\n\t\t\t\t\tbuf[ j ] = real( v );\n\t\t\t\t\tbuf[ j+1 ] = imag( v );\n\t\t\t\t} else if ( isArrayLikeObject( v ) && v.length >= 2 ) {\n\t\t\t\t\tbuf[ j ] = v[ 0 ];\n\t\t\t\t\tbuf[ j+1 ] = v[ 1 ];\n\t\t\t\t} else {\n\t\t\t\t\tthrow new TypeError( format( 'invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', v ) );\n\t\t\t\t}\n\t\t\t\tj += 2; // stride\n\t\t\t}\n\t\t\treturn out;\n\t\t}\n\t\treturn new this( src );\n\t}\n\tif ( isCollection( src ) ) {\n\t\tif ( clbk ) {\n\t\t\t// Note: array contents affect how we iterate over a provided data source. If only complex number objects, we can extract real and imaginary components. Otherwise, for non-complex number arrays (e.g., `Float64Array`, etc), we assume a strided array where real and imaginary components are interleaved. In the former case, we expect a callback to return real and imaginary components (possibly as a complex number). In the latter case, we expect a callback to return *either* a real or imaginary component.\n\n\t\t\tlen = src.length;\n\t\t\tif ( src.get && src.set ) {\n\t\t\t\tget = accessorGetter( 'default' );\n\t\t\t} else {\n\t\t\t\tget = getter( 'default' );\n\t\t\t}\n\t\t\t// Detect whether we've been provided an array which returns complex number objects...\n\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\tif ( !isComplexLike( get( src, i ) ) ) {\n\t\t\t\t\tflg = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// If an array does not contain only complex number objects, then we assume interleaved real and imaginary components...\n\t\t\tif ( flg ) {\n\t\t\t\tif ( !isEven( len ) ) {\n\t\t\t\t\tthrow new RangeError( format( 'invalid argument. First argument must have a length which is a multiple of two. Length: `%u`.', len ) );\n\t\t\t\t}\n\t\t\t\tout = new this( len/2 );\n\t\t\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\t\tbuf[ i ] = clbk.call( thisArg, get( src, i ), i );\n\t\t\t\t}\n\t\t\t\treturn out;\n\t\t\t}\n\t\t\t// If an array contains only complex number objects, then we need to extract real and imaginary components...\n\t\t\tout = new this( len );\n\t\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\t\tj = 0;\n\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\tv = clbk.call( thisArg, get( src, i ), i );\n\t\t\t\tif ( isComplexLike( v ) ) {\n\t\t\t\t\tbuf[ j ] = real( v );\n\t\t\t\t\tbuf[ j+1 ] = imag( v );\n\t\t\t\t} else if ( isArrayLikeObject( v ) && v.length >= 2 ) {\n\t\t\t\t\tbuf[ j ] = v[ 0 ];\n\t\t\t\t\tbuf[ j+1 ] = v[ 1 ];\n\t\t\t\t} else {\n\t\t\t\t\tthrow new TypeError( format( 'invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', v ) );\n\t\t\t\t}\n\t\t\t\tj += 2; // stride\n\t\t\t}\n\t\t\treturn out;\n\t\t}\n\t\treturn new this( src );\n\t}\n\tif ( isObject( src ) && HAS_ITERATOR_SYMBOL && isFunction( src[ ITERATOR_SYMBOL ] ) ) { // eslint-disable-line max-len\n\t\tbuf = src[ ITERATOR_SYMBOL ]();\n\t\tif ( !isFunction( buf.next ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.', src ) );\n\t\t}\n\t\tif ( clbk ) {\n\t\t\ttmp = fromIteratorMap( buf, clbk, thisArg );\n\t\t} else {\n\t\t\ttmp = fromIterator( buf );\n\t\t}\n\t\tif ( tmp instanceof Error ) {\n\t\t\tthrow tmp;\n\t\t}\n\t\tlen = tmp.length / 2;\n\t\tout = new this( len );\n\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\tbuf[ i ] = tmp[ i ];\n\t\t}\n\t\treturn out;\n\t}\n\tthrow new TypeError( format( 'invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.', src ) );\n});\n\n/**\n* Creates a new 128-bit complex number array from a variable number of arguments.\n*\n* @name of\n* @memberof Complex128Array\n* @type {Function}\n* @param {...*} element - array elements\n* @throws {TypeError} `this` context must be a constructor\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Complex128Array} 128-bit complex number array\n*\n* @example\n* var arr = Complex128Array.of( 1.0, 1.0, 1.0, 1.0 );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*/\nsetReadOnly( Complex128Array, 'of', function of() {\n\tvar args;\n\tvar i;\n\tif ( !isFunction( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` context must be a constructor.' );\n\t}\n\tif ( !isComplexArrayConstructor( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\targs = [];\n\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\targs.push( arguments[ i ] );\n\t}\n\treturn new this( args );\n});\n\n/**\n* Pointer to the underlying data buffer.\n*\n* @name buffer\n* @memberof Complex128Array.prototype\n* @readonly\n* @type {ArrayBuffer}\n*\n* @example\n* var arr = new Complex128Array( 10 );\n*\n* var buf = arr.buffer;\n* // returns \n*/\nsetReadOnlyAccessor( Complex128Array.prototype, 'buffer', function get() {\n\treturn this._buffer.buffer;\n});\n\n/**\n* Size (in bytes) of the array.\n*\n* @name byteLength\n* @memberof Complex128Array.prototype\n* @readonly\n* @type {NonNegativeInteger}\n*\n* @example\n* var arr = new Complex128Array( 10 );\n*\n* var byteLength = arr.byteLength;\n* // returns 160\n*/\nsetReadOnlyAccessor( Complex128Array.prototype, 'byteLength', function get() {\n\treturn this._buffer.byteLength;\n});\n\n/**\n* Offset (in bytes) of the array from the start of its underlying `ArrayBuffer`.\n*\n* @name byteOffset\n* @memberof Complex128Array.prototype\n* @readonly\n* @type {NonNegativeInteger}\n*\n* @example\n* var arr = new Complex128Array( 10 );\n*\n* var byteOffset = arr.byteOffset;\n* // returns 0\n*/\nsetReadOnlyAccessor( Complex128Array.prototype, 'byteOffset', function get() {\n\treturn this._buffer.byteOffset;\n});\n\n/**\n* Size (in bytes) of each array element.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex128Array.prototype\n* @readonly\n* @type {PositiveInteger}\n* @default 16\n*\n* @example\n* var arr = new Complex128Array( 10 );\n*\n* var nbytes = arr.BYTES_PER_ELEMENT;\n* // returns 16\n*/\nsetReadOnly( Complex128Array.prototype, 'BYTES_PER_ELEMENT', Complex128Array.BYTES_PER_ELEMENT );\n\n/**\n* Copies a sequence of elements within the array to the position starting at `target`.\n*\n* @name copyWithin\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {integer} target - index at which to start copying elements\n* @param {integer} start - source index at which to copy elements from\n* @param {integer} [end] - source index at which to stop copying elements from\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Complex128Array} modified array\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* var arr = new Complex128Array( 4 );\n*\n* // Set the array elements:\n* arr.set( new Complex128( 1.0, 1.0 ), 0 );\n* arr.set( new Complex128( 2.0, 2.0 ), 1 );\n* arr.set( new Complex128( 3.0, 3.0 ), 2 );\n* arr.set( new Complex128( 4.0, 4.0 ), 3 );\n*\n* // Copy the first two elements to the last two elements:\n* arr.copyWithin( 2, 0, 2 );\n*\n* // Get the last array element:\n* var z = arr.get( 3 );\n*\n* var re = real( z );\n* // returns 2.0\n*\n* var im = imag( z );\n* // returns 2.0\n*/\nsetReadOnly( Complex128Array.prototype, 'copyWithin', function copyWithin( target, start ) {\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\t// FIXME: prefer a functional `copyWithin` implementation which addresses lack of universal browser support (e.g., IE11 and Safari) or ensure that typed arrays are polyfilled\n\tif ( arguments.length === 2 ) {\n\t\tthis._buffer.copyWithin( target*2, start*2 );\n\t} else {\n\t\tthis._buffer.copyWithin( target*2, start*2, arguments[2]*2 );\n\t}\n\treturn this;\n});\n\n/**\n* Returns an iterator for iterating over array key-value pairs.\n*\n* @name entries\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Iterator} iterator\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n*\n* var arr = [\n* new Complex128( 1.0, 1.0 ),\n* new Complex128( 2.0, 2.0 ),\n* new Complex128( 3.0, 3.0 )\n* ];\n* arr = new Complex128Array( arr );\n*\n* // Create an iterator:\n* var it = arr.entries();\n*\n* // Iterate over the key-value pairs...\n* var v = it.next().value;\n* // returns [ 0, ]\n*\n* v = it.next().value;\n* // returns [ 1, ]\n*\n* v = it.next().value;\n* // returns [ 2, ]\n*\n* var bool = it.next().done;\n* // returns true\n*/\nsetReadOnly( Complex128Array.prototype, 'entries', function entries() {\n\tvar buffer;\n\tvar self;\n\tvar iter;\n\tvar len;\n\tvar FLG;\n\tvar i;\n\tvar j;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tself = this;\n\tbuffer = this._buffer;\n\tlen = this._length;\n\n\t// Initialize the iteration indices:\n\ti = -1;\n\tj = -2;\n\n\t// Create an iterator protocol-compliant object:\n\titer = {};\n\tsetReadOnly( iter, 'next', next );\n\tsetReadOnly( iter, 'return', end );\n\n\tif ( ITERATOR_SYMBOL ) {\n\t\tsetReadOnly( iter, ITERATOR_SYMBOL, factory );\n\t}\n\treturn iter;\n\n\t/**\n\t* Returns an iterator protocol-compliant object containing the next iterated value.\n\t*\n\t* @private\n\t* @returns {Object} iterator protocol-compliant object\n\t*/\n\tfunction next() {\n\t\tvar z;\n\t\ti += 1;\n\t\tif ( FLG || i >= len ) {\n\t\t\treturn {\n\t\t\t\t'done': true\n\t\t\t};\n\t\t}\n\t\tj += 2;\n\t\tz = new Complex128( buffer[ j ], buffer[ j+1 ] );\n\t\treturn {\n\t\t\t'value': [ i, z ],\n\t\t\t'done': false\n\t\t};\n\t}\n\n\t/**\n\t* Finishes an iterator.\n\t*\n\t* @private\n\t* @param {*} [value] - value to return\n\t* @returns {Object} iterator protocol-compliant object\n\t*/\n\tfunction end( value ) {\n\t\tFLG = true;\n\t\tif ( arguments.length ) {\n\t\t\treturn {\n\t\t\t\t'value': value,\n\t\t\t\t'done': true\n\t\t\t};\n\t\t}\n\t\treturn {\n\t\t\t'done': true\n\t\t};\n\t}\n\n\t/**\n\t* Returns a new iterator.\n\t*\n\t* @private\n\t* @returns {Iterator} iterator\n\t*/\n\tfunction factory() {\n\t\treturn self.entries();\n\t}\n});\n\n/**\n* Returns an array element.\n*\n* @name get\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {NonNegativeInteger} idx - element index\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} must provide a nonnegative integer\n* @returns {(Complex128|void)} array element\n*\n* @example\n* var arr = new Complex128Array( 10 );\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* var z = arr.get( 0 );\n* // returns \n*\n* var re = real( z );\n* // returns 0.0\n*\n* var im = imag( z );\n* // returns 0.0\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n*\n* z = arr.get( 0 );\n* // returns \n*\n* re = real( z );\n* // returns 1.0\n*\n* im = imag( z );\n* // returns -1.0\n*\n* z = arr.get( 100 );\n* // returns undefined\n*/\nsetReadOnly( Complex128Array.prototype, 'get', function get( idx ) {\n\tvar buf;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isNonNegativeInteger( idx ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Must provide a nonnegative integer. Value: `%s`.', idx ) );\n\t}\n\tif ( idx >= this._length ) {\n\t\treturn;\n\t}\n\tbuf = this._buffer;\n\tidx *= 2;\n\treturn new Complex128( buf[ idx ], buf[ idx+1 ] );\n});\n\n/**\n* Number of array elements.\n*\n* @name length\n* @memberof Complex128Array.prototype\n* @readonly\n* @type {NonNegativeInteger}\n*\n* @example\n* var arr = new Complex128Array( 10 );\n*\n* var len = arr.length;\n* // returns 10\n*/\nsetReadOnlyAccessor( Complex128Array.prototype, 'length', function get() {\n\treturn this._length;\n});\n\n/**\n* Sets an array element.\n*\n* ## Notes\n*\n* - When provided a typed array, real or complex, we must check whether the source array shares the same buffer as the target array and whether the underlying memory overlaps. In particular, we are concerned with the following scenario:\n*\n* ```text\n* buf: ---------------------\n* src: ---------------------\n* ```\n*\n* In the above, as we copy values from `src`, we will overwrite values in the `src` view, resulting in duplicated values copied into the end of `buf`, which is not intended. Hence, to avoid overwriting source values, we must **copy** source values to a temporary array.\n*\n* In the other overlapping scenario,\n*\n* ```text\n* buf: ---------------------\n* src: ---------------------\n* ```\n*\n* by the time we begin copying into the overlapping region, we are copying from the end of `src`, a non-overlapping region, which means we don't run the risk of copying copied values, rather than the original `src` values as intended.\n*\n*\n* @name set\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {(Collection|Complex|ComplexArray)} value - value(s)\n* @param {NonNegativeInteger} [i=0] - element index at which to start writing values\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be either a complex number, an array-like object, or a complex number array\n* @throws {TypeError} index argument must be a nonnegative integer\n* @throws {RangeError} array-like objects must have a length which is a multiple of two\n* @throws {RangeError} index argument is out-of-bounds\n* @throws {RangeError} target array lacks sufficient storage to accommodate source values\n* @returns {void}\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* var arr = new Complex128Array( 10 );\n*\n* var z = arr.get( 0 );\n* // returns \n*\n* var re = real( z );\n* // returns 0.0\n*\n* var im = imag( z );\n* // returns 0.0\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n*\n* z = arr.get( 0 );\n* // returns \n*\n* re = real( z );\n* // returns 1.0\n*\n* im = imag( z );\n* // returns -1.0\n*/\nsetReadOnly( Complex128Array.prototype, 'set', function set( value ) {\n\t/* eslint-disable no-underscore-dangle */\n\tvar sbuf;\n\tvar idx;\n\tvar buf;\n\tvar tmp;\n\tvar flg;\n\tvar N;\n\tvar v;\n\tvar i;\n\tvar j;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tbuf = this._buffer;\n\tif ( arguments.length > 1 ) {\n\t\tidx = arguments[ 1 ];\n\t\tif ( !isNonNegativeInteger( idx ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Index argument must be a nonnegative integer. Value: `%s`.', idx ) );\n\t\t}\n\t} else {\n\t\tidx = 0;\n\t}\n\tif ( isComplexLike( value ) ) {\n\t\tif ( idx >= this._length ) {\n\t\t\tthrow new RangeError( format( 'invalid argument. Index argument is out-of-bounds. Value: `%u`.', idx ) );\n\t\t}\n\t\tidx *= 2;\n\t\tbuf[ idx ] = real( value );\n\t\tbuf[ idx+1 ] = imag( value );\n\t\treturn;\n\t}\n\tif ( isComplexArray( value ) ) {\n\t\tN = value._length;\n\t\tif ( idx+N > this._length ) {\n\t\t\tthrow new RangeError( 'invalid arguments. Target array lacks sufficient storage to accommodate source values.' );\n\t\t}\n\t\tsbuf = value._buffer;\n\n\t\t// Check for overlapping memory...\n\t\tj = buf.byteOffset + (idx*BYTES_PER_ELEMENT);\n\t\tif (\n\t\t\tsbuf.buffer === buf.buffer &&\n\t\t\t(\n\t\t\t\tsbuf.byteOffset < j &&\n\t\t\t\tsbuf.byteOffset+sbuf.byteLength > j\n\t\t\t)\n\t\t) {\n\t\t\t// We need to copy source values...\n\t\t\ttmp = new Float64Array( sbuf.length );\n\t\t\tfor ( i = 0; i < sbuf.length; i++ ) {\n\t\t\t\ttmp[ i ] = sbuf[ i ];\n\t\t\t}\n\t\t\tsbuf = tmp;\n\t\t}\n\t\tidx *= 2;\n\t\tj = 0;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\tbuf[ idx ] = sbuf[ j ];\n\t\t\tbuf[ idx+1 ] = sbuf[ j+1 ];\n\t\t\tidx += 2; // stride\n\t\t\tj += 2; // stride\n\t\t}\n\t\treturn;\n\t}\n\tif ( isCollection( value ) ) {\n\t\t// Detect whether we've been provided an array of complex numbers...\n\t\tN = value.length;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\tif ( !isComplexLike( value[ i ] ) ) {\n\t\t\t\tflg = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t// If an array does not contain only complex numbers, then we assume interleaved real and imaginary components...\n\t\tif ( flg ) {\n\t\t\tif ( !isEven( N ) ) {\n\t\t\t\tthrow new RangeError( format( 'invalid argument. Array-like object arguments must have a length which is a multiple of two. Length: `%u`.', N ) );\n\t\t\t}\n\t\t\tif ( idx+(N/2) > this._length ) {\n\t\t\t\tthrow new RangeError( 'invalid arguments. Target array lacks sufficient storage to accommodate source values.' );\n\t\t\t}\n\t\t\tsbuf = value;\n\n\t\t\t// Check for overlapping memory...\n\t\t\tj = buf.byteOffset + (idx*BYTES_PER_ELEMENT);\n\t\t\tif (\n\t\t\t\tsbuf.buffer === buf.buffer &&\n\t\t\t\t(\n\t\t\t\t\tsbuf.byteOffset < j &&\n\t\t\t\t\tsbuf.byteOffset+sbuf.byteLength > j\n\t\t\t\t)\n\t\t\t) {\n\t\t\t\t// We need to copy source values...\n\t\t\t\ttmp = new Float64Array( N );\n\t\t\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\t\t\ttmp[ i ] = sbuf[ i ];\n\t\t\t\t}\n\t\t\t\tsbuf = tmp;\n\t\t\t}\n\t\t\tidx *= 2;\n\t\t\tN /= 2;\n\t\t\tj = 0;\n\t\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\t\tbuf[ idx ] = sbuf[ j ];\n\t\t\t\tbuf[ idx+1 ] = sbuf[ j+1 ];\n\t\t\t\tidx += 2; // stride\n\t\t\t\tj += 2; // stride\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\t// If an array contains only complex numbers, then we need to extract real and imaginary components...\n\t\tif ( idx+N > this._length ) {\n\t\t\tthrow new RangeError( 'invalid arguments. Target array lacks sufficient storage to accommodate source values.' );\n\t\t}\n\t\tidx *= 2;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\tv = value[ i ];\n\t\t\tbuf[ idx ] = real( v );\n\t\t\tbuf[ idx+1 ] = imag( v );\n\t\t\tidx += 2; // stride\n\t\t}\n\t\treturn;\n\t}\n\tthrow new TypeError( format( 'invalid argument. First argument must be either a complex number, an array-like object, or a complex number array. Value: `%s`.', value ) );\n\n\t/* eslint-enable no-underscore-dangle */\n});\n\n\n// EXPORTS //\n\nexport default Complex128Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport Float64Array from '@stdlib/array-float64';\nimport Float32Array from '@stdlib/array-float32';\nimport Int16Array from '@stdlib/array-int16';\nimport Int32Array from '@stdlib/array-int32';\nimport Int8Array from '@stdlib/array-int8';\nimport Uint16Array from '@stdlib/array-uint16';\nimport Uint32Array from '@stdlib/array-uint32';\nimport Uint8Array from '@stdlib/array-uint8';\nimport Uint8ClampedArray from '@stdlib/array-uint8c';\nimport Complex64Array from '@stdlib/array-complex64';\nimport Complex128Array from '@stdlib/array-complex128';\n\n\n// MAIN //\n\n// Mapping from data types to constructors...\nvar ctors = {\n\t'float64': Float64Array,\n\t'float32': Float32Array,\n\t'generic': Array, // TODO: replace with `stdlib` pkg\n\t'int16': Int16Array,\n\t'int32': Int32Array,\n\t'int8': Int8Array,\n\t'uint16': Uint16Array,\n\t'uint32': Uint32Array,\n\t'uint8': Uint8Array,\n\t'uint8c': Uint8ClampedArray,\n\t'complex64': Complex64Array,\n\t'complex128': Complex128Array\n};\n\n\n// EXPORTS //\n\nexport default ctors;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport table from './ctors.js';\n\n\n// MAIN //\n\n/**\n* Returns an array constructor.\n*\n* @param {string} dtype - data type\n* @returns {(Function|null)} constructor or null\n*\n* @example\n* var ctor = ctors( 'float64' );\n* // returns \n*\n* @example\n* var ctor = ctors( 'float' );\n* // returns null\n*/\nfunction ctors( dtype ) {\n\treturn table[ dtype ] || null;\n}\n\n\n// EXPORTS //\n\nexport default ctors;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport filled from '@stdlib/array-base-filled';\n\n\n// MAIN //\n\n/**\n* Returns a zero-filled \"generic\" array.\n*\n* @param {NonNegativeInteger} len - array length\n* @returns {Array} output array\n*\n* @example\n* var out = zeros( 3 );\n* // returns [ 0.0, 0.0, 0.0 ]\n*/\nfunction zeros( len ) {\n\treturn filled( 0.0, len );\n}\n\n\n// EXPORTS //\n\nexport default zeros;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Returns a filled \"generic\" array.\n*\n* @param {*} value - fill value\n* @param {NonNegativeInteger} len - array length\n* @returns {Array} filled array\n*\n* @example\n* var out = filled( 0.0, 3 );\n* // returns [ 0.0, 0.0, 0.0 ]\n*\n* @example\n* var out = filled( 'beep', 3 );\n* // returns [ 'beep', 'beep', 'beep' ]\n*/\nfunction filled( value, len ) {\n\tvar arr;\n\tvar i;\n\n\t// Manually push elements in order to ensure \"fast\" elements...\n\tarr = [];\n\tfor ( i = 0; i < len; i++ ) {\n\t\tarr.push( value );\n\t}\n\treturn arr;\n}\n\n\n// EXPORTS //\n\nexport default filled;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isNonNegativeInteger } from '@stdlib/assert-is-nonnegative-integer';\nimport ctors from '@stdlib/array-ctors';\nimport gzeros from '@stdlib/array-base-zeros';\nimport format from '@stdlib/string-format';\n\n\n// MAIN //\n\n/**\n* Creates a zero-filled array having a specified length.\n*\n* @param {NonNegativeInteger} length - array length\n* @param {string} [dtype=\"float64\"] - data type\n* @throws {TypeError} first argument must be a nonnegative integer\n* @throws {TypeError} second argument must be a recognized data type\n* @returns {(TypedArray|Array|ComplexArray)} array or typed array\n*\n* @example\n* var arr = zeros( 2 );\n* // returns [ 0.0, 0.0 ]\n*\n* @example\n* var arr = zeros( 2, 'float32' );\n* // returns [ 0.0, 0.0 ]\n*/\nfunction zeros( length ) {\n\tvar dtype;\n\tvar ctor;\n\tif ( !isNonNegativeInteger( length ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a nonnegative integer. Value: `%s`.', length ) );\n\t}\n\tif ( arguments.length > 1 ) {\n\t\tdtype = arguments[ 1 ];\n\t} else {\n\t\tdtype = 'float64';\n\t}\n\tif ( dtype === 'generic' ) {\n\t\treturn gzeros( length );\n\t}\n\tctor = ctors( dtype );\n\tif ( ctor === null ) {\n\t\tthrow new TypeError( format( 'invalid argument. Second argument must be a recognized data type. Value: `%s`.', dtype ) );\n\t}\n\treturn new ctor( length ); // WARNING: we assume that, apart from 'generic', the constructors for supported array data types are zero-filled by default\n}\n\n\n// EXPORTS //\n\nexport default zeros;\n","/**\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// MODULES //\n\nimport zeros from '@stdlib/array-zeros';\n\n\n// MAIN //\n\n/**\n* Creates an uninitialized array having a specified length.\n*\n* @private\n* @param {NonNegativeInteger} length - array length\n* @param {string} [dtype=\"float64\"] - data type\n* @throws {TypeError} first argument must be a nonnegative integer\n* @throws {TypeError} second argument must be a recognized data type\n* @returns {(TypedArray|Array|ComplexArray)} array or typed array\n*\n* @example\n* var arr = empty( 2 );\n* // returns \n*\n* @example\n* var arr = empty( 2, 'float32' );\n* // returns \n*/\nfunction empty( length ) {\n\tif ( arguments.length > 1 ) {\n\t\treturn zeros( length, arguments[ 1 ] );\n\t}\n\treturn zeros( length );\n}\n\n\n// EXPORTS //\n\nexport default empty;\n"],"names":["main","Object","defineProperty","isNumber","value","zeros","n","i","out","zeroPad","str","width","right","negative","pad","length","startsWithMinus","substr","lowercase","String","prototype","toLowerCase","uppercase","toUpperCase","formatInteger","token","base","specifier","arg","parseInt","isFinite","Error","toString","precision","padRight","sign","alternate","call","charAt","isString","abs","Math","replace","RE_EXP_POS_DIGITS","RE_EXP_NEG_DIGITS","RE_ONLY_DIGITS","RE_DIGITS_BEFORE_EXP","RE_TRAILING_PERIOD_ZERO","RE_PERIOD_ZERO_EXP","RE_ZERO_BEFORE_EXP","formatDouble","digits","f","parseFloat","toExponential","toFixed","toPrecision","spaces","spacePad","fromCharCode","isnan","isNaN","isArray","Array","initialize","flags","mapping","formatInterpolate","tokens","hasPeriod","flag","num","pos","j","TypeError","padZeros","indexOf","arguments","maxWidth","substring","RE","parse","match","formatTokenize","content","prev","exec","slice","lastIndex","push","format","args","tokenize","interpolate","apply","objectProtoype","toStr","defineGetter","__defineGetter__","defineSetter","__defineSetter__","lookupGetter","__lookupGetter__","lookupSetter","__lookupSetter__","err","hasDefinePropertySupport","builtin","obj","prop","descriptor","hasValue","hasGet","hasSet","__proto__","get","set","defineProperty$1","setNonEnumerableReadOnly","configurable","enumerable","writable","FLG","Symbol","hasToStringTagSupport","toStringTag","has","hasOwnProperty","hasOwnProp","property","Sym","toStrTag","nativeClass","hasToStringTag","v","isOwn","tag","main$b","Number","test","isPrimitive","isObject","setReadOnly","FLOAT64_PINF","POSITIVE_INFINITY","FLOAT64_NINF","NEGATIVE_INFINITY","floor","isInteger","x","PINF","NINF","isInt","valueOf","isNonNegativeInteger","hasFloat64Array","Float64Array","ctor","Float64Array$1","bool","arr","GlobalFloat64Array","NaN","hasFloat64ArraySupport","hasFloat32Array","Float32Array","Float32Array$1","GlobalFloat32Array","hasFloat32ArraySupport","hasInt16Array","Int16Array","Int16Array$1","GlobalInt16Array","INT16_MAX","hasInt16ArraySupport","hasInt32Array","Int32Array","Int32Array$1","GlobalInt32Array","INT32_MAX","hasInt32ArraySupport","hasInt8Array","Int8Array","Int8Array$1","GlobalInt8Array","INT8_MAX","hasInt8ArraySupport","hasUint16Array","Uint16Array","Uint16Array$1","GlobalUint16Array","UINT16_MAX","hasUint16ArraySupport","hasUint32Array","Uint32Array","Uint32Array$1","GlobalUint32Array","UINT32_MAX","hasUint32ArraySupport","hasUint8Array","Uint8Array","Uint8Array$1","GlobalUint8Array","UINT8_MAX","hasUint8ArraySupport","hasUint8ClampedArray","Uint8ClampedArray","Uint8ClampedArray$1","GlobalUint8ClampedArray","hasUint8ClampedArraySupport","isArrayLikeObject","isCollection","hasArrayBuffer","ArrayBuffer","isArrayBuffer","main$1","isBoolean","Bool","Boolean","getGlobal","Function","self","window","global","globalThis","root","codegen","getThis","GlobalThis","Self","Win","Global","nodeList","document","childNodes","typedarray","reFunctionName","RE_FUNCTION_NAME","isObjectLike","constructorName","name","constructor","_isBuffer","isBuffer","REGEXP","predicate","len","arrayfun","ctorName","type","isFunction","typeOf","Complex128","real","imag","this","re","im","fround","FLOAT32_VIEW","float64ToFloat32$1","Complex64","float64ToFloat32","isComplexLike","isEven","hasIteratorSymbolSupport","iterator","IteratorSymbol","setNonEnumerableReadOnlyAccessor","getter","realf","z","imagf","reinterpret","offset","buffer","byteOffset","BYTES_PER_ELEMENT","GETTERS","float64","idx","float32","int32","int16","int8","uint32","uint16","uint8","uint8c","generic","default","dtype","complex128","complex64","fromIterator","it","next","done","fromIteratorMap","clbk","thisArg","fromArray","buf","HAS_ITERATOR_SYMBOL","isComplexArray","Complex64Array","_length","_buffer","isComplexArrayConstructor","isComplex64Array","isComplex128Array","nargs","RangeError","reinterpret64","reinterpret128","byteLength","ITERATOR_SYMBOL","src","tmp","flg","accessorGetter","setReadOnlyAccessor","target","start","copyWithin","iter","entries","sbuf","N","Complex128Array","ctors","table","filled","gzeros","empty"],"mappings":";;AAsBA,IAAIA,EAA0C,mBAA1BC,OAAOC,eAAkCD,OAAOC,eAAiB,KCiCrF,IAAIA,EAAiBD,OAAOC,eCjB5B,SAASC,EAAUC,GAClB,MAA0B,iBAAVA,CACjB,CCAA,SAASC,EAAOC,GACf,IACIC,EADAC,EAAM,GAEV,IAAMD,EAAI,EAAGA,EAAID,EAAGC,IACnBC,GAAO,IAER,OAAOA,CACR,CAcA,SAASC,EAASC,EAAKC,EAAOC,GAC7B,IAAIC,GAAW,EACXC,EAAMH,EAAQD,EAAIK,OACtB,OAAKD,EAAM,IAnCZ,SAA0BJ,GACzB,MAAoB,MAAbA,EAAK,EACb,CAoCMM,CAAiBN,KACrBG,GAAW,EACXH,EAAMA,EAAIO,OAAQ,IAEnBP,EAAM,EACLA,EAAML,EAAOS,GACbT,EAAOS,GAAQJ,EACXG,IACJH,EAAM,IAAMA,IAVLA,CAaT,CCpDA,IAAIQ,EAAYC,OAAOC,UAAUC,YAC7BC,EAAYH,OAAOC,UAAUG,YAajC,SAASC,EAAeC,GACvB,IAAIC,EACAlB,EACAD,EAEJ,OAASkB,EAAME,WACf,IAAK,IAEJD,EAAO,EACP,MACD,IAAK,IAEJA,EAAO,EACP,MACD,IAAK,IACL,IAAK,IAEJA,EAAO,GACP,MAID,QAECA,EAAO,GAKR,GAFAlB,EAAMiB,EAAMG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AzE,KAAAmD,QACA,MAAA,IAAAM,WAAA,0FAGA,IADAhC,GAAA,EACAjR,EAAA,EAAAA,EAAAiU,EAAAjU,IACA+H,EAAAlI,EAAAG,GACAuS,EAAAtB,GAAA3B,GAAAvH,GACAwK,EAAAtB,EAAA,GAAA1B,GAAAxH,GACAkJ,GAAA,CAxDA,CA+DA,ICz/BA,IAAIkD,GAAQ,CACXnD,QAAW3H,GACX6H,QAAWpH,GACX4H,QAAWlO,MACX4N,MAASjH,GACTgH,MAAS1G,GACT4G,KAAQtG,GACRwG,OAAUlG,GACViG,OAAU3F,GACV6F,MAASvF,GACTwF,OAAUlF,GACVuF,UAAaY,GACbb,WAAcqC,ICTf,SAASC,GAAOvC,GACf,OAAOwC,GAAOxC,IAAW,IAC1B,CCNA,SAAS9R,GAAOiP,GACf,OCDD,SAAiBlP,EAAOkP,GACvB,IAAItF,EACAzJ,EAIJ,IADAyJ,EAAM,GACAzJ,EAAI,EAAGA,EAAI+O,EAAK/O,IACrByJ,EAAIvE,KAAMrF,GAEX,OAAO4J,CACR,CDTQ4K,CAAQ,EAAKtF,EACrB,CEQA,SAASjP,GAAOU,GACf,IAAIoR,EACAtI,EACJ,IAAMH,GAAsB3I,GAC3B,MAAM,IAAI2D,UAAWgB,EAAQ,+EAAgF3E,IAO9G,GAAe,aAJdoR,EADItN,UAAU9D,OAAS,EACf8D,UAAW,GAEX,WAGR,OAAOgQ,GAAQ9T,GAGhB,GAAc,QADd8I,EAAO6K,GAAOvC,IAEb,MAAM,IAAIzN,UAAWgB,EAAQ,iFAAkFyM,IAEhH,OAAO,IAAItI,EAAM9I,EAClB,CCrBA,SAAS+T,GAAO/T,GACf,OAAK8D,UAAU9D,OAAS,EAChBV,GAAOU,EAAQ8D,UAAW,IAE3BxE,GAAOU,EACf"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index a62cdb0..0000000 --- a/stats.html +++ /dev/null @@ -1,6177 +0,0 @@ - - - - - - - - Rollup Visualizer - - - -
- - - - - From ad76089395cdedf74dec438fd59fca5acccd3adc Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sat, 2 Dec 2023 12:11:15 +0000 Subject: [PATCH 30/75] 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 | 34 +- benchmark/benchmark.js | 264 - benchmark/benchmark.length.complex128.js | 93 - benchmark/benchmark.length.complex64.js | 93 - benchmark/benchmark.length.float32.js | 93 - benchmark/benchmark.length.float64.js | 93 - benchmark/benchmark.length.generic.js | 93 - benchmark/benchmark.length.int16.js | 93 - benchmark/benchmark.length.int32.js | 93 - benchmark/benchmark.length.int8.js | 93 - benchmark/benchmark.length.uint16.js | 93 - benchmark/benchmark.length.uint32.js | 93 - benchmark/benchmark.length.uint8.js | 93 - benchmark/benchmark.length.uint8c.js | 93 - branches.md | 53 - dist/index.d.ts | 3 - dist/index.js | 9 - dist/index.js.map | 7 - docs/repl.txt | 52 - docs/types/test.ts | 77 - examples/index.js | 33 - lib/index.js | 58 - lib/is_buffer_uint8array.js | 47 - lib/main.js | 101 - lib/polyfill.js | 56 - docs/types/index.d.ts => mod.d.ts | 2 +- mod.js | 4 + mod.js.map | 1 + package.json | 80 +- stats.html | 6177 +++++++++++++++++++++ test/dist/test.js | 33 - test/test.js | 60 - test/test.main.js | 274 - test/test.polyfill.js | 324 -- 58 files changed, 6194 insertions(+), 5834 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 benchmark/benchmark.js delete mode 100644 benchmark/benchmark.length.complex128.js delete mode 100644 benchmark/benchmark.length.complex64.js delete mode 100644 benchmark/benchmark.length.float32.js delete mode 100644 benchmark/benchmark.length.float64.js delete mode 100644 benchmark/benchmark.length.generic.js delete mode 100644 benchmark/benchmark.length.int16.js delete mode 100644 benchmark/benchmark.length.int32.js delete mode 100644 benchmark/benchmark.length.int8.js delete mode 100644 benchmark/benchmark.length.uint16.js delete mode 100644 benchmark/benchmark.length.uint32.js delete mode 100644 benchmark/benchmark.length.uint8.js delete mode 100644 benchmark/benchmark.length.uint8c.js 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/repl.txt delete mode 100644 docs/types/test.ts delete mode 100644 examples/index.js delete mode 100644 lib/index.js delete mode 100644 lib/is_buffer_uint8array.js delete mode 100644 lib/main.js delete mode 100644 lib/polyfill.js rename docs/types/index.d.ts => mod.d.ts (99%) create mode 100644 mod.js create mode 100644 mod.js.map create mode 100644 stats.html delete mode 100644 test/dist/test.js delete mode 100644 test/test.js delete mode 100644 test/test.main.js delete mode 100644 test/test.polyfill.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 984d227..0000000 --- a/.github/.keepalive +++ /dev/null @@ -1 +0,0 @@ -2023-12-01T05:53:54.336Z diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index 96f81a8..0000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,7 +0,0 @@ - - -We are excited about your pull request, but unfortunately we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/empty) 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 ddb353e..0000000 --- a/.github/workflows/close_pull_requests.yml +++ /dev/null @@ -1,54 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: close_pull_requests - -# Workflow triggers: -on: - pull_request_target: - types: [opened] - -# Workflow jobs: -jobs: - - # Define job to close all pull requests: - run: - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Close pull request - - name: 'Close pull request' - # Pin action to full length commit SHA corresponding to v3.1.2 - uses: superbrothers/close-pull-request@9c18513d320d7b2c7185fb93396d0c664d5d8448 - with: - comment: | - Thank you for submitting a pull request. :raised_hands: - - We greatly appreciate your willingness to submit a contribution. However, we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). - - We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/empty) 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 dc9e63f..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: '49 1 * * 5' - - # 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 + + + + 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 8e62cb8..0000000 --- a/test/test.js +++ /dev/null @@ -1,60 +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 proxyquire = require( 'proxyquire' ); -var main = require( './../lib/main.js' ); -var polyfill = require( './../lib/polyfill.js' ); -var empty = require( './../lib' ); - - -// TESTS // - -tape( 'main export is a function', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof empty, 'function', 'main export is a function' ); - t.end(); -}); - -tape( 'if an environment supports Node.js buffer instances inheriting from Uint8Array, the main export supports returning arrays having uninitialized memory', function test( t ) { - var empty = proxyquire( './../lib', { - './is_buffer_uint8array.js': mock - }); - t.strictEqual( empty, main, 'returns expected value' ); - t.end(); - - function mock() { - return true; - } -}); - -tape( 'if an environment does not support Node.js buffer instances inheriting from Uint8Array, the main export supports returning zero-filled arrays', function test( t ) { - var empty = proxyquire( './../lib', { - './is_buffer_uint8array.js': mock - }); - t.strictEqual( empty, polyfill, 'returns expected value' ); - t.end(); - - function mock() { - return false; - } -}); diff --git a/test/test.main.js b/test/test.main.js deleted file mode 100644 index 3ceb26e..0000000 --- a/test/test.main.js +++ /dev/null @@ -1,274 +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 Float64Array = require( '@stdlib/array-float64' ); -var Float32Array = require( '@stdlib/array-float32' ); -var Int32Array = require( '@stdlib/array-int32' ); -var Uint32Array = require( '@stdlib/array-uint32' ); -var Int16Array = require( '@stdlib/array-int16' ); -var Uint16Array = require( '@stdlib/array-uint16' ); -var Int8Array = require( '@stdlib/array-int8' ); -var Uint8Array = require( '@stdlib/array-uint8' ); -var Uint8ClampedArray = require( '@stdlib/array-uint8c' ); -var Complex64Array = require( '@stdlib/array-complex64' ); -var Complex128Array = require( '@stdlib/array-complex128' ); -var instanceOf = require( '@stdlib/assert-instance-of' ); -var empty = require( './../lib/main.js' ); - - -// TESTS // - -tape( 'main export is a function', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof empty, 'function', 'main export is a function' ); - t.end(); -}); - -tape( 'the function throws an error if provided a value other than a nonnegative integer for the first argument', function test( t ) { - var values; - var i; - - values = [ - '5', - -3, - 3.14, - NaN, - true, - false, - null, - void 0, - [], - {}, - function noop() {} - ]; - - for ( i = 0; i < values.length; i++ ) { - t.throws( badValue( values[i] ), TypeError, 'throws an error when provided '+values[i] ); - } - t.end(); - - function badValue( value ) { - return function badValue() { - empty( value ); - }; - } -}); - -tape( 'the function throws an error if provided a value other than a nonnegative integer for the first argument (dtype)', function test( t ) { - var values; - var i; - - values = [ - '5', - -3, - 3.14, - NaN, - true, - false, - null, - void 0, - [], - {}, - function noop() {} - ]; - - for ( i = 0; i < values.length; i++ ) { - t.throws( badValue( values[i] ), TypeError, 'throws an error when provided '+values[i] ); - } - t.end(); - - function badValue( value ) { - return function badValue() { - empty( value, 'float32' ); - }; - } -}); - -tape( 'the function throws an error if provided an unrecognized data type', function test( t ) { - var values; - var i; - - values = [ - '5', - 'beep', - 'empty', - 'Int32', - 'Uint32', - 'Int16', - 'Uint16', - 'Int8', - 'Uint8', - 'Uint8c', - 'uint8_clamped', - 'Float64', - 'Float32', - 'FLOAT64', - 'FLOAT32', - 'GENERIC' - ]; - - for ( i = 0; i < values.length; i++ ) { - t.throws( badValue( values[i] ), TypeError, 'throws an error when provided '+values[i] ); - } - t.end(); - - function badValue( value ) { - return function badValue() { - empty( 10, value ); - }; - } -}); - -tape( 'the function returns an empty array (default)', function test( t ) { - var arr; - - arr = empty( 5 ); - t.strictEqual( instanceOf( arr, Float64Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=float64)', function test( t ) { - var arr; - - arr = empty( 5, 'float64' ); - t.strictEqual( instanceOf( arr, Float64Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=float32)', function test( t ) { - var arr; - - arr = empty( 5, 'float32' ); - t.strictEqual( instanceOf( arr, Float32Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=complex128)', function test( t ) { - var arr; - - arr = empty( 5, 'complex128' ); - t.strictEqual( instanceOf( arr, Complex128Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=complex64)', function test( t ) { - var arr; - - arr = empty( 5, 'complex64' ); - t.strictEqual( instanceOf( arr, Complex64Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=int32)', function test( t ) { - var arr; - - arr = empty( 5, 'int32' ); - t.strictEqual( instanceOf( arr, Int32Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=uint32)', function test( t ) { - var arr; - - arr = empty( 5, 'uint32' ); - t.strictEqual( instanceOf( arr, Uint32Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=int16)', function test( t ) { - var arr; - - arr = empty( 5, 'int16' ); - t.strictEqual( instanceOf( arr, Int16Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=uint16)', function test( t ) { - var arr; - - arr = empty( 5, 'uint16' ); - t.strictEqual( instanceOf( arr, Uint16Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=int8)', function test( t ) { - var arr; - - arr = empty( 5, 'int8' ); - t.strictEqual( instanceOf( arr, Int8Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=uint8)', function test( t ) { - var arr; - - arr = empty( 5, 'uint8' ); - t.strictEqual( instanceOf( arr, Uint8Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=uint8c)', function test( t ) { - var arr; - - arr = empty( 5, 'uint8c' ); - t.strictEqual( instanceOf( arr, Uint8ClampedArray ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=generic)', function test( t ) { - var expected; - var arr; - - expected = [ 0, 0, 0, 0, 0 ]; - - arr = empty( 5, 'generic' ); - t.strictEqual( instanceOf( arr, Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); diff --git a/test/test.polyfill.js b/test/test.polyfill.js deleted file mode 100644 index 17b99f3..0000000 --- a/test/test.polyfill.js +++ /dev/null @@ -1,324 +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 Float64Array = require( '@stdlib/array-float64' ); -var Float32Array = require( '@stdlib/array-float32' ); -var Int32Array = require( '@stdlib/array-int32' ); -var Uint32Array = require( '@stdlib/array-uint32' ); -var Int16Array = require( '@stdlib/array-int16' ); -var Uint16Array = require( '@stdlib/array-uint16' ); -var Int8Array = require( '@stdlib/array-int8' ); -var Uint8Array = require( '@stdlib/array-uint8' ); -var Uint8ClampedArray = require( '@stdlib/array-uint8c' ); -var Complex64Array = require( '@stdlib/array-complex64' ); -var Complex128Array = require( '@stdlib/array-complex128' ); -var reinterpret64 = require( '@stdlib/strided-base-reinterpret-complex64' ); -var reinterpret128 = require( '@stdlib/strided-base-reinterpret-complex128' ); -var instanceOf = require( '@stdlib/assert-instance-of' ); -var empty = require( './../lib/polyfill.js' ); - - -// TESTS // - -tape( 'main export is a function', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof empty, 'function', 'main export is a function' ); - t.end(); -}); - -tape( 'the function throws an error if provided a value other than a nonnegative integer for the first argument', function test( t ) { - var values; - var i; - - values = [ - '5', - -3, - 3.14, - NaN, - true, - false, - null, - void 0, - [], - {}, - function noop() {} - ]; - - for ( i = 0; i < values.length; i++ ) { - t.throws( badValue( values[i] ), TypeError, 'throws an error when provided '+values[i] ); - } - t.end(); - - function badValue( value ) { - return function badValue() { - empty( value ); - }; - } -}); - -tape( 'the function throws an error if provided a value other than a nonnegative integer for the first argument (dtype)', function test( t ) { - var values; - var i; - - values = [ - '5', - -3, - 3.14, - NaN, - true, - false, - null, - void 0, - [], - {}, - function noop() {} - ]; - - for ( i = 0; i < values.length; i++ ) { - t.throws( badValue( values[i] ), TypeError, 'throws an error when provided '+values[i] ); - } - t.end(); - - function badValue( value ) { - return function badValue() { - empty( value, 'float32' ); - }; - } -}); - -tape( 'the function throws an error if provided an unrecognized data type', function test( t ) { - var values; - var i; - - values = [ - '5', - 'beep', - 'empty', - 'Int32', - 'Uint32', - 'Int16', - 'Uint16', - 'Int8', - 'Uint8', - 'Uint8c', - 'uint8_clamped', - 'Float64', - 'Float32', - 'FLOAT64', - 'FLOAT32', - 'GENERIC' - ]; - - for ( i = 0; i < values.length; i++ ) { - t.throws( badValue( values[i] ), TypeError, 'throws an error when provided '+values[i] ); - } - t.end(); - - function badValue( value ) { - return function badValue() { - empty( 10, value ); - }; - } -}); - -tape( 'the function returns a zero-filled array (default)', function test( t ) { - var expected; - var arr; - - expected = new Float64Array( [ 0.0, 0.0, 0.0, 0.0, 0.0 ] ); - - arr = empty( 5 ); - t.strictEqual( instanceOf( arr, Float64Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=float64)', function test( t ) { - var expected; - var arr; - - expected = new Float64Array( [ 0.0, 0.0, 0.0, 0.0, 0.0 ] ); - - arr = empty( 5, 'float64' ); - t.strictEqual( instanceOf( arr, Float64Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=float32)', function test( t ) { - var expected; - var arr; - - expected = new Float32Array( [ 0.0, 0.0, 0.0, 0.0, 0.0 ] ); - - arr = empty( 5, 'float32' ); - t.strictEqual( instanceOf( arr, Float32Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=complex128)', function test( t ) { - var expected; - var arr; - - expected = new Float64Array( [ 0.0, 0.0, 0.0, 0.0 ] ); - - arr = empty( 2, 'complex128' ); - t.strictEqual( instanceOf( arr, Complex128Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length/2, 'returns expected value' ); - t.deepEqual( reinterpret128( arr, 0 ), expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=complex64)', function test( t ) { - var expected; - var arr; - - expected = new Float32Array( [ 0.0, 0.0, 0.0, 0.0 ] ); - - arr = empty( 2, 'complex64' ); - t.strictEqual( instanceOf( arr, Complex64Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length/2, 'returns expected value' ); - t.deepEqual( reinterpret64( arr, 0 ), expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=int32)', function test( t ) { - var expected; - var arr; - - expected = new Int32Array( [ 0, 0, 0, 0, 0 ] ); - - arr = empty( 5, 'int32' ); - t.strictEqual( instanceOf( arr, Int32Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=uint32)', function test( t ) { - var expected; - var arr; - - expected = new Uint32Array( [ 0, 0, 0, 0, 0 ] ); - - arr = empty( 5, 'uint32' ); - t.strictEqual( instanceOf( arr, Uint32Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=int16)', function test( t ) { - var expected; - var arr; - - expected = new Int16Array( [ 0, 0, 0, 0, 0 ] ); - - arr = empty( 5, 'int16' ); - t.strictEqual( instanceOf( arr, Int16Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=uint16)', function test( t ) { - var expected; - var arr; - - expected = new Uint16Array( [ 0, 0, 0, 0, 0 ] ); - - arr = empty( 5, 'uint16' ); - t.strictEqual( instanceOf( arr, Uint16Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=int8)', function test( t ) { - var expected; - var arr; - - expected = new Int8Array( [ 0, 0, 0, 0, 0 ] ); - - arr = empty( 5, 'int8' ); - t.strictEqual( instanceOf( arr, Int8Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=uint8)', function test( t ) { - var expected; - var arr; - - expected = new Uint8Array( [ 0, 0, 0, 0, 0 ] ); - - arr = empty( 5, 'uint8' ); - t.strictEqual( instanceOf( arr, Uint8Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=uint8c)', function test( t ) { - var expected; - var arr; - - expected = new Uint8ClampedArray( [ 0, 0, 0, 0, 0 ] ); - - arr = empty( 5, 'uint8c' ); - t.strictEqual( instanceOf( arr, Uint8ClampedArray ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=generic)', function test( t ) { - var expected; - var arr; - - expected = [ 0, 0, 0, 0, 0 ]; - - arr = empty( 5, 'generic' ); - t.strictEqual( instanceOf( arr, Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); From 07ac33ef03b1021386b16c9492dffcddb219d120 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Mon, 1 Jan 2024 08:19:33 +0000 Subject: [PATCH 31/75] Transform error messages --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index dab29f8..905e694 100644 --- a/package.json +++ b/package.json @@ -45,7 +45,7 @@ "@stdlib/assert-is-uint8array": "^0.1.1", "@stdlib/buffer-alloc-unsafe": "^0.1.0", "@stdlib/ndarray-base-bytes-per-element": "^0.1.0", - "@stdlib/string-format": "^0.1.1", + "@stdlib/error-tools-fmtprodmsg": "^0.1.1", "@stdlib/types": "^0.2.0" }, "devDependencies": { From 163a204e0e1d049157a4ba4c4d04b49e1b276852 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Mon, 1 Jan 2024 14:59:39 +0000 Subject: [PATCH 32/75] Remove files --- mod.d.ts | 277 --- mod.js | 4 - mod.js.map | 1 - stats.html | 6177 ---------------------------------------------------- 4 files changed, 6459 deletions(-) delete mode 100644 mod.d.ts delete mode 100644 mod.js delete mode 100644 mod.js.map delete mode 100644 stats.html diff --git a/mod.d.ts b/mod.d.ts deleted file mode 100644 index c071f4d..0000000 --- a/mod.d.ts +++ /dev/null @@ -1,277 +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 - -/// - -import { Complex128Array, Complex64Array, DataType } from '@stdlib/types/array'; - -/** -* Creates an uninitialized array having a specified length. -* -* ## Notes -* -* - In browser environments, the function always returns zero-filled arrays. -* - In Node.js versions `>=3.0.0`, the underlying memory of returned typed arrays is **not** initialized. Memory contents are unknown and may contain **sensitive** data. -* -* @param length - array length -* @param dtype - data type -* @returns empty array -* -* @example -* var arr = empty( 2, 'float64' ); -* // returns -*/ -declare function empty( length: number, dtype: 'float64' ): Float64Array; - -/** -* Creates an uninitialized array having a specified length. -* -* ## Notes -* -* - In browser environments, the function always returns zero-filled arrays. -* - In Node.js versions `>=3.0.0`, the underlying memory of returned typed arrays is **not** initialized. Memory contents are unknown and may contain **sensitive** data. -* -* @param length - array length -* @param dtype - data type -* @returns empty array -* -* @example -* var arr = empty( 2, 'float32' ); -* // returns -*/ -declare function empty( length: number, dtype: 'float32' ): Float32Array; - -/** -* Creates an uninitialized array having a specified length. -* -* ## Notes -* -* - In browser environments, the function always returns zero-filled arrays. -* - In Node.js versions `>=3.0.0`, the underlying memory of returned typed arrays is **not** initialized. Memory contents are unknown and may contain **sensitive** data. -* -* @param length - array length -* @param dtype - data type -* @returns empty array -* -* @example -* var arr = empty( 2, 'complex128' ); -* // returns -*/ -declare function empty( length: number, dtype: 'complex128' ): Complex128Array; - -/** -* Creates an uninitialized array having a specified length. -* -* ## Notes -* -* - In browser environments, the function always returns zero-filled arrays. -* - In Node.js versions `>=3.0.0`, the underlying memory of returned typed arrays is **not** initialized. Memory contents are unknown and may contain **sensitive** data. -* -* @param length - array length -* @param dtype - data type -* @returns empty array -* -* @example -* var arr = empty( 2, 'complex64' ); -* // returns -*/ -declare function empty( length: number, dtype: 'complex64' ): Complex64Array; - -/** -* Creates an uninitialized array having a specified length. -* -* ## Notes -* -* - In browser environments, the function always returns zero-filled arrays. -* - In Node.js versions `>=3.0.0`, the underlying memory of returned typed arrays is **not** initialized. Memory contents are unknown and may contain **sensitive** data. -* -* @param length - array length -* @param dtype - data type -* @returns empty array -* -* @example -* var arr = empty( 2, 'int32' ); -* // returns -*/ -declare function empty( length: number, dtype: 'int32' ): Int32Array; - -/** -* Creates an uninitialized array having a specified length. -* -* ## Notes -* -* - In browser environments, the function always returns zero-filled arrays. -* - In Node.js versions `>=3.0.0`, the underlying memory of returned typed arrays is **not** initialized. Memory contents are unknown and may contain **sensitive** data. -* -* @param length - array length -* @param dtype - data type -* @returns empty array -* -* @example -* var arr = empty( 2, 'int16' ); -* // returns -*/ -declare function empty( length: number, dtype: 'int16' ): Int16Array; - -/** -* Creates an uninitialized array having a specified length. -* -* ## Notes -* -* - In browser environments, the function always returns zero-filled arrays. -* - In Node.js versions `>=3.0.0`, the underlying memory of returned typed arrays is **not** initialized. Memory contents are unknown and may contain **sensitive** data. -* -* @param length - array length -* @param dtype - data type -* @returns empty array -* -* @example -* var arr = empty( 2, 'int8' ); -* // returns -*/ -declare function empty( length: number, dtype: 'int8' ): Int8Array; - -/** -* Creates an uninitialized array having a specified length. -* -* ## Notes -* -* - In browser environments, the function always returns zero-filled arrays. -* - In Node.js versions `>=3.0.0`, the underlying memory of returned typed arrays is **not** initialized. Memory contents are unknown and may contain **sensitive** data. -* -* @param length - array length -* @param dtype - data type -* @returns empty array -* -* @example -* var arr = empty( 2, 'uint32' ); -* // returns -*/ -declare function empty( length: number, dtype: 'uint32' ): Uint32Array; - -/** -* Creates an uninitialized array having a specified length. -* -* ## Notes -* -* - In browser environments, the function always returns zero-filled arrays. -* - In Node.js versions `>=3.0.0`, the underlying memory of returned typed arrays is **not** initialized. Memory contents are unknown and may contain **sensitive** data. -* -* @param length - array length -* @param dtype - data type -* @returns empty array -* -* @example -* var arr = empty( 2, 'uint16' ); -* // returns -*/ -declare function empty( length: number, dtype: 'uint16' ): Uint16Array; - -/** -* Creates an uninitialized array having a specified length. -* -* ## Notes -* -* - In browser environments, the function always returns zero-filled arrays. -* - In Node.js versions `>=3.0.0`, the underlying memory of returned typed arrays is **not** initialized. Memory contents are unknown and may contain **sensitive** data. -* -* @param length - array length -* @param dtype - data type -* @returns empty array -* -* @example -* var arr = empty( 2, 'uint8' ); -* // returns -*/ -declare function empty( length: number, dtype: 'uint8' ): Uint8Array; - -/** -* Creates an uninitialized array having a specified length. -* -* ## Notes -* -* - In browser environments, the function always returns zero-filled arrays. -* - In Node.js versions `>=3.0.0`, the underlying memory of returned typed arrays is **not** initialized. Memory contents are unknown and may contain **sensitive** data. -* -* @param length - array length -* @param dtype - data type -* @returns empty array -* -* @example -* var arr = empty( 2, 'uint8c' ); -* // returns -*/ -declare function empty( length: number, dtype: 'uint8c' ): Uint8ClampedArray; - -/** -* Creates a zero-filled array having a specified length. -* -* @param length - array length -* @param dtype - data type -* @returns zero-filled array -* -* @example -* var arr = empty( 2, 'generic' ); -* // returns -*/ -declare function empty( length: number, dtype: 'generic' ): Array; - -/** -* Creates an uninitialized array having a specified length. -* -* ## Notes -* -* - In browser environments, the function always returns zero-filled arrays. -* - If `dtype` is `'generic'`, the function always returns a zero-filled array. -* - In Node.js versions `>=3.0.0`, the underlying memory of returned typed arrays is **not** initialized. Memory contents are unknown and may contain **sensitive** data. -* -* The function recognizes the following data types: -* -* - `float64`: double-precision floating-point numbers (IEEE 754) -* - `float32`: single-precision floating-point numbers (IEEE 754) -* - `complex128`: double-precision complex floating-point numbers -* - `complex64`: single-precision complex floating-point numbers -* - `int32`: 32-bit two's complement signed integers -* - `uint32`: 32-bit unsigned integers -* - `int16`: 16-bit two's complement signed integers -* - `uint16`: 16-bit unsigned integers -* - `int8`: 8-bit two's complement signed integers -* - `uint8`: 8-bit unsigned integers -* - `uint8c`: 8-bit unsigned integers clamped to `0-255` -* - `generic`: generic JavaScript values -* -* @param length - array length -* @param dtype - data type (default: 'float64') -* @returns empty array -* -* @example -* var arr = empty( 2 ); -* // returns -* -* @example -* var arr = empty( 2, 'float32' ); -* // returns -*/ -declare function empty( length: number, dtype?: DataType ): Float64Array; - - -// EXPORTS // - -export = empty; diff --git a/mod.js b/mod.js deleted file mode 100644 index ce435ce..0000000 --- a/mod.js +++ /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 -/// -var e="function"==typeof Object.defineProperty?Object.defineProperty:null;var r=Object.defineProperty;function t(e){return"number"==typeof e}function n(e){var r,t="";for(r=0;r0&&(r-=1),n=i.toExponential(r)):n=i.toPrecision(e.precision),e.alternate||(n=y.call(n,v,"$1e"),n=y.call(n,b,"e"),n=y.call(n,w,""));break;default:throw new Error("invalid double notation. Value: "+e.specifier)}return n=y.call(n,h,"e+0$1"),n=y.call(n,p,"e-0$1"),e.alternate&&(n=y.call(n,g,"$1."),n=y.call(n,m,"$1.e")),i>=0&&e.sign&&(n=e.sign+n),n=e.specifier===s.call(e.specifier)?s.call(n):c.call(n)}function E(e){var r,t="";for(r=0;r127)throw new Error("invalid character code. Value: "+n.arg);n.arg=_(a)?String(n.arg):T(a)}break;case"e":case"E":case"f":case"F":case"g":case"G":r||(n.precision=6),n.arg=d(n);break;default:throw new Error("invalid specifier: "+n.specifier)}n.maxWidth>=0&&n.arg.length>n.maxWidth&&(n.arg=n.arg.substring(0,n.maxWidth)),n.padZeros?n.arg=i(n.arg,n.width||n.precision,n.padRight):n.width&&(n.arg=A(n.arg,n.width,n.padRight)),l+=n.arg||"",c+=1}return l}var k=/%(?:([1-9]\d*)\$)?([0 +\-#]*)(\*|\d+)?(?:(\.)(\*|\d+)?)?[hlL]?([%A-Za-z])/g;function L(e){var r={mapping:e[1]?parseInt(e[1],10):void 0,flags:e[2],width:e[3],precision:e[5],specifier:e[6]};return"."===e[4]&&void 0===e[5]&&(r.precision="1"),r}function S(e){var r,t,n,i;for(t=[],i=0,n=k.exec(e);n;)(r=e.slice(i,k.lastIndex-n[0].length)).length&&t.push(r),t.push(L(n)),i=k.lastIndex,n=k.exec(e);return(r=e.slice(i)).length&&t.push(r),t}function R(e){return"string"==typeof e}function B(e){var r,t,n;if(!R(e))throw new TypeError(B("invalid argument. First argument must be a string. Value: `%s`.",e));for(r=S(e),(t=new Array(arguments.length))[0]=r,n=1;nne&&oe(e)}function ue(e){return W(e)&&ae(e)}function fe(e){return ee(e)&&ae(e.valueOf())}function le(e){return ue(e)||fe(e)}function ce(e){return ue(e)&&e>=0}function se(e){return fe(e)&&e.valueOf()>=0}function ye(e){return ce(e)||se(e)}Y(le,"isPrimitive",ue),Y(le,"isObject",fe),Y(ye,"isPrimitive",ce),Y(ye,"isObject",se);var he="function"==typeof Float64Array;var pe="function"==typeof Float64Array?Float64Array:null;var ge="function"==typeof Float64Array?Float64Array:void 0;var me=function(){var e,r,t;if("function"!=typeof pe)return!1;try{r=new pe([1,3.14,-3.14,NaN]),t=r,e=(he&&t instanceof Float64Array||"[object Float64Array]"===D(t))&&1===r[0]&&3.14===r[1]&&-3.14===r[2]&&r[3]!=r[3]}catch(r){e=!1}return e}()?ge:function(){throw new Error("not implemented")},we="function"==typeof Float32Array;var be="function"==typeof Float32Array?Float32Array:null;var ve="function"==typeof Float32Array?Float32Array:void 0;var de=function(){var e,r,t;if("function"!=typeof be)return!1;try{r=new be([1,3.14,-3.14,5e40]),t=r,e=(we&&t instanceof Float32Array||"[object Float32Array]"===D(t))&&1===r[0]&&3.140000104904175===r[1]&&-3.140000104904175===r[2]&&r[3]===te}catch(r){e=!1}return e}()?ve:function(){throw new Error("not implemented")},Ee="function"==typeof Int16Array;var Ae="function"==typeof Int16Array?Int16Array:null;var Te="function"==typeof Int16Array?Int16Array:void 0;var _e=function(){var e,r,t;if("function"!=typeof Ae)return!1;try{r=new Ae([1,3.14,-3.14,32768]),t=r,e=(Ee&&t instanceof Int16Array||"[object Int16Array]"===D(t))&&1===r[0]&&3===r[1]&&-3===r[2]&&-32768===r[3]}catch(r){e=!1}return e}()?Te:function(){throw new Error("not implemented")},xe="function"==typeof Int32Array;var je="function"==typeof Int32Array?Int32Array:null;var Ve="function"==typeof Int32Array?Int32Array:void 0;var ke=function(){var e,r,t;if("function"!=typeof je)return!1;try{r=new je([1,3.14,-3.14,2147483648]),t=r,e=(xe&&t instanceof Int32Array||"[object Int32Array]"===D(t))&&1===r[0]&&3===r[1]&&-3===r[2]&&-2147483648===r[3]}catch(r){e=!1}return e}()?Ve:function(){throw new Error("not implemented")},Le="function"==typeof Int8Array;var Se="function"==typeof Int8Array?Int8Array:null;var Re="function"==typeof Int8Array?Int8Array:void 0;var Be=function(){var e,r,t;if("function"!=typeof Se)return!1;try{r=new Se([1,3.14,-3.14,128]),t=r,e=(Le&&t instanceof Int8Array||"[object Int8Array]"===D(t))&&1===r[0]&&3===r[1]&&-3===r[2]&&-128===r[3]}catch(r){e=!1}return e}()?Re:function(){throw new Error("not implemented")},Ie="function"==typeof Uint16Array;var Ce="function"==typeof Uint16Array?Uint16Array:null;var Fe="function"==typeof Uint16Array?Uint16Array:void 0;var Oe=function(){var e,r,t;if("function"!=typeof Ce)return!1;try{r=new Ce(r=[1,3.14,-3.14,65536,65537]),t=r,e=(Ie&&t instanceof Uint16Array||"[object Uint16Array]"===D(t))&&1===r[0]&&3===r[1]&&65533===r[2]&&0===r[3]&&1===r[4]}catch(r){e=!1}return e}()?Fe:function(){throw new Error("not implemented")},Me="function"==typeof Uint32Array;var Ne="function"==typeof Uint32Array?Uint32Array:null;var Ue="function"==typeof Uint32Array?Uint32Array:void 0;var Pe=function(){var e,r,t;if("function"!=typeof Ne)return!1;try{r=new Ne(r=[1,3.14,-3.14,4294967296,4294967297]),t=r,e=(Me&&t instanceof Uint32Array||"[object Uint32Array]"===D(t))&&1===r[0]&&3===r[1]&&4294967293===r[2]&&0===r[3]&&1===r[4]}catch(r){e=!1}return e}()?Ue:function(){throw new Error("not implemented")},Ye="function"==typeof Uint8Array;var We="function"==typeof Uint8Array?Uint8Array:null;var $e="function"==typeof Uint8Array?Uint8Array:void 0;var Ge=function(){var e,r,t;if("function"!=typeof We)return!1;try{r=new We(r=[1,3.14,-3.14,256,257]),t=r,e=(Ye&&t instanceof Uint8Array||"[object Uint8Array]"===D(t))&&1===r[0]&&3===r[1]&&253===r[2]&&0===r[3]&&1===r[4]}catch(r){e=!1}return e}()?$e:function(){throw new Error("not implemented")},Ze="function"==typeof Uint8ClampedArray;var Xe="function"==typeof Uint8ClampedArray?Uint8ClampedArray:null;var ze="function"==typeof Uint8ClampedArray?Uint8ClampedArray:void 0;var Je=function(){var e,r,t;if("function"!=typeof Xe)return!1;try{r=new Xe([-1,0,1,3.14,4.99,255,256]),t=r,e=(Ze&&t instanceof Uint8ClampedArray||"[object Uint8ClampedArray]"===D(t))&&0===r[0]&&0===r[1]&&1===r[2]&&3===r[3]&&5===r[4]&&255===r[5]&&255===r[6]}catch(r){e=!1}return e}()?ze:function(){throw new Error("not implemented")};function qe(e){return"object"==typeof e&&null!==e&&"number"==typeof e.length&&oe(e.length)&&e.length>=0&&e.length<=4294967295}function De(e){return"object"==typeof e&&null!==e&&"number"==typeof e.length&&oe(e.length)&&e.length>=0&&e.length<=9007199254740991}var He="function"==typeof ArrayBuffer;function Ke(e){return He&&e instanceof ArrayBuffer||"[object ArrayBuffer]"===D(e)}var Qe=Array.isArray?Array.isArray:function(e){return"[object Array]"===D(e)};function er(e){return"object"==typeof e&&null!==e&&!Qe(e)}var rr=/./;function tr(e){return"boolean"==typeof e}var nr=Boolean,ir=Boolean.prototype.toString;var or=G();function ar(e){return"object"==typeof e&&(e instanceof nr||(or?function(e){try{return ir.call(e),!0}catch(e){return!1}}(e):"[object Boolean]"===D(e)))}function ur(e){return tr(e)||ar(e)}function fr(){return new Function("return this;")()}Y(ur,"isPrimitive",tr),Y(ur,"isObject",ar);var lr="object"==typeof self?self:null,cr="object"==typeof window?window:null,sr="undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},yr="object"==typeof sr?sr:null,hr="object"==typeof globalThis?globalThis:null;var pr=function(e){if(arguments.length){if(!tr(e))throw new TypeError(B("invalid argument. Must provide a boolean. Value: `%s`.",e));if(e)return fr()}if(hr)return hr;if(lr)return lr;if(cr)return cr;if(yr)return yr;throw new Error("unexpected error. Unable to resolve global object.")}(),gr=pr.document&&pr.document.childNodes,mr=Int8Array;function wr(){return/^\s*function\s*([^(]*)/i}var br=/^\s*function\s*([^(]*)/i;function vr(e){return null!==e&&"object"==typeof e}function dr(e){var r,t,n,i;if(("Object"===(t=D(e).slice(8,-1))||"Error"===t)&&e.constructor){if("string"==typeof(n=e.constructor).name)return n.name;if(r=br.exec(n.toString()))return r[1]}return vr(i=e)&&(i._isBuffer||i.constructor&&"function"==typeof i.constructor.isBuffer&&i.constructor.isBuffer(i))?"Buffer":t}Y(wr,"REGEXP",br),Y(vr,"isObjectLikeArray",function(e){if("function"!=typeof e)throw new TypeError(B("invalid argument. Must provide a function. Value: `%s`.",e));return function(r){var t,n;if(!Qe(r))return!1;if(0===(t=r.length))return!1;for(n=0;n=2)r.push(n[0],n[1]);else{if(!kr(n))return new TypeError(B("invalid argument. An iterator must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",n));r.push(Ir(n),Cr(n))}return r}function Wr(e,r,t){var n,i,o,a;for(n=[],a=-1;!(i=e.next()).done;)if(a+=1,qe(o=r.call(t,i.value,a))&&o.length>=2)n.push(o[0],o[1]);else{if(!kr(o))return new TypeError(B("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",o));n.push(Ir(o),Cr(o))}return n}function $r(e,r){var t,n,i,o;for(t=r.length,o=0,i=0;it.byteLength-e)throw new RangeError(B("invalid arguments. ArrayBuffer has insufficient capacity. Either decrease the array length or provide a bigger buffer. Minimum capacity: `%u`.",n*Gr));t=new de(t,e,2*n)}}return Y(this,"_buffer",t),Y(this,"_length",t.length/2),this}function Hr(e){return e.re}function Kr(e){return e.im}function Qr(e){var r,t,n;for(r=[];!(t=e.next()).done;)if(qe(n=t.value)&&n.length>=2)r.push(n[0],n[1]);else{if(!kr(n))return new TypeError(B("invalid argument. An iterator must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",n));r.push(Hr(n),Kr(n))}return r}function et(e,r,t){var n,i,o,a;for(n=[],a=-1;!(i=e.next()).done;)if(a+=1,qe(o=r.call(t,i.value,a))&&o.length>=2)n.push(o[0],o[1]);else{if(!kr(o))return new TypeError(B("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",o));n.push(Hr(o),Kr(o))}return n}function rt(e,r){var t,n,i,o;for(t=r.length,o=0,i=0;i1){if(!Ar(n=arguments[1]))throw new TypeError(B("invalid argument. Second argument must be a function. Value: `%s`.",n));t>2&&(r=arguments[2])}if(Xr(e)){if(f=e.length,n){for(o=(i=new this(f))._buffer,y=0,s=0;s=2))throw new TypeError(B("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",c));o[y]=c[0],o[y+1]=c[1]}y+=2}return i}return new this(e)}if(De(e)){if(n){for(f=e.length,u=e.get&&e.set?Pr("default"):Nr("default"),s=0;s=2))throw new TypeError(B("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",c));o[y]=c[0],o[y+1]=c[1]}y+=2}return i}return new this(e)}if(er(e)&&Zr&&Ar(e[Rr])){if(!Ar((o=e[Rr]()).next))throw new TypeError(B("invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.",e));if((a=n?Wr(o,n,r):Yr(o))instanceof Error)throw a;for(o=(i=new this(f=a.length/2))._buffer,s=0;s=n)return{done:!0};return r=new Vr(e[a+=2],e[a+1]),{value:[o,r],done:!1}})),Y(t,"return",(function(e){if(i=!0,arguments.length)return{value:e,done:!0};return{done:!0}})),Rr&&Y(t,Rr,(function(){return r.entries()})),t})),Y(Dr.prototype,"get",(function(e){var r;if(!Xr(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!ce(e))throw new TypeError(B("invalid argument. Must provide a nonnegative integer. Value: `%s`.",e));if(!(e>=this._length))return new Vr((r=this._buffer)[e*=2],r[e+1])})),Br(Dr.prototype,"length",(function(){return this._length})),Y(Dr.prototype,"set",(function(e){var r,t,n,i,o,a,u,f,l;if(!Xr(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(n=this._buffer,arguments.length>1){if(!ce(t=arguments[1]))throw new TypeError(B("invalid argument. Index argument must be a nonnegative integer. Value: `%s`.",t))}else t=0;if(kr(e)){if(t>=this._length)throw new RangeError(B("invalid argument. Index argument is out-of-bounds. Value: `%u`.",t));return n[t*=2]=Ir(e),void(n[t+1]=Cr(e))}if(Xr(e)){if(t+(a=e._length)>this._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");if(r=e._buffer,l=n.byteOffset+t*Gr,r.buffer===n.buffer&&r.byteOffsetl){for(i=new de(r.length),f=0;fthis._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");if(r=e,l=n.byteOffset+t*Gr,r.buffer===n.buffer&&r.byteOffsetl){for(i=new de(a),f=0;fthis._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");for(t*=2,f=0;ft.byteLength-e)throw new RangeError(B("invalid arguments. ArrayBuffer has insufficient capacity. Either decrease the array length or provide a bigger buffer. Minimum capacity: `%u`.",n*tt));t=new me(t,e,2*n)}}return Y(this,"_buffer",t),Y(this,"_length",t.length/2),this}Y(ft,"BYTES_PER_ELEMENT",tt),Y(ft,"name","Complex128Array"),Y(ft,"from",(function(e){var r,t,n,i,o,a,u,f,l,c,s,y;if(!Ar(this))throw new TypeError("invalid invocation. `this` context must be a constructor.");if(!ot(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if((t=arguments.length)>1){if(!Ar(n=arguments[1]))throw new TypeError(B("invalid argument. Second argument must be a function. Value: `%s`.",n));t>2&&(r=arguments[2])}if(it(e)){if(f=e.length,n){for(o=(i=new this(f))._buffer,y=0,s=0;s=2))throw new TypeError(B("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",c));o[y]=c[0],o[y+1]=c[1]}y+=2}return i}return new this(e)}if(De(e)){if(n){for(f=e.length,u=e.get&&e.set?Pr("default"):Nr("default"),s=0;s=2))throw new TypeError(B("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",c));o[y]=c[0],o[y+1]=c[1]}y+=2}return i}return new this(e)}if(er(e)&&nt&&Ar(e[Rr])){if(!Ar((o=e[Rr]()).next))throw new TypeError(B("invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.",e));if((a=n?et(o,n,r):Qr(o))instanceof Error)throw a;for(o=(i=new this(f=a.length/2))._buffer,s=0;s=n)return{done:!0};return r=new Tr(e[a+=2],e[a+1]),{value:[o,r],done:!1}})),Y(t,"return",(function(e){if(i=!0,arguments.length)return{value:e,done:!0};return{done:!0}})),Rr&&Y(t,Rr,(function(){return r.entries()})),t})),Y(ft.prototype,"get",(function(e){var r;if(!it(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!ce(e))throw new TypeError(B("invalid argument. Must provide a nonnegative integer. Value: `%s`.",e));if(!(e>=this._length))return new Tr((r=this._buffer)[e*=2],r[e+1])})),Br(ft.prototype,"length",(function(){return this._length})),Y(ft.prototype,"set",(function(e){var r,t,n,i,o,a,u,f,l;if(!it(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(n=this._buffer,arguments.length>1){if(!ce(t=arguments[1]))throw new TypeError(B("invalid argument. Index argument must be a nonnegative integer. Value: `%s`.",t))}else t=0;if(kr(e)){if(t>=this._length)throw new RangeError(B("invalid argument. Index argument is out-of-bounds. Value: `%u`.",t));return n[t*=2]=Hr(e),void(n[t+1]=Kr(e))}if(it(e)){if(t+(a=e._length)>this._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");if(r=e._buffer,l=n.byteOffset+t*tt,r.buffer===n.buffer&&r.byteOffsetl){for(i=new me(r.length),f=0;fthis._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");if(r=e,l=n.byteOffset+t*tt,r.buffer===n.buffer&&r.byteOffsetl){for(i=new me(a),f=0;fthis._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");for(t*=2,f=0;f1?arguments[1]:"float64"))return st(e);if(null===(t=ct(r)))throw new TypeError(B("invalid argument. Second argument must be a recognized data type. Value: `%s`.",r));return new t(e)}function ht(e){return arguments.length>1?yt(e,arguments[1]):yt(e)}export{ht as default}; -//# sourceMappingURL=mod.js.map diff --git a/mod.js.map b/mod.js.map deleted file mode 100644 index ca3f210..0000000 --- a/mod.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"mod.js","sources":["../node_modules/@stdlib/utils-define-property/lib/define_property.js","../node_modules/@stdlib/utils-define-property/lib/builtin.js","../node_modules/@stdlib/string-base-format-interpolate/lib/is_number.js","../node_modules/@stdlib/string-base-format-interpolate/lib/zero_pad.js","../node_modules/@stdlib/string-base-format-interpolate/lib/format_integer.js","../node_modules/@stdlib/string-base-format-interpolate/lib/is_string.js","../node_modules/@stdlib/string-base-format-interpolate/lib/format_double.js","../node_modules/@stdlib/string-base-format-interpolate/lib/space_pad.js","../node_modules/@stdlib/string-base-format-interpolate/lib/main.js","../node_modules/@stdlib/string-base-format-tokenize/lib/main.js","../node_modules/@stdlib/string-format/lib/is_string.js","../node_modules/@stdlib/string-format/lib/main.js","../node_modules/@stdlib/utils-define-property/lib/polyfill.js","../node_modules/@stdlib/utils-define-property/lib/index.js","../node_modules/@stdlib/utils-define-property/lib/has_define_property_support.js","../node_modules/@stdlib/utils-define-nonenumerable-read-only-property/lib/main.js","../node_modules/@stdlib/assert-is-number/lib/primitive.js","../node_modules/@stdlib/assert-has-tostringtag-support/lib/main.js","../node_modules/@stdlib/assert-has-symbol-support/lib/main.js","../node_modules/@stdlib/utils-native-class/lib/tostring.js","../node_modules/@stdlib/assert-has-own-property/lib/main.js","../node_modules/@stdlib/symbol-ctor/lib/main.js","../node_modules/@stdlib/utils-native-class/lib/tostringtag.js","../node_modules/@stdlib/utils-native-class/lib/index.js","../node_modules/@stdlib/utils-native-class/lib/polyfill.js","../node_modules/@stdlib/utils-native-class/lib/main.js","../node_modules/@stdlib/number-ctor/lib/main.js","../node_modules/@stdlib/assert-is-number/lib/tostring.js","../node_modules/@stdlib/assert-is-number/lib/object.js","../node_modules/@stdlib/assert-is-number/lib/try2serialize.js","../node_modules/@stdlib/assert-is-number/lib/main.js","../node_modules/@stdlib/assert-is-number/lib/index.js","../node_modules/@stdlib/constants-float64-pinf/lib/index.js","../node_modules/@stdlib/constants-float64-ninf/lib/index.js","../node_modules/@stdlib/math-base-special-floor/lib/main.js","../node_modules/@stdlib/math-base-assert-is-integer/lib/main.js","../node_modules/@stdlib/assert-is-integer/lib/integer.js","../node_modules/@stdlib/assert-is-integer/lib/primitive.js","../node_modules/@stdlib/assert-is-integer/lib/object.js","../node_modules/@stdlib/assert-is-integer/lib/main.js","../node_modules/@stdlib/assert-is-nonnegative-integer/lib/primitive.js","../node_modules/@stdlib/assert-is-nonnegative-integer/lib/object.js","../node_modules/@stdlib/assert-is-nonnegative-integer/lib/main.js","../node_modules/@stdlib/assert-is-integer/lib/index.js","../node_modules/@stdlib/assert-is-nonnegative-integer/lib/index.js","../node_modules/@stdlib/assert-is-float64array/lib/main.js","../node_modules/@stdlib/assert-has-float64array-support/lib/float64array.js","../node_modules/@stdlib/array-float64/lib/main.js","../node_modules/@stdlib/array-float64/lib/index.js","../node_modules/@stdlib/assert-has-float64array-support/lib/main.js","../node_modules/@stdlib/array-float64/lib/polyfill.js","../node_modules/@stdlib/assert-is-float32array/lib/main.js","../node_modules/@stdlib/assert-has-float32array-support/lib/float32array.js","../node_modules/@stdlib/array-float32/lib/main.js","../node_modules/@stdlib/array-float32/lib/index.js","../node_modules/@stdlib/assert-has-float32array-support/lib/main.js","../node_modules/@stdlib/array-float32/lib/polyfill.js","../node_modules/@stdlib/assert-is-int16array/lib/main.js","../node_modules/@stdlib/constants-int16-max/lib/index.js","../node_modules/@stdlib/assert-has-int16array-support/lib/int16array.js","../node_modules/@stdlib/array-int16/lib/main.js","../node_modules/@stdlib/array-int16/lib/index.js","../node_modules/@stdlib/assert-has-int16array-support/lib/main.js","../node_modules/@stdlib/constants-int16-min/lib/index.js","../node_modules/@stdlib/array-int16/lib/polyfill.js","../node_modules/@stdlib/assert-is-int32array/lib/main.js","../node_modules/@stdlib/constants-int32-max/lib/index.js","../node_modules/@stdlib/assert-has-int32array-support/lib/int32array.js","../node_modules/@stdlib/array-int32/lib/main.js","../node_modules/@stdlib/array-int32/lib/index.js","../node_modules/@stdlib/assert-has-int32array-support/lib/main.js","../node_modules/@stdlib/constants-int32-min/lib/index.js","../node_modules/@stdlib/array-int32/lib/polyfill.js","../node_modules/@stdlib/assert-is-int8array/lib/main.js","../node_modules/@stdlib/constants-int8-max/lib/index.js","../node_modules/@stdlib/assert-has-int8array-support/lib/int8array.js","../node_modules/@stdlib/array-int8/lib/main.js","../node_modules/@stdlib/array-int8/lib/index.js","../node_modules/@stdlib/assert-has-int8array-support/lib/main.js","../node_modules/@stdlib/constants-int8-min/lib/index.js","../node_modules/@stdlib/array-int8/lib/polyfill.js","../node_modules/@stdlib/assert-is-uint16array/lib/main.js","../node_modules/@stdlib/constants-uint16-max/lib/index.js","../node_modules/@stdlib/assert-has-uint16array-support/lib/uint16array.js","../node_modules/@stdlib/array-uint16/lib/main.js","../node_modules/@stdlib/array-uint16/lib/index.js","../node_modules/@stdlib/assert-has-uint16array-support/lib/main.js","../node_modules/@stdlib/array-uint16/lib/polyfill.js","../node_modules/@stdlib/assert-is-uint32array/lib/main.js","../node_modules/@stdlib/constants-uint32-max/lib/index.js","../node_modules/@stdlib/assert-has-uint32array-support/lib/uint32array.js","../node_modules/@stdlib/array-uint32/lib/main.js","../node_modules/@stdlib/array-uint32/lib/index.js","../node_modules/@stdlib/assert-has-uint32array-support/lib/main.js","../node_modules/@stdlib/array-uint32/lib/polyfill.js","../node_modules/@stdlib/assert-is-uint8array/lib/main.js","../node_modules/@stdlib/constants-uint8-max/lib/index.js","../node_modules/@stdlib/assert-has-uint8array-support/lib/uint8array.js","../node_modules/@stdlib/array-uint8/lib/main.js","../node_modules/@stdlib/array-uint8/lib/index.js","../node_modules/@stdlib/assert-has-uint8array-support/lib/main.js","../node_modules/@stdlib/array-uint8/lib/polyfill.js","../node_modules/@stdlib/assert-is-uint8clampedarray/lib/main.js","../node_modules/@stdlib/assert-has-uint8clampedarray-support/lib/uint8clampedarray.js","../node_modules/@stdlib/array-uint8c/lib/main.js","../node_modules/@stdlib/array-uint8c/lib/index.js","../node_modules/@stdlib/assert-has-uint8clampedarray-support/lib/main.js","../node_modules/@stdlib/array-uint8c/lib/polyfill.js","../node_modules/@stdlib/assert-is-array-like-object/lib/main.js","../node_modules/@stdlib/constants-array-max-array-length/lib/index.js","../node_modules/@stdlib/assert-is-collection/lib/main.js","../node_modules/@stdlib/constants-array-max-typed-array-length/lib/index.js","../node_modules/@stdlib/assert-is-arraybuffer/lib/main.js","../node_modules/@stdlib/assert-is-array/lib/main.js","../node_modules/@stdlib/assert-is-object/lib/main.js","../node_modules/@stdlib/utils-type-of/lib/fixtures/re.js","../node_modules/@stdlib/assert-is-boolean/lib/primitive.js","../node_modules/@stdlib/boolean-ctor/lib/main.js","../node_modules/@stdlib/assert-is-boolean/lib/tostring.js","../node_modules/@stdlib/assert-is-boolean/lib/object.js","../node_modules/@stdlib/assert-is-boolean/lib/try2serialize.js","../node_modules/@stdlib/assert-is-boolean/lib/main.js","../node_modules/@stdlib/utils-global/lib/codegen.js","../node_modules/@stdlib/assert-is-boolean/lib/index.js","../node_modules/@stdlib/utils-global/lib/self.js","../node_modules/@stdlib/utils-global/lib/window.js","../node_modules/@stdlib/utils-global/lib/global.js","../node_modules/@stdlib/utils-global/lib/global_this.js","../node_modules/@stdlib/utils-type-of/lib/fixtures/nodelist.js","../node_modules/@stdlib/utils-global/lib/main.js","../node_modules/@stdlib/utils-type-of/lib/fixtures/typedarray.js","../node_modules/@stdlib/regexp-function-name/lib/main.js","../node_modules/@stdlib/regexp-function-name/lib/regexp.js","../node_modules/@stdlib/assert-is-object-like/lib/main.js","../node_modules/@stdlib/utils-constructor-name/lib/main.js","../node_modules/@stdlib/assert-is-buffer/lib/main.js","../node_modules/@stdlib/regexp-function-name/lib/index.js","../node_modules/@stdlib/assert-is-object-like/lib/index.js","../node_modules/@stdlib/assert-tools-array-function/lib/main.js","../node_modules/@stdlib/utils-type-of/lib/index.js","../node_modules/@stdlib/utils-type-of/lib/check.js","../node_modules/@stdlib/utils-type-of/lib/polyfill.js","../node_modules/@stdlib/utils-type-of/lib/main.js","../node_modules/@stdlib/assert-is-function/lib/main.js","../node_modules/@stdlib/complex-float64/lib/main.js","../node_modules/@stdlib/complex-float64/lib/tostring.js","../node_modules/@stdlib/complex-float64/lib/tojson.js","../node_modules/@stdlib/number-float64-base-to-float32/lib/main.js","../node_modules/@stdlib/number-float64-base-to-float32/lib/polyfill.js","../node_modules/@stdlib/number-float64-base-to-float32/lib/index.js","../node_modules/@stdlib/complex-float32/lib/main.js","../node_modules/@stdlib/assert-is-complex-like/lib/main.js","../node_modules/@stdlib/math-base-assert-is-even/lib/main.js","../node_modules/@stdlib/assert-has-iterator-symbol-support/lib/main.js","../node_modules/@stdlib/complex-float32/lib/tostring.js","../node_modules/@stdlib/complex-float32/lib/tojson.js","../node_modules/@stdlib/symbol-iterator/lib/main.js","../node_modules/@stdlib/utils-define-nonenumerable-read-only-accessor/lib/main.js","../node_modules/@stdlib/complex-realf/lib/main.js","../node_modules/@stdlib/complex-imagf/lib/main.js","../node_modules/@stdlib/strided-base-reinterpret-complex64/lib/main.js","../node_modules/@stdlib/strided-base-reinterpret-complex128/lib/main.js","../node_modules/@stdlib/array-base-getter/lib/main.js","../node_modules/@stdlib/array-base-accessor-getter/lib/main.js","../node_modules/@stdlib/array-complex64/lib/from_iterator.js","../node_modules/@stdlib/array-complex64/lib/from_iterator_map.js","../node_modules/@stdlib/array-complex64/lib/from_array.js","../node_modules/@stdlib/array-complex64/lib/main.js","../node_modules/@stdlib/complex-real/lib/main.js","../node_modules/@stdlib/complex-imag/lib/main.js","../node_modules/@stdlib/array-complex128/lib/from_iterator.js","../node_modules/@stdlib/array-complex128/lib/from_iterator_map.js","../node_modules/@stdlib/array-complex128/lib/from_array.js","../node_modules/@stdlib/array-complex128/lib/main.js","../node_modules/@stdlib/array-ctors/lib/ctors.js","../node_modules/@stdlib/array-ctors/lib/main.js","../node_modules/@stdlib/array-base-zeros/lib/main.js","../node_modules/@stdlib/array-base-filled/lib/main.js","../node_modules/@stdlib/array-zeros/lib/main.js","../lib/polyfill.js"],"sourcesContent":["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Object.defineProperty === 'function' ) ? Object.defineProperty : null;\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Defines (or modifies) an object property.\n*\n* ## Notes\n*\n* - Property descriptors come in two flavors: **data descriptors** and **accessor descriptors**. A data descriptor is a property that has a value, which may or may not be writable. An accessor descriptor is a property described by a getter-setter function pair. A descriptor must be one of these two flavors and cannot be both.\n*\n* @name defineProperty\n* @type {Function}\n* @param {Object} obj - object on which to define the property\n* @param {(string|symbol)} prop - property name\n* @param {Object} descriptor - property descriptor\n* @param {boolean} [descriptor.configurable=false] - boolean indicating if property descriptor can be changed and if the property can be deleted from the provided object\n* @param {boolean} [descriptor.enumerable=false] - boolean indicating if the property shows up when enumerating object properties\n* @param {boolean} [descriptor.writable=false] - boolean indicating if the value associated with the property can be changed with an assignment operator\n* @param {*} [descriptor.value] - property value\n* @param {(Function|void)} [descriptor.get=undefined] - function which serves as a getter for the property, or, if no getter, undefined. When the property is accessed, a getter function is called without arguments and with the `this` context set to the object through which the property is accessed (which may not be the object on which the property is defined due to inheritance). The return value will be used as the property value.\n* @param {(Function|void)} [descriptor.set=undefined] - function which serves as a setter for the property, or, if no setter, undefined. When assigning a property value, a setter function is called with one argument (the value being assigned to the property) and with the `this` context set to the object through which the property is assigned.\n* @throws {TypeError} first argument must be an object\n* @throws {TypeError} third argument must be an object\n* @throws {Error} property descriptor cannot have both a value and a setter and/or getter\n* @returns {Object} object with added property\n*\n* @example\n* var obj = {};\n*\n* defineProperty( obj, 'foo', {\n* 'value': 'bar'\n* });\n*\n* var str = obj.foo;\n* // returns 'bar'\n*/\nvar defineProperty = Object.defineProperty;\n\n\n// EXPORTS //\n\nexport default defineProperty;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Tests if a value is a number primitive.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number primitive\n*\n* @example\n* var bool = isNumber( 3.14 );\n* // returns true\n*\n* @example\n* var bool = isNumber( NaN );\n* // returns true\n*\n* @example\n* var bool = isNumber( new Number( 3.14 ) );\n* // returns false\n*/\nfunction isNumber( value ) {\n\treturn ( typeof value === 'number' ); // NOTE: we inline the `isNumber.isPrimitive` function from `@stdlib/assert/is-number` in order to avoid circular dependencies.\n}\n\n\n// EXPORTS //\n\nexport default isNumber;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// FUNCTIONS //\n\n/**\n* Tests if a string starts with a minus sign (`-`).\n*\n* @private\n* @param {string} str - input string\n* @returns {boolean} boolean indicating if a string starts with a minus sign (`-`)\n*/\nfunction startsWithMinus( str ) {\n\treturn str[ 0 ] === '-';\n}\n\n/**\n* Returns a string of `n` zeros.\n*\n* @private\n* @param {number} n - number of zeros\n* @returns {string} string of zeros\n*/\nfunction zeros( n ) {\n\tvar out = '';\n\tvar i;\n\tfor ( i = 0; i < n; i++ ) {\n\t\tout += '0';\n\t}\n\treturn out;\n}\n\n\n// MAIN //\n\n/**\n* Pads a token with zeros to the specified width.\n*\n* @private\n* @param {string} str - token argument\n* @param {number} width - token width\n* @param {boolean} [right=false] - boolean indicating whether to pad to the right\n* @returns {string} padded token argument\n*/\nfunction zeroPad( str, width, right ) {\n\tvar negative = false;\n\tvar pad = width - str.length;\n\tif ( pad < 0 ) {\n\t\treturn str;\n\t}\n\tif ( startsWithMinus( str ) ) {\n\t\tnegative = true;\n\t\tstr = str.substr( 1 );\n\t}\n\tstr = ( right ) ?\n\t\tstr + zeros( pad ) :\n\t\tzeros( pad ) + str;\n\tif ( negative ) {\n\t\tstr = '-' + str;\n\t}\n\treturn str;\n}\n\n\n// EXPORTS //\n\nexport default zeroPad;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isNumber from './is_number.js';\nimport zeroPad from './zero_pad.js';\n\n// NOTE: for the following, we explicitly avoid using stdlib packages in this particular package in order to avoid circular dependencies.\nvar lowercase = String.prototype.toLowerCase;\nvar uppercase = String.prototype.toUpperCase;\n\n\n// MAIN //\n\n/**\n* Formats a token object argument as an integer.\n*\n* @private\n* @param {Object} token - token object\n* @throws {Error} must provide a valid integer\n* @returns {string} formatted token argument\n*/\nfunction formatInteger( token ) {\n\tvar base;\n\tvar out;\n\tvar i;\n\n\tswitch ( token.specifier ) {\n\tcase 'b':\n\t\t// Case: %b (binary)\n\t\tbase = 2;\n\t\tbreak;\n\tcase 'o':\n\t\t// Case: %o (octal)\n\t\tbase = 8;\n\t\tbreak;\n\tcase 'x':\n\tcase 'X':\n\t\t// Case: %x, %X (hexadecimal)\n\t\tbase = 16;\n\t\tbreak;\n\tcase 'd':\n\tcase 'i':\n\tcase 'u':\n\tdefault:\n\t\t// Case: %d, %i, %u (decimal)\n\t\tbase = 10;\n\t\tbreak;\n\t}\n\tout = token.arg;\n\ti = parseInt( out, 10 );\n\tif ( !isFinite( i ) ) { // NOTE: We use the global `isFinite` function here instead of `@stdlib/math/base/assert/is-finite` in order to avoid circular dependencies.\n\t\tif ( !isNumber( out ) ) {\n\t\t\tthrow new Error( 'invalid integer. Value: ' + out );\n\t\t}\n\t\ti = 0;\n\t}\n\tif ( i < 0 && ( token.specifier === 'u' || base !== 10 ) ) {\n\t\ti = 0xffffffff + i + 1;\n\t}\n\tif ( i < 0 ) {\n\t\tout = ( -i ).toString( base );\n\t\tif ( token.precision ) {\n\t\t\tout = zeroPad( out, token.precision, token.padRight );\n\t\t}\n\t\tout = '-' + out;\n\t} else {\n\t\tout = i.toString( base );\n\t\tif ( !i && !token.precision ) {\n\t\t\tout = '';\n\t\t} else if ( token.precision ) {\n\t\t\tout = zeroPad( out, token.precision, token.padRight );\n\t\t}\n\t\tif ( token.sign ) {\n\t\t\tout = token.sign + out;\n\t\t}\n\t}\n\tif ( base === 16 ) {\n\t\tif ( token.alternate ) {\n\t\t\tout = '0x' + out;\n\t\t}\n\t\tout = ( token.specifier === uppercase.call( token.specifier ) ) ?\n\t\t\tuppercase.call( out ) :\n\t\t\tlowercase.call( out );\n\t}\n\tif ( base === 8 ) {\n\t\tif ( token.alternate && out.charAt( 0 ) !== '0' ) {\n\t\t\tout = '0' + out;\n\t\t}\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default formatInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Tests if a value is a string primitive.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a string primitive\n*\n* @example\n* var bool = isString( 'beep' );\n* // returns true\n*\n* @example\n* var bool = isString( new String( 'beep' ) );\n* // returns false\n*/\nfunction isString( value ) {\n\treturn ( typeof value === 'string' ); // NOTE: we inline the `isString.isPrimitive` function from `@stdlib/assert/is-string` in order to avoid circular dependencies.\n}\n\n\n// EXPORTS //\n\nexport default isString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isNumber from './is_number.js';\n\n// NOTE: for the following, we explicitly avoid using stdlib packages in this particular package in order to avoid circular dependencies.\nvar abs = Math.abs; // eslint-disable-line stdlib/no-builtin-math\nvar lowercase = String.prototype.toLowerCase;\nvar uppercase = String.prototype.toUpperCase;\nvar replace = String.prototype.replace;\n\n\n// VARIABLES //\n\nvar RE_EXP_POS_DIGITS = /e\\+(\\d)$/;\nvar RE_EXP_NEG_DIGITS = /e-(\\d)$/;\nvar RE_ONLY_DIGITS = /^(\\d+)$/;\nvar RE_DIGITS_BEFORE_EXP = /^(\\d+)e/;\nvar RE_TRAILING_PERIOD_ZERO = /\\.0$/;\nvar RE_PERIOD_ZERO_EXP = /\\.0*e/;\nvar RE_ZERO_BEFORE_EXP = /(\\..*[^0])0*e/;\n\n\n// MAIN //\n\n/**\n* Formats a token object argument as a floating-point number.\n*\n* @private\n* @param {Object} token - token object\n* @throws {Error} must provide a valid floating-point number\n* @returns {string} formatted token argument\n*/\nfunction formatDouble( token ) {\n\tvar digits;\n\tvar out;\n\tvar f = parseFloat( token.arg );\n\tif ( !isFinite( f ) ) { // NOTE: We use the global `isFinite` function here instead of `@stdlib/math/base/assert/is-finite` in order to avoid circular dependencies.\n\t\tif ( !isNumber( token.arg ) ) {\n\t\t\tthrow new Error( 'invalid floating-point number. Value: ' + out );\n\t\t}\n\t\t// Case: NaN, Infinity, or -Infinity\n\t\tf = token.arg;\n\t}\n\tswitch ( token.specifier ) {\n\tcase 'e':\n\tcase 'E':\n\t\tout = f.toExponential( token.precision );\n\t\tbreak;\n\tcase 'f':\n\tcase 'F':\n\t\tout = f.toFixed( token.precision );\n\t\tbreak;\n\tcase 'g':\n\tcase 'G':\n\t\tif ( abs( f ) < 0.0001 ) {\n\t\t\tdigits = token.precision;\n\t\t\tif ( digits > 0 ) {\n\t\t\t\tdigits -= 1;\n\t\t\t}\n\t\t\tout = f.toExponential( digits );\n\t\t} else {\n\t\t\tout = f.toPrecision( token.precision );\n\t\t}\n\t\tif ( !token.alternate ) {\n\t\t\tout = replace.call( out, RE_ZERO_BEFORE_EXP, '$1e' );\n\t\t\tout = replace.call( out, RE_PERIOD_ZERO_EXP, 'e');\n\t\t\tout = replace.call( out, RE_TRAILING_PERIOD_ZERO, '' );\n\t\t}\n\t\tbreak;\n\tdefault:\n\t\tthrow new Error( 'invalid double notation. Value: ' + token.specifier );\n\t}\n\tout = replace.call( out, RE_EXP_POS_DIGITS, 'e+0$1' );\n\tout = replace.call( out, RE_EXP_NEG_DIGITS, 'e-0$1' );\n\tif ( token.alternate ) {\n\t\tout = replace.call( out, RE_ONLY_DIGITS, '$1.' );\n\t\tout = replace.call( out, RE_DIGITS_BEFORE_EXP, '$1.e' );\n\t}\n\tif ( f >= 0 && token.sign ) {\n\t\tout = token.sign + out;\n\t}\n\tout = ( token.specifier === uppercase.call( token.specifier ) ) ?\n\t\tuppercase.call( out ) :\n\t\tlowercase.call( out );\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default formatDouble;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// FUNCTIONS //\n\n/**\n* Returns `n` spaces.\n*\n* @private\n* @param {number} n - number of spaces\n* @returns {string} string of spaces\n*/\nfunction spaces( n ) {\n\tvar out = '';\n\tvar i;\n\tfor ( i = 0; i < n; i++ ) {\n\t\tout += ' ';\n\t}\n\treturn out;\n}\n\n\n// MAIN //\n\n/**\n* Pads a token with spaces to the specified width.\n*\n* @private\n* @param {string} str - token argument\n* @param {number} width - token width\n* @param {boolean} [right=false] - boolean indicating whether to pad to the right\n* @returns {string} padded token argument\n*/\nfunction spacePad( str, width, right ) {\n\tvar pad = width - str.length;\n\tif ( pad < 0 ) {\n\t\treturn str;\n\t}\n\tstr = ( right ) ?\n\t\tstr + spaces( pad ) :\n\t\tspaces( pad ) + str;\n\treturn str;\n}\n\n\n// EXPORTS //\n\nexport default spacePad;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport formatInteger from './format_integer.js';\nimport isString from './is_string.js';\nimport formatDouble from './format_double.js';\nimport spacePad from './space_pad.js';\nimport zeroPad from './zero_pad.js';\n\n\n// VARIABLES //\n\nvar fromCharCode = String.fromCharCode;\nvar isnan = isNaN; // NOTE: We use the global `isNaN` function here instead of `@stdlib/math/base/assert/is-nan` to avoid circular dependencies.\nvar isArray = Array.isArray; // NOTE: We use the global `Array.isArray` function here instead of `@stdlib/assert/is-array` to avoid circular dependencies.\n\n\n// FUNCTIONS //\n\n/**\n* Initializes token object with properties of supplied format identifier object or default values if not present.\n*\n* @private\n* @param {Object} token - format identifier object\n* @returns {Object} token object\n*/\nfunction initialize( token ) {\n\tvar out = {};\n\tout.specifier = token.specifier;\n\tout.precision = ( token.precision === void 0 ) ? 1 : token.precision;\n\tout.width = token.width;\n\tout.flags = token.flags || '';\n\tout.mapping = token.mapping;\n\treturn out;\n}\n\n\n// MAIN //\n\n/**\n* Generates string from a token array by interpolating values.\n*\n* @param {Array} tokens - string parts and format identifier objects\n* @param {Array} ...args - variable values\n* @throws {TypeError} first argument must be an array\n* @throws {Error} invalid flags\n* @returns {string} formatted string\n*\n* @example\n* var tokens = [ 'beep ', { 'specifier': 's' } ];\n* var out = formatInterpolate( tokens, 'boop' );\n* // returns 'beep boop'\n*/\nfunction formatInterpolate( tokens ) {\n\tvar hasPeriod;\n\tvar flags;\n\tvar token;\n\tvar flag;\n\tvar num;\n\tvar out;\n\tvar pos;\n\tvar i;\n\tvar j;\n\n\tif ( !isArray( tokens ) ) {\n\t\tthrow new TypeError( 'invalid argument. First argument must be an array. Value: `' + tokens + '`.' );\n\t}\n\tout = '';\n\tpos = 1;\n\tfor ( i = 0; i < tokens.length; i++ ) {\n\t\ttoken = tokens[ i ];\n\t\tif ( isString( token ) ) {\n\t\t\tout += token;\n\t\t} else {\n\t\t\thasPeriod = token.precision !== void 0;\n\t\t\ttoken = initialize( token );\n\t\t\tif ( !token.specifier ) {\n\t\t\t\tthrow new TypeError( 'invalid argument. Token is missing `specifier` property. Index: `'+ i +'`. Value: `' + token + '`.' );\n\t\t\t}\n\t\t\tif ( token.mapping ) {\n\t\t\t\tpos = token.mapping;\n\t\t\t}\n\t\t\tflags = token.flags;\n\t\t\tfor ( j = 0; j < flags.length; j++ ) {\n\t\t\t\tflag = flags.charAt( j );\n\t\t\t\tswitch ( flag ) {\n\t\t\t\tcase ' ':\n\t\t\t\t\ttoken.sign = ' ';\n\t\t\t\t\tbreak;\n\t\t\t\tcase '+':\n\t\t\t\t\ttoken.sign = '+';\n\t\t\t\t\tbreak;\n\t\t\t\tcase '-':\n\t\t\t\t\ttoken.padRight = true;\n\t\t\t\t\ttoken.padZeros = false;\n\t\t\t\t\tbreak;\n\t\t\t\tcase '0':\n\t\t\t\t\ttoken.padZeros = flags.indexOf( '-' ) < 0; // NOTE: We use built-in `Array.prototype.indexOf` here instead of `@stdlib/assert/contains` in order to avoid circular dependencies.\n\t\t\t\t\tbreak;\n\t\t\t\tcase '#':\n\t\t\t\t\ttoken.alternate = true;\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tthrow new Error( 'invalid flag: ' + flag );\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( token.width === '*' ) {\n\t\t\t\ttoken.width = parseInt( arguments[ pos ], 10 );\n\t\t\t\tpos += 1;\n\t\t\t\tif ( isnan( token.width ) ) {\n\t\t\t\t\tthrow new TypeError( 'the argument for * width at position ' + pos + ' is not a number. Value: `' + token.width + '`.' );\n\t\t\t\t}\n\t\t\t\tif ( token.width < 0 ) {\n\t\t\t\t\ttoken.padRight = true;\n\t\t\t\t\ttoken.width = -token.width;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( hasPeriod ) {\n\t\t\t\tif ( token.precision === '*' ) {\n\t\t\t\t\ttoken.precision = parseInt( arguments[ pos ], 10 );\n\t\t\t\t\tpos += 1;\n\t\t\t\t\tif ( isnan( token.precision ) ) {\n\t\t\t\t\t\tthrow new TypeError( 'the argument for * precision at position ' + pos + ' is not a number. Value: `' + token.precision + '`.' );\n\t\t\t\t\t}\n\t\t\t\t\tif ( token.precision < 0 ) {\n\t\t\t\t\t\ttoken.precision = 1;\n\t\t\t\t\t\thasPeriod = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\ttoken.arg = arguments[ pos ];\n\t\t\tswitch ( token.specifier ) {\n\t\t\tcase 'b':\n\t\t\tcase 'o':\n\t\t\tcase 'x':\n\t\t\tcase 'X':\n\t\t\tcase 'd':\n\t\t\tcase 'i':\n\t\t\tcase 'u':\n\t\t\t\t// Case: %b (binary), %o (octal), %x, %X (hexadecimal), %d, %i (decimal), %u (unsigned decimal)\n\t\t\t\tif ( hasPeriod ) {\n\t\t\t\t\ttoken.padZeros = false;\n\t\t\t\t}\n\t\t\t\ttoken.arg = formatInteger( token );\n\t\t\t\tbreak;\n\t\t\tcase 's':\n\t\t\t\t// Case: %s (string)\n\t\t\t\ttoken.maxWidth = ( hasPeriod ) ? token.precision : -1;\n\t\t\t\tbreak;\n\t\t\tcase 'c':\n\t\t\t\t// Case: %c (character)\n\t\t\t\tif ( !isnan( token.arg ) ) {\n\t\t\t\t\tnum = parseInt( token.arg, 10 );\n\t\t\t\t\tif ( num < 0 || num > 127 ) {\n\t\t\t\t\t\tthrow new Error( 'invalid character code. Value: ' + token.arg );\n\t\t\t\t\t}\n\t\t\t\t\ttoken.arg = ( isnan( num ) ) ?\n\t\t\t\t\t\tString( token.arg ) :\n\t\t\t\t\t\tfromCharCode( num );\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'e':\n\t\t\tcase 'E':\n\t\t\tcase 'f':\n\t\t\tcase 'F':\n\t\t\tcase 'g':\n\t\t\tcase 'G':\n\t\t\t\t// Case: %e, %E (scientific notation), %f, %F (decimal floating point), %g, %G (uses the shorter of %e/E or %f/F)\n\t\t\t\tif ( !hasPeriod ) {\n\t\t\t\t\ttoken.precision = 6;\n\t\t\t\t}\n\t\t\t\ttoken.arg = formatDouble( token );\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tthrow new Error( 'invalid specifier: ' + token.specifier );\n\t\t\t}\n\t\t\t// Fit argument into field width...\n\t\t\tif ( token.maxWidth >= 0 && token.arg.length > token.maxWidth ) {\n\t\t\t\ttoken.arg = token.arg.substring( 0, token.maxWidth );\n\t\t\t}\n\t\t\tif ( token.padZeros ) {\n\t\t\t\ttoken.arg = zeroPad( token.arg, token.width || token.precision, token.padRight ); // eslint-disable-line max-len\n\t\t\t} else if ( token.width ) {\n\t\t\t\ttoken.arg = spacePad( token.arg, token.width, token.padRight );\n\t\t\t}\n\t\t\tout += token.arg || '';\n\t\t\tpos += 1;\n\t\t}\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default formatInterpolate;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// VARIABLES //\n\nvar RE = /%(?:([1-9]\\d*)\\$)?([0 +\\-#]*)(\\*|\\d+)?(?:(\\.)(\\*|\\d+)?)?[hlL]?([%A-Za-z])/g;\n\n\n// FUNCTIONS //\n\n/**\n* Parses a delimiter.\n*\n* @private\n* @param {Array} match - regular expression match\n* @returns {Object} delimiter token object\n*/\nfunction parse( match ) {\n\tvar token = {\n\t\t'mapping': ( match[ 1 ] ) ? parseInt( match[ 1 ], 10 ) : void 0,\n\t\t'flags': match[ 2 ],\n\t\t'width': match[ 3 ],\n\t\t'precision': match[ 5 ],\n\t\t'specifier': match[ 6 ]\n\t};\n\tif ( match[ 4 ] === '.' && match[ 5 ] === void 0 ) {\n\t\ttoken.precision = '1';\n\t}\n\treturn token;\n}\n\n\n// MAIN //\n\n/**\n* Tokenizes a string into an array of string parts and format identifier objects.\n*\n* @param {string} str - input string\n* @returns {Array} tokens\n*\n* @example\n* var tokens = formatTokenize( 'Hello %s!' );\n* // returns [ 'Hello ', {...}, '!' ]\n*/\nfunction formatTokenize( str ) {\n\tvar content;\n\tvar tokens;\n\tvar match;\n\tvar prev;\n\n\ttokens = [];\n\tprev = 0;\n\tmatch = RE.exec( str );\n\twhile ( match ) {\n\t\tcontent = str.slice( prev, RE.lastIndex - match[ 0 ].length );\n\t\tif ( content.length ) {\n\t\t\ttokens.push( content );\n\t\t}\n\t\ttokens.push( parse( match ) );\n\t\tprev = RE.lastIndex;\n\t\tmatch = RE.exec( str );\n\t}\n\tcontent = str.slice( prev );\n\tif ( content.length ) {\n\t\ttokens.push( content );\n\t}\n\treturn tokens;\n}\n\n\n// EXPORTS //\n\nexport default formatTokenize;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Tests if a value is a string primitive.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a string primitive\n*\n* @example\n* var bool = isString( 'beep' );\n* // returns true\n*\n* @example\n* var bool = isString( new String( 'beep' ) );\n* // returns false\n*/\nfunction isString( value ) {\n\treturn ( typeof value === 'string' ); // NOTE: we inline the `isString.isPrimitive` function from `@stdlib/assert/is-string` in order to avoid circular dependencies.\n}\n\n\n// EXPORTS //\n\nexport default isString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport interpolate from '@stdlib/string-base-format-interpolate';\nimport tokenize from '@stdlib/string-base-format-tokenize';\nimport isString from './is_string.js';\n\n\n// MAIN //\n\n/**\n* Inserts supplied variable values into a format string.\n*\n* @param {string} str - input string\n* @param {Array} ...args - variable values\n* @throws {TypeError} first argument must be a string\n* @throws {Error} invalid flags\n* @returns {string} formatted string\n*\n* @example\n* var str = format( 'Hello %s!', 'world' );\n* // returns 'Hello world!'\n*\n* @example\n* var str = format( 'Pi: ~%.2f', 3.141592653589793 );\n* // returns 'Pi: ~3.14'\n*/\nfunction format( str ) {\n\tvar tokens;\n\tvar args;\n\tvar i;\n\n\tif ( !isString( str ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a string. Value: `%s`.', str ) );\n\t}\n\ttokens = tokenize( str );\n\targs = new Array( arguments.length );\n\targs[ 0 ] = tokens;\n\tfor ( i = 1; i < args.length; i++ ) {\n\t\targs[ i ] = arguments[ i ];\n\t}\n\treturn interpolate.apply( null, args );\n}\n\n\n// EXPORTS //\n\nexport default format;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable no-underscore-dangle, no-proto */\n\n'use strict';\n\n// MODULES //\n\nimport format from '@stdlib/string-format';\n\n\n// VARIABLES //\n\nvar objectProtoype = Object.prototype;\nvar toStr = objectProtoype.toString;\nvar defineGetter = objectProtoype.__defineGetter__;\nvar defineSetter = objectProtoype.__defineSetter__;\nvar lookupGetter = objectProtoype.__lookupGetter__;\nvar lookupSetter = objectProtoype.__lookupSetter__;\n\n\n// MAIN //\n\n/**\n* Defines (or modifies) an object property.\n*\n* ## Notes\n*\n* - Property descriptors come in two flavors: **data descriptors** and **accessor descriptors**. A data descriptor is a property that has a value, which may or may not be writable. An accessor descriptor is a property described by a getter-setter function pair. A descriptor must be one of these two flavors and cannot be both.\n*\n* @param {Object} obj - object on which to define the property\n* @param {string} prop - property name\n* @param {Object} descriptor - property descriptor\n* @param {boolean} [descriptor.configurable=false] - boolean indicating if property descriptor can be changed and if the property can be deleted from the provided object\n* @param {boolean} [descriptor.enumerable=false] - boolean indicating if the property shows up when enumerating object properties\n* @param {boolean} [descriptor.writable=false] - boolean indicating if the value associated with the property can be changed with an assignment operator\n* @param {*} [descriptor.value] - property value\n* @param {(Function|void)} [descriptor.get=undefined] - function which serves as a getter for the property, or, if no getter, undefined. When the property is accessed, a getter function is called without arguments and with the `this` context set to the object through which the property is accessed (which may not be the object on which the property is defined due to inheritance). The return value will be used as the property value.\n* @param {(Function|void)} [descriptor.set=undefined] - function which serves as a setter for the property, or, if no setter, undefined. When assigning a property value, a setter function is called with one argument (the value being assigned to the property) and with the `this` context set to the object through which the property is assigned.\n* @throws {TypeError} first argument must be an object\n* @throws {TypeError} third argument must be an object\n* @throws {Error} property descriptor cannot have both a value and a setter and/or getter\n* @returns {Object} object with added property\n*\n* @example\n* var obj = {};\n*\n* defineProperty( obj, 'foo', {\n* 'value': 'bar'\n* });\n*\n* var str = obj.foo;\n* // returns 'bar'\n*/\nfunction defineProperty( obj, prop, descriptor ) {\n\tvar prototype;\n\tvar hasValue;\n\tvar hasGet;\n\tvar hasSet;\n\n\tif ( typeof obj !== 'object' || obj === null || toStr.call( obj ) === '[object Array]' ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be an object. Value: `%s`.', obj ) );\n\t}\n\tif ( typeof descriptor !== 'object' || descriptor === null || toStr.call( descriptor ) === '[object Array]' ) {\n\t\tthrow new TypeError( format( 'invalid argument. Property descriptor must be an object. Value: `%s`.', descriptor ) );\n\t}\n\thasValue = ( 'value' in descriptor );\n\tif ( hasValue ) {\n\t\tif (\n\t\t\tlookupGetter.call( obj, prop ) ||\n\t\t\tlookupSetter.call( obj, prop )\n\t\t) {\n\t\t\t// Override `__proto__` to avoid touching inherited accessors:\n\t\t\tprototype = obj.__proto__;\n\t\t\tobj.__proto__ = objectProtoype;\n\n\t\t\t// Delete property as existing getters/setters prevent assigning value to specified property:\n\t\t\tdelete obj[ prop ];\n\t\t\tobj[ prop ] = descriptor.value;\n\n\t\t\t// Restore original prototype:\n\t\t\tobj.__proto__ = prototype;\n\t\t} else {\n\t\t\tobj[ prop ] = descriptor.value;\n\t\t}\n\t}\n\thasGet = ( 'get' in descriptor );\n\thasSet = ( 'set' in descriptor );\n\n\tif ( hasValue && ( hasGet || hasSet ) ) {\n\t\tthrow new Error( 'invalid argument. Cannot specify one or more accessors and a value or writable attribute in the property descriptor.' );\n\t}\n\n\tif ( hasGet && defineGetter ) {\n\t\tdefineGetter.call( obj, prop, descriptor.get );\n\t}\n\tif ( hasSet && defineSetter ) {\n\t\tdefineSetter.call( obj, prop, descriptor.set );\n\t}\n\treturn obj;\n}\n\n\n// EXPORTS //\n\nexport default defineProperty;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Define (or modify) an object property.\n*\n* @module @stdlib/utils-define-property\n*\n* @example\n* import defineProperty from '@stdlib/utils-define-property';\n*\n* var obj = {};\n* defineProperty( obj, 'foo', {\n* 'value': 'bar',\n* 'writable': false,\n* 'configurable': false,\n* 'enumerable': false\n* });\n* obj.foo = 'boop'; // => throws\n*/\n\n// MODULES //\n\nimport hasDefinePropertySupport from './has_define_property_support.js';\nimport builtin from './builtin.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar defineProperty;\nif ( hasDefinePropertySupport() ) {\n\tdefineProperty = builtin;\n} else {\n\tdefineProperty = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default defineProperty;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport defineProperty from './define_property.js';\n\n\n// MAIN //\n\n/**\n* Tests for `Object.defineProperty` support.\n*\n* @private\n* @returns {boolean} boolean indicating if an environment has `Object.defineProperty` support\n*\n* @example\n* var bool = hasDefinePropertySupport();\n* // returns \n*/\nfunction hasDefinePropertySupport() {\n\t// Test basic support...\n\ttry {\n\t\tdefineProperty( {}, 'x', {} );\n\t\treturn true;\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\treturn false;\n\t}\n}\n\n\n// EXPORTS //\n\nexport default hasDefinePropertySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport defineProperty from '@stdlib/utils-define-property';\n\n\n// MAIN //\n\n/**\n* Defines a non-enumerable read-only property.\n*\n* @param {Object} obj - object on which to define the property\n* @param {(string|symbol)} prop - property name\n* @param {*} value - value to set\n*\n* @example\n* var obj = {};\n*\n* setNonEnumerableReadOnly( obj, 'foo', 'bar' );\n*\n* try {\n* obj.foo = 'boop';\n* } catch ( err ) {\n* console.error( err.message );\n* }\n*/\nfunction setNonEnumerableReadOnly( obj, prop, value ) {\n\tdefineProperty( obj, prop, {\n\t\t'configurable': false,\n\t\t'enumerable': false,\n\t\t'writable': false,\n\t\t'value': value\n\t});\n}\n\n\n// EXPORTS //\n\nexport default setNonEnumerableReadOnly;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Tests if a value is a number primitive.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number primitive\n*\n* @example\n* var bool = isNumber( 3.14 );\n* // returns true\n*\n* @example\n* var bool = isNumber( NaN );\n* // returns true\n*\n* @example\n* var bool = isNumber( new Number( 3.14 ) );\n* // returns false\n*/\nfunction isNumber( value ) {\n\treturn ( typeof value === 'number' );\n}\n\n\n// EXPORTS //\n\nexport default isNumber;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport hasSymbols from '@stdlib/assert-has-symbol-support';\n\n\n// VARIABLES //\n\nvar FLG = hasSymbols();\n\n\n// MAIN //\n\n/**\n* Tests for native `toStringTag` support.\n*\n* @returns {boolean} boolean indicating if an environment has `toStringTag` support\n*\n* @example\n* var bool = hasToStringTagSupport();\n* // returns \n*/\nfunction hasToStringTagSupport() {\n\treturn ( FLG && typeof Symbol.toStringTag === 'symbol' );\n}\n\n\n// EXPORTS //\n\nexport default hasToStringTagSupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Tests for native `Symbol` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Symbol` support\n*\n* @example\n* var bool = hasSymbolSupport();\n* // returns \n*/\nfunction hasSymbolSupport() {\n\treturn (\n\t\ttypeof Symbol === 'function' &&\n\t\ttypeof Symbol( 'foo' ) === 'symbol'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default hasSymbolSupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar toStr = Object.prototype.toString;\n\n\n// EXPORTS //\n\nexport default toStr;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// FUNCTIONS //\n\nvar has = Object.prototype.hasOwnProperty;\n\n\n// MAIN //\n\n/**\n* Tests if an object has a specified property.\n*\n* @param {*} value - value to test\n* @param {*} property - property to test\n* @returns {boolean} boolean indicating if an object has a specified property\n*\n* @example\n* var beep = {\n* 'boop': true\n* };\n*\n* var bool = hasOwnProp( beep, 'boop' );\n* // returns true\n*\n* @example\n* var beep = {\n* 'boop': true\n* };\n*\n* var bool = hasOwnProp( beep, 'bap' );\n* // returns false\n*/\nfunction hasOwnProp( value, property ) {\n\tif (\n\t\tvalue === void 0 ||\n\t\tvalue === null\n\t) {\n\t\treturn false;\n\t}\n\treturn has.call( value, property );\n}\n\n\n// EXPORTS //\n\nexport default hasOwnProp;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar Sym = ( typeof Symbol === 'function' ) ? Symbol : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default Sym;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport Symbol from '@stdlib/symbol-ctor';\n\n\n// MAIN //\n\nvar toStrTag = ( typeof Symbol === 'function' ) ? Symbol.toStringTag : '';\n\n\n// EXPORTS //\n\nexport default toStrTag;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Return a string value indicating a specification defined classification of an object.\n*\n* @module @stdlib/utils-native-class\n*\n* @example\n* import nativeClass from '@stdlib/utils-native-class';\n*\n* var str = nativeClass( 'a' );\n* // returns '[object String]'\n*\n* str = nativeClass( 5 );\n* // returns '[object Number]'\n*\n* function Beep() {\n* return this;\n* }\n* str = nativeClass( new Beep() );\n* // returns '[object Object]'\n*/\n\n// MODULES //\n\nimport hasToStringTag from '@stdlib/assert-has-tostringtag-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar main;\nif ( hasToStringTag() ) {\n\tmain = polyfill;\n} else {\n\tmain = builtin;\n}\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport hasOwnProp from '@stdlib/assert-has-own-property';\nimport toStringTag from './tostringtag.js';\nimport toStr from './tostring.js';\n\n\n// MAIN //\n\n/**\n* Returns a string value indicating a specification defined classification of an object in environments supporting `Symbol.toStringTag`.\n*\n* @param {*} v - input value\n* @returns {string} string value indicating a specification defined classification of the input value\n*\n* @example\n* var str = nativeClass( 'a' );\n* // returns '[object String]'\n*\n* @example\n* var str = nativeClass( 5 );\n* // returns '[object Number]'\n*\n* @example\n* function Beep() {\n* return this;\n* }\n* var str = nativeClass( new Beep() );\n* // returns '[object Object]'\n*/\nfunction nativeClass( v ) {\n\tvar isOwn;\n\tvar tag;\n\tvar out;\n\n\tif ( v === null || v === void 0 ) {\n\t\treturn toStr.call( v );\n\t}\n\ttag = v[ toStringTag ];\n\tisOwn = hasOwnProp( v, toStringTag );\n\n\t// Attempt to override the `toStringTag` property. For built-ins having a `Symbol.toStringTag` property (e.g., `JSON`, `Math`, etc), the `Symbol.toStringTag` property is read-only (e.g., , so we need to wrap in a `try/catch`.\n\ttry {\n\t\tv[ toStringTag ] = void 0;\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\treturn toStr.call( v );\n\t}\n\tout = toStr.call( v );\n\n\tif ( isOwn ) {\n\t\tv[ toStringTag ] = tag;\n\t} else {\n\t\tdelete v[ toStringTag ];\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default nativeClass;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport toStr from './tostring.js';\n\n\n// MAIN //\n\n/**\n* Returns a string value indicating a specification defined classification (via the internal property `[[Class]]`) of an object.\n*\n* @param {*} v - input value\n* @returns {string} string value indicating a specification defined classification of the input value\n*\n* @example\n* var str = nativeClass( 'a' );\n* // returns '[object String]'\n*\n* @example\n* var str = nativeClass( 5 );\n* // returns '[object Number]'\n*\n* @example\n* function Beep() {\n* return this;\n* }\n* var str = nativeClass( new Beep() );\n* // returns '[object Object]'\n*/\nfunction nativeClass( v ) {\n\treturn toStr.call( v );\n}\n\n\n// EXPORTS //\n\nexport default nativeClass;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// EXPORTS //\n\nexport default Number; // eslint-disable-line stdlib/require-globals\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport Number from '@stdlib/number-ctor';\n\n\n// MAIN //\n\n// eslint-disable-next-line stdlib/no-redeclare\nvar toString = Number.prototype.toString; // non-generic\n\n\n// EXPORTS //\n\nexport default toString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport hasToStringTag from '@stdlib/assert-has-tostringtag-support';\nimport nativeClass from '@stdlib/utils-native-class';\nimport Number from '@stdlib/number-ctor';\nimport test from './try2serialize.js';\n\n\n// VARIABLES //\n\nvar FLG = hasToStringTag();\n\n\n// MAIN //\n\n/**\n* Tests if a value is a number object.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number object\n*\n* @example\n* var bool = isNumber( 3.14 );\n* // returns false\n*\n* @example\n* var bool = isNumber( new Number( 3.14 ) );\n* // returns true\n*/\nfunction isNumber( value ) {\n\tif ( typeof value === 'object' ) {\n\t\tif ( value instanceof Number ) {\n\t\t\treturn true;\n\t\t}\n\t\tif ( FLG ) {\n\t\t\treturn test( value );\n\t\t}\n\t\treturn ( nativeClass( value ) === '[object Number]' );\n\t}\n\treturn false;\n}\n\n\n// EXPORTS //\n\nexport default isNumber;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport toString from './tostring.js'; // eslint-disable-line stdlib/no-redeclare\n\n\n// MAIN //\n\n/**\n* Attempts to serialize a value to a string.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value can be serialized\n*/\nfunction test( value ) {\n\ttry {\n\t\ttoString.call( value );\n\t\treturn true;\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\treturn false;\n\t}\n}\n\n\n// EXPORTS //\n\nexport default test;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a number.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a number\n*\n* @example\n* var bool = isNumber( 3.14 );\n* // returns true\n*\n* @example\n* var bool = isNumber( new Number( 3.14 ) );\n* // returns true\n*\n* @example\n* var bool = isNumber( NaN );\n* // returns true\n*\n* @example\n* var bool = isNumber( null );\n* // returns false\n*/\nfunction isNumber( value ) {\n\treturn ( isPrimitive( value ) || isObject( value ) );\n}\n\n\n// EXPORTS //\n\nexport default isNumber;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test if a value is a number.\n*\n* @module @stdlib/assert-is-number\n*\n* @example\n* import isNumber from '@stdlib/assert-is-number';\n*\n* var bool = isNumber( 3.14 );\n* // returns true\n*\n* bool = isNumber( new Number( 3.14 ) );\n* // returns true\n*\n* bool = isNumber( NaN );\n* // returns true\n*\n* bool = isNumber( null );\n* // returns false\n*\n* @example\n* import { isPrimitive as isNumber } from '@stdlib/assert-is-number';\n*\n* var bool = isNumber( 3.14 );\n* // returns true\n*\n* bool = isNumber( NaN );\n* // returns true\n*\n* bool = isNumber( new Number( 3.14 ) );\n* // returns false\n*\n* @example\n* import { isObject as isNumber } from '@stdlib/assert-is-number';\n*\n* var bool = isNumber( 3.14 );\n* // returns false\n*\n* bool = isNumber( new Number( 3.14 ) );\n* // returns true\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'isPrimitive', isPrimitive );\nsetReadOnly( main, 'isObject', isObject );\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Double-precision floating-point positive infinity.\n*\n* @module @stdlib/constants-float64-pinf\n* @type {number}\n*\n* @example\n* import FLOAT64_PINF from '@stdlib/constants-float64-pinf';\n* // returns Infinity\n*/\n\n\n// MAIN //\n\n/**\n* Double-precision floating-point positive infinity.\n*\n* ## Notes\n*\n* Double-precision floating-point positive infinity has the bit sequence\n*\n* ```binarystring\n* 0 11111111111 00000000000000000000 00000000000000000000000000000000\n* ```\n*\n* @constant\n* @type {number}\n* @default Number.POSITIVE_INFINITY\n* @see [IEEE 754]{@link https://en.wikipedia.org/wiki/IEEE_754-1985}\n*/\nvar FLOAT64_PINF = Number.POSITIVE_INFINITY; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default FLOAT64_PINF;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Double-precision floating-point negative infinity.\n*\n* @module @stdlib/constants-float64-ninf\n* @type {number}\n*\n* @example\n* import FLOAT64_NINF from '@stdlib/constants-float64-ninf';\n* // returns -Infinity\n*/\n\n// MODULES //\n\nimport Number from '@stdlib/number-ctor';\n\n\n// MAIN //\n\n/**\n* Double-precision floating-point negative infinity.\n*\n* ## Notes\n*\n* Double-precision floating-point negative infinity has the bit sequence\n*\n* ```binarystring\n* 1 11111111111 00000000000000000000 00000000000000000000000000000000\n* ```\n*\n* @constant\n* @type {number}\n* @default Number.NEGATIVE_INFINITY\n* @see [IEEE 754]{@link https://en.wikipedia.org/wiki/IEEE_754-1985}\n*/\nvar FLOAT64_NINF = Number.NEGATIVE_INFINITY;\n\n\n// EXPORTS //\n\nexport default FLOAT64_NINF;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: implementation (?)\n\n/**\n* Rounds a double-precision floating-point number toward negative infinity.\n*\n* @param {number} x - input value\n* @returns {number} rounded value\n*\n* @example\n* var v = floor( -4.2 );\n* // returns -5.0\n*\n* @example\n* var v = floor( 9.99999 );\n* // returns 9.0\n*\n* @example\n* var v = floor( 0.0 );\n* // returns 0.0\n*\n* @example\n* var v = floor( NaN );\n* // returns NaN\n*/\nvar floor = Math.floor; // eslint-disable-line stdlib/no-builtin-math\n\n\n// EXPORTS //\n\nexport default floor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport floor from '@stdlib/math-base-special-floor';\n\n\n// MAIN //\n\n/**\n* Tests if a finite double-precision floating-point number is an integer.\n*\n* @param {number} x - value to test\n* @returns {boolean} boolean indicating whether the value is an integer\n*\n* @example\n* var bool = isInteger( 1.0 );\n* // returns true\n*\n* @example\n* var bool = isInteger( 3.14 );\n* // returns false\n*/\nfunction isInteger( x ) {\n\treturn (floor(x) === x);\n}\n\n\n// EXPORTS //\n\nexport default isInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport PINF from '@stdlib/constants-float64-pinf';\nimport NINF from '@stdlib/constants-float64-ninf';\nimport isInt from '@stdlib/math-base-assert-is-integer';\n\n\n// MAIN //\n\n/**\n* Tests if a number primitive is an integer value.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a number primitive is an integer value\n*/\nfunction isInteger( value ) {\n\treturn (\n\t\tvalue < PINF &&\n\t\tvalue > NINF &&\n\t\tisInt( value )\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isNumber } from '@stdlib/assert-is-number';\nimport isInt from './integer.js';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a number primitive having an integer value.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number primitive having an integer value\n*\n* @example\n* var bool = isInteger( -3.0 );\n* // returns true\n*\n* @example\n* var bool = isInteger( new Number( -3.0 ) );\n* // returns false\n*/\nfunction isInteger( value ) {\n\treturn (\n\t\tisNumber( value ) &&\n\t\tisInt( value )\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isObject as isNumber } from '@stdlib/assert-is-number';\nimport isInt from './integer.js';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a number object having an integer value.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number object having an integer value\n*\n* @example\n* var bool = isInteger( 3.0 );\n* // returns false\n*\n* @example\n* var bool = isInteger( new Number( 3.0 ) );\n* // returns true\n*/\nfunction isInteger( value ) {\n\treturn (\n\t\tisNumber( value ) &&\n\t\tisInt( value.valueOf() )\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\n/**\n* Tests if a value is an integer.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an integer\n*\n* @example\n* var bool = isInteger( 5.0 );\n* // returns true\n*\n* @example\n* var bool = isInteger( new Number( 5.0 ) );\n* // returns true\n*\n* @example\n* var bool = isInteger( -3.14 );\n* // returns false\n*\n* @example\n* var bool = isInteger( null );\n* // returns false\n*/\nfunction isInteger( value ) {\n\treturn ( isPrimitive( value ) || isObject( value ) );\n}\n\n\n// EXPORTS //\n\nexport default isInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isInteger } from '@stdlib/assert-is-integer';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a number primitive having a nonnegative integer value.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number primitive having a nonnegative integer value\n*\n* @example\n* var bool = isNonNegativeInteger( 3.0 );\n* // returns true\n*\n* @example\n* var bool = isNonNegativeInteger( new Number( 3.0 ) );\n* // returns false\n*/\nfunction isNonNegativeInteger( value ) {\n\treturn (\n\t\tisInteger( value ) &&\n\t\tvalue >= 0\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isNonNegativeInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isObject as isInteger } from '@stdlib/assert-is-integer';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a number object having a nonnegative integer value.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number object having a nonnegative integer value\n*\n* @example\n* var bool = isNonNegativeInteger( 3.0 );\n* // returns false\n*\n* @example\n* var bool = isNonNegativeInteger( new Number( 3.0 ) );\n* // returns true\n*/\nfunction isNonNegativeInteger( value ) {\n\treturn (\n\t\tisInteger( value ) &&\n\t\tvalue.valueOf() >= 0\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isNonNegativeInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a nonnegative integer.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a nonnegative integer\n*\n* @example\n* var bool = isNonNegativeInteger( 5.0 );\n* // returns true\n*\n* @example\n* var bool = isNonNegativeInteger( new Number( 5.0 ) );\n* // returns true\n*\n* @example\n* var bool = isNonNegativeInteger( -5.0 );\n* // returns false\n*\n* @example\n* var bool = isNonNegativeInteger( 3.14 );\n* // returns false\n*\n* @example\n* var bool = isNonNegativeInteger( null );\n* // returns false\n*/\nfunction isNonNegativeInteger( value ) {\n\treturn ( isPrimitive( value ) || isObject( value ) );\n}\n\n\n// EXPORTS //\n\nexport default isNonNegativeInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test if a value is an integer.\n*\n* @module @stdlib/assert-is-integer\n*\n* @example\n* import isInteger from '@stdlib/assert-is-integer';\n*\n* var bool = isInteger( 5.0 );\n* // returns true\n*\n* bool = isInteger( new Number( 5.0 ) );\n* // returns true\n*\n* bool = isInteger( -3.14 );\n* // returns false\n*\n* bool = isInteger( null );\n* // returns false\n*\n* @example\n* // Use interface to check for integer primitives...\n* import { isPrimitive as isInteger } from '@stdlib/assert-is-integer';\n*\n* var bool = isInteger( -3.0 );\n* // returns true\n*\n* bool = isInteger( new Number( -3.0 ) );\n* // returns false\n*\n* @example\n* // Use interface to check for integer objects...\n* import { isObject as isInteger } from '@stdlib/assert-is-integer';\n*\n* var bool = isInteger( 3.0 );\n* // returns false\n*\n* bool = isInteger( new Number( 3.0 ) );\n* // returns true\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'isPrimitive', isPrimitive );\nsetReadOnly( main, 'isObject', isObject );\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test if a value is a nonnegative integer.\n*\n* @module @stdlib/assert-is-nonnegative-integer\n*\n* @example\n* import isNonNegativeInteger from '@stdlib/assert-is-nonnegative-integer';\n*\n* var bool = isNonNegativeInteger( 5.0 );\n* // returns true\n*\n* bool = isNonNegativeInteger( new Number( 5.0 ) );\n* // returns true\n*\n* bool = isNonNegativeInteger( -5.0 );\n* // returns false\n*\n* bool = isNonNegativeInteger( 3.14 );\n* // returns false\n*\n* bool = isNonNegativeInteger( null );\n* // returns false\n*\n* @example\n* import { isPrimitive as isNonNegativeInteger } from '@stdlib/assert-is-nonnegative-integer';\n*\n* var bool = isNonNegativeInteger( 3.0 );\n* // returns true\n*\n* bool = isNonNegativeInteger( new Number( 3.0 ) );\n* // returns false\n*\n* @example\n* import { isObject as isNonNegativeInteger } from '@stdlib/assert-is-nonnegative-integer';\n*\n* var bool = isNonNegativeInteger( 3.0 );\n* // returns false\n*\n* bool = isNonNegativeInteger( new Number( 3.0 ) );\n* // returns true\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'isPrimitive', isPrimitive );\nsetReadOnly( main, 'isObject', isObject );\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasFloat64Array = ( typeof Float64Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Float64Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a Float64Array\n*\n* @example\n* var bool = isFloat64Array( new Float64Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isFloat64Array( [] );\n* // returns false\n*/\nfunction isFloat64Array( value ) {\n\treturn (\n\t\t( hasFloat64Array && value instanceof Float64Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Float64Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isFloat64Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Float64Array === 'function' ) ? Float64Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Float64Array === 'function' ) ? Float64Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of double-precision floating-point numbers in the platform byte order.\n*\n* @module @stdlib/array-float64\n*\n* @example\n* import ctor from '@stdlib/array-float64';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasFloat64ArraySupport from '@stdlib/assert-has-float64array-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasFloat64ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isFloat64Array from '@stdlib/assert-is-float64array';\nimport GlobalFloat64Array from './float64array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Float64Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Float64Array` support\n*\n* @example\n* var bool = hasFloat64ArraySupport();\n* // returns \n*/\nfunction hasFloat64ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalFloat64Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = new GlobalFloat64Array( [ 1.0, 3.14, -3.14, NaN ] );\n\t\tbool = (\n\t\t\tisFloat64Array( arr ) &&\n\t\t\tarr[ 0 ] === 1.0 &&\n\t\t\tarr[ 1 ] === 3.14 &&\n\t\t\tarr[ 2 ] === -3.14 &&\n\t\t\tarr[ 3 ] !== arr[ 3 ]\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasFloat64ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of double-precision floating-point numbers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasFloat32Array = ( typeof Float32Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Float32Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a Float32Array\n*\n* @example\n* var bool = isFloat32Array( new Float32Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isFloat32Array( [] );\n* // returns false\n*/\nfunction isFloat32Array( value ) {\n\treturn (\n\t\t( hasFloat32Array && value instanceof Float32Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Float32Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isFloat32Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Float32Array === 'function' ) ? Float32Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Float32Array === 'function' ) ? Float32Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of single-precision floating-point numbers in the platform byte order.\n*\n* @module @stdlib/array-float32\n*\n* @example\n* import ctor from '@stdlib/array-float32';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasFloat32ArraySupport from '@stdlib/assert-has-float32array-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasFloat32ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isFloat32Array from '@stdlib/assert-is-float32array';\nimport PINF from '@stdlib/constants-float64-pinf';\nimport GlobalFloat32Array from './float32array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Float32Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Float32Array` support\n*\n* @example\n* var bool = hasFloat32ArraySupport();\n* // returns \n*/\nfunction hasFloat32ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalFloat32Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = new GlobalFloat32Array( [ 1.0, 3.14, -3.14, 5.0e40 ] );\n\t\tbool = (\n\t\t\tisFloat32Array( arr ) &&\n\t\t\tarr[ 0 ] === 1.0 &&\n\t\t\tarr[ 1 ] === 3.140000104904175 &&\n\t\t\tarr[ 2 ] === -3.140000104904175 &&\n\t\t\tarr[ 3 ] === PINF\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasFloat32ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of single-precision floating-point numbers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasInt16Array = ( typeof Int16Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is an Int16Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an Int16Array\n*\n* @example\n* var bool = isInt16Array( new Int16Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isInt16Array( [] );\n* // returns false\n*/\nfunction isInt16Array( value ) {\n\treturn (\n\t\t( hasInt16Array && value instanceof Int16Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Int16Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isInt16Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum signed 16-bit integer.\n*\n* @module @stdlib/constants-int16-max\n* @type {integer32}\n*\n* @example\n* import INT16_MAX from '@stdlib/constants-int16-max';\n* // returns 32767\n*/\n\n\n// MAIN //\n\n/**\n* Maximum signed 16-bit integer.\n*\n* ## Notes\n*\n* The number has the value\n*\n* ```tex\n* 2^{15} - 1\n* ```\n*\n* which corresponds to the bit sequence\n*\n* ```binarystring\n* 0111111111111111\n* ```\n*\n* @constant\n* @type {integer32}\n* @default 32767\n*/\nvar INT16_MAX = 32767|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default INT16_MAX;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Int16Array === 'function' ) ? Int16Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Int16Array === 'function' ) ? Int16Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of twos-complement 16-bit signed integers in the platform byte order.\n*\n* @module @stdlib/array-int16\n*\n* @example\n* import ctor from '@stdlib/array-int16';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasInt16ArraySupport from '@stdlib/assert-has-int16array-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasInt16ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isInt16Array from '@stdlib/assert-is-int16array';\nimport INT16_MAX from '@stdlib/constants-int16-max';\nimport INT16_MIN from '@stdlib/constants-int16-min';\nimport GlobalInt16Array from './int16array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Int16Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Int16Array` support\n*\n* @example\n* var bool = hasInt16ArraySupport();\n* // returns \n*/\nfunction hasInt16ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalInt16Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = new GlobalInt16Array( [ 1, 3.14, -3.14, INT16_MAX+1 ] );\n\t\tbool = (\n\t\t\tisInt16Array( arr ) &&\n\t\t\tarr[ 0 ] === 1 &&\n\t\t\tarr[ 1 ] === 3 && // truncation\n\t\t\tarr[ 2 ] === -3 && // truncation\n\t\t\tarr[ 3 ] === INT16_MIN // wrap around\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasInt16ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Minimum signed 16-bit integer.\n*\n* @module @stdlib/constants-int16-min\n* @type {integer32}\n*\n* @example\n* import INT16_MIN from '@stdlib/constants-int16-min';\n* // returns -32768\n*/\n\n\n// MAIN //\n\n/**\n* Minimum signed 16-bit integer.\n*\n* ## Notes\n*\n* The number has the value\n*\n* ```tex\n* -(2^{15})\n* ```\n*\n* which corresponds to the two's complement bit sequence\n*\n* ```binarystring\n* 1000000000000000\n* ```\n*\n* @constant\n* @type {integer32}\n* @default -32768\n*/\nvar INT16_MIN = -32768|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default INT16_MIN;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of twos-complement 16-bit signed integers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasInt32Array = ( typeof Int32Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is an Int32Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an Int32Array\n*\n* @example\n* var bool = isInt32Array( new Int32Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isInt32Array( [] );\n* // returns false\n*/\nfunction isInt32Array( value ) {\n\treturn (\n\t\t( hasInt32Array && value instanceof Int32Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Int32Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isInt32Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum signed 32-bit integer.\n*\n* @module @stdlib/constants-int32-max\n* @type {integer32}\n*\n* @example\n* import INT32_MAX from '@stdlib/constants-int32-max';\n* // returns 2147483647\n*/\n\n\n// MAIN //\n\n/**\n* Maximum signed 32-bit integer.\n*\n* ## Notes\n*\n* The number has the value\n*\n* ```tex\n* 2^{31} - 1\n* ```\n*\n* which corresponds to the bit sequence\n*\n* ```binarystring\n* 01111111111111111111111111111111\n* ```\n*\n* @constant\n* @type {integer32}\n* @default 2147483647\n*/\nvar INT32_MAX = 2147483647|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default INT32_MAX;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Int32Array === 'function' ) ? Int32Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Int32Array === 'function' ) ? Int32Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of twos-complement 32-bit signed integers in the platform byte order.\n*\n* @module @stdlib/array-int32\n*\n* @example\n* import ctor from '@stdlib/array-int32';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasInt32ArraySupport from '@stdlib/assert-has-int32array-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasInt32ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isInt32Array from '@stdlib/assert-is-int32array';\nimport INT32_MAX from '@stdlib/constants-int32-max';\nimport INT32_MIN from '@stdlib/constants-int32-min';\nimport GlobalInt32Array from './int32array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Int32Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Int32Array` support\n*\n* @example\n* var bool = hasInt32ArraySupport();\n* // returns \n*/\nfunction hasInt32ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalInt32Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = new GlobalInt32Array( [ 1, 3.14, -3.14, INT32_MAX+1 ] );\n\t\tbool = (\n\t\t\tisInt32Array( arr ) &&\n\t\t\tarr[ 0 ] === 1 &&\n\t\t\tarr[ 1 ] === 3 && // truncation\n\t\t\tarr[ 2 ] === -3 && // truncation\n\t\t\tarr[ 3 ] === INT32_MIN // wrap around\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasInt32ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Minimum signed 32-bit integer.\n*\n* @module @stdlib/constants-int32-min\n* @type {integer32}\n*\n* @example\n* import INT32_MIN from '@stdlib/constants-int32-min';\n* // returns -2147483648\n*/\n\n\n// MAIN //\n\n/**\n* Minimum signed 32-bit integer.\n*\n* ## Notes\n*\n* The number has the value\n*\n* ```tex\n* -(2^{31})\n* ```\n*\n* which corresponds to the two's complement bit sequence\n*\n* ```binarystring\n* 10000000000000000000000000000000\n* ```\n*\n* @constant\n* @type {integer32}\n* @default -2147483648\n*/\nvar INT32_MIN = -2147483648|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default INT32_MIN;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of twos-complement 32-bit signed integers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasInt8Array = ( typeof Int8Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is an Int8Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an Int8Array\n*\n* @example\n* var bool = isInt8Array( new Int8Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isInt8Array( [] );\n* // returns false\n*/\nfunction isInt8Array( value ) {\n\treturn (\n\t\t( hasInt8Array && value instanceof Int8Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Int8Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isInt8Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum signed 8-bit integer.\n*\n* @module @stdlib/constants-int8-max\n* @type {integer32}\n*\n* @example\n* import INT8_MAX from '@stdlib/constants-int8-max';\n* // returns 127\n*/\n\n\n// MAIN //\n\n/**\n* Maximum signed 8-bit integer.\n*\n* ## Notes\n*\n* The number is given by\n*\n* ```tex\n* 2^{7} - 1\n* ```\n*\n* which corresponds to the bit sequence\n*\n* ```binarystring\n* 01111111\n* ```\n*\n* @constant\n* @type {integer32}\n* @default 127\n*/\nvar INT8_MAX = 127|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default INT8_MAX;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Int8Array === 'function' ) ? Int8Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Int8Array === 'function' ) ? Int8Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of twos-complement 8-bit signed integers in the platform byte order.\n*\n* @module @stdlib/array-int8\n*\n* @example\n* import ctor from '@stdlib/array-int8';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasInt8ArraySupport from '@stdlib/assert-has-int8array-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasInt8ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isInt8Array from '@stdlib/assert-is-int8array';\nimport INT8_MAX from '@stdlib/constants-int8-max';\nimport INT8_MIN from '@stdlib/constants-int8-min';\nimport GlobalInt8Array from './int8array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Int8Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Int8Array` support\n*\n* @example\n* var bool = hasInt8ArraySupport();\n* // returns \n*/\nfunction hasInt8ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalInt8Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = new GlobalInt8Array( [ 1, 3.14, -3.14, INT8_MAX+1 ] );\n\t\tbool = (\n\t\t\tisInt8Array( arr ) &&\n\t\t\tarr[ 0 ] === 1 &&\n\t\t\tarr[ 1 ] === 3 && // truncation\n\t\t\tarr[ 2 ] === -3 && // truncation\n\t\t\tarr[ 3 ] === INT8_MIN // wrap around\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasInt8ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Minimum signed 8-bit integer.\n*\n* @module @stdlib/constants-int8-min\n* @type {integer32}\n*\n* @example\n* import INT8_MIN from '@stdlib/constants-int8-min';\n* // returns -128\n*/\n\n\n// MAIN //\n\n/**\n* Minimum signed 8-bit integer.\n*\n* ## Notes\n*\n* The number is given by\n*\n* ```tex\n* -(2^{7})\n* ```\n*\n* which corresponds to the two's complement bit sequence\n*\n* ```binarystring\n* 10000000\n* ```\n*\n* @constant\n* @type {integer32}\n* @default -128\n*/\nvar INT8_MIN = -128|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default INT8_MIN;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of twos-complement 8-bit signed integers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasUint16Array = ( typeof Uint16Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Uint16Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a Uint16Array\n*\n* @example\n* var bool = isUint16Array( new Uint16Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isUint16Array( [] );\n* // returns false\n*/\nfunction isUint16Array( value ) {\n\treturn (\n\t\t( hasUint16Array && value instanceof Uint16Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Uint16Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isUint16Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum unsigned 16-bit integer.\n*\n* @module @stdlib/constants-uint16-max\n* @type {integer32}\n*\n* @example\n* import UINT16_MAX from '@stdlib/constants-uint16-max';\n* // returns 65535\n*/\n\n\n// MAIN //\n\n/**\n* Maximum unsigned 16-bit integer.\n*\n* ## Notes\n*\n* The number has the value\n*\n* ```tex\n* 2^{16} - 1\n* ```\n*\n* which corresponds to the bit sequence\n*\n* ```binarystring\n* 1111111111111111\n* ```\n*\n* @constant\n* @type {integer32}\n* @default 65535\n*/\nvar UINT16_MAX = 65535|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default UINT16_MAX;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Uint16Array === 'function' ) ? Uint16Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Uint16Array === 'function' ) ? Uint16Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of 16-bit unsigned integers in the platform byte order.\n*\n* @module @stdlib/array-uint16\n*\n* @example\n* import ctor from '@stdlib/array-uint16';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasUint16ArraySupport from '@stdlib/assert-has-uint16array-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasUint16ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isUint16Array from '@stdlib/assert-is-uint16array';\nimport UINT16_MAX from '@stdlib/constants-uint16-max';\nimport GlobalUint16Array from './uint16array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Uint16Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Uint16Array` support\n*\n* @example\n* var bool = hasUint16ArraySupport();\n* // returns \n*/\nfunction hasUint16ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalUint16Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = [ 1, 3.14, -3.14, UINT16_MAX+1, UINT16_MAX+2 ];\n\t\tarr = new GlobalUint16Array( arr );\n\t\tbool = (\n\t\t\tisUint16Array( arr ) &&\n\t\t\tarr[ 0 ] === 1 &&\n\t\t\tarr[ 1 ] === 3 && // truncation\n\t\t\tarr[ 2 ] === UINT16_MAX-2 && // truncation and wrap around\n\t\t\tarr[ 3 ] === 0 && // wrap around\n\t\t\tarr[ 4 ] === 1 // wrap around\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasUint16ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of 16-bit unsigned integers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasUint32Array = ( typeof Uint32Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Uint32Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a Uint32Array\n*\n* @example\n* var bool = isUint32Array( new Uint32Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isUint32Array( [] );\n* // returns false\n*/\nfunction isUint32Array( value ) {\n\treturn (\n\t\t( hasUint32Array && value instanceof Uint32Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Uint32Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isUint32Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum unsigned 32-bit integer.\n*\n* @module @stdlib/constants-uint32-max\n* @type {uinteger32}\n*\n* @example\n* import UINT32_MAX from '@stdlib/constants-uint32-max';\n* // returns 4294967295\n*/\n\n\n// MAIN //\n\n/**\n* Maximum unsigned 32-bit integer.\n*\n* ## Notes\n*\n* The number has the value\n*\n* ```tex\n* 2^{32} - 1\n* ```\n*\n* which corresponds to the bit sequence\n*\n* ```binarystring\n* 11111111111111111111111111111111\n* ```\n*\n* @constant\n* @type {uinteger32}\n* @default 4294967295\n*/\nvar UINT32_MAX = 4294967295;\n\n\n// EXPORTS //\n\nexport default UINT32_MAX;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Uint32Array === 'function' ) ? Uint32Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Uint32Array === 'function' ) ? Uint32Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of 32-bit unsigned integers in the platform byte order.\n*\n* @module @stdlib/array-uint32\n*\n* @example\n* import ctor from '@stdlib/array-uint32';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasUint32ArraySupport from '@stdlib/assert-has-uint32array-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasUint32ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isUint32Array from '@stdlib/assert-is-uint32array';\nimport UINT32_MAX from '@stdlib/constants-uint32-max';\nimport GlobalUint32Array from './uint32array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Uint32Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Uint32Array` support\n*\n* @example\n* var bool = hasUint32ArraySupport();\n* // returns \n*/\nfunction hasUint32ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalUint32Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = [ 1, 3.14, -3.14, UINT32_MAX+1, UINT32_MAX+2 ];\n\t\tarr = new GlobalUint32Array( arr );\n\t\tbool = (\n\t\t\tisUint32Array( arr ) &&\n\t\t\tarr[ 0 ] === 1 &&\n\t\t\tarr[ 1 ] === 3 && // truncation\n\t\t\tarr[ 2 ] === UINT32_MAX-2 && // truncation and wrap around\n\t\t\tarr[ 3 ] === 0 && // wrap around\n\t\t\tarr[ 4 ] === 1 // wrap around\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasUint32ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of 32-bit unsigned integers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasUint8Array = ( typeof Uint8Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Uint8Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a Uint8Array\n*\n* @example\n* var bool = isUint8Array( new Uint8Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isUint8Array( [] );\n* // returns false\n*/\nfunction isUint8Array( value ) {\n\treturn (\n\t\t( hasUint8Array && value instanceof Uint8Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Uint8Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isUint8Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum unsigned 8-bit integer.\n*\n* @module @stdlib/constants-uint8-max\n* @type {integer32}\n*\n* @example\n* import UINT8_MAX from '@stdlib/constants-uint8-max';\n* // returns 255\n*/\n\n\n// MAIN //\n\n/**\n* Maximum unsigned 8-bit integer.\n*\n* ## Notes\n*\n* The number has the value\n*\n* ```tex\n* 2^{8} - 1\n* ```\n*\n* which corresponds to the bit sequence\n*\n* ```binarystring\n* 11111111\n* ```\n*\n* @constant\n* @type {integer32}\n* @default 255\n*/\nvar UINT8_MAX = 255|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default UINT8_MAX;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Uint8Array === 'function' ) ? Uint8Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Uint8Array === 'function' ) ? Uint8Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of 8-bit unsigned integers in the platform byte order.\n*\n* @module @stdlib/array-uint8\n*\n* @example\n* import ctor from '@stdlib/array-uint8';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasUint8ArraySupport from '@stdlib/assert-has-uint8array-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasUint8ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isUint8Array from '@stdlib/assert-is-uint8array';\nimport UINT8_MAX from '@stdlib/constants-uint8-max';\nimport GlobalUint8Array from './uint8array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Uint8Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Uint8Array` support\n*\n* @example\n* var bool = hasUint8ArraySupport();\n* // returns \n*/\nfunction hasUint8ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalUint8Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = [ 1, 3.14, -3.14, UINT8_MAX+1, UINT8_MAX+2 ];\n\t\tarr = new GlobalUint8Array( arr );\n\t\tbool = (\n\t\t\tisUint8Array( arr ) &&\n\t\t\tarr[ 0 ] === 1 &&\n\t\t\tarr[ 1 ] === 3 && // truncation\n\t\t\tarr[ 2 ] === UINT8_MAX-2 && // truncation and wrap around\n\t\t\tarr[ 3 ] === 0 && // wrap around\n\t\t\tarr[ 4 ] === 1 // wrap around\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasUint8ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of 8-bit unsigned integers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasUint8ClampedArray = ( typeof Uint8ClampedArray === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Uint8ClampedArray.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a Uint8ClampedArray\n*\n* @example\n* var bool = isUint8ClampedArray( new Uint8ClampedArray( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isUint8ClampedArray( [] );\n* // returns false\n*/\nfunction isUint8ClampedArray( value ) {\n\treturn (\n\t\t( hasUint8ClampedArray && value instanceof Uint8ClampedArray ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Uint8ClampedArray]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isUint8ClampedArray;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Uint8ClampedArray === 'function' ) ? Uint8ClampedArray : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Uint8ClampedArray === 'function' ) ? Uint8ClampedArray : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of 8-bit unsigned integers in the platform byte order clamped to 0-255.\n*\n* @module @stdlib/array-uint8c\n*\n* @example\n* import ctor from '@stdlib/array-uint8c';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasUint8ClampedArraySupport from '@stdlib/assert-has-uint8clampedarray-support'; // eslint-disable-line id-length\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasUint8ClampedArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isUint8ClampedArray from '@stdlib/assert-is-uint8clampedarray';\nimport GlobalUint8ClampedArray from './uint8clampedarray.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Uint8ClampedArray` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Uint8ClampedArray` support\n*\n* @example\n* var bool = hasUint8ClampedArraySupport();\n* // returns \n*/\nfunction hasUint8ClampedArraySupport() { // eslint-disable-line id-length\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalUint8ClampedArray !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = new GlobalUint8ClampedArray( [ -1, 0, 1, 3.14, 4.99, 255, 256 ] );\n\t\tbool = (\n\t\t\tisUint8ClampedArray( arr ) &&\n\t\t\tarr[ 0 ] === 0 && // clamped\n\t\t\tarr[ 1 ] === 0 &&\n\t\t\tarr[ 2 ] === 1 &&\n\t\t\tarr[ 3 ] === 3 && // round to nearest\n\t\t\tarr[ 4 ] === 5 && // round to nearest\n\t\t\tarr[ 5 ] === 255 &&\n\t\t\tarr[ 6 ] === 255 // clamped\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasUint8ClampedArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of 8-bit unsigned integers in the platform byte order clamped to 0-255.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isInteger from '@stdlib/math-base-assert-is-integer';\nimport MAX_LENGTH from '@stdlib/constants-array-max-array-length';\n\n\n// MAIN //\n\n/**\n* Tests if a value is an array-like object.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is an array-like object\n*\n* @example\n* var bool = isArrayLikeObject( [] );\n* // returns true\n*\n* @example\n* var bool = isArrayLikeObject( { 'length':10 } );\n* // returns true\n*\n* @example\n* var bool = isArrayLikeObject( 'beep' );\n* // returns false\n*/\nfunction isArrayLikeObject( value ) {\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\ttypeof value.length === 'number' &&\n\t\tisInteger( value.length ) &&\n\t\tvalue.length >= 0 &&\n\t\tvalue.length <= MAX_LENGTH\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isArrayLikeObject;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum length of a generic array.\n*\n* @module @stdlib/constants-array-max-array-length\n*\n* @example\n* import MAX_ARRAY_LENGTH from '@stdlib/constants-array-max-array-length';\n* // returns 4294967295\n*/\n\n// MAIN //\n\n/**\n* Maximum length of a generic array.\n*\n* ```tex\n* 2^{32} - 1\n* ```\n*\n* @constant\n* @type {uinteger32}\n* @default 4294967295\n*/\nvar MAX_ARRAY_LENGTH = 4294967295>>>0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default MAX_ARRAY_LENGTH;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isInteger from '@stdlib/math-base-assert-is-integer';\nimport MAX_LENGTH from '@stdlib/constants-array-max-typed-array-length';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a collection.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether a value is a collection\n*\n* @example\n* var bool = isCollection( [] );\n* // returns true\n*\n* @example\n* var bool = isCollection( {} );\n* // returns false\n*/\nfunction isCollection( value ) {\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\ttypeof value.length === 'number' &&\n\t\tisInteger( value.length ) &&\n\t\tvalue.length >= 0 &&\n\t\tvalue.length <= MAX_LENGTH\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isCollection;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum length of a typed array.\n*\n* @module @stdlib/constants-array-max-typed-array-length\n*\n* @example\n* import MAX_TYPED_ARRAY_LENGTH from '@stdlib/constants-array-max-typed-array-length';\n* // returns 9007199254740991\n*/\n\n// MAIN //\n\n/**\n* Maximum length of a typed array.\n*\n* ```tex\n* 2^{53} - 1\n* ```\n*\n* @constant\n* @type {number}\n* @default 9007199254740991\n*/\nvar MAX_TYPED_ARRAY_LENGTH = 9007199254740991;\n\n\n// EXPORTS //\n\nexport default MAX_TYPED_ARRAY_LENGTH;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasArrayBuffer = ( typeof ArrayBuffer === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is an ArrayBuffer.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an ArrayBuffer\n*\n* @example\n* import ArrayBuffer from '@stdlib/array-buffer';\n*\n* var bool = isArrayBuffer( new ArrayBuffer( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isArrayBuffer( [] );\n* // returns false\n*/\nfunction isArrayBuffer( value ) {\n\treturn (\n\t\t( hasArrayBuffer && value instanceof ArrayBuffer ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object ArrayBuffer]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isArrayBuffer;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar f;\n\n\n// FUNCTIONS //\n\n/**\n* Tests if a value is an array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an array\n*\n* @example\n* var bool = isArray( [] );\n* // returns true\n*\n* @example\n* var bool = isArray( {} );\n* // returns false\n*/\nfunction isArray( value ) {\n\treturn ( nativeClass( value ) === '[object Array]' );\n}\n\n\n// MAIN //\n\nif ( Array.isArray ) {\n\tf = Array.isArray;\n} else {\n\tf = isArray;\n}\n\n\n// EXPORTS //\n\nexport default f;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isArray from '@stdlib/assert-is-array';\n\n\n// MAIN //\n\n/**\n* Tests if a value is an object; e.g., `{}`.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an object\n*\n* @example\n* var bool = isObject( {} );\n* // returns true\n*\n* @example\n* var bool = isObject( null );\n* // returns false\n*/\nfunction isObject( value ) {\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\t!isArray( value )\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isObject;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\nvar RE = /./;\n\n\n// EXPORTS //\n\nexport default RE;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Tests if a value is a boolean primitive.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a boolean primitive\n*\n* @example\n* var bool = isBoolean( true );\n* // returns true\n*\n* @example\n* var bool = isBoolean( false );\n* // returns true\n*\n* @example\n* import Boolean from '@stdlib/boolean-ctor';\n*\n* var bool = isBoolean( new Boolean( true ) );\n* // returns false\n*/\nfunction isBoolean( value ) {\n\treturn ( typeof value === 'boolean' );\n}\n\n\n// EXPORTS //\n\nexport default isBoolean;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Returns a boolean.\n*\n* @name Boolean\n* @constructor\n* @type {Function}\n* @param {*} value - input value\n* @returns {(boolean|Boolean)} boolean\n*\n* @example\n* var b = Boolean( null );\n* // returns false\n*\n* b = Boolean( [] );\n* // returns true\n*\n* b = Boolean( {} );\n* // returns true\n*\n* @example\n* var b = new Boolean( false );\n* // returns \n*/\nvar Bool = Boolean; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default Bool;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// eslint-disable-next-line stdlib/no-redeclare\nvar toString = Boolean.prototype.toString; // non-generic\n\n\n// EXPORTS //\n\nexport default toString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport hasToStringTag from '@stdlib/assert-has-tostringtag-support';\nimport nativeClass from '@stdlib/utils-native-class';\nimport Boolean from '@stdlib/boolean-ctor';\nimport test from './try2serialize.js';\n\n\n// VARIABLES //\n\nvar FLG = hasToStringTag();\n\n\n// MAIN //\n\n/**\n* Tests if a value is a boolean object.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a boolean object\n*\n* @example\n* var bool = isBoolean( true );\n* // returns false\n*\n* @example\n* import Boolean from '@stdlib/boolean-ctor';\n*\n* var bool = isBoolean( new Boolean( false ) );\n* // returns true\n*/\nfunction isBoolean( value ) {\n\tif ( typeof value === 'object' ) {\n\t\tif ( value instanceof Boolean ) {\n\t\t\treturn true;\n\t\t}\n\t\tif ( FLG ) {\n\t\t\treturn test( value );\n\t\t}\n\t\treturn ( nativeClass( value ) === '[object Boolean]' );\n\t}\n\treturn false;\n}\n\n\n// EXPORTS //\n\nexport default isBoolean;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport toString from './tostring.js'; // eslint-disable-line stdlib/no-redeclare\n\n\n// MAIN //\n\n/**\n* Attempts to serialize a value to a string.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value can be serialized\n*/\nfunction test( value ) {\n\ttry {\n\t\ttoString.call( value );\n\t\treturn true;\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\treturn false;\n\t}\n}\n\n\n// EXPORTS //\n\nexport default test;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a boolean.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a boolean\n*\n* @example\n* var bool = isBoolean( false );\n* // returns true\n*\n* @example\n* var bool = isBoolean( true );\n* // returns true\n*\n* @example\n* import Boolean from '@stdlib/boolean-ctor';\n*\n* var bool = isBoolean( new Boolean( false ) );\n* // returns true\n*\n* @example\n* import Boolean from '@stdlib/boolean-ctor';\n*\n* var bool = isBoolean( new Boolean( true ) );\n* // returns true\n*/\nfunction isBoolean( value ) {\n\treturn ( isPrimitive( value ) || isObject( value ) );\n}\n\n\n// EXPORTS //\n\nexport default isBoolean;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Returns the global object using code generation.\n*\n* @private\n* @returns {Object} global object\n*/\nfunction getGlobal() {\n\treturn new Function( 'return this;' )(); // eslint-disable-line no-new-func, stdlib/require-globals\n}\n\n\n// EXPORTS //\n\nexport default getGlobal;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test if a value is a boolean.\n*\n* @module @stdlib/assert-is-boolean\n*\n* @example\n* import Boolean from '@stdlib/boolean-ctor';\n* import isBoolean from '@stdlib/assert-is-boolean';\n*\n* var bool = isBoolean( false );\n* // returns true\n*\n* bool = isBoolean( new Boolean( false ) );\n* // returns true\n*\n* @example\n* import Boolean from '@stdlib/boolean-ctor';\n* import { isPrimitive as isBoolean } from '@stdlib/assert-is-boolean';\n*\n* var bool = isBoolean( false );\n* // returns true\n*\n* bool = isBoolean( new Boolean( true ) );\n* // returns false\n*\n* @example\n* import Boolean from '@stdlib/boolean-ctor';\n* import { isObject as isBoolean } from '@stdlib/assert-is-boolean';\n*\n* var bool = isBoolean( true );\n* // returns false\n*\n* bool = isBoolean( new Boolean( false ) );\n* // returns true\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'isPrimitive', isPrimitive );\nsetReadOnly( main, 'isObject', isObject );\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar obj = ( typeof self === 'object' ) ? self : null;\n\n\n// EXPORTS //\n\nexport default obj;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar obj = ( typeof window === 'object' ) ? window : null;\n\n\n// EXPORTS //\n\nexport default obj;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar obj = ( typeof global === 'object' ) ? global : null;\n\n\n// EXPORTS //\n\nexport default obj;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar obj = ( typeof globalThis === 'object' ) ? globalThis : null; // eslint-disable-line no-undef\n\n\n// EXPORTS //\n\nexport default obj;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport getGlobal from '@stdlib/utils-global';\n\n\n// MAIN //\n\nvar root = getGlobal();\nvar nodeList = root.document && root.document.childNodes;\n\n\n// EXPORTS //\n\nexport default nodeList;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isBoolean } from '@stdlib/assert-is-boolean';\nimport format from '@stdlib/string-format';\nimport getThis from './codegen.js';\nimport Self from './self.js';\nimport Win from './window.js';\nimport Global from './global.js';\nimport GlobalThis from './global_this.js';\n\n\n// MAIN //\n\n/**\n* Returns the global object.\n*\n* ## Notes\n*\n* - Using code generation is the **most** reliable way to resolve the global object; however, doing so is likely to violate content security policies (CSPs) in, e.g., Chrome Apps and elsewhere.\n*\n* @param {boolean} [codegen=false] - boolean indicating whether to use code generation to resolve the global object\n* @throws {TypeError} must provide a boolean\n* @throws {Error} unable to resolve global object\n* @returns {Object} global object\n*\n* @example\n* var g = getGlobal();\n* // returns {...}\n*/\nfunction getGlobal( codegen ) {\n\tif ( arguments.length ) {\n\t\tif ( !isBoolean( codegen ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Must provide a boolean. Value: `%s`.', codegen ) );\n\t\t}\n\t\tif ( codegen ) {\n\t\t\treturn getThis();\n\t\t}\n\t\t// Fall through...\n\t}\n\t// Case: 2020 revision of ECMAScript standard\n\tif ( GlobalThis ) {\n\t\treturn GlobalThis;\n\t}\n\t// Case: browsers and web workers\n\tif ( Self ) {\n\t\treturn Self;\n\t}\n\t// Case: browsers\n\tif ( Win ) {\n\t\treturn Win;\n\t}\n\t// Case: Node.js\n\tif ( Global ) {\n\t\treturn Global;\n\t}\n\t// Case: unknown\n\tthrow new Error( 'unexpected error. Unable to resolve global object.' );\n}\n\n\n// EXPORTS //\n\nexport default getGlobal;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\nvar typedarray = Int8Array; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default typedarray;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Returns a regular expression to capture everything that is not a space immediately after the `function` keyword and before the first left parenthesis.\n*\n* @returns {RegExp} regular expression\n*\n* @example\n* var RE_FUNCTION_NAME = reFunctionName();\n*\n* function fname( fcn ) {\n* return RE_FUNCTION_NAME.exec( fcn.toString() )[ 1 ];\n* }\n*\n* var fn = fname( Math.sqrt );\n* // returns 'sqrt'\n*\n* fn = fname( Int8Array );\n* // returns 'Int8Array'\n*\n* fn = fname( Object.prototype.toString );\n* // returns 'toString'\n*\n* fn = fname( function(){} );\n* // returns ''\n*/\nfunction reFunctionName() {\n\treturn /^\\s*function\\s*([^(]*)/i;\n}\n\n\n// EXPORTS //\n\nexport default reFunctionName;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport reFunctionName from './main.js';\n\n\n// MAIN //\n\n/**\n* Captures everything that is not a space immediately after the `function` keyword and before the first left parenthesis.\n*\n* Regular expression: `/^\\s*function\\s*([^(]*)/i`\n*\n* - `/^\\s*`\n* - Match zero or more spaces at beginning\n*\n* - `function`\n* - Match the word `function`\n*\n* - `\\s*`\n* - Match zero or more spaces after the word `function`\n*\n* - `()`\n* - Capture\n*\n* - `[^(]*`\n* - Match anything except a left parenthesis `(` zero or more times\n*\n* - `/i`\n* - ignore case\n*\n* @constant\n* @type {RegExp}\n* @default /^\\s*function\\s*([^(]*)/i\n*/\nvar RE_FUNCTION_NAME = reFunctionName();\n\n\n// EXPORTS //\n\nexport default RE_FUNCTION_NAME;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Tests if a value is object-like.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether a value is object-like\n*\n* @example\n* var bool = isObjectLike( {} );\n* // returns true\n*\n* @example\n* var bool = isObjectLike( [] );\n* // returns true\n*\n* @example\n* var bool = isObjectLike( null );\n* // returns false\n*/\nfunction isObjectLike( value ) {\n\treturn (\n\t\tvalue !== null &&\n\t\ttypeof value === 'object'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isObjectLike;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\nimport { REGEXP as RE } from '@stdlib/regexp-function-name';\nimport isBuffer from '@stdlib/assert-is-buffer';\n\n\n// MAIN //\n\n/**\n* Determines the name of a value's constructor.\n*\n* @param {*} v - input value\n* @returns {string} name of a value's constructor\n*\n* @example\n* var v = constructorName( 'a' );\n* // returns 'String'\n*\n* @example\n* var v = constructorName( 5 );\n* // returns 'Number'\n*\n* @example\n* var v = constructorName( null );\n* // returns 'Null'\n*\n* @example\n* var v = constructorName( undefined );\n* // returns 'Undefined'\n*\n* @example\n* var v = constructorName( function noop() {} );\n* // returns 'Function'\n*/\nfunction constructorName( v ) {\n\tvar match;\n\tvar name;\n\tvar ctor;\n\tname = nativeClass( v ).slice( 8, -1 );\n\tif ( (name === 'Object' || name === 'Error') && v.constructor ) {\n\t\tctor = v.constructor;\n\t\tif ( typeof ctor.name === 'string' ) {\n\t\t\treturn ctor.name;\n\t\t}\n\t\tmatch = RE.exec( ctor.toString() );\n\t\tif ( match ) {\n\t\t\treturn match[ 1 ];\n\t\t}\n\t}\n\tif ( isBuffer( v ) ) {\n\t\treturn 'Buffer';\n\t}\n\treturn name;\n}\n\n\n// EXPORTS //\n\nexport default constructorName;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isObjectLike from '@stdlib/assert-is-object-like';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Buffer instance.\n*\n* @param {*} value - value to validate\n* @returns {boolean} boolean indicating if a value is a Buffer instance\n*\n* @example\n* var v = isBuffer( new Buffer( 'beep' ) );\n* // returns true\n*\n* @example\n* var v = isBuffer( new Buffer( [1,2,3,4] ) );\n* // returns true\n*\n* @example\n* var v = isBuffer( {} );\n* // returns false\n*\n* @example\n* var v = isBuffer( [] );\n* // returns false\n*/\nfunction isBuffer( value ) {\n\treturn (\n\t\tisObjectLike( value ) &&\n\t\t(\n\t\t\t// eslint-disable-next-line no-underscore-dangle\n\t\t\tvalue._isBuffer || // for envs missing Object.prototype.constructor (e.g., Safari 5-7)\n\t\t\t(\n\t\t\t\tvalue.constructor &&\n\n\t\t\t\t// WARNING: `typeof` is not a foolproof check, as certain envs consider RegExp and NodeList instances to be functions\n\t\t\t\ttypeof value.constructor.isBuffer === 'function' &&\n\t\t\t\tvalue.constructor.isBuffer( value )\n\t\t\t)\n\t\t)\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isBuffer;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Regular expression to capture everything that is not a space immediately after the `function` keyword and before the first left parenthesis.\n*\n* @module @stdlib/regexp-function-name\n*\n* @example\n* import reFunctionName from '@stdlib/regexp-function-name';\n* var RE_FUNCTION_NAME = reFunctionName();\n*\n* function fname( fcn ) {\n* return RE_FUNCTION_NAME.exec( fcn.toString() )[ 1 ];\n* }\n*\n* var fn = fname( Math.sqrt );\n* // returns 'sqrt'\n*\n* fn = fname( Int8Array );\n* // returns 'Int8Array'\n*\n* fn = fname( Object.prototype.toString );\n* // returns 'toString'\n*\n* fn = fname( function(){} );\n* // returns ''\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport REGEXP from './regexp.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'REGEXP', REGEXP );\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test if a value is object-like.\n*\n* @module @stdlib/assert-is-object-like\n*\n* @example\n* import isObjectLike from '@stdlib/assert-is-object-like';\n*\n* var bool = isObjectLike( {} );\n* // returns true\n*\n* bool = isObjectLike( [] );\n* // returns true\n*\n* bool = isObjectLike( null );\n* // returns false\n*\n* @example\n* import { isObjectLikeArray as isObjectLike } from '@stdlib/assert-is-object-like';\n*\n* var bool = isObjectLike( [ {}, [] ] );\n* // returns true\n*\n* bool = isObjectLike( [ {}, '3.0' ] );\n* // returns false\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport arrayfun from '@stdlib/assert-tools-array-function';\nimport main from './main.js';\n\n\n// VARIABLES //\n\nvar isObjectLikeArray = arrayfun( main );\n\n\n// MAIN //\n\nsetReadOnly( main, 'isObjectLikeArray', isObjectLikeArray );\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isArray from '@stdlib/assert-is-array';\nimport format from '@stdlib/string-format';\n\n\n// MAIN //\n\n/**\n* Returns a function which tests if every element in an array passes a test condition.\n*\n* @param {Function} predicate - function to apply\n* @throws {TypeError} must provide a function\n* @returns {Function} an array function\n*\n* @example\n* import isOdd from '@stdlib/assert-is-odd';\n*\n* var arr1 = [ 1, 3, 5, 7 ];\n* var arr2 = [ 3, 5, 8 ];\n*\n* var validate = arrayfcn( isOdd );\n*\n* var bool = validate( arr1 );\n* // returns true\n*\n* bool = validate( arr2 );\n* // returns false\n*/\nfunction arrayfcn( predicate ) {\n\tif ( typeof predicate !== 'function' ) {\n\t\tthrow new TypeError( format( 'invalid argument. Must provide a function. Value: `%s`.', predicate ) );\n\t}\n\treturn every;\n\n\t/**\n\t* Tests if every element in an array passes a test condition.\n\t*\n\t* @private\n\t* @param {*} value - value to test\n\t* @returns {boolean} boolean indicating whether a value is an array for which all elements pass a test condition\n\t*/\n\tfunction every( value ) {\n\t\tvar len;\n\t\tvar i;\n\t\tif ( !isArray( value ) ) {\n\t\t\treturn false;\n\t\t}\n\t\tlen = value.length;\n\t\tif ( len === 0 ) {\n\t\t\treturn false;\n\t\t}\n\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\tif ( predicate( value[ i ] ) === false ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}\n}\n\n\n// EXPORTS //\n\nexport default arrayfcn;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Determine a value's type.\n*\n* @module @stdlib/utils-type-of\n*\n* @example\n* import typeOf from '@stdlib/utils-type-of';\n*\n* var str = typeOf( 'a' );\n* // returns 'string'\n*\n* str = typeOf( 5 );\n* // returns 'number'\n*/\n\n// MODULES //\n\nimport usePolyfill from './check.js';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar main = ( usePolyfill() ) ? polyfill : builtin;\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport RE from './fixtures/re.js';\nimport nodeList from './fixtures/nodelist.js';\nimport typedarray from './fixtures/typedarray.js';\n\n\n// MAIN //\n\n/**\n* Checks whether a polyfill is needed when using the `typeof` operator.\n*\n* @private\n* @returns {boolean} boolean indicating whether a polyfill is needed\n*/\nfunction check() {\n\tif (\n\t\t// Chrome 1-12 returns 'function' for regular expression instances (see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/typeof):\n\t\ttypeof RE === 'function' ||\n\n\t\t// Safari 8 returns 'object' for typed array and weak map constructors (underscore #1929):\n\t\ttypeof typedarray === 'object' ||\n\n\t\t// PhantomJS 1.9 returns 'function' for `NodeList` instances (underscore #2236):\n\t\ttypeof nodeList === 'function'\n\t) {\n\t\treturn true;\n\t}\n\treturn false;\n}\n\n\n// EXPORTS //\n\nexport default check;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport ctorName from '@stdlib/utils-constructor-name';\n\n\n// MAIN //\n\n/**\n* Determines a value's type.\n*\n* @param {*} v - input value\n* @returns {string} string indicating the value's type\n*/\nfunction typeOf( v ) {\n\treturn ctorName( v ).toLowerCase();\n}\n\n\n// EXPORTS //\n\nexport default typeOf;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport ctorName from '@stdlib/utils-constructor-name';\n\n\n// NOTES //\n\n/*\n* Built-in `typeof` operator behavior:\n*\n* ```text\n* typeof null => 'object'\n* typeof undefined => 'undefined'\n* typeof 'a' => 'string'\n* typeof 5 => 'number'\n* typeof NaN => 'number'\n* typeof true => 'boolean'\n* typeof false => 'boolean'\n* typeof {} => 'object'\n* typeof [] => 'object'\n* typeof function foo(){} => 'function'\n* typeof function* foo(){} => 'object'\n* typeof Symbol() => 'symbol'\n* ```\n*\n*/\n\n\n// MAIN //\n\n/**\n* Determines a value's type.\n*\n* @param {*} v - input value\n* @returns {string} string indicating the value's type\n*/\nfunction typeOf( v ) {\n\tvar type;\n\n\t// Address `typeof null` => `object` (see http://wiki.ecmascript.org/doku.php?id=harmony:typeof_null):\n\tif ( v === null ) {\n\t\treturn 'null';\n\t}\n\ttype = typeof v;\n\n\t// If the `typeof` operator returned something other than `object`, we are done. Otherwise, we need to check for an internal class name or search for a constructor.\n\tif ( type === 'object' ) {\n\t\treturn ctorName( v ).toLowerCase();\n\t}\n\treturn type;\n}\n\n\n// EXPORTS //\n\nexport default typeOf;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport typeOf from '@stdlib/utils-type-of';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a function.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a function\n*\n* @example\n* function beep() {\n* return 'beep';\n* }\n*\n* var bool = isFunction( beep );\n* // returns true\n*/\nfunction isFunction( value ) {\n\t// Note: cannot use `typeof` directly, as various browser engines incorrectly return `'function'` when operating on non-function objects, such as regular expressions and NodeLists.\n\treturn ( typeOf( value ) === 'function' );\n}\n\n\n// EXPORTS //\n\nexport default isFunction;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isNumber } from '@stdlib/assert-is-number';\nimport defineProperty from '@stdlib/utils-define-property';\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport format from '@stdlib/string-format';\nimport toStr from './tostring.js';\nimport toJSON from './tojson.js';\n\n\n// MAIN //\n\n/**\n* 128-bit complex number constructor.\n*\n* @constructor\n* @param {number} real - real component\n* @param {number} imag - imaginary component\n* @throws {TypeError} must invoke using the `new` keyword\n* @throws {TypeError} real component must be a number\n* @throws {TypeError} imaginary component must be a number\n* @returns {Complex128} 128-bit complex number\n*\n* @example\n* var z = new Complex128( 5.0, 3.0 );\n* // returns \n*/\nfunction Complex128( real, imag ) {\n\tif ( !( this instanceof Complex128 ) ) {\n\t\tthrow new TypeError( 'invalid invocation. Constructor must be called with the `new` keyword.' );\n\t}\n\tif ( !isNumber( real ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Real component must be a number. Value: `%s`.', real ) );\n\t}\n\tif ( !isNumber( imag ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Imaginary component must be a number. Value: `%s`.', imag ) );\n\t}\n\tdefineProperty( this, 're', {\n\t\t'configurable': false,\n\t\t'enumerable': true,\n\t\t'writable': false,\n\t\t'value': real\n\t});\n\tdefineProperty( this, 'im', {\n\t\t'configurable': false,\n\t\t'enumerable': true,\n\t\t'writable': false,\n\t\t'value': imag\n\t});\n\treturn this;\n}\n\n/**\n* Size (in bytes) of each component.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex128\n* @type {integer}\n* @returns {integer} size of each component\n*\n* @example\n* var nbytes = Complex128.BYTES_PER_ELEMENT;\n* // returns 8\n*/\nsetReadOnly( Complex128, 'BYTES_PER_ELEMENT', 8 );\n\n/**\n* Size (in bytes) of each component.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex128.prototype\n* @type {integer}\n* @returns {integer} size of each component\n*\n* @example\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var nbytes = z.BYTES_PER_ELEMENT;\n* // returns 8\n*/\nsetReadOnly( Complex128.prototype, 'BYTES_PER_ELEMENT', 8 );\n\n/**\n* Length (in bytes) of a complex number.\n*\n* @name byteLength\n* @memberof Complex128.prototype\n* @type {integer}\n* @returns {integer} byte length\n*\n* @example\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var nbytes = z.byteLength;\n* // returns 16\n*/\nsetReadOnly( Complex128.prototype, 'byteLength', 16 );\n\n/**\n* Serializes a complex number as a string.\n*\n* @name toString\n* @memberof Complex128.prototype\n* @type {Function}\n* @returns {string} serialized complex number\n*\n* @example\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var str = z.toString();\n* // returns '5 + 3i'\n*/\nsetReadOnly( Complex128.prototype, 'toString', toStr );\n\n/**\n* Serializes a complex number as a JSON object.\n*\n* ## Notes\n*\n* - `JSON.stringify()` implicitly calls this method when stringifying a `Complex128` instance.\n*\n* @name toJSON\n* @memberof Complex128.prototype\n* @type {Function}\n* @returns {Object} serialized complex number\n*\n* @example\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var obj = z.toJSON();\n* // returns { 'type': 'Complex128', 're': 5.0, 'im': 3.0 }\n*/\nsetReadOnly( Complex128.prototype, 'toJSON', toJSON );\n\n\n// EXPORTS //\n\nexport default Complex128;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Serializes a complex number as a string.\n*\n* @private\n* @returns {string} serialized complex number\n*/\nfunction toString() { // eslint-disable-line stdlib/no-redeclare\n\t/* eslint-disable no-invalid-this */\n\tvar str = '' + this.re;\n\tif ( this.im < 0 ) {\n\t\tstr += ' - ' + (-this.im);\n\t} else {\n\t\tstr += ' + ' + this.im;\n\t}\n\tstr += 'i';\n\treturn str;\n}\n\n\n// EXPORTS //\n\nexport default toString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Serializes a complex number as a JSON object.\n*\n* @private\n* @returns {Object} JSON representation\n*/\nfunction toJSON() {\n\t/* eslint-disable no-invalid-this */\n\tvar out = {};\n\tout.type = 'Complex128';\n\tout.re = this.re;\n\tout.im = this.im;\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default toJSON;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar fround = ( typeof Math.fround === 'function' ) ? Math.fround : null; // eslint-disable-line stdlib/no-builtin-math\n\n\n// EXPORTS //\n\nexport default fround;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport Float32Array from '@stdlib/array-float32';\n\n\n// VARIABLES //\n\nvar FLOAT32_VIEW = new Float32Array( 1 );\n\n\n// MAIN //\n\n/**\n* Converts a double-precision floating-point number to the nearest single-precision floating-point number.\n*\n* @param {number} x - double-precision floating-point number\n* @returns {number} nearest single-precision floating-point number\n*\n* @example\n* var y = float64ToFloat32( 1.337 );\n* // returns 1.3370000123977661\n*/\nfunction float64ToFloat32( x ) {\n\tFLOAT32_VIEW[ 0 ] = x;\n\treturn FLOAT32_VIEW[ 0 ];\n}\n\n\n// EXPORTS //\n\nexport default float64ToFloat32;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Convert a double-precision floating-point number to the nearest single-precision floating-point number.\n*\n* @module @stdlib/number-float64-base-to-float32\n*\n* @example\n* import float64ToFloat32 from '@stdlib/number-float64-base-to-float32';\n*\n* var y = float64ToFloat32( 1.337 );\n* // returns 1.3370000123977661\n*/\n\n// MODULES //\n\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar float64ToFloat32;\nif ( typeof builtin === 'function' ) {\n\tfloat64ToFloat32 = builtin;\n} else {\n\tfloat64ToFloat32 = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default float64ToFloat32;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isNumber } from '@stdlib/assert-is-number';\nimport defineProperty from '@stdlib/utils-define-property';\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport float64ToFloat32 from '@stdlib/number-float64-base-to-float32';\nimport format from '@stdlib/string-format';\nimport toStr from './tostring.js';\nimport toJSON from './tojson.js';\n\n\n// MAIN //\n\n/**\n* 64-bit complex number constructor.\n*\n* @constructor\n* @param {number} real - real component\n* @param {number} imag - imaginary component\n* @throws {TypeError} must invoke using the `new` keyword\n* @throws {TypeError} real component must be a number\n* @throws {TypeError} imaginary component must be a number\n* @returns {Complex64} 64-bit complex number\n*\n* @example\n* var z = new Complex64( 5.0, 3.0 );\n* // returns \n*/\nfunction Complex64( real, imag ) {\n\tif ( !( this instanceof Complex64 ) ) {\n\t\tthrow new TypeError( 'invalid invocation. Constructor must be called with the `new` keyword.' );\n\t}\n\tif ( !isNumber( real ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Real component must be a number. Value: `%s`.', real ) );\n\t}\n\tif ( !isNumber( imag ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Imaginary component must be a number. Value: `%s`.', imag ) );\n\t}\n\tdefineProperty( this, 're', {\n\t\t'configurable': false,\n\t\t'enumerable': true,\n\t\t'writable': false,\n\t\t'value': float64ToFloat32( real )\n\t});\n\tdefineProperty( this, 'im', {\n\t\t'configurable': false,\n\t\t'enumerable': true,\n\t\t'writable': false,\n\t\t'value': float64ToFloat32( imag )\n\t});\n\treturn this;\n}\n\n/**\n* Size (in bytes) of each component.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex64\n* @type {integer}\n* @returns {integer} size of each component\n*\n* @example\n* var nbytes = Complex64.BYTES_PER_ELEMENT;\n* // returns 4\n*/\nsetReadOnly( Complex64, 'BYTES_PER_ELEMENT', 4 );\n\n/**\n* Size (in bytes) of each component.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex64.prototype\n* @type {integer}\n* @returns {integer} size of each component\n*\n* @example\n* var z = new Complex64( 5.0, 3.0 );\n*\n* var nbytes = z.BYTES_PER_ELEMENT;\n* // returns 4\n*/\nsetReadOnly( Complex64.prototype, 'BYTES_PER_ELEMENT', 4 );\n\n/**\n* Length (in bytes) of a complex number.\n*\n* @name byteLength\n* @memberof Complex64.prototype\n* @type {integer}\n* @returns {integer} byte length\n*\n* @example\n* var z = new Complex64( 5.0, 3.0 );\n*\n* var nbytes = z.byteLength;\n* // returns 8\n*/\nsetReadOnly( Complex64.prototype, 'byteLength', 8 );\n\n/**\n* Serializes a complex number as a string.\n*\n* @name toString\n* @memberof Complex64.prototype\n* @type {Function}\n* @returns {string} serialized complex number\n*\n* @example\n* var z = new Complex64( 5.0, 3.0 );\n*\n* var str = z.toString();\n* // returns '5 + 3i'\n*/\nsetReadOnly( Complex64.prototype, 'toString', toStr );\n\n/**\n* Serializes a complex number as a JSON object.\n*\n* ## Notes\n*\n* - `JSON.stringify()` implicitly calls this method when stringifying a `Complex64` instance.\n*\n* @name toJSON\n* @memberof Complex64.prototype\n* @type {Function}\n* @returns {Object} serialized complex number\n*\n* @example\n* var z = new Complex64( 5.0, 3.0 );\n*\n* var obj = z.toJSON();\n* // returns { 'type': 'Complex64', 're': 5.0, 'im': 3.0 }\n*/\nsetReadOnly( Complex64.prototype, 'toJSON', toJSON );\n\n\n// EXPORTS //\n\nexport default Complex64;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport Complex128 from '@stdlib/complex-float64';\nimport Complex64 from '@stdlib/complex-float32';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a complex number-like object.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a complex number-like object.\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n* import Complex64 from '@stdlib/complex-float32';\n*\n* var x = new Complex128( 4.0, 2.0 );\n* var bool = isComplexLike( x );\n* // returns true\n*\n* x = new Complex64( 4.0, 2.0 );\n* bool = isComplexLike( x );\n* // returns true\n*/\nfunction isComplexLike( value ) {\n\tif ( value instanceof Complex128 || value instanceof Complex64 ) {\n\t\treturn true;\n\t}\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\ttypeof value.re === 'number' &&\n\t\ttypeof value.im === 'number'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isComplexLike;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isInteger from '@stdlib/math-base-assert-is-integer';\n\n\n// MAIN //\n\n/**\n* Tests if a finite numeric value is an even number.\n*\n* @param {number} x - value to test\n* @returns {boolean} boolean indicating whether the value is an even number\n*\n* @example\n* var bool = isEven( 5.0 );\n* // returns false\n*\n* @example\n* var bool = isEven( -2.0 );\n* // returns true\n*\n* @example\n* var bool = isEven( 0.0 );\n* // returns true\n*\n* @example\n* var bool = isEven( NaN );\n* // returns false\n*/\nfunction isEven( x ) {\n\treturn isInteger( x/2.0 );\n}\n\n\n// EXPORTS //\n\nexport default isEven;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport hasOwnProp from '@stdlib/assert-has-own-property';\nimport Symbol from '@stdlib/symbol-ctor';\n\n\n// MAIN //\n\n/**\n* Tests for native `Symbol.iterator` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Symbol.iterator` support\n*\n* @example\n* var bool = hasIteratorSymbolSupport();\n* // returns \n*/\nfunction hasIteratorSymbolSupport() {\n\treturn (\n\t\ttypeof Symbol === 'function' &&\n\t\ttypeof Symbol( 'foo' ) === 'symbol' &&\n\t\thasOwnProp( Symbol, 'iterator' ) &&\n\t\ttypeof Symbol.iterator === 'symbol'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default hasIteratorSymbolSupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Serializes a complex number as a string.\n*\n* @private\n* @returns {string} serialized complex number\n*/\nfunction toString() { // eslint-disable-line stdlib/no-redeclare\n\t/* eslint-disable no-invalid-this */\n\tvar str = '' + this.re;\n\tif ( this.im < 0 ) {\n\t\tstr += ' - ' + (-this.im);\n\t} else {\n\t\tstr += ' + ' + this.im;\n\t}\n\tstr += 'i';\n\treturn str;\n}\n\n\n// EXPORTS //\n\nexport default toString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Serializes a complex number as a JSON object.\n*\n* @private\n* @returns {Object} JSON representation\n*/\nfunction toJSON() {\n\t/* eslint-disable no-invalid-this */\n\tvar out = {};\n\tout.type = 'Complex64';\n\tout.re = this.re;\n\tout.im = this.im;\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default toJSON;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport hasIteratorSymbolSupport from '@stdlib/assert-has-iterator-symbol-support';\n\n\n// MAIN //\n\n/**\n* Iterator symbol.\n*\n* @name IteratorSymbol\n* @constant\n* @type {(symbol|null)}\n*\n* @example\n* function iterator() {\n* var it;\n* var i;\n*\n* i = -1;\n*\n* it = {};\n* it.next = next;\n* it.return = done;\n*\n* if ( IteratorSymbol ) {\n* it[ IteratorSymbol ] = iterator;\n* }\n* return it;\n*\n* function next() {\n* i += 1;\n* return {\n* 'value': i,\n* 'done': false\n* };\n* }\n*\n* function done( value ) {\n* if ( arguments.length === 0 ) {\n* return {\n* 'done': true\n* };\n* }\n* return {\n* 'value': value,\n* 'done': true\n* };\n* }\n* }\n*\n* var obj = iterator();\n*/\nvar IteratorSymbol = ( hasIteratorSymbolSupport() ) ? Symbol.iterator : null;\n\n\n// EXPORTS //\n\nexport default IteratorSymbol;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport defineProperty from '@stdlib/utils-define-property';\n\n\n// MAIN //\n\n/**\n* Defines a non-enumerable read-only accessor.\n*\n* @param {Object} obj - object on which to define the property\n* @param {(string|symbol)} prop - property name\n* @param {Function} getter - accessor\n*\n* @example\n* function getter() {\n* return 'bar';\n* }\n*\n* var obj = {};\n*\n* setNonEnumerableReadOnlyAccessor( obj, 'foo', getter );\n*\n* try {\n* obj.foo = 'boop';\n* } catch ( err ) {\n* console.error( err.message );\n* }\n*/\nfunction setNonEnumerableReadOnlyAccessor( obj, prop, getter ) { // eslint-disable-line id-length\n\tdefineProperty( obj, prop, {\n\t\t'configurable': false,\n\t\t'enumerable': false,\n\t\t'get': getter\n\t});\n}\n\n\n// EXPORTS //\n\nexport default setNonEnumerableReadOnlyAccessor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Returns the real component of a single-precision complex floating-point number.\n*\n* @param {Complex} z - complex number\n* @returns {number} real component\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n*\n* var z = new Complex64( 5.0, 3.0 );\n*\n* var re = realf( z );\n* // returns 5.0\n*/\nfunction realf( z ) {\n\treturn z.re;\n}\n\n\n// EXPORTS //\n\nexport default realf;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Returns the imaginary component of a single-precision complex floating-point number.\n*\n* @param {Complex} z - complex number\n* @returns {number} imaginary component\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n*\n* var z = new Complex64( 5.0, 3.0 );\n*\n* var im = imagf( z );\n* // returns 3.0\n*/\nfunction imagf( z ) {\n\treturn z.im;\n}\n\n\n// EXPORTS //\n\nexport default imagf;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport Float32Array from '@stdlib/array-float32';\n\n\n// MAIN //\n\n/**\n* Reinterprets a `Complex64Array` as a `Float32Array`.\n*\n* @param {Complex64Array} x - input array\n* @param {NonNegativeInteger} offset - starting index\n* @returns {Float32Array} `Float32Array` view\n*\n* @example\n* import Complex64Array from '@stdlib/array-complex64';\n*\n* var x = new Complex64Array( 10 );\n*\n* var out = reinterpret( x, 0 );\n* // returns \n*\n* var bool = ( out.buffer === x.buffer );\n* // returns true\n*/\nfunction reinterpret( x, offset ) {\n\treturn new Float32Array( x.buffer, x.byteOffset+(x.BYTES_PER_ELEMENT*offset), 2*(x.length-offset) ); // eslint-disable-line max-len\n}\n\n\n// EXPORTS //\n\nexport default reinterpret;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport Float64Array from '@stdlib/array-float64';\n\n\n// MAIN //\n\n/**\n* Reinterprets a `Complex128Array` as a `Float64Array`.\n*\n* @param {Complex128Array} x - input array\n* @param {NonNegativeInteger} offset - starting index\n* @returns {Float64Array} `Float64Array` view\n*\n* @example\n* import Complex128Array from '@stdlib/array-complex128';\n*\n* var x = new Complex128Array( 10 );\n*\n* var out = reinterpret( x, 0 );\n* // returns \n*\n* var bool = ( out.buffer === x.buffer );\n* // returns true\n*/\nfunction reinterpret( x, offset ) {\n\treturn new Float64Array( x.buffer, x.byteOffset+(x.BYTES_PER_ELEMENT*offset), 2*(x.length-offset) ); // eslint-disable-line max-len\n}\n\n\n// EXPORTS //\n\nexport default reinterpret;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// VARIABLES //\n\nvar GETTERS = {\n\t'float64': getFloat64,\n\t'float32': getFloat32,\n\t'int32': getInt32,\n\t'int16': getInt16,\n\t'int8': getInt8,\n\t'uint32': getUint32,\n\t'uint16': getUint16,\n\t'uint8': getUint8,\n\t'uint8c': getUint8c,\n\t'generic': getGeneric,\n\t'default': getArrayLike\n};\n\n\n// FUNCTIONS //\n\n/**\n* Returns an element from a `Float64Array`.\n*\n* @private\n* @param {Float64Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n*\n* var arr = new Float64Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getFloat64( arr, 2 );\n* // returns 3.0\n*/\nfunction getFloat64( arr, idx ) {\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from a `Float32Array`.\n*\n* @private\n* @param {Float32Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Float32Array from '@stdlib/array-float32';\n*\n* var arr = new Float32Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getFloat32( arr, 2 );\n* // returns 3.0\n*/\nfunction getFloat32( arr, idx ) {\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from an `Int32Array`.\n*\n* @private\n* @param {Int32Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Int32Array from '@stdlib/array-int32';\n*\n* var arr = new Int32Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getInt32( arr, 2 );\n* // returns 3\n*/\nfunction getInt32( arr, idx ) { // eslint-disable-line stdlib/jsdoc-doctest-decimal-point\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from an `Int16Array`.\n*\n* @private\n* @param {Int16Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Int16Array from '@stdlib/array-int16';\n*\n* var arr = new Int16Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getInt16( arr, 2 );\n* // returns 3\n*/\nfunction getInt16( arr, idx ) { // eslint-disable-line stdlib/jsdoc-doctest-decimal-point\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from an `Int8Array`.\n*\n* @private\n* @param {Int8Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Int8Array from '@stdlib/array-int8';\n*\n* var arr = new Int8Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getInt8( arr, 2 );\n* // returns 3\n*/\nfunction getInt8( arr, idx ) { // eslint-disable-line stdlib/jsdoc-doctest-decimal-point\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from a `Uint32Array`.\n*\n* @private\n* @param {Uint32Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Uint32Array from '@stdlib/array-uint32';\n*\n* var arr = new Uint32Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getUint32( arr, 2 );\n* // returns 3\n*/\nfunction getUint32( arr, idx ) { // eslint-disable-line stdlib/jsdoc-doctest-decimal-point\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from a `Uint16Array`.\n*\n* @private\n* @param {Uint16Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Uint16Array from '@stdlib/array-uint16';\n*\n* var arr = new Uint16Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getUint16( arr, 2 );\n* // returns 3\n*/\nfunction getUint16( arr, idx ) { // eslint-disable-line stdlib/jsdoc-doctest-decimal-point\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from a `Uint8Array`.\n*\n* @private\n* @param {Uint8Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Uint8Array from '@stdlib/array-uint8';\n*\n* var arr = new Uint8Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getUint8( arr, 2 );\n* // returns 3\n*/\nfunction getUint8( arr, idx ) { // eslint-disable-line stdlib/jsdoc-doctest-decimal-point\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from a `Uint8ClampedArray`.\n*\n* @private\n* @param {Uint8ClampedArray} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Uint8ClampedArray from '@stdlib/array-uint8c';\n*\n* var arr = new Uint8ClampedArray( [ 1, 2, 3, 4 ] );\n*\n* var v = getUint8c( arr, 2 );\n* // returns 3\n*/\nfunction getUint8c( arr, idx ) { // eslint-disable-line stdlib/jsdoc-doctest-decimal-point\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from a generic `Array`.\n*\n* @private\n* @param {Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {*} element value\n*\n* @example\n* var arr = [ 1, 2, 3, 4 ];\n*\n* var v = getGeneric( arr, 2 );\n* // returns 3\n*/\nfunction getGeneric( arr, idx ) {\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from an indexed array-like object.\n*\n* @private\n* @param {Collection} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {*} element value\n*\n* @example\n* var arr = [ 1, 2, 3, 4 ];\n*\n* var v = getArrayLike( arr, 2 );\n* // returns 3\n*/\nfunction getArrayLike( arr, idx ) {\n\treturn arr[ idx ];\n}\n\n\n// MAIN //\n\n/**\n* Returns an accessor function for retrieving an element from an indexed array-like object.\n*\n* @param {string} dtype - array dtype\n* @returns {Function} accessor\n*\n* @example\n* import dtype from '@stdlib/array-dtype';\n*\n* var arr = [ 1, 2, 3, 4 ];\n*\n* var get = getter( dtype( arr ) );\n* var v = get( arr, 2 );\n* // returns 3\n*/\nfunction getter( dtype ) {\n\tvar f = GETTERS[ dtype ];\n\tif ( typeof f === 'function' ) {\n\t\treturn f;\n\t}\n\treturn GETTERS.default;\n}\n\n\n// EXPORTS //\n\nexport default getter;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// VARIABLES //\n\nvar GETTERS = {\n\t'complex128': getComplex128,\n\t'complex64': getComplex64,\n\t'default': getArrayLike\n};\n\n\n// FUNCTIONS //\n\n/**\n* Returns an element from a `Complex128Array`.\n*\n* @private\n* @param {Complex128Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Complex128Array from '@stdlib/array-complex128';\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* var arr = new Complex128Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getComplex128( arr, 1 );\n* // returns \n*\n* var re = real( v );\n* // returns 3.0\n*\n* var im = imag( v );\n* // returns 4.0\n*/\nfunction getComplex128( arr, idx ) {\n\treturn arr.get( idx );\n}\n\n/**\n* Returns an element from a `Complex64Array`.\n*\n* @private\n* @param {Complex64Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Complex64Array from '@stdlib/array-complex64';\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* var arr = new Complex64Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getComplex64( arr, 1 );\n* // returns \n*\n* var re = realf( v );\n* // returns 3.0\n*\n* var im = imagf( v );\n* // returns 4.0\n*/\nfunction getComplex64( arr, idx ) {\n\treturn arr.get( idx );\n}\n\n/**\n* Returns an element from an array-like object supporting the get/set protocol.\n*\n* @private\n* @param {Collection} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {*} element value\n*\n* @example\n* var arr = [ 1, 2, 3, 4 ];\n*\n* function get( idx ) {\n* return arr[ idx ];\n* }\n*\n* function set( value, idx ) {\n* arr[ idx ] = value;\n* }\n*\n* arr.get = get;\n* arr.set = set;\n*\n* var v = getArrayLike( arr, 2 );\n* // returns 3\n*/\nfunction getArrayLike( arr, idx ) {\n\treturn arr.get( idx );\n}\n\n\n// MAIN //\n\n/**\n* Returns an accessor function for retrieving an element from an array-like object supporting the get/set protocol.\n*\n* @param {string} dtype - array dtype\n* @returns {Function} accessor\n*\n* @example\n* import Complex64Array from '@stdlib/array-complex64';\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n* import dtype from '@stdlib/array-dtype';\n*\n* var arr = new Complex64Array( [ 1, 2, 3, 4 ] );\n*\n* var get = getter( dtype( arr ) );\n* var v = get( arr, 1 );\n* // returns \n*\n* var re = realf( v );\n* // returns 3.0\n*\n* var im = imagf( v );\n* // returns 4.0\n*/\nfunction getter( dtype ) {\n\tvar f = GETTERS[ dtype ];\n\tif ( typeof f === 'function' ) {\n\t\treturn f;\n\t}\n\treturn GETTERS.default;\n}\n\n\n// EXPORTS //\n\nexport default getter;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isArrayLikeObject from '@stdlib/assert-is-array-like-object';\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport realf from '@stdlib/complex-realf';\nimport imagf from '@stdlib/complex-imagf';\nimport format from '@stdlib/string-format';\n\n\n// MAIN //\n\n/**\n* Returns an array of iterated values.\n*\n* @private\n* @param {Object} it - iterator\n* @returns {(Array|TypeError)} array or an error\n*/\nfunction fromIterator( it ) {\n\tvar out;\n\tvar v;\n\tvar z;\n\n\tout = [];\n\twhile ( true ) {\n\t\tv = it.next();\n\t\tif ( v.done ) {\n\t\t\tbreak;\n\t\t}\n\t\tz = v.value;\n\t\tif ( isArrayLikeObject( z ) && z.length >= 2 ) {\n\t\t\tout.push( z[ 0 ], z[ 1 ] );\n\t\t} else if ( isComplexLike( z ) ) {\n\t\t\tout.push( realf( z ), imagf( z ) );\n\t\t} else {\n\t\t\treturn new TypeError( format( 'invalid argument. An iterator must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', z ) );\n\t\t}\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default fromIterator;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isArrayLikeObject from '@stdlib/assert-is-array-like-object';\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport realf from '@stdlib/complex-realf';\nimport imagf from '@stdlib/complex-imagf';\nimport format from '@stdlib/string-format';\n\n\n// MAIN //\n\n/**\n* Returns an array of iterated values.\n*\n* @private\n* @param {Object} it - iterator\n* @param {Function} clbk - callback to invoke for each iterated value\n* @param {*} thisArg - invocation context\n* @returns {(Array|TypeError)} array or an error\n*/\nfunction fromIteratorMap( it, clbk, thisArg ) {\n\tvar out;\n\tvar v;\n\tvar z;\n\tvar i;\n\n\tout = [];\n\ti = -1;\n\twhile ( true ) {\n\t\tv = it.next();\n\t\tif ( v.done ) {\n\t\t\tbreak;\n\t\t}\n\t\ti += 1;\n\t\tz = clbk.call( thisArg, v.value, i );\n\t\tif ( isArrayLikeObject( z ) && z.length >= 2 ) {\n\t\t\tout.push( z[ 0 ], z[ 1 ] );\n\t\t} else if ( isComplexLike( z ) ) {\n\t\t\tout.push( realf( z ), imagf( z ) );\n\t\t} else {\n\t\t\treturn new TypeError( format( 'invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', z ) );\n\t\t}\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default fromIteratorMap;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport realf from '@stdlib/complex-realf';\nimport imagf from '@stdlib/complex-imagf';\n\n\n// MAIN //\n\n/**\n* Returns a strided array of real and imaginary components.\n*\n* @private\n* @param {Float32Array} buf - output array\n* @param {Array} arr - array containing complex numbers\n* @returns {(Float32Array|null)} output array or null\n*/\nfunction fromArray( buf, arr ) {\n\tvar len;\n\tvar v;\n\tvar i;\n\tvar j;\n\n\tlen = arr.length;\n\tj = 0;\n\tfor ( i = 0; i < len; i++ ) {\n\t\tv = arr[ i ];\n\t\tif ( !isComplexLike( v ) ) {\n\t\t\treturn null;\n\t\t}\n\t\tbuf[ j ] = realf( v );\n\t\tbuf[ j+1 ] = imagf( v );\n\t\tj += 2; // stride\n\t}\n\treturn buf;\n}\n\n\n// EXPORTS //\n\nexport default fromArray;\n","/* eslint-disable no-restricted-syntax, max-lines, no-invalid-this */\n\n/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isNonNegativeInteger } from '@stdlib/assert-is-nonnegative-integer';\nimport isArrayLikeObject from '@stdlib/assert-is-array-like-object';\nimport isCollection from '@stdlib/assert-is-collection';\nimport isArrayBuffer from '@stdlib/assert-is-arraybuffer';\nimport isObject from '@stdlib/assert-is-object';\nimport isArray from '@stdlib/assert-is-array';\nimport isFunction from '@stdlib/assert-is-function';\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport isEven from '@stdlib/math-base-assert-is-even';\nimport isInteger from '@stdlib/math-base-assert-is-integer';\nimport hasIteratorSymbolSupport from '@stdlib/assert-has-iterator-symbol-support';\nimport ITERATOR_SYMBOL from '@stdlib/symbol-iterator';\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport setReadOnlyAccessor from '@stdlib/utils-define-nonenumerable-read-only-accessor';\nimport Float32Array from '@stdlib/array-float32';\nimport Complex64 from '@stdlib/complex-float32';\nimport format from '@stdlib/string-format';\nimport realf from '@stdlib/complex-realf';\nimport imagf from '@stdlib/complex-imagf';\nimport reinterpret64 from '@stdlib/strided-base-reinterpret-complex64';\nimport reinterpret128 from '@stdlib/strided-base-reinterpret-complex128';\nimport getter from '@stdlib/array-base-getter';\nimport accessorGetter from '@stdlib/array-base-accessor-getter';\nimport fromIterator from './from_iterator.js';\nimport fromIteratorMap from './from_iterator_map.js';\nimport fromArray from './from_array.js';\n\n\n// VARIABLES //\n\nvar BYTES_PER_ELEMENT = Float32Array.BYTES_PER_ELEMENT * 2;\nvar HAS_ITERATOR_SYMBOL = hasIteratorSymbolSupport();\n\n\n// FUNCTIONS //\n\n/**\n* Returns a boolean indicating if a value is a complex typed array.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a complex typed array\n*/\nfunction isComplexArray( value ) {\n\treturn (\n\t\tvalue instanceof Complex64Array ||\n\t\t(\n\t\t\ttypeof value === 'object' &&\n\t\t\tvalue !== null &&\n\t\t\t(\n\t\t\t\tvalue.constructor.name === 'Complex64Array' ||\n\t\t\t\tvalue.constructor.name === 'Complex128Array'\n\t\t\t) &&\n\t\t\ttypeof value._length === 'number' && // eslint-disable-line no-underscore-dangle\n\n\t\t\t// NOTE: we don't perform a more rigorous test here for a typed array for performance reasons, as robustly checking for a typed array instance could require walking the prototype tree and performing relatively expensive constructor checks...\n\t\t\ttypeof value._buffer === 'object' // eslint-disable-line no-underscore-dangle\n\t\t)\n\t);\n}\n\n/**\n* Returns a boolean indicating if a value is a complex typed array constructor.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a complex typed array constructor\n*/\nfunction isComplexArrayConstructor( value ) {\n\treturn (\n\t\tvalue === Complex64Array ||\n\n\t\t// NOTE: weaker test in order to avoid a circular dependency with Complex128Array...\n\t\tvalue.name === 'Complex128Array'\n\t);\n}\n\n/**\n* Returns a boolean indicating if a value is a `Complex64Array`.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a `Complex64Array`\n*/\nfunction isComplex64Array( value ) {\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\tvalue.constructor.name === 'Complex64Array' &&\n\t\tvalue.BYTES_PER_ELEMENT === BYTES_PER_ELEMENT\n\t);\n}\n\n/**\n* Returns a boolean indicating if a value is a `Complex128Array`.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a `Complex128Array`\n*/\nfunction isComplex128Array( value ) {\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\tvalue.constructor.name === 'Complex128Array' &&\n\t\tvalue.BYTES_PER_ELEMENT === BYTES_PER_ELEMENT*2\n\t);\n}\n\n\n// MAIN //\n\n/**\n* 64-bit complex number array constructor.\n*\n* @constructor\n* @param {(NonNegativeInteger|Collection|ArrayBuffer|Iterable)} [arg] - length, typed array, array-like object, buffer, or an iterable\n* @param {NonNegativeInteger} [byteOffset=0] - byte offset\n* @param {NonNegativeInteger} [length] - view length\n* @throws {RangeError} ArrayBuffer byte length must be a multiple of `8`\n* @throws {RangeError} array-like object and typed array input arguments must have a length which is a multiple of two\n* @throws {TypeError} if provided only a single argument, must provide a valid argument\n* @throws {TypeError} byte offset must be a nonnegative integer\n* @throws {RangeError} byte offset must be a multiple of `8`\n* @throws {TypeError} view length must be a positive multiple of `8`\n* @throws {RangeError} must provide sufficient memory to accommodate byte offset and view length requirements\n* @throws {TypeError} an iterator must return either a two element array containing real and imaginary components or a complex number\n* @returns {Complex64Array} complex number array\n*\n* @example\n* var arr = new Complex64Array();\n* // returns \n*\n* var len = arr.length;\n* // returns 0\n*\n* @example\n* var arr = new Complex64Array( 2 );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*\n* @example\n* var arr = new Complex64Array( [ 1.0, -1.0 ] );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* import ArrayBuffer from '@stdlib/array-buffer';\n*\n* var buf = new ArrayBuffer( 16 );\n* var arr = new Complex64Array( buf );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*\n* @example\n* import ArrayBuffer from '@stdlib/array-buffer';\n*\n* var buf = new ArrayBuffer( 16 );\n* var arr = new Complex64Array( buf, 8 );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* import ArrayBuffer from '@stdlib/array-buffer';\n*\n* var buf = new ArrayBuffer( 32 );\n* var arr = new Complex64Array( buf, 8, 2 );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*/\nfunction Complex64Array() {\n\tvar byteOffset;\n\tvar nargs;\n\tvar buf;\n\tvar len;\n\n\tnargs = arguments.length;\n\tif ( !(this instanceof Complex64Array) ) {\n\t\tif ( nargs === 0 ) {\n\t\t\treturn new Complex64Array();\n\t\t}\n\t\tif ( nargs === 1 ) {\n\t\t\treturn new Complex64Array( arguments[0] );\n\t\t}\n\t\tif ( nargs === 2 ) {\n\t\t\treturn new Complex64Array( arguments[0], arguments[1] );\n\t\t}\n\t\treturn new Complex64Array( arguments[0], arguments[1], arguments[2] );\n\t}\n\t// Create the underlying data buffer...\n\tif ( nargs === 0 ) {\n\t\tbuf = new Float32Array( 0 ); // backward-compatibility\n\t} else if ( nargs === 1 ) {\n\t\tif ( isNonNegativeInteger( arguments[0] ) ) {\n\t\t\tbuf = new Float32Array( arguments[0]*2 );\n\t\t} else if ( isCollection( arguments[0] ) ) {\n\t\t\tbuf = arguments[ 0 ];\n\t\t\tlen = buf.length;\n\n\t\t\t// If provided a \"generic\" array, peak at the first value, and, if the value is a complex number, try to process as an array of complex numbers, falling back to \"normal\" typed array initialization if we fail and ensuring consistency if the first value had not been a complex number...\n\t\t\tif ( len && isArray( buf ) && isComplexLike( buf[0] ) ) {\n\t\t\t\tbuf = fromArray( new Float32Array( len*2 ), buf );\n\t\t\t\tif ( buf === null ) {\n\t\t\t\t\t// We failed and we are now forced to allocate a new array :-(\n\t\t\t\t\tif ( !isEven( len ) ) {\n\t\t\t\t\t\tthrow new RangeError( format( 'invalid argument. Array-like object arguments must have a length which is a multiple of two. Length: `%u`.', len ) );\n\t\t\t\t\t}\n\t\t\t\t\t// We failed, so fall back to directly setting values...\n\t\t\t\t\tbuf = new Float32Array( arguments[0] );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ( isComplex64Array( buf ) ) {\n\t\t\t\t\tbuf = reinterpret64( buf, 0 );\n\t\t\t\t} else if ( isComplex128Array( buf ) ) {\n\t\t\t\t\tbuf = reinterpret128( buf, 0 );\n\t\t\t\t} else if ( !isEven( len ) ) {\n\t\t\t\t\tthrow new RangeError( format( 'invalid argument. Array-like object and typed array arguments must have a length which is a multiple of two. Length: `%u`.', len ) );\n\t\t\t\t}\n\t\t\t\tbuf = new Float32Array( buf );\n\t\t\t}\n\t\t} else if ( isArrayBuffer( arguments[0] ) ) {\n\t\t\tbuf = arguments[ 0 ];\n\t\t\tif ( !isInteger( buf.byteLength/BYTES_PER_ELEMENT ) ) {\n\t\t\t\tthrow new RangeError( format( 'invalid argument. ArrayBuffer byte length must be a multiple of %u. Byte length: `%u`.', BYTES_PER_ELEMENT, buf.byteLength ) );\n\t\t\t}\n\t\t\tbuf = new Float32Array( buf );\n\t\t} else if ( isObject( arguments[0] ) ) {\n\t\t\tbuf = arguments[ 0 ];\n\t\t\tif ( HAS_ITERATOR_SYMBOL === false ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Environment lacks Symbol.iterator support. Must provide a length, ArrayBuffer, typed array, or array-like object. Value: `%s`.', buf ) );\n\t\t\t}\n\t\t\tif ( !isFunction( buf[ ITERATOR_SYMBOL ] ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.', buf ) );\n\t\t\t}\n\t\t\tbuf = buf[ ITERATOR_SYMBOL ]();\n\t\t\tif ( !isFunction( buf.next ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.', buf ) );\n\t\t\t}\n\t\t\tbuf = fromIterator( buf );\n\t\t\tif ( buf instanceof Error ) {\n\t\t\t\tthrow buf;\n\t\t\t}\n\t\t\tbuf = new Float32Array( buf );\n\t\t} else {\n\t\t\tthrow new TypeError( format( 'invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.', arguments[0] ) );\n\t\t}\n\t} else {\n\t\tbuf = arguments[ 0 ];\n\t\tif ( !isArrayBuffer( buf ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. First argument must be an ArrayBuffer. Value: `%s`.', buf ) );\n\t\t}\n\t\tbyteOffset = arguments[ 1 ];\n\t\tif ( !isNonNegativeInteger( byteOffset ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Byte offset must be a nonnegative integer. Value: `%s`.', byteOffset ) );\n\t\t}\n\t\tif ( !isInteger( byteOffset/BYTES_PER_ELEMENT ) ) {\n\t\t\tthrow new RangeError( format( 'invalid argument. Byte offset must be a multiple of %u. Value: `%u`.', BYTES_PER_ELEMENT, byteOffset ) );\n\t\t}\n\t\tif ( nargs === 2 ) {\n\t\t\tlen = buf.byteLength - byteOffset;\n\t\t\tif ( !isInteger( len/BYTES_PER_ELEMENT ) ) {\n\t\t\t\tthrow new RangeError( format( 'invalid arguments. ArrayBuffer view byte length must be a multiple of %u. View byte length: `%u`.', BYTES_PER_ELEMENT, len ) );\n\t\t\t}\n\t\t\tbuf = new Float32Array( buf, byteOffset );\n\t\t} else {\n\t\t\tlen = arguments[ 2 ];\n\t\t\tif ( !isNonNegativeInteger( len ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Length must be a nonnegative integer. Value: `%s`.', len ) );\n\t\t\t}\n\t\t\tif ( (len*BYTES_PER_ELEMENT) > (buf.byteLength-byteOffset) ) {\n\t\t\t\tthrow new RangeError( format( 'invalid arguments. ArrayBuffer has insufficient capacity. Either decrease the array length or provide a bigger buffer. Minimum capacity: `%u`.', len*BYTES_PER_ELEMENT ) );\n\t\t\t}\n\t\t\tbuf = new Float32Array( buf, byteOffset, len*2 );\n\t\t}\n\t}\n\tsetReadOnly( this, '_buffer', buf );\n\tsetReadOnly( this, '_length', buf.length/2 );\n\n\treturn this;\n}\n\n/**\n* Size (in bytes) of each array element.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex64Array\n* @readonly\n* @type {PositiveInteger}\n* @default 8\n*\n* @example\n* var nbytes = Complex64Array.BYTES_PER_ELEMENT;\n* // returns 8\n*/\nsetReadOnly( Complex64Array, 'BYTES_PER_ELEMENT', BYTES_PER_ELEMENT );\n\n/**\n* Constructor name.\n*\n* @name name\n* @memberof Complex64Array\n* @readonly\n* @type {string}\n* @default 'Complex64Array'\n*\n* @example\n* var str = Complex64Array.name;\n* // returns 'Complex64Array'\n*/\nsetReadOnly( Complex64Array, 'name', 'Complex64Array' );\n\n/**\n* Creates a new 64-bit complex number array from an array-like object or an iterable.\n*\n* @name from\n* @memberof Complex64Array\n* @type {Function}\n* @param {(Collection|Iterable)} src - array-like object or iterable\n* @param {Function} [clbk] - callback to invoke for each source element\n* @param {*} [thisArg] - context\n* @throws {TypeError} `this` context must be a constructor\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be an array-like object or an iterable\n* @throws {TypeError} second argument must be a function\n* @throws {RangeError} array-like objects must have a length which is a multiple of two\n* @throws {TypeError} an iterator must return either a two element array containing real and imaginary components or a complex number\n* @throws {TypeError} when provided an iterator, a callback must return either a two element array containing real and imaginary components or a complex number\n* @returns {Complex64Array} 64-bit complex number array\n*\n* @example\n* var arr = Complex64Array.from( [ 1.0, -1.0 ] );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n*\n* var arr = Complex64Array.from( [ new Complex64( 1.0, 1.0 ) ] );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* function clbk( v ) {\n* return new Complex64( realf(v)*2.0, imagf(v)*2.0 );\n* }\n*\n* var arr = Complex64Array.from( [ new Complex64( 1.0, 1.0 ) ], clbk );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*/\nsetReadOnly( Complex64Array, 'from', function from( src ) {\n\tvar thisArg;\n\tvar nargs;\n\tvar clbk;\n\tvar out;\n\tvar buf;\n\tvar tmp;\n\tvar get;\n\tvar len;\n\tvar flg;\n\tvar v;\n\tvar i;\n\tvar j;\n\tif ( !isFunction( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` context must be a constructor.' );\n\t}\n\tif ( !isComplexArrayConstructor( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tnargs = arguments.length;\n\tif ( nargs > 1 ) {\n\t\tclbk = arguments[ 1 ];\n\t\tif ( !isFunction( clbk ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be a function. Value: `%s`.', clbk ) );\n\t\t}\n\t\tif ( nargs > 2 ) {\n\t\t\tthisArg = arguments[ 2 ];\n\t\t}\n\t}\n\tif ( isComplexArray( src ) ) {\n\t\tlen = src.length;\n\t\tif ( clbk ) {\n\t\t\tout = new this( len );\n\t\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\t\tj = 0;\n\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\tv = clbk.call( thisArg, src.get( i ), i );\n\t\t\t\tif ( isComplexLike( v ) ) {\n\t\t\t\t\tbuf[ j ] = realf( v );\n\t\t\t\t\tbuf[ j+1 ] = imagf( v );\n\t\t\t\t} else if ( isArrayLikeObject( v ) && v.length >= 2 ) {\n\t\t\t\t\tbuf[ j ] = v[ 0 ];\n\t\t\t\t\tbuf[ j+1 ] = v[ 1 ];\n\t\t\t\t} else {\n\t\t\t\t\tthrow new TypeError( format( 'invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', v ) );\n\t\t\t\t}\n\t\t\t\tj += 2; // stride\n\t\t\t}\n\t\t\treturn out;\n\t\t}\n\t\treturn new this( src );\n\t}\n\tif ( isCollection( src ) ) {\n\t\tif ( clbk ) {\n\t\t\t// Note: array contents affect how we iterate over a provided data source. If only complex number objects, we can extract real and imaginary components. Otherwise, for non-complex number arrays (e.g., `Float64Array`, etc), we assume a strided array where real and imaginary components are interleaved. In the former case, we expect a callback to return real and imaginary components (possibly as a complex number). In the latter case, we expect a callback to return *either* a real or imaginary component.\n\n\t\t\tlen = src.length;\n\t\t\tif ( src.get && src.set ) {\n\t\t\t\tget = accessorGetter( 'default' );\n\t\t\t} else {\n\t\t\t\tget = getter( 'default' );\n\t\t\t}\n\t\t\t// Detect whether we've been provided an array which returns complex number objects...\n\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\tif ( !isComplexLike( get( src, i ) ) ) {\n\t\t\t\t\tflg = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// If an array does not contain only complex number objects, then we assume interleaved real and imaginary components...\n\t\t\tif ( flg ) {\n\t\t\t\tif ( !isEven( len ) ) {\n\t\t\t\t\tthrow new RangeError( format( 'invalid argument. First argument must have a length which is a multiple of %u. Length: `%u`.', 2, len ) );\n\t\t\t\t}\n\t\t\t\tout = new this( len/2 );\n\t\t\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\t\tbuf[ i ] = clbk.call( thisArg, get( src, i ), i );\n\t\t\t\t}\n\t\t\t\treturn out;\n\t\t\t}\n\t\t\t// If an array contains only complex number objects, then we need to extract real and imaginary components...\n\t\t\tout = new this( len );\n\t\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\t\tj = 0;\n\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\tv = clbk.call( thisArg, get( src, i ), i );\n\t\t\t\tif ( isComplexLike( v ) ) {\n\t\t\t\t\tbuf[ j ] = realf( v );\n\t\t\t\t\tbuf[ j+1 ] = imagf( v );\n\t\t\t\t} else if ( isArrayLikeObject( v ) && v.length >= 2 ) {\n\t\t\t\t\tbuf[ j ] = v[ 0 ];\n\t\t\t\t\tbuf[ j+1 ] = v[ 1 ];\n\t\t\t\t} else {\n\t\t\t\t\tthrow new TypeError( format( 'invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', v ) );\n\t\t\t\t}\n\t\t\t\tj += 2; // stride\n\t\t\t}\n\t\t\treturn out;\n\t\t}\n\t\treturn new this( src );\n\t}\n\tif ( isObject( src ) && HAS_ITERATOR_SYMBOL && isFunction( src[ ITERATOR_SYMBOL ] ) ) { // eslint-disable-line max-len\n\t\tbuf = src[ ITERATOR_SYMBOL ]();\n\t\tif ( !isFunction( buf.next ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.', src ) );\n\t\t}\n\t\tif ( clbk ) {\n\t\t\ttmp = fromIteratorMap( buf, clbk, thisArg );\n\t\t} else {\n\t\t\ttmp = fromIterator( buf );\n\t\t}\n\t\tif ( tmp instanceof Error ) {\n\t\t\tthrow tmp;\n\t\t}\n\t\tlen = tmp.length / 2;\n\t\tout = new this( len );\n\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\tbuf[ i ] = tmp[ i ];\n\t\t}\n\t\treturn out;\n\t}\n\tthrow new TypeError( format( 'invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.', src ) );\n});\n\n/**\n* Creates a new 64-bit complex number array from a variable number of arguments.\n*\n* @name of\n* @memberof Complex64Array\n* @type {Function}\n* @param {...*} element - array elements\n* @throws {TypeError} `this` context must be a constructor\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Complex64Array} 64-bit complex number array\n*\n* @example\n* var arr = Complex64Array.of( 1.0, 1.0, 1.0, 1.0 );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*/\nsetReadOnly( Complex64Array, 'of', function of() {\n\tvar args;\n\tvar i;\n\tif ( !isFunction( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` context must be a constructor.' );\n\t}\n\tif ( !isComplexArrayConstructor( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\targs = [];\n\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\targs.push( arguments[ i ] );\n\t}\n\treturn new this( args );\n});\n\n/**\n* Pointer to the underlying data buffer.\n*\n* @name buffer\n* @memberof Complex64Array.prototype\n* @readonly\n* @type {ArrayBuffer}\n*\n* @example\n* var arr = new Complex64Array( 10 );\n*\n* var buf = arr.buffer;\n* // returns \n*/\nsetReadOnlyAccessor( Complex64Array.prototype, 'buffer', function get() {\n\treturn this._buffer.buffer;\n});\n\n/**\n* Size (in bytes) of the array.\n*\n* @name byteLength\n* @memberof Complex64Array.prototype\n* @readonly\n* @type {NonNegativeInteger}\n*\n* @example\n* var arr = new Complex64Array( 10 );\n*\n* var byteLength = arr.byteLength;\n* // returns 80\n*/\nsetReadOnlyAccessor( Complex64Array.prototype, 'byteLength', function get() {\n\treturn this._buffer.byteLength;\n});\n\n/**\n* Offset (in bytes) of the array from the start of its underlying `ArrayBuffer`.\n*\n* @name byteOffset\n* @memberof Complex64Array.prototype\n* @readonly\n* @type {NonNegativeInteger}\n*\n* @example\n* var arr = new Complex64Array( 10 );\n*\n* var byteOffset = arr.byteOffset;\n* // returns 0\n*/\nsetReadOnlyAccessor( Complex64Array.prototype, 'byteOffset', function get() {\n\treturn this._buffer.byteOffset;\n});\n\n/**\n* Size (in bytes) of each array element.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex64Array.prototype\n* @readonly\n* @type {PositiveInteger}\n* @default 8\n*\n* @example\n* var arr = new Complex64Array( 10 );\n*\n* var nbytes = arr.BYTES_PER_ELEMENT;\n* // returns 8\n*/\nsetReadOnly( Complex64Array.prototype, 'BYTES_PER_ELEMENT', Complex64Array.BYTES_PER_ELEMENT );\n\n/**\n* Copies a sequence of elements within the array to the position starting at `target`.\n*\n* @name copyWithin\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {integer} target - index at which to start copying elements\n* @param {integer} start - source index at which to copy elements from\n* @param {integer} [end] - source index at which to stop copying elements from\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Complex64Array} modified array\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* var arr = new Complex64Array( 4 );\n*\n* // Set the array elements:\n* arr.set( new Complex64( 1.0, 1.0 ), 0 );\n* arr.set( new Complex64( 2.0, 2.0 ), 1 );\n* arr.set( new Complex64( 3.0, 3.0 ), 2 );\n* arr.set( new Complex64( 4.0, 4.0 ), 3 );\n*\n* // Copy the first two elements to the last two elements:\n* arr.copyWithin( 2, 0, 2 );\n*\n* // Get the last array element:\n* var z = arr.get( 3 );\n*\n* var re = realf( z );\n* // returns 2.0\n*\n* var im = imagf( z );\n* // returns 2.0\n*/\nsetReadOnly( Complex64Array.prototype, 'copyWithin', function copyWithin( target, start ) {\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\t// FIXME: prefer a functional `copyWithin` implementation which addresses lack of universal browser support (e.g., IE11 and Safari) or ensure that typed arrays are polyfilled\n\tif ( arguments.length === 2 ) {\n\t\tthis._buffer.copyWithin( target*2, start*2 );\n\t} else {\n\t\tthis._buffer.copyWithin( target*2, start*2, arguments[2]*2 );\n\t}\n\treturn this;\n});\n\n/**\n* Returns an iterator for iterating over array key-value pairs.\n*\n* @name entries\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Iterator} iterator\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n*\n* var arr = [\n* new Complex64( 1.0, 1.0 ),\n* new Complex64( 2.0, 2.0 ),\n* new Complex64( 3.0, 3.0 )\n* ];\n* arr = new Complex64Array( arr );\n*\n* // Create an iterator:\n* var it = arr.entries();\n*\n* // Iterate over the key-value pairs...\n* var v = it.next().value;\n* // returns [ 0, ]\n*\n* v = it.next().value;\n* // returns [ 1, ]\n*\n* v = it.next().value;\n* // returns [ 2, ]\n*\n* var bool = it.next().done;\n* // returns true\n*/\nsetReadOnly( Complex64Array.prototype, 'entries', function entries() {\n\tvar buffer;\n\tvar self;\n\tvar iter;\n\tvar len;\n\tvar FLG;\n\tvar i;\n\tvar j;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tself = this;\n\tbuffer = this._buffer;\n\tlen = this._length;\n\n\t// Initialize the iteration indices:\n\ti = -1;\n\tj = -2;\n\n\t// Create an iterator protocol-compliant object:\n\titer = {};\n\tsetReadOnly( iter, 'next', next );\n\tsetReadOnly( iter, 'return', end );\n\n\tif ( ITERATOR_SYMBOL ) {\n\t\tsetReadOnly( iter, ITERATOR_SYMBOL, factory );\n\t}\n\treturn iter;\n\n\t/**\n\t* Returns an iterator protocol-compliant object containing the next iterated value.\n\t*\n\t* @private\n\t* @returns {Object} iterator protocol-compliant object\n\t*/\n\tfunction next() {\n\t\tvar z;\n\t\ti += 1;\n\t\tif ( FLG || i >= len ) {\n\t\t\treturn {\n\t\t\t\t'done': true\n\t\t\t};\n\t\t}\n\t\tj += 2;\n\t\tz = new Complex64( buffer[ j ], buffer[ j+1 ] );\n\t\treturn {\n\t\t\t'value': [ i, z ],\n\t\t\t'done': false\n\t\t};\n\t}\n\n\t/**\n\t* Finishes an iterator.\n\t*\n\t* @private\n\t* @param {*} [value] - value to return\n\t* @returns {Object} iterator protocol-compliant object\n\t*/\n\tfunction end( value ) {\n\t\tFLG = true;\n\t\tif ( arguments.length ) {\n\t\t\treturn {\n\t\t\t\t'value': value,\n\t\t\t\t'done': true\n\t\t\t};\n\t\t}\n\t\treturn {\n\t\t\t'done': true\n\t\t};\n\t}\n\n\t/**\n\t* Returns a new iterator.\n\t*\n\t* @private\n\t* @returns {Iterator} iterator\n\t*/\n\tfunction factory() {\n\t\treturn self.entries();\n\t}\n});\n\n/**\n* Returns an array element.\n*\n* @name get\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {NonNegativeInteger} idx - element index\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} must provide a nonnegative integer\n* @returns {(Complex64|void)} array element\n*\n* @example\n* var arr = new Complex64Array( 10 );\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* var z = arr.get( 0 );\n* // returns \n*\n* var re = realf( z );\n* // returns 0.0\n*\n* var im = imagf( z );\n* // returns 0.0\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n*\n* z = arr.get( 0 );\n* // returns \n*\n* re = realf( z );\n* // returns 1.0\n*\n* im = imagf( z );\n* // returns -1.0\n*\n* z = arr.get( 100 );\n* // returns undefined\n*/\nsetReadOnly( Complex64Array.prototype, 'get', function get( idx ) {\n\tvar buf;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isNonNegativeInteger( idx ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Must provide a nonnegative integer. Value: `%s`.', idx ) );\n\t}\n\tif ( idx >= this._length ) {\n\t\treturn;\n\t}\n\tbuf = this._buffer;\n\tidx *= 2;\n\treturn new Complex64( buf[ idx ], buf[ idx+1 ] );\n});\n\n/**\n* Number of array elements.\n*\n* @name length\n* @memberof Complex64Array.prototype\n* @readonly\n* @type {NonNegativeInteger}\n*\n* @example\n* var arr = new Complex64Array( 10 );\n*\n* var len = arr.length;\n* // returns 10\n*/\nsetReadOnlyAccessor( Complex64Array.prototype, 'length', function get() {\n\treturn this._length;\n});\n\n/**\n* Sets an array element.\n*\n* ## Notes\n*\n* - When provided a typed array, real or complex, we must check whether the source array shares the same buffer as the target array and whether the underlying memory overlaps. In particular, we are concerned with the following scenario:\n*\n* ```text\n* buf: ---------------------\n* src: ---------------------\n* ```\n*\n* In the above, as we copy values from `src`, we will overwrite values in the `src` view, resulting in duplicated values copied into the end of `buf`, which is not intended. Hence, to avoid overwriting source values, we must **copy** source values to a temporary array.\n*\n* In the other overlapping scenario,\n*\n* ```text\n* buf: ---------------------\n* src: ---------------------\n* ```\n*\n* by the time we begin copying into the overlapping region, we are copying from the end of `src`, a non-overlapping region, which means we don't run the risk of copying copied values, rather than the original `src` values as intended.\n*\n*\n* @name set\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {(Collection|Complex|ComplexArray)} value - value(s)\n* @param {NonNegativeInteger} [i=0] - element index at which to start writing values\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be either a complex number, an array-like object, or a complex number array\n* @throws {TypeError} index argument must be a nonnegative integer\n* @throws {RangeError} array-like objects must have a length which is a multiple of two\n* @throws {RangeError} index argument is out-of-bounds\n* @throws {RangeError} target array lacks sufficient storage to accommodate source values\n* @returns {void}\n*\n* @example\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* var arr = new Complex64Array( 10 );\n*\n* var z = arr.get( 0 );\n* // returns \n*\n* var re = realf( z );\n* // returns 0.0\n*\n* var im = imagf( z );\n* // returns 0.0\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n*\n* z = arr.get( 0 );\n* // returns \n*\n* re = realf( z );\n* // returns 1.0\n*\n* im = imagf( z );\n* // returns -1.0\n*/\nsetReadOnly( Complex64Array.prototype, 'set', function set( value ) {\n\t/* eslint-disable no-underscore-dangle */\n\tvar sbuf;\n\tvar idx;\n\tvar buf;\n\tvar tmp;\n\tvar flg;\n\tvar N;\n\tvar v;\n\tvar i;\n\tvar j;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tbuf = this._buffer;\n\tif ( arguments.length > 1 ) {\n\t\tidx = arguments[ 1 ];\n\t\tif ( !isNonNegativeInteger( idx ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Index argument must be a nonnegative integer. Value: `%s`.', idx ) );\n\t\t}\n\t} else {\n\t\tidx = 0;\n\t}\n\tif ( isComplexLike( value ) ) {\n\t\tif ( idx >= this._length ) {\n\t\t\tthrow new RangeError( format( 'invalid argument. Index argument is out-of-bounds. Value: `%u`.', idx ) );\n\t\t}\n\t\tidx *= 2;\n\t\tbuf[ idx ] = realf( value );\n\t\tbuf[ idx+1 ] = imagf( value );\n\t\treturn;\n\t}\n\tif ( isComplexArray( value ) ) {\n\t\tN = value._length;\n\t\tif ( idx+N > this._length ) {\n\t\t\tthrow new RangeError( 'invalid arguments. Target array lacks sufficient storage to accommodate source values.' );\n\t\t}\n\t\tsbuf = value._buffer;\n\n\t\t// Check for overlapping memory...\n\t\tj = buf.byteOffset + (idx*BYTES_PER_ELEMENT);\n\t\tif (\n\t\t\tsbuf.buffer === buf.buffer &&\n\t\t\t(\n\t\t\t\tsbuf.byteOffset < j &&\n\t\t\t\tsbuf.byteOffset+sbuf.byteLength > j\n\t\t\t)\n\t\t) {\n\t\t\t// We need to copy source values...\n\t\t\ttmp = new Float32Array( sbuf.length );\n\t\t\tfor ( i = 0; i < sbuf.length; i++ ) {\n\t\t\t\ttmp[ i ] = sbuf[ i ];\n\t\t\t}\n\t\t\tsbuf = tmp;\n\t\t}\n\t\tidx *= 2;\n\t\tj = 0;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\tbuf[ idx ] = sbuf[ j ];\n\t\t\tbuf[ idx+1 ] = sbuf[ j+1 ];\n\t\t\tidx += 2; // stride\n\t\t\tj += 2; // stride\n\t\t}\n\t\treturn;\n\t}\n\tif ( isCollection( value ) ) {\n\t\t// Detect whether we've been provided an array of complex numbers...\n\t\tN = value.length;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\tif ( !isComplexLike( value[ i ] ) ) {\n\t\t\t\tflg = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t// If an array does not contain only complex numbers, then we assume interleaved real and imaginary components...\n\t\tif ( flg ) {\n\t\t\tif ( !isEven( N ) ) {\n\t\t\t\tthrow new RangeError( format( 'invalid argument. Array-like object arguments must have a length which is a multiple of two. Length: `%u`.', N ) );\n\t\t\t}\n\t\t\tif ( idx+(N/2) > this._length ) {\n\t\t\t\tthrow new RangeError( 'invalid arguments. Target array lacks sufficient storage to accommodate source values.' );\n\t\t\t}\n\t\t\tsbuf = value;\n\n\t\t\t// Check for overlapping memory...\n\t\t\tj = buf.byteOffset + (idx*BYTES_PER_ELEMENT);\n\t\t\tif (\n\t\t\t\tsbuf.buffer === buf.buffer &&\n\t\t\t\t(\n\t\t\t\t\tsbuf.byteOffset < j &&\n\t\t\t\t\tsbuf.byteOffset+sbuf.byteLength > j\n\t\t\t\t)\n\t\t\t) {\n\t\t\t\t// We need to copy source values...\n\t\t\t\ttmp = new Float32Array( N );\n\t\t\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\t\t\ttmp[ i ] = sbuf[ i ];\n\t\t\t\t}\n\t\t\t\tsbuf = tmp;\n\t\t\t}\n\t\t\tidx *= 2;\n\t\t\tN /= 2;\n\t\t\tj = 0;\n\t\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\t\tbuf[ idx ] = sbuf[ j ];\n\t\t\t\tbuf[ idx+1 ] = sbuf[ j+1 ];\n\t\t\t\tidx += 2; // stride\n\t\t\t\tj += 2; // stride\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\t// If an array contains only complex numbers, then we need to extract real and imaginary components...\n\t\tif ( idx+N > this._length ) {\n\t\t\tthrow new RangeError( 'invalid arguments. Target array lacks sufficient storage to accommodate source values.' );\n\t\t}\n\t\tidx *= 2;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\tv = value[ i ];\n\t\t\tbuf[ idx ] = realf( v );\n\t\t\tbuf[ idx+1 ] = imagf( v );\n\t\t\tidx += 2; // stride\n\t\t}\n\t\treturn;\n\t}\n\tthrow new TypeError( format( 'invalid argument. First argument must be either a complex number, an array-like object, or a complex number array. Value: `%s`.', value ) );\n\n\t/* eslint-enable no-underscore-dangle */\n});\n\n\n// EXPORTS //\n\nexport default Complex64Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Returns the real component of a double-precision complex floating-point number.\n*\n* @param {Complex} z - complex number\n* @returns {number} real component\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n*\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var re = real( z );\n* // returns 5.0\n*/\nfunction real( z ) {\n\treturn z.re;\n}\n\n\n// EXPORTS //\n\nexport default real;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Returns the imaginary component of a double-precision complex floating-point number.\n*\n* @param {Complex} z - complex number\n* @returns {number} imaginary component\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n*\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var im = imag( z );\n* // returns 3.0\n*/\nfunction imag( z ) {\n\treturn z.im;\n}\n\n\n// EXPORTS //\n\nexport default imag;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isArrayLikeObject from '@stdlib/assert-is-array-like-object';\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport format from '@stdlib/string-format';\nimport real from '@stdlib/complex-real';\nimport imag from '@stdlib/complex-imag';\n\n\n// MAIN //\n\n/**\n* Returns an array of iterated values.\n*\n* @private\n* @param {Object} it - iterator\n* @returns {(Array|TypeError)} array or an error\n*/\nfunction fromIterator( it ) {\n\tvar out;\n\tvar v;\n\tvar z;\n\n\tout = [];\n\twhile ( true ) {\n\t\tv = it.next();\n\t\tif ( v.done ) {\n\t\t\tbreak;\n\t\t}\n\t\tz = v.value;\n\t\tif ( isArrayLikeObject( z ) && z.length >= 2 ) {\n\t\t\tout.push( z[ 0 ], z[ 1 ] );\n\t\t} else if ( isComplexLike( z ) ) {\n\t\t\tout.push( real( z ), imag( z ) );\n\t\t} else {\n\t\t\treturn new TypeError( format( 'invalid argument. An iterator must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', z ) );\n\t\t}\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default fromIterator;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isArrayLikeObject from '@stdlib/assert-is-array-like-object';\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport format from '@stdlib/string-format';\nimport real from '@stdlib/complex-real';\nimport imag from '@stdlib/complex-imag';\n\n\n// MAIN //\n\n/**\n* Returns an array of iterated values.\n*\n* @private\n* @param {Object} it - iterator\n* @param {Function} clbk - callback to invoke for each iterated value\n* @param {*} thisArg - invocation context\n* @returns {(Array|TypeError)} array or an error\n*/\nfunction fromIteratorMap( it, clbk, thisArg ) {\n\tvar out;\n\tvar v;\n\tvar z;\n\tvar i;\n\n\tout = [];\n\ti = -1;\n\twhile ( true ) {\n\t\tv = it.next();\n\t\tif ( v.done ) {\n\t\t\tbreak;\n\t\t}\n\t\ti += 1;\n\t\tz = clbk.call( thisArg, v.value, i );\n\t\tif ( isArrayLikeObject( z ) && z.length >= 2 ) {\n\t\t\tout.push( z[ 0 ], z[ 1 ] );\n\t\t} else if ( isComplexLike( z ) ) {\n\t\t\tout.push( real( z ), imag( z ) );\n\t\t} else {\n\t\t\treturn new TypeError( format( 'invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', z ) );\n\t\t}\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default fromIteratorMap;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport real from '@stdlib/complex-real';\nimport imag from '@stdlib/complex-imag';\n\n\n// MAIN //\n\n/**\n* Returns a strided array of real and imaginary components.\n*\n* @private\n* @param {Float64Array} buf - output array\n* @param {Array} arr - array containing complex numbers\n* @returns {(Float64Array|null)} output array or null\n*/\nfunction fromArray( buf, arr ) {\n\tvar len;\n\tvar v;\n\tvar i;\n\tvar j;\n\n\tlen = arr.length;\n\tj = 0;\n\tfor ( i = 0; i < len; i++ ) {\n\t\tv = arr[ i ];\n\t\tif ( !isComplexLike( v ) ) {\n\t\t\treturn null;\n\t\t}\n\t\tbuf[ j ] = real( v );\n\t\tbuf[ j+1 ] = imag( v );\n\t\tj += 2; // stride\n\t}\n\treturn buf;\n}\n\n\n// EXPORTS //\n\nexport default fromArray;\n","/* eslint-disable no-restricted-syntax, max-lines, no-invalid-this */\n\n/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isNonNegativeInteger } from '@stdlib/assert-is-nonnegative-integer';\nimport isArrayLikeObject from '@stdlib/assert-is-array-like-object';\nimport isCollection from '@stdlib/assert-is-collection';\nimport isArrayBuffer from '@stdlib/assert-is-arraybuffer';\nimport isObject from '@stdlib/assert-is-object';\nimport isArray from '@stdlib/assert-is-array';\nimport isFunction from '@stdlib/assert-is-function';\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport isEven from '@stdlib/math-base-assert-is-even';\nimport isInteger from '@stdlib/math-base-assert-is-integer';\nimport hasIteratorSymbolSupport from '@stdlib/assert-has-iterator-symbol-support';\nimport ITERATOR_SYMBOL from '@stdlib/symbol-iterator';\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport setReadOnlyAccessor from '@stdlib/utils-define-nonenumerable-read-only-accessor';\nimport Float64Array from '@stdlib/array-float64';\nimport Complex128 from '@stdlib/complex-float64';\nimport real from '@stdlib/complex-real';\nimport imag from '@stdlib/complex-imag';\nimport reinterpret64 from '@stdlib/strided-base-reinterpret-complex64';\nimport reinterpret128 from '@stdlib/strided-base-reinterpret-complex128';\nimport getter from '@stdlib/array-base-getter';\nimport accessorGetter from '@stdlib/array-base-accessor-getter';\nimport format from '@stdlib/string-format';\nimport fromIterator from './from_iterator.js';\nimport fromIteratorMap from './from_iterator_map.js';\nimport fromArray from './from_array.js';\n\n\n// VARIABLES //\n\nvar BYTES_PER_ELEMENT = Float64Array.BYTES_PER_ELEMENT * 2;\nvar HAS_ITERATOR_SYMBOL = hasIteratorSymbolSupport();\n\n\n// FUNCTIONS //\n\n/**\n* Returns a boolean indicating if a value is a complex typed array.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a complex typed array\n*/\nfunction isComplexArray( value ) {\n\treturn (\n\t\tvalue instanceof Complex128Array ||\n\t\t(\n\t\t\ttypeof value === 'object' &&\n\t\t\tvalue !== null &&\n\t\t\t(\n\t\t\t\tvalue.constructor.name === 'Complex64Array' ||\n\t\t\t\tvalue.constructor.name === 'Complex128Array'\n\t\t\t) &&\n\t\t\ttypeof value._length === 'number' && // eslint-disable-line no-underscore-dangle\n\n\t\t\t// NOTE: we don't perform a more rigorous test here for a typed array for performance reasons, as robustly checking for a typed array instance could require walking the prototype tree and performing relatively expensive constructor checks...\n\t\t\ttypeof value._buffer === 'object' // eslint-disable-line no-underscore-dangle\n\t\t)\n\t);\n}\n\n/**\n* Returns a boolean indicating if a value is a complex typed array constructor.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a complex typed array constructor\n*/\nfunction isComplexArrayConstructor( value ) {\n\treturn (\n\t\tvalue === Complex128Array ||\n\n\t\t// NOTE: weaker test in order to avoid a circular dependency with Complex64Array...\n\t\tvalue.name === 'Complex64Array'\n\t);\n}\n\n/**\n* Returns a boolean indicating if a value is a `Complex64Array`.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a `Complex64Array`\n*/\nfunction isComplex64Array( value ) {\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\tvalue.constructor.name === 'Complex64Array' &&\n\t\tvalue.BYTES_PER_ELEMENT === BYTES_PER_ELEMENT/2\n\t);\n}\n\n/**\n* Returns a boolean indicating if a value is a `Complex128Array`.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a `Complex128Array`\n*/\nfunction isComplex128Array( value ) {\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\tvalue.constructor.name === 'Complex128Array' &&\n\t\tvalue.BYTES_PER_ELEMENT === BYTES_PER_ELEMENT\n\t);\n}\n\n\n// MAIN //\n\n/**\n* 128-bit complex number array constructor.\n*\n* @constructor\n* @param {(NonNegativeInteger|Collection|ArrayBuffer|Iterable)} [arg] - length, typed array, array-like object, buffer, or iterable\n* @param {NonNegativeInteger} [byteOffset=0] - byte offset\n* @param {NonNegativeInteger} [length] - view length\n* @throws {RangeError} ArrayBuffer byte length must be a multiple of `16`\n* @throws {RangeError} array-like object and typed array input arguments must have a length which is a multiple of two\n* @throws {TypeError} if provided only a single argument, must provide a valid argument\n* @throws {TypeError} byte offset must be a nonnegative integer\n* @throws {RangeError} byte offset must be a multiple of `16`\n* @throws {TypeError} view length must be a positive multiple of `16`\n* @throws {RangeError} must provide sufficient memory to accommodate byte offset and view length requirements\n* @throws {TypeError} an iterator must return either a two element array containing real and imaginary components or a complex number\n* @returns {Complex128Array} complex number array\n*\n* @example\n* var arr = new Complex128Array();\n* // returns \n*\n* var len = arr.length;\n* // returns 0\n*\n* @example\n* var arr = new Complex128Array( 2 );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*\n* @example\n* var arr = new Complex128Array( [ 1.0, -1.0 ] );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* import ArrayBuffer from '@stdlib/array-buffer';\n*\n* var buf = new ArrayBuffer( 32 );\n* var arr = new Complex128Array( buf );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*\n* @example\n* import ArrayBuffer from '@stdlib/array-buffer';\n*\n* var buf = new ArrayBuffer( 32 );\n* var arr = new Complex128Array( buf, 16 );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* import ArrayBuffer from '@stdlib/array-buffer';\n*\n* var buf = new ArrayBuffer( 64 );\n* var arr = new Complex128Array( buf, 16, 2 );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*/\nfunction Complex128Array() {\n\tvar byteOffset;\n\tvar nargs;\n\tvar buf;\n\tvar len;\n\n\tnargs = arguments.length;\n\tif ( !(this instanceof Complex128Array) ) {\n\t\tif ( nargs === 0 ) {\n\t\t\treturn new Complex128Array();\n\t\t}\n\t\tif ( nargs === 1 ) {\n\t\t\treturn new Complex128Array( arguments[0] );\n\t\t}\n\t\tif ( nargs === 2 ) {\n\t\t\treturn new Complex128Array( arguments[0], arguments[1] );\n\t\t}\n\t\treturn new Complex128Array( arguments[0], arguments[1], arguments[2] );\n\t}\n\t// Create the underlying data buffer...\n\tif ( nargs === 0 ) {\n\t\tbuf = new Float64Array( 0 ); // backward-compatibility\n\t} else if ( nargs === 1 ) {\n\t\tif ( isNonNegativeInteger( arguments[0] ) ) {\n\t\t\tbuf = new Float64Array( arguments[0]*2 );\n\t\t} else if ( isCollection( arguments[0] ) ) {\n\t\t\tbuf = arguments[ 0 ];\n\t\t\tlen = buf.length;\n\n\t\t\t// If provided a \"generic\" array, peak at the first value, and, if the value is a complex number, try to process as an array of complex numbers, falling back to \"normal\" typed array initialization if we fail and ensuring consistency if the first value had not been a complex number...\n\t\t\tif ( len && isArray( buf ) && isComplexLike( buf[0] ) ) {\n\t\t\t\tbuf = fromArray( new Float64Array( len*2 ), buf );\n\t\t\t\tif ( buf === null ) {\n\t\t\t\t\t// We failed and we are now forced to allocate a new array :-(\n\t\t\t\t\tif ( !isEven( len ) ) {\n\t\t\t\t\t\tthrow new RangeError( format( 'invalid argument. Array-like object arguments must have a length which is a multiple of two. Length: `%u`.', len ) );\n\t\t\t\t\t}\n\t\t\t\t\t// We failed, so fall back to directly setting values...\n\t\t\t\t\tbuf = new Float64Array( arguments[0] );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ( isComplex64Array( buf ) ) {\n\t\t\t\t\tbuf = reinterpret64( buf, 0 );\n\t\t\t\t} else if ( isComplex128Array( buf ) ) {\n\t\t\t\t\tbuf = reinterpret128( buf, 0 );\n\t\t\t\t} else if ( !isEven( len ) ) {\n\t\t\t\t\tthrow new RangeError( format( 'invalid argument. Array-like object and typed array arguments must have a length which is a multiple of two. Length: `%u`.', len ) );\n\t\t\t\t}\n\t\t\t\tbuf = new Float64Array( buf );\n\t\t\t}\n\t\t} else if ( isArrayBuffer( arguments[0] ) ) {\n\t\t\tbuf = arguments[ 0 ];\n\t\t\tif ( !isInteger( buf.byteLength/BYTES_PER_ELEMENT ) ) {\n\t\t\t\tthrow new RangeError( format( 'invalid argument. ArrayBuffer byte length must be a multiple of %u. Byte length: `%u`.', BYTES_PER_ELEMENT, buf.byteLength ) );\n\t\t\t}\n\t\t\tbuf = new Float64Array( buf );\n\t\t} else if ( isObject( arguments[0] ) ) {\n\t\t\tbuf = arguments[ 0 ];\n\t\t\tif ( HAS_ITERATOR_SYMBOL === false ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Environment lacks Symbol.iterator support. Must provide a length, ArrayBuffer, typed array, or array-like object. Value: `%s`.', buf ) );\n\t\t\t}\n\t\t\tif ( !isFunction( buf[ ITERATOR_SYMBOL ] ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.', buf ) );\n\t\t\t}\n\t\t\tbuf = buf[ ITERATOR_SYMBOL ]();\n\t\t\tif ( !isFunction( buf.next ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.', buf ) );\n\t\t\t}\n\t\t\tbuf = fromIterator( buf );\n\t\t\tif ( buf instanceof Error ) {\n\t\t\t\tthrow buf;\n\t\t\t}\n\t\t\tbuf = new Float64Array( buf );\n\t\t} else {\n\t\t\tthrow new TypeError( format( 'invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.', arguments[0] ) );\n\t\t}\n\t} else {\n\t\tbuf = arguments[ 0 ];\n\t\tif ( !isArrayBuffer( buf ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. First argument must be an ArrayBuffer. Value: `%s`.', buf ) );\n\t\t}\n\t\tbyteOffset = arguments[ 1 ];\n\t\tif ( !isNonNegativeInteger( byteOffset ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Byte offset must be a nonnegative integer. Value: `%s`.', byteOffset ) );\n\t\t}\n\t\tif ( !isInteger( byteOffset/BYTES_PER_ELEMENT ) ) {\n\t\t\tthrow new RangeError( format( 'invalid argument. Byte offset must be a multiple of %u. Value: `%u`.', BYTES_PER_ELEMENT, byteOffset ) );\n\t\t}\n\t\tif ( nargs === 2 ) {\n\t\t\tlen = buf.byteLength - byteOffset;\n\t\t\tif ( !isInteger( len/BYTES_PER_ELEMENT ) ) {\n\t\t\t\tthrow new RangeError( format( 'invalid arguments. ArrayBuffer view byte length must be a multiple of %u. View byte length: `%u`.', BYTES_PER_ELEMENT, len ) );\n\t\t\t}\n\t\t\tbuf = new Float64Array( buf, byteOffset );\n\t\t} else {\n\t\t\tlen = arguments[ 2 ];\n\t\t\tif ( !isNonNegativeInteger( len ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Length must be a nonnegative integer. Value: `%s`.', len ) );\n\t\t\t}\n\t\t\tif ( (len*BYTES_PER_ELEMENT) > (buf.byteLength-byteOffset) ) {\n\t\t\t\tthrow new RangeError( format( 'invalid arguments. ArrayBuffer has insufficient capacity. Either decrease the array length or provide a bigger buffer. Minimum capacity: `%u`.', len*BYTES_PER_ELEMENT ) );\n\t\t\t}\n\t\t\tbuf = new Float64Array( buf, byteOffset, len*2 );\n\t\t}\n\t}\n\tsetReadOnly( this, '_buffer', buf );\n\tsetReadOnly( this, '_length', buf.length/2 );\n\n\treturn this;\n}\n\n/**\n* Size (in bytes) of each array element.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex128Array\n* @readonly\n* @type {PositiveInteger}\n* @default 16\n*\n* @example\n* var nbytes = Complex128Array.BYTES_PER_ELEMENT;\n* // returns 16\n*/\nsetReadOnly( Complex128Array, 'BYTES_PER_ELEMENT', BYTES_PER_ELEMENT );\n\n/**\n* Constructor name.\n*\n* @name name\n* @memberof Complex128Array\n* @readonly\n* @type {string}\n* @default 'Complex128Array'\n*\n* @example\n* var name = Complex128Array.name;\n* // returns 'Complex128Array'\n*/\nsetReadOnly( Complex128Array, 'name', 'Complex128Array' );\n\n/**\n* Creates a new 128-bit complex number array from an array-like object or an iterable.\n*\n* @name from\n* @memberof Complex128Array\n* @type {Function}\n* @param {(Collection|Object)} src - array-like object or iterable\n* @param {Function} [clbk] - callback to invoke for each source element\n* @param {*} [thisArg] - context\n* @throws {TypeError} `this` context must be a constructor\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be an array-like object or an iterable\n* @throws {TypeError} second argument must be a function\n* @throws {RangeError} array-like objects must have a length which is a multiple of two\n* @throws {TypeError} an iterator must return either a two element array containing real and imaginary components or a complex number\n* @throws {TypeError} when provided an iterator, a callback must return either a two element array containing real and imaginary components or a complex number\n* @returns {Complex128Array} 128-bit complex number array\n*\n* @example\n* var arr = Complex128Array.from( [ 1.0, -1.0 ] );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n*\n* var arr = Complex128Array.from( [ new Complex128( 1.0, 1.0 ) ] );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* function clbk( v ) {\n* return new Complex128( real(v)*2.0, imag(v)*2.0 );\n* }\n*\n* var arr = Complex128Array.from( [ new Complex128( 1.0, 1.0 ) ], clbk );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*/\nsetReadOnly( Complex128Array, 'from', function from( src ) {\n\tvar thisArg;\n\tvar nargs;\n\tvar clbk;\n\tvar out;\n\tvar buf;\n\tvar tmp;\n\tvar get;\n\tvar len;\n\tvar flg;\n\tvar v;\n\tvar i;\n\tvar j;\n\tif ( !isFunction( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` context must be a constructor.' );\n\t}\n\tif ( !isComplexArrayConstructor( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tnargs = arguments.length;\n\tif ( nargs > 1 ) {\n\t\tclbk = arguments[ 1 ];\n\t\tif ( !isFunction( clbk ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be a function. Value: `%s`.', clbk ) );\n\t\t}\n\t\tif ( nargs > 2 ) {\n\t\t\tthisArg = arguments[ 2 ];\n\t\t}\n\t}\n\tif ( isComplexArray( src ) ) {\n\t\tlen = src.length;\n\t\tif ( clbk ) {\n\t\t\tout = new this( len );\n\t\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\t\tj = 0;\n\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\tv = clbk.call( thisArg, src.get( i ), i );\n\t\t\t\tif ( isComplexLike( v ) ) {\n\t\t\t\t\tbuf[ j ] = real( v );\n\t\t\t\t\tbuf[ j+1 ] = imag( v );\n\t\t\t\t} else if ( isArrayLikeObject( v ) && v.length >= 2 ) {\n\t\t\t\t\tbuf[ j ] = v[ 0 ];\n\t\t\t\t\tbuf[ j+1 ] = v[ 1 ];\n\t\t\t\t} else {\n\t\t\t\t\tthrow new TypeError( format( 'invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', v ) );\n\t\t\t\t}\n\t\t\t\tj += 2; // stride\n\t\t\t}\n\t\t\treturn out;\n\t\t}\n\t\treturn new this( src );\n\t}\n\tif ( isCollection( src ) ) {\n\t\tif ( clbk ) {\n\t\t\t// Note: array contents affect how we iterate over a provided data source. If only complex number objects, we can extract real and imaginary components. Otherwise, for non-complex number arrays (e.g., `Float64Array`, etc), we assume a strided array where real and imaginary components are interleaved. In the former case, we expect a callback to return real and imaginary components (possibly as a complex number). In the latter case, we expect a callback to return *either* a real or imaginary component.\n\n\t\t\tlen = src.length;\n\t\t\tif ( src.get && src.set ) {\n\t\t\t\tget = accessorGetter( 'default' );\n\t\t\t} else {\n\t\t\t\tget = getter( 'default' );\n\t\t\t}\n\t\t\t// Detect whether we've been provided an array which returns complex number objects...\n\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\tif ( !isComplexLike( get( src, i ) ) ) {\n\t\t\t\t\tflg = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// If an array does not contain only complex number objects, then we assume interleaved real and imaginary components...\n\t\t\tif ( flg ) {\n\t\t\t\tif ( !isEven( len ) ) {\n\t\t\t\t\tthrow new RangeError( format( 'invalid argument. First argument must have a length which is a multiple of two. Length: `%u`.', len ) );\n\t\t\t\t}\n\t\t\t\tout = new this( len/2 );\n\t\t\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\t\tbuf[ i ] = clbk.call( thisArg, get( src, i ), i );\n\t\t\t\t}\n\t\t\t\treturn out;\n\t\t\t}\n\t\t\t// If an array contains only complex number objects, then we need to extract real and imaginary components...\n\t\t\tout = new this( len );\n\t\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\t\tj = 0;\n\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\tv = clbk.call( thisArg, get( src, i ), i );\n\t\t\t\tif ( isComplexLike( v ) ) {\n\t\t\t\t\tbuf[ j ] = real( v );\n\t\t\t\t\tbuf[ j+1 ] = imag( v );\n\t\t\t\t} else if ( isArrayLikeObject( v ) && v.length >= 2 ) {\n\t\t\t\t\tbuf[ j ] = v[ 0 ];\n\t\t\t\t\tbuf[ j+1 ] = v[ 1 ];\n\t\t\t\t} else {\n\t\t\t\t\tthrow new TypeError( format( 'invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', v ) );\n\t\t\t\t}\n\t\t\t\tj += 2; // stride\n\t\t\t}\n\t\t\treturn out;\n\t\t}\n\t\treturn new this( src );\n\t}\n\tif ( isObject( src ) && HAS_ITERATOR_SYMBOL && isFunction( src[ ITERATOR_SYMBOL ] ) ) { // eslint-disable-line max-len\n\t\tbuf = src[ ITERATOR_SYMBOL ]();\n\t\tif ( !isFunction( buf.next ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.', src ) );\n\t\t}\n\t\tif ( clbk ) {\n\t\t\ttmp = fromIteratorMap( buf, clbk, thisArg );\n\t\t} else {\n\t\t\ttmp = fromIterator( buf );\n\t\t}\n\t\tif ( tmp instanceof Error ) {\n\t\t\tthrow tmp;\n\t\t}\n\t\tlen = tmp.length / 2;\n\t\tout = new this( len );\n\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\tbuf[ i ] = tmp[ i ];\n\t\t}\n\t\treturn out;\n\t}\n\tthrow new TypeError( format( 'invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.', src ) );\n});\n\n/**\n* Creates a new 128-bit complex number array from a variable number of arguments.\n*\n* @name of\n* @memberof Complex128Array\n* @type {Function}\n* @param {...*} element - array elements\n* @throws {TypeError} `this` context must be a constructor\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Complex128Array} 128-bit complex number array\n*\n* @example\n* var arr = Complex128Array.of( 1.0, 1.0, 1.0, 1.0 );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*/\nsetReadOnly( Complex128Array, 'of', function of() {\n\tvar args;\n\tvar i;\n\tif ( !isFunction( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` context must be a constructor.' );\n\t}\n\tif ( !isComplexArrayConstructor( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\targs = [];\n\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\targs.push( arguments[ i ] );\n\t}\n\treturn new this( args );\n});\n\n/**\n* Pointer to the underlying data buffer.\n*\n* @name buffer\n* @memberof Complex128Array.prototype\n* @readonly\n* @type {ArrayBuffer}\n*\n* @example\n* var arr = new Complex128Array( 10 );\n*\n* var buf = arr.buffer;\n* // returns \n*/\nsetReadOnlyAccessor( Complex128Array.prototype, 'buffer', function get() {\n\treturn this._buffer.buffer;\n});\n\n/**\n* Size (in bytes) of the array.\n*\n* @name byteLength\n* @memberof Complex128Array.prototype\n* @readonly\n* @type {NonNegativeInteger}\n*\n* @example\n* var arr = new Complex128Array( 10 );\n*\n* var byteLength = arr.byteLength;\n* // returns 160\n*/\nsetReadOnlyAccessor( Complex128Array.prototype, 'byteLength', function get() {\n\treturn this._buffer.byteLength;\n});\n\n/**\n* Offset (in bytes) of the array from the start of its underlying `ArrayBuffer`.\n*\n* @name byteOffset\n* @memberof Complex128Array.prototype\n* @readonly\n* @type {NonNegativeInteger}\n*\n* @example\n* var arr = new Complex128Array( 10 );\n*\n* var byteOffset = arr.byteOffset;\n* // returns 0\n*/\nsetReadOnlyAccessor( Complex128Array.prototype, 'byteOffset', function get() {\n\treturn this._buffer.byteOffset;\n});\n\n/**\n* Size (in bytes) of each array element.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex128Array.prototype\n* @readonly\n* @type {PositiveInteger}\n* @default 16\n*\n* @example\n* var arr = new Complex128Array( 10 );\n*\n* var nbytes = arr.BYTES_PER_ELEMENT;\n* // returns 16\n*/\nsetReadOnly( Complex128Array.prototype, 'BYTES_PER_ELEMENT', Complex128Array.BYTES_PER_ELEMENT );\n\n/**\n* Copies a sequence of elements within the array to the position starting at `target`.\n*\n* @name copyWithin\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {integer} target - index at which to start copying elements\n* @param {integer} start - source index at which to copy elements from\n* @param {integer} [end] - source index at which to stop copying elements from\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Complex128Array} modified array\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* var arr = new Complex128Array( 4 );\n*\n* // Set the array elements:\n* arr.set( new Complex128( 1.0, 1.0 ), 0 );\n* arr.set( new Complex128( 2.0, 2.0 ), 1 );\n* arr.set( new Complex128( 3.0, 3.0 ), 2 );\n* arr.set( new Complex128( 4.0, 4.0 ), 3 );\n*\n* // Copy the first two elements to the last two elements:\n* arr.copyWithin( 2, 0, 2 );\n*\n* // Get the last array element:\n* var z = arr.get( 3 );\n*\n* var re = real( z );\n* // returns 2.0\n*\n* var im = imag( z );\n* // returns 2.0\n*/\nsetReadOnly( Complex128Array.prototype, 'copyWithin', function copyWithin( target, start ) {\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\t// FIXME: prefer a functional `copyWithin` implementation which addresses lack of universal browser support (e.g., IE11 and Safari) or ensure that typed arrays are polyfilled\n\tif ( arguments.length === 2 ) {\n\t\tthis._buffer.copyWithin( target*2, start*2 );\n\t} else {\n\t\tthis._buffer.copyWithin( target*2, start*2, arguments[2]*2 );\n\t}\n\treturn this;\n});\n\n/**\n* Returns an iterator for iterating over array key-value pairs.\n*\n* @name entries\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Iterator} iterator\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n*\n* var arr = [\n* new Complex128( 1.0, 1.0 ),\n* new Complex128( 2.0, 2.0 ),\n* new Complex128( 3.0, 3.0 )\n* ];\n* arr = new Complex128Array( arr );\n*\n* // Create an iterator:\n* var it = arr.entries();\n*\n* // Iterate over the key-value pairs...\n* var v = it.next().value;\n* // returns [ 0, ]\n*\n* v = it.next().value;\n* // returns [ 1, ]\n*\n* v = it.next().value;\n* // returns [ 2, ]\n*\n* var bool = it.next().done;\n* // returns true\n*/\nsetReadOnly( Complex128Array.prototype, 'entries', function entries() {\n\tvar buffer;\n\tvar self;\n\tvar iter;\n\tvar len;\n\tvar FLG;\n\tvar i;\n\tvar j;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tself = this;\n\tbuffer = this._buffer;\n\tlen = this._length;\n\n\t// Initialize the iteration indices:\n\ti = -1;\n\tj = -2;\n\n\t// Create an iterator protocol-compliant object:\n\titer = {};\n\tsetReadOnly( iter, 'next', next );\n\tsetReadOnly( iter, 'return', end );\n\n\tif ( ITERATOR_SYMBOL ) {\n\t\tsetReadOnly( iter, ITERATOR_SYMBOL, factory );\n\t}\n\treturn iter;\n\n\t/**\n\t* Returns an iterator protocol-compliant object containing the next iterated value.\n\t*\n\t* @private\n\t* @returns {Object} iterator protocol-compliant object\n\t*/\n\tfunction next() {\n\t\tvar z;\n\t\ti += 1;\n\t\tif ( FLG || i >= len ) {\n\t\t\treturn {\n\t\t\t\t'done': true\n\t\t\t};\n\t\t}\n\t\tj += 2;\n\t\tz = new Complex128( buffer[ j ], buffer[ j+1 ] );\n\t\treturn {\n\t\t\t'value': [ i, z ],\n\t\t\t'done': false\n\t\t};\n\t}\n\n\t/**\n\t* Finishes an iterator.\n\t*\n\t* @private\n\t* @param {*} [value] - value to return\n\t* @returns {Object} iterator protocol-compliant object\n\t*/\n\tfunction end( value ) {\n\t\tFLG = true;\n\t\tif ( arguments.length ) {\n\t\t\treturn {\n\t\t\t\t'value': value,\n\t\t\t\t'done': true\n\t\t\t};\n\t\t}\n\t\treturn {\n\t\t\t'done': true\n\t\t};\n\t}\n\n\t/**\n\t* Returns a new iterator.\n\t*\n\t* @private\n\t* @returns {Iterator} iterator\n\t*/\n\tfunction factory() {\n\t\treturn self.entries();\n\t}\n});\n\n/**\n* Returns an array element.\n*\n* @name get\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {NonNegativeInteger} idx - element index\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} must provide a nonnegative integer\n* @returns {(Complex128|void)} array element\n*\n* @example\n* var arr = new Complex128Array( 10 );\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* var z = arr.get( 0 );\n* // returns \n*\n* var re = real( z );\n* // returns 0.0\n*\n* var im = imag( z );\n* // returns 0.0\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n*\n* z = arr.get( 0 );\n* // returns \n*\n* re = real( z );\n* // returns 1.0\n*\n* im = imag( z );\n* // returns -1.0\n*\n* z = arr.get( 100 );\n* // returns undefined\n*/\nsetReadOnly( Complex128Array.prototype, 'get', function get( idx ) {\n\tvar buf;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isNonNegativeInteger( idx ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Must provide a nonnegative integer. Value: `%s`.', idx ) );\n\t}\n\tif ( idx >= this._length ) {\n\t\treturn;\n\t}\n\tbuf = this._buffer;\n\tidx *= 2;\n\treturn new Complex128( buf[ idx ], buf[ idx+1 ] );\n});\n\n/**\n* Number of array elements.\n*\n* @name length\n* @memberof Complex128Array.prototype\n* @readonly\n* @type {NonNegativeInteger}\n*\n* @example\n* var arr = new Complex128Array( 10 );\n*\n* var len = arr.length;\n* // returns 10\n*/\nsetReadOnlyAccessor( Complex128Array.prototype, 'length', function get() {\n\treturn this._length;\n});\n\n/**\n* Sets an array element.\n*\n* ## Notes\n*\n* - When provided a typed array, real or complex, we must check whether the source array shares the same buffer as the target array and whether the underlying memory overlaps. In particular, we are concerned with the following scenario:\n*\n* ```text\n* buf: ---------------------\n* src: ---------------------\n* ```\n*\n* In the above, as we copy values from `src`, we will overwrite values in the `src` view, resulting in duplicated values copied into the end of `buf`, which is not intended. Hence, to avoid overwriting source values, we must **copy** source values to a temporary array.\n*\n* In the other overlapping scenario,\n*\n* ```text\n* buf: ---------------------\n* src: ---------------------\n* ```\n*\n* by the time we begin copying into the overlapping region, we are copying from the end of `src`, a non-overlapping region, which means we don't run the risk of copying copied values, rather than the original `src` values as intended.\n*\n*\n* @name set\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {(Collection|Complex|ComplexArray)} value - value(s)\n* @param {NonNegativeInteger} [i=0] - element index at which to start writing values\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be either a complex number, an array-like object, or a complex number array\n* @throws {TypeError} index argument must be a nonnegative integer\n* @throws {RangeError} array-like objects must have a length which is a multiple of two\n* @throws {RangeError} index argument is out-of-bounds\n* @throws {RangeError} target array lacks sufficient storage to accommodate source values\n* @returns {void}\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* var arr = new Complex128Array( 10 );\n*\n* var z = arr.get( 0 );\n* // returns \n*\n* var re = real( z );\n* // returns 0.0\n*\n* var im = imag( z );\n* // returns 0.0\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n*\n* z = arr.get( 0 );\n* // returns \n*\n* re = real( z );\n* // returns 1.0\n*\n* im = imag( z );\n* // returns -1.0\n*/\nsetReadOnly( Complex128Array.prototype, 'set', function set( value ) {\n\t/* eslint-disable no-underscore-dangle */\n\tvar sbuf;\n\tvar idx;\n\tvar buf;\n\tvar tmp;\n\tvar flg;\n\tvar N;\n\tvar v;\n\tvar i;\n\tvar j;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tbuf = this._buffer;\n\tif ( arguments.length > 1 ) {\n\t\tidx = arguments[ 1 ];\n\t\tif ( !isNonNegativeInteger( idx ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Index argument must be a nonnegative integer. Value: `%s`.', idx ) );\n\t\t}\n\t} else {\n\t\tidx = 0;\n\t}\n\tif ( isComplexLike( value ) ) {\n\t\tif ( idx >= this._length ) {\n\t\t\tthrow new RangeError( format( 'invalid argument. Index argument is out-of-bounds. Value: `%u`.', idx ) );\n\t\t}\n\t\tidx *= 2;\n\t\tbuf[ idx ] = real( value );\n\t\tbuf[ idx+1 ] = imag( value );\n\t\treturn;\n\t}\n\tif ( isComplexArray( value ) ) {\n\t\tN = value._length;\n\t\tif ( idx+N > this._length ) {\n\t\t\tthrow new RangeError( 'invalid arguments. Target array lacks sufficient storage to accommodate source values.' );\n\t\t}\n\t\tsbuf = value._buffer;\n\n\t\t// Check for overlapping memory...\n\t\tj = buf.byteOffset + (idx*BYTES_PER_ELEMENT);\n\t\tif (\n\t\t\tsbuf.buffer === buf.buffer &&\n\t\t\t(\n\t\t\t\tsbuf.byteOffset < j &&\n\t\t\t\tsbuf.byteOffset+sbuf.byteLength > j\n\t\t\t)\n\t\t) {\n\t\t\t// We need to copy source values...\n\t\t\ttmp = new Float64Array( sbuf.length );\n\t\t\tfor ( i = 0; i < sbuf.length; i++ ) {\n\t\t\t\ttmp[ i ] = sbuf[ i ];\n\t\t\t}\n\t\t\tsbuf = tmp;\n\t\t}\n\t\tidx *= 2;\n\t\tj = 0;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\tbuf[ idx ] = sbuf[ j ];\n\t\t\tbuf[ idx+1 ] = sbuf[ j+1 ];\n\t\t\tidx += 2; // stride\n\t\t\tj += 2; // stride\n\t\t}\n\t\treturn;\n\t}\n\tif ( isCollection( value ) ) {\n\t\t// Detect whether we've been provided an array of complex numbers...\n\t\tN = value.length;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\tif ( !isComplexLike( value[ i ] ) ) {\n\t\t\t\tflg = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t// If an array does not contain only complex numbers, then we assume interleaved real and imaginary components...\n\t\tif ( flg ) {\n\t\t\tif ( !isEven( N ) ) {\n\t\t\t\tthrow new RangeError( format( 'invalid argument. Array-like object arguments must have a length which is a multiple of two. Length: `%u`.', N ) );\n\t\t\t}\n\t\t\tif ( idx+(N/2) > this._length ) {\n\t\t\t\tthrow new RangeError( 'invalid arguments. Target array lacks sufficient storage to accommodate source values.' );\n\t\t\t}\n\t\t\tsbuf = value;\n\n\t\t\t// Check for overlapping memory...\n\t\t\tj = buf.byteOffset + (idx*BYTES_PER_ELEMENT);\n\t\t\tif (\n\t\t\t\tsbuf.buffer === buf.buffer &&\n\t\t\t\t(\n\t\t\t\t\tsbuf.byteOffset < j &&\n\t\t\t\t\tsbuf.byteOffset+sbuf.byteLength > j\n\t\t\t\t)\n\t\t\t) {\n\t\t\t\t// We need to copy source values...\n\t\t\t\ttmp = new Float64Array( N );\n\t\t\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\t\t\ttmp[ i ] = sbuf[ i ];\n\t\t\t\t}\n\t\t\t\tsbuf = tmp;\n\t\t\t}\n\t\t\tidx *= 2;\n\t\t\tN /= 2;\n\t\t\tj = 0;\n\t\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\t\tbuf[ idx ] = sbuf[ j ];\n\t\t\t\tbuf[ idx+1 ] = sbuf[ j+1 ];\n\t\t\t\tidx += 2; // stride\n\t\t\t\tj += 2; // stride\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\t// If an array contains only complex numbers, then we need to extract real and imaginary components...\n\t\tif ( idx+N > this._length ) {\n\t\t\tthrow new RangeError( 'invalid arguments. Target array lacks sufficient storage to accommodate source values.' );\n\t\t}\n\t\tidx *= 2;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\tv = value[ i ];\n\t\t\tbuf[ idx ] = real( v );\n\t\t\tbuf[ idx+1 ] = imag( v );\n\t\t\tidx += 2; // stride\n\t\t}\n\t\treturn;\n\t}\n\tthrow new TypeError( format( 'invalid argument. First argument must be either a complex number, an array-like object, or a complex number array. Value: `%s`.', value ) );\n\n\t/* eslint-enable no-underscore-dangle */\n});\n\n\n// EXPORTS //\n\nexport default Complex128Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport Float64Array from '@stdlib/array-float64';\nimport Float32Array from '@stdlib/array-float32';\nimport Int16Array from '@stdlib/array-int16';\nimport Int32Array from '@stdlib/array-int32';\nimport Int8Array from '@stdlib/array-int8';\nimport Uint16Array from '@stdlib/array-uint16';\nimport Uint32Array from '@stdlib/array-uint32';\nimport Uint8Array from '@stdlib/array-uint8';\nimport Uint8ClampedArray from '@stdlib/array-uint8c';\nimport Complex64Array from '@stdlib/array-complex64';\nimport Complex128Array from '@stdlib/array-complex128';\n\n\n// MAIN //\n\n// Mapping from data types to constructors...\nvar ctors = {\n\t'float64': Float64Array,\n\t'float32': Float32Array,\n\t'generic': Array, // TODO: replace with `stdlib` pkg\n\t'int16': Int16Array,\n\t'int32': Int32Array,\n\t'int8': Int8Array,\n\t'uint16': Uint16Array,\n\t'uint32': Uint32Array,\n\t'uint8': Uint8Array,\n\t'uint8c': Uint8ClampedArray,\n\t'complex64': Complex64Array,\n\t'complex128': Complex128Array\n};\n\n\n// EXPORTS //\n\nexport default ctors;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport table from './ctors.js';\n\n\n// MAIN //\n\n/**\n* Returns an array constructor.\n*\n* @param {string} dtype - data type\n* @returns {(Function|null)} constructor or null\n*\n* @example\n* var ctor = ctors( 'float64' );\n* // returns \n*\n* @example\n* var ctor = ctors( 'float' );\n* // returns null\n*/\nfunction ctors( dtype ) {\n\treturn table[ dtype ] || null;\n}\n\n\n// EXPORTS //\n\nexport default ctors;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport filled from '@stdlib/array-base-filled';\n\n\n// MAIN //\n\n/**\n* Returns a zero-filled \"generic\" array.\n*\n* @param {NonNegativeInteger} len - array length\n* @returns {Array} output array\n*\n* @example\n* var out = zeros( 3 );\n* // returns [ 0.0, 0.0, 0.0 ]\n*/\nfunction zeros( len ) {\n\treturn filled( 0.0, len );\n}\n\n\n// EXPORTS //\n\nexport default zeros;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Returns a filled \"generic\" array.\n*\n* @param {*} value - fill value\n* @param {NonNegativeInteger} len - array length\n* @returns {Array} filled array\n*\n* @example\n* var out = filled( 0.0, 3 );\n* // returns [ 0.0, 0.0, 0.0 ]\n*\n* @example\n* var out = filled( 'beep', 3 );\n* // returns [ 'beep', 'beep', 'beep' ]\n*/\nfunction filled( value, len ) {\n\tvar arr;\n\tvar i;\n\n\t// Manually push elements in order to ensure \"fast\" elements...\n\tarr = [];\n\tfor ( i = 0; i < len; i++ ) {\n\t\tarr.push( value );\n\t}\n\treturn arr;\n}\n\n\n// EXPORTS //\n\nexport default filled;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isNonNegativeInteger } from '@stdlib/assert-is-nonnegative-integer';\nimport ctors from '@stdlib/array-ctors';\nimport gzeros from '@stdlib/array-base-zeros';\nimport format from '@stdlib/string-format';\n\n\n// MAIN //\n\n/**\n* Creates a zero-filled array having a specified length.\n*\n* @param {NonNegativeInteger} length - array length\n* @param {string} [dtype=\"float64\"] - data type\n* @throws {TypeError} first argument must be a nonnegative integer\n* @throws {TypeError} second argument must be a recognized data type\n* @returns {(TypedArray|Array|ComplexArray)} array or typed array\n*\n* @example\n* var arr = zeros( 2 );\n* // returns [ 0.0, 0.0 ]\n*\n* @example\n* var arr = zeros( 2, 'float32' );\n* // returns [ 0.0, 0.0 ]\n*/\nfunction zeros( length ) {\n\tvar dtype;\n\tvar ctor;\n\tif ( !isNonNegativeInteger( length ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a nonnegative integer. Value: `%s`.', length ) );\n\t}\n\tif ( arguments.length > 1 ) {\n\t\tdtype = arguments[ 1 ];\n\t} else {\n\t\tdtype = 'float64';\n\t}\n\tif ( dtype === 'generic' ) {\n\t\treturn gzeros( length );\n\t}\n\tctor = ctors( dtype );\n\tif ( ctor === null ) {\n\t\tthrow new TypeError( format( 'invalid argument. Second argument must be a recognized data type. Value: `%s`.', dtype ) );\n\t}\n\treturn new ctor( length ); // WARNING: we assume that, apart from 'generic', the constructors for supported array data types are zero-filled by default\n}\n\n\n// EXPORTS //\n\nexport default zeros;\n","/**\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// MODULES //\n\nimport zeros from '@stdlib/array-zeros';\n\n\n// MAIN //\n\n/**\n* Creates an uninitialized array having a specified length.\n*\n* @private\n* @param {NonNegativeInteger} length - array length\n* @param {string} [dtype=\"float64\"] - data type\n* @throws {TypeError} first argument must be a nonnegative integer\n* @throws {TypeError} second argument must be a recognized data type\n* @returns {(TypedArray|Array|ComplexArray)} array or typed array\n*\n* @example\n* var arr = empty( 2 );\n* // returns \n*\n* @example\n* var arr = empty( 2, 'float32' );\n* // returns \n*/\nfunction empty( length ) {\n\tif ( arguments.length > 1 ) {\n\t\treturn zeros( length, arguments[ 1 ] );\n\t}\n\treturn zeros( length );\n}\n\n\n// EXPORTS //\n\nexport default empty;\n"],"names":["main","Object","defineProperty","isNumber","value","zeros","n","i","out","zeroPad","str","width","right","negative","pad","length","startsWithMinus","substr","lowercase","String","prototype","toLowerCase","uppercase","toUpperCase","formatInteger","token","base","specifier","arg","parseInt","isFinite","Error","toString","precision","padRight","sign","alternate","call","charAt","isString","abs","Math","replace","RE_EXP_POS_DIGITS","RE_EXP_NEG_DIGITS","RE_ONLY_DIGITS","RE_DIGITS_BEFORE_EXP","RE_TRAILING_PERIOD_ZERO","RE_PERIOD_ZERO_EXP","RE_ZERO_BEFORE_EXP","formatDouble","digits","f","parseFloat","toExponential","toFixed","toPrecision","spaces","spacePad","fromCharCode","isnan","isNaN","isArray","Array","initialize","flags","mapping","formatInterpolate","tokens","hasPeriod","flag","num","pos","j","TypeError","padZeros","indexOf","arguments","maxWidth","substring","RE","parse","match","formatTokenize","content","prev","exec","slice","lastIndex","push","format","args","tokenize","interpolate","apply","objectProtoype","toStr","defineGetter","__defineGetter__","defineSetter","__defineSetter__","lookupGetter","__lookupGetter__","lookupSetter","__lookupSetter__","err","hasDefinePropertySupport","builtin","obj","prop","descriptor","hasValue","hasGet","hasSet","__proto__","get","set","defineProperty$1","setNonEnumerableReadOnly","configurable","enumerable","writable","FLG","Symbol","hasToStringTagSupport","toStringTag","has","hasOwnProperty","hasOwnProp","property","Sym","toStrTag","nativeClass","hasToStringTag","v","isOwn","tag","main$b","Number","test","isPrimitive","isObject","setReadOnly","FLOAT64_PINF","POSITIVE_INFINITY","FLOAT64_NINF","NEGATIVE_INFINITY","floor","isInteger","x","PINF","NINF","isInt","valueOf","isNonNegativeInteger","hasFloat64Array","Float64Array","ctor","Float64Array$1","bool","arr","GlobalFloat64Array","NaN","hasFloat64ArraySupport","hasFloat32Array","Float32Array","Float32Array$1","GlobalFloat32Array","hasFloat32ArraySupport","hasInt16Array","Int16Array","Int16Array$1","GlobalInt16Array","INT16_MAX","hasInt16ArraySupport","hasInt32Array","Int32Array","Int32Array$1","GlobalInt32Array","INT32_MAX","hasInt32ArraySupport","hasInt8Array","Int8Array","Int8Array$1","GlobalInt8Array","INT8_MAX","hasInt8ArraySupport","hasUint16Array","Uint16Array","Uint16Array$1","GlobalUint16Array","UINT16_MAX","hasUint16ArraySupport","hasUint32Array","Uint32Array","Uint32Array$1","GlobalUint32Array","UINT32_MAX","hasUint32ArraySupport","hasUint8Array","Uint8Array","Uint8Array$1","GlobalUint8Array","UINT8_MAX","hasUint8ArraySupport","hasUint8ClampedArray","Uint8ClampedArray","Uint8ClampedArray$1","GlobalUint8ClampedArray","hasUint8ClampedArraySupport","isArrayLikeObject","isCollection","hasArrayBuffer","ArrayBuffer","isArrayBuffer","main$1","isBoolean","Bool","Boolean","getGlobal","Function","self","window","global","globalThis","root","codegen","getThis","GlobalThis","Self","Win","Global","nodeList","document","childNodes","typedarray","reFunctionName","RE_FUNCTION_NAME","isObjectLike","constructorName","name","constructor","_isBuffer","isBuffer","REGEXP","predicate","len","arrayfun","ctorName","type","isFunction","typeOf","Complex128","real","imag","this","re","im","fround","FLOAT32_VIEW","float64ToFloat32$1","Complex64","float64ToFloat32","isComplexLike","isEven","hasIteratorSymbolSupport","iterator","IteratorSymbol","setNonEnumerableReadOnlyAccessor","getter","realf","z","imagf","reinterpret","offset","buffer","byteOffset","BYTES_PER_ELEMENT","GETTERS","float64","idx","float32","int32","int16","int8","uint32","uint16","uint8","uint8c","generic","default","dtype","complex128","complex64","fromIterator","it","next","done","fromIteratorMap","clbk","thisArg","fromArray","buf","HAS_ITERATOR_SYMBOL","isComplexArray","Complex64Array","_length","_buffer","isComplexArrayConstructor","isComplex64Array","isComplex128Array","nargs","RangeError","reinterpret64","reinterpret128","byteLength","ITERATOR_SYMBOL","src","tmp","flg","accessorGetter","setReadOnlyAccessor","target","start","copyWithin","iter","entries","sbuf","N","Complex128Array","ctors","table","filled","gzeros","empty"],"mappings":";;AAsBA,IAAIA,EAA0C,mBAA1BC,OAAOC,eAAkCD,OAAOC,eAAiB,KCiCrF,IAAIA,EAAiBD,OAAOC,eCjB5B,SAASC,EAAUC,GAClB,MAA0B,iBAAVA,CACjB,CCAA,SAASC,EAAOC,GACf,IACIC,EADAC,EAAM,GAEV,IAAMD,EAAI,EAAGA,EAAID,EAAGC,IACnBC,GAAO,IAER,OAAOA,CACR,CAcA,SAASC,EAASC,EAAKC,EAAOC,GAC7B,IAAIC,GAAW,EACXC,EAAMH,EAAQD,EAAIK,OACtB,OAAKD,EAAM,IAnCZ,SAA0BJ,GACzB,MAAoB,MAAbA,EAAK,EACb,CAoCMM,CAAiBN,KACrBG,GAAW,EACXH,EAAMA,EAAIO,OAAQ,IAEnBP,EAAM,EACLA,EAAML,EAAOS,GACbT,EAAOS,GAAQJ,EACXG,IACJH,EAAM,IAAMA,IAVLA,CAaT,CCpDA,IAAIQ,EAAYC,OAAOC,UAAUC,YAC7BC,EAAYH,OAAOC,UAAUG,YAajC,SAASC,EAAeC,GACvB,IAAIC,EACAlB,EACAD,EAEJ,OA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8D,UAAW,IAE3BxE,GAAOU,EACf"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index 21cf9b0..0000000 --- a/stats.html +++ /dev/null @@ -1,6177 +0,0 @@ - - - - - - - - Rollup Visualizer - - - -
- - - - - From ccd4773d96c5441402e4d598ef62a4bac9a44cf4 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Mon, 1 Jan 2024 15:00:00 +0000 Subject: [PATCH 33/75] 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 | 34 +- SECURITY.md | 5 - benchmark/benchmark.js | 264 - benchmark/benchmark.length.complex128.js | 93 - benchmark/benchmark.length.complex64.js | 93 - benchmark/benchmark.length.float32.js | 93 - benchmark/benchmark.length.float64.js | 93 - benchmark/benchmark.length.generic.js | 93 - benchmark/benchmark.length.int16.js | 93 - benchmark/benchmark.length.int32.js | 93 - benchmark/benchmark.length.int8.js | 93 - benchmark/benchmark.length.uint16.js | 93 - benchmark/benchmark.length.uint32.js | 93 - benchmark/benchmark.length.uint8.js | 93 - benchmark/benchmark.length.uint8c.js | 93 - branches.md | 53 - dist/index.d.ts | 3 - dist/index.js | 9 - dist/index.js.map | 7 - docs/repl.txt | 52 - docs/types/test.ts | 77 - examples/index.js | 33 - lib/index.js | 58 - lib/is_buffer_uint8array.js | 47 - lib/main.js | 101 - lib/polyfill.js | 56 - docs/types/index.d.ts => mod.d.ts | 2 +- mod.js | 4 + mod.js.map | 1 + package.json | 80 +- stats.html | 6177 +++++++++++++++++++++ test/dist/test.js | 33 - test/test.js | 60 - test/test.main.js | 274 - test/test.polyfill.js | 324 -- 59 files changed, 6194 insertions(+), 5840 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 benchmark/benchmark.js delete mode 100644 benchmark/benchmark.length.complex128.js delete mode 100644 benchmark/benchmark.length.complex64.js delete mode 100644 benchmark/benchmark.length.float32.js delete mode 100644 benchmark/benchmark.length.float64.js delete mode 100644 benchmark/benchmark.length.generic.js delete mode 100644 benchmark/benchmark.length.int16.js delete mode 100644 benchmark/benchmark.length.int32.js delete mode 100644 benchmark/benchmark.length.int8.js delete mode 100644 benchmark/benchmark.length.uint16.js delete mode 100644 benchmark/benchmark.length.uint32.js delete mode 100644 benchmark/benchmark.length.uint8.js delete mode 100644 benchmark/benchmark.length.uint8c.js 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/repl.txt delete mode 100644 docs/types/test.ts delete mode 100644 examples/index.js delete mode 100644 lib/index.js delete mode 100644 lib/is_buffer_uint8array.js delete mode 100644 lib/main.js delete mode 100644 lib/polyfill.js rename docs/types/index.d.ts => mod.d.ts (99%) create mode 100644 mod.js create mode 100644 mod.js.map create mode 100644 stats.html delete mode 100644 test/dist/test.js delete mode 100644 test/test.js delete mode 100644 test/test.main.js delete mode 100644 test/test.polyfill.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 c8bdbbc..0000000 --- a/.github/.keepalive +++ /dev/null @@ -1 +0,0 @@ -2024-01-01T05:22:40.051Z diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index 96f81a8..0000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,7 +0,0 @@ - - -We are excited about your pull request, but unfortunately we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/empty) 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 ddb353e..0000000 --- a/.github/workflows/close_pull_requests.yml +++ /dev/null @@ -1,54 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: close_pull_requests - -# Workflow triggers: -on: - pull_request_target: - types: [opened] - -# Workflow jobs: -jobs: - - # Define job to close all pull requests: - run: - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Close pull request - - name: 'Close pull request' - # Pin action to full length commit SHA corresponding to v3.1.2 - uses: superbrothers/close-pull-request@9c18513d320d7b2c7185fb93396d0c664d5d8448 - with: - comment: | - Thank you for submitting a pull request. :raised_hands: - - We greatly appreciate your willingness to submit a contribution. However, we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). - - We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/empty) 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 2e70061..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: '49 1 * * 5' - - # 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 + + + + 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 8e62cb8..0000000 --- a/test/test.js +++ /dev/null @@ -1,60 +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 proxyquire = require( 'proxyquire' ); -var main = require( './../lib/main.js' ); -var polyfill = require( './../lib/polyfill.js' ); -var empty = require( './../lib' ); - - -// TESTS // - -tape( 'main export is a function', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof empty, 'function', 'main export is a function' ); - t.end(); -}); - -tape( 'if an environment supports Node.js buffer instances inheriting from Uint8Array, the main export supports returning arrays having uninitialized memory', function test( t ) { - var empty = proxyquire( './../lib', { - './is_buffer_uint8array.js': mock - }); - t.strictEqual( empty, main, 'returns expected value' ); - t.end(); - - function mock() { - return true; - } -}); - -tape( 'if an environment does not support Node.js buffer instances inheriting from Uint8Array, the main export supports returning zero-filled arrays', function test( t ) { - var empty = proxyquire( './../lib', { - './is_buffer_uint8array.js': mock - }); - t.strictEqual( empty, polyfill, 'returns expected value' ); - t.end(); - - function mock() { - return false; - } -}); diff --git a/test/test.main.js b/test/test.main.js deleted file mode 100644 index 3ceb26e..0000000 --- a/test/test.main.js +++ /dev/null @@ -1,274 +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 Float64Array = require( '@stdlib/array-float64' ); -var Float32Array = require( '@stdlib/array-float32' ); -var Int32Array = require( '@stdlib/array-int32' ); -var Uint32Array = require( '@stdlib/array-uint32' ); -var Int16Array = require( '@stdlib/array-int16' ); -var Uint16Array = require( '@stdlib/array-uint16' ); -var Int8Array = require( '@stdlib/array-int8' ); -var Uint8Array = require( '@stdlib/array-uint8' ); -var Uint8ClampedArray = require( '@stdlib/array-uint8c' ); -var Complex64Array = require( '@stdlib/array-complex64' ); -var Complex128Array = require( '@stdlib/array-complex128' ); -var instanceOf = require( '@stdlib/assert-instance-of' ); -var empty = require( './../lib/main.js' ); - - -// TESTS // - -tape( 'main export is a function', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof empty, 'function', 'main export is a function' ); - t.end(); -}); - -tape( 'the function throws an error if provided a value other than a nonnegative integer for the first argument', function test( t ) { - var values; - var i; - - values = [ - '5', - -3, - 3.14, - NaN, - true, - false, - null, - void 0, - [], - {}, - function noop() {} - ]; - - for ( i = 0; i < values.length; i++ ) { - t.throws( badValue( values[i] ), TypeError, 'throws an error when provided '+values[i] ); - } - t.end(); - - function badValue( value ) { - return function badValue() { - empty( value ); - }; - } -}); - -tape( 'the function throws an error if provided a value other than a nonnegative integer for the first argument (dtype)', function test( t ) { - var values; - var i; - - values = [ - '5', - -3, - 3.14, - NaN, - true, - false, - null, - void 0, - [], - {}, - function noop() {} - ]; - - for ( i = 0; i < values.length; i++ ) { - t.throws( badValue( values[i] ), TypeError, 'throws an error when provided '+values[i] ); - } - t.end(); - - function badValue( value ) { - return function badValue() { - empty( value, 'float32' ); - }; - } -}); - -tape( 'the function throws an error if provided an unrecognized data type', function test( t ) { - var values; - var i; - - values = [ - '5', - 'beep', - 'empty', - 'Int32', - 'Uint32', - 'Int16', - 'Uint16', - 'Int8', - 'Uint8', - 'Uint8c', - 'uint8_clamped', - 'Float64', - 'Float32', - 'FLOAT64', - 'FLOAT32', - 'GENERIC' - ]; - - for ( i = 0; i < values.length; i++ ) { - t.throws( badValue( values[i] ), TypeError, 'throws an error when provided '+values[i] ); - } - t.end(); - - function badValue( value ) { - return function badValue() { - empty( 10, value ); - }; - } -}); - -tape( 'the function returns an empty array (default)', function test( t ) { - var arr; - - arr = empty( 5 ); - t.strictEqual( instanceOf( arr, Float64Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=float64)', function test( t ) { - var arr; - - arr = empty( 5, 'float64' ); - t.strictEqual( instanceOf( arr, Float64Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=float32)', function test( t ) { - var arr; - - arr = empty( 5, 'float32' ); - t.strictEqual( instanceOf( arr, Float32Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=complex128)', function test( t ) { - var arr; - - arr = empty( 5, 'complex128' ); - t.strictEqual( instanceOf( arr, Complex128Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=complex64)', function test( t ) { - var arr; - - arr = empty( 5, 'complex64' ); - t.strictEqual( instanceOf( arr, Complex64Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=int32)', function test( t ) { - var arr; - - arr = empty( 5, 'int32' ); - t.strictEqual( instanceOf( arr, Int32Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=uint32)', function test( t ) { - var arr; - - arr = empty( 5, 'uint32' ); - t.strictEqual( instanceOf( arr, Uint32Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=int16)', function test( t ) { - var arr; - - arr = empty( 5, 'int16' ); - t.strictEqual( instanceOf( arr, Int16Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=uint16)', function test( t ) { - var arr; - - arr = empty( 5, 'uint16' ); - t.strictEqual( instanceOf( arr, Uint16Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=int8)', function test( t ) { - var arr; - - arr = empty( 5, 'int8' ); - t.strictEqual( instanceOf( arr, Int8Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=uint8)', function test( t ) { - var arr; - - arr = empty( 5, 'uint8' ); - t.strictEqual( instanceOf( arr, Uint8Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=uint8c)', function test( t ) { - var arr; - - arr = empty( 5, 'uint8c' ); - t.strictEqual( instanceOf( arr, Uint8ClampedArray ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=generic)', function test( t ) { - var expected; - var arr; - - expected = [ 0, 0, 0, 0, 0 ]; - - arr = empty( 5, 'generic' ); - t.strictEqual( instanceOf( arr, Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); diff --git a/test/test.polyfill.js b/test/test.polyfill.js deleted file mode 100644 index 17b99f3..0000000 --- a/test/test.polyfill.js +++ /dev/null @@ -1,324 +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 Float64Array = require( '@stdlib/array-float64' ); -var Float32Array = require( '@stdlib/array-float32' ); -var Int32Array = require( '@stdlib/array-int32' ); -var Uint32Array = require( '@stdlib/array-uint32' ); -var Int16Array = require( '@stdlib/array-int16' ); -var Uint16Array = require( '@stdlib/array-uint16' ); -var Int8Array = require( '@stdlib/array-int8' ); -var Uint8Array = require( '@stdlib/array-uint8' ); -var Uint8ClampedArray = require( '@stdlib/array-uint8c' ); -var Complex64Array = require( '@stdlib/array-complex64' ); -var Complex128Array = require( '@stdlib/array-complex128' ); -var reinterpret64 = require( '@stdlib/strided-base-reinterpret-complex64' ); -var reinterpret128 = require( '@stdlib/strided-base-reinterpret-complex128' ); -var instanceOf = require( '@stdlib/assert-instance-of' ); -var empty = require( './../lib/polyfill.js' ); - - -// TESTS // - -tape( 'main export is a function', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof empty, 'function', 'main export is a function' ); - t.end(); -}); - -tape( 'the function throws an error if provided a value other than a nonnegative integer for the first argument', function test( t ) { - var values; - var i; - - values = [ - '5', - -3, - 3.14, - NaN, - true, - false, - null, - void 0, - [], - {}, - function noop() {} - ]; - - for ( i = 0; i < values.length; i++ ) { - t.throws( badValue( values[i] ), TypeError, 'throws an error when provided '+values[i] ); - } - t.end(); - - function badValue( value ) { - return function badValue() { - empty( value ); - }; - } -}); - -tape( 'the function throws an error if provided a value other than a nonnegative integer for the first argument (dtype)', function test( t ) { - var values; - var i; - - values = [ - '5', - -3, - 3.14, - NaN, - true, - false, - null, - void 0, - [], - {}, - function noop() {} - ]; - - for ( i = 0; i < values.length; i++ ) { - t.throws( badValue( values[i] ), TypeError, 'throws an error when provided '+values[i] ); - } - t.end(); - - function badValue( value ) { - return function badValue() { - empty( value, 'float32' ); - }; - } -}); - -tape( 'the function throws an error if provided an unrecognized data type', function test( t ) { - var values; - var i; - - values = [ - '5', - 'beep', - 'empty', - 'Int32', - 'Uint32', - 'Int16', - 'Uint16', - 'Int8', - 'Uint8', - 'Uint8c', - 'uint8_clamped', - 'Float64', - 'Float32', - 'FLOAT64', - 'FLOAT32', - 'GENERIC' - ]; - - for ( i = 0; i < values.length; i++ ) { - t.throws( badValue( values[i] ), TypeError, 'throws an error when provided '+values[i] ); - } - t.end(); - - function badValue( value ) { - return function badValue() { - empty( 10, value ); - }; - } -}); - -tape( 'the function returns a zero-filled array (default)', function test( t ) { - var expected; - var arr; - - expected = new Float64Array( [ 0.0, 0.0, 0.0, 0.0, 0.0 ] ); - - arr = empty( 5 ); - t.strictEqual( instanceOf( arr, Float64Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=float64)', function test( t ) { - var expected; - var arr; - - expected = new Float64Array( [ 0.0, 0.0, 0.0, 0.0, 0.0 ] ); - - arr = empty( 5, 'float64' ); - t.strictEqual( instanceOf( arr, Float64Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=float32)', function test( t ) { - var expected; - var arr; - - expected = new Float32Array( [ 0.0, 0.0, 0.0, 0.0, 0.0 ] ); - - arr = empty( 5, 'float32' ); - t.strictEqual( instanceOf( arr, Float32Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=complex128)', function test( t ) { - var expected; - var arr; - - expected = new Float64Array( [ 0.0, 0.0, 0.0, 0.0 ] ); - - arr = empty( 2, 'complex128' ); - t.strictEqual( instanceOf( arr, Complex128Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length/2, 'returns expected value' ); - t.deepEqual( reinterpret128( arr, 0 ), expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=complex64)', function test( t ) { - var expected; - var arr; - - expected = new Float32Array( [ 0.0, 0.0, 0.0, 0.0 ] ); - - arr = empty( 2, 'complex64' ); - t.strictEqual( instanceOf( arr, Complex64Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length/2, 'returns expected value' ); - t.deepEqual( reinterpret64( arr, 0 ), expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=int32)', function test( t ) { - var expected; - var arr; - - expected = new Int32Array( [ 0, 0, 0, 0, 0 ] ); - - arr = empty( 5, 'int32' ); - t.strictEqual( instanceOf( arr, Int32Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=uint32)', function test( t ) { - var expected; - var arr; - - expected = new Uint32Array( [ 0, 0, 0, 0, 0 ] ); - - arr = empty( 5, 'uint32' ); - t.strictEqual( instanceOf( arr, Uint32Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=int16)', function test( t ) { - var expected; - var arr; - - expected = new Int16Array( [ 0, 0, 0, 0, 0 ] ); - - arr = empty( 5, 'int16' ); - t.strictEqual( instanceOf( arr, Int16Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=uint16)', function test( t ) { - var expected; - var arr; - - expected = new Uint16Array( [ 0, 0, 0, 0, 0 ] ); - - arr = empty( 5, 'uint16' ); - t.strictEqual( instanceOf( arr, Uint16Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=int8)', function test( t ) { - var expected; - var arr; - - expected = new Int8Array( [ 0, 0, 0, 0, 0 ] ); - - arr = empty( 5, 'int8' ); - t.strictEqual( instanceOf( arr, Int8Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=uint8)', function test( t ) { - var expected; - var arr; - - expected = new Uint8Array( [ 0, 0, 0, 0, 0 ] ); - - arr = empty( 5, 'uint8' ); - t.strictEqual( instanceOf( arr, Uint8Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=uint8c)', function test( t ) { - var expected; - var arr; - - expected = new Uint8ClampedArray( [ 0, 0, 0, 0, 0 ] ); - - arr = empty( 5, 'uint8c' ); - t.strictEqual( instanceOf( arr, Uint8ClampedArray ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=generic)', function test( t ) { - var expected; - var arr; - - expected = [ 0, 0, 0, 0, 0 ]; - - arr = empty( 5, 'generic' ); - t.strictEqual( instanceOf( arr, Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); From 49956fa311e2893ee7283d12f033e7f08c7d41f2 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Tue, 16 Jan 2024 08:37:49 +0000 Subject: [PATCH 34/75] Transform error messages --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 7f14382..db6e87d 100644 --- a/package.json +++ b/package.json @@ -46,7 +46,7 @@ "@stdlib/assert-is-uint8array": "^0.1.1", "@stdlib/buffer-alloc-unsafe": "^0.1.0", "@stdlib/ndarray-base-bytes-per-element": "^0.1.0", - "@stdlib/string-format": "^0.1.1", + "@stdlib/error-tools-fmtprodmsg": "^0.1.1", "@stdlib/types": "^0.2.0" }, "devDependencies": { From 6051f51b8744b2223874948a6e5072eb21d6bb2c Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Tue, 16 Jan 2024 08:38:19 +0000 Subject: [PATCH 35/75] Remove files --- mod.d.ts | 277 --- mod.js | 4 - mod.js.map | 1 - stats.html | 6177 ---------------------------------------------------- 4 files changed, 6459 deletions(-) delete mode 100644 mod.d.ts delete mode 100644 mod.js delete mode 100644 mod.js.map delete mode 100644 stats.html diff --git a/mod.d.ts b/mod.d.ts deleted file mode 100644 index c071f4d..0000000 --- a/mod.d.ts +++ /dev/null @@ -1,277 +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 - -/// - -import { Complex128Array, Complex64Array, DataType } from '@stdlib/types/array'; - -/** -* Creates an uninitialized array having a specified length. -* -* ## Notes -* -* - In browser environments, the function always returns zero-filled arrays. -* - In Node.js versions `>=3.0.0`, the underlying memory of returned typed arrays is **not** initialized. Memory contents are unknown and may contain **sensitive** data. -* -* @param length - array length -* @param dtype - data type -* @returns empty array -* -* @example -* var arr = empty( 2, 'float64' ); -* // returns -*/ -declare function empty( length: number, dtype: 'float64' ): Float64Array; - -/** -* Creates an uninitialized array having a specified length. -* -* ## Notes -* -* - In browser environments, the function always returns zero-filled arrays. -* - In Node.js versions `>=3.0.0`, the underlying memory of returned typed arrays is **not** initialized. Memory contents are unknown and may contain **sensitive** data. -* -* @param length - array length -* @param dtype - data type -* @returns empty array -* -* @example -* var arr = empty( 2, 'float32' ); -* // returns -*/ -declare function empty( length: number, dtype: 'float32' ): Float32Array; - -/** -* Creates an uninitialized array having a specified length. -* -* ## Notes -* -* - In browser environments, the function always returns zero-filled arrays. -* - In Node.js versions `>=3.0.0`, the underlying memory of returned typed arrays is **not** initialized. Memory contents are unknown and may contain **sensitive** data. -* -* @param length - array length -* @param dtype - data type -* @returns empty array -* -* @example -* var arr = empty( 2, 'complex128' ); -* // returns -*/ -declare function empty( length: number, dtype: 'complex128' ): Complex128Array; - -/** -* Creates an uninitialized array having a specified length. -* -* ## Notes -* -* - In browser environments, the function always returns zero-filled arrays. -* - In Node.js versions `>=3.0.0`, the underlying memory of returned typed arrays is **not** initialized. Memory contents are unknown and may contain **sensitive** data. -* -* @param length - array length -* @param dtype - data type -* @returns empty array -* -* @example -* var arr = empty( 2, 'complex64' ); -* // returns -*/ -declare function empty( length: number, dtype: 'complex64' ): Complex64Array; - -/** -* Creates an uninitialized array having a specified length. -* -* ## Notes -* -* - In browser environments, the function always returns zero-filled arrays. -* - In Node.js versions `>=3.0.0`, the underlying memory of returned typed arrays is **not** initialized. Memory contents are unknown and may contain **sensitive** data. -* -* @param length - array length -* @param dtype - data type -* @returns empty array -* -* @example -* var arr = empty( 2, 'int32' ); -* // returns -*/ -declare function empty( length: number, dtype: 'int32' ): Int32Array; - -/** -* Creates an uninitialized array having a specified length. -* -* ## Notes -* -* - In browser environments, the function always returns zero-filled arrays. -* - In Node.js versions `>=3.0.0`, the underlying memory of returned typed arrays is **not** initialized. Memory contents are unknown and may contain **sensitive** data. -* -* @param length - array length -* @param dtype - data type -* @returns empty array -* -* @example -* var arr = empty( 2, 'int16' ); -* // returns -*/ -declare function empty( length: number, dtype: 'int16' ): Int16Array; - -/** -* Creates an uninitialized array having a specified length. -* -* ## Notes -* -* - In browser environments, the function always returns zero-filled arrays. -* - In Node.js versions `>=3.0.0`, the underlying memory of returned typed arrays is **not** initialized. Memory contents are unknown and may contain **sensitive** data. -* -* @param length - array length -* @param dtype - data type -* @returns empty array -* -* @example -* var arr = empty( 2, 'int8' ); -* // returns -*/ -declare function empty( length: number, dtype: 'int8' ): Int8Array; - -/** -* Creates an uninitialized array having a specified length. -* -* ## Notes -* -* - In browser environments, the function always returns zero-filled arrays. -* - In Node.js versions `>=3.0.0`, the underlying memory of returned typed arrays is **not** initialized. Memory contents are unknown and may contain **sensitive** data. -* -* @param length - array length -* @param dtype - data type -* @returns empty array -* -* @example -* var arr = empty( 2, 'uint32' ); -* // returns -*/ -declare function empty( length: number, dtype: 'uint32' ): Uint32Array; - -/** -* Creates an uninitialized array having a specified length. -* -* ## Notes -* -* - In browser environments, the function always returns zero-filled arrays. -* - In Node.js versions `>=3.0.0`, the underlying memory of returned typed arrays is **not** initialized. Memory contents are unknown and may contain **sensitive** data. -* -* @param length - array length -* @param dtype - data type -* @returns empty array -* -* @example -* var arr = empty( 2, 'uint16' ); -* // returns -*/ -declare function empty( length: number, dtype: 'uint16' ): Uint16Array; - -/** -* Creates an uninitialized array having a specified length. -* -* ## Notes -* -* - In browser environments, the function always returns zero-filled arrays. -* - In Node.js versions `>=3.0.0`, the underlying memory of returned typed arrays is **not** initialized. Memory contents are unknown and may contain **sensitive** data. -* -* @param length - array length -* @param dtype - data type -* @returns empty array -* -* @example -* var arr = empty( 2, 'uint8' ); -* // returns -*/ -declare function empty( length: number, dtype: 'uint8' ): Uint8Array; - -/** -* Creates an uninitialized array having a specified length. -* -* ## Notes -* -* - In browser environments, the function always returns zero-filled arrays. -* - In Node.js versions `>=3.0.0`, the underlying memory of returned typed arrays is **not** initialized. Memory contents are unknown and may contain **sensitive** data. -* -* @param length - array length -* @param dtype - data type -* @returns empty array -* -* @example -* var arr = empty( 2, 'uint8c' ); -* // returns -*/ -declare function empty( length: number, dtype: 'uint8c' ): Uint8ClampedArray; - -/** -* Creates a zero-filled array having a specified length. -* -* @param length - array length -* @param dtype - data type -* @returns zero-filled array -* -* @example -* var arr = empty( 2, 'generic' ); -* // returns -*/ -declare function empty( length: number, dtype: 'generic' ): Array; - -/** -* Creates an uninitialized array having a specified length. -* -* ## Notes -* -* - In browser environments, the function always returns zero-filled arrays. -* - If `dtype` is `'generic'`, the function always returns a zero-filled array. -* - In Node.js versions `>=3.0.0`, the underlying memory of returned typed arrays is **not** initialized. Memory contents are unknown and may contain **sensitive** data. -* -* The function recognizes the following data types: -* -* - `float64`: double-precision floating-point numbers (IEEE 754) -* - `float32`: single-precision floating-point numbers (IEEE 754) -* - `complex128`: double-precision complex floating-point numbers -* - `complex64`: single-precision complex floating-point numbers -* - `int32`: 32-bit two's complement signed integers -* - `uint32`: 32-bit unsigned integers -* - `int16`: 16-bit two's complement signed integers -* - `uint16`: 16-bit unsigned integers -* - `int8`: 8-bit two's complement signed integers -* - `uint8`: 8-bit unsigned integers -* - `uint8c`: 8-bit unsigned integers clamped to `0-255` -* - `generic`: generic JavaScript values -* -* @param length - array length -* @param dtype - data type (default: 'float64') -* @returns empty array -* -* @example -* var arr = empty( 2 ); -* // returns -* -* @example -* var arr = empty( 2, 'float32' ); -* // returns -*/ -declare function empty( length: number, dtype?: DataType ): Float64Array; - - -// EXPORTS // - -export = empty; diff --git a/mod.js b/mod.js deleted file mode 100644 index 1c04a33..0000000 --- a/mod.js +++ /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 -/// -var e="function"==typeof Object.defineProperty?Object.defineProperty:null;var r=Object.defineProperty;function t(e){return"number"==typeof e}function n(e){var r,t="";for(r=0;r0&&(r-=1),n=i.toExponential(r)):n=i.toPrecision(e.precision),e.alternate||(n=y.call(n,v,"$1e"),n=y.call(n,b,"e"),n=y.call(n,w,""));break;default:throw new Error("invalid double notation. Value: "+e.specifier)}return n=y.call(n,h,"e+0$1"),n=y.call(n,p,"e-0$1"),e.alternate&&(n=y.call(n,g,"$1."),n=y.call(n,m,"$1.e")),i>=0&&e.sign&&(n=e.sign+n),n=e.specifier===s.call(e.specifier)?s.call(n):c.call(n)}function E(e){var r,t="";for(r=0;r127)throw new Error("invalid character code. Value: "+n.arg);n.arg=_(a)?String(n.arg):T(a)}break;case"e":case"E":case"f":case"F":case"g":case"G":r||(n.precision=6),n.arg=d(n);break;default:throw new Error("invalid specifier: "+n.specifier)}n.maxWidth>=0&&n.arg.length>n.maxWidth&&(n.arg=n.arg.substring(0,n.maxWidth)),n.padZeros?n.arg=i(n.arg,n.width||n.precision,n.padRight):n.width&&(n.arg=A(n.arg,n.width,n.padRight)),l+=n.arg||"",c+=1}return l}var k=/%(?:([1-9]\d*)\$)?([0 +\-#]*)(\*|\d+)?(?:(\.)(\*|\d+)?)?[hlL]?([%A-Za-z])/g;function L(e){var r={mapping:e[1]?parseInt(e[1],10):void 0,flags:e[2],width:e[3],precision:e[5],specifier:e[6]};return"."===e[4]&&void 0===e[5]&&(r.precision="1"),r}function S(e){var r,t,n,i;for(t=[],i=0,n=k.exec(e);n;)(r=e.slice(i,k.lastIndex-n[0].length)).length&&t.push(r),t.push(L(n)),i=k.lastIndex,n=k.exec(e);return(r=e.slice(i)).length&&t.push(r),t}function R(e){return"string"==typeof e}function B(e){var r,t,n;if(!R(e))throw new TypeError(B("invalid argument. First argument must be a string. Value: `%s`.",e));for(r=S(e),(t=new Array(arguments.length))[0]=r,n=1;nne&&oe(e)}function ue(e){return W(e)&&ae(e)}function fe(e){return ee(e)&&ae(e.valueOf())}function le(e){return ue(e)||fe(e)}function ce(e){return ue(e)&&e>=0}function se(e){return fe(e)&&e.valueOf()>=0}function ye(e){return ce(e)||se(e)}Y(le,"isPrimitive",ue),Y(le,"isObject",fe),Y(ye,"isPrimitive",ce),Y(ye,"isObject",se);var he="function"==typeof Float64Array;var pe="function"==typeof Float64Array?Float64Array:null;var ge="function"==typeof Float64Array?Float64Array:void 0;var me=function(){var e,r,t;if("function"!=typeof pe)return!1;try{r=new pe([1,3.14,-3.14,NaN]),t=r,e=(he&&t instanceof Float64Array||"[object Float64Array]"===D(t))&&1===r[0]&&3.14===r[1]&&-3.14===r[2]&&r[3]!=r[3]}catch(r){e=!1}return e}()?ge:function(){throw new Error("not implemented")},we="function"==typeof Float32Array;var be="function"==typeof Float32Array?Float32Array:null;var ve="function"==typeof Float32Array?Float32Array:void 0;var de=function(){var e,r,t;if("function"!=typeof be)return!1;try{r=new be([1,3.14,-3.14,5e40]),t=r,e=(we&&t instanceof Float32Array||"[object Float32Array]"===D(t))&&1===r[0]&&3.140000104904175===r[1]&&-3.140000104904175===r[2]&&r[3]===te}catch(r){e=!1}return e}()?ve:function(){throw new Error("not implemented")},Ee="function"==typeof Int16Array;var Ae="function"==typeof Int16Array?Int16Array:null;var Te="function"==typeof Int16Array?Int16Array:void 0;var _e=function(){var e,r,t;if("function"!=typeof Ae)return!1;try{r=new Ae([1,3.14,-3.14,32768]),t=r,e=(Ee&&t instanceof Int16Array||"[object Int16Array]"===D(t))&&1===r[0]&&3===r[1]&&-3===r[2]&&-32768===r[3]}catch(r){e=!1}return e}()?Te:function(){throw new Error("not implemented")},xe="function"==typeof Int32Array;var je="function"==typeof Int32Array?Int32Array:null;var Ve="function"==typeof Int32Array?Int32Array:void 0;var ke=function(){var e,r,t;if("function"!=typeof je)return!1;try{r=new je([1,3.14,-3.14,2147483648]),t=r,e=(xe&&t instanceof Int32Array||"[object Int32Array]"===D(t))&&1===r[0]&&3===r[1]&&-3===r[2]&&-2147483648===r[3]}catch(r){e=!1}return e}()?Ve:function(){throw new Error("not implemented")},Le="function"==typeof Int8Array;var Se="function"==typeof Int8Array?Int8Array:null;var Re="function"==typeof Int8Array?Int8Array:void 0;var Be=function(){var e,r,t;if("function"!=typeof Se)return!1;try{r=new Se([1,3.14,-3.14,128]),t=r,e=(Le&&t instanceof Int8Array||"[object Int8Array]"===D(t))&&1===r[0]&&3===r[1]&&-3===r[2]&&-128===r[3]}catch(r){e=!1}return e}()?Re:function(){throw new Error("not implemented")},Ie="function"==typeof Uint16Array;var Ce="function"==typeof Uint16Array?Uint16Array:null;var Fe="function"==typeof Uint16Array?Uint16Array:void 0;var Oe=function(){var e,r,t;if("function"!=typeof Ce)return!1;try{r=new Ce(r=[1,3.14,-3.14,65536,65537]),t=r,e=(Ie&&t instanceof Uint16Array||"[object Uint16Array]"===D(t))&&1===r[0]&&3===r[1]&&65533===r[2]&&0===r[3]&&1===r[4]}catch(r){e=!1}return e}()?Fe:function(){throw new Error("not implemented")},Me="function"==typeof Uint32Array;var Ne="function"==typeof Uint32Array?Uint32Array:null;var Ue="function"==typeof Uint32Array?Uint32Array:void 0;var Pe=function(){var e,r,t;if("function"!=typeof Ne)return!1;try{r=new Ne(r=[1,3.14,-3.14,4294967296,4294967297]),t=r,e=(Me&&t instanceof Uint32Array||"[object Uint32Array]"===D(t))&&1===r[0]&&3===r[1]&&4294967293===r[2]&&0===r[3]&&1===r[4]}catch(r){e=!1}return e}()?Ue:function(){throw new Error("not implemented")},Ye="function"==typeof Uint8Array;var We="function"==typeof Uint8Array?Uint8Array:null;var $e="function"==typeof Uint8Array?Uint8Array:void 0;var Ge=function(){var e,r,t;if("function"!=typeof We)return!1;try{r=new We(r=[1,3.14,-3.14,256,257]),t=r,e=(Ye&&t instanceof Uint8Array||"[object Uint8Array]"===D(t))&&1===r[0]&&3===r[1]&&253===r[2]&&0===r[3]&&1===r[4]}catch(r){e=!1}return e}()?$e:function(){throw new Error("not implemented")},Ze="function"==typeof Uint8ClampedArray;var Xe="function"==typeof Uint8ClampedArray?Uint8ClampedArray:null;var ze="function"==typeof Uint8ClampedArray?Uint8ClampedArray:void 0;var Je=function(){var e,r,t;if("function"!=typeof Xe)return!1;try{r=new Xe([-1,0,1,3.14,4.99,255,256]),t=r,e=(Ze&&t instanceof Uint8ClampedArray||"[object Uint8ClampedArray]"===D(t))&&0===r[0]&&0===r[1]&&1===r[2]&&3===r[3]&&5===r[4]&&255===r[5]&&255===r[6]}catch(r){e=!1}return e}()?ze:function(){throw new Error("not implemented")};function qe(e){return"object"==typeof e&&null!==e&&"number"==typeof e.length&&oe(e.length)&&e.length>=0&&e.length<=4294967295}function De(e){return"object"==typeof e&&null!==e&&"number"==typeof e.length&&oe(e.length)&&e.length>=0&&e.length<=9007199254740991}var He="function"==typeof ArrayBuffer;function Ke(e){return He&&e instanceof ArrayBuffer||"[object ArrayBuffer]"===D(e)}var Qe=Array.isArray?Array.isArray:function(e){return"[object Array]"===D(e)};function er(e){return"object"==typeof e&&null!==e&&!Qe(e)}var rr=/./;function tr(e){return"boolean"==typeof e}var nr=Boolean,ir=Boolean.prototype.toString;var or=G();function ar(e){return"object"==typeof e&&(e instanceof nr||(or?function(e){try{return ir.call(e),!0}catch(e){return!1}}(e):"[object Boolean]"===D(e)))}function ur(e){return tr(e)||ar(e)}function fr(){return new Function("return this;")()}Y(ur,"isPrimitive",tr),Y(ur,"isObject",ar);var lr="object"==typeof self?self:null,cr="object"==typeof window?window:null,sr="undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},yr="object"==typeof sr?sr:null,hr="object"==typeof globalThis?globalThis:null;var pr=function(e){if(arguments.length){if(!tr(e))throw new TypeError(B("invalid argument. Must provide a boolean. Value: `%s`.",e));if(e)return fr()}if(hr)return hr;if(lr)return lr;if(cr)return cr;if(yr)return yr;throw new Error("unexpected error. Unable to resolve global object.")}(),gr=pr.document&&pr.document.childNodes,mr=Int8Array;function wr(){return/^\s*function\s*([^(]*)/i}var br=/^\s*function\s*([^(]*)/i;function vr(e){return null!==e&&"object"==typeof e}function dr(e){var r,t,n,i;if(("Object"===(t=D(e).slice(8,-1))||"Error"===t)&&e.constructor){if("string"==typeof(n=e.constructor).name)return n.name;if(r=br.exec(n.toString()))return r[1]}return vr(i=e)&&(i._isBuffer||i.constructor&&"function"==typeof i.constructor.isBuffer&&i.constructor.isBuffer(i))?"Buffer":t}Y(wr,"REGEXP",br),Y(vr,"isObjectLikeArray",function(e){if("function"!=typeof e)throw new TypeError(B("invalid argument. Must provide a function. Value: `%s`.",e));return function(r){var t,n;if(!Qe(r))return!1;if(0===(t=r.length))return!1;for(n=0;n=2)r.push(n[0],n[1]);else{if(!kr(n))return new TypeError(B("invalid argument. An iterator must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",n));r.push(Ir(n),Cr(n))}return r}function Wr(e,r,t){var n,i,o,a;for(n=[],a=-1;!(i=e.next()).done;)if(a+=1,qe(o=r.call(t,i.value,a))&&o.length>=2)n.push(o[0],o[1]);else{if(!kr(o))return new TypeError(B("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",o));n.push(Ir(o),Cr(o))}return n}function $r(e,r){var t,n,i,o;for(t=r.length,o=0,i=0;it.byteLength-e)throw new RangeError(B("invalid arguments. ArrayBuffer has insufficient capacity. Either decrease the array length or provide a bigger buffer. Minimum capacity: `%u`.",n*Gr));t=new de(t,e,2*n)}}return Y(this,"_buffer",t),Y(this,"_length",t.length/2),this}function Hr(e){return e.re}function Kr(e){return e.im}function Qr(e){var r,t,n;for(r=[];!(t=e.next()).done;)if(qe(n=t.value)&&n.length>=2)r.push(n[0],n[1]);else{if(!kr(n))return new TypeError(B("invalid argument. An iterator must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",n));r.push(Hr(n),Kr(n))}return r}function et(e,r,t){var n,i,o,a;for(n=[],a=-1;!(i=e.next()).done;)if(a+=1,qe(o=r.call(t,i.value,a))&&o.length>=2)n.push(o[0],o[1]);else{if(!kr(o))return new TypeError(B("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",o));n.push(Hr(o),Kr(o))}return n}function rt(e,r){var t,n,i,o;for(t=r.length,o=0,i=0;i1){if(!Ar(n=arguments[1]))throw new TypeError(B("invalid argument. Second argument must be a function. Value: `%s`.",n));t>2&&(r=arguments[2])}if(Xr(e)){if(f=e.length,n){for(o=(i=new this(f))._buffer,y=0,s=0;s=2))throw new TypeError(B("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",c));o[y]=c[0],o[y+1]=c[1]}y+=2}return i}return new this(e)}if(De(e)){if(n){for(f=e.length,u=e.get&&e.set?Pr("default"):Nr("default"),s=0;s=2))throw new TypeError(B("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",c));o[y]=c[0],o[y+1]=c[1]}y+=2}return i}return new this(e)}if(er(e)&&Zr&&Ar(e[Rr])){if(!Ar((o=e[Rr]()).next))throw new TypeError(B("invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.",e));if((a=n?Wr(o,n,r):Yr(o))instanceof Error)throw a;for(o=(i=new this(f=a.length/2))._buffer,s=0;s=n)return{done:!0};return r=new Vr(e[a+=2],e[a+1]),{value:[o,r],done:!1}})),Y(t,"return",(function(e){if(i=!0,arguments.length)return{value:e,done:!0};return{done:!0}})),Rr&&Y(t,Rr,(function(){return r.entries()})),t})),Y(Dr.prototype,"get",(function(e){var r;if(!Xr(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!ce(e))throw new TypeError(B("invalid argument. Must provide a nonnegative integer. Value: `%s`.",e));if(!(e>=this._length))return new Vr((r=this._buffer)[e*=2],r[e+1])})),Br(Dr.prototype,"length",(function(){return this._length})),Y(Dr.prototype,"set",(function(e){var r,t,n,i,o,a,u,f,l;if(!Xr(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(n=this._buffer,arguments.length>1){if(!ce(t=arguments[1]))throw new TypeError(B("invalid argument. Index argument must be a nonnegative integer. Value: `%s`.",t))}else t=0;if(kr(e)){if(t>=this._length)throw new RangeError(B("invalid argument. Index argument is out-of-bounds. Value: `%u`.",t));return n[t*=2]=Ir(e),void(n[t+1]=Cr(e))}if(Xr(e)){if(t+(a=e._length)>this._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");if(r=e._buffer,l=n.byteOffset+t*Gr,r.buffer===n.buffer&&r.byteOffsetl){for(i=new de(r.length),f=0;fthis._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");if(r=e,l=n.byteOffset+t*Gr,r.buffer===n.buffer&&r.byteOffsetl){for(i=new de(a),f=0;fthis._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");for(t*=2,f=0;ft.byteLength-e)throw new RangeError(B("invalid arguments. ArrayBuffer has insufficient capacity. Either decrease the array length or provide a bigger buffer. Minimum capacity: `%u`.",n*tt));t=new me(t,e,2*n)}}return Y(this,"_buffer",t),Y(this,"_length",t.length/2),this}Y(ft,"BYTES_PER_ELEMENT",tt),Y(ft,"name","Complex128Array"),Y(ft,"from",(function(e){var r,t,n,i,o,a,u,f,l,c,s,y;if(!Ar(this))throw new TypeError("invalid invocation. `this` context must be a constructor.");if(!ot(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if((t=arguments.length)>1){if(!Ar(n=arguments[1]))throw new TypeError(B("invalid argument. Second argument must be a function. Value: `%s`.",n));t>2&&(r=arguments[2])}if(it(e)){if(f=e.length,n){for(o=(i=new this(f))._buffer,y=0,s=0;s=2))throw new TypeError(B("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",c));o[y]=c[0],o[y+1]=c[1]}y+=2}return i}return new this(e)}if(De(e)){if(n){for(f=e.length,u=e.get&&e.set?Pr("default"):Nr("default"),s=0;s=2))throw new TypeError(B("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",c));o[y]=c[0],o[y+1]=c[1]}y+=2}return i}return new this(e)}if(er(e)&&nt&&Ar(e[Rr])){if(!Ar((o=e[Rr]()).next))throw new TypeError(B("invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.",e));if((a=n?et(o,n,r):Qr(o))instanceof Error)throw a;for(o=(i=new this(f=a.length/2))._buffer,s=0;s=n)return{done:!0};return r=new Tr(e[a+=2],e[a+1]),{value:[o,r],done:!1}})),Y(t,"return",(function(e){if(i=!0,arguments.length)return{value:e,done:!0};return{done:!0}})),Rr&&Y(t,Rr,(function(){return r.entries()})),t})),Y(ft.prototype,"get",(function(e){var r;if(!it(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!ce(e))throw new TypeError(B("invalid argument. Must provide a nonnegative integer. Value: `%s`.",e));if(!(e>=this._length))return new Tr((r=this._buffer)[e*=2],r[e+1])})),Br(ft.prototype,"length",(function(){return this._length})),Y(ft.prototype,"set",(function(e){var r,t,n,i,o,a,u,f,l;if(!it(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(n=this._buffer,arguments.length>1){if(!ce(t=arguments[1]))throw new TypeError(B("invalid argument. Index argument must be a nonnegative integer. Value: `%s`.",t))}else t=0;if(kr(e)){if(t>=this._length)throw new RangeError(B("invalid argument. Index argument is out-of-bounds. Value: `%u`.",t));return n[t*=2]=Hr(e),void(n[t+1]=Kr(e))}if(it(e)){if(t+(a=e._length)>this._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");if(r=e._buffer,l=n.byteOffset+t*tt,r.buffer===n.buffer&&r.byteOffsetl){for(i=new me(r.length),f=0;fthis._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");if(r=e,l=n.byteOffset+t*tt,r.buffer===n.buffer&&r.byteOffsetl){for(i=new me(a),f=0;fthis._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");for(t*=2,f=0;f1?arguments[1]:"float64"))return st(e);if(null===(t=ct(r)))throw new TypeError(B("invalid argument. Second argument must be a recognized data type. Value: `%s`.",r));return new t(e)}function ht(e){return arguments.length>1?yt(e,arguments[1]):yt(e)}export{ht as default}; -//# sourceMappingURL=mod.js.map diff --git a/mod.js.map b/mod.js.map deleted file mode 100644 index ca3f210..0000000 --- a/mod.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"mod.js","sources":["../node_modules/@stdlib/utils-define-property/lib/define_property.js","../node_modules/@stdlib/utils-define-property/lib/builtin.js","../node_modules/@stdlib/string-base-format-interpolate/lib/is_number.js","../node_modules/@stdlib/string-base-format-interpolate/lib/zero_pad.js","../node_modules/@stdlib/string-base-format-interpolate/lib/format_integer.js","../node_modules/@stdlib/string-base-format-interpolate/lib/is_string.js","../node_modules/@stdlib/string-base-format-interpolate/lib/format_double.js","../node_modules/@stdlib/string-base-format-interpolate/lib/space_pad.js","../node_modules/@stdlib/string-base-format-interpolate/lib/main.js","../node_modules/@stdlib/string-base-format-tokenize/lib/main.js","../node_modules/@stdlib/string-format/lib/is_string.js","../node_modules/@stdlib/string-format/lib/main.js","../node_modules/@stdlib/utils-define-property/lib/polyfill.js","../node_modules/@stdlib/utils-define-property/lib/index.js","../node_modules/@stdlib/utils-define-property/lib/has_define_property_support.js","../node_modules/@stdlib/utils-define-nonenumerable-read-only-property/lib/main.js","../node_modules/@stdlib/assert-is-number/lib/primitive.js","../node_modules/@stdlib/assert-has-tostringtag-support/lib/main.js","../node_modules/@stdlib/assert-has-symbol-support/lib/main.js","../node_modules/@stdlib/utils-native-class/lib/tostring.js","../node_modules/@stdlib/assert-has-own-property/lib/main.js","../node_modules/@stdlib/symbol-ctor/lib/main.js","../node_modules/@stdlib/utils-native-class/lib/tostringtag.js","../node_modules/@stdlib/utils-native-class/lib/index.js","../node_modules/@stdlib/utils-native-class/lib/polyfill.js","../node_modules/@stdlib/utils-native-class/lib/main.js","../node_modules/@stdlib/number-ctor/lib/main.js","../node_modules/@stdlib/assert-is-number/lib/tostring.js","../node_modules/@stdlib/assert-is-number/lib/object.js","../node_modules/@stdlib/assert-is-number/lib/try2serialize.js","../node_modules/@stdlib/assert-is-number/lib/main.js","../node_modules/@stdlib/assert-is-number/lib/index.js","../node_modules/@stdlib/constants-float64-pinf/lib/index.js","../node_modules/@stdlib/constants-float64-ninf/lib/index.js","../node_modules/@stdlib/math-base-special-floor/lib/main.js","../node_modules/@stdlib/math-base-assert-is-integer/lib/main.js","../node_modules/@stdlib/assert-is-integer/lib/integer.js","../node_modules/@stdlib/assert-is-integer/lib/primitive.js","../node_modules/@stdlib/assert-is-integer/lib/object.js","../node_modules/@stdlib/assert-is-integer/lib/main.js","../node_modules/@stdlib/assert-is-nonnegative-integer/lib/primitive.js","../node_modules/@stdlib/assert-is-nonnegative-integer/lib/object.js","../node_modules/@stdlib/assert-is-nonnegative-integer/lib/main.js","../node_modules/@stdlib/assert-is-integer/lib/index.js","../node_modules/@stdlib/assert-is-nonnegative-integer/lib/index.js","../node_modules/@stdlib/assert-is-float64array/lib/main.js","../node_modules/@stdlib/assert-has-float64array-support/lib/float64array.js","../node_modules/@stdlib/array-float64/lib/main.js","../node_modules/@stdlib/array-float64/lib/index.js","../node_modules/@stdlib/assert-has-float64array-support/lib/main.js","../node_modules/@stdlib/array-float64/lib/polyfill.js","../node_modules/@stdlib/assert-is-float32array/lib/main.js","../node_modules/@stdlib/assert-has-float32array-support/lib/float32array.js","../node_modules/@stdlib/array-float32/lib/main.js","../node_modules/@stdlib/array-float32/lib/index.js","../node_modules/@stdlib/assert-has-float32array-support/lib/main.js","../node_modules/@stdlib/array-float32/lib/polyfill.js","../node_modules/@stdlib/assert-is-int16array/lib/main.js","../node_modules/@stdlib/constants-int16-max/lib/index.js","../node_modules/@stdlib/assert-has-int16array-support/lib/int16array.js","../node_modules/@stdlib/array-int16/lib/main.js","../node_modules/@stdlib/array-int16/lib/index.js","../node_modules/@stdlib/assert-has-int16array-support/lib/main.js","../node_modules/@stdlib/constants-int16-min/lib/index.js","../node_modules/@stdlib/array-int16/lib/polyfill.js","../node_modules/@stdlib/assert-is-int32array/lib/main.js","../node_modules/@stdlib/constants-int32-max/lib/index.js","../node_modules/@stdlib/assert-has-int32array-support/lib/int32array.js","../node_modules/@stdlib/array-int32/lib/main.js","../node_modules/@stdlib/array-int32/lib/index.js","../node_modules/@stdlib/assert-has-int32array-support/lib/main.js","../node_modules/@stdlib/constants-int32-min/lib/index.js","../node_modules/@stdlib/array-int32/lib/polyfill.js","../node_modules/@stdlib/assert-is-int8array/lib/main.js","../node_modules/@stdlib/constants-int8-max/lib/index.js","../node_modules/@stdlib/assert-has-int8array-support/lib/int8array.js","../node_modules/@stdlib/array-int8/lib/main.js","../node_modules/@stdlib/array-int8/lib/index.js","../node_modules/@stdlib/assert-has-int8array-support/lib/main.js","../node_modules/@stdlib/constants-int8-min/lib/index.js","../node_modules/@stdlib/array-int8/lib/polyfill.js","../node_modules/@stdlib/assert-is-uint16array/lib/main.js","../node_modules/@stdlib/constants-uint16-max/lib/index.js","../node_modules/@stdlib/assert-has-uint16array-support/lib/uint16array.js","../node_modules/@stdlib/array-uint16/lib/main.js","../node_modules/@stdlib/array-uint16/lib/index.js","../node_modules/@stdlib/assert-has-uint16array-support/lib/main.js","../node_modules/@stdlib/array-uint16/lib/polyfill.js","../node_modules/@stdlib/assert-is-uint32array/lib/main.js","../node_modules/@stdlib/constants-uint32-max/lib/index.js","../node_modules/@stdlib/assert-has-uint32array-support/lib/uint32array.js","../node_modules/@stdlib/array-uint32/lib/main.js","../node_modules/@stdlib/array-uint32/lib/index.js","../node_modules/@stdlib/assert-has-uint32array-support/lib/main.js","../node_modules/@stdlib/array-uint32/lib/polyfill.js","../node_modules/@stdlib/assert-is-uint8array/lib/main.js","../node_modules/@stdlib/constants-uint8-max/lib/index.js","../node_modules/@stdlib/assert-has-uint8array-support/lib/uint8array.js","../node_modules/@stdlib/array-uint8/lib/main.js","../node_modules/@stdlib/array-uint8/lib/index.js","../node_modules/@stdlib/assert-has-uint8array-support/lib/main.js","../node_modules/@stdlib/array-uint8/lib/polyfill.js","../node_modules/@stdlib/assert-is-uint8clampedarray/lib/main.js","../node_modules/@stdlib/assert-has-uint8clampedarray-support/lib/uint8clampedarray.js","../node_modules/@stdlib/array-uint8c/lib/main.js","../node_modules/@stdlib/array-uint8c/lib/index.js","../node_modules/@stdlib/assert-has-uint8clampedarray-support/lib/main.js","../node_modules/@stdlib/array-uint8c/lib/polyfill.js","../node_modules/@stdlib/assert-is-array-like-object/lib/main.js","../node_modules/@stdlib/constants-array-max-array-length/lib/index.js","../node_modules/@stdlib/assert-is-collection/lib/main.js","../node_modules/@stdlib/constants-array-max-typed-array-length/lib/index.js","../node_modules/@stdlib/assert-is-arraybuffer/lib/main.js","../node_modules/@stdlib/assert-is-array/lib/main.js","../node_modules/@stdlib/assert-is-object/lib/main.js","../node_modules/@stdlib/utils-type-of/lib/fixtures/re.js","../node_modules/@stdlib/assert-is-boolean/lib/primitive.js","../node_modules/@stdlib/boolean-ctor/lib/main.js","../node_modules/@stdlib/assert-is-boolean/lib/tostring.js","../node_modules/@stdlib/assert-is-boolean/lib/object.js","../node_modules/@stdlib/assert-is-boolean/lib/try2serialize.js","../node_modules/@stdlib/assert-is-boolean/lib/main.js","../node_modules/@stdlib/utils-global/lib/codegen.js","../node_modules/@stdlib/assert-is-boolean/lib/index.js","../node_modules/@stdlib/utils-global/lib/self.js","../node_modules/@stdlib/utils-global/lib/window.js","../node_modules/@stdlib/utils-global/lib/global.js","../node_modules/@stdlib/utils-global/lib/global_this.js","../node_modules/@stdlib/utils-type-of/lib/fixtures/nodelist.js","../node_modules/@stdlib/utils-global/lib/main.js","../node_modules/@stdlib/utils-type-of/lib/fixtures/typedarray.js","../node_modules/@stdlib/regexp-function-name/lib/main.js","../node_modules/@stdlib/regexp-function-name/lib/regexp.js","../node_modules/@stdlib/assert-is-object-like/lib/main.js","../node_modules/@stdlib/utils-constructor-name/lib/main.js","../node_modules/@stdlib/assert-is-buffer/lib/main.js","../node_modules/@stdlib/regexp-function-name/lib/index.js","../node_modules/@stdlib/assert-is-object-like/lib/index.js","../node_modules/@stdlib/assert-tools-array-function/lib/main.js","../node_modules/@stdlib/utils-type-of/lib/index.js","../node_modules/@stdlib/utils-type-of/lib/check.js","../node_modules/@stdlib/utils-type-of/lib/polyfill.js","../node_modules/@stdlib/utils-type-of/lib/main.js","../node_modules/@stdlib/assert-is-function/lib/main.js","../node_modules/@stdlib/complex-float64/lib/main.js","../node_modules/@stdlib/complex-float64/lib/tostring.js","../node_modules/@stdlib/complex-float64/lib/tojson.js","../node_modules/@stdlib/number-float64-base-to-float32/lib/main.js","../node_modules/@stdlib/number-float64-base-to-float32/lib/polyfill.js","../node_modules/@stdlib/number-float64-base-to-float32/lib/index.js","../node_modules/@stdlib/complex-float32/lib/main.js","../node_modules/@stdlib/assert-is-complex-like/lib/main.js","../node_modules/@stdlib/math-base-assert-is-even/lib/main.js","../node_modules/@stdlib/assert-has-iterator-symbol-support/lib/main.js","../node_modules/@stdlib/complex-float32/lib/tostring.js","../node_modules/@stdlib/complex-float32/lib/tojson.js","../node_modules/@stdlib/symbol-iterator/lib/main.js","../node_modules/@stdlib/utils-define-nonenumerable-read-only-accessor/lib/main.js","../node_modules/@stdlib/complex-realf/lib/main.js","../node_modules/@stdlib/complex-imagf/lib/main.js","../node_modules/@stdlib/strided-base-reinterpret-complex64/lib/main.js","../node_modules/@stdlib/strided-base-reinterpret-complex128/lib/main.js","../node_modules/@stdlib/array-base-getter/lib/main.js","../node_modules/@stdlib/array-base-accessor-getter/lib/main.js","../node_modules/@stdlib/array-complex64/lib/from_iterator.js","../node_modules/@stdlib/array-complex64/lib/from_iterator_map.js","../node_modules/@stdlib/array-complex64/lib/from_array.js","../node_modules/@stdlib/array-complex64/lib/main.js","../node_modules/@stdlib/complex-real/lib/main.js","../node_modules/@stdlib/complex-imag/lib/main.js","../node_modules/@stdlib/array-complex128/lib/from_iterator.js","../node_modules/@stdlib/array-complex128/lib/from_iterator_map.js","../node_modules/@stdlib/array-complex128/lib/from_array.js","../node_modules/@stdlib/array-complex128/lib/main.js","../node_modules/@stdlib/array-ctors/lib/ctors.js","../node_modules/@stdlib/array-ctors/lib/main.js","../node_modules/@stdlib/array-base-zeros/lib/main.js","../node_modules/@stdlib/array-base-filled/lib/main.js","../node_modules/@stdlib/array-zeros/lib/main.js","../lib/polyfill.js"],"sourcesContent":["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Object.defineProperty === 'function' ) ? Object.defineProperty : null;\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Defines (or modifies) an object property.\n*\n* ## Notes\n*\n* - Property descriptors come in two flavors: **data descriptors** and **accessor descriptors**. A data descriptor is a property that has a value, which may or may not be writable. An accessor descriptor is a property described by a getter-setter function pair. A descriptor must be one of these two flavors and cannot be both.\n*\n* @name defineProperty\n* @type {Function}\n* @param {Object} obj - object on which to define the property\n* @param {(string|symbol)} prop - property name\n* @param {Object} descriptor - property descriptor\n* @param {boolean} [descriptor.configurable=false] - boolean indicating if property descriptor can be changed and if the property can be deleted from the provided object\n* @param {boolean} [descriptor.enumerable=false] - boolean indicating if the property shows up when enumerating object properties\n* @param {boolean} [descriptor.writable=false] - boolean indicating if the value associated with the property can be changed with an assignment operator\n* @param {*} [descriptor.value] - property value\n* @param {(Function|void)} [descriptor.get=undefined] - function which serves as a getter for the property, or, if no getter, undefined. When the property is accessed, a getter function is called without arguments and with the `this` context set to the object through which the property is accessed (which may not be the object on which the property is defined due to inheritance). The return value will be used as the property value.\n* @param {(Function|void)} [descriptor.set=undefined] - function which serves as a setter for the property, or, if no setter, undefined. When assigning a property value, a setter function is called with one argument (the value being assigned to the property) and with the `this` context set to the object through which the property is assigned.\n* @throws {TypeError} first argument must be an object\n* @throws {TypeError} third argument must be an object\n* @throws {Error} property descriptor cannot have both a value and a setter and/or getter\n* @returns {Object} object with added property\n*\n* @example\n* var obj = {};\n*\n* defineProperty( obj, 'foo', {\n* 'value': 'bar'\n* });\n*\n* var str = obj.foo;\n* // returns 'bar'\n*/\nvar defineProperty = Object.defineProperty;\n\n\n// EXPORTS //\n\nexport default defineProperty;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Tests if a value is a number primitive.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number primitive\n*\n* @example\n* var bool = isNumber( 3.14 );\n* // returns true\n*\n* @example\n* var bool = isNumber( NaN );\n* // returns true\n*\n* @example\n* var bool = isNumber( new Number( 3.14 ) );\n* // returns false\n*/\nfunction isNumber( value ) {\n\treturn ( typeof value === 'number' ); // NOTE: we inline the `isNumber.isPrimitive` function from `@stdlib/assert/is-number` in order to avoid circular dependencies.\n}\n\n\n// EXPORTS //\n\nexport default isNumber;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// FUNCTIONS //\n\n/**\n* Tests if a string starts with a minus sign (`-`).\n*\n* @private\n* @param {string} str - input string\n* @returns {boolean} boolean indicating if a string starts with a minus sign (`-`)\n*/\nfunction startsWithMinus( str ) {\n\treturn str[ 0 ] === '-';\n}\n\n/**\n* Returns a string of `n` zeros.\n*\n* @private\n* @param {number} n - number of zeros\n* @returns {string} string of zeros\n*/\nfunction zeros( n ) {\n\tvar out = '';\n\tvar i;\n\tfor ( i = 0; i < n; i++ ) {\n\t\tout += '0';\n\t}\n\treturn out;\n}\n\n\n// MAIN //\n\n/**\n* Pads a token with zeros to the specified width.\n*\n* @private\n* @param {string} str - token argument\n* @param {number} width - token width\n* @param {boolean} [right=false] - boolean indicating whether to pad to the right\n* @returns {string} padded token argument\n*/\nfunction zeroPad( str, width, right ) {\n\tvar negative = false;\n\tvar pad = width - str.length;\n\tif ( pad < 0 ) {\n\t\treturn str;\n\t}\n\tif ( startsWithMinus( str ) ) {\n\t\tnegative = true;\n\t\tstr = str.substr( 1 );\n\t}\n\tstr = ( right ) ?\n\t\tstr + zeros( pad ) :\n\t\tzeros( pad ) + str;\n\tif ( negative ) {\n\t\tstr = '-' + str;\n\t}\n\treturn str;\n}\n\n\n// EXPORTS //\n\nexport default zeroPad;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isNumber from './is_number.js';\nimport zeroPad from './zero_pad.js';\n\n// NOTE: for the following, we explicitly avoid using stdlib packages in this particular package in order to avoid circular dependencies.\nvar lowercase = String.prototype.toLowerCase;\nvar uppercase = String.prototype.toUpperCase;\n\n\n// MAIN //\n\n/**\n* Formats a token object argument as an integer.\n*\n* @private\n* @param {Object} token - token object\n* @throws {Error} must provide a valid integer\n* @returns {string} formatted token argument\n*/\nfunction formatInteger( token ) {\n\tvar base;\n\tvar out;\n\tvar i;\n\n\tswitch ( token.specifier ) {\n\tcase 'b':\n\t\t// Case: %b (binary)\n\t\tbase = 2;\n\t\tbreak;\n\tcase 'o':\n\t\t// Case: %o (octal)\n\t\tbase = 8;\n\t\tbreak;\n\tcase 'x':\n\tcase 'X':\n\t\t// Case: %x, %X (hexadecimal)\n\t\tbase = 16;\n\t\tbreak;\n\tcase 'd':\n\tcase 'i':\n\tcase 'u':\n\tdefault:\n\t\t// Case: %d, %i, %u (decimal)\n\t\tbase = 10;\n\t\tbreak;\n\t}\n\tout = token.arg;\n\ti = parseInt( out, 10 );\n\tif ( !isFinite( i ) ) { // NOTE: We use the global `isFinite` function here instead of `@stdlib/math/base/assert/is-finite` in order to avoid circular dependencies.\n\t\tif ( !isNumber( out ) ) {\n\t\t\tthrow new Error( 'invalid integer. Value: ' + out );\n\t\t}\n\t\ti = 0;\n\t}\n\tif ( i < 0 && ( token.specifier === 'u' || base !== 10 ) ) {\n\t\ti = 0xffffffff + i + 1;\n\t}\n\tif ( i < 0 ) {\n\t\tout = ( -i ).toString( base );\n\t\tif ( token.precision ) {\n\t\t\tout = zeroPad( out, token.precision, token.padRight );\n\t\t}\n\t\tout = '-' + out;\n\t} else {\n\t\tout = i.toString( base );\n\t\tif ( !i && !token.precision ) {\n\t\t\tout = '';\n\t\t} else if ( token.precision ) {\n\t\t\tout = zeroPad( out, token.precision, token.padRight );\n\t\t}\n\t\tif ( token.sign ) {\n\t\t\tout = token.sign + out;\n\t\t}\n\t}\n\tif ( base === 16 ) {\n\t\tif ( token.alternate ) {\n\t\t\tout = '0x' + out;\n\t\t}\n\t\tout = ( token.specifier === uppercase.call( token.specifier ) ) ?\n\t\t\tuppercase.call( out ) :\n\t\t\tlowercase.call( out );\n\t}\n\tif ( base === 8 ) {\n\t\tif ( token.alternate && out.charAt( 0 ) !== '0' ) {\n\t\t\tout = '0' + out;\n\t\t}\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default formatInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Tests if a value is a string primitive.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a string primitive\n*\n* @example\n* var bool = isString( 'beep' );\n* // returns true\n*\n* @example\n* var bool = isString( new String( 'beep' ) );\n* // returns false\n*/\nfunction isString( value ) {\n\treturn ( typeof value === 'string' ); // NOTE: we inline the `isString.isPrimitive` function from `@stdlib/assert/is-string` in order to avoid circular dependencies.\n}\n\n\n// EXPORTS //\n\nexport default isString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isNumber from './is_number.js';\n\n// NOTE: for the following, we explicitly avoid using stdlib packages in this particular package in order to avoid circular dependencies.\nvar abs = Math.abs; // eslint-disable-line stdlib/no-builtin-math\nvar lowercase = String.prototype.toLowerCase;\nvar uppercase = String.prototype.toUpperCase;\nvar replace = String.prototype.replace;\n\n\n// VARIABLES //\n\nvar RE_EXP_POS_DIGITS = /e\\+(\\d)$/;\nvar RE_EXP_NEG_DIGITS = /e-(\\d)$/;\nvar RE_ONLY_DIGITS = /^(\\d+)$/;\nvar RE_DIGITS_BEFORE_EXP = /^(\\d+)e/;\nvar RE_TRAILING_PERIOD_ZERO = /\\.0$/;\nvar RE_PERIOD_ZERO_EXP = /\\.0*e/;\nvar RE_ZERO_BEFORE_EXP = /(\\..*[^0])0*e/;\n\n\n// MAIN //\n\n/**\n* Formats a token object argument as a floating-point number.\n*\n* @private\n* @param {Object} token - token object\n* @throws {Error} must provide a valid floating-point number\n* @returns {string} formatted token argument\n*/\nfunction formatDouble( token ) {\n\tvar digits;\n\tvar out;\n\tvar f = parseFloat( token.arg );\n\tif ( !isFinite( f ) ) { // NOTE: We use the global `isFinite` function here instead of `@stdlib/math/base/assert/is-finite` in order to avoid circular dependencies.\n\t\tif ( !isNumber( token.arg ) ) {\n\t\t\tthrow new Error( 'invalid floating-point number. Value: ' + out );\n\t\t}\n\t\t// Case: NaN, Infinity, or -Infinity\n\t\tf = token.arg;\n\t}\n\tswitch ( token.specifier ) {\n\tcase 'e':\n\tcase 'E':\n\t\tout = f.toExponential( token.precision );\n\t\tbreak;\n\tcase 'f':\n\tcase 'F':\n\t\tout = f.toFixed( token.precision );\n\t\tbreak;\n\tcase 'g':\n\tcase 'G':\n\t\tif ( abs( f ) < 0.0001 ) {\n\t\t\tdigits = token.precision;\n\t\t\tif ( digits > 0 ) {\n\t\t\t\tdigits -= 1;\n\t\t\t}\n\t\t\tout = f.toExponential( digits );\n\t\t} else {\n\t\t\tout = f.toPrecision( token.precision );\n\t\t}\n\t\tif ( !token.alternate ) {\n\t\t\tout = replace.call( out, RE_ZERO_BEFORE_EXP, '$1e' );\n\t\t\tout = replace.call( out, RE_PERIOD_ZERO_EXP, 'e');\n\t\t\tout = replace.call( out, RE_TRAILING_PERIOD_ZERO, '' );\n\t\t}\n\t\tbreak;\n\tdefault:\n\t\tthrow new Error( 'invalid double notation. Value: ' + token.specifier );\n\t}\n\tout = replace.call( out, RE_EXP_POS_DIGITS, 'e+0$1' );\n\tout = replace.call( out, RE_EXP_NEG_DIGITS, 'e-0$1' );\n\tif ( token.alternate ) {\n\t\tout = replace.call( out, RE_ONLY_DIGITS, '$1.' );\n\t\tout = replace.call( out, RE_DIGITS_BEFORE_EXP, '$1.e' );\n\t}\n\tif ( f >= 0 && token.sign ) {\n\t\tout = token.sign + out;\n\t}\n\tout = ( token.specifier === uppercase.call( token.specifier ) ) ?\n\t\tuppercase.call( out ) :\n\t\tlowercase.call( out );\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default formatDouble;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// FUNCTIONS //\n\n/**\n* Returns `n` spaces.\n*\n* @private\n* @param {number} n - number of spaces\n* @returns {string} string of spaces\n*/\nfunction spaces( n ) {\n\tvar out = '';\n\tvar i;\n\tfor ( i = 0; i < n; i++ ) {\n\t\tout += ' ';\n\t}\n\treturn out;\n}\n\n\n// MAIN //\n\n/**\n* Pads a token with spaces to the specified width.\n*\n* @private\n* @param {string} str - token argument\n* @param {number} width - token width\n* @param {boolean} [right=false] - boolean indicating whether to pad to the right\n* @returns {string} padded token argument\n*/\nfunction spacePad( str, width, right ) {\n\tvar pad = width - str.length;\n\tif ( pad < 0 ) {\n\t\treturn str;\n\t}\n\tstr = ( right ) ?\n\t\tstr + spaces( pad ) :\n\t\tspaces( pad ) + str;\n\treturn str;\n}\n\n\n// EXPORTS //\n\nexport default spacePad;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport formatInteger from './format_integer.js';\nimport isString from './is_string.js';\nimport formatDouble from './format_double.js';\nimport spacePad from './space_pad.js';\nimport zeroPad from './zero_pad.js';\n\n\n// VARIABLES //\n\nvar fromCharCode = String.fromCharCode;\nvar isnan = isNaN; // NOTE: We use the global `isNaN` function here instead of `@stdlib/math/base/assert/is-nan` to avoid circular dependencies.\nvar isArray = Array.isArray; // NOTE: We use the global `Array.isArray` function here instead of `@stdlib/assert/is-array` to avoid circular dependencies.\n\n\n// FUNCTIONS //\n\n/**\n* Initializes token object with properties of supplied format identifier object or default values if not present.\n*\n* @private\n* @param {Object} token - format identifier object\n* @returns {Object} token object\n*/\nfunction initialize( token ) {\n\tvar out = {};\n\tout.specifier = token.specifier;\n\tout.precision = ( token.precision === void 0 ) ? 1 : token.precision;\n\tout.width = token.width;\n\tout.flags = token.flags || '';\n\tout.mapping = token.mapping;\n\treturn out;\n}\n\n\n// MAIN //\n\n/**\n* Generates string from a token array by interpolating values.\n*\n* @param {Array} tokens - string parts and format identifier objects\n* @param {Array} ...args - variable values\n* @throws {TypeError} first argument must be an array\n* @throws {Error} invalid flags\n* @returns {string} formatted string\n*\n* @example\n* var tokens = [ 'beep ', { 'specifier': 's' } ];\n* var out = formatInterpolate( tokens, 'boop' );\n* // returns 'beep boop'\n*/\nfunction formatInterpolate( tokens ) {\n\tvar hasPeriod;\n\tvar flags;\n\tvar token;\n\tvar flag;\n\tvar num;\n\tvar out;\n\tvar pos;\n\tvar i;\n\tvar j;\n\n\tif ( !isArray( tokens ) ) {\n\t\tthrow new TypeError( 'invalid argument. First argument must be an array. Value: `' + tokens + '`.' );\n\t}\n\tout = '';\n\tpos = 1;\n\tfor ( i = 0; i < tokens.length; i++ ) {\n\t\ttoken = tokens[ i ];\n\t\tif ( isString( token ) ) {\n\t\t\tout += token;\n\t\t} else {\n\t\t\thasPeriod = token.precision !== void 0;\n\t\t\ttoken = initialize( token );\n\t\t\tif ( !token.specifier ) {\n\t\t\t\tthrow new TypeError( 'invalid argument. Token is missing `specifier` property. Index: `'+ i +'`. Value: `' + token + '`.' );\n\t\t\t}\n\t\t\tif ( token.mapping ) {\n\t\t\t\tpos = token.mapping;\n\t\t\t}\n\t\t\tflags = token.flags;\n\t\t\tfor ( j = 0; j < flags.length; j++ ) {\n\t\t\t\tflag = flags.charAt( j );\n\t\t\t\tswitch ( flag ) {\n\t\t\t\tcase ' ':\n\t\t\t\t\ttoken.sign = ' ';\n\t\t\t\t\tbreak;\n\t\t\t\tcase '+':\n\t\t\t\t\ttoken.sign = '+';\n\t\t\t\t\tbreak;\n\t\t\t\tcase '-':\n\t\t\t\t\ttoken.padRight = true;\n\t\t\t\t\ttoken.padZeros = false;\n\t\t\t\t\tbreak;\n\t\t\t\tcase '0':\n\t\t\t\t\ttoken.padZeros = flags.indexOf( '-' ) < 0; // NOTE: We use built-in `Array.prototype.indexOf` here instead of `@stdlib/assert/contains` in order to avoid circular dependencies.\n\t\t\t\t\tbreak;\n\t\t\t\tcase '#':\n\t\t\t\t\ttoken.alternate = true;\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tthrow new Error( 'invalid flag: ' + flag );\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( token.width === '*' ) {\n\t\t\t\ttoken.width = parseInt( arguments[ pos ], 10 );\n\t\t\t\tpos += 1;\n\t\t\t\tif ( isnan( token.width ) ) {\n\t\t\t\t\tthrow new TypeError( 'the argument for * width at position ' + pos + ' is not a number. Value: `' + token.width + '`.' );\n\t\t\t\t}\n\t\t\t\tif ( token.width < 0 ) {\n\t\t\t\t\ttoken.padRight = true;\n\t\t\t\t\ttoken.width = -token.width;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( hasPeriod ) {\n\t\t\t\tif ( token.precision === '*' ) {\n\t\t\t\t\ttoken.precision = parseInt( arguments[ pos ], 10 );\n\t\t\t\t\tpos += 1;\n\t\t\t\t\tif ( isnan( token.precision ) ) {\n\t\t\t\t\t\tthrow new TypeError( 'the argument for * precision at position ' + pos + ' is not a number. Value: `' + token.precision + '`.' );\n\t\t\t\t\t}\n\t\t\t\t\tif ( token.precision < 0 ) {\n\t\t\t\t\t\ttoken.precision = 1;\n\t\t\t\t\t\thasPeriod = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\ttoken.arg = arguments[ pos ];\n\t\t\tswitch ( token.specifier ) {\n\t\t\tcase 'b':\n\t\t\tcase 'o':\n\t\t\tcase 'x':\n\t\t\tcase 'X':\n\t\t\tcase 'd':\n\t\t\tcase 'i':\n\t\t\tcase 'u':\n\t\t\t\t// Case: %b (binary), %o (octal), %x, %X (hexadecimal), %d, %i (decimal), %u (unsigned decimal)\n\t\t\t\tif ( hasPeriod ) {\n\t\t\t\t\ttoken.padZeros = false;\n\t\t\t\t}\n\t\t\t\ttoken.arg = formatInteger( token );\n\t\t\t\tbreak;\n\t\t\tcase 's':\n\t\t\t\t// Case: %s (string)\n\t\t\t\ttoken.maxWidth = ( hasPeriod ) ? token.precision : -1;\n\t\t\t\tbreak;\n\t\t\tcase 'c':\n\t\t\t\t// Case: %c (character)\n\t\t\t\tif ( !isnan( token.arg ) ) {\n\t\t\t\t\tnum = parseInt( token.arg, 10 );\n\t\t\t\t\tif ( num < 0 || num > 127 ) {\n\t\t\t\t\t\tthrow new Error( 'invalid character code. Value: ' + token.arg );\n\t\t\t\t\t}\n\t\t\t\t\ttoken.arg = ( isnan( num ) ) ?\n\t\t\t\t\t\tString( token.arg ) :\n\t\t\t\t\t\tfromCharCode( num );\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'e':\n\t\t\tcase 'E':\n\t\t\tcase 'f':\n\t\t\tcase 'F':\n\t\t\tcase 'g':\n\t\t\tcase 'G':\n\t\t\t\t// Case: %e, %E (scientific notation), %f, %F (decimal floating point), %g, %G (uses the shorter of %e/E or %f/F)\n\t\t\t\tif ( !hasPeriod ) {\n\t\t\t\t\ttoken.precision = 6;\n\t\t\t\t}\n\t\t\t\ttoken.arg = formatDouble( token );\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tthrow new Error( 'invalid specifier: ' + token.specifier );\n\t\t\t}\n\t\t\t// Fit argument into field width...\n\t\t\tif ( token.maxWidth >= 0 && token.arg.length > token.maxWidth ) {\n\t\t\t\ttoken.arg = token.arg.substring( 0, token.maxWidth );\n\t\t\t}\n\t\t\tif ( token.padZeros ) {\n\t\t\t\ttoken.arg = zeroPad( token.arg, token.width || token.precision, token.padRight ); // eslint-disable-line max-len\n\t\t\t} else if ( token.width ) {\n\t\t\t\ttoken.arg = spacePad( token.arg, token.width, token.padRight );\n\t\t\t}\n\t\t\tout += token.arg || '';\n\t\t\tpos += 1;\n\t\t}\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default formatInterpolate;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// VARIABLES //\n\nvar RE = /%(?:([1-9]\\d*)\\$)?([0 +\\-#]*)(\\*|\\d+)?(?:(\\.)(\\*|\\d+)?)?[hlL]?([%A-Za-z])/g;\n\n\n// FUNCTIONS //\n\n/**\n* Parses a delimiter.\n*\n* @private\n* @param {Array} match - regular expression match\n* @returns {Object} delimiter token object\n*/\nfunction parse( match ) {\n\tvar token = {\n\t\t'mapping': ( match[ 1 ] ) ? parseInt( match[ 1 ], 10 ) : void 0,\n\t\t'flags': match[ 2 ],\n\t\t'width': match[ 3 ],\n\t\t'precision': match[ 5 ],\n\t\t'specifier': match[ 6 ]\n\t};\n\tif ( match[ 4 ] === '.' && match[ 5 ] === void 0 ) {\n\t\ttoken.precision = '1';\n\t}\n\treturn token;\n}\n\n\n// MAIN //\n\n/**\n* Tokenizes a string into an array of string parts and format identifier objects.\n*\n* @param {string} str - input string\n* @returns {Array} tokens\n*\n* @example\n* var tokens = formatTokenize( 'Hello %s!' );\n* // returns [ 'Hello ', {...}, '!' ]\n*/\nfunction formatTokenize( str ) {\n\tvar content;\n\tvar tokens;\n\tvar match;\n\tvar prev;\n\n\ttokens = [];\n\tprev = 0;\n\tmatch = RE.exec( str );\n\twhile ( match ) {\n\t\tcontent = str.slice( prev, RE.lastIndex - match[ 0 ].length );\n\t\tif ( content.length ) {\n\t\t\ttokens.push( content );\n\t\t}\n\t\ttokens.push( parse( match ) );\n\t\tprev = RE.lastIndex;\n\t\tmatch = RE.exec( str );\n\t}\n\tcontent = str.slice( prev );\n\tif ( content.length ) {\n\t\ttokens.push( content );\n\t}\n\treturn tokens;\n}\n\n\n// EXPORTS //\n\nexport default formatTokenize;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Tests if a value is a string primitive.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a string primitive\n*\n* @example\n* var bool = isString( 'beep' );\n* // returns true\n*\n* @example\n* var bool = isString( new String( 'beep' ) );\n* // returns false\n*/\nfunction isString( value ) {\n\treturn ( typeof value === 'string' ); // NOTE: we inline the `isString.isPrimitive` function from `@stdlib/assert/is-string` in order to avoid circular dependencies.\n}\n\n\n// EXPORTS //\n\nexport default isString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport interpolate from '@stdlib/string-base-format-interpolate';\nimport tokenize from '@stdlib/string-base-format-tokenize';\nimport isString from './is_string.js';\n\n\n// MAIN //\n\n/**\n* Inserts supplied variable values into a format string.\n*\n* @param {string} str - input string\n* @param {Array} ...args - variable values\n* @throws {TypeError} first argument must be a string\n* @throws {Error} invalid flags\n* @returns {string} formatted string\n*\n* @example\n* var str = format( 'Hello %s!', 'world' );\n* // returns 'Hello world!'\n*\n* @example\n* var str = format( 'Pi: ~%.2f', 3.141592653589793 );\n* // returns 'Pi: ~3.14'\n*/\nfunction format( str ) {\n\tvar tokens;\n\tvar args;\n\tvar i;\n\n\tif ( !isString( str ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a string. Value: `%s`.', str ) );\n\t}\n\ttokens = tokenize( str );\n\targs = new Array( arguments.length );\n\targs[ 0 ] = tokens;\n\tfor ( i = 1; i < args.length; i++ ) {\n\t\targs[ i ] = arguments[ i ];\n\t}\n\treturn interpolate.apply( null, args );\n}\n\n\n// EXPORTS //\n\nexport default format;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable no-underscore-dangle, no-proto */\n\n'use strict';\n\n// MODULES //\n\nimport format from '@stdlib/string-format';\n\n\n// VARIABLES //\n\nvar objectProtoype = Object.prototype;\nvar toStr = objectProtoype.toString;\nvar defineGetter = objectProtoype.__defineGetter__;\nvar defineSetter = objectProtoype.__defineSetter__;\nvar lookupGetter = objectProtoype.__lookupGetter__;\nvar lookupSetter = objectProtoype.__lookupSetter__;\n\n\n// MAIN //\n\n/**\n* Defines (or modifies) an object property.\n*\n* ## Notes\n*\n* - Property descriptors come in two flavors: **data descriptors** and **accessor descriptors**. A data descriptor is a property that has a value, which may or may not be writable. An accessor descriptor is a property described by a getter-setter function pair. A descriptor must be one of these two flavors and cannot be both.\n*\n* @param {Object} obj - object on which to define the property\n* @param {string} prop - property name\n* @param {Object} descriptor - property descriptor\n* @param {boolean} [descriptor.configurable=false] - boolean indicating if property descriptor can be changed and if the property can be deleted from the provided object\n* @param {boolean} [descriptor.enumerable=false] - boolean indicating if the property shows up when enumerating object properties\n* @param {boolean} [descriptor.writable=false] - boolean indicating if the value associated with the property can be changed with an assignment operator\n* @param {*} [descriptor.value] - property value\n* @param {(Function|void)} [descriptor.get=undefined] - function which serves as a getter for the property, or, if no getter, undefined. When the property is accessed, a getter function is called without arguments and with the `this` context set to the object through which the property is accessed (which may not be the object on which the property is defined due to inheritance). The return value will be used as the property value.\n* @param {(Function|void)} [descriptor.set=undefined] - function which serves as a setter for the property, or, if no setter, undefined. When assigning a property value, a setter function is called with one argument (the value being assigned to the property) and with the `this` context set to the object through which the property is assigned.\n* @throws {TypeError} first argument must be an object\n* @throws {TypeError} third argument must be an object\n* @throws {Error} property descriptor cannot have both a value and a setter and/or getter\n* @returns {Object} object with added property\n*\n* @example\n* var obj = {};\n*\n* defineProperty( obj, 'foo', {\n* 'value': 'bar'\n* });\n*\n* var str = obj.foo;\n* // returns 'bar'\n*/\nfunction defineProperty( obj, prop, descriptor ) {\n\tvar prototype;\n\tvar hasValue;\n\tvar hasGet;\n\tvar hasSet;\n\n\tif ( typeof obj !== 'object' || obj === null || toStr.call( obj ) === '[object Array]' ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be an object. Value: `%s`.', obj ) );\n\t}\n\tif ( typeof descriptor !== 'object' || descriptor === null || toStr.call( descriptor ) === '[object Array]' ) {\n\t\tthrow new TypeError( format( 'invalid argument. Property descriptor must be an object. Value: `%s`.', descriptor ) );\n\t}\n\thasValue = ( 'value' in descriptor );\n\tif ( hasValue ) {\n\t\tif (\n\t\t\tlookupGetter.call( obj, prop ) ||\n\t\t\tlookupSetter.call( obj, prop )\n\t\t) {\n\t\t\t// Override `__proto__` to avoid touching inherited accessors:\n\t\t\tprototype = obj.__proto__;\n\t\t\tobj.__proto__ = objectProtoype;\n\n\t\t\t// Delete property as existing getters/setters prevent assigning value to specified property:\n\t\t\tdelete obj[ prop ];\n\t\t\tobj[ prop ] = descriptor.value;\n\n\t\t\t// Restore original prototype:\n\t\t\tobj.__proto__ = prototype;\n\t\t} else {\n\t\t\tobj[ prop ] = descriptor.value;\n\t\t}\n\t}\n\thasGet = ( 'get' in descriptor );\n\thasSet = ( 'set' in descriptor );\n\n\tif ( hasValue && ( hasGet || hasSet ) ) {\n\t\tthrow new Error( 'invalid argument. Cannot specify one or more accessors and a value or writable attribute in the property descriptor.' );\n\t}\n\n\tif ( hasGet && defineGetter ) {\n\t\tdefineGetter.call( obj, prop, descriptor.get );\n\t}\n\tif ( hasSet && defineSetter ) {\n\t\tdefineSetter.call( obj, prop, descriptor.set );\n\t}\n\treturn obj;\n}\n\n\n// EXPORTS //\n\nexport default defineProperty;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Define (or modify) an object property.\n*\n* @module @stdlib/utils-define-property\n*\n* @example\n* import defineProperty from '@stdlib/utils-define-property';\n*\n* var obj = {};\n* defineProperty( obj, 'foo', {\n* 'value': 'bar',\n* 'writable': false,\n* 'configurable': false,\n* 'enumerable': false\n* });\n* obj.foo = 'boop'; // => throws\n*/\n\n// MODULES //\n\nimport hasDefinePropertySupport from './has_define_property_support.js';\nimport builtin from './builtin.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar defineProperty;\nif ( hasDefinePropertySupport() ) {\n\tdefineProperty = builtin;\n} else {\n\tdefineProperty = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default defineProperty;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport defineProperty from './define_property.js';\n\n\n// MAIN //\n\n/**\n* Tests for `Object.defineProperty` support.\n*\n* @private\n* @returns {boolean} boolean indicating if an environment has `Object.defineProperty` support\n*\n* @example\n* var bool = hasDefinePropertySupport();\n* // returns \n*/\nfunction hasDefinePropertySupport() {\n\t// Test basic support...\n\ttry {\n\t\tdefineProperty( {}, 'x', {} );\n\t\treturn true;\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\treturn false;\n\t}\n}\n\n\n// EXPORTS //\n\nexport default hasDefinePropertySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport defineProperty from '@stdlib/utils-define-property';\n\n\n// MAIN //\n\n/**\n* Defines a non-enumerable read-only property.\n*\n* @param {Object} obj - object on which to define the property\n* @param {(string|symbol)} prop - property name\n* @param {*} value - value to set\n*\n* @example\n* var obj = {};\n*\n* setNonEnumerableReadOnly( obj, 'foo', 'bar' );\n*\n* try {\n* obj.foo = 'boop';\n* } catch ( err ) {\n* console.error( err.message );\n* }\n*/\nfunction setNonEnumerableReadOnly( obj, prop, value ) {\n\tdefineProperty( obj, prop, {\n\t\t'configurable': false,\n\t\t'enumerable': false,\n\t\t'writable': false,\n\t\t'value': value\n\t});\n}\n\n\n// EXPORTS //\n\nexport default setNonEnumerableReadOnly;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Tests if a value is a number primitive.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number primitive\n*\n* @example\n* var bool = isNumber( 3.14 );\n* // returns true\n*\n* @example\n* var bool = isNumber( NaN );\n* // returns true\n*\n* @example\n* var bool = isNumber( new Number( 3.14 ) );\n* // returns false\n*/\nfunction isNumber( value ) {\n\treturn ( typeof value === 'number' );\n}\n\n\n// EXPORTS //\n\nexport default isNumber;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport hasSymbols from '@stdlib/assert-has-symbol-support';\n\n\n// VARIABLES //\n\nvar FLG = hasSymbols();\n\n\n// MAIN //\n\n/**\n* Tests for native `toStringTag` support.\n*\n* @returns {boolean} boolean indicating if an environment has `toStringTag` support\n*\n* @example\n* var bool = hasToStringTagSupport();\n* // returns \n*/\nfunction hasToStringTagSupport() {\n\treturn ( FLG && typeof Symbol.toStringTag === 'symbol' );\n}\n\n\n// EXPORTS //\n\nexport default hasToStringTagSupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Tests for native `Symbol` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Symbol` support\n*\n* @example\n* var bool = hasSymbolSupport();\n* // returns \n*/\nfunction hasSymbolSupport() {\n\treturn (\n\t\ttypeof Symbol === 'function' &&\n\t\ttypeof Symbol( 'foo' ) === 'symbol'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default hasSymbolSupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar toStr = Object.prototype.toString;\n\n\n// EXPORTS //\n\nexport default toStr;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// FUNCTIONS //\n\nvar has = Object.prototype.hasOwnProperty;\n\n\n// MAIN //\n\n/**\n* Tests if an object has a specified property.\n*\n* @param {*} value - value to test\n* @param {*} property - property to test\n* @returns {boolean} boolean indicating if an object has a specified property\n*\n* @example\n* var beep = {\n* 'boop': true\n* };\n*\n* var bool = hasOwnProp( beep, 'boop' );\n* // returns true\n*\n* @example\n* var beep = {\n* 'boop': true\n* };\n*\n* var bool = hasOwnProp( beep, 'bap' );\n* // returns false\n*/\nfunction hasOwnProp( value, property ) {\n\tif (\n\t\tvalue === void 0 ||\n\t\tvalue === null\n\t) {\n\t\treturn false;\n\t}\n\treturn has.call( value, property );\n}\n\n\n// EXPORTS //\n\nexport default hasOwnProp;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar Sym = ( typeof Symbol === 'function' ) ? Symbol : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default Sym;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport Symbol from '@stdlib/symbol-ctor';\n\n\n// MAIN //\n\nvar toStrTag = ( typeof Symbol === 'function' ) ? Symbol.toStringTag : '';\n\n\n// EXPORTS //\n\nexport default toStrTag;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Return a string value indicating a specification defined classification of an object.\n*\n* @module @stdlib/utils-native-class\n*\n* @example\n* import nativeClass from '@stdlib/utils-native-class';\n*\n* var str = nativeClass( 'a' );\n* // returns '[object String]'\n*\n* str = nativeClass( 5 );\n* // returns '[object Number]'\n*\n* function Beep() {\n* return this;\n* }\n* str = nativeClass( new Beep() );\n* // returns '[object Object]'\n*/\n\n// MODULES //\n\nimport hasToStringTag from '@stdlib/assert-has-tostringtag-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar main;\nif ( hasToStringTag() ) {\n\tmain = polyfill;\n} else {\n\tmain = builtin;\n}\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport hasOwnProp from '@stdlib/assert-has-own-property';\nimport toStringTag from './tostringtag.js';\nimport toStr from './tostring.js';\n\n\n// MAIN //\n\n/**\n* Returns a string value indicating a specification defined classification of an object in environments supporting `Symbol.toStringTag`.\n*\n* @param {*} v - input value\n* @returns {string} string value indicating a specification defined classification of the input value\n*\n* @example\n* var str = nativeClass( 'a' );\n* // returns '[object String]'\n*\n* @example\n* var str = nativeClass( 5 );\n* // returns '[object Number]'\n*\n* @example\n* function Beep() {\n* return this;\n* }\n* var str = nativeClass( new Beep() );\n* // returns '[object Object]'\n*/\nfunction nativeClass( v ) {\n\tvar isOwn;\n\tvar tag;\n\tvar out;\n\n\tif ( v === null || v === void 0 ) {\n\t\treturn toStr.call( v );\n\t}\n\ttag = v[ toStringTag ];\n\tisOwn = hasOwnProp( v, toStringTag );\n\n\t// Attempt to override the `toStringTag` property. For built-ins having a `Symbol.toStringTag` property (e.g., `JSON`, `Math`, etc), the `Symbol.toStringTag` property is read-only (e.g., , so we need to wrap in a `try/catch`.\n\ttry {\n\t\tv[ toStringTag ] = void 0;\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\treturn toStr.call( v );\n\t}\n\tout = toStr.call( v );\n\n\tif ( isOwn ) {\n\t\tv[ toStringTag ] = tag;\n\t} else {\n\t\tdelete v[ toStringTag ];\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default nativeClass;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport toStr from './tostring.js';\n\n\n// MAIN //\n\n/**\n* Returns a string value indicating a specification defined classification (via the internal property `[[Class]]`) of an object.\n*\n* @param {*} v - input value\n* @returns {string} string value indicating a specification defined classification of the input value\n*\n* @example\n* var str = nativeClass( 'a' );\n* // returns '[object String]'\n*\n* @example\n* var str = nativeClass( 5 );\n* // returns '[object Number]'\n*\n* @example\n* function Beep() {\n* return this;\n* }\n* var str = nativeClass( new Beep() );\n* // returns '[object Object]'\n*/\nfunction nativeClass( v ) {\n\treturn toStr.call( v );\n}\n\n\n// EXPORTS //\n\nexport default nativeClass;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// EXPORTS //\n\nexport default Number; // eslint-disable-line stdlib/require-globals\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport Number from '@stdlib/number-ctor';\n\n\n// MAIN //\n\n// eslint-disable-next-line stdlib/no-redeclare\nvar toString = Number.prototype.toString; // non-generic\n\n\n// EXPORTS //\n\nexport default toString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport hasToStringTag from '@stdlib/assert-has-tostringtag-support';\nimport nativeClass from '@stdlib/utils-native-class';\nimport Number from '@stdlib/number-ctor';\nimport test from './try2serialize.js';\n\n\n// VARIABLES //\n\nvar FLG = hasToStringTag();\n\n\n// MAIN //\n\n/**\n* Tests if a value is a number object.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number object\n*\n* @example\n* var bool = isNumber( 3.14 );\n* // returns false\n*\n* @example\n* var bool = isNumber( new Number( 3.14 ) );\n* // returns true\n*/\nfunction isNumber( value ) {\n\tif ( typeof value === 'object' ) {\n\t\tif ( value instanceof Number ) {\n\t\t\treturn true;\n\t\t}\n\t\tif ( FLG ) {\n\t\t\treturn test( value );\n\t\t}\n\t\treturn ( nativeClass( value ) === '[object Number]' );\n\t}\n\treturn false;\n}\n\n\n// EXPORTS //\n\nexport default isNumber;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport toString from './tostring.js'; // eslint-disable-line stdlib/no-redeclare\n\n\n// MAIN //\n\n/**\n* Attempts to serialize a value to a string.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value can be serialized\n*/\nfunction test( value ) {\n\ttry {\n\t\ttoString.call( value );\n\t\treturn true;\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\treturn false;\n\t}\n}\n\n\n// EXPORTS //\n\nexport default test;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a number.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a number\n*\n* @example\n* var bool = isNumber( 3.14 );\n* // returns true\n*\n* @example\n* var bool = isNumber( new Number( 3.14 ) );\n* // returns true\n*\n* @example\n* var bool = isNumber( NaN );\n* // returns true\n*\n* @example\n* var bool = isNumber( null );\n* // returns false\n*/\nfunction isNumber( value ) {\n\treturn ( isPrimitive( value ) || isObject( value ) );\n}\n\n\n// EXPORTS //\n\nexport default isNumber;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test if a value is a number.\n*\n* @module @stdlib/assert-is-number\n*\n* @example\n* import isNumber from '@stdlib/assert-is-number';\n*\n* var bool = isNumber( 3.14 );\n* // returns true\n*\n* bool = isNumber( new Number( 3.14 ) );\n* // returns true\n*\n* bool = isNumber( NaN );\n* // returns true\n*\n* bool = isNumber( null );\n* // returns false\n*\n* @example\n* import { isPrimitive as isNumber } from '@stdlib/assert-is-number';\n*\n* var bool = isNumber( 3.14 );\n* // returns true\n*\n* bool = isNumber( NaN );\n* // returns true\n*\n* bool = isNumber( new Number( 3.14 ) );\n* // returns false\n*\n* @example\n* import { isObject as isNumber } from '@stdlib/assert-is-number';\n*\n* var bool = isNumber( 3.14 );\n* // returns false\n*\n* bool = isNumber( new Number( 3.14 ) );\n* // returns true\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'isPrimitive', isPrimitive );\nsetReadOnly( main, 'isObject', isObject );\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Double-precision floating-point positive infinity.\n*\n* @module @stdlib/constants-float64-pinf\n* @type {number}\n*\n* @example\n* import FLOAT64_PINF from '@stdlib/constants-float64-pinf';\n* // returns Infinity\n*/\n\n\n// MAIN //\n\n/**\n* Double-precision floating-point positive infinity.\n*\n* ## Notes\n*\n* Double-precision floating-point positive infinity has the bit sequence\n*\n* ```binarystring\n* 0 11111111111 00000000000000000000 00000000000000000000000000000000\n* ```\n*\n* @constant\n* @type {number}\n* @default Number.POSITIVE_INFINITY\n* @see [IEEE 754]{@link https://en.wikipedia.org/wiki/IEEE_754-1985}\n*/\nvar FLOAT64_PINF = Number.POSITIVE_INFINITY; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default FLOAT64_PINF;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Double-precision floating-point negative infinity.\n*\n* @module @stdlib/constants-float64-ninf\n* @type {number}\n*\n* @example\n* import FLOAT64_NINF from '@stdlib/constants-float64-ninf';\n* // returns -Infinity\n*/\n\n// MODULES //\n\nimport Number from '@stdlib/number-ctor';\n\n\n// MAIN //\n\n/**\n* Double-precision floating-point negative infinity.\n*\n* ## Notes\n*\n* Double-precision floating-point negative infinity has the bit sequence\n*\n* ```binarystring\n* 1 11111111111 00000000000000000000 00000000000000000000000000000000\n* ```\n*\n* @constant\n* @type {number}\n* @default Number.NEGATIVE_INFINITY\n* @see [IEEE 754]{@link https://en.wikipedia.org/wiki/IEEE_754-1985}\n*/\nvar FLOAT64_NINF = Number.NEGATIVE_INFINITY;\n\n\n// EXPORTS //\n\nexport default FLOAT64_NINF;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: implementation (?)\n\n/**\n* Rounds a double-precision floating-point number toward negative infinity.\n*\n* @param {number} x - input value\n* @returns {number} rounded value\n*\n* @example\n* var v = floor( -4.2 );\n* // returns -5.0\n*\n* @example\n* var v = floor( 9.99999 );\n* // returns 9.0\n*\n* @example\n* var v = floor( 0.0 );\n* // returns 0.0\n*\n* @example\n* var v = floor( NaN );\n* // returns NaN\n*/\nvar floor = Math.floor; // eslint-disable-line stdlib/no-builtin-math\n\n\n// EXPORTS //\n\nexport default floor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport floor from '@stdlib/math-base-special-floor';\n\n\n// MAIN //\n\n/**\n* Tests if a finite double-precision floating-point number is an integer.\n*\n* @param {number} x - value to test\n* @returns {boolean} boolean indicating whether the value is an integer\n*\n* @example\n* var bool = isInteger( 1.0 );\n* // returns true\n*\n* @example\n* var bool = isInteger( 3.14 );\n* // returns false\n*/\nfunction isInteger( x ) {\n\treturn (floor(x) === x);\n}\n\n\n// EXPORTS //\n\nexport default isInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport PINF from '@stdlib/constants-float64-pinf';\nimport NINF from '@stdlib/constants-float64-ninf';\nimport isInt from '@stdlib/math-base-assert-is-integer';\n\n\n// MAIN //\n\n/**\n* Tests if a number primitive is an integer value.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a number primitive is an integer value\n*/\nfunction isInteger( value ) {\n\treturn (\n\t\tvalue < PINF &&\n\t\tvalue > NINF &&\n\t\tisInt( value )\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isNumber } from '@stdlib/assert-is-number';\nimport isInt from './integer.js';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a number primitive having an integer value.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number primitive having an integer value\n*\n* @example\n* var bool = isInteger( -3.0 );\n* // returns true\n*\n* @example\n* var bool = isInteger( new Number( -3.0 ) );\n* // returns false\n*/\nfunction isInteger( value ) {\n\treturn (\n\t\tisNumber( value ) &&\n\t\tisInt( value )\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isObject as isNumber } from '@stdlib/assert-is-number';\nimport isInt from './integer.js';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a number object having an integer value.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number object having an integer value\n*\n* @example\n* var bool = isInteger( 3.0 );\n* // returns false\n*\n* @example\n* var bool = isInteger( new Number( 3.0 ) );\n* // returns true\n*/\nfunction isInteger( value ) {\n\treturn (\n\t\tisNumber( value ) &&\n\t\tisInt( value.valueOf() )\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\n/**\n* Tests if a value is an integer.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an integer\n*\n* @example\n* var bool = isInteger( 5.0 );\n* // returns true\n*\n* @example\n* var bool = isInteger( new Number( 5.0 ) );\n* // returns true\n*\n* @example\n* var bool = isInteger( -3.14 );\n* // returns false\n*\n* @example\n* var bool = isInteger( null );\n* // returns false\n*/\nfunction isInteger( value ) {\n\treturn ( isPrimitive( value ) || isObject( value ) );\n}\n\n\n// EXPORTS //\n\nexport default isInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isInteger } from '@stdlib/assert-is-integer';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a number primitive having a nonnegative integer value.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number primitive having a nonnegative integer value\n*\n* @example\n* var bool = isNonNegativeInteger( 3.0 );\n* // returns true\n*\n* @example\n* var bool = isNonNegativeInteger( new Number( 3.0 ) );\n* // returns false\n*/\nfunction isNonNegativeInteger( value ) {\n\treturn (\n\t\tisInteger( value ) &&\n\t\tvalue >= 0\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isNonNegativeInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isObject as isInteger } from '@stdlib/assert-is-integer';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a number object having a nonnegative integer value.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number object having a nonnegative integer value\n*\n* @example\n* var bool = isNonNegativeInteger( 3.0 );\n* // returns false\n*\n* @example\n* var bool = isNonNegativeInteger( new Number( 3.0 ) );\n* // returns true\n*/\nfunction isNonNegativeInteger( value ) {\n\treturn (\n\t\tisInteger( value ) &&\n\t\tvalue.valueOf() >= 0\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isNonNegativeInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a nonnegative integer.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a nonnegative integer\n*\n* @example\n* var bool = isNonNegativeInteger( 5.0 );\n* // returns true\n*\n* @example\n* var bool = isNonNegativeInteger( new Number( 5.0 ) );\n* // returns true\n*\n* @example\n* var bool = isNonNegativeInteger( -5.0 );\n* // returns false\n*\n* @example\n* var bool = isNonNegativeInteger( 3.14 );\n* // returns false\n*\n* @example\n* var bool = isNonNegativeInteger( null );\n* // returns false\n*/\nfunction isNonNegativeInteger( value ) {\n\treturn ( isPrimitive( value ) || isObject( value ) );\n}\n\n\n// EXPORTS //\n\nexport default isNonNegativeInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test if a value is an integer.\n*\n* @module @stdlib/assert-is-integer\n*\n* @example\n* import isInteger from '@stdlib/assert-is-integer';\n*\n* var bool = isInteger( 5.0 );\n* // returns true\n*\n* bool = isInteger( new Number( 5.0 ) );\n* // returns true\n*\n* bool = isInteger( -3.14 );\n* // returns false\n*\n* bool = isInteger( null );\n* // returns false\n*\n* @example\n* // Use interface to check for integer primitives...\n* import { isPrimitive as isInteger } from '@stdlib/assert-is-integer';\n*\n* var bool = isInteger( -3.0 );\n* // returns true\n*\n* bool = isInteger( new Number( -3.0 ) );\n* // returns false\n*\n* @example\n* // Use interface to check for integer objects...\n* import { isObject as isInteger } from '@stdlib/assert-is-integer';\n*\n* var bool = isInteger( 3.0 );\n* // returns false\n*\n* bool = isInteger( new Number( 3.0 ) );\n* // returns true\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'isPrimitive', isPrimitive );\nsetReadOnly( main, 'isObject', isObject );\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test if a value is a nonnegative integer.\n*\n* @module @stdlib/assert-is-nonnegative-integer\n*\n* @example\n* import isNonNegativeInteger from '@stdlib/assert-is-nonnegative-integer';\n*\n* var bool = isNonNegativeInteger( 5.0 );\n* // returns true\n*\n* bool = isNonNegativeInteger( new Number( 5.0 ) );\n* // returns true\n*\n* bool = isNonNegativeInteger( -5.0 );\n* // returns false\n*\n* bool = isNonNegativeInteger( 3.14 );\n* // returns false\n*\n* bool = isNonNegativeInteger( null );\n* // returns false\n*\n* @example\n* import { isPrimitive as isNonNegativeInteger } from '@stdlib/assert-is-nonnegative-integer';\n*\n* var bool = isNonNegativeInteger( 3.0 );\n* // returns true\n*\n* bool = isNonNegativeInteger( new Number( 3.0 ) );\n* // returns false\n*\n* @example\n* import { isObject as isNonNegativeInteger } from '@stdlib/assert-is-nonnegative-integer';\n*\n* var bool = isNonNegativeInteger( 3.0 );\n* // returns false\n*\n* bool = isNonNegativeInteger( new Number( 3.0 ) );\n* // returns true\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'isPrimitive', isPrimitive );\nsetReadOnly( main, 'isObject', isObject );\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasFloat64Array = ( typeof Float64Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Float64Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a Float64Array\n*\n* @example\n* var bool = isFloat64Array( new Float64Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isFloat64Array( [] );\n* // returns false\n*/\nfunction isFloat64Array( value ) {\n\treturn (\n\t\t( hasFloat64Array && value instanceof Float64Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Float64Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isFloat64Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Float64Array === 'function' ) ? Float64Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Float64Array === 'function' ) ? Float64Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of double-precision floating-point numbers in the platform byte order.\n*\n* @module @stdlib/array-float64\n*\n* @example\n* import ctor from '@stdlib/array-float64';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasFloat64ArraySupport from '@stdlib/assert-has-float64array-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasFloat64ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isFloat64Array from '@stdlib/assert-is-float64array';\nimport GlobalFloat64Array from './float64array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Float64Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Float64Array` support\n*\n* @example\n* var bool = hasFloat64ArraySupport();\n* // returns \n*/\nfunction hasFloat64ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalFloat64Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = new GlobalFloat64Array( [ 1.0, 3.14, -3.14, NaN ] );\n\t\tbool = (\n\t\t\tisFloat64Array( arr ) &&\n\t\t\tarr[ 0 ] === 1.0 &&\n\t\t\tarr[ 1 ] === 3.14 &&\n\t\t\tarr[ 2 ] === -3.14 &&\n\t\t\tarr[ 3 ] !== arr[ 3 ]\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasFloat64ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of double-precision floating-point numbers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasFloat32Array = ( typeof Float32Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Float32Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a Float32Array\n*\n* @example\n* var bool = isFloat32Array( new Float32Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isFloat32Array( [] );\n* // returns false\n*/\nfunction isFloat32Array( value ) {\n\treturn (\n\t\t( hasFloat32Array && value instanceof Float32Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Float32Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isFloat32Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Float32Array === 'function' ) ? Float32Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Float32Array === 'function' ) ? Float32Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of single-precision floating-point numbers in the platform byte order.\n*\n* @module @stdlib/array-float32\n*\n* @example\n* import ctor from '@stdlib/array-float32';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasFloat32ArraySupport from '@stdlib/assert-has-float32array-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasFloat32ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isFloat32Array from '@stdlib/assert-is-float32array';\nimport PINF from '@stdlib/constants-float64-pinf';\nimport GlobalFloat32Array from './float32array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Float32Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Float32Array` support\n*\n* @example\n* var bool = hasFloat32ArraySupport();\n* // returns \n*/\nfunction hasFloat32ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalFloat32Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = new GlobalFloat32Array( [ 1.0, 3.14, -3.14, 5.0e40 ] );\n\t\tbool = (\n\t\t\tisFloat32Array( arr ) &&\n\t\t\tarr[ 0 ] === 1.0 &&\n\t\t\tarr[ 1 ] === 3.140000104904175 &&\n\t\t\tarr[ 2 ] === -3.140000104904175 &&\n\t\t\tarr[ 3 ] === PINF\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasFloat32ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of single-precision floating-point numbers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasInt16Array = ( typeof Int16Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is an Int16Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an Int16Array\n*\n* @example\n* var bool = isInt16Array( new Int16Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isInt16Array( [] );\n* // returns false\n*/\nfunction isInt16Array( value ) {\n\treturn (\n\t\t( hasInt16Array && value instanceof Int16Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Int16Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isInt16Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum signed 16-bit integer.\n*\n* @module @stdlib/constants-int16-max\n* @type {integer32}\n*\n* @example\n* import INT16_MAX from '@stdlib/constants-int16-max';\n* // returns 32767\n*/\n\n\n// MAIN //\n\n/**\n* Maximum signed 16-bit integer.\n*\n* ## Notes\n*\n* The number has the value\n*\n* ```tex\n* 2^{15} - 1\n* ```\n*\n* which corresponds to the bit sequence\n*\n* ```binarystring\n* 0111111111111111\n* ```\n*\n* @constant\n* @type {integer32}\n* @default 32767\n*/\nvar INT16_MAX = 32767|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default INT16_MAX;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Int16Array === 'function' ) ? Int16Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Int16Array === 'function' ) ? Int16Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of twos-complement 16-bit signed integers in the platform byte order.\n*\n* @module @stdlib/array-int16\n*\n* @example\n* import ctor from '@stdlib/array-int16';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasInt16ArraySupport from '@stdlib/assert-has-int16array-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasInt16ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isInt16Array from '@stdlib/assert-is-int16array';\nimport INT16_MAX from '@stdlib/constants-int16-max';\nimport INT16_MIN from '@stdlib/constants-int16-min';\nimport GlobalInt16Array from './int16array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Int16Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Int16Array` support\n*\n* @example\n* var bool = hasInt16ArraySupport();\n* // returns \n*/\nfunction hasInt16ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalInt16Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = new GlobalInt16Array( [ 1, 3.14, -3.14, INT16_MAX+1 ] );\n\t\tbool = (\n\t\t\tisInt16Array( arr ) &&\n\t\t\tarr[ 0 ] === 1 &&\n\t\t\tarr[ 1 ] === 3 && // truncation\n\t\t\tarr[ 2 ] === -3 && // truncation\n\t\t\tarr[ 3 ] === INT16_MIN // wrap around\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasInt16ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Minimum signed 16-bit integer.\n*\n* @module @stdlib/constants-int16-min\n* @type {integer32}\n*\n* @example\n* import INT16_MIN from '@stdlib/constants-int16-min';\n* // returns -32768\n*/\n\n\n// MAIN //\n\n/**\n* Minimum signed 16-bit integer.\n*\n* ## Notes\n*\n* The number has the value\n*\n* ```tex\n* -(2^{15})\n* ```\n*\n* which corresponds to the two's complement bit sequence\n*\n* ```binarystring\n* 1000000000000000\n* ```\n*\n* @constant\n* @type {integer32}\n* @default -32768\n*/\nvar INT16_MIN = -32768|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default INT16_MIN;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of twos-complement 16-bit signed integers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasInt32Array = ( typeof Int32Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is an Int32Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an Int32Array\n*\n* @example\n* var bool = isInt32Array( new Int32Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isInt32Array( [] );\n* // returns false\n*/\nfunction isInt32Array( value ) {\n\treturn (\n\t\t( hasInt32Array && value instanceof Int32Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Int32Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isInt32Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum signed 32-bit integer.\n*\n* @module @stdlib/constants-int32-max\n* @type {integer32}\n*\n* @example\n* import INT32_MAX from '@stdlib/constants-int32-max';\n* // returns 2147483647\n*/\n\n\n// MAIN //\n\n/**\n* Maximum signed 32-bit integer.\n*\n* ## Notes\n*\n* The number has the value\n*\n* ```tex\n* 2^{31} - 1\n* ```\n*\n* which corresponds to the bit sequence\n*\n* ```binarystring\n* 01111111111111111111111111111111\n* ```\n*\n* @constant\n* @type {integer32}\n* @default 2147483647\n*/\nvar INT32_MAX = 2147483647|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default INT32_MAX;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Int32Array === 'function' ) ? Int32Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Int32Array === 'function' ) ? Int32Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of twos-complement 32-bit signed integers in the platform byte order.\n*\n* @module @stdlib/array-int32\n*\n* @example\n* import ctor from '@stdlib/array-int32';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasInt32ArraySupport from '@stdlib/assert-has-int32array-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasInt32ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isInt32Array from '@stdlib/assert-is-int32array';\nimport INT32_MAX from '@stdlib/constants-int32-max';\nimport INT32_MIN from '@stdlib/constants-int32-min';\nimport GlobalInt32Array from './int32array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Int32Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Int32Array` support\n*\n* @example\n* var bool = hasInt32ArraySupport();\n* // returns \n*/\nfunction hasInt32ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalInt32Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = new GlobalInt32Array( [ 1, 3.14, -3.14, INT32_MAX+1 ] );\n\t\tbool = (\n\t\t\tisInt32Array( arr ) &&\n\t\t\tarr[ 0 ] === 1 &&\n\t\t\tarr[ 1 ] === 3 && // truncation\n\t\t\tarr[ 2 ] === -3 && // truncation\n\t\t\tarr[ 3 ] === INT32_MIN // wrap around\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasInt32ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Minimum signed 32-bit integer.\n*\n* @module @stdlib/constants-int32-min\n* @type {integer32}\n*\n* @example\n* import INT32_MIN from '@stdlib/constants-int32-min';\n* // returns -2147483648\n*/\n\n\n// MAIN //\n\n/**\n* Minimum signed 32-bit integer.\n*\n* ## Notes\n*\n* The number has the value\n*\n* ```tex\n* -(2^{31})\n* ```\n*\n* which corresponds to the two's complement bit sequence\n*\n* ```binarystring\n* 10000000000000000000000000000000\n* ```\n*\n* @constant\n* @type {integer32}\n* @default -2147483648\n*/\nvar INT32_MIN = -2147483648|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default INT32_MIN;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of twos-complement 32-bit signed integers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasInt8Array = ( typeof Int8Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is an Int8Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an Int8Array\n*\n* @example\n* var bool = isInt8Array( new Int8Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isInt8Array( [] );\n* // returns false\n*/\nfunction isInt8Array( value ) {\n\treturn (\n\t\t( hasInt8Array && value instanceof Int8Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Int8Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isInt8Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum signed 8-bit integer.\n*\n* @module @stdlib/constants-int8-max\n* @type {integer32}\n*\n* @example\n* import INT8_MAX from '@stdlib/constants-int8-max';\n* // returns 127\n*/\n\n\n// MAIN //\n\n/**\n* Maximum signed 8-bit integer.\n*\n* ## Notes\n*\n* The number is given by\n*\n* ```tex\n* 2^{7} - 1\n* ```\n*\n* which corresponds to the bit sequence\n*\n* ```binarystring\n* 01111111\n* ```\n*\n* @constant\n* @type {integer32}\n* @default 127\n*/\nvar INT8_MAX = 127|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default INT8_MAX;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Int8Array === 'function' ) ? Int8Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Int8Array === 'function' ) ? Int8Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of twos-complement 8-bit signed integers in the platform byte order.\n*\n* @module @stdlib/array-int8\n*\n* @example\n* import ctor from '@stdlib/array-int8';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasInt8ArraySupport from '@stdlib/assert-has-int8array-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasInt8ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isInt8Array from '@stdlib/assert-is-int8array';\nimport INT8_MAX from '@stdlib/constants-int8-max';\nimport INT8_MIN from '@stdlib/constants-int8-min';\nimport GlobalInt8Array from './int8array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Int8Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Int8Array` support\n*\n* @example\n* var bool = hasInt8ArraySupport();\n* // returns \n*/\nfunction hasInt8ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalInt8Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = new GlobalInt8Array( [ 1, 3.14, -3.14, INT8_MAX+1 ] );\n\t\tbool = (\n\t\t\tisInt8Array( arr ) &&\n\t\t\tarr[ 0 ] === 1 &&\n\t\t\tarr[ 1 ] === 3 && // truncation\n\t\t\tarr[ 2 ] === -3 && // truncation\n\t\t\tarr[ 3 ] === INT8_MIN // wrap around\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasInt8ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Minimum signed 8-bit integer.\n*\n* @module @stdlib/constants-int8-min\n* @type {integer32}\n*\n* @example\n* import INT8_MIN from '@stdlib/constants-int8-min';\n* // returns -128\n*/\n\n\n// MAIN //\n\n/**\n* Minimum signed 8-bit integer.\n*\n* ## Notes\n*\n* The number is given by\n*\n* ```tex\n* -(2^{7})\n* ```\n*\n* which corresponds to the two's complement bit sequence\n*\n* ```binarystring\n* 10000000\n* ```\n*\n* @constant\n* @type {integer32}\n* @default -128\n*/\nvar INT8_MIN = -128|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default INT8_MIN;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of twos-complement 8-bit signed integers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasUint16Array = ( typeof Uint16Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Uint16Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a Uint16Array\n*\n* @example\n* var bool = isUint16Array( new Uint16Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isUint16Array( [] );\n* // returns false\n*/\nfunction isUint16Array( value ) {\n\treturn (\n\t\t( hasUint16Array && value instanceof Uint16Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Uint16Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isUint16Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum unsigned 16-bit integer.\n*\n* @module @stdlib/constants-uint16-max\n* @type {integer32}\n*\n* @example\n* import UINT16_MAX from '@stdlib/constants-uint16-max';\n* // returns 65535\n*/\n\n\n// MAIN //\n\n/**\n* Maximum unsigned 16-bit integer.\n*\n* ## Notes\n*\n* The number has the value\n*\n* ```tex\n* 2^{16} - 1\n* ```\n*\n* which corresponds to the bit sequence\n*\n* ```binarystring\n* 1111111111111111\n* ```\n*\n* @constant\n* @type {integer32}\n* @default 65535\n*/\nvar UINT16_MAX = 65535|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default UINT16_MAX;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Uint16Array === 'function' ) ? Uint16Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Uint16Array === 'function' ) ? Uint16Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of 16-bit unsigned integers in the platform byte order.\n*\n* @module @stdlib/array-uint16\n*\n* @example\n* import ctor from '@stdlib/array-uint16';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasUint16ArraySupport from '@stdlib/assert-has-uint16array-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasUint16ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isUint16Array from '@stdlib/assert-is-uint16array';\nimport UINT16_MAX from '@stdlib/constants-uint16-max';\nimport GlobalUint16Array from './uint16array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Uint16Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Uint16Array` support\n*\n* @example\n* var bool = hasUint16ArraySupport();\n* // returns \n*/\nfunction hasUint16ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalUint16Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = [ 1, 3.14, -3.14, UINT16_MAX+1, UINT16_MAX+2 ];\n\t\tarr = new GlobalUint16Array( arr );\n\t\tbool = (\n\t\t\tisUint16Array( arr ) &&\n\t\t\tarr[ 0 ] === 1 &&\n\t\t\tarr[ 1 ] === 3 && // truncation\n\t\t\tarr[ 2 ] === UINT16_MAX-2 && // truncation and wrap around\n\t\t\tarr[ 3 ] === 0 && // wrap around\n\t\t\tarr[ 4 ] === 1 // wrap around\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasUint16ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of 16-bit unsigned integers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasUint32Array = ( typeof Uint32Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Uint32Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a Uint32Array\n*\n* @example\n* var bool = isUint32Array( new Uint32Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isUint32Array( [] );\n* // returns false\n*/\nfunction isUint32Array( value ) {\n\treturn (\n\t\t( hasUint32Array && value instanceof Uint32Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Uint32Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isUint32Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum unsigned 32-bit integer.\n*\n* @module @stdlib/constants-uint32-max\n* @type {uinteger32}\n*\n* @example\n* import UINT32_MAX from '@stdlib/constants-uint32-max';\n* // returns 4294967295\n*/\n\n\n// MAIN //\n\n/**\n* Maximum unsigned 32-bit integer.\n*\n* ## Notes\n*\n* The number has the value\n*\n* ```tex\n* 2^{32} - 1\n* ```\n*\n* which corresponds to the bit sequence\n*\n* ```binarystring\n* 11111111111111111111111111111111\n* ```\n*\n* @constant\n* @type {uinteger32}\n* @default 4294967295\n*/\nvar UINT32_MAX = 4294967295;\n\n\n// EXPORTS //\n\nexport default UINT32_MAX;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Uint32Array === 'function' ) ? Uint32Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Uint32Array === 'function' ) ? Uint32Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of 32-bit unsigned integers in the platform byte order.\n*\n* @module @stdlib/array-uint32\n*\n* @example\n* import ctor from '@stdlib/array-uint32';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasUint32ArraySupport from '@stdlib/assert-has-uint32array-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasUint32ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isUint32Array from '@stdlib/assert-is-uint32array';\nimport UINT32_MAX from '@stdlib/constants-uint32-max';\nimport GlobalUint32Array from './uint32array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Uint32Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Uint32Array` support\n*\n* @example\n* var bool = hasUint32ArraySupport();\n* // returns \n*/\nfunction hasUint32ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalUint32Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = [ 1, 3.14, -3.14, UINT32_MAX+1, UINT32_MAX+2 ];\n\t\tarr = new GlobalUint32Array( arr );\n\t\tbool = (\n\t\t\tisUint32Array( arr ) &&\n\t\t\tarr[ 0 ] === 1 &&\n\t\t\tarr[ 1 ] === 3 && // truncation\n\t\t\tarr[ 2 ] === UINT32_MAX-2 && // truncation and wrap around\n\t\t\tarr[ 3 ] === 0 && // wrap around\n\t\t\tarr[ 4 ] === 1 // wrap around\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasUint32ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of 32-bit unsigned integers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasUint8Array = ( typeof Uint8Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Uint8Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a Uint8Array\n*\n* @example\n* var bool = isUint8Array( new Uint8Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isUint8Array( [] );\n* // returns false\n*/\nfunction isUint8Array( value ) {\n\treturn (\n\t\t( hasUint8Array && value instanceof Uint8Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Uint8Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isUint8Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum unsigned 8-bit integer.\n*\n* @module @stdlib/constants-uint8-max\n* @type {integer32}\n*\n* @example\n* import UINT8_MAX from '@stdlib/constants-uint8-max';\n* // returns 255\n*/\n\n\n// MAIN //\n\n/**\n* Maximum unsigned 8-bit integer.\n*\n* ## Notes\n*\n* The number has the value\n*\n* ```tex\n* 2^{8} - 1\n* ```\n*\n* which corresponds to the bit sequence\n*\n* ```binarystring\n* 11111111\n* ```\n*\n* @constant\n* @type {integer32}\n* @default 255\n*/\nvar UINT8_MAX = 255|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default UINT8_MAX;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Uint8Array === 'function' ) ? Uint8Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Uint8Array === 'function' ) ? Uint8Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of 8-bit unsigned integers in the platform byte order.\n*\n* @module @stdlib/array-uint8\n*\n* @example\n* import ctor from '@stdlib/array-uint8';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasUint8ArraySupport from '@stdlib/assert-has-uint8array-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasUint8ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isUint8Array from '@stdlib/assert-is-uint8array';\nimport UINT8_MAX from '@stdlib/constants-uint8-max';\nimport GlobalUint8Array from './uint8array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Uint8Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Uint8Array` support\n*\n* @example\n* var bool = hasUint8ArraySupport();\n* // returns \n*/\nfunction hasUint8ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalUint8Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = [ 1, 3.14, -3.14, UINT8_MAX+1, UINT8_MAX+2 ];\n\t\tarr = new GlobalUint8Array( arr );\n\t\tbool = (\n\t\t\tisUint8Array( arr ) &&\n\t\t\tarr[ 0 ] === 1 &&\n\t\t\tarr[ 1 ] === 3 && // truncation\n\t\t\tarr[ 2 ] === UINT8_MAX-2 && // truncation and wrap around\n\t\t\tarr[ 3 ] === 0 && // wrap around\n\t\t\tarr[ 4 ] === 1 // wrap around\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasUint8ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of 8-bit unsigned integers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasUint8ClampedArray = ( typeof Uint8ClampedArray === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Uint8ClampedArray.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a Uint8ClampedArray\n*\n* @example\n* var bool = isUint8ClampedArray( new Uint8ClampedArray( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isUint8ClampedArray( [] );\n* // returns false\n*/\nfunction isUint8ClampedArray( value ) {\n\treturn (\n\t\t( hasUint8ClampedArray && value instanceof Uint8ClampedArray ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Uint8ClampedArray]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isUint8ClampedArray;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Uint8ClampedArray === 'function' ) ? Uint8ClampedArray : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Uint8ClampedArray === 'function' ) ? Uint8ClampedArray : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of 8-bit unsigned integers in the platform byte order clamped to 0-255.\n*\n* @module @stdlib/array-uint8c\n*\n* @example\n* import ctor from '@stdlib/array-uint8c';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasUint8ClampedArraySupport from '@stdlib/assert-has-uint8clampedarray-support'; // eslint-disable-line id-length\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasUint8ClampedArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isUint8ClampedArray from '@stdlib/assert-is-uint8clampedarray';\nimport GlobalUint8ClampedArray from './uint8clampedarray.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Uint8ClampedArray` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Uint8ClampedArray` support\n*\n* @example\n* var bool = hasUint8ClampedArraySupport();\n* // returns \n*/\nfunction hasUint8ClampedArraySupport() { // eslint-disable-line id-length\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalUint8ClampedArray !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = new GlobalUint8ClampedArray( [ -1, 0, 1, 3.14, 4.99, 255, 256 ] );\n\t\tbool = (\n\t\t\tisUint8ClampedArray( arr ) &&\n\t\t\tarr[ 0 ] === 0 && // clamped\n\t\t\tarr[ 1 ] === 0 &&\n\t\t\tarr[ 2 ] === 1 &&\n\t\t\tarr[ 3 ] === 3 && // round to nearest\n\t\t\tarr[ 4 ] === 5 && // round to nearest\n\t\t\tarr[ 5 ] === 255 &&\n\t\t\tarr[ 6 ] === 255 // clamped\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasUint8ClampedArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of 8-bit unsigned integers in the platform byte order clamped to 0-255.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isInteger from '@stdlib/math-base-assert-is-integer';\nimport MAX_LENGTH from '@stdlib/constants-array-max-array-length';\n\n\n// MAIN //\n\n/**\n* Tests if a value is an array-like object.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is an array-like object\n*\n* @example\n* var bool = isArrayLikeObject( [] );\n* // returns true\n*\n* @example\n* var bool = isArrayLikeObject( { 'length':10 } );\n* // returns true\n*\n* @example\n* var bool = isArrayLikeObject( 'beep' );\n* // returns false\n*/\nfunction isArrayLikeObject( value ) {\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\ttypeof value.length === 'number' &&\n\t\tisInteger( value.length ) &&\n\t\tvalue.length >= 0 &&\n\t\tvalue.length <= MAX_LENGTH\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isArrayLikeObject;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum length of a generic array.\n*\n* @module @stdlib/constants-array-max-array-length\n*\n* @example\n* import MAX_ARRAY_LENGTH from '@stdlib/constants-array-max-array-length';\n* // returns 4294967295\n*/\n\n// MAIN //\n\n/**\n* Maximum length of a generic array.\n*\n* ```tex\n* 2^{32} - 1\n* ```\n*\n* @constant\n* @type {uinteger32}\n* @default 4294967295\n*/\nvar MAX_ARRAY_LENGTH = 4294967295>>>0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default MAX_ARRAY_LENGTH;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isInteger from '@stdlib/math-base-assert-is-integer';\nimport MAX_LENGTH from '@stdlib/constants-array-max-typed-array-length';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a collection.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether a value is a collection\n*\n* @example\n* var bool = isCollection( [] );\n* // returns true\n*\n* @example\n* var bool = isCollection( {} );\n* // returns false\n*/\nfunction isCollection( value ) {\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\ttypeof value.length === 'number' &&\n\t\tisInteger( value.length ) &&\n\t\tvalue.length >= 0 &&\n\t\tvalue.length <= MAX_LENGTH\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isCollection;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum length of a typed array.\n*\n* @module @stdlib/constants-array-max-typed-array-length\n*\n* @example\n* import MAX_TYPED_ARRAY_LENGTH from '@stdlib/constants-array-max-typed-array-length';\n* // returns 9007199254740991\n*/\n\n// MAIN //\n\n/**\n* Maximum length of a typed array.\n*\n* ```tex\n* 2^{53} - 1\n* ```\n*\n* @constant\n* @type {number}\n* @default 9007199254740991\n*/\nvar MAX_TYPED_ARRAY_LENGTH = 9007199254740991;\n\n\n// EXPORTS //\n\nexport default MAX_TYPED_ARRAY_LENGTH;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasArrayBuffer = ( typeof ArrayBuffer === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is an ArrayBuffer.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an ArrayBuffer\n*\n* @example\n* import ArrayBuffer from '@stdlib/array-buffer';\n*\n* var bool = isArrayBuffer( new ArrayBuffer( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isArrayBuffer( [] );\n* // returns false\n*/\nfunction isArrayBuffer( value ) {\n\treturn (\n\t\t( hasArrayBuffer && value instanceof ArrayBuffer ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object ArrayBuffer]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isArrayBuffer;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar f;\n\n\n// FUNCTIONS //\n\n/**\n* Tests if a value is an array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an array\n*\n* @example\n* var bool = isArray( [] );\n* // returns true\n*\n* @example\n* var bool = isArray( {} );\n* // returns false\n*/\nfunction isArray( value ) {\n\treturn ( nativeClass( value ) === '[object Array]' );\n}\n\n\n// MAIN //\n\nif ( Array.isArray ) {\n\tf = Array.isArray;\n} else {\n\tf = isArray;\n}\n\n\n// EXPORTS //\n\nexport default f;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isArray from '@stdlib/assert-is-array';\n\n\n// MAIN //\n\n/**\n* Tests if a value is an object; e.g., `{}`.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an object\n*\n* @example\n* var bool = isObject( {} );\n* // returns true\n*\n* @example\n* var bool = isObject( null );\n* // returns false\n*/\nfunction isObject( value ) {\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\t!isArray( value )\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isObject;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\nvar RE = /./;\n\n\n// EXPORTS //\n\nexport default RE;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Tests if a value is a boolean primitive.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a boolean primitive\n*\n* @example\n* var bool = isBoolean( true );\n* // returns true\n*\n* @example\n* var bool = isBoolean( false );\n* // returns true\n*\n* @example\n* import Boolean from '@stdlib/boolean-ctor';\n*\n* var bool = isBoolean( new Boolean( true ) );\n* // returns false\n*/\nfunction isBoolean( value ) {\n\treturn ( typeof value === 'boolean' );\n}\n\n\n// EXPORTS //\n\nexport default isBoolean;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Returns a boolean.\n*\n* @name Boolean\n* @constructor\n* @type {Function}\n* @param {*} value - input value\n* @returns {(boolean|Boolean)} boolean\n*\n* @example\n* var b = Boolean( null );\n* // returns false\n*\n* b = Boolean( [] );\n* // returns true\n*\n* b = Boolean( {} );\n* // returns true\n*\n* @example\n* var b = new Boolean( false );\n* // returns \n*/\nvar Bool = Boolean; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default Bool;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// eslint-disable-next-line stdlib/no-redeclare\nvar toString = Boolean.prototype.toString; // non-generic\n\n\n// EXPORTS //\n\nexport default toString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport hasToStringTag from '@stdlib/assert-has-tostringtag-support';\nimport nativeClass from '@stdlib/utils-native-class';\nimport Boolean from '@stdlib/boolean-ctor';\nimport test from './try2serialize.js';\n\n\n// VARIABLES //\n\nvar FLG = hasToStringTag();\n\n\n// MAIN //\n\n/**\n* Tests if a value is a boolean object.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a boolean object\n*\n* @example\n* var bool = isBoolean( true );\n* // returns false\n*\n* @example\n* import Boolean from '@stdlib/boolean-ctor';\n*\n* var bool = isBoolean( new Boolean( false ) );\n* // returns true\n*/\nfunction isBoolean( value ) {\n\tif ( typeof value === 'object' ) {\n\t\tif ( value instanceof Boolean ) {\n\t\t\treturn true;\n\t\t}\n\t\tif ( FLG ) {\n\t\t\treturn test( value );\n\t\t}\n\t\treturn ( nativeClass( value ) === '[object Boolean]' );\n\t}\n\treturn false;\n}\n\n\n// EXPORTS //\n\nexport default isBoolean;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport toString from './tostring.js'; // eslint-disable-line stdlib/no-redeclare\n\n\n// MAIN //\n\n/**\n* Attempts to serialize a value to a string.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value can be serialized\n*/\nfunction test( value ) {\n\ttry {\n\t\ttoString.call( value );\n\t\treturn true;\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\treturn false;\n\t}\n}\n\n\n// EXPORTS //\n\nexport default test;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a boolean.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a boolean\n*\n* @example\n* var bool = isBoolean( false );\n* // returns true\n*\n* @example\n* var bool = isBoolean( true );\n* // returns true\n*\n* @example\n* import Boolean from '@stdlib/boolean-ctor';\n*\n* var bool = isBoolean( new Boolean( false ) );\n* // returns true\n*\n* @example\n* import Boolean from '@stdlib/boolean-ctor';\n*\n* var bool = isBoolean( new Boolean( true ) );\n* // returns true\n*/\nfunction isBoolean( value ) {\n\treturn ( isPrimitive( value ) || isObject( value ) );\n}\n\n\n// EXPORTS //\n\nexport default isBoolean;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Returns the global object using code generation.\n*\n* @private\n* @returns {Object} global object\n*/\nfunction getGlobal() {\n\treturn new Function( 'return this;' )(); // eslint-disable-line no-new-func, stdlib/require-globals\n}\n\n\n// EXPORTS //\n\nexport default getGlobal;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test if a value is a boolean.\n*\n* @module @stdlib/assert-is-boolean\n*\n* @example\n* import Boolean from '@stdlib/boolean-ctor';\n* import isBoolean from '@stdlib/assert-is-boolean';\n*\n* var bool = isBoolean( false );\n* // returns true\n*\n* bool = isBoolean( new Boolean( false ) );\n* // returns true\n*\n* @example\n* import Boolean from '@stdlib/boolean-ctor';\n* import { isPrimitive as isBoolean } from '@stdlib/assert-is-boolean';\n*\n* var bool = isBoolean( false );\n* // returns true\n*\n* bool = isBoolean( new Boolean( true ) );\n* // returns false\n*\n* @example\n* import Boolean from '@stdlib/boolean-ctor';\n* import { isObject as isBoolean } from '@stdlib/assert-is-boolean';\n*\n* var bool = isBoolean( true );\n* // returns false\n*\n* bool = isBoolean( new Boolean( false ) );\n* // returns true\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'isPrimitive', isPrimitive );\nsetReadOnly( main, 'isObject', isObject );\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar obj = ( typeof self === 'object' ) ? self : null;\n\n\n// EXPORTS //\n\nexport default obj;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar obj = ( typeof window === 'object' ) ? window : null;\n\n\n// EXPORTS //\n\nexport default obj;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar obj = ( typeof global === 'object' ) ? global : null;\n\n\n// EXPORTS //\n\nexport default obj;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar obj = ( typeof globalThis === 'object' ) ? globalThis : null; // eslint-disable-line no-undef\n\n\n// EXPORTS //\n\nexport default obj;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport getGlobal from '@stdlib/utils-global';\n\n\n// MAIN //\n\nvar root = getGlobal();\nvar nodeList = root.document && root.document.childNodes;\n\n\n// EXPORTS //\n\nexport default nodeList;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isBoolean } from '@stdlib/assert-is-boolean';\nimport format from '@stdlib/string-format';\nimport getThis from './codegen.js';\nimport Self from './self.js';\nimport Win from './window.js';\nimport Global from './global.js';\nimport GlobalThis from './global_this.js';\n\n\n// MAIN //\n\n/**\n* Returns the global object.\n*\n* ## Notes\n*\n* - Using code generation is the **most** reliable way to resolve the global object; however, doing so is likely to violate content security policies (CSPs) in, e.g., Chrome Apps and elsewhere.\n*\n* @param {boolean} [codegen=false] - boolean indicating whether to use code generation to resolve the global object\n* @throws {TypeError} must provide a boolean\n* @throws {Error} unable to resolve global object\n* @returns {Object} global object\n*\n* @example\n* var g = getGlobal();\n* // returns {...}\n*/\nfunction getGlobal( codegen ) {\n\tif ( arguments.length ) {\n\t\tif ( !isBoolean( codegen ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Must provide a boolean. Value: `%s`.', codegen ) );\n\t\t}\n\t\tif ( codegen ) {\n\t\t\treturn getThis();\n\t\t}\n\t\t// Fall through...\n\t}\n\t// Case: 2020 revision of ECMAScript standard\n\tif ( GlobalThis ) {\n\t\treturn GlobalThis;\n\t}\n\t// Case: browsers and web workers\n\tif ( Self ) {\n\t\treturn Self;\n\t}\n\t// Case: browsers\n\tif ( Win ) {\n\t\treturn Win;\n\t}\n\t// Case: Node.js\n\tif ( Global ) {\n\t\treturn Global;\n\t}\n\t// Case: unknown\n\tthrow new Error( 'unexpected error. Unable to resolve global object.' );\n}\n\n\n// EXPORTS //\n\nexport default getGlobal;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\nvar typedarray = Int8Array; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default typedarray;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Returns a regular expression to capture everything that is not a space immediately after the `function` keyword and before the first left parenthesis.\n*\n* @returns {RegExp} regular expression\n*\n* @example\n* var RE_FUNCTION_NAME = reFunctionName();\n*\n* function fname( fcn ) {\n* return RE_FUNCTION_NAME.exec( fcn.toString() )[ 1 ];\n* }\n*\n* var fn = fname( Math.sqrt );\n* // returns 'sqrt'\n*\n* fn = fname( Int8Array );\n* // returns 'Int8Array'\n*\n* fn = fname( Object.prototype.toString );\n* // returns 'toString'\n*\n* fn = fname( function(){} );\n* // returns ''\n*/\nfunction reFunctionName() {\n\treturn /^\\s*function\\s*([^(]*)/i;\n}\n\n\n// EXPORTS //\n\nexport default reFunctionName;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport reFunctionName from './main.js';\n\n\n// MAIN //\n\n/**\n* Captures everything that is not a space immediately after the `function` keyword and before the first left parenthesis.\n*\n* Regular expression: `/^\\s*function\\s*([^(]*)/i`\n*\n* - `/^\\s*`\n* - Match zero or more spaces at beginning\n*\n* - `function`\n* - Match the word `function`\n*\n* - `\\s*`\n* - Match zero or more spaces after the word `function`\n*\n* - `()`\n* - Capture\n*\n* - `[^(]*`\n* - Match anything except a left parenthesis `(` zero or more times\n*\n* - `/i`\n* - ignore case\n*\n* @constant\n* @type {RegExp}\n* @default /^\\s*function\\s*([^(]*)/i\n*/\nvar RE_FUNCTION_NAME = reFunctionName();\n\n\n// EXPORTS //\n\nexport default RE_FUNCTION_NAME;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Tests if a value is object-like.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether a value is object-like\n*\n* @example\n* var bool = isObjectLike( {} );\n* // returns true\n*\n* @example\n* var bool = isObjectLike( [] );\n* // returns true\n*\n* @example\n* var bool = isObjectLike( null );\n* // returns false\n*/\nfunction isObjectLike( value ) {\n\treturn (\n\t\tvalue !== null &&\n\t\ttypeof value === 'object'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isObjectLike;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\nimport { REGEXP as RE } from '@stdlib/regexp-function-name';\nimport isBuffer from '@stdlib/assert-is-buffer';\n\n\n// MAIN //\n\n/**\n* Determines the name of a value's constructor.\n*\n* @param {*} v - input value\n* @returns {string} name of a value's constructor\n*\n* @example\n* var v = constructorName( 'a' );\n* // returns 'String'\n*\n* @example\n* var v = constructorName( 5 );\n* // returns 'Number'\n*\n* @example\n* var v = constructorName( null );\n* // returns 'Null'\n*\n* @example\n* var v = constructorName( undefined );\n* // returns 'Undefined'\n*\n* @example\n* var v = constructorName( function noop() {} );\n* // returns 'Function'\n*/\nfunction constructorName( v ) {\n\tvar match;\n\tvar name;\n\tvar ctor;\n\tname = nativeClass( v ).slice( 8, -1 );\n\tif ( (name === 'Object' || name === 'Error') && v.constructor ) {\n\t\tctor = v.constructor;\n\t\tif ( typeof ctor.name === 'string' ) {\n\t\t\treturn ctor.name;\n\t\t}\n\t\tmatch = RE.exec( ctor.toString() );\n\t\tif ( match ) {\n\t\t\treturn match[ 1 ];\n\t\t}\n\t}\n\tif ( isBuffer( v ) ) {\n\t\treturn 'Buffer';\n\t}\n\treturn name;\n}\n\n\n// EXPORTS //\n\nexport default constructorName;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isObjectLike from '@stdlib/assert-is-object-like';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Buffer instance.\n*\n* @param {*} value - value to validate\n* @returns {boolean} boolean indicating if a value is a Buffer instance\n*\n* @example\n* var v = isBuffer( new Buffer( 'beep' ) );\n* // returns true\n*\n* @example\n* var v = isBuffer( new Buffer( [1,2,3,4] ) );\n* // returns true\n*\n* @example\n* var v = isBuffer( {} );\n* // returns false\n*\n* @example\n* var v = isBuffer( [] );\n* // returns false\n*/\nfunction isBuffer( value ) {\n\treturn (\n\t\tisObjectLike( value ) &&\n\t\t(\n\t\t\t// eslint-disable-next-line no-underscore-dangle\n\t\t\tvalue._isBuffer || // for envs missing Object.prototype.constructor (e.g., Safari 5-7)\n\t\t\t(\n\t\t\t\tvalue.constructor &&\n\n\t\t\t\t// WARNING: `typeof` is not a foolproof check, as certain envs consider RegExp and NodeList instances to be functions\n\t\t\t\ttypeof value.constructor.isBuffer === 'function' &&\n\t\t\t\tvalue.constructor.isBuffer( value )\n\t\t\t)\n\t\t)\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isBuffer;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Regular expression to capture everything that is not a space immediately after the `function` keyword and before the first left parenthesis.\n*\n* @module @stdlib/regexp-function-name\n*\n* @example\n* import reFunctionName from '@stdlib/regexp-function-name';\n* var RE_FUNCTION_NAME = reFunctionName();\n*\n* function fname( fcn ) {\n* return RE_FUNCTION_NAME.exec( fcn.toString() )[ 1 ];\n* }\n*\n* var fn = fname( Math.sqrt );\n* // returns 'sqrt'\n*\n* fn = fname( Int8Array );\n* // returns 'Int8Array'\n*\n* fn = fname( Object.prototype.toString );\n* // returns 'toString'\n*\n* fn = fname( function(){} );\n* // returns ''\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport REGEXP from './regexp.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'REGEXP', REGEXP );\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test if a value is object-like.\n*\n* @module @stdlib/assert-is-object-like\n*\n* @example\n* import isObjectLike from '@stdlib/assert-is-object-like';\n*\n* var bool = isObjectLike( {} );\n* // returns true\n*\n* bool = isObjectLike( [] );\n* // returns true\n*\n* bool = isObjectLike( null );\n* // returns false\n*\n* @example\n* import { isObjectLikeArray as isObjectLike } from '@stdlib/assert-is-object-like';\n*\n* var bool = isObjectLike( [ {}, [] ] );\n* // returns true\n*\n* bool = isObjectLike( [ {}, '3.0' ] );\n* // returns false\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport arrayfun from '@stdlib/assert-tools-array-function';\nimport main from './main.js';\n\n\n// VARIABLES //\n\nvar isObjectLikeArray = arrayfun( main );\n\n\n// MAIN //\n\nsetReadOnly( main, 'isObjectLikeArray', isObjectLikeArray );\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isArray from '@stdlib/assert-is-array';\nimport format from '@stdlib/string-format';\n\n\n// MAIN //\n\n/**\n* Returns a function which tests if every element in an array passes a test condition.\n*\n* @param {Function} predicate - function to apply\n* @throws {TypeError} must provide a function\n* @returns {Function} an array function\n*\n* @example\n* import isOdd from '@stdlib/assert-is-odd';\n*\n* var arr1 = [ 1, 3, 5, 7 ];\n* var arr2 = [ 3, 5, 8 ];\n*\n* var validate = arrayfcn( isOdd );\n*\n* var bool = validate( arr1 );\n* // returns true\n*\n* bool = validate( arr2 );\n* // returns false\n*/\nfunction arrayfcn( predicate ) {\n\tif ( typeof predicate !== 'function' ) {\n\t\tthrow new TypeError( format( 'invalid argument. Must provide a function. Value: `%s`.', predicate ) );\n\t}\n\treturn every;\n\n\t/**\n\t* Tests if every element in an array passes a test condition.\n\t*\n\t* @private\n\t* @param {*} value - value to test\n\t* @returns {boolean} boolean indicating whether a value is an array for which all elements pass a test condition\n\t*/\n\tfunction every( value ) {\n\t\tvar len;\n\t\tvar i;\n\t\tif ( !isArray( value ) ) {\n\t\t\treturn false;\n\t\t}\n\t\tlen = value.length;\n\t\tif ( len === 0 ) {\n\t\t\treturn false;\n\t\t}\n\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\tif ( predicate( value[ i ] ) === false ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}\n}\n\n\n// EXPORTS //\n\nexport default arrayfcn;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Determine a value's type.\n*\n* @module @stdlib/utils-type-of\n*\n* @example\n* import typeOf from '@stdlib/utils-type-of';\n*\n* var str = typeOf( 'a' );\n* // returns 'string'\n*\n* str = typeOf( 5 );\n* // returns 'number'\n*/\n\n// MODULES //\n\nimport usePolyfill from './check.js';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar main = ( usePolyfill() ) ? polyfill : builtin;\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport RE from './fixtures/re.js';\nimport nodeList from './fixtures/nodelist.js';\nimport typedarray from './fixtures/typedarray.js';\n\n\n// MAIN //\n\n/**\n* Checks whether a polyfill is needed when using the `typeof` operator.\n*\n* @private\n* @returns {boolean} boolean indicating whether a polyfill is needed\n*/\nfunction check() {\n\tif (\n\t\t// Chrome 1-12 returns 'function' for regular expression instances (see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/typeof):\n\t\ttypeof RE === 'function' ||\n\n\t\t// Safari 8 returns 'object' for typed array and weak map constructors (underscore #1929):\n\t\ttypeof typedarray === 'object' ||\n\n\t\t// PhantomJS 1.9 returns 'function' for `NodeList` instances (underscore #2236):\n\t\ttypeof nodeList === 'function'\n\t) {\n\t\treturn true;\n\t}\n\treturn false;\n}\n\n\n// EXPORTS //\n\nexport default check;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport ctorName from '@stdlib/utils-constructor-name';\n\n\n// MAIN //\n\n/**\n* Determines a value's type.\n*\n* @param {*} v - input value\n* @returns {string} string indicating the value's type\n*/\nfunction typeOf( v ) {\n\treturn ctorName( v ).toLowerCase();\n}\n\n\n// EXPORTS //\n\nexport default typeOf;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport ctorName from '@stdlib/utils-constructor-name';\n\n\n// NOTES //\n\n/*\n* Built-in `typeof` operator behavior:\n*\n* ```text\n* typeof null => 'object'\n* typeof undefined => 'undefined'\n* typeof 'a' => 'string'\n* typeof 5 => 'number'\n* typeof NaN => 'number'\n* typeof true => 'boolean'\n* typeof false => 'boolean'\n* typeof {} => 'object'\n* typeof [] => 'object'\n* typeof function foo(){} => 'function'\n* typeof function* foo(){} => 'object'\n* typeof Symbol() => 'symbol'\n* ```\n*\n*/\n\n\n// MAIN //\n\n/**\n* Determines a value's type.\n*\n* @param {*} v - input value\n* @returns {string} string indicating the value's type\n*/\nfunction typeOf( v ) {\n\tvar type;\n\n\t// Address `typeof null` => `object` (see http://wiki.ecmascript.org/doku.php?id=harmony:typeof_null):\n\tif ( v === null ) {\n\t\treturn 'null';\n\t}\n\ttype = typeof v;\n\n\t// If the `typeof` operator returned something other than `object`, we are done. Otherwise, we need to check for an internal class name or search for a constructor.\n\tif ( type === 'object' ) {\n\t\treturn ctorName( v ).toLowerCase();\n\t}\n\treturn type;\n}\n\n\n// EXPORTS //\n\nexport default typeOf;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport typeOf from '@stdlib/utils-type-of';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a function.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a function\n*\n* @example\n* function beep() {\n* return 'beep';\n* }\n*\n* var bool = isFunction( beep );\n* // returns true\n*/\nfunction isFunction( value ) {\n\t// Note: cannot use `typeof` directly, as various browser engines incorrectly return `'function'` when operating on non-function objects, such as regular expressions and NodeLists.\n\treturn ( typeOf( value ) === 'function' );\n}\n\n\n// EXPORTS //\n\nexport default isFunction;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isNumber } from '@stdlib/assert-is-number';\nimport defineProperty from '@stdlib/utils-define-property';\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport format from '@stdlib/string-format';\nimport toStr from './tostring.js';\nimport toJSON from './tojson.js';\n\n\n// MAIN //\n\n/**\n* 128-bit complex number constructor.\n*\n* @constructor\n* @param {number} real - real component\n* @param {number} imag - imaginary component\n* @throws {TypeError} must invoke using the `new` keyword\n* @throws {TypeError} real component must be a number\n* @throws {TypeError} imaginary component must be a number\n* @returns {Complex128} 128-bit complex number\n*\n* @example\n* var z = new Complex128( 5.0, 3.0 );\n* // returns \n*/\nfunction Complex128( real, imag ) {\n\tif ( !( this instanceof Complex128 ) ) {\n\t\tthrow new TypeError( 'invalid invocation. Constructor must be called with the `new` keyword.' );\n\t}\n\tif ( !isNumber( real ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Real component must be a number. Value: `%s`.', real ) );\n\t}\n\tif ( !isNumber( imag ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Imaginary component must be a number. Value: `%s`.', imag ) );\n\t}\n\tdefineProperty( this, 're', {\n\t\t'configurable': false,\n\t\t'enumerable': true,\n\t\t'writable': false,\n\t\t'value': real\n\t});\n\tdefineProperty( this, 'im', {\n\t\t'configurable': false,\n\t\t'enumerable': true,\n\t\t'writable': false,\n\t\t'value': imag\n\t});\n\treturn this;\n}\n\n/**\n* Size (in bytes) of each component.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex128\n* @type {integer}\n* @returns {integer} size of each component\n*\n* @example\n* var nbytes = Complex128.BYTES_PER_ELEMENT;\n* // returns 8\n*/\nsetReadOnly( Complex128, 'BYTES_PER_ELEMENT', 8 );\n\n/**\n* Size (in bytes) of each component.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex128.prototype\n* @type {integer}\n* @returns {integer} size of each component\n*\n* @example\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var nbytes = z.BYTES_PER_ELEMENT;\n* // returns 8\n*/\nsetReadOnly( Complex128.prototype, 'BYTES_PER_ELEMENT', 8 );\n\n/**\n* Length (in bytes) of a complex number.\n*\n* @name byteLength\n* @memberof Complex128.prototype\n* @type {integer}\n* @returns {integer} byte length\n*\n* @example\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var nbytes = z.byteLength;\n* // returns 16\n*/\nsetReadOnly( Complex128.prototype, 'byteLength', 16 );\n\n/**\n* Serializes a complex number as a string.\n*\n* @name toString\n* @memberof Complex128.prototype\n* @type {Function}\n* @returns {string} serialized complex number\n*\n* @example\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var str = z.toString();\n* // returns '5 + 3i'\n*/\nsetReadOnly( Complex128.prototype, 'toString', toStr );\n\n/**\n* Serializes a complex number as a JSON object.\n*\n* ## Notes\n*\n* - `JSON.stringify()` implicitly calls this method when stringifying a `Complex128` instance.\n*\n* @name toJSON\n* @memberof Complex128.prototype\n* @type {Function}\n* @returns {Object} serialized complex number\n*\n* @example\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var obj = z.toJSON();\n* // returns { 'type': 'Complex128', 're': 5.0, 'im': 3.0 }\n*/\nsetReadOnly( Complex128.prototype, 'toJSON', toJSON );\n\n\n// EXPORTS //\n\nexport default Complex128;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Serializes a complex number as a string.\n*\n* @private\n* @returns {string} serialized complex number\n*/\nfunction toString() { // eslint-disable-line stdlib/no-redeclare\n\t/* eslint-disable no-invalid-this */\n\tvar str = '' + this.re;\n\tif ( this.im < 0 ) {\n\t\tstr += ' - ' + (-this.im);\n\t} else {\n\t\tstr += ' + ' + this.im;\n\t}\n\tstr += 'i';\n\treturn str;\n}\n\n\n// EXPORTS //\n\nexport default toString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Serializes a complex number as a JSON object.\n*\n* @private\n* @returns {Object} JSON representation\n*/\nfunction toJSON() {\n\t/* eslint-disable no-invalid-this */\n\tvar out = {};\n\tout.type = 'Complex128';\n\tout.re = this.re;\n\tout.im = this.im;\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default toJSON;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar fround = ( typeof Math.fround === 'function' ) ? Math.fround : null; // eslint-disable-line stdlib/no-builtin-math\n\n\n// EXPORTS //\n\nexport default fround;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport Float32Array from '@stdlib/array-float32';\n\n\n// VARIABLES //\n\nvar FLOAT32_VIEW = new Float32Array( 1 );\n\n\n// MAIN //\n\n/**\n* Converts a double-precision floating-point number to the nearest single-precision floating-point number.\n*\n* @param {number} x - double-precision floating-point number\n* @returns {number} nearest single-precision floating-point number\n*\n* @example\n* var y = float64ToFloat32( 1.337 );\n* // returns 1.3370000123977661\n*/\nfunction float64ToFloat32( x ) {\n\tFLOAT32_VIEW[ 0 ] = x;\n\treturn FLOAT32_VIEW[ 0 ];\n}\n\n\n// EXPORTS //\n\nexport default float64ToFloat32;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Convert a double-precision floating-point number to the nearest single-precision floating-point number.\n*\n* @module @stdlib/number-float64-base-to-float32\n*\n* @example\n* import float64ToFloat32 from '@stdlib/number-float64-base-to-float32';\n*\n* var y = float64ToFloat32( 1.337 );\n* // returns 1.3370000123977661\n*/\n\n// MODULES //\n\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar float64ToFloat32;\nif ( typeof builtin === 'function' ) {\n\tfloat64ToFloat32 = builtin;\n} else {\n\tfloat64ToFloat32 = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default float64ToFloat32;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isNumber } from '@stdlib/assert-is-number';\nimport defineProperty from '@stdlib/utils-define-property';\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport float64ToFloat32 from '@stdlib/number-float64-base-to-float32';\nimport format from '@stdlib/string-format';\nimport toStr from './tostring.js';\nimport toJSON from './tojson.js';\n\n\n// MAIN //\n\n/**\n* 64-bit complex number constructor.\n*\n* @constructor\n* @param {number} real - real component\n* @param {number} imag - imaginary component\n* @throws {TypeError} must invoke using the `new` keyword\n* @throws {TypeError} real component must be a number\n* @throws {TypeError} imaginary component must be a number\n* @returns {Complex64} 64-bit complex number\n*\n* @example\n* var z = new Complex64( 5.0, 3.0 );\n* // returns \n*/\nfunction Complex64( real, imag ) {\n\tif ( !( this instanceof Complex64 ) ) {\n\t\tthrow new TypeError( 'invalid invocation. Constructor must be called with the `new` keyword.' );\n\t}\n\tif ( !isNumber( real ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Real component must be a number. Value: `%s`.', real ) );\n\t}\n\tif ( !isNumber( imag ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Imaginary component must be a number. Value: `%s`.', imag ) );\n\t}\n\tdefineProperty( this, 're', {\n\t\t'configurable': false,\n\t\t'enumerable': true,\n\t\t'writable': false,\n\t\t'value': float64ToFloat32( real )\n\t});\n\tdefineProperty( this, 'im', {\n\t\t'configurable': false,\n\t\t'enumerable': true,\n\t\t'writable': false,\n\t\t'value': float64ToFloat32( imag )\n\t});\n\treturn this;\n}\n\n/**\n* Size (in bytes) of each component.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex64\n* @type {integer}\n* @returns {integer} size of each component\n*\n* @example\n* var nbytes = Complex64.BYTES_PER_ELEMENT;\n* // returns 4\n*/\nsetReadOnly( Complex64, 'BYTES_PER_ELEMENT', 4 );\n\n/**\n* Size (in bytes) of each component.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex64.prototype\n* @type {integer}\n* @returns {integer} size of each component\n*\n* @example\n* var z = new Complex64( 5.0, 3.0 );\n*\n* var nbytes = z.BYTES_PER_ELEMENT;\n* // returns 4\n*/\nsetReadOnly( Complex64.prototype, 'BYTES_PER_ELEMENT', 4 );\n\n/**\n* Length (in bytes) of a complex number.\n*\n* @name byteLength\n* @memberof Complex64.prototype\n* @type {integer}\n* @returns {integer} byte length\n*\n* @example\n* var z = new Complex64( 5.0, 3.0 );\n*\n* var nbytes = z.byteLength;\n* // returns 8\n*/\nsetReadOnly( Complex64.prototype, 'byteLength', 8 );\n\n/**\n* Serializes a complex number as a string.\n*\n* @name toString\n* @memberof Complex64.prototype\n* @type {Function}\n* @returns {string} serialized complex number\n*\n* @example\n* var z = new Complex64( 5.0, 3.0 );\n*\n* var str = z.toString();\n* // returns '5 + 3i'\n*/\nsetReadOnly( Complex64.prototype, 'toString', toStr );\n\n/**\n* Serializes a complex number as a JSON object.\n*\n* ## Notes\n*\n* - `JSON.stringify()` implicitly calls this method when stringifying a `Complex64` instance.\n*\n* @name toJSON\n* @memberof Complex64.prototype\n* @type {Function}\n* @returns {Object} serialized complex number\n*\n* @example\n* var z = new Complex64( 5.0, 3.0 );\n*\n* var obj = z.toJSON();\n* // returns { 'type': 'Complex64', 're': 5.0, 'im': 3.0 }\n*/\nsetReadOnly( Complex64.prototype, 'toJSON', toJSON );\n\n\n// EXPORTS //\n\nexport default Complex64;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport Complex128 from '@stdlib/complex-float64';\nimport Complex64 from '@stdlib/complex-float32';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a complex number-like object.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a complex number-like object.\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n* import Complex64 from '@stdlib/complex-float32';\n*\n* var x = new Complex128( 4.0, 2.0 );\n* var bool = isComplexLike( x );\n* // returns true\n*\n* x = new Complex64( 4.0, 2.0 );\n* bool = isComplexLike( x );\n* // returns true\n*/\nfunction isComplexLike( value ) {\n\tif ( value instanceof Complex128 || value instanceof Complex64 ) {\n\t\treturn true;\n\t}\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\ttypeof value.re === 'number' &&\n\t\ttypeof value.im === 'number'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isComplexLike;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isInteger from '@stdlib/math-base-assert-is-integer';\n\n\n// MAIN //\n\n/**\n* Tests if a finite numeric value is an even number.\n*\n* @param {number} x - value to test\n* @returns {boolean} boolean indicating whether the value is an even number\n*\n* @example\n* var bool = isEven( 5.0 );\n* // returns false\n*\n* @example\n* var bool = isEven( -2.0 );\n* // returns true\n*\n* @example\n* var bool = isEven( 0.0 );\n* // returns true\n*\n* @example\n* var bool = isEven( NaN );\n* // returns false\n*/\nfunction isEven( x ) {\n\treturn isInteger( x/2.0 );\n}\n\n\n// EXPORTS //\n\nexport default isEven;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport hasOwnProp from '@stdlib/assert-has-own-property';\nimport Symbol from '@stdlib/symbol-ctor';\n\n\n// MAIN //\n\n/**\n* Tests for native `Symbol.iterator` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Symbol.iterator` support\n*\n* @example\n* var bool = hasIteratorSymbolSupport();\n* // returns \n*/\nfunction hasIteratorSymbolSupport() {\n\treturn (\n\t\ttypeof Symbol === 'function' &&\n\t\ttypeof Symbol( 'foo' ) === 'symbol' &&\n\t\thasOwnProp( Symbol, 'iterator' ) &&\n\t\ttypeof Symbol.iterator === 'symbol'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default hasIteratorSymbolSupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Serializes a complex number as a string.\n*\n* @private\n* @returns {string} serialized complex number\n*/\nfunction toString() { // eslint-disable-line stdlib/no-redeclare\n\t/* eslint-disable no-invalid-this */\n\tvar str = '' + this.re;\n\tif ( this.im < 0 ) {\n\t\tstr += ' - ' + (-this.im);\n\t} else {\n\t\tstr += ' + ' + this.im;\n\t}\n\tstr += 'i';\n\treturn str;\n}\n\n\n// EXPORTS //\n\nexport default toString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Serializes a complex number as a JSON object.\n*\n* @private\n* @returns {Object} JSON representation\n*/\nfunction toJSON() {\n\t/* eslint-disable no-invalid-this */\n\tvar out = {};\n\tout.type = 'Complex64';\n\tout.re = this.re;\n\tout.im = this.im;\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default toJSON;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport hasIteratorSymbolSupport from '@stdlib/assert-has-iterator-symbol-support';\n\n\n// MAIN //\n\n/**\n* Iterator symbol.\n*\n* @name IteratorSymbol\n* @constant\n* @type {(symbol|null)}\n*\n* @example\n* function iterator() {\n* var it;\n* var i;\n*\n* i = -1;\n*\n* it = {};\n* it.next = next;\n* it.return = done;\n*\n* if ( IteratorSymbol ) {\n* it[ IteratorSymbol ] = iterator;\n* }\n* return it;\n*\n* function next() {\n* i += 1;\n* return {\n* 'value': i,\n* 'done': false\n* };\n* }\n*\n* function done( value ) {\n* if ( arguments.length === 0 ) {\n* return {\n* 'done': true\n* };\n* }\n* return {\n* 'value': value,\n* 'done': true\n* };\n* }\n* }\n*\n* var obj = iterator();\n*/\nvar IteratorSymbol = ( hasIteratorSymbolSupport() ) ? Symbol.iterator : null;\n\n\n// EXPORTS //\n\nexport default IteratorSymbol;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport defineProperty from '@stdlib/utils-define-property';\n\n\n// MAIN //\n\n/**\n* Defines a non-enumerable read-only accessor.\n*\n* @param {Object} obj - object on which to define the property\n* @param {(string|symbol)} prop - property name\n* @param {Function} getter - accessor\n*\n* @example\n* function getter() {\n* return 'bar';\n* }\n*\n* var obj = {};\n*\n* setNonEnumerableReadOnlyAccessor( obj, 'foo', getter );\n*\n* try {\n* obj.foo = 'boop';\n* } catch ( err ) {\n* console.error( err.message );\n* }\n*/\nfunction setNonEnumerableReadOnlyAccessor( obj, prop, getter ) { // eslint-disable-line id-length\n\tdefineProperty( obj, prop, {\n\t\t'configurable': false,\n\t\t'enumerable': false,\n\t\t'get': getter\n\t});\n}\n\n\n// EXPORTS //\n\nexport default setNonEnumerableReadOnlyAccessor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Returns the real component of a single-precision complex floating-point number.\n*\n* @param {Complex} z - complex number\n* @returns {number} real component\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n*\n* var z = new Complex64( 5.0, 3.0 );\n*\n* var re = realf( z );\n* // returns 5.0\n*/\nfunction realf( z ) {\n\treturn z.re;\n}\n\n\n// EXPORTS //\n\nexport default realf;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Returns the imaginary component of a single-precision complex floating-point number.\n*\n* @param {Complex} z - complex number\n* @returns {number} imaginary component\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n*\n* var z = new Complex64( 5.0, 3.0 );\n*\n* var im = imagf( z );\n* // returns 3.0\n*/\nfunction imagf( z ) {\n\treturn z.im;\n}\n\n\n// EXPORTS //\n\nexport default imagf;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport Float32Array from '@stdlib/array-float32';\n\n\n// MAIN //\n\n/**\n* Reinterprets a `Complex64Array` as a `Float32Array`.\n*\n* @param {Complex64Array} x - input array\n* @param {NonNegativeInteger} offset - starting index\n* @returns {Float32Array} `Float32Array` view\n*\n* @example\n* import Complex64Array from '@stdlib/array-complex64';\n*\n* var x = new Complex64Array( 10 );\n*\n* var out = reinterpret( x, 0 );\n* // returns \n*\n* var bool = ( out.buffer === x.buffer );\n* // returns true\n*/\nfunction reinterpret( x, offset ) {\n\treturn new Float32Array( x.buffer, x.byteOffset+(x.BYTES_PER_ELEMENT*offset), 2*(x.length-offset) ); // eslint-disable-line max-len\n}\n\n\n// EXPORTS //\n\nexport default reinterpret;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport Float64Array from '@stdlib/array-float64';\n\n\n// MAIN //\n\n/**\n* Reinterprets a `Complex128Array` as a `Float64Array`.\n*\n* @param {Complex128Array} x - input array\n* @param {NonNegativeInteger} offset - starting index\n* @returns {Float64Array} `Float64Array` view\n*\n* @example\n* import Complex128Array from '@stdlib/array-complex128';\n*\n* var x = new Complex128Array( 10 );\n*\n* var out = reinterpret( x, 0 );\n* // returns \n*\n* var bool = ( out.buffer === x.buffer );\n* // returns true\n*/\nfunction reinterpret( x, offset ) {\n\treturn new Float64Array( x.buffer, x.byteOffset+(x.BYTES_PER_ELEMENT*offset), 2*(x.length-offset) ); // eslint-disable-line max-len\n}\n\n\n// EXPORTS //\n\nexport default reinterpret;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// VARIABLES //\n\nvar GETTERS = {\n\t'float64': getFloat64,\n\t'float32': getFloat32,\n\t'int32': getInt32,\n\t'int16': getInt16,\n\t'int8': getInt8,\n\t'uint32': getUint32,\n\t'uint16': getUint16,\n\t'uint8': getUint8,\n\t'uint8c': getUint8c,\n\t'generic': getGeneric,\n\t'default': getArrayLike\n};\n\n\n// FUNCTIONS //\n\n/**\n* Returns an element from a `Float64Array`.\n*\n* @private\n* @param {Float64Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n*\n* var arr = new Float64Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getFloat64( arr, 2 );\n* // returns 3.0\n*/\nfunction getFloat64( arr, idx ) {\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from a `Float32Array`.\n*\n* @private\n* @param {Float32Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Float32Array from '@stdlib/array-float32';\n*\n* var arr = new Float32Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getFloat32( arr, 2 );\n* // returns 3.0\n*/\nfunction getFloat32( arr, idx ) {\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from an `Int32Array`.\n*\n* @private\n* @param {Int32Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Int32Array from '@stdlib/array-int32';\n*\n* var arr = new Int32Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getInt32( arr, 2 );\n* // returns 3\n*/\nfunction getInt32( arr, idx ) { // eslint-disable-line stdlib/jsdoc-doctest-decimal-point\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from an `Int16Array`.\n*\n* @private\n* @param {Int16Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Int16Array from '@stdlib/array-int16';\n*\n* var arr = new Int16Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getInt16( arr, 2 );\n* // returns 3\n*/\nfunction getInt16( arr, idx ) { // eslint-disable-line stdlib/jsdoc-doctest-decimal-point\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from an `Int8Array`.\n*\n* @private\n* @param {Int8Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Int8Array from '@stdlib/array-int8';\n*\n* var arr = new Int8Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getInt8( arr, 2 );\n* // returns 3\n*/\nfunction getInt8( arr, idx ) { // eslint-disable-line stdlib/jsdoc-doctest-decimal-point\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from a `Uint32Array`.\n*\n* @private\n* @param {Uint32Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Uint32Array from '@stdlib/array-uint32';\n*\n* var arr = new Uint32Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getUint32( arr, 2 );\n* // returns 3\n*/\nfunction getUint32( arr, idx ) { // eslint-disable-line stdlib/jsdoc-doctest-decimal-point\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from a `Uint16Array`.\n*\n* @private\n* @param {Uint16Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Uint16Array from '@stdlib/array-uint16';\n*\n* var arr = new Uint16Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getUint16( arr, 2 );\n* // returns 3\n*/\nfunction getUint16( arr, idx ) { // eslint-disable-line stdlib/jsdoc-doctest-decimal-point\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from a `Uint8Array`.\n*\n* @private\n* @param {Uint8Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Uint8Array from '@stdlib/array-uint8';\n*\n* var arr = new Uint8Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getUint8( arr, 2 );\n* // returns 3\n*/\nfunction getUint8( arr, idx ) { // eslint-disable-line stdlib/jsdoc-doctest-decimal-point\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from a `Uint8ClampedArray`.\n*\n* @private\n* @param {Uint8ClampedArray} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Uint8ClampedArray from '@stdlib/array-uint8c';\n*\n* var arr = new Uint8ClampedArray( [ 1, 2, 3, 4 ] );\n*\n* var v = getUint8c( arr, 2 );\n* // returns 3\n*/\nfunction getUint8c( arr, idx ) { // eslint-disable-line stdlib/jsdoc-doctest-decimal-point\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from a generic `Array`.\n*\n* @private\n* @param {Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {*} element value\n*\n* @example\n* var arr = [ 1, 2, 3, 4 ];\n*\n* var v = getGeneric( arr, 2 );\n* // returns 3\n*/\nfunction getGeneric( arr, idx ) {\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from an indexed array-like object.\n*\n* @private\n* @param {Collection} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {*} element value\n*\n* @example\n* var arr = [ 1, 2, 3, 4 ];\n*\n* var v = getArrayLike( arr, 2 );\n* // returns 3\n*/\nfunction getArrayLike( arr, idx ) {\n\treturn arr[ idx ];\n}\n\n\n// MAIN //\n\n/**\n* Returns an accessor function for retrieving an element from an indexed array-like object.\n*\n* @param {string} dtype - array dtype\n* @returns {Function} accessor\n*\n* @example\n* import dtype from '@stdlib/array-dtype';\n*\n* var arr = [ 1, 2, 3, 4 ];\n*\n* var get = getter( dtype( arr ) );\n* var v = get( arr, 2 );\n* // returns 3\n*/\nfunction getter( dtype ) {\n\tvar f = GETTERS[ dtype ];\n\tif ( typeof f === 'function' ) {\n\t\treturn f;\n\t}\n\treturn GETTERS.default;\n}\n\n\n// EXPORTS //\n\nexport default getter;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// VARIABLES //\n\nvar GETTERS = {\n\t'complex128': getComplex128,\n\t'complex64': getComplex64,\n\t'default': getArrayLike\n};\n\n\n// FUNCTIONS //\n\n/**\n* Returns an element from a `Complex128Array`.\n*\n* @private\n* @param {Complex128Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Complex128Array from '@stdlib/array-complex128';\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* var arr = new Complex128Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getComplex128( arr, 1 );\n* // returns \n*\n* var re = real( v );\n* // returns 3.0\n*\n* var im = imag( v );\n* // returns 4.0\n*/\nfunction getComplex128( arr, idx ) {\n\treturn arr.get( idx );\n}\n\n/**\n* Returns an element from a `Complex64Array`.\n*\n* @private\n* @param {Complex64Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Complex64Array from '@stdlib/array-complex64';\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* var arr = new Complex64Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getComplex64( arr, 1 );\n* // returns \n*\n* var re = realf( v );\n* // returns 3.0\n*\n* var im = imagf( v );\n* // returns 4.0\n*/\nfunction getComplex64( arr, idx ) {\n\treturn arr.get( idx );\n}\n\n/**\n* Returns an element from an array-like object supporting the get/set protocol.\n*\n* @private\n* @param {Collection} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {*} element value\n*\n* @example\n* var arr = [ 1, 2, 3, 4 ];\n*\n* function get( idx ) {\n* return arr[ idx ];\n* }\n*\n* function set( value, idx ) {\n* arr[ idx ] = value;\n* }\n*\n* arr.get = get;\n* arr.set = set;\n*\n* var v = getArrayLike( arr, 2 );\n* // returns 3\n*/\nfunction getArrayLike( arr, idx ) {\n\treturn arr.get( idx );\n}\n\n\n// MAIN //\n\n/**\n* Returns an accessor function for retrieving an element from an array-like object supporting the get/set protocol.\n*\n* @param {string} dtype - array dtype\n* @returns {Function} accessor\n*\n* @example\n* import Complex64Array from '@stdlib/array-complex64';\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n* import dtype from '@stdlib/array-dtype';\n*\n* var arr = new Complex64Array( [ 1, 2, 3, 4 ] );\n*\n* var get = getter( dtype( arr ) );\n* var v = get( arr, 1 );\n* // returns \n*\n* var re = realf( v );\n* // returns 3.0\n*\n* var im = imagf( v );\n* // returns 4.0\n*/\nfunction getter( dtype ) {\n\tvar f = GETTERS[ dtype ];\n\tif ( typeof f === 'function' ) {\n\t\treturn f;\n\t}\n\treturn GETTERS.default;\n}\n\n\n// EXPORTS //\n\nexport default getter;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isArrayLikeObject from '@stdlib/assert-is-array-like-object';\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport realf from '@stdlib/complex-realf';\nimport imagf from '@stdlib/complex-imagf';\nimport format from '@stdlib/string-format';\n\n\n// MAIN //\n\n/**\n* Returns an array of iterated values.\n*\n* @private\n* @param {Object} it - iterator\n* @returns {(Array|TypeError)} array or an error\n*/\nfunction fromIterator( it ) {\n\tvar out;\n\tvar v;\n\tvar z;\n\n\tout = [];\n\twhile ( true ) {\n\t\tv = it.next();\n\t\tif ( v.done ) {\n\t\t\tbreak;\n\t\t}\n\t\tz = v.value;\n\t\tif ( isArrayLikeObject( z ) && z.length >= 2 ) {\n\t\t\tout.push( z[ 0 ], z[ 1 ] );\n\t\t} else if ( isComplexLike( z ) ) {\n\t\t\tout.push( realf( z ), imagf( z ) );\n\t\t} else {\n\t\t\treturn new TypeError( format( 'invalid argument. An iterator must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', z ) );\n\t\t}\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default fromIterator;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isArrayLikeObject from '@stdlib/assert-is-array-like-object';\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport realf from '@stdlib/complex-realf';\nimport imagf from '@stdlib/complex-imagf';\nimport format from '@stdlib/string-format';\n\n\n// MAIN //\n\n/**\n* Returns an array of iterated values.\n*\n* @private\n* @param {Object} it - iterator\n* @param {Function} clbk - callback to invoke for each iterated value\n* @param {*} thisArg - invocation context\n* @returns {(Array|TypeError)} array or an error\n*/\nfunction fromIteratorMap( it, clbk, thisArg ) {\n\tvar out;\n\tvar v;\n\tvar z;\n\tvar i;\n\n\tout = [];\n\ti = -1;\n\twhile ( true ) {\n\t\tv = it.next();\n\t\tif ( v.done ) {\n\t\t\tbreak;\n\t\t}\n\t\ti += 1;\n\t\tz = clbk.call( thisArg, v.value, i );\n\t\tif ( isArrayLikeObject( z ) && z.length >= 2 ) {\n\t\t\tout.push( z[ 0 ], z[ 1 ] );\n\t\t} else if ( isComplexLike( z ) ) {\n\t\t\tout.push( realf( z ), imagf( z ) );\n\t\t} else {\n\t\t\treturn new TypeError( format( 'invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', z ) );\n\t\t}\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default fromIteratorMap;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport realf from '@stdlib/complex-realf';\nimport imagf from '@stdlib/complex-imagf';\n\n\n// MAIN //\n\n/**\n* Returns a strided array of real and imaginary components.\n*\n* @private\n* @param {Float32Array} buf - output array\n* @param {Array} arr - array containing complex numbers\n* @returns {(Float32Array|null)} output array or null\n*/\nfunction fromArray( buf, arr ) {\n\tvar len;\n\tvar v;\n\tvar i;\n\tvar j;\n\n\tlen = arr.length;\n\tj = 0;\n\tfor ( i = 0; i < len; i++ ) {\n\t\tv = arr[ i ];\n\t\tif ( !isComplexLike( v ) ) {\n\t\t\treturn null;\n\t\t}\n\t\tbuf[ j ] = realf( v );\n\t\tbuf[ j+1 ] = imagf( v );\n\t\tj += 2; // stride\n\t}\n\treturn buf;\n}\n\n\n// EXPORTS //\n\nexport default fromArray;\n","/* eslint-disable no-restricted-syntax, max-lines, no-invalid-this */\n\n/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isNonNegativeInteger } from '@stdlib/assert-is-nonnegative-integer';\nimport isArrayLikeObject from '@stdlib/assert-is-array-like-object';\nimport isCollection from '@stdlib/assert-is-collection';\nimport isArrayBuffer from '@stdlib/assert-is-arraybuffer';\nimport isObject from '@stdlib/assert-is-object';\nimport isArray from '@stdlib/assert-is-array';\nimport isFunction from '@stdlib/assert-is-function';\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport isEven from '@stdlib/math-base-assert-is-even';\nimport isInteger from '@stdlib/math-base-assert-is-integer';\nimport hasIteratorSymbolSupport from '@stdlib/assert-has-iterator-symbol-support';\nimport ITERATOR_SYMBOL from '@stdlib/symbol-iterator';\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport setReadOnlyAccessor from '@stdlib/utils-define-nonenumerable-read-only-accessor';\nimport Float32Array from '@stdlib/array-float32';\nimport Complex64 from '@stdlib/complex-float32';\nimport format from '@stdlib/string-format';\nimport realf from '@stdlib/complex-realf';\nimport imagf from '@stdlib/complex-imagf';\nimport reinterpret64 from '@stdlib/strided-base-reinterpret-complex64';\nimport reinterpret128 from '@stdlib/strided-base-reinterpret-complex128';\nimport getter from '@stdlib/array-base-getter';\nimport accessorGetter from '@stdlib/array-base-accessor-getter';\nimport fromIterator from './from_iterator.js';\nimport fromIteratorMap from './from_iterator_map.js';\nimport fromArray from './from_array.js';\n\n\n// VARIABLES //\n\nvar BYTES_PER_ELEMENT = Float32Array.BYTES_PER_ELEMENT * 2;\nvar HAS_ITERATOR_SYMBOL = hasIteratorSymbolSupport();\n\n\n// FUNCTIONS //\n\n/**\n* Returns a boolean indicating if a value is a complex typed array.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a complex typed array\n*/\nfunction isComplexArray( value ) {\n\treturn (\n\t\tvalue instanceof Complex64Array ||\n\t\t(\n\t\t\ttypeof value === 'object' &&\n\t\t\tvalue !== null &&\n\t\t\t(\n\t\t\t\tvalue.constructor.name === 'Complex64Array' ||\n\t\t\t\tvalue.constructor.name === 'Complex128Array'\n\t\t\t) &&\n\t\t\ttypeof value._length === 'number' && // eslint-disable-line no-underscore-dangle\n\n\t\t\t// NOTE: we don't perform a more rigorous test here for a typed array for performance reasons, as robustly checking for a typed array instance could require walking the prototype tree and performing relatively expensive constructor checks...\n\t\t\ttypeof value._buffer === 'object' // eslint-disable-line no-underscore-dangle\n\t\t)\n\t);\n}\n\n/**\n* Returns a boolean indicating if a value is a complex typed array constructor.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a complex typed array constructor\n*/\nfunction isComplexArrayConstructor( value ) {\n\treturn (\n\t\tvalue === Complex64Array ||\n\n\t\t// NOTE: weaker test in order to avoid a circular dependency with Complex128Array...\n\t\tvalue.name === 'Complex128Array'\n\t);\n}\n\n/**\n* Returns a boolean indicating if a value is a `Complex64Array`.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a `Complex64Array`\n*/\nfunction isComplex64Array( value ) {\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\tvalue.constructor.name === 'Complex64Array' &&\n\t\tvalue.BYTES_PER_ELEMENT === BYTES_PER_ELEMENT\n\t);\n}\n\n/**\n* Returns a boolean indicating if a value is a `Complex128Array`.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a `Complex128Array`\n*/\nfunction isComplex128Array( value ) {\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\tvalue.constructor.name === 'Complex128Array' &&\n\t\tvalue.BYTES_PER_ELEMENT === BYTES_PER_ELEMENT*2\n\t);\n}\n\n\n// MAIN //\n\n/**\n* 64-bit complex number array constructor.\n*\n* @constructor\n* @param {(NonNegativeInteger|Collection|ArrayBuffer|Iterable)} [arg] - length, typed array, array-like object, buffer, or an iterable\n* @param {NonNegativeInteger} [byteOffset=0] - byte offset\n* @param {NonNegativeInteger} [length] - view length\n* @throws {RangeError} ArrayBuffer byte length must be a multiple of `8`\n* @throws {RangeError} array-like object and typed array input arguments must have a length which is a multiple of two\n* @throws {TypeError} if provided only a single argument, must provide a valid argument\n* @throws {TypeError} byte offset must be a nonnegative integer\n* @throws {RangeError} byte offset must be a multiple of `8`\n* @throws {TypeError} view length must be a positive multiple of `8`\n* @throws {RangeError} must provide sufficient memory to accommodate byte offset and view length requirements\n* @throws {TypeError} an iterator must return either a two element array containing real and imaginary components or a complex number\n* @returns {Complex64Array} complex number array\n*\n* @example\n* var arr = new Complex64Array();\n* // returns \n*\n* var len = arr.length;\n* // returns 0\n*\n* @example\n* var arr = new Complex64Array( 2 );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*\n* @example\n* var arr = new Complex64Array( [ 1.0, -1.0 ] );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* import ArrayBuffer from '@stdlib/array-buffer';\n*\n* var buf = new ArrayBuffer( 16 );\n* var arr = new Complex64Array( buf );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*\n* @example\n* import ArrayBuffer from '@stdlib/array-buffer';\n*\n* var buf = new ArrayBuffer( 16 );\n* var arr = new Complex64Array( buf, 8 );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* import ArrayBuffer from '@stdlib/array-buffer';\n*\n* var buf = new ArrayBuffer( 32 );\n* var arr = new Complex64Array( buf, 8, 2 );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*/\nfunction Complex64Array() {\n\tvar byteOffset;\n\tvar nargs;\n\tvar buf;\n\tvar len;\n\n\tnargs = arguments.length;\n\tif ( !(this instanceof Complex64Array) ) {\n\t\tif ( nargs === 0 ) {\n\t\t\treturn new Complex64Array();\n\t\t}\n\t\tif ( nargs === 1 ) {\n\t\t\treturn new Complex64Array( arguments[0] );\n\t\t}\n\t\tif ( nargs === 2 ) {\n\t\t\treturn new Complex64Array( arguments[0], arguments[1] );\n\t\t}\n\t\treturn new Complex64Array( arguments[0], arguments[1], arguments[2] );\n\t}\n\t// Create the underlying data buffer...\n\tif ( nargs === 0 ) {\n\t\tbuf = new Float32Array( 0 ); // backward-compatibility\n\t} else if ( nargs === 1 ) {\n\t\tif ( isNonNegativeInteger( arguments[0] ) ) {\n\t\t\tbuf = new Float32Array( arguments[0]*2 );\n\t\t} else if ( isCollection( arguments[0] ) ) {\n\t\t\tbuf = arguments[ 0 ];\n\t\t\tlen = buf.length;\n\n\t\t\t// If provided a \"generic\" array, peak at the first value, and, if the value is a complex number, try to process as an array of complex numbers, falling back to \"normal\" typed array initialization if we fail and ensuring consistency if the first value had not been a complex number...\n\t\t\tif ( len && isArray( buf ) && isComplexLike( buf[0] ) ) {\n\t\t\t\tbuf = fromArray( new Float32Array( len*2 ), buf );\n\t\t\t\tif ( buf === null ) {\n\t\t\t\t\t// We failed and we are now forced to allocate a new array :-(\n\t\t\t\t\tif ( !isEven( len ) ) {\n\t\t\t\t\t\tthrow new RangeError( format( 'invalid argument. Array-like object arguments must have a length which is a multiple of two. Length: `%u`.', len ) );\n\t\t\t\t\t}\n\t\t\t\t\t// We failed, so fall back to directly setting values...\n\t\t\t\t\tbuf = new Float32Array( arguments[0] );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ( isComplex64Array( buf ) ) {\n\t\t\t\t\tbuf = reinterpret64( buf, 0 );\n\t\t\t\t} else if ( isComplex128Array( buf ) ) {\n\t\t\t\t\tbuf = reinterpret128( buf, 0 );\n\t\t\t\t} else if ( !isEven( len ) ) {\n\t\t\t\t\tthrow new RangeError( format( 'invalid argument. Array-like object and typed array arguments must have a length which is a multiple of two. Length: `%u`.', len ) );\n\t\t\t\t}\n\t\t\t\tbuf = new Float32Array( buf );\n\t\t\t}\n\t\t} else if ( isArrayBuffer( arguments[0] ) ) {\n\t\t\tbuf = arguments[ 0 ];\n\t\t\tif ( !isInteger( buf.byteLength/BYTES_PER_ELEMENT ) ) {\n\t\t\t\tthrow new RangeError( format( 'invalid argument. ArrayBuffer byte length must be a multiple of %u. Byte length: `%u`.', BYTES_PER_ELEMENT, buf.byteLength ) );\n\t\t\t}\n\t\t\tbuf = new Float32Array( buf );\n\t\t} else if ( isObject( arguments[0] ) ) {\n\t\t\tbuf = arguments[ 0 ];\n\t\t\tif ( HAS_ITERATOR_SYMBOL === false ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Environment lacks Symbol.iterator support. Must provide a length, ArrayBuffer, typed array, or array-like object. Value: `%s`.', buf ) );\n\t\t\t}\n\t\t\tif ( !isFunction( buf[ ITERATOR_SYMBOL ] ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.', buf ) );\n\t\t\t}\n\t\t\tbuf = buf[ ITERATOR_SYMBOL ]();\n\t\t\tif ( !isFunction( buf.next ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.', buf ) );\n\t\t\t}\n\t\t\tbuf = fromIterator( buf );\n\t\t\tif ( buf instanceof Error ) {\n\t\t\t\tthrow buf;\n\t\t\t}\n\t\t\tbuf = new Float32Array( buf );\n\t\t} else {\n\t\t\tthrow new TypeError( format( 'invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.', arguments[0] ) );\n\t\t}\n\t} else {\n\t\tbuf = arguments[ 0 ];\n\t\tif ( !isArrayBuffer( buf ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. First argument must be an ArrayBuffer. Value: `%s`.', buf ) );\n\t\t}\n\t\tbyteOffset = arguments[ 1 ];\n\t\tif ( !isNonNegativeInteger( byteOffset ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Byte offset must be a nonnegative integer. Value: `%s`.', byteOffset ) );\n\t\t}\n\t\tif ( !isInteger( byteOffset/BYTES_PER_ELEMENT ) ) {\n\t\t\tthrow new RangeError( format( 'invalid argument. Byte offset must be a multiple of %u. Value: `%u`.', BYTES_PER_ELEMENT, byteOffset ) );\n\t\t}\n\t\tif ( nargs === 2 ) {\n\t\t\tlen = buf.byteLength - byteOffset;\n\t\t\tif ( !isInteger( len/BYTES_PER_ELEMENT ) ) {\n\t\t\t\tthrow new RangeError( format( 'invalid arguments. ArrayBuffer view byte length must be a multiple of %u. View byte length: `%u`.', BYTES_PER_ELEMENT, len ) );\n\t\t\t}\n\t\t\tbuf = new Float32Array( buf, byteOffset );\n\t\t} else {\n\t\t\tlen = arguments[ 2 ];\n\t\t\tif ( !isNonNegativeInteger( len ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Length must be a nonnegative integer. Value: `%s`.', len ) );\n\t\t\t}\n\t\t\tif ( (len*BYTES_PER_ELEMENT) > (buf.byteLength-byteOffset) ) {\n\t\t\t\tthrow new RangeError( format( 'invalid arguments. ArrayBuffer has insufficient capacity. Either decrease the array length or provide a bigger buffer. Minimum capacity: `%u`.', len*BYTES_PER_ELEMENT ) );\n\t\t\t}\n\t\t\tbuf = new Float32Array( buf, byteOffset, len*2 );\n\t\t}\n\t}\n\tsetReadOnly( this, '_buffer', buf );\n\tsetReadOnly( this, '_length', buf.length/2 );\n\n\treturn this;\n}\n\n/**\n* Size (in bytes) of each array element.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex64Array\n* @readonly\n* @type {PositiveInteger}\n* @default 8\n*\n* @example\n* var nbytes = Complex64Array.BYTES_PER_ELEMENT;\n* // returns 8\n*/\nsetReadOnly( Complex64Array, 'BYTES_PER_ELEMENT', BYTES_PER_ELEMENT );\n\n/**\n* Constructor name.\n*\n* @name name\n* @memberof Complex64Array\n* @readonly\n* @type {string}\n* @default 'Complex64Array'\n*\n* @example\n* var str = Complex64Array.name;\n* // returns 'Complex64Array'\n*/\nsetReadOnly( Complex64Array, 'name', 'Complex64Array' );\n\n/**\n* Creates a new 64-bit complex number array from an array-like object or an iterable.\n*\n* @name from\n* @memberof Complex64Array\n* @type {Function}\n* @param {(Collection|Iterable)} src - array-like object or iterable\n* @param {Function} [clbk] - callback to invoke for each source element\n* @param {*} [thisArg] - context\n* @throws {TypeError} `this` context must be a constructor\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be an array-like object or an iterable\n* @throws {TypeError} second argument must be a function\n* @throws {RangeError} array-like objects must have a length which is a multiple of two\n* @throws {TypeError} an iterator must return either a two element array containing real and imaginary components or a complex number\n* @throws {TypeError} when provided an iterator, a callback must return either a two element array containing real and imaginary components or a complex number\n* @returns {Complex64Array} 64-bit complex number array\n*\n* @example\n* var arr = Complex64Array.from( [ 1.0, -1.0 ] );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n*\n* var arr = Complex64Array.from( [ new Complex64( 1.0, 1.0 ) ] );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* function clbk( v ) {\n* return new Complex64( realf(v)*2.0, imagf(v)*2.0 );\n* }\n*\n* var arr = Complex64Array.from( [ new Complex64( 1.0, 1.0 ) ], clbk );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*/\nsetReadOnly( Complex64Array, 'from', function from( src ) {\n\tvar thisArg;\n\tvar nargs;\n\tvar clbk;\n\tvar out;\n\tvar buf;\n\tvar tmp;\n\tvar get;\n\tvar len;\n\tvar flg;\n\tvar v;\n\tvar i;\n\tvar j;\n\tif ( !isFunction( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` context must be a constructor.' );\n\t}\n\tif ( !isComplexArrayConstructor( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tnargs = arguments.length;\n\tif ( nargs > 1 ) {\n\t\tclbk = arguments[ 1 ];\n\t\tif ( !isFunction( clbk ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be a function. Value: `%s`.', clbk ) );\n\t\t}\n\t\tif ( nargs > 2 ) {\n\t\t\tthisArg = arguments[ 2 ];\n\t\t}\n\t}\n\tif ( isComplexArray( src ) ) {\n\t\tlen = src.length;\n\t\tif ( clbk ) {\n\t\t\tout = new this( len );\n\t\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\t\tj = 0;\n\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\tv = clbk.call( thisArg, src.get( i ), i );\n\t\t\t\tif ( isComplexLike( v ) ) {\n\t\t\t\t\tbuf[ j ] = realf( v );\n\t\t\t\t\tbuf[ j+1 ] = imagf( v );\n\t\t\t\t} else if ( isArrayLikeObject( v ) && v.length >= 2 ) {\n\t\t\t\t\tbuf[ j ] = v[ 0 ];\n\t\t\t\t\tbuf[ j+1 ] = v[ 1 ];\n\t\t\t\t} else {\n\t\t\t\t\tthrow new TypeError( format( 'invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', v ) );\n\t\t\t\t}\n\t\t\t\tj += 2; // stride\n\t\t\t}\n\t\t\treturn out;\n\t\t}\n\t\treturn new this( src );\n\t}\n\tif ( isCollection( src ) ) {\n\t\tif ( clbk ) {\n\t\t\t// Note: array contents affect how we iterate over a provided data source. If only complex number objects, we can extract real and imaginary components. Otherwise, for non-complex number arrays (e.g., `Float64Array`, etc), we assume a strided array where real and imaginary components are interleaved. In the former case, we expect a callback to return real and imaginary components (possibly as a complex number). In the latter case, we expect a callback to return *either* a real or imaginary component.\n\n\t\t\tlen = src.length;\n\t\t\tif ( src.get && src.set ) {\n\t\t\t\tget = accessorGetter( 'default' );\n\t\t\t} else {\n\t\t\t\tget = getter( 'default' );\n\t\t\t}\n\t\t\t// Detect whether we've been provided an array which returns complex number objects...\n\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\tif ( !isComplexLike( get( src, i ) ) ) {\n\t\t\t\t\tflg = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// If an array does not contain only complex number objects, then we assume interleaved real and imaginary components...\n\t\t\tif ( flg ) {\n\t\t\t\tif ( !isEven( len ) ) {\n\t\t\t\t\tthrow new RangeError( format( 'invalid argument. First argument must have a length which is a multiple of %u. Length: `%u`.', 2, len ) );\n\t\t\t\t}\n\t\t\t\tout = new this( len/2 );\n\t\t\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\t\tbuf[ i ] = clbk.call( thisArg, get( src, i ), i );\n\t\t\t\t}\n\t\t\t\treturn out;\n\t\t\t}\n\t\t\t// If an array contains only complex number objects, then we need to extract real and imaginary components...\n\t\t\tout = new this( len );\n\t\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\t\tj = 0;\n\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\tv = clbk.call( thisArg, get( src, i ), i );\n\t\t\t\tif ( isComplexLike( v ) ) {\n\t\t\t\t\tbuf[ j ] = realf( v );\n\t\t\t\t\tbuf[ j+1 ] = imagf( v );\n\t\t\t\t} else if ( isArrayLikeObject( v ) && v.length >= 2 ) {\n\t\t\t\t\tbuf[ j ] = v[ 0 ];\n\t\t\t\t\tbuf[ j+1 ] = v[ 1 ];\n\t\t\t\t} else {\n\t\t\t\t\tthrow new TypeError( format( 'invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', v ) );\n\t\t\t\t}\n\t\t\t\tj += 2; // stride\n\t\t\t}\n\t\t\treturn out;\n\t\t}\n\t\treturn new this( src );\n\t}\n\tif ( isObject( src ) && HAS_ITERATOR_SYMBOL && isFunction( src[ ITERATOR_SYMBOL ] ) ) { // eslint-disable-line max-len\n\t\tbuf = src[ ITERATOR_SYMBOL ]();\n\t\tif ( !isFunction( buf.next ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.', src ) );\n\t\t}\n\t\tif ( clbk ) {\n\t\t\ttmp = fromIteratorMap( buf, clbk, thisArg );\n\t\t} else {\n\t\t\ttmp = fromIterator( buf );\n\t\t}\n\t\tif ( tmp instanceof Error ) {\n\t\t\tthrow tmp;\n\t\t}\n\t\tlen = tmp.length / 2;\n\t\tout = new this( len );\n\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\tbuf[ i ] = tmp[ i ];\n\t\t}\n\t\treturn out;\n\t}\n\tthrow new TypeError( format( 'invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.', src ) );\n});\n\n/**\n* Creates a new 64-bit complex number array from a variable number of arguments.\n*\n* @name of\n* @memberof Complex64Array\n* @type {Function}\n* @param {...*} element - array elements\n* @throws {TypeError} `this` context must be a constructor\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Complex64Array} 64-bit complex number array\n*\n* @example\n* var arr = Complex64Array.of( 1.0, 1.0, 1.0, 1.0 );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*/\nsetReadOnly( Complex64Array, 'of', function of() {\n\tvar args;\n\tvar i;\n\tif ( !isFunction( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` context must be a constructor.' );\n\t}\n\tif ( !isComplexArrayConstructor( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\targs = [];\n\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\targs.push( arguments[ i ] );\n\t}\n\treturn new this( args );\n});\n\n/**\n* Pointer to the underlying data buffer.\n*\n* @name buffer\n* @memberof Complex64Array.prototype\n* @readonly\n* @type {ArrayBuffer}\n*\n* @example\n* var arr = new Complex64Array( 10 );\n*\n* var buf = arr.buffer;\n* // returns \n*/\nsetReadOnlyAccessor( Complex64Array.prototype, 'buffer', function get() {\n\treturn this._buffer.buffer;\n});\n\n/**\n* Size (in bytes) of the array.\n*\n* @name byteLength\n* @memberof Complex64Array.prototype\n* @readonly\n* @type {NonNegativeInteger}\n*\n* @example\n* var arr = new Complex64Array( 10 );\n*\n* var byteLength = arr.byteLength;\n* // returns 80\n*/\nsetReadOnlyAccessor( Complex64Array.prototype, 'byteLength', function get() {\n\treturn this._buffer.byteLength;\n});\n\n/**\n* Offset (in bytes) of the array from the start of its underlying `ArrayBuffer`.\n*\n* @name byteOffset\n* @memberof Complex64Array.prototype\n* @readonly\n* @type {NonNegativeInteger}\n*\n* @example\n* var arr = new Complex64Array( 10 );\n*\n* var byteOffset = arr.byteOffset;\n* // returns 0\n*/\nsetReadOnlyAccessor( Complex64Array.prototype, 'byteOffset', function get() {\n\treturn this._buffer.byteOffset;\n});\n\n/**\n* Size (in bytes) of each array element.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex64Array.prototype\n* @readonly\n* @type {PositiveInteger}\n* @default 8\n*\n* @example\n* var arr = new Complex64Array( 10 );\n*\n* var nbytes = arr.BYTES_PER_ELEMENT;\n* // returns 8\n*/\nsetReadOnly( Complex64Array.prototype, 'BYTES_PER_ELEMENT', Complex64Array.BYTES_PER_ELEMENT );\n\n/**\n* Copies a sequence of elements within the array to the position starting at `target`.\n*\n* @name copyWithin\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {integer} target - index at which to start copying elements\n* @param {integer} start - source index at which to copy elements from\n* @param {integer} [end] - source index at which to stop copying elements from\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Complex64Array} modified array\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* var arr = new Complex64Array( 4 );\n*\n* // Set the array elements:\n* arr.set( new Complex64( 1.0, 1.0 ), 0 );\n* arr.set( new Complex64( 2.0, 2.0 ), 1 );\n* arr.set( new Complex64( 3.0, 3.0 ), 2 );\n* arr.set( new Complex64( 4.0, 4.0 ), 3 );\n*\n* // Copy the first two elements to the last two elements:\n* arr.copyWithin( 2, 0, 2 );\n*\n* // Get the last array element:\n* var z = arr.get( 3 );\n*\n* var re = realf( z );\n* // returns 2.0\n*\n* var im = imagf( z );\n* // returns 2.0\n*/\nsetReadOnly( Complex64Array.prototype, 'copyWithin', function copyWithin( target, start ) {\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\t// FIXME: prefer a functional `copyWithin` implementation which addresses lack of universal browser support (e.g., IE11 and Safari) or ensure that typed arrays are polyfilled\n\tif ( arguments.length === 2 ) {\n\t\tthis._buffer.copyWithin( target*2, start*2 );\n\t} else {\n\t\tthis._buffer.copyWithin( target*2, start*2, arguments[2]*2 );\n\t}\n\treturn this;\n});\n\n/**\n* Returns an iterator for iterating over array key-value pairs.\n*\n* @name entries\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Iterator} iterator\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n*\n* var arr = [\n* new Complex64( 1.0, 1.0 ),\n* new Complex64( 2.0, 2.0 ),\n* new Complex64( 3.0, 3.0 )\n* ];\n* arr = new Complex64Array( arr );\n*\n* // Create an iterator:\n* var it = arr.entries();\n*\n* // Iterate over the key-value pairs...\n* var v = it.next().value;\n* // returns [ 0, ]\n*\n* v = it.next().value;\n* // returns [ 1, ]\n*\n* v = it.next().value;\n* // returns [ 2, ]\n*\n* var bool = it.next().done;\n* // returns true\n*/\nsetReadOnly( Complex64Array.prototype, 'entries', function entries() {\n\tvar buffer;\n\tvar self;\n\tvar iter;\n\tvar len;\n\tvar FLG;\n\tvar i;\n\tvar j;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tself = this;\n\tbuffer = this._buffer;\n\tlen = this._length;\n\n\t// Initialize the iteration indices:\n\ti = -1;\n\tj = -2;\n\n\t// Create an iterator protocol-compliant object:\n\titer = {};\n\tsetReadOnly( iter, 'next', next );\n\tsetReadOnly( iter, 'return', end );\n\n\tif ( ITERATOR_SYMBOL ) {\n\t\tsetReadOnly( iter, ITERATOR_SYMBOL, factory );\n\t}\n\treturn iter;\n\n\t/**\n\t* Returns an iterator protocol-compliant object containing the next iterated value.\n\t*\n\t* @private\n\t* @returns {Object} iterator protocol-compliant object\n\t*/\n\tfunction next() {\n\t\tvar z;\n\t\ti += 1;\n\t\tif ( FLG || i >= len ) {\n\t\t\treturn {\n\t\t\t\t'done': true\n\t\t\t};\n\t\t}\n\t\tj += 2;\n\t\tz = new Complex64( buffer[ j ], buffer[ j+1 ] );\n\t\treturn {\n\t\t\t'value': [ i, z ],\n\t\t\t'done': false\n\t\t};\n\t}\n\n\t/**\n\t* Finishes an iterator.\n\t*\n\t* @private\n\t* @param {*} [value] - value to return\n\t* @returns {Object} iterator protocol-compliant object\n\t*/\n\tfunction end( value ) {\n\t\tFLG = true;\n\t\tif ( arguments.length ) {\n\t\t\treturn {\n\t\t\t\t'value': value,\n\t\t\t\t'done': true\n\t\t\t};\n\t\t}\n\t\treturn {\n\t\t\t'done': true\n\t\t};\n\t}\n\n\t/**\n\t* Returns a new iterator.\n\t*\n\t* @private\n\t* @returns {Iterator} iterator\n\t*/\n\tfunction factory() {\n\t\treturn self.entries();\n\t}\n});\n\n/**\n* Returns an array element.\n*\n* @name get\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {NonNegativeInteger} idx - element index\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} must provide a nonnegative integer\n* @returns {(Complex64|void)} array element\n*\n* @example\n* var arr = new Complex64Array( 10 );\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* var z = arr.get( 0 );\n* // returns \n*\n* var re = realf( z );\n* // returns 0.0\n*\n* var im = imagf( z );\n* // returns 0.0\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n*\n* z = arr.get( 0 );\n* // returns \n*\n* re = realf( z );\n* // returns 1.0\n*\n* im = imagf( z );\n* // returns -1.0\n*\n* z = arr.get( 100 );\n* // returns undefined\n*/\nsetReadOnly( Complex64Array.prototype, 'get', function get( idx ) {\n\tvar buf;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isNonNegativeInteger( idx ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Must provide a nonnegative integer. Value: `%s`.', idx ) );\n\t}\n\tif ( idx >= this._length ) {\n\t\treturn;\n\t}\n\tbuf = this._buffer;\n\tidx *= 2;\n\treturn new Complex64( buf[ idx ], buf[ idx+1 ] );\n});\n\n/**\n* Number of array elements.\n*\n* @name length\n* @memberof Complex64Array.prototype\n* @readonly\n* @type {NonNegativeInteger}\n*\n* @example\n* var arr = new Complex64Array( 10 );\n*\n* var len = arr.length;\n* // returns 10\n*/\nsetReadOnlyAccessor( Complex64Array.prototype, 'length', function get() {\n\treturn this._length;\n});\n\n/**\n* Sets an array element.\n*\n* ## Notes\n*\n* - When provided a typed array, real or complex, we must check whether the source array shares the same buffer as the target array and whether the underlying memory overlaps. In particular, we are concerned with the following scenario:\n*\n* ```text\n* buf: ---------------------\n* src: ---------------------\n* ```\n*\n* In the above, as we copy values from `src`, we will overwrite values in the `src` view, resulting in duplicated values copied into the end of `buf`, which is not intended. Hence, to avoid overwriting source values, we must **copy** source values to a temporary array.\n*\n* In the other overlapping scenario,\n*\n* ```text\n* buf: ---------------------\n* src: ---------------------\n* ```\n*\n* by the time we begin copying into the overlapping region, we are copying from the end of `src`, a non-overlapping region, which means we don't run the risk of copying copied values, rather than the original `src` values as intended.\n*\n*\n* @name set\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {(Collection|Complex|ComplexArray)} value - value(s)\n* @param {NonNegativeInteger} [i=0] - element index at which to start writing values\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be either a complex number, an array-like object, or a complex number array\n* @throws {TypeError} index argument must be a nonnegative integer\n* @throws {RangeError} array-like objects must have a length which is a multiple of two\n* @throws {RangeError} index argument is out-of-bounds\n* @throws {RangeError} target array lacks sufficient storage to accommodate source values\n* @returns {void}\n*\n* @example\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* var arr = new Complex64Array( 10 );\n*\n* var z = arr.get( 0 );\n* // returns \n*\n* var re = realf( z );\n* // returns 0.0\n*\n* var im = imagf( z );\n* // returns 0.0\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n*\n* z = arr.get( 0 );\n* // returns \n*\n* re = realf( z );\n* // returns 1.0\n*\n* im = imagf( z );\n* // returns -1.0\n*/\nsetReadOnly( Complex64Array.prototype, 'set', function set( value ) {\n\t/* eslint-disable no-underscore-dangle */\n\tvar sbuf;\n\tvar idx;\n\tvar buf;\n\tvar tmp;\n\tvar flg;\n\tvar N;\n\tvar v;\n\tvar i;\n\tvar j;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tbuf = this._buffer;\n\tif ( arguments.length > 1 ) {\n\t\tidx = arguments[ 1 ];\n\t\tif ( !isNonNegativeInteger( idx ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Index argument must be a nonnegative integer. Value: `%s`.', idx ) );\n\t\t}\n\t} else {\n\t\tidx = 0;\n\t}\n\tif ( isComplexLike( value ) ) {\n\t\tif ( idx >= this._length ) {\n\t\t\tthrow new RangeError( format( 'invalid argument. Index argument is out-of-bounds. Value: `%u`.', idx ) );\n\t\t}\n\t\tidx *= 2;\n\t\tbuf[ idx ] = realf( value );\n\t\tbuf[ idx+1 ] = imagf( value );\n\t\treturn;\n\t}\n\tif ( isComplexArray( value ) ) {\n\t\tN = value._length;\n\t\tif ( idx+N > this._length ) {\n\t\t\tthrow new RangeError( 'invalid arguments. Target array lacks sufficient storage to accommodate source values.' );\n\t\t}\n\t\tsbuf = value._buffer;\n\n\t\t// Check for overlapping memory...\n\t\tj = buf.byteOffset + (idx*BYTES_PER_ELEMENT);\n\t\tif (\n\t\t\tsbuf.buffer === buf.buffer &&\n\t\t\t(\n\t\t\t\tsbuf.byteOffset < j &&\n\t\t\t\tsbuf.byteOffset+sbuf.byteLength > j\n\t\t\t)\n\t\t) {\n\t\t\t// We need to copy source values...\n\t\t\ttmp = new Float32Array( sbuf.length );\n\t\t\tfor ( i = 0; i < sbuf.length; i++ ) {\n\t\t\t\ttmp[ i ] = sbuf[ i ];\n\t\t\t}\n\t\t\tsbuf = tmp;\n\t\t}\n\t\tidx *= 2;\n\t\tj = 0;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\tbuf[ idx ] = sbuf[ j ];\n\t\t\tbuf[ idx+1 ] = sbuf[ j+1 ];\n\t\t\tidx += 2; // stride\n\t\t\tj += 2; // stride\n\t\t}\n\t\treturn;\n\t}\n\tif ( isCollection( value ) ) {\n\t\t// Detect whether we've been provided an array of complex numbers...\n\t\tN = value.length;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\tif ( !isComplexLike( value[ i ] ) ) {\n\t\t\t\tflg = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t// If an array does not contain only complex numbers, then we assume interleaved real and imaginary components...\n\t\tif ( flg ) {\n\t\t\tif ( !isEven( N ) ) {\n\t\t\t\tthrow new RangeError( format( 'invalid argument. Array-like object arguments must have a length which is a multiple of two. Length: `%u`.', N ) );\n\t\t\t}\n\t\t\tif ( idx+(N/2) > this._length ) {\n\t\t\t\tthrow new RangeError( 'invalid arguments. Target array lacks sufficient storage to accommodate source values.' );\n\t\t\t}\n\t\t\tsbuf = value;\n\n\t\t\t// Check for overlapping memory...\n\t\t\tj = buf.byteOffset + (idx*BYTES_PER_ELEMENT);\n\t\t\tif (\n\t\t\t\tsbuf.buffer === buf.buffer &&\n\t\t\t\t(\n\t\t\t\t\tsbuf.byteOffset < j &&\n\t\t\t\t\tsbuf.byteOffset+sbuf.byteLength > j\n\t\t\t\t)\n\t\t\t) {\n\t\t\t\t// We need to copy source values...\n\t\t\t\ttmp = new Float32Array( N );\n\t\t\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\t\t\ttmp[ i ] = sbuf[ i ];\n\t\t\t\t}\n\t\t\t\tsbuf = tmp;\n\t\t\t}\n\t\t\tidx *= 2;\n\t\t\tN /= 2;\n\t\t\tj = 0;\n\t\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\t\tbuf[ idx ] = sbuf[ j ];\n\t\t\t\tbuf[ idx+1 ] = sbuf[ j+1 ];\n\t\t\t\tidx += 2; // stride\n\t\t\t\tj += 2; // stride\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\t// If an array contains only complex numbers, then we need to extract real and imaginary components...\n\t\tif ( idx+N > this._length ) {\n\t\t\tthrow new RangeError( 'invalid arguments. Target array lacks sufficient storage to accommodate source values.' );\n\t\t}\n\t\tidx *= 2;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\tv = value[ i ];\n\t\t\tbuf[ idx ] = realf( v );\n\t\t\tbuf[ idx+1 ] = imagf( v );\n\t\t\tidx += 2; // stride\n\t\t}\n\t\treturn;\n\t}\n\tthrow new TypeError( format( 'invalid argument. First argument must be either a complex number, an array-like object, or a complex number array. Value: `%s`.', value ) );\n\n\t/* eslint-enable no-underscore-dangle */\n});\n\n\n// EXPORTS //\n\nexport default Complex64Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Returns the real component of a double-precision complex floating-point number.\n*\n* @param {Complex} z - complex number\n* @returns {number} real component\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n*\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var re = real( z );\n* // returns 5.0\n*/\nfunction real( z ) {\n\treturn z.re;\n}\n\n\n// EXPORTS //\n\nexport default real;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Returns the imaginary component of a double-precision complex floating-point number.\n*\n* @param {Complex} z - complex number\n* @returns {number} imaginary component\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n*\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var im = imag( z );\n* // returns 3.0\n*/\nfunction imag( z ) {\n\treturn z.im;\n}\n\n\n// EXPORTS //\n\nexport default imag;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isArrayLikeObject from '@stdlib/assert-is-array-like-object';\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport format from '@stdlib/string-format';\nimport real from '@stdlib/complex-real';\nimport imag from '@stdlib/complex-imag';\n\n\n// MAIN //\n\n/**\n* Returns an array of iterated values.\n*\n* @private\n* @param {Object} it - iterator\n* @returns {(Array|TypeError)} array or an error\n*/\nfunction fromIterator( it ) {\n\tvar out;\n\tvar v;\n\tvar z;\n\n\tout = [];\n\twhile ( true ) {\n\t\tv = it.next();\n\t\tif ( v.done ) {\n\t\t\tbreak;\n\t\t}\n\t\tz = v.value;\n\t\tif ( isArrayLikeObject( z ) && z.length >= 2 ) {\n\t\t\tout.push( z[ 0 ], z[ 1 ] );\n\t\t} else if ( isComplexLike( z ) ) {\n\t\t\tout.push( real( z ), imag( z ) );\n\t\t} else {\n\t\t\treturn new TypeError( format( 'invalid argument. An iterator must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', z ) );\n\t\t}\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default fromIterator;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isArrayLikeObject from '@stdlib/assert-is-array-like-object';\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport format from '@stdlib/string-format';\nimport real from '@stdlib/complex-real';\nimport imag from '@stdlib/complex-imag';\n\n\n// MAIN //\n\n/**\n* Returns an array of iterated values.\n*\n* @private\n* @param {Object} it - iterator\n* @param {Function} clbk - callback to invoke for each iterated value\n* @param {*} thisArg - invocation context\n* @returns {(Array|TypeError)} array or an error\n*/\nfunction fromIteratorMap( it, clbk, thisArg ) {\n\tvar out;\n\tvar v;\n\tvar z;\n\tvar i;\n\n\tout = [];\n\ti = -1;\n\twhile ( true ) {\n\t\tv = it.next();\n\t\tif ( v.done ) {\n\t\t\tbreak;\n\t\t}\n\t\ti += 1;\n\t\tz = clbk.call( thisArg, v.value, i );\n\t\tif ( isArrayLikeObject( z ) && z.length >= 2 ) {\n\t\t\tout.push( z[ 0 ], z[ 1 ] );\n\t\t} else if ( isComplexLike( z ) ) {\n\t\t\tout.push( real( z ), imag( z ) );\n\t\t} else {\n\t\t\treturn new TypeError( format( 'invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', z ) );\n\t\t}\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default fromIteratorMap;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport real from '@stdlib/complex-real';\nimport imag from '@stdlib/complex-imag';\n\n\n// MAIN //\n\n/**\n* Returns a strided array of real and imaginary components.\n*\n* @private\n* @param {Float64Array} buf - output array\n* @param {Array} arr - array containing complex numbers\n* @returns {(Float64Array|null)} output array or null\n*/\nfunction fromArray( buf, arr ) {\n\tvar len;\n\tvar v;\n\tvar i;\n\tvar j;\n\n\tlen = arr.length;\n\tj = 0;\n\tfor ( i = 0; i < len; i++ ) {\n\t\tv = arr[ i ];\n\t\tif ( !isComplexLike( v ) ) {\n\t\t\treturn null;\n\t\t}\n\t\tbuf[ j ] = real( v );\n\t\tbuf[ j+1 ] = imag( v );\n\t\tj += 2; // stride\n\t}\n\treturn buf;\n}\n\n\n// EXPORTS //\n\nexport default fromArray;\n","/* eslint-disable no-restricted-syntax, max-lines, no-invalid-this */\n\n/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isNonNegativeInteger } from '@stdlib/assert-is-nonnegative-integer';\nimport isArrayLikeObject from '@stdlib/assert-is-array-like-object';\nimport isCollection from '@stdlib/assert-is-collection';\nimport isArrayBuffer from '@stdlib/assert-is-arraybuffer';\nimport isObject from '@stdlib/assert-is-object';\nimport isArray from '@stdlib/assert-is-array';\nimport isFunction from '@stdlib/assert-is-function';\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport isEven from '@stdlib/math-base-assert-is-even';\nimport isInteger from '@stdlib/math-base-assert-is-integer';\nimport hasIteratorSymbolSupport from '@stdlib/assert-has-iterator-symbol-support';\nimport ITERATOR_SYMBOL from '@stdlib/symbol-iterator';\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport setReadOnlyAccessor from '@stdlib/utils-define-nonenumerable-read-only-accessor';\nimport Float64Array from '@stdlib/array-float64';\nimport Complex128 from '@stdlib/complex-float64';\nimport real from '@stdlib/complex-real';\nimport imag from '@stdlib/complex-imag';\nimport reinterpret64 from '@stdlib/strided-base-reinterpret-complex64';\nimport reinterpret128 from '@stdlib/strided-base-reinterpret-complex128';\nimport getter from '@stdlib/array-base-getter';\nimport accessorGetter from '@stdlib/array-base-accessor-getter';\nimport format from '@stdlib/string-format';\nimport fromIterator from './from_iterator.js';\nimport fromIteratorMap from './from_iterator_map.js';\nimport fromArray from './from_array.js';\n\n\n// VARIABLES //\n\nvar BYTES_PER_ELEMENT = Float64Array.BYTES_PER_ELEMENT * 2;\nvar HAS_ITERATOR_SYMBOL = hasIteratorSymbolSupport();\n\n\n// FUNCTIONS //\n\n/**\n* Returns a boolean indicating if a value is a complex typed array.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a complex typed array\n*/\nfunction isComplexArray( value ) {\n\treturn (\n\t\tvalue instanceof Complex128Array ||\n\t\t(\n\t\t\ttypeof value === 'object' &&\n\t\t\tvalue !== null &&\n\t\t\t(\n\t\t\t\tvalue.constructor.name === 'Complex64Array' ||\n\t\t\t\tvalue.constructor.name === 'Complex128Array'\n\t\t\t) &&\n\t\t\ttypeof value._length === 'number' && // eslint-disable-line no-underscore-dangle\n\n\t\t\t// NOTE: we don't perform a more rigorous test here for a typed array for performance reasons, as robustly checking for a typed array instance could require walking the prototype tree and performing relatively expensive constructor checks...\n\t\t\ttypeof value._buffer === 'object' // eslint-disable-line no-underscore-dangle\n\t\t)\n\t);\n}\n\n/**\n* Returns a boolean indicating if a value is a complex typed array constructor.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a complex typed array constructor\n*/\nfunction isComplexArrayConstructor( value ) {\n\treturn (\n\t\tvalue === Complex128Array ||\n\n\t\t// NOTE: weaker test in order to avoid a circular dependency with Complex64Array...\n\t\tvalue.name === 'Complex64Array'\n\t);\n}\n\n/**\n* Returns a boolean indicating if a value is a `Complex64Array`.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a `Complex64Array`\n*/\nfunction isComplex64Array( value ) {\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\tvalue.constructor.name === 'Complex64Array' &&\n\t\tvalue.BYTES_PER_ELEMENT === BYTES_PER_ELEMENT/2\n\t);\n}\n\n/**\n* Returns a boolean indicating if a value is a `Complex128Array`.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a `Complex128Array`\n*/\nfunction isComplex128Array( value ) {\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\tvalue.constructor.name === 'Complex128Array' &&\n\t\tvalue.BYTES_PER_ELEMENT === BYTES_PER_ELEMENT\n\t);\n}\n\n\n// MAIN //\n\n/**\n* 128-bit complex number array constructor.\n*\n* @constructor\n* @param {(NonNegativeInteger|Collection|ArrayBuffer|Iterable)} [arg] - length, typed array, array-like object, buffer, or iterable\n* @param {NonNegativeInteger} [byteOffset=0] - byte offset\n* @param {NonNegativeInteger} [length] - view length\n* @throws {RangeError} ArrayBuffer byte length must be a multiple of `16`\n* @throws {RangeError} array-like object and typed array input arguments must have a length which is a multiple of two\n* @throws {TypeError} if provided only a single argument, must provide a valid argument\n* @throws {TypeError} byte offset must be a nonnegative integer\n* @throws {RangeError} byte offset must be a multiple of `16`\n* @throws {TypeError} view length must be a positive multiple of `16`\n* @throws {RangeError} must provide sufficient memory to accommodate byte offset and view length requirements\n* @throws {TypeError} an iterator must return either a two element array containing real and imaginary components or a complex number\n* @returns {Complex128Array} complex number array\n*\n* @example\n* var arr = new Complex128Array();\n* // returns \n*\n* var len = arr.length;\n* // returns 0\n*\n* @example\n* var arr = new Complex128Array( 2 );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*\n* @example\n* var arr = new Complex128Array( [ 1.0, -1.0 ] );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* import ArrayBuffer from '@stdlib/array-buffer';\n*\n* var buf = new ArrayBuffer( 32 );\n* var arr = new Complex128Array( buf );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*\n* @example\n* import ArrayBuffer from '@stdlib/array-buffer';\n*\n* var buf = new ArrayBuffer( 32 );\n* var arr = new Complex128Array( buf, 16 );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* import ArrayBuffer from '@stdlib/array-buffer';\n*\n* var buf = new ArrayBuffer( 64 );\n* var arr = new Complex128Array( buf, 16, 2 );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*/\nfunction Complex128Array() {\n\tvar byteOffset;\n\tvar nargs;\n\tvar buf;\n\tvar len;\n\n\tnargs = arguments.length;\n\tif ( !(this instanceof Complex128Array) ) {\n\t\tif ( nargs === 0 ) {\n\t\t\treturn new Complex128Array();\n\t\t}\n\t\tif ( nargs === 1 ) {\n\t\t\treturn new Complex128Array( arguments[0] );\n\t\t}\n\t\tif ( nargs === 2 ) {\n\t\t\treturn new Complex128Array( arguments[0], arguments[1] );\n\t\t}\n\t\treturn new Complex128Array( arguments[0], arguments[1], arguments[2] );\n\t}\n\t// Create the underlying data buffer...\n\tif ( nargs === 0 ) {\n\t\tbuf = new Float64Array( 0 ); // backward-compatibility\n\t} else if ( nargs === 1 ) {\n\t\tif ( isNonNegativeInteger( arguments[0] ) ) {\n\t\t\tbuf = new Float64Array( arguments[0]*2 );\n\t\t} else if ( isCollection( arguments[0] ) ) {\n\t\t\tbuf = arguments[ 0 ];\n\t\t\tlen = buf.length;\n\n\t\t\t// If provided a \"generic\" array, peak at the first value, and, if the value is a complex number, try to process as an array of complex numbers, falling back to \"normal\" typed array initialization if we fail and ensuring consistency if the first value had not been a complex number...\n\t\t\tif ( len && isArray( buf ) && isComplexLike( buf[0] ) ) {\n\t\t\t\tbuf = fromArray( new Float64Array( len*2 ), buf );\n\t\t\t\tif ( buf === null ) {\n\t\t\t\t\t// We failed and we are now forced to allocate a new array :-(\n\t\t\t\t\tif ( !isEven( len ) ) {\n\t\t\t\t\t\tthrow new RangeError( format( 'invalid argument. Array-like object arguments must have a length which is a multiple of two. Length: `%u`.', len ) );\n\t\t\t\t\t}\n\t\t\t\t\t// We failed, so fall back to directly setting values...\n\t\t\t\t\tbuf = new Float64Array( arguments[0] );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ( isComplex64Array( buf ) ) {\n\t\t\t\t\tbuf = reinterpret64( buf, 0 );\n\t\t\t\t} else if ( isComplex128Array( buf ) ) {\n\t\t\t\t\tbuf = reinterpret128( buf, 0 );\n\t\t\t\t} else if ( !isEven( len ) ) {\n\t\t\t\t\tthrow new RangeError( format( 'invalid argument. Array-like object and typed array arguments must have a length which is a multiple of two. Length: `%u`.', len ) );\n\t\t\t\t}\n\t\t\t\tbuf = new Float64Array( buf );\n\t\t\t}\n\t\t} else if ( isArrayBuffer( arguments[0] ) ) {\n\t\t\tbuf = arguments[ 0 ];\n\t\t\tif ( !isInteger( buf.byteLength/BYTES_PER_ELEMENT ) ) {\n\t\t\t\tthrow new RangeError( format( 'invalid argument. ArrayBuffer byte length must be a multiple of %u. Byte length: `%u`.', BYTES_PER_ELEMENT, buf.byteLength ) );\n\t\t\t}\n\t\t\tbuf = new Float64Array( buf );\n\t\t} else if ( isObject( arguments[0] ) ) {\n\t\t\tbuf = arguments[ 0 ];\n\t\t\tif ( HAS_ITERATOR_SYMBOL === false ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Environment lacks Symbol.iterator support. Must provide a length, ArrayBuffer, typed array, or array-like object. Value: `%s`.', buf ) );\n\t\t\t}\n\t\t\tif ( !isFunction( buf[ ITERATOR_SYMBOL ] ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.', buf ) );\n\t\t\t}\n\t\t\tbuf = buf[ ITERATOR_SYMBOL ]();\n\t\t\tif ( !isFunction( buf.next ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.', buf ) );\n\t\t\t}\n\t\t\tbuf = fromIterator( buf );\n\t\t\tif ( buf instanceof Error ) {\n\t\t\t\tthrow buf;\n\t\t\t}\n\t\t\tbuf = new Float64Array( buf );\n\t\t} else {\n\t\t\tthrow new TypeError( format( 'invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.', arguments[0] ) );\n\t\t}\n\t} else {\n\t\tbuf = arguments[ 0 ];\n\t\tif ( !isArrayBuffer( buf ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. First argument must be an ArrayBuffer. Value: `%s`.', buf ) );\n\t\t}\n\t\tbyteOffset = arguments[ 1 ];\n\t\tif ( !isNonNegativeInteger( byteOffset ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Byte offset must be a nonnegative integer. Value: `%s`.', byteOffset ) );\n\t\t}\n\t\tif ( !isInteger( byteOffset/BYTES_PER_ELEMENT ) ) {\n\t\t\tthrow new RangeError( format( 'invalid argument. Byte offset must be a multiple of %u. Value: `%u`.', BYTES_PER_ELEMENT, byteOffset ) );\n\t\t}\n\t\tif ( nargs === 2 ) {\n\t\t\tlen = buf.byteLength - byteOffset;\n\t\t\tif ( !isInteger( len/BYTES_PER_ELEMENT ) ) {\n\t\t\t\tthrow new RangeError( format( 'invalid arguments. ArrayBuffer view byte length must be a multiple of %u. View byte length: `%u`.', BYTES_PER_ELEMENT, len ) );\n\t\t\t}\n\t\t\tbuf = new Float64Array( buf, byteOffset );\n\t\t} else {\n\t\t\tlen = arguments[ 2 ];\n\t\t\tif ( !isNonNegativeInteger( len ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Length must be a nonnegative integer. Value: `%s`.', len ) );\n\t\t\t}\n\t\t\tif ( (len*BYTES_PER_ELEMENT) > (buf.byteLength-byteOffset) ) {\n\t\t\t\tthrow new RangeError( format( 'invalid arguments. ArrayBuffer has insufficient capacity. Either decrease the array length or provide a bigger buffer. Minimum capacity: `%u`.', len*BYTES_PER_ELEMENT ) );\n\t\t\t}\n\t\t\tbuf = new Float64Array( buf, byteOffset, len*2 );\n\t\t}\n\t}\n\tsetReadOnly( this, '_buffer', buf );\n\tsetReadOnly( this, '_length', buf.length/2 );\n\n\treturn this;\n}\n\n/**\n* Size (in bytes) of each array element.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex128Array\n* @readonly\n* @type {PositiveInteger}\n* @default 16\n*\n* @example\n* var nbytes = Complex128Array.BYTES_PER_ELEMENT;\n* // returns 16\n*/\nsetReadOnly( Complex128Array, 'BYTES_PER_ELEMENT', BYTES_PER_ELEMENT );\n\n/**\n* Constructor name.\n*\n* @name name\n* @memberof Complex128Array\n* @readonly\n* @type {string}\n* @default 'Complex128Array'\n*\n* @example\n* var name = Complex128Array.name;\n* // returns 'Complex128Array'\n*/\nsetReadOnly( Complex128Array, 'name', 'Complex128Array' );\n\n/**\n* Creates a new 128-bit complex number array from an array-like object or an iterable.\n*\n* @name from\n* @memberof Complex128Array\n* @type {Function}\n* @param {(Collection|Object)} src - array-like object or iterable\n* @param {Function} [clbk] - callback to invoke for each source element\n* @param {*} [thisArg] - context\n* @throws {TypeError} `this` context must be a constructor\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be an array-like object or an iterable\n* @throws {TypeError} second argument must be a function\n* @throws {RangeError} array-like objects must have a length which is a multiple of two\n* @throws {TypeError} an iterator must return either a two element array containing real and imaginary components or a complex number\n* @throws {TypeError} when provided an iterator, a callback must return either a two element array containing real and imaginary components or a complex number\n* @returns {Complex128Array} 128-bit complex number array\n*\n* @example\n* var arr = Complex128Array.from( [ 1.0, -1.0 ] );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n*\n* var arr = Complex128Array.from( [ new Complex128( 1.0, 1.0 ) ] );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* function clbk( v ) {\n* return new Complex128( real(v)*2.0, imag(v)*2.0 );\n* }\n*\n* var arr = Complex128Array.from( [ new Complex128( 1.0, 1.0 ) ], clbk );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*/\nsetReadOnly( Complex128Array, 'from', function from( src ) {\n\tvar thisArg;\n\tvar nargs;\n\tvar clbk;\n\tvar out;\n\tvar buf;\n\tvar tmp;\n\tvar get;\n\tvar len;\n\tvar flg;\n\tvar v;\n\tvar i;\n\tvar j;\n\tif ( !isFunction( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` context must be a constructor.' );\n\t}\n\tif ( !isComplexArrayConstructor( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tnargs = arguments.length;\n\tif ( nargs > 1 ) {\n\t\tclbk = arguments[ 1 ];\n\t\tif ( !isFunction( clbk ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be a function. Value: `%s`.', clbk ) );\n\t\t}\n\t\tif ( nargs > 2 ) {\n\t\t\tthisArg = arguments[ 2 ];\n\t\t}\n\t}\n\tif ( isComplexArray( src ) ) {\n\t\tlen = src.length;\n\t\tif ( clbk ) {\n\t\t\tout = new this( len );\n\t\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\t\tj = 0;\n\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\tv = clbk.call( thisArg, src.get( i ), i );\n\t\t\t\tif ( isComplexLike( v ) ) {\n\t\t\t\t\tbuf[ j ] = real( v );\n\t\t\t\t\tbuf[ j+1 ] = imag( v );\n\t\t\t\t} else if ( isArrayLikeObject( v ) && v.length >= 2 ) {\n\t\t\t\t\tbuf[ j ] = v[ 0 ];\n\t\t\t\t\tbuf[ j+1 ] = v[ 1 ];\n\t\t\t\t} else {\n\t\t\t\t\tthrow new TypeError( format( 'invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', v ) );\n\t\t\t\t}\n\t\t\t\tj += 2; // stride\n\t\t\t}\n\t\t\treturn out;\n\t\t}\n\t\treturn new this( src );\n\t}\n\tif ( isCollection( src ) ) {\n\t\tif ( clbk ) {\n\t\t\t// Note: array contents affect how we iterate over a provided data source. If only complex number objects, we can extract real and imaginary components. Otherwise, for non-complex number arrays (e.g., `Float64Array`, etc), we assume a strided array where real and imaginary components are interleaved. In the former case, we expect a callback to return real and imaginary components (possibly as a complex number). In the latter case, we expect a callback to return *either* a real or imaginary component.\n\n\t\t\tlen = src.length;\n\t\t\tif ( src.get && src.set ) {\n\t\t\t\tget = accessorGetter( 'default' );\n\t\t\t} else {\n\t\t\t\tget = getter( 'default' );\n\t\t\t}\n\t\t\t// Detect whether we've been provided an array which returns complex number objects...\n\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\tif ( !isComplexLike( get( src, i ) ) ) {\n\t\t\t\t\tflg = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// If an array does not contain only complex number objects, then we assume interleaved real and imaginary components...\n\t\t\tif ( flg ) {\n\t\t\t\tif ( !isEven( len ) ) {\n\t\t\t\t\tthrow new RangeError( format( 'invalid argument. First argument must have a length which is a multiple of two. Length: `%u`.', len ) );\n\t\t\t\t}\n\t\t\t\tout = new this( len/2 );\n\t\t\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\t\tbuf[ i ] = clbk.call( thisArg, get( src, i ), i );\n\t\t\t\t}\n\t\t\t\treturn out;\n\t\t\t}\n\t\t\t// If an array contains only complex number objects, then we need to extract real and imaginary components...\n\t\t\tout = new this( len );\n\t\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\t\tj = 0;\n\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\tv = clbk.call( thisArg, get( src, i ), i );\n\t\t\t\tif ( isComplexLike( v ) ) {\n\t\t\t\t\tbuf[ j ] = real( v );\n\t\t\t\t\tbuf[ j+1 ] = imag( v );\n\t\t\t\t} else if ( isArrayLikeObject( v ) && v.length >= 2 ) {\n\t\t\t\t\tbuf[ j ] = v[ 0 ];\n\t\t\t\t\tbuf[ j+1 ] = v[ 1 ];\n\t\t\t\t} else {\n\t\t\t\t\tthrow new TypeError( format( 'invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', v ) );\n\t\t\t\t}\n\t\t\t\tj += 2; // stride\n\t\t\t}\n\t\t\treturn out;\n\t\t}\n\t\treturn new this( src );\n\t}\n\tif ( isObject( src ) && HAS_ITERATOR_SYMBOL && isFunction( src[ ITERATOR_SYMBOL ] ) ) { // eslint-disable-line max-len\n\t\tbuf = src[ ITERATOR_SYMBOL ]();\n\t\tif ( !isFunction( buf.next ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.', src ) );\n\t\t}\n\t\tif ( clbk ) {\n\t\t\ttmp = fromIteratorMap( buf, clbk, thisArg );\n\t\t} else {\n\t\t\ttmp = fromIterator( buf );\n\t\t}\n\t\tif ( tmp instanceof Error ) {\n\t\t\tthrow tmp;\n\t\t}\n\t\tlen = tmp.length / 2;\n\t\tout = new this( len );\n\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\tbuf[ i ] = tmp[ i ];\n\t\t}\n\t\treturn out;\n\t}\n\tthrow new TypeError( format( 'invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.', src ) );\n});\n\n/**\n* Creates a new 128-bit complex number array from a variable number of arguments.\n*\n* @name of\n* @memberof Complex128Array\n* @type {Function}\n* @param {...*} element - array elements\n* @throws {TypeError} `this` context must be a constructor\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Complex128Array} 128-bit complex number array\n*\n* @example\n* var arr = Complex128Array.of( 1.0, 1.0, 1.0, 1.0 );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*/\nsetReadOnly( Complex128Array, 'of', function of() {\n\tvar args;\n\tvar i;\n\tif ( !isFunction( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` context must be a constructor.' );\n\t}\n\tif ( !isComplexArrayConstructor( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\targs = [];\n\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\targs.push( arguments[ i ] );\n\t}\n\treturn new this( args );\n});\n\n/**\n* Pointer to the underlying data buffer.\n*\n* @name buffer\n* @memberof Complex128Array.prototype\n* @readonly\n* @type {ArrayBuffer}\n*\n* @example\n* var arr = new Complex128Array( 10 );\n*\n* var buf = arr.buffer;\n* // returns \n*/\nsetReadOnlyAccessor( Complex128Array.prototype, 'buffer', function get() {\n\treturn this._buffer.buffer;\n});\n\n/**\n* Size (in bytes) of the array.\n*\n* @name byteLength\n* @memberof Complex128Array.prototype\n* @readonly\n* @type {NonNegativeInteger}\n*\n* @example\n* var arr = new Complex128Array( 10 );\n*\n* var byteLength = arr.byteLength;\n* // returns 160\n*/\nsetReadOnlyAccessor( Complex128Array.prototype, 'byteLength', function get() {\n\treturn this._buffer.byteLength;\n});\n\n/**\n* Offset (in bytes) of the array from the start of its underlying `ArrayBuffer`.\n*\n* @name byteOffset\n* @memberof Complex128Array.prototype\n* @readonly\n* @type {NonNegativeInteger}\n*\n* @example\n* var arr = new Complex128Array( 10 );\n*\n* var byteOffset = arr.byteOffset;\n* // returns 0\n*/\nsetReadOnlyAccessor( Complex128Array.prototype, 'byteOffset', function get() {\n\treturn this._buffer.byteOffset;\n});\n\n/**\n* Size (in bytes) of each array element.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex128Array.prototype\n* @readonly\n* @type {PositiveInteger}\n* @default 16\n*\n* @example\n* var arr = new Complex128Array( 10 );\n*\n* var nbytes = arr.BYTES_PER_ELEMENT;\n* // returns 16\n*/\nsetReadOnly( Complex128Array.prototype, 'BYTES_PER_ELEMENT', Complex128Array.BYTES_PER_ELEMENT );\n\n/**\n* Copies a sequence of elements within the array to the position starting at `target`.\n*\n* @name copyWithin\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {integer} target - index at which to start copying elements\n* @param {integer} start - source index at which to copy elements from\n* @param {integer} [end] - source index at which to stop copying elements from\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Complex128Array} modified array\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* var arr = new Complex128Array( 4 );\n*\n* // Set the array elements:\n* arr.set( new Complex128( 1.0, 1.0 ), 0 );\n* arr.set( new Complex128( 2.0, 2.0 ), 1 );\n* arr.set( new Complex128( 3.0, 3.0 ), 2 );\n* arr.set( new Complex128( 4.0, 4.0 ), 3 );\n*\n* // Copy the first two elements to the last two elements:\n* arr.copyWithin( 2, 0, 2 );\n*\n* // Get the last array element:\n* var z = arr.get( 3 );\n*\n* var re = real( z );\n* // returns 2.0\n*\n* var im = imag( z );\n* // returns 2.0\n*/\nsetReadOnly( Complex128Array.prototype, 'copyWithin', function copyWithin( target, start ) {\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\t// FIXME: prefer a functional `copyWithin` implementation which addresses lack of universal browser support (e.g., IE11 and Safari) or ensure that typed arrays are polyfilled\n\tif ( arguments.length === 2 ) {\n\t\tthis._buffer.copyWithin( target*2, start*2 );\n\t} else {\n\t\tthis._buffer.copyWithin( target*2, start*2, arguments[2]*2 );\n\t}\n\treturn this;\n});\n\n/**\n* Returns an iterator for iterating over array key-value pairs.\n*\n* @name entries\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Iterator} iterator\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n*\n* var arr = [\n* new Complex128( 1.0, 1.0 ),\n* new Complex128( 2.0, 2.0 ),\n* new Complex128( 3.0, 3.0 )\n* ];\n* arr = new Complex128Array( arr );\n*\n* // Create an iterator:\n* var it = arr.entries();\n*\n* // Iterate over the key-value pairs...\n* var v = it.next().value;\n* // returns [ 0, ]\n*\n* v = it.next().value;\n* // returns [ 1, ]\n*\n* v = it.next().value;\n* // returns [ 2, ]\n*\n* var bool = it.next().done;\n* // returns true\n*/\nsetReadOnly( Complex128Array.prototype, 'entries', function entries() {\n\tvar buffer;\n\tvar self;\n\tvar iter;\n\tvar len;\n\tvar FLG;\n\tvar i;\n\tvar j;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tself = this;\n\tbuffer = this._buffer;\n\tlen = this._length;\n\n\t// Initialize the iteration indices:\n\ti = -1;\n\tj = -2;\n\n\t// Create an iterator protocol-compliant object:\n\titer = {};\n\tsetReadOnly( iter, 'next', next );\n\tsetReadOnly( iter, 'return', end );\n\n\tif ( ITERATOR_SYMBOL ) {\n\t\tsetReadOnly( iter, ITERATOR_SYMBOL, factory );\n\t}\n\treturn iter;\n\n\t/**\n\t* Returns an iterator protocol-compliant object containing the next iterated value.\n\t*\n\t* @private\n\t* @returns {Object} iterator protocol-compliant object\n\t*/\n\tfunction next() {\n\t\tvar z;\n\t\ti += 1;\n\t\tif ( FLG || i >= len ) {\n\t\t\treturn {\n\t\t\t\t'done': true\n\t\t\t};\n\t\t}\n\t\tj += 2;\n\t\tz = new Complex128( buffer[ j ], buffer[ j+1 ] );\n\t\treturn {\n\t\t\t'value': [ i, z ],\n\t\t\t'done': false\n\t\t};\n\t}\n\n\t/**\n\t* Finishes an iterator.\n\t*\n\t* @private\n\t* @param {*} [value] - value to return\n\t* @returns {Object} iterator protocol-compliant object\n\t*/\n\tfunction end( value ) {\n\t\tFLG = true;\n\t\tif ( arguments.length ) {\n\t\t\treturn {\n\t\t\t\t'value': value,\n\t\t\t\t'done': true\n\t\t\t};\n\t\t}\n\t\treturn {\n\t\t\t'done': true\n\t\t};\n\t}\n\n\t/**\n\t* Returns a new iterator.\n\t*\n\t* @private\n\t* @returns {Iterator} iterator\n\t*/\n\tfunction factory() {\n\t\treturn self.entries();\n\t}\n});\n\n/**\n* Returns an array element.\n*\n* @name get\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {NonNegativeInteger} idx - element index\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} must provide a nonnegative integer\n* @returns {(Complex128|void)} array element\n*\n* @example\n* var arr = new Complex128Array( 10 );\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* var z = arr.get( 0 );\n* // returns \n*\n* var re = real( z );\n* // returns 0.0\n*\n* var im = imag( z );\n* // returns 0.0\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n*\n* z = arr.get( 0 );\n* // returns \n*\n* re = real( z );\n* // returns 1.0\n*\n* im = imag( z );\n* // returns -1.0\n*\n* z = arr.get( 100 );\n* // returns undefined\n*/\nsetReadOnly( Complex128Array.prototype, 'get', function get( idx ) {\n\tvar buf;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isNonNegativeInteger( idx ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Must provide a nonnegative integer. Value: `%s`.', idx ) );\n\t}\n\tif ( idx >= this._length ) {\n\t\treturn;\n\t}\n\tbuf = this._buffer;\n\tidx *= 2;\n\treturn new Complex128( buf[ idx ], buf[ idx+1 ] );\n});\n\n/**\n* Number of array elements.\n*\n* @name length\n* @memberof Complex128Array.prototype\n* @readonly\n* @type {NonNegativeInteger}\n*\n* @example\n* var arr = new Complex128Array( 10 );\n*\n* var len = arr.length;\n* // returns 10\n*/\nsetReadOnlyAccessor( Complex128Array.prototype, 'length', function get() {\n\treturn this._length;\n});\n\n/**\n* Sets an array element.\n*\n* ## Notes\n*\n* - When provided a typed array, real or complex, we must check whether the source array shares the same buffer as the target array and whether the underlying memory overlaps. In particular, we are concerned with the following scenario:\n*\n* ```text\n* buf: ---------------------\n* src: ---------------------\n* ```\n*\n* In the above, as we copy values from `src`, we will overwrite values in the `src` view, resulting in duplicated values copied into the end of `buf`, which is not intended. Hence, to avoid overwriting source values, we must **copy** source values to a temporary array.\n*\n* In the other overlapping scenario,\n*\n* ```text\n* buf: ---------------------\n* src: ---------------------\n* ```\n*\n* by the time we begin copying into the overlapping region, we are copying from the end of `src`, a non-overlapping region, which means we don't run the risk of copying copied values, rather than the original `src` values as intended.\n*\n*\n* @name set\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {(Collection|Complex|ComplexArray)} value - value(s)\n* @param {NonNegativeInteger} [i=0] - element index at which to start writing values\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be either a complex number, an array-like object, or a complex number array\n* @throws {TypeError} index argument must be a nonnegative integer\n* @throws {RangeError} array-like objects must have a length which is a multiple of two\n* @throws {RangeError} index argument is out-of-bounds\n* @throws {RangeError} target array lacks sufficient storage to accommodate source values\n* @returns {void}\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* var arr = new Complex128Array( 10 );\n*\n* var z = arr.get( 0 );\n* // returns \n*\n* var re = real( z );\n* // returns 0.0\n*\n* var im = imag( z );\n* // returns 0.0\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n*\n* z = arr.get( 0 );\n* // returns \n*\n* re = real( z );\n* // returns 1.0\n*\n* im = imag( z );\n* // returns -1.0\n*/\nsetReadOnly( Complex128Array.prototype, 'set', function set( value ) {\n\t/* eslint-disable no-underscore-dangle */\n\tvar sbuf;\n\tvar idx;\n\tvar buf;\n\tvar tmp;\n\tvar flg;\n\tvar N;\n\tvar v;\n\tvar i;\n\tvar j;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tbuf = this._buffer;\n\tif ( arguments.length > 1 ) {\n\t\tidx = arguments[ 1 ];\n\t\tif ( !isNonNegativeInteger( idx ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Index argument must be a nonnegative integer. Value: `%s`.', idx ) );\n\t\t}\n\t} else {\n\t\tidx = 0;\n\t}\n\tif ( isComplexLike( value ) ) {\n\t\tif ( idx >= this._length ) {\n\t\t\tthrow new RangeError( format( 'invalid argument. Index argument is out-of-bounds. Value: `%u`.', idx ) );\n\t\t}\n\t\tidx *= 2;\n\t\tbuf[ idx ] = real( value );\n\t\tbuf[ idx+1 ] = imag( value );\n\t\treturn;\n\t}\n\tif ( isComplexArray( value ) ) {\n\t\tN = value._length;\n\t\tif ( idx+N > this._length ) {\n\t\t\tthrow new RangeError( 'invalid arguments. Target array lacks sufficient storage to accommodate source values.' );\n\t\t}\n\t\tsbuf = value._buffer;\n\n\t\t// Check for overlapping memory...\n\t\tj = buf.byteOffset + (idx*BYTES_PER_ELEMENT);\n\t\tif (\n\t\t\tsbuf.buffer === buf.buffer &&\n\t\t\t(\n\t\t\t\tsbuf.byteOffset < j &&\n\t\t\t\tsbuf.byteOffset+sbuf.byteLength > j\n\t\t\t)\n\t\t) {\n\t\t\t// We need to copy source values...\n\t\t\ttmp = new Float64Array( sbuf.length );\n\t\t\tfor ( i = 0; i < sbuf.length; i++ ) {\n\t\t\t\ttmp[ i ] = sbuf[ i ];\n\t\t\t}\n\t\t\tsbuf = tmp;\n\t\t}\n\t\tidx *= 2;\n\t\tj = 0;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\tbuf[ idx ] = sbuf[ j ];\n\t\t\tbuf[ idx+1 ] = sbuf[ j+1 ];\n\t\t\tidx += 2; // stride\n\t\t\tj += 2; // stride\n\t\t}\n\t\treturn;\n\t}\n\tif ( isCollection( value ) ) {\n\t\t// Detect whether we've been provided an array of complex numbers...\n\t\tN = value.length;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\tif ( !isComplexLike( value[ i ] ) ) {\n\t\t\t\tflg = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t// If an array does not contain only complex numbers, then we assume interleaved real and imaginary components...\n\t\tif ( flg ) {\n\t\t\tif ( !isEven( N ) ) {\n\t\t\t\tthrow new RangeError( format( 'invalid argument. Array-like object arguments must have a length which is a multiple of two. Length: `%u`.', N ) );\n\t\t\t}\n\t\t\tif ( idx+(N/2) > this._length ) {\n\t\t\t\tthrow new RangeError( 'invalid arguments. Target array lacks sufficient storage to accommodate source values.' );\n\t\t\t}\n\t\t\tsbuf = value;\n\n\t\t\t// Check for overlapping memory...\n\t\t\tj = buf.byteOffset + (idx*BYTES_PER_ELEMENT);\n\t\t\tif (\n\t\t\t\tsbuf.buffer === buf.buffer &&\n\t\t\t\t(\n\t\t\t\t\tsbuf.byteOffset < j &&\n\t\t\t\t\tsbuf.byteOffset+sbuf.byteLength > j\n\t\t\t\t)\n\t\t\t) {\n\t\t\t\t// We need to copy source values...\n\t\t\t\ttmp = new Float64Array( N );\n\t\t\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\t\t\ttmp[ i ] = sbuf[ i ];\n\t\t\t\t}\n\t\t\t\tsbuf = tmp;\n\t\t\t}\n\t\t\tidx *= 2;\n\t\t\tN /= 2;\n\t\t\tj = 0;\n\t\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\t\tbuf[ idx ] = sbuf[ j ];\n\t\t\t\tbuf[ idx+1 ] = sbuf[ j+1 ];\n\t\t\t\tidx += 2; // stride\n\t\t\t\tj += 2; // stride\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\t// If an array contains only complex numbers, then we need to extract real and imaginary components...\n\t\tif ( idx+N > this._length ) {\n\t\t\tthrow new RangeError( 'invalid arguments. Target array lacks sufficient storage to accommodate source values.' );\n\t\t}\n\t\tidx *= 2;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\tv = value[ i ];\n\t\t\tbuf[ idx ] = real( v );\n\t\t\tbuf[ idx+1 ] = imag( v );\n\t\t\tidx += 2; // stride\n\t\t}\n\t\treturn;\n\t}\n\tthrow new TypeError( format( 'invalid argument. First argument must be either a complex number, an array-like object, or a complex number array. Value: `%s`.', value ) );\n\n\t/* eslint-enable no-underscore-dangle */\n});\n\n\n// EXPORTS //\n\nexport default Complex128Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport Float64Array from '@stdlib/array-float64';\nimport Float32Array from '@stdlib/array-float32';\nimport Int16Array from '@stdlib/array-int16';\nimport Int32Array from '@stdlib/array-int32';\nimport Int8Array from '@stdlib/array-int8';\nimport Uint16Array from '@stdlib/array-uint16';\nimport Uint32Array from '@stdlib/array-uint32';\nimport Uint8Array from '@stdlib/array-uint8';\nimport Uint8ClampedArray from '@stdlib/array-uint8c';\nimport Complex64Array from '@stdlib/array-complex64';\nimport Complex128Array from '@stdlib/array-complex128';\n\n\n// MAIN //\n\n// Mapping from data types to constructors...\nvar ctors = {\n\t'float64': Float64Array,\n\t'float32': Float32Array,\n\t'generic': Array, // TODO: replace with `stdlib` pkg\n\t'int16': Int16Array,\n\t'int32': Int32Array,\n\t'int8': Int8Array,\n\t'uint16': Uint16Array,\n\t'uint32': Uint32Array,\n\t'uint8': Uint8Array,\n\t'uint8c': Uint8ClampedArray,\n\t'complex64': Complex64Array,\n\t'complex128': Complex128Array\n};\n\n\n// EXPORTS //\n\nexport default ctors;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport table from './ctors.js';\n\n\n// MAIN //\n\n/**\n* Returns an array constructor.\n*\n* @param {string} dtype - data type\n* @returns {(Function|null)} constructor or null\n*\n* @example\n* var ctor = ctors( 'float64' );\n* // returns \n*\n* @example\n* var ctor = ctors( 'float' );\n* // returns null\n*/\nfunction ctors( dtype ) {\n\treturn table[ dtype ] || null;\n}\n\n\n// EXPORTS //\n\nexport default ctors;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport filled from '@stdlib/array-base-filled';\n\n\n// MAIN //\n\n/**\n* Returns a zero-filled \"generic\" array.\n*\n* @param {NonNegativeInteger} len - array length\n* @returns {Array} output array\n*\n* @example\n* var out = zeros( 3 );\n* // returns [ 0.0, 0.0, 0.0 ]\n*/\nfunction zeros( len ) {\n\treturn filled( 0.0, len );\n}\n\n\n// EXPORTS //\n\nexport default zeros;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Returns a filled \"generic\" array.\n*\n* @param {*} value - fill value\n* @param {NonNegativeInteger} len - array length\n* @returns {Array} filled array\n*\n* @example\n* var out = filled( 0.0, 3 );\n* // returns [ 0.0, 0.0, 0.0 ]\n*\n* @example\n* var out = filled( 'beep', 3 );\n* // returns [ 'beep', 'beep', 'beep' ]\n*/\nfunction filled( value, len ) {\n\tvar arr;\n\tvar i;\n\n\t// Manually push elements in order to ensure \"fast\" elements...\n\tarr = [];\n\tfor ( i = 0; i < len; i++ ) {\n\t\tarr.push( value );\n\t}\n\treturn arr;\n}\n\n\n// EXPORTS //\n\nexport default filled;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isNonNegativeInteger } from '@stdlib/assert-is-nonnegative-integer';\nimport ctors from '@stdlib/array-ctors';\nimport gzeros from '@stdlib/array-base-zeros';\nimport format from '@stdlib/string-format';\n\n\n// MAIN //\n\n/**\n* Creates a zero-filled array having a specified length.\n*\n* @param {NonNegativeInteger} length - array length\n* @param {string} [dtype=\"float64\"] - data type\n* @throws {TypeError} first argument must be a nonnegative integer\n* @throws {TypeError} second argument must be a recognized data type\n* @returns {(TypedArray|Array|ComplexArray)} array or typed array\n*\n* @example\n* var arr = zeros( 2 );\n* // returns [ 0.0, 0.0 ]\n*\n* @example\n* var arr = zeros( 2, 'float32' );\n* // returns [ 0.0, 0.0 ]\n*/\nfunction zeros( length ) {\n\tvar dtype;\n\tvar ctor;\n\tif ( !isNonNegativeInteger( length ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a nonnegative integer. Value: `%s`.', length ) );\n\t}\n\tif ( arguments.length > 1 ) {\n\t\tdtype = arguments[ 1 ];\n\t} else {\n\t\tdtype = 'float64';\n\t}\n\tif ( dtype === 'generic' ) {\n\t\treturn gzeros( length );\n\t}\n\tctor = ctors( dtype );\n\tif ( ctor === null ) {\n\t\tthrow new TypeError( format( 'invalid argument. Second argument must be a recognized data type. Value: `%s`.', dtype ) );\n\t}\n\treturn new ctor( length ); // WARNING: we assume that, apart from 'generic', the constructors for supported array data types are zero-filled by default\n}\n\n\n// EXPORTS //\n\nexport default zeros;\n","/**\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// MODULES //\n\nimport zeros from '@stdlib/array-zeros';\n\n\n// MAIN //\n\n/**\n* Creates an uninitialized array having a specified length.\n*\n* @private\n* @param {NonNegativeInteger} length - array length\n* @param {string} [dtype=\"float64\"] - data type\n* @throws {TypeError} first argument must be a nonnegative integer\n* @throws {TypeError} second argument must be a recognized data type\n* @returns {(TypedArray|Array|ComplexArray)} array or typed array\n*\n* @example\n* var arr = empty( 2 );\n* // returns \n*\n* @example\n* var arr = empty( 2, 'float32' );\n* // returns \n*/\nfunction empty( length ) {\n\tif ( arguments.length > 1 ) {\n\t\treturn zeros( length, arguments[ 1 ] );\n\t}\n\treturn zeros( length );\n}\n\n\n// EXPORTS //\n\nexport default empty;\n"],"names":["main","Object","defineProperty","isNumber","value","zeros","n","i","out","zeroPad","str","width","right","negative","pad","length","startsWithMinus","substr","lowercase","String","prototype","toLowerCase","uppercase","toUpperCase","formatInteger","token","base","specifier","arg","parseInt","isFinite","Error","toString","precision","padRight","sign","alternate","call","charAt","isString","abs","Math","replace","RE_EXP_POS_DIGITS","RE_EXP_NEG_DIGITS","RE_ONLY_DIGITS","RE_DIGITS_BEFORE_EXP","RE_TRAILING_PERIOD_ZERO","RE_PERIOD_ZERO_EXP","RE_ZERO_BEFORE_EXP","formatDouble","digits","f","parseFloat","toExponential","toFixed","toPrecision","spaces","spacePad","fromCharCode","isnan","isNaN","isArray","Array","initialize","flags","mapping","formatInterpolate","tokens","hasPeriod","flag","num","pos","j","TypeError","padZeros","indexOf","arguments","maxWidth","substring","RE","parse","match","formatTokenize","content","prev","exec","slice","lastIndex","push","format","args","tokenize","interpolate","apply","objectProtoype","toStr","defineGetter","__defineGetter__","defineSetter","__defineSetter__","lookupGetter","__lookupGetter__","lookupSetter","__lookupSetter__","err","hasDefinePropertySupport","builtin","obj","prop","descriptor","hasValue","hasGet","hasSet","__proto__","get","set","defineProperty$1","setNonEnumerableReadOnly","configurable","enumerable","writable","FLG","Symbol","hasToStringTagSupport","toStringTag","has","hasOwnProperty","hasOwnProp","property","Sym","toStrTag","nativeClass","hasToStringTag","v","isOwn","tag","main$b","Number","test","isPrimitive","isObject","setReadOnly","FLOAT64_PINF","POSITIVE_INFINITY","FLOAT64_NINF","NEGATIVE_INFINITY","floor","isInteger","x","PINF","NINF","isInt","valueOf","isNonNegativeInteger","hasFloat64Array","Float64Array","ctor","Float64Array$1","bool","arr","GlobalFloat64Array","NaN","hasFloat64ArraySupport","hasFloat32Array","Float32Array","Float32Array$1","GlobalFloat32Array","hasFloat32ArraySupport","hasInt16Array","Int16Array","Int16Array$1","GlobalInt16Array","INT16_MAX","hasInt16ArraySupport","hasInt32Array","Int32Array","Int32Array$1","GlobalInt32Array","INT32_MAX","hasInt32ArraySupport","hasInt8Array","Int8Array","Int8Array$1","GlobalInt8Array","INT8_MAX","hasInt8ArraySupport","hasUint16Array","Uint16Array","Uint16Array$1","GlobalUint16Array","UINT16_MAX","hasUint16ArraySupport","hasUint32Array","Uint32Array","Uint32Array$1","GlobalUint32Array","UINT32_MAX","hasUint32ArraySupport","hasUint8Array","Uint8Array","Uint8Array$1","GlobalUint8Array","UINT8_MAX","hasUint8ArraySupport","hasUint8ClampedArray","Uint8ClampedArray","Uint8ClampedArray$1","GlobalUint8ClampedArray","hasUint8ClampedArraySupport","isArrayLikeObject","isCollection","hasArrayBuffer","ArrayBuffer","isArrayBuffer","main$1","isBoolean","Bool","Boolean","getGlobal","Function","self","window","global","globalThis","root","codegen","getThis","GlobalThis","Self","Win","Global","nodeList","document","childNodes","typedarray","reFunctionName","RE_FUNCTION_NAME","isObjectLike","constructorName","name","constructor","_isBuffer","isBuffer","REGEXP","predicate","len","arrayfun","ctorName","type","isFunction","typeOf","Complex128","real","imag","this","re","im","fround","FLOAT32_VIEW","float64ToFloat32$1","Complex64","float64ToFloat32","isComplexLike","isEven","hasIteratorSymbolSupport","iterator","IteratorSymbol","setNonEnumerableReadOnlyAccessor","getter","realf","z","imagf","reinterpret","offset","buffer","byteOffset","BYTES_PER_ELEMENT","GETTERS","float64","idx","float32","int32","int16","int8","uint32","uint16","uint8","uint8c","generic","default","dtype","complex128","complex64","fromIterator","it","next","done","fromIteratorMap","clbk","thisArg","fromArray","buf","HAS_ITERATOR_SYMBOL","isComplexArray","Complex64Array","_length","_buffer","isComplexArrayConstructor","isComplex64Array","isComplex128Array","nargs","RangeError","reinterpret64","reinterpret128","byteLength","ITERATOR_SYMBOL","src","tmp","flg","accessorGetter","setReadOnlyAccessor","target","start","copyWithin","iter","entries","sbuf","N","Complex128Array","ctors","table","filled","gzeros","empty"],"mappings":";;AAsBA,IAAIA,EAA0C,mBAA1BC,OAAOC,eAAkCD,OAAOC,eAAiB,KCiCrF,IAAIA,EAAiBD,OAAOC,eCjB5B,SAASC,EAAUC,GAClB,MAA0B,iBAAVA,CACjB,CCAA,SAASC,EAAOC,GACf,IACIC,EADAC,EAAM,GAEV,IAAMD,EAAI,EAAGA,EAAID,EAAGC,IACnBC,GAAO,IAER,OAAOA,CACR,CAcA,SAASC,EAASC,EAAKC,EAAOC,GAC7B,IAAIC,GAAW,EACXC,EAAMH,EAAQD,EAAIK,OACtB,OAAKD,EAAM,IAnCZ,SAA0BJ,GACzB,MAAoB,MAAbA,EAAK,EACb,CAoCMM,CAAiBN,KACrBG,GAAW,EACXH,EAAMA,EAAIO,OAAQ,IAEnBP,EAAM,EACLA,EAAML,EAAOS,GACbT,EAAOS,GAAQJ,EACXG,IACJH,EAAM,IAAMA,IAVLA,CAaT,CCpDA,IAAIQ,EAAYC,OAAOC,UAAUC,YAC7BC,EAAYH,OAAOC,UAAUG,YAajC,SAASC,EAAeC,GACvB,IAAIC,EACAlB,EACAD,EAEJ,OAASkB,EAAME,W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E3BxE,GAAOU,EACf"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index 2dabd92..0000000 --- a/stats.html +++ /dev/null @@ -1,6177 +0,0 @@ - - - - - - - - Rollup Visualizer - - - -
- - - - - From adca490664c2b9757de02eeb546fd4e37853a790 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Tue, 16 Jan 2024 08:38:42 +0000 Subject: [PATCH 36/75] Auto-generated commit --- .editorconfig | 181 - .eslintrc.js | 1 - .gitattributes | 49 - .github/PULL_REQUEST_TEMPLATE.md | 7 - .github/workflows/benchmark.yml | 64 - .github/workflows/cancel.yml | 57 - .github/workflows/close_pull_requests.yml | 54 - .github/workflows/examples.yml | 64 - .github/workflows/npm_downloads.yml | 112 - .github/workflows/productionize.yml | 797 --- .github/workflows/publish.yml | 255 - .github/workflows/test.yml | 100 - .github/workflows/test_bundles.yml | 189 - .github/workflows/test_coverage.yml | 128 - .github/workflows/test_install.yml | 86 - .gitignore | 188 - .npmignore | 228 - .npmrc | 28 - CHANGELOG.md | 5 - CITATION.cff | 30 - CODE_OF_CONDUCT.md | 3 - CONTRIBUTING.md | 3 - Makefile | 534 -- README.md | 34 +- SECURITY.md | 5 - benchmark/benchmark.js | 264 - benchmark/benchmark.length.complex128.js | 93 - benchmark/benchmark.length.complex64.js | 93 - benchmark/benchmark.length.float32.js | 93 - benchmark/benchmark.length.float64.js | 93 - benchmark/benchmark.length.generic.js | 93 - benchmark/benchmark.length.int16.js | 93 - benchmark/benchmark.length.int32.js | 93 - benchmark/benchmark.length.int8.js | 93 - benchmark/benchmark.length.uint16.js | 93 - benchmark/benchmark.length.uint32.js | 93 - benchmark/benchmark.length.uint8.js | 93 - benchmark/benchmark.length.uint8c.js | 93 - branches.md | 53 - dist/index.d.ts | 3 - dist/index.js | 9 - dist/index.js.map | 7 - docs/repl.txt | 52 - docs/types/test.ts | 77 - examples/index.js | 33 - lib/index.js | 58 - lib/is_buffer_uint8array.js | 47 - lib/main.js | 107 - lib/polyfill.js | 56 - docs/types/index.d.ts => mod.d.ts | 2 +- mod.js | 4 + mod.js.map | 1 + package.json | 81 +- stats.html | 6177 +++++++++++++++++++++ test/dist/test.js | 33 - test/test.js | 60 - test/test.main.js | 274 - test/test.polyfill.js | 324 -- 58 files changed, 6194 insertions(+), 5846 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 benchmark/benchmark.js delete mode 100644 benchmark/benchmark.length.complex128.js delete mode 100644 benchmark/benchmark.length.complex64.js delete mode 100644 benchmark/benchmark.length.float32.js delete mode 100644 benchmark/benchmark.length.float64.js delete mode 100644 benchmark/benchmark.length.generic.js delete mode 100644 benchmark/benchmark.length.int16.js delete mode 100644 benchmark/benchmark.length.int32.js delete mode 100644 benchmark/benchmark.length.int8.js delete mode 100644 benchmark/benchmark.length.uint16.js delete mode 100644 benchmark/benchmark.length.uint32.js delete mode 100644 benchmark/benchmark.length.uint8.js delete mode 100644 benchmark/benchmark.length.uint8c.js 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/repl.txt delete mode 100644 docs/types/test.ts delete mode 100644 examples/index.js delete mode 100644 lib/index.js delete mode 100644 lib/is_buffer_uint8array.js delete mode 100644 lib/main.js delete mode 100644 lib/polyfill.js rename docs/types/index.d.ts => mod.d.ts (99%) create mode 100644 mod.js create mode 100644 mod.js.map create mode 100644 stats.html delete mode 100644 test/dist/test.js delete mode 100644 test/test.js delete mode 100644 test/test.main.js delete mode 100644 test/test.polyfill.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 96f81a8..0000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,7 +0,0 @@ - - -We are excited about your pull request, but unfortunately we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/empty) 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 ddb353e..0000000 --- a/.github/workflows/close_pull_requests.yml +++ /dev/null @@ -1,54 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: close_pull_requests - -# Workflow triggers: -on: - pull_request_target: - types: [opened] - -# Workflow jobs: -jobs: - - # Define job to close all pull requests: - run: - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Close pull request - - name: 'Close pull request' - # Pin action to full length commit SHA corresponding to v3.1.2 - uses: superbrothers/close-pull-request@9c18513d320d7b2c7185fb93396d0c664d5d8448 - with: - comment: | - Thank you for submitting a pull request. :raised_hands: - - We greatly appreciate your willingness to submit a contribution. However, we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). - - We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/empty) 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 2e70061..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: '49 1 * * 5' - - # 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 + + + + 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 8e62cb8..0000000 --- a/test/test.js +++ /dev/null @@ -1,60 +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 proxyquire = require( 'proxyquire' ); -var main = require( './../lib/main.js' ); -var polyfill = require( './../lib/polyfill.js' ); -var empty = require( './../lib' ); - - -// TESTS // - -tape( 'main export is a function', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof empty, 'function', 'main export is a function' ); - t.end(); -}); - -tape( 'if an environment supports Node.js buffer instances inheriting from Uint8Array, the main export supports returning arrays having uninitialized memory', function test( t ) { - var empty = proxyquire( './../lib', { - './is_buffer_uint8array.js': mock - }); - t.strictEqual( empty, main, 'returns expected value' ); - t.end(); - - function mock() { - return true; - } -}); - -tape( 'if an environment does not support Node.js buffer instances inheriting from Uint8Array, the main export supports returning zero-filled arrays', function test( t ) { - var empty = proxyquire( './../lib', { - './is_buffer_uint8array.js': mock - }); - t.strictEqual( empty, polyfill, 'returns expected value' ); - t.end(); - - function mock() { - return false; - } -}); diff --git a/test/test.main.js b/test/test.main.js deleted file mode 100644 index 3ceb26e..0000000 --- a/test/test.main.js +++ /dev/null @@ -1,274 +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 Float64Array = require( '@stdlib/array-float64' ); -var Float32Array = require( '@stdlib/array-float32' ); -var Int32Array = require( '@stdlib/array-int32' ); -var Uint32Array = require( '@stdlib/array-uint32' ); -var Int16Array = require( '@stdlib/array-int16' ); -var Uint16Array = require( '@stdlib/array-uint16' ); -var Int8Array = require( '@stdlib/array-int8' ); -var Uint8Array = require( '@stdlib/array-uint8' ); -var Uint8ClampedArray = require( '@stdlib/array-uint8c' ); -var Complex64Array = require( '@stdlib/array-complex64' ); -var Complex128Array = require( '@stdlib/array-complex128' ); -var instanceOf = require( '@stdlib/assert-instance-of' ); -var empty = require( './../lib/main.js' ); - - -// TESTS // - -tape( 'main export is a function', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof empty, 'function', 'main export is a function' ); - t.end(); -}); - -tape( 'the function throws an error if provided a value other than a nonnegative integer for the first argument', function test( t ) { - var values; - var i; - - values = [ - '5', - -3, - 3.14, - NaN, - true, - false, - null, - void 0, - [], - {}, - function noop() {} - ]; - - for ( i = 0; i < values.length; i++ ) { - t.throws( badValue( values[i] ), TypeError, 'throws an error when provided '+values[i] ); - } - t.end(); - - function badValue( value ) { - return function badValue() { - empty( value ); - }; - } -}); - -tape( 'the function throws an error if provided a value other than a nonnegative integer for the first argument (dtype)', function test( t ) { - var values; - var i; - - values = [ - '5', - -3, - 3.14, - NaN, - true, - false, - null, - void 0, - [], - {}, - function noop() {} - ]; - - for ( i = 0; i < values.length; i++ ) { - t.throws( badValue( values[i] ), TypeError, 'throws an error when provided '+values[i] ); - } - t.end(); - - function badValue( value ) { - return function badValue() { - empty( value, 'float32' ); - }; - } -}); - -tape( 'the function throws an error if provided an unrecognized data type', function test( t ) { - var values; - var i; - - values = [ - '5', - 'beep', - 'empty', - 'Int32', - 'Uint32', - 'Int16', - 'Uint16', - 'Int8', - 'Uint8', - 'Uint8c', - 'uint8_clamped', - 'Float64', - 'Float32', - 'FLOAT64', - 'FLOAT32', - 'GENERIC' - ]; - - for ( i = 0; i < values.length; i++ ) { - t.throws( badValue( values[i] ), TypeError, 'throws an error when provided '+values[i] ); - } - t.end(); - - function badValue( value ) { - return function badValue() { - empty( 10, value ); - }; - } -}); - -tape( 'the function returns an empty array (default)', function test( t ) { - var arr; - - arr = empty( 5 ); - t.strictEqual( instanceOf( arr, Float64Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=float64)', function test( t ) { - var arr; - - arr = empty( 5, 'float64' ); - t.strictEqual( instanceOf( arr, Float64Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=float32)', function test( t ) { - var arr; - - arr = empty( 5, 'float32' ); - t.strictEqual( instanceOf( arr, Float32Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=complex128)', function test( t ) { - var arr; - - arr = empty( 5, 'complex128' ); - t.strictEqual( instanceOf( arr, Complex128Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=complex64)', function test( t ) { - var arr; - - arr = empty( 5, 'complex64' ); - t.strictEqual( instanceOf( arr, Complex64Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=int32)', function test( t ) { - var arr; - - arr = empty( 5, 'int32' ); - t.strictEqual( instanceOf( arr, Int32Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=uint32)', function test( t ) { - var arr; - - arr = empty( 5, 'uint32' ); - t.strictEqual( instanceOf( arr, Uint32Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=int16)', function test( t ) { - var arr; - - arr = empty( 5, 'int16' ); - t.strictEqual( instanceOf( arr, Int16Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=uint16)', function test( t ) { - var arr; - - arr = empty( 5, 'uint16' ); - t.strictEqual( instanceOf( arr, Uint16Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=int8)', function test( t ) { - var arr; - - arr = empty( 5, 'int8' ); - t.strictEqual( instanceOf( arr, Int8Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=uint8)', function test( t ) { - var arr; - - arr = empty( 5, 'uint8' ); - t.strictEqual( instanceOf( arr, Uint8Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=uint8c)', function test( t ) { - var arr; - - arr = empty( 5, 'uint8c' ); - t.strictEqual( instanceOf( arr, Uint8ClampedArray ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=generic)', function test( t ) { - var expected; - var arr; - - expected = [ 0, 0, 0, 0, 0 ]; - - arr = empty( 5, 'generic' ); - t.strictEqual( instanceOf( arr, Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); diff --git a/test/test.polyfill.js b/test/test.polyfill.js deleted file mode 100644 index 17b99f3..0000000 --- a/test/test.polyfill.js +++ /dev/null @@ -1,324 +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 Float64Array = require( '@stdlib/array-float64' ); -var Float32Array = require( '@stdlib/array-float32' ); -var Int32Array = require( '@stdlib/array-int32' ); -var Uint32Array = require( '@stdlib/array-uint32' ); -var Int16Array = require( '@stdlib/array-int16' ); -var Uint16Array = require( '@stdlib/array-uint16' ); -var Int8Array = require( '@stdlib/array-int8' ); -var Uint8Array = require( '@stdlib/array-uint8' ); -var Uint8ClampedArray = require( '@stdlib/array-uint8c' ); -var Complex64Array = require( '@stdlib/array-complex64' ); -var Complex128Array = require( '@stdlib/array-complex128' ); -var reinterpret64 = require( '@stdlib/strided-base-reinterpret-complex64' ); -var reinterpret128 = require( '@stdlib/strided-base-reinterpret-complex128' ); -var instanceOf = require( '@stdlib/assert-instance-of' ); -var empty = require( './../lib/polyfill.js' ); - - -// TESTS // - -tape( 'main export is a function', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof empty, 'function', 'main export is a function' ); - t.end(); -}); - -tape( 'the function throws an error if provided a value other than a nonnegative integer for the first argument', function test( t ) { - var values; - var i; - - values = [ - '5', - -3, - 3.14, - NaN, - true, - false, - null, - void 0, - [], - {}, - function noop() {} - ]; - - for ( i = 0; i < values.length; i++ ) { - t.throws( badValue( values[i] ), TypeError, 'throws an error when provided '+values[i] ); - } - t.end(); - - function badValue( value ) { - return function badValue() { - empty( value ); - }; - } -}); - -tape( 'the function throws an error if provided a value other than a nonnegative integer for the first argument (dtype)', function test( t ) { - var values; - var i; - - values = [ - '5', - -3, - 3.14, - NaN, - true, - false, - null, - void 0, - [], - {}, - function noop() {} - ]; - - for ( i = 0; i < values.length; i++ ) { - t.throws( badValue( values[i] ), TypeError, 'throws an error when provided '+values[i] ); - } - t.end(); - - function badValue( value ) { - return function badValue() { - empty( value, 'float32' ); - }; - } -}); - -tape( 'the function throws an error if provided an unrecognized data type', function test( t ) { - var values; - var i; - - values = [ - '5', - 'beep', - 'empty', - 'Int32', - 'Uint32', - 'Int16', - 'Uint16', - 'Int8', - 'Uint8', - 'Uint8c', - 'uint8_clamped', - 'Float64', - 'Float32', - 'FLOAT64', - 'FLOAT32', - 'GENERIC' - ]; - - for ( i = 0; i < values.length; i++ ) { - t.throws( badValue( values[i] ), TypeError, 'throws an error when provided '+values[i] ); - } - t.end(); - - function badValue( value ) { - return function badValue() { - empty( 10, value ); - }; - } -}); - -tape( 'the function returns a zero-filled array (default)', function test( t ) { - var expected; - var arr; - - expected = new Float64Array( [ 0.0, 0.0, 0.0, 0.0, 0.0 ] ); - - arr = empty( 5 ); - t.strictEqual( instanceOf( arr, Float64Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=float64)', function test( t ) { - var expected; - var arr; - - expected = new Float64Array( [ 0.0, 0.0, 0.0, 0.0, 0.0 ] ); - - arr = empty( 5, 'float64' ); - t.strictEqual( instanceOf( arr, Float64Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=float32)', function test( t ) { - var expected; - var arr; - - expected = new Float32Array( [ 0.0, 0.0, 0.0, 0.0, 0.0 ] ); - - arr = empty( 5, 'float32' ); - t.strictEqual( instanceOf( arr, Float32Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=complex128)', function test( t ) { - var expected; - var arr; - - expected = new Float64Array( [ 0.0, 0.0, 0.0, 0.0 ] ); - - arr = empty( 2, 'complex128' ); - t.strictEqual( instanceOf( arr, Complex128Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length/2, 'returns expected value' ); - t.deepEqual( reinterpret128( arr, 0 ), expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=complex64)', function test( t ) { - var expected; - var arr; - - expected = new Float32Array( [ 0.0, 0.0, 0.0, 0.0 ] ); - - arr = empty( 2, 'complex64' ); - t.strictEqual( instanceOf( arr, Complex64Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length/2, 'returns expected value' ); - t.deepEqual( reinterpret64( arr, 0 ), expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=int32)', function test( t ) { - var expected; - var arr; - - expected = new Int32Array( [ 0, 0, 0, 0, 0 ] ); - - arr = empty( 5, 'int32' ); - t.strictEqual( instanceOf( arr, Int32Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=uint32)', function test( t ) { - var expected; - var arr; - - expected = new Uint32Array( [ 0, 0, 0, 0, 0 ] ); - - arr = empty( 5, 'uint32' ); - t.strictEqual( instanceOf( arr, Uint32Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=int16)', function test( t ) { - var expected; - var arr; - - expected = new Int16Array( [ 0, 0, 0, 0, 0 ] ); - - arr = empty( 5, 'int16' ); - t.strictEqual( instanceOf( arr, Int16Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=uint16)', function test( t ) { - var expected; - var arr; - - expected = new Uint16Array( [ 0, 0, 0, 0, 0 ] ); - - arr = empty( 5, 'uint16' ); - t.strictEqual( instanceOf( arr, Uint16Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=int8)', function test( t ) { - var expected; - var arr; - - expected = new Int8Array( [ 0, 0, 0, 0, 0 ] ); - - arr = empty( 5, 'int8' ); - t.strictEqual( instanceOf( arr, Int8Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=uint8)', function test( t ) { - var expected; - var arr; - - expected = new Uint8Array( [ 0, 0, 0, 0, 0 ] ); - - arr = empty( 5, 'uint8' ); - t.strictEqual( instanceOf( arr, Uint8Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=uint8c)', function test( t ) { - var expected; - var arr; - - expected = new Uint8ClampedArray( [ 0, 0, 0, 0, 0 ] ); - - arr = empty( 5, 'uint8c' ); - t.strictEqual( instanceOf( arr, Uint8ClampedArray ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=generic)', function test( t ) { - var expected; - var arr; - - expected = [ 0, 0, 0, 0, 0 ]; - - arr = empty( 5, 'generic' ); - t.strictEqual( instanceOf( arr, Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); From eac3b76c7824d01e491e9d2fd2d7688cde465765 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Thu, 1 Feb 2024 08:53:50 +0000 Subject: [PATCH 37/75] Transform error messages --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 7f14382..db6e87d 100644 --- a/package.json +++ b/package.json @@ -46,7 +46,7 @@ "@stdlib/assert-is-uint8array": "^0.1.1", "@stdlib/buffer-alloc-unsafe": "^0.1.0", "@stdlib/ndarray-base-bytes-per-element": "^0.1.0", - "@stdlib/string-format": "^0.1.1", + "@stdlib/error-tools-fmtprodmsg": "^0.1.1", "@stdlib/types": "^0.2.0" }, "devDependencies": { From 4f079f53424e5497cb80445bb1e54f7c377beab1 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Thu, 1 Feb 2024 14:17:54 +0000 Subject: [PATCH 38/75] Remove files --- mod.d.ts | 277 --- mod.js | 4 - mod.js.map | 1 - stats.html | 6177 ---------------------------------------------------- 4 files changed, 6459 deletions(-) delete mode 100644 mod.d.ts delete mode 100644 mod.js delete mode 100644 mod.js.map delete mode 100644 stats.html diff --git a/mod.d.ts b/mod.d.ts deleted file mode 100644 index c071f4d..0000000 --- a/mod.d.ts +++ /dev/null @@ -1,277 +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 - -/// - -import { Complex128Array, Complex64Array, DataType } from '@stdlib/types/array'; - -/** -* Creates an uninitialized array having a specified length. -* -* ## Notes -* -* - In browser environments, the function always returns zero-filled arrays. -* - In Node.js versions `>=3.0.0`, the underlying memory of returned typed arrays is **not** initialized. Memory contents are unknown and may contain **sensitive** data. -* -* @param length - array length -* @param dtype - data type -* @returns empty array -* -* @example -* var arr = empty( 2, 'float64' ); -* // returns -*/ -declare function empty( length: number, dtype: 'float64' ): Float64Array; - -/** -* Creates an uninitialized array having a specified length. -* -* ## Notes -* -* - In browser environments, the function always returns zero-filled arrays. -* - In Node.js versions `>=3.0.0`, the underlying memory of returned typed arrays is **not** initialized. Memory contents are unknown and may contain **sensitive** data. -* -* @param length - array length -* @param dtype - data type -* @returns empty array -* -* @example -* var arr = empty( 2, 'float32' ); -* // returns -*/ -declare function empty( length: number, dtype: 'float32' ): Float32Array; - -/** -* Creates an uninitialized array having a specified length. -* -* ## Notes -* -* - In browser environments, the function always returns zero-filled arrays. -* - In Node.js versions `>=3.0.0`, the underlying memory of returned typed arrays is **not** initialized. Memory contents are unknown and may contain **sensitive** data. -* -* @param length - array length -* @param dtype - data type -* @returns empty array -* -* @example -* var arr = empty( 2, 'complex128' ); -* // returns -*/ -declare function empty( length: number, dtype: 'complex128' ): Complex128Array; - -/** -* Creates an uninitialized array having a specified length. -* -* ## Notes -* -* - In browser environments, the function always returns zero-filled arrays. -* - In Node.js versions `>=3.0.0`, the underlying memory of returned typed arrays is **not** initialized. Memory contents are unknown and may contain **sensitive** data. -* -* @param length - array length -* @param dtype - data type -* @returns empty array -* -* @example -* var arr = empty( 2, 'complex64' ); -* // returns -*/ -declare function empty( length: number, dtype: 'complex64' ): Complex64Array; - -/** -* Creates an uninitialized array having a specified length. -* -* ## Notes -* -* - In browser environments, the function always returns zero-filled arrays. -* - In Node.js versions `>=3.0.0`, the underlying memory of returned typed arrays is **not** initialized. Memory contents are unknown and may contain **sensitive** data. -* -* @param length - array length -* @param dtype - data type -* @returns empty array -* -* @example -* var arr = empty( 2, 'int32' ); -* // returns -*/ -declare function empty( length: number, dtype: 'int32' ): Int32Array; - -/** -* Creates an uninitialized array having a specified length. -* -* ## Notes -* -* - In browser environments, the function always returns zero-filled arrays. -* - In Node.js versions `>=3.0.0`, the underlying memory of returned typed arrays is **not** initialized. Memory contents are unknown and may contain **sensitive** data. -* -* @param length - array length -* @param dtype - data type -* @returns empty array -* -* @example -* var arr = empty( 2, 'int16' ); -* // returns -*/ -declare function empty( length: number, dtype: 'int16' ): Int16Array; - -/** -* Creates an uninitialized array having a specified length. -* -* ## Notes -* -* - In browser environments, the function always returns zero-filled arrays. -* - In Node.js versions `>=3.0.0`, the underlying memory of returned typed arrays is **not** initialized. Memory contents are unknown and may contain **sensitive** data. -* -* @param length - array length -* @param dtype - data type -* @returns empty array -* -* @example -* var arr = empty( 2, 'int8' ); -* // returns -*/ -declare function empty( length: number, dtype: 'int8' ): Int8Array; - -/** -* Creates an uninitialized array having a specified length. -* -* ## Notes -* -* - In browser environments, the function always returns zero-filled arrays. -* - In Node.js versions `>=3.0.0`, the underlying memory of returned typed arrays is **not** initialized. Memory contents are unknown and may contain **sensitive** data. -* -* @param length - array length -* @param dtype - data type -* @returns empty array -* -* @example -* var arr = empty( 2, 'uint32' ); -* // returns -*/ -declare function empty( length: number, dtype: 'uint32' ): Uint32Array; - -/** -* Creates an uninitialized array having a specified length. -* -* ## Notes -* -* - In browser environments, the function always returns zero-filled arrays. -* - In Node.js versions `>=3.0.0`, the underlying memory of returned typed arrays is **not** initialized. Memory contents are unknown and may contain **sensitive** data. -* -* @param length - array length -* @param dtype - data type -* @returns empty array -* -* @example -* var arr = empty( 2, 'uint16' ); -* // returns -*/ -declare function empty( length: number, dtype: 'uint16' ): Uint16Array; - -/** -* Creates an uninitialized array having a specified length. -* -* ## Notes -* -* - In browser environments, the function always returns zero-filled arrays. -* - In Node.js versions `>=3.0.0`, the underlying memory of returned typed arrays is **not** initialized. Memory contents are unknown and may contain **sensitive** data. -* -* @param length - array length -* @param dtype - data type -* @returns empty array -* -* @example -* var arr = empty( 2, 'uint8' ); -* // returns -*/ -declare function empty( length: number, dtype: 'uint8' ): Uint8Array; - -/** -* Creates an uninitialized array having a specified length. -* -* ## Notes -* -* - In browser environments, the function always returns zero-filled arrays. -* - In Node.js versions `>=3.0.0`, the underlying memory of returned typed arrays is **not** initialized. Memory contents are unknown and may contain **sensitive** data. -* -* @param length - array length -* @param dtype - data type -* @returns empty array -* -* @example -* var arr = empty( 2, 'uint8c' ); -* // returns -*/ -declare function empty( length: number, dtype: 'uint8c' ): Uint8ClampedArray; - -/** -* Creates a zero-filled array having a specified length. -* -* @param length - array length -* @param dtype - data type -* @returns zero-filled array -* -* @example -* var arr = empty( 2, 'generic' ); -* // returns -*/ -declare function empty( length: number, dtype: 'generic' ): Array; - -/** -* Creates an uninitialized array having a specified length. -* -* ## Notes -* -* - In browser environments, the function always returns zero-filled arrays. -* - If `dtype` is `'generic'`, the function always returns a zero-filled array. -* - In Node.js versions `>=3.0.0`, the underlying memory of returned typed arrays is **not** initialized. Memory contents are unknown and may contain **sensitive** data. -* -* The function recognizes the following data types: -* -* - `float64`: double-precision floating-point numbers (IEEE 754) -* - `float32`: single-precision floating-point numbers (IEEE 754) -* - `complex128`: double-precision complex floating-point numbers -* - `complex64`: single-precision complex floating-point numbers -* - `int32`: 32-bit two's complement signed integers -* - `uint32`: 32-bit unsigned integers -* - `int16`: 16-bit two's complement signed integers -* - `uint16`: 16-bit unsigned integers -* - `int8`: 8-bit two's complement signed integers -* - `uint8`: 8-bit unsigned integers -* - `uint8c`: 8-bit unsigned integers clamped to `0-255` -* - `generic`: generic JavaScript values -* -* @param length - array length -* @param dtype - data type (default: 'float64') -* @returns empty array -* -* @example -* var arr = empty( 2 ); -* // returns -* -* @example -* var arr = empty( 2, 'float32' ); -* // returns -*/ -declare function empty( length: number, dtype?: DataType ): Float64Array; - - -// EXPORTS // - -export = empty; diff --git a/mod.js b/mod.js deleted file mode 100644 index 1c04a33..0000000 --- a/mod.js +++ /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 -/// -var e="function"==typeof Object.defineProperty?Object.defineProperty:null;var r=Object.defineProperty;function t(e){return"number"==typeof e}function n(e){var r,t="";for(r=0;r0&&(r-=1),n=i.toExponential(r)):n=i.toPrecision(e.precision),e.alternate||(n=y.call(n,v,"$1e"),n=y.call(n,b,"e"),n=y.call(n,w,""));break;default:throw new Error("invalid double notation. Value: "+e.specifier)}return n=y.call(n,h,"e+0$1"),n=y.call(n,p,"e-0$1"),e.alternate&&(n=y.call(n,g,"$1."),n=y.call(n,m,"$1.e")),i>=0&&e.sign&&(n=e.sign+n),n=e.specifier===s.call(e.specifier)?s.call(n):c.call(n)}function E(e){var r,t="";for(r=0;r127)throw new Error("invalid character code. Value: "+n.arg);n.arg=_(a)?String(n.arg):T(a)}break;case"e":case"E":case"f":case"F":case"g":case"G":r||(n.precision=6),n.arg=d(n);break;default:throw new Error("invalid specifier: "+n.specifier)}n.maxWidth>=0&&n.arg.length>n.maxWidth&&(n.arg=n.arg.substring(0,n.maxWidth)),n.padZeros?n.arg=i(n.arg,n.width||n.precision,n.padRight):n.width&&(n.arg=A(n.arg,n.width,n.padRight)),l+=n.arg||"",c+=1}return l}var k=/%(?:([1-9]\d*)\$)?([0 +\-#]*)(\*|\d+)?(?:(\.)(\*|\d+)?)?[hlL]?([%A-Za-z])/g;function L(e){var r={mapping:e[1]?parseInt(e[1],10):void 0,flags:e[2],width:e[3],precision:e[5],specifier:e[6]};return"."===e[4]&&void 0===e[5]&&(r.precision="1"),r}function S(e){var r,t,n,i;for(t=[],i=0,n=k.exec(e);n;)(r=e.slice(i,k.lastIndex-n[0].length)).length&&t.push(r),t.push(L(n)),i=k.lastIndex,n=k.exec(e);return(r=e.slice(i)).length&&t.push(r),t}function R(e){return"string"==typeof e}function B(e){var r,t,n;if(!R(e))throw new TypeError(B("invalid argument. First argument must be a string. Value: `%s`.",e));for(r=S(e),(t=new Array(arguments.length))[0]=r,n=1;nne&&oe(e)}function ue(e){return W(e)&&ae(e)}function fe(e){return ee(e)&&ae(e.valueOf())}function le(e){return ue(e)||fe(e)}function ce(e){return ue(e)&&e>=0}function se(e){return fe(e)&&e.valueOf()>=0}function ye(e){return ce(e)||se(e)}Y(le,"isPrimitive",ue),Y(le,"isObject",fe),Y(ye,"isPrimitive",ce),Y(ye,"isObject",se);var he="function"==typeof Float64Array;var pe="function"==typeof Float64Array?Float64Array:null;var ge="function"==typeof Float64Array?Float64Array:void 0;var me=function(){var e,r,t;if("function"!=typeof pe)return!1;try{r=new pe([1,3.14,-3.14,NaN]),t=r,e=(he&&t instanceof Float64Array||"[object Float64Array]"===D(t))&&1===r[0]&&3.14===r[1]&&-3.14===r[2]&&r[3]!=r[3]}catch(r){e=!1}return e}()?ge:function(){throw new Error("not implemented")},we="function"==typeof Float32Array;var be="function"==typeof Float32Array?Float32Array:null;var ve="function"==typeof Float32Array?Float32Array:void 0;var de=function(){var e,r,t;if("function"!=typeof be)return!1;try{r=new be([1,3.14,-3.14,5e40]),t=r,e=(we&&t instanceof Float32Array||"[object Float32Array]"===D(t))&&1===r[0]&&3.140000104904175===r[1]&&-3.140000104904175===r[2]&&r[3]===te}catch(r){e=!1}return e}()?ve:function(){throw new Error("not implemented")},Ee="function"==typeof Int16Array;var Ae="function"==typeof Int16Array?Int16Array:null;var Te="function"==typeof Int16Array?Int16Array:void 0;var _e=function(){var e,r,t;if("function"!=typeof Ae)return!1;try{r=new Ae([1,3.14,-3.14,32768]),t=r,e=(Ee&&t instanceof Int16Array||"[object Int16Array]"===D(t))&&1===r[0]&&3===r[1]&&-3===r[2]&&-32768===r[3]}catch(r){e=!1}return e}()?Te:function(){throw new Error("not implemented")},xe="function"==typeof Int32Array;var je="function"==typeof Int32Array?Int32Array:null;var Ve="function"==typeof Int32Array?Int32Array:void 0;var ke=function(){var e,r,t;if("function"!=typeof je)return!1;try{r=new je([1,3.14,-3.14,2147483648]),t=r,e=(xe&&t instanceof Int32Array||"[object Int32Array]"===D(t))&&1===r[0]&&3===r[1]&&-3===r[2]&&-2147483648===r[3]}catch(r){e=!1}return e}()?Ve:function(){throw new Error("not implemented")},Le="function"==typeof Int8Array;var Se="function"==typeof Int8Array?Int8Array:null;var Re="function"==typeof Int8Array?Int8Array:void 0;var Be=function(){var e,r,t;if("function"!=typeof Se)return!1;try{r=new Se([1,3.14,-3.14,128]),t=r,e=(Le&&t instanceof Int8Array||"[object Int8Array]"===D(t))&&1===r[0]&&3===r[1]&&-3===r[2]&&-128===r[3]}catch(r){e=!1}return e}()?Re:function(){throw new Error("not implemented")},Ie="function"==typeof Uint16Array;var Ce="function"==typeof Uint16Array?Uint16Array:null;var Fe="function"==typeof Uint16Array?Uint16Array:void 0;var Oe=function(){var e,r,t;if("function"!=typeof Ce)return!1;try{r=new Ce(r=[1,3.14,-3.14,65536,65537]),t=r,e=(Ie&&t instanceof Uint16Array||"[object Uint16Array]"===D(t))&&1===r[0]&&3===r[1]&&65533===r[2]&&0===r[3]&&1===r[4]}catch(r){e=!1}return e}()?Fe:function(){throw new Error("not implemented")},Me="function"==typeof Uint32Array;var Ne="function"==typeof Uint32Array?Uint32Array:null;var Ue="function"==typeof Uint32Array?Uint32Array:void 0;var Pe=function(){var e,r,t;if("function"!=typeof Ne)return!1;try{r=new Ne(r=[1,3.14,-3.14,4294967296,4294967297]),t=r,e=(Me&&t instanceof Uint32Array||"[object Uint32Array]"===D(t))&&1===r[0]&&3===r[1]&&4294967293===r[2]&&0===r[3]&&1===r[4]}catch(r){e=!1}return e}()?Ue:function(){throw new Error("not implemented")},Ye="function"==typeof Uint8Array;var We="function"==typeof Uint8Array?Uint8Array:null;var $e="function"==typeof Uint8Array?Uint8Array:void 0;var Ge=function(){var e,r,t;if("function"!=typeof We)return!1;try{r=new We(r=[1,3.14,-3.14,256,257]),t=r,e=(Ye&&t instanceof Uint8Array||"[object Uint8Array]"===D(t))&&1===r[0]&&3===r[1]&&253===r[2]&&0===r[3]&&1===r[4]}catch(r){e=!1}return e}()?$e:function(){throw new Error("not implemented")},Ze="function"==typeof Uint8ClampedArray;var Xe="function"==typeof Uint8ClampedArray?Uint8ClampedArray:null;var ze="function"==typeof Uint8ClampedArray?Uint8ClampedArray:void 0;var Je=function(){var e,r,t;if("function"!=typeof Xe)return!1;try{r=new Xe([-1,0,1,3.14,4.99,255,256]),t=r,e=(Ze&&t instanceof Uint8ClampedArray||"[object Uint8ClampedArray]"===D(t))&&0===r[0]&&0===r[1]&&1===r[2]&&3===r[3]&&5===r[4]&&255===r[5]&&255===r[6]}catch(r){e=!1}return e}()?ze:function(){throw new Error("not implemented")};function qe(e){return"object"==typeof e&&null!==e&&"number"==typeof e.length&&oe(e.length)&&e.length>=0&&e.length<=4294967295}function De(e){return"object"==typeof e&&null!==e&&"number"==typeof e.length&&oe(e.length)&&e.length>=0&&e.length<=9007199254740991}var He="function"==typeof ArrayBuffer;function Ke(e){return He&&e instanceof ArrayBuffer||"[object ArrayBuffer]"===D(e)}var Qe=Array.isArray?Array.isArray:function(e){return"[object Array]"===D(e)};function er(e){return"object"==typeof e&&null!==e&&!Qe(e)}var rr=/./;function tr(e){return"boolean"==typeof e}var nr=Boolean,ir=Boolean.prototype.toString;var or=G();function ar(e){return"object"==typeof e&&(e instanceof nr||(or?function(e){try{return ir.call(e),!0}catch(e){return!1}}(e):"[object Boolean]"===D(e)))}function ur(e){return tr(e)||ar(e)}function fr(){return new Function("return this;")()}Y(ur,"isPrimitive",tr),Y(ur,"isObject",ar);var lr="object"==typeof self?self:null,cr="object"==typeof window?window:null,sr="undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},yr="object"==typeof sr?sr:null,hr="object"==typeof globalThis?globalThis:null;var pr=function(e){if(arguments.length){if(!tr(e))throw new TypeError(B("invalid argument. Must provide a boolean. Value: `%s`.",e));if(e)return fr()}if(hr)return hr;if(lr)return lr;if(cr)return cr;if(yr)return yr;throw new Error("unexpected error. Unable to resolve global object.")}(),gr=pr.document&&pr.document.childNodes,mr=Int8Array;function wr(){return/^\s*function\s*([^(]*)/i}var br=/^\s*function\s*([^(]*)/i;function vr(e){return null!==e&&"object"==typeof e}function dr(e){var r,t,n,i;if(("Object"===(t=D(e).slice(8,-1))||"Error"===t)&&e.constructor){if("string"==typeof(n=e.constructor).name)return n.name;if(r=br.exec(n.toString()))return r[1]}return vr(i=e)&&(i._isBuffer||i.constructor&&"function"==typeof i.constructor.isBuffer&&i.constructor.isBuffer(i))?"Buffer":t}Y(wr,"REGEXP",br),Y(vr,"isObjectLikeArray",function(e){if("function"!=typeof e)throw new TypeError(B("invalid argument. Must provide a function. Value: `%s`.",e));return function(r){var t,n;if(!Qe(r))return!1;if(0===(t=r.length))return!1;for(n=0;n=2)r.push(n[0],n[1]);else{if(!kr(n))return new TypeError(B("invalid argument. An iterator must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",n));r.push(Ir(n),Cr(n))}return r}function Wr(e,r,t){var n,i,o,a;for(n=[],a=-1;!(i=e.next()).done;)if(a+=1,qe(o=r.call(t,i.value,a))&&o.length>=2)n.push(o[0],o[1]);else{if(!kr(o))return new TypeError(B("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",o));n.push(Ir(o),Cr(o))}return n}function $r(e,r){var t,n,i,o;for(t=r.length,o=0,i=0;it.byteLength-e)throw new RangeError(B("invalid arguments. ArrayBuffer has insufficient capacity. Either decrease the array length or provide a bigger buffer. Minimum capacity: `%u`.",n*Gr));t=new de(t,e,2*n)}}return Y(this,"_buffer",t),Y(this,"_length",t.length/2),this}function Hr(e){return e.re}function Kr(e){return e.im}function Qr(e){var r,t,n;for(r=[];!(t=e.next()).done;)if(qe(n=t.value)&&n.length>=2)r.push(n[0],n[1]);else{if(!kr(n))return new TypeError(B("invalid argument. An iterator must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",n));r.push(Hr(n),Kr(n))}return r}function et(e,r,t){var n,i,o,a;for(n=[],a=-1;!(i=e.next()).done;)if(a+=1,qe(o=r.call(t,i.value,a))&&o.length>=2)n.push(o[0],o[1]);else{if(!kr(o))return new TypeError(B("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",o));n.push(Hr(o),Kr(o))}return n}function rt(e,r){var t,n,i,o;for(t=r.length,o=0,i=0;i1){if(!Ar(n=arguments[1]))throw new TypeError(B("invalid argument. Second argument must be a function. Value: `%s`.",n));t>2&&(r=arguments[2])}if(Xr(e)){if(f=e.length,n){for(o=(i=new this(f))._buffer,y=0,s=0;s=2))throw new TypeError(B("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",c));o[y]=c[0],o[y+1]=c[1]}y+=2}return i}return new this(e)}if(De(e)){if(n){for(f=e.length,u=e.get&&e.set?Pr("default"):Nr("default"),s=0;s=2))throw new TypeError(B("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",c));o[y]=c[0],o[y+1]=c[1]}y+=2}return i}return new this(e)}if(er(e)&&Zr&&Ar(e[Rr])){if(!Ar((o=e[Rr]()).next))throw new TypeError(B("invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.",e));if((a=n?Wr(o,n,r):Yr(o))instanceof Error)throw a;for(o=(i=new this(f=a.length/2))._buffer,s=0;s=n)return{done:!0};return r=new Vr(e[a+=2],e[a+1]),{value:[o,r],done:!1}})),Y(t,"return",(function(e){if(i=!0,arguments.length)return{value:e,done:!0};return{done:!0}})),Rr&&Y(t,Rr,(function(){return r.entries()})),t})),Y(Dr.prototype,"get",(function(e){var r;if(!Xr(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!ce(e))throw new TypeError(B("invalid argument. Must provide a nonnegative integer. Value: `%s`.",e));if(!(e>=this._length))return new Vr((r=this._buffer)[e*=2],r[e+1])})),Br(Dr.prototype,"length",(function(){return this._length})),Y(Dr.prototype,"set",(function(e){var r,t,n,i,o,a,u,f,l;if(!Xr(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(n=this._buffer,arguments.length>1){if(!ce(t=arguments[1]))throw new TypeError(B("invalid argument. Index argument must be a nonnegative integer. Value: `%s`.",t))}else t=0;if(kr(e)){if(t>=this._length)throw new RangeError(B("invalid argument. Index argument is out-of-bounds. Value: `%u`.",t));return n[t*=2]=Ir(e),void(n[t+1]=Cr(e))}if(Xr(e)){if(t+(a=e._length)>this._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");if(r=e._buffer,l=n.byteOffset+t*Gr,r.buffer===n.buffer&&r.byteOffsetl){for(i=new de(r.length),f=0;fthis._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");if(r=e,l=n.byteOffset+t*Gr,r.buffer===n.buffer&&r.byteOffsetl){for(i=new de(a),f=0;fthis._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");for(t*=2,f=0;ft.byteLength-e)throw new RangeError(B("invalid arguments. ArrayBuffer has insufficient capacity. Either decrease the array length or provide a bigger buffer. Minimum capacity: `%u`.",n*tt));t=new me(t,e,2*n)}}return Y(this,"_buffer",t),Y(this,"_length",t.length/2),this}Y(ft,"BYTES_PER_ELEMENT",tt),Y(ft,"name","Complex128Array"),Y(ft,"from",(function(e){var r,t,n,i,o,a,u,f,l,c,s,y;if(!Ar(this))throw new TypeError("invalid invocation. `this` context must be a constructor.");if(!ot(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if((t=arguments.length)>1){if(!Ar(n=arguments[1]))throw new TypeError(B("invalid argument. Second argument must be a function. Value: `%s`.",n));t>2&&(r=arguments[2])}if(it(e)){if(f=e.length,n){for(o=(i=new this(f))._buffer,y=0,s=0;s=2))throw new TypeError(B("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",c));o[y]=c[0],o[y+1]=c[1]}y+=2}return i}return new this(e)}if(De(e)){if(n){for(f=e.length,u=e.get&&e.set?Pr("default"):Nr("default"),s=0;s=2))throw new TypeError(B("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",c));o[y]=c[0],o[y+1]=c[1]}y+=2}return i}return new this(e)}if(er(e)&&nt&&Ar(e[Rr])){if(!Ar((o=e[Rr]()).next))throw new TypeError(B("invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.",e));if((a=n?et(o,n,r):Qr(o))instanceof Error)throw a;for(o=(i=new this(f=a.length/2))._buffer,s=0;s=n)return{done:!0};return r=new Tr(e[a+=2],e[a+1]),{value:[o,r],done:!1}})),Y(t,"return",(function(e){if(i=!0,arguments.length)return{value:e,done:!0};return{done:!0}})),Rr&&Y(t,Rr,(function(){return r.entries()})),t})),Y(ft.prototype,"get",(function(e){var r;if(!it(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!ce(e))throw new TypeError(B("invalid argument. Must provide a nonnegative integer. Value: `%s`.",e));if(!(e>=this._length))return new Tr((r=this._buffer)[e*=2],r[e+1])})),Br(ft.prototype,"length",(function(){return this._length})),Y(ft.prototype,"set",(function(e){var r,t,n,i,o,a,u,f,l;if(!it(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(n=this._buffer,arguments.length>1){if(!ce(t=arguments[1]))throw new TypeError(B("invalid argument. Index argument must be a nonnegative integer. Value: `%s`.",t))}else t=0;if(kr(e)){if(t>=this._length)throw new RangeError(B("invalid argument. Index argument is out-of-bounds. Value: `%u`.",t));return n[t*=2]=Hr(e),void(n[t+1]=Kr(e))}if(it(e)){if(t+(a=e._length)>this._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");if(r=e._buffer,l=n.byteOffset+t*tt,r.buffer===n.buffer&&r.byteOffsetl){for(i=new me(r.length),f=0;fthis._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");if(r=e,l=n.byteOffset+t*tt,r.buffer===n.buffer&&r.byteOffsetl){for(i=new me(a),f=0;fthis._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");for(t*=2,f=0;f1?arguments[1]:"float64"))return st(e);if(null===(t=ct(r)))throw new TypeError(B("invalid argument. Second argument must be a recognized data type. Value: `%s`.",r));return new t(e)}function ht(e){return arguments.length>1?yt(e,arguments[1]):yt(e)}export{ht as default}; -//# sourceMappingURL=mod.js.map diff --git a/mod.js.map b/mod.js.map deleted file mode 100644 index ca3f210..0000000 --- a/mod.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"mod.js","sources":["../node_modules/@stdlib/utils-define-property/lib/define_property.js","../node_modules/@stdlib/utils-define-property/lib/builtin.js","../node_modules/@stdlib/string-base-format-interpolate/lib/is_number.js","../node_modules/@stdlib/string-base-format-interpolate/lib/zero_pad.js","../node_modules/@stdlib/string-base-format-interpolate/lib/format_integer.js","../node_modules/@stdlib/string-base-format-interpolate/lib/is_string.js","../node_modules/@stdlib/string-base-format-interpolate/lib/format_double.js","../node_modules/@stdlib/string-base-format-interpolate/lib/space_pad.js","../node_modules/@stdlib/string-base-format-interpolate/lib/main.js","../node_modules/@stdlib/string-base-format-tokenize/lib/main.js","../node_modules/@stdlib/string-format/lib/is_string.js","../node_modules/@stdlib/string-format/lib/main.js","../node_modules/@stdlib/utils-define-property/lib/polyfill.js","../node_modules/@stdlib/utils-define-property/lib/index.js","../node_modules/@stdlib/utils-define-property/lib/has_define_property_support.js","../node_modules/@stdlib/utils-define-nonenumerable-read-only-property/lib/main.js","../node_modules/@stdlib/assert-is-number/lib/primitive.js","../node_modules/@stdlib/assert-has-tostringtag-support/lib/main.js","../node_modules/@stdlib/assert-has-symbol-support/lib/main.js","../node_modules/@stdlib/utils-native-class/lib/tostring.js","../node_modules/@stdlib/assert-has-own-property/lib/main.js","../node_modules/@stdlib/symbol-ctor/lib/main.js","../node_modules/@stdlib/utils-native-class/lib/tostringtag.js","../node_modules/@stdlib/utils-native-class/lib/index.js","../node_modules/@stdlib/utils-native-class/lib/polyfill.js","../node_modules/@stdlib/utils-native-class/lib/main.js","../node_modules/@stdlib/number-ctor/lib/main.js","../node_modules/@stdlib/assert-is-number/lib/tostring.js","../node_modules/@stdlib/assert-is-number/lib/object.js","../node_modules/@stdlib/assert-is-number/lib/try2serialize.js","../node_modules/@stdlib/assert-is-number/lib/main.js","../node_modules/@stdlib/assert-is-number/lib/index.js","../node_modules/@stdlib/constants-float64-pinf/lib/index.js","../node_modules/@stdlib/constants-float64-ninf/lib/index.js","../node_modules/@stdlib/math-base-special-floor/lib/main.js","../node_modules/@stdlib/math-base-assert-is-integer/lib/main.js","../node_modules/@stdlib/assert-is-integer/lib/integer.js","../node_modules/@stdlib/assert-is-integer/lib/primitive.js","../node_modules/@stdlib/assert-is-integer/lib/object.js","../node_modules/@stdlib/assert-is-integer/lib/main.js","../node_modules/@stdlib/assert-is-nonnegative-integer/lib/primitive.js","../node_modules/@stdlib/assert-is-nonnegative-integer/lib/object.js","../node_modules/@stdlib/assert-is-nonnegative-integer/lib/main.js","../node_modules/@stdlib/assert-is-integer/lib/index.js","../node_modules/@stdlib/assert-is-nonnegative-integer/lib/index.js","../node_modules/@stdlib/assert-is-float64array/lib/main.js","../node_modules/@stdlib/assert-has-float64array-support/lib/float64array.js","../node_modules/@stdlib/array-float64/lib/main.js","../node_modules/@stdlib/array-float64/lib/index.js","../node_modules/@stdlib/assert-has-float64array-support/lib/main.js","../node_modules/@stdlib/array-float64/lib/polyfill.js","../node_modules/@stdlib/assert-is-float32array/lib/main.js","../node_modules/@stdlib/assert-has-float32array-support/lib/float32array.js","../node_modules/@stdlib/array-float32/lib/main.js","../node_modules/@stdlib/array-float32/lib/index.js","../node_modules/@stdlib/assert-has-float32array-support/lib/main.js","../node_modules/@stdlib/array-float32/lib/polyfill.js","../node_modules/@stdlib/assert-is-int16array/lib/main.js","../node_modules/@stdlib/constants-int16-max/lib/index.js","../node_modules/@stdlib/assert-has-int16array-support/lib/int16array.js","../node_modules/@stdlib/array-int16/lib/main.js","../node_modules/@stdlib/array-int16/lib/index.js","../node_modules/@stdlib/assert-has-int16array-support/lib/main.js","../node_modules/@stdlib/constants-int16-min/lib/index.js","../node_modules/@stdlib/array-int16/lib/polyfill.js","../node_modules/@stdlib/assert-is-int32array/lib/main.js","../node_modules/@stdlib/constants-int32-max/lib/index.js","../node_modules/@stdlib/assert-has-int32array-support/lib/int32array.js","../node_modules/@stdlib/array-int32/lib/main.js","../node_modules/@stdlib/array-int32/lib/index.js","../node_modules/@stdlib/assert-has-int32array-support/lib/main.js","../node_modules/@stdlib/constants-int32-min/lib/index.js","../node_modules/@stdlib/array-int32/lib/polyfill.js","../node_modules/@stdlib/assert-is-int8array/lib/main.js","../node_modules/@stdlib/constants-int8-max/lib/index.js","../node_modules/@stdlib/assert-has-int8array-support/lib/int8array.js","../node_modules/@stdlib/array-int8/lib/main.js","../node_modules/@stdlib/array-int8/lib/index.js","../node_modules/@stdlib/assert-has-int8array-support/lib/main.js","../node_modules/@stdlib/constants-int8-min/lib/index.js","../node_modules/@stdlib/array-int8/lib/polyfill.js","../node_modules/@stdlib/assert-is-uint16array/lib/main.js","../node_modules/@stdlib/constants-uint16-max/lib/index.js","../node_modules/@stdlib/assert-has-uint16array-support/lib/uint16array.js","../node_modules/@stdlib/array-uint16/lib/main.js","../node_modules/@stdlib/array-uint16/lib/index.js","../node_modules/@stdlib/assert-has-uint16array-support/lib/main.js","../node_modules/@stdlib/array-uint16/lib/polyfill.js","../node_modules/@stdlib/assert-is-uint32array/lib/main.js","../node_modules/@stdlib/constants-uint32-max/lib/index.js","../node_modules/@stdlib/assert-has-uint32array-support/lib/uint32array.js","../node_modules/@stdlib/array-uint32/lib/main.js","../node_modules/@stdlib/array-uint32/lib/index.js","../node_modules/@stdlib/assert-has-uint32array-support/lib/main.js","../node_modules/@stdlib/array-uint32/lib/polyfill.js","../node_modules/@stdlib/assert-is-uint8array/lib/main.js","../node_modules/@stdlib/constants-uint8-max/lib/index.js","../node_modules/@stdlib/assert-has-uint8array-support/lib/uint8array.js","../node_modules/@stdlib/array-uint8/lib/main.js","../node_modules/@stdlib/array-uint8/lib/index.js","../node_modules/@stdlib/assert-has-uint8array-support/lib/main.js","../node_modules/@stdlib/array-uint8/lib/polyfill.js","../node_modules/@stdlib/assert-is-uint8clampedarray/lib/main.js","../node_modules/@stdlib/assert-has-uint8clampedarray-support/lib/uint8clampedarray.js","../node_modules/@stdlib/array-uint8c/lib/main.js","../node_modules/@stdlib/array-uint8c/lib/index.js","../node_modules/@stdlib/assert-has-uint8clampedarray-support/lib/main.js","../node_modules/@stdlib/array-uint8c/lib/polyfill.js","../node_modules/@stdlib/assert-is-array-like-object/lib/main.js","../node_modules/@stdlib/constants-array-max-array-length/lib/index.js","../node_modules/@stdlib/assert-is-collection/lib/main.js","../node_modules/@stdlib/constants-array-max-typed-array-length/lib/index.js","../node_modules/@stdlib/assert-is-arraybuffer/lib/main.js","../node_modules/@stdlib/assert-is-array/lib/main.js","../node_modules/@stdlib/assert-is-object/lib/main.js","../node_modules/@stdlib/utils-type-of/lib/fixtures/re.js","../node_modules/@stdlib/assert-is-boolean/lib/primitive.js","../node_modules/@stdlib/boolean-ctor/lib/main.js","../node_modules/@stdlib/assert-is-boolean/lib/tostring.js","../node_modules/@stdlib/assert-is-boolean/lib/object.js","../node_modules/@stdlib/assert-is-boolean/lib/try2serialize.js","../node_modules/@stdlib/assert-is-boolean/lib/main.js","../node_modules/@stdlib/utils-global/lib/codegen.js","../node_modules/@stdlib/assert-is-boolean/lib/index.js","../node_modules/@stdlib/utils-global/lib/self.js","../node_modules/@stdlib/utils-global/lib/window.js","../node_modules/@stdlib/utils-global/lib/global.js","../node_modules/@stdlib/utils-global/lib/global_this.js","../node_modules/@stdlib/utils-type-of/lib/fixtures/nodelist.js","../node_modules/@stdlib/utils-global/lib/main.js","../node_modules/@stdlib/utils-type-of/lib/fixtures/typedarray.js","../node_modules/@stdlib/regexp-function-name/lib/main.js","../node_modules/@stdlib/regexp-function-name/lib/regexp.js","../node_modules/@stdlib/assert-is-object-like/lib/main.js","../node_modules/@stdlib/utils-constructor-name/lib/main.js","../node_modules/@stdlib/assert-is-buffer/lib/main.js","../node_modules/@stdlib/regexp-function-name/lib/index.js","../node_modules/@stdlib/assert-is-object-like/lib/index.js","../node_modules/@stdlib/assert-tools-array-function/lib/main.js","../node_modules/@stdlib/utils-type-of/lib/index.js","../node_modules/@stdlib/utils-type-of/lib/check.js","../node_modules/@stdlib/utils-type-of/lib/polyfill.js","../node_modules/@stdlib/utils-type-of/lib/main.js","../node_modules/@stdlib/assert-is-function/lib/main.js","../node_modules/@stdlib/complex-float64/lib/main.js","../node_modules/@stdlib/complex-float64/lib/tostring.js","../node_modules/@stdlib/complex-float64/lib/tojson.js","../node_modules/@stdlib/number-float64-base-to-float32/lib/main.js","../node_modules/@stdlib/number-float64-base-to-float32/lib/polyfill.js","../node_modules/@stdlib/number-float64-base-to-float32/lib/index.js","../node_modules/@stdlib/complex-float32/lib/main.js","../node_modules/@stdlib/assert-is-complex-like/lib/main.js","../node_modules/@stdlib/math-base-assert-is-even/lib/main.js","../node_modules/@stdlib/assert-has-iterator-symbol-support/lib/main.js","../node_modules/@stdlib/complex-float32/lib/tostring.js","../node_modules/@stdlib/complex-float32/lib/tojson.js","../node_modules/@stdlib/symbol-iterator/lib/main.js","../node_modules/@stdlib/utils-define-nonenumerable-read-only-accessor/lib/main.js","../node_modules/@stdlib/complex-realf/lib/main.js","../node_modules/@stdlib/complex-imagf/lib/main.js","../node_modules/@stdlib/strided-base-reinterpret-complex64/lib/main.js","../node_modules/@stdlib/strided-base-reinterpret-complex128/lib/main.js","../node_modules/@stdlib/array-base-getter/lib/main.js","../node_modules/@stdlib/array-base-accessor-getter/lib/main.js","../node_modules/@stdlib/array-complex64/lib/from_iterator.js","../node_modules/@stdlib/array-complex64/lib/from_iterator_map.js","../node_modules/@stdlib/array-complex64/lib/from_array.js","../node_modules/@stdlib/array-complex64/lib/main.js","../node_modules/@stdlib/complex-real/lib/main.js","../node_modules/@stdlib/complex-imag/lib/main.js","../node_modules/@stdlib/array-complex128/lib/from_iterator.js","../node_modules/@stdlib/array-complex128/lib/from_iterator_map.js","../node_modules/@stdlib/array-complex128/lib/from_array.js","../node_modules/@stdlib/array-complex128/lib/main.js","../node_modules/@stdlib/array-ctors/lib/ctors.js","../node_modules/@stdlib/array-ctors/lib/main.js","../node_modules/@stdlib/array-base-zeros/lib/main.js","../node_modules/@stdlib/array-base-filled/lib/main.js","../node_modules/@stdlib/array-zeros/lib/main.js","../lib/polyfill.js"],"sourcesContent":["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Object.defineProperty === 'function' ) ? Object.defineProperty : null;\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Defines (or modifies) an object property.\n*\n* ## Notes\n*\n* - Property descriptors come in two flavors: **data descriptors** and **accessor descriptors**. A data descriptor is a property that has a value, which may or may not be writable. An accessor descriptor is a property described by a getter-setter function pair. A descriptor must be one of these two flavors and cannot be both.\n*\n* @name defineProperty\n* @type {Function}\n* @param {Object} obj - object on which to define the property\n* @param {(string|symbol)} prop - property name\n* @param {Object} descriptor - property descriptor\n* @param {boolean} [descriptor.configurable=false] - boolean indicating if property descriptor can be changed and if the property can be deleted from the provided object\n* @param {boolean} [descriptor.enumerable=false] - boolean indicating if the property shows up when enumerating object properties\n* @param {boolean} [descriptor.writable=false] - boolean indicating if the value associated with the property can be changed with an assignment operator\n* @param {*} [descriptor.value] - property value\n* @param {(Function|void)} [descriptor.get=undefined] - function which serves as a getter for the property, or, if no getter, undefined. When the property is accessed, a getter function is called without arguments and with the `this` context set to the object through which the property is accessed (which may not be the object on which the property is defined due to inheritance). The return value will be used as the property value.\n* @param {(Function|void)} [descriptor.set=undefined] - function which serves as a setter for the property, or, if no setter, undefined. When assigning a property value, a setter function is called with one argument (the value being assigned to the property) and with the `this` context set to the object through which the property is assigned.\n* @throws {TypeError} first argument must be an object\n* @throws {TypeError} third argument must be an object\n* @throws {Error} property descriptor cannot have both a value and a setter and/or getter\n* @returns {Object} object with added property\n*\n* @example\n* var obj = {};\n*\n* defineProperty( obj, 'foo', {\n* 'value': 'bar'\n* });\n*\n* var str = obj.foo;\n* // returns 'bar'\n*/\nvar defineProperty = Object.defineProperty;\n\n\n// EXPORTS //\n\nexport default defineProperty;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Tests if a value is a number primitive.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number primitive\n*\n* @example\n* var bool = isNumber( 3.14 );\n* // returns true\n*\n* @example\n* var bool = isNumber( NaN );\n* // returns true\n*\n* @example\n* var bool = isNumber( new Number( 3.14 ) );\n* // returns false\n*/\nfunction isNumber( value ) {\n\treturn ( typeof value === 'number' ); // NOTE: we inline the `isNumber.isPrimitive` function from `@stdlib/assert/is-number` in order to avoid circular dependencies.\n}\n\n\n// EXPORTS //\n\nexport default isNumber;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// FUNCTIONS //\n\n/**\n* Tests if a string starts with a minus sign (`-`).\n*\n* @private\n* @param {string} str - input string\n* @returns {boolean} boolean indicating if a string starts with a minus sign (`-`)\n*/\nfunction startsWithMinus( str ) {\n\treturn str[ 0 ] === '-';\n}\n\n/**\n* Returns a string of `n` zeros.\n*\n* @private\n* @param {number} n - number of zeros\n* @returns {string} string of zeros\n*/\nfunction zeros( n ) {\n\tvar out = '';\n\tvar i;\n\tfor ( i = 0; i < n; i++ ) {\n\t\tout += '0';\n\t}\n\treturn out;\n}\n\n\n// MAIN //\n\n/**\n* Pads a token with zeros to the specified width.\n*\n* @private\n* @param {string} str - token argument\n* @param {number} width - token width\n* @param {boolean} [right=false] - boolean indicating whether to pad to the right\n* @returns {string} padded token argument\n*/\nfunction zeroPad( str, width, right ) {\n\tvar negative = false;\n\tvar pad = width - str.length;\n\tif ( pad < 0 ) {\n\t\treturn str;\n\t}\n\tif ( startsWithMinus( str ) ) {\n\t\tnegative = true;\n\t\tstr = str.substr( 1 );\n\t}\n\tstr = ( right ) ?\n\t\tstr + zeros( pad ) :\n\t\tzeros( pad ) + str;\n\tif ( negative ) {\n\t\tstr = '-' + str;\n\t}\n\treturn str;\n}\n\n\n// EXPORTS //\n\nexport default zeroPad;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isNumber from './is_number.js';\nimport zeroPad from './zero_pad.js';\n\n// NOTE: for the following, we explicitly avoid using stdlib packages in this particular package in order to avoid circular dependencies.\nvar lowercase = String.prototype.toLowerCase;\nvar uppercase = String.prototype.toUpperCase;\n\n\n// MAIN //\n\n/**\n* Formats a token object argument as an integer.\n*\n* @private\n* @param {Object} token - token object\n* @throws {Error} must provide a valid integer\n* @returns {string} formatted token argument\n*/\nfunction formatInteger( token ) {\n\tvar base;\n\tvar out;\n\tvar i;\n\n\tswitch ( token.specifier ) {\n\tcase 'b':\n\t\t// Case: %b (binary)\n\t\tbase = 2;\n\t\tbreak;\n\tcase 'o':\n\t\t// Case: %o (octal)\n\t\tbase = 8;\n\t\tbreak;\n\tcase 'x':\n\tcase 'X':\n\t\t// Case: %x, %X (hexadecimal)\n\t\tbase = 16;\n\t\tbreak;\n\tcase 'd':\n\tcase 'i':\n\tcase 'u':\n\tdefault:\n\t\t// Case: %d, %i, %u (decimal)\n\t\tbase = 10;\n\t\tbreak;\n\t}\n\tout = token.arg;\n\ti = parseInt( out, 10 );\n\tif ( !isFinite( i ) ) { // NOTE: We use the global `isFinite` function here instead of `@stdlib/math/base/assert/is-finite` in order to avoid circular dependencies.\n\t\tif ( !isNumber( out ) ) {\n\t\t\tthrow new Error( 'invalid integer. Value: ' + out );\n\t\t}\n\t\ti = 0;\n\t}\n\tif ( i < 0 && ( token.specifier === 'u' || base !== 10 ) ) {\n\t\ti = 0xffffffff + i + 1;\n\t}\n\tif ( i < 0 ) {\n\t\tout = ( -i ).toString( base );\n\t\tif ( token.precision ) {\n\t\t\tout = zeroPad( out, token.precision, token.padRight );\n\t\t}\n\t\tout = '-' + out;\n\t} else {\n\t\tout = i.toString( base );\n\t\tif ( !i && !token.precision ) {\n\t\t\tout = '';\n\t\t} else if ( token.precision ) {\n\t\t\tout = zeroPad( out, token.precision, token.padRight );\n\t\t}\n\t\tif ( token.sign ) {\n\t\t\tout = token.sign + out;\n\t\t}\n\t}\n\tif ( base === 16 ) {\n\t\tif ( token.alternate ) {\n\t\t\tout = '0x' + out;\n\t\t}\n\t\tout = ( token.specifier === uppercase.call( token.specifier ) ) ?\n\t\t\tuppercase.call( out ) :\n\t\t\tlowercase.call( out );\n\t}\n\tif ( base === 8 ) {\n\t\tif ( token.alternate && out.charAt( 0 ) !== '0' ) {\n\t\t\tout = '0' + out;\n\t\t}\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default formatInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Tests if a value is a string primitive.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a string primitive\n*\n* @example\n* var bool = isString( 'beep' );\n* // returns true\n*\n* @example\n* var bool = isString( new String( 'beep' ) );\n* // returns false\n*/\nfunction isString( value ) {\n\treturn ( typeof value === 'string' ); // NOTE: we inline the `isString.isPrimitive` function from `@stdlib/assert/is-string` in order to avoid circular dependencies.\n}\n\n\n// EXPORTS //\n\nexport default isString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isNumber from './is_number.js';\n\n// NOTE: for the following, we explicitly avoid using stdlib packages in this particular package in order to avoid circular dependencies.\nvar abs = Math.abs; // eslint-disable-line stdlib/no-builtin-math\nvar lowercase = String.prototype.toLowerCase;\nvar uppercase = String.prototype.toUpperCase;\nvar replace = String.prototype.replace;\n\n\n// VARIABLES //\n\nvar RE_EXP_POS_DIGITS = /e\\+(\\d)$/;\nvar RE_EXP_NEG_DIGITS = /e-(\\d)$/;\nvar RE_ONLY_DIGITS = /^(\\d+)$/;\nvar RE_DIGITS_BEFORE_EXP = /^(\\d+)e/;\nvar RE_TRAILING_PERIOD_ZERO = /\\.0$/;\nvar RE_PERIOD_ZERO_EXP = /\\.0*e/;\nvar RE_ZERO_BEFORE_EXP = /(\\..*[^0])0*e/;\n\n\n// MAIN //\n\n/**\n* Formats a token object argument as a floating-point number.\n*\n* @private\n* @param {Object} token - token object\n* @throws {Error} must provide a valid floating-point number\n* @returns {string} formatted token argument\n*/\nfunction formatDouble( token ) {\n\tvar digits;\n\tvar out;\n\tvar f = parseFloat( token.arg );\n\tif ( !isFinite( f ) ) { // NOTE: We use the global `isFinite` function here instead of `@stdlib/math/base/assert/is-finite` in order to avoid circular dependencies.\n\t\tif ( !isNumber( token.arg ) ) {\n\t\t\tthrow new Error( 'invalid floating-point number. Value: ' + out );\n\t\t}\n\t\t// Case: NaN, Infinity, or -Infinity\n\t\tf = token.arg;\n\t}\n\tswitch ( token.specifier ) {\n\tcase 'e':\n\tcase 'E':\n\t\tout = f.toExponential( token.precision );\n\t\tbreak;\n\tcase 'f':\n\tcase 'F':\n\t\tout = f.toFixed( token.precision );\n\t\tbreak;\n\tcase 'g':\n\tcase 'G':\n\t\tif ( abs( f ) < 0.0001 ) {\n\t\t\tdigits = token.precision;\n\t\t\tif ( digits > 0 ) {\n\t\t\t\tdigits -= 1;\n\t\t\t}\n\t\t\tout = f.toExponential( digits );\n\t\t} else {\n\t\t\tout = f.toPrecision( token.precision );\n\t\t}\n\t\tif ( !token.alternate ) {\n\t\t\tout = replace.call( out, RE_ZERO_BEFORE_EXP, '$1e' );\n\t\t\tout = replace.call( out, RE_PERIOD_ZERO_EXP, 'e');\n\t\t\tout = replace.call( out, RE_TRAILING_PERIOD_ZERO, '' );\n\t\t}\n\t\tbreak;\n\tdefault:\n\t\tthrow new Error( 'invalid double notation. Value: ' + token.specifier );\n\t}\n\tout = replace.call( out, RE_EXP_POS_DIGITS, 'e+0$1' );\n\tout = replace.call( out, RE_EXP_NEG_DIGITS, 'e-0$1' );\n\tif ( token.alternate ) {\n\t\tout = replace.call( out, RE_ONLY_DIGITS, '$1.' );\n\t\tout = replace.call( out, RE_DIGITS_BEFORE_EXP, '$1.e' );\n\t}\n\tif ( f >= 0 && token.sign ) {\n\t\tout = token.sign + out;\n\t}\n\tout = ( token.specifier === uppercase.call( token.specifier ) ) ?\n\t\tuppercase.call( out ) :\n\t\tlowercase.call( out );\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default formatDouble;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// FUNCTIONS //\n\n/**\n* Returns `n` spaces.\n*\n* @private\n* @param {number} n - number of spaces\n* @returns {string} string of spaces\n*/\nfunction spaces( n ) {\n\tvar out = '';\n\tvar i;\n\tfor ( i = 0; i < n; i++ ) {\n\t\tout += ' ';\n\t}\n\treturn out;\n}\n\n\n// MAIN //\n\n/**\n* Pads a token with spaces to the specified width.\n*\n* @private\n* @param {string} str - token argument\n* @param {number} width - token width\n* @param {boolean} [right=false] - boolean indicating whether to pad to the right\n* @returns {string} padded token argument\n*/\nfunction spacePad( str, width, right ) {\n\tvar pad = width - str.length;\n\tif ( pad < 0 ) {\n\t\treturn str;\n\t}\n\tstr = ( right ) ?\n\t\tstr + spaces( pad ) :\n\t\tspaces( pad ) + str;\n\treturn str;\n}\n\n\n// EXPORTS //\n\nexport default spacePad;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport formatInteger from './format_integer.js';\nimport isString from './is_string.js';\nimport formatDouble from './format_double.js';\nimport spacePad from './space_pad.js';\nimport zeroPad from './zero_pad.js';\n\n\n// VARIABLES //\n\nvar fromCharCode = String.fromCharCode;\nvar isnan = isNaN; // NOTE: We use the global `isNaN` function here instead of `@stdlib/math/base/assert/is-nan` to avoid circular dependencies.\nvar isArray = Array.isArray; // NOTE: We use the global `Array.isArray` function here instead of `@stdlib/assert/is-array` to avoid circular dependencies.\n\n\n// FUNCTIONS //\n\n/**\n* Initializes token object with properties of supplied format identifier object or default values if not present.\n*\n* @private\n* @param {Object} token - format identifier object\n* @returns {Object} token object\n*/\nfunction initialize( token ) {\n\tvar out = {};\n\tout.specifier = token.specifier;\n\tout.precision = ( token.precision === void 0 ) ? 1 : token.precision;\n\tout.width = token.width;\n\tout.flags = token.flags || '';\n\tout.mapping = token.mapping;\n\treturn out;\n}\n\n\n// MAIN //\n\n/**\n* Generates string from a token array by interpolating values.\n*\n* @param {Array} tokens - string parts and format identifier objects\n* @param {Array} ...args - variable values\n* @throws {TypeError} first argument must be an array\n* @throws {Error} invalid flags\n* @returns {string} formatted string\n*\n* @example\n* var tokens = [ 'beep ', { 'specifier': 's' } ];\n* var out = formatInterpolate( tokens, 'boop' );\n* // returns 'beep boop'\n*/\nfunction formatInterpolate( tokens ) {\n\tvar hasPeriod;\n\tvar flags;\n\tvar token;\n\tvar flag;\n\tvar num;\n\tvar out;\n\tvar pos;\n\tvar i;\n\tvar j;\n\n\tif ( !isArray( tokens ) ) {\n\t\tthrow new TypeError( 'invalid argument. First argument must be an array. Value: `' + tokens + '`.' );\n\t}\n\tout = '';\n\tpos = 1;\n\tfor ( i = 0; i < tokens.length; i++ ) {\n\t\ttoken = tokens[ i ];\n\t\tif ( isString( token ) ) {\n\t\t\tout += token;\n\t\t} else {\n\t\t\thasPeriod = token.precision !== void 0;\n\t\t\ttoken = initialize( token );\n\t\t\tif ( !token.specifier ) {\n\t\t\t\tthrow new TypeError( 'invalid argument. Token is missing `specifier` property. Index: `'+ i +'`. Value: `' + token + '`.' );\n\t\t\t}\n\t\t\tif ( token.mapping ) {\n\t\t\t\tpos = token.mapping;\n\t\t\t}\n\t\t\tflags = token.flags;\n\t\t\tfor ( j = 0; j < flags.length; j++ ) {\n\t\t\t\tflag = flags.charAt( j );\n\t\t\t\tswitch ( flag ) {\n\t\t\t\tcase ' ':\n\t\t\t\t\ttoken.sign = ' ';\n\t\t\t\t\tbreak;\n\t\t\t\tcase '+':\n\t\t\t\t\ttoken.sign = '+';\n\t\t\t\t\tbreak;\n\t\t\t\tcase '-':\n\t\t\t\t\ttoken.padRight = true;\n\t\t\t\t\ttoken.padZeros = false;\n\t\t\t\t\tbreak;\n\t\t\t\tcase '0':\n\t\t\t\t\ttoken.padZeros = flags.indexOf( '-' ) < 0; // NOTE: We use built-in `Array.prototype.indexOf` here instead of `@stdlib/assert/contains` in order to avoid circular dependencies.\n\t\t\t\t\tbreak;\n\t\t\t\tcase '#':\n\t\t\t\t\ttoken.alternate = true;\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tthrow new Error( 'invalid flag: ' + flag );\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( token.width === '*' ) {\n\t\t\t\ttoken.width = parseInt( arguments[ pos ], 10 );\n\t\t\t\tpos += 1;\n\t\t\t\tif ( isnan( token.width ) ) {\n\t\t\t\t\tthrow new TypeError( 'the argument for * width at position ' + pos + ' is not a number. Value: `' + token.width + '`.' );\n\t\t\t\t}\n\t\t\t\tif ( token.width < 0 ) {\n\t\t\t\t\ttoken.padRight = true;\n\t\t\t\t\ttoken.width = -token.width;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( hasPeriod ) {\n\t\t\t\tif ( token.precision === '*' ) {\n\t\t\t\t\ttoken.precision = parseInt( arguments[ pos ], 10 );\n\t\t\t\t\tpos += 1;\n\t\t\t\t\tif ( isnan( token.precision ) ) {\n\t\t\t\t\t\tthrow new TypeError( 'the argument for * precision at position ' + pos + ' is not a number. Value: `' + token.precision + '`.' );\n\t\t\t\t\t}\n\t\t\t\t\tif ( token.precision < 0 ) {\n\t\t\t\t\t\ttoken.precision = 1;\n\t\t\t\t\t\thasPeriod = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\ttoken.arg = arguments[ pos ];\n\t\t\tswitch ( token.specifier ) {\n\t\t\tcase 'b':\n\t\t\tcase 'o':\n\t\t\tcase 'x':\n\t\t\tcase 'X':\n\t\t\tcase 'd':\n\t\t\tcase 'i':\n\t\t\tcase 'u':\n\t\t\t\t// Case: %b (binary), %o (octal), %x, %X (hexadecimal), %d, %i (decimal), %u (unsigned decimal)\n\t\t\t\tif ( hasPeriod ) {\n\t\t\t\t\ttoken.padZeros = false;\n\t\t\t\t}\n\t\t\t\ttoken.arg = formatInteger( token );\n\t\t\t\tbreak;\n\t\t\tcase 's':\n\t\t\t\t// Case: %s (string)\n\t\t\t\ttoken.maxWidth = ( hasPeriod ) ? token.precision : -1;\n\t\t\t\tbreak;\n\t\t\tcase 'c':\n\t\t\t\t// Case: %c (character)\n\t\t\t\tif ( !isnan( token.arg ) ) {\n\t\t\t\t\tnum = parseInt( token.arg, 10 );\n\t\t\t\t\tif ( num < 0 || num > 127 ) {\n\t\t\t\t\t\tthrow new Error( 'invalid character code. Value: ' + token.arg );\n\t\t\t\t\t}\n\t\t\t\t\ttoken.arg = ( isnan( num ) ) ?\n\t\t\t\t\t\tString( token.arg ) :\n\t\t\t\t\t\tfromCharCode( num );\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'e':\n\t\t\tcase 'E':\n\t\t\tcase 'f':\n\t\t\tcase 'F':\n\t\t\tcase 'g':\n\t\t\tcase 'G':\n\t\t\t\t// Case: %e, %E (scientific notation), %f, %F (decimal floating point), %g, %G (uses the shorter of %e/E or %f/F)\n\t\t\t\tif ( !hasPeriod ) {\n\t\t\t\t\ttoken.precision = 6;\n\t\t\t\t}\n\t\t\t\ttoken.arg = formatDouble( token );\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tthrow new Error( 'invalid specifier: ' + token.specifier );\n\t\t\t}\n\t\t\t// Fit argument into field width...\n\t\t\tif ( token.maxWidth >= 0 && token.arg.length > token.maxWidth ) {\n\t\t\t\ttoken.arg = token.arg.substring( 0, token.maxWidth );\n\t\t\t}\n\t\t\tif ( token.padZeros ) {\n\t\t\t\ttoken.arg = zeroPad( token.arg, token.width || token.precision, token.padRight ); // eslint-disable-line max-len\n\t\t\t} else if ( token.width ) {\n\t\t\t\ttoken.arg = spacePad( token.arg, token.width, token.padRight );\n\t\t\t}\n\t\t\tout += token.arg || '';\n\t\t\tpos += 1;\n\t\t}\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default formatInterpolate;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// VARIABLES //\n\nvar RE = /%(?:([1-9]\\d*)\\$)?([0 +\\-#]*)(\\*|\\d+)?(?:(\\.)(\\*|\\d+)?)?[hlL]?([%A-Za-z])/g;\n\n\n// FUNCTIONS //\n\n/**\n* Parses a delimiter.\n*\n* @private\n* @param {Array} match - regular expression match\n* @returns {Object} delimiter token object\n*/\nfunction parse( match ) {\n\tvar token = {\n\t\t'mapping': ( match[ 1 ] ) ? parseInt( match[ 1 ], 10 ) : void 0,\n\t\t'flags': match[ 2 ],\n\t\t'width': match[ 3 ],\n\t\t'precision': match[ 5 ],\n\t\t'specifier': match[ 6 ]\n\t};\n\tif ( match[ 4 ] === '.' && match[ 5 ] === void 0 ) {\n\t\ttoken.precision = '1';\n\t}\n\treturn token;\n}\n\n\n// MAIN //\n\n/**\n* Tokenizes a string into an array of string parts and format identifier objects.\n*\n* @param {string} str - input string\n* @returns {Array} tokens\n*\n* @example\n* var tokens = formatTokenize( 'Hello %s!' );\n* // returns [ 'Hello ', {...}, '!' ]\n*/\nfunction formatTokenize( str ) {\n\tvar content;\n\tvar tokens;\n\tvar match;\n\tvar prev;\n\n\ttokens = [];\n\tprev = 0;\n\tmatch = RE.exec( str );\n\twhile ( match ) {\n\t\tcontent = str.slice( prev, RE.lastIndex - match[ 0 ].length );\n\t\tif ( content.length ) {\n\t\t\ttokens.push( content );\n\t\t}\n\t\ttokens.push( parse( match ) );\n\t\tprev = RE.lastIndex;\n\t\tmatch = RE.exec( str );\n\t}\n\tcontent = str.slice( prev );\n\tif ( content.length ) {\n\t\ttokens.push( content );\n\t}\n\treturn tokens;\n}\n\n\n// EXPORTS //\n\nexport default formatTokenize;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Tests if a value is a string primitive.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a string primitive\n*\n* @example\n* var bool = isString( 'beep' );\n* // returns true\n*\n* @example\n* var bool = isString( new String( 'beep' ) );\n* // returns false\n*/\nfunction isString( value ) {\n\treturn ( typeof value === 'string' ); // NOTE: we inline the `isString.isPrimitive` function from `@stdlib/assert/is-string` in order to avoid circular dependencies.\n}\n\n\n// EXPORTS //\n\nexport default isString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport interpolate from '@stdlib/string-base-format-interpolate';\nimport tokenize from '@stdlib/string-base-format-tokenize';\nimport isString from './is_string.js';\n\n\n// MAIN //\n\n/**\n* Inserts supplied variable values into a format string.\n*\n* @param {string} str - input string\n* @param {Array} ...args - variable values\n* @throws {TypeError} first argument must be a string\n* @throws {Error} invalid flags\n* @returns {string} formatted string\n*\n* @example\n* var str = format( 'Hello %s!', 'world' );\n* // returns 'Hello world!'\n*\n* @example\n* var str = format( 'Pi: ~%.2f', 3.141592653589793 );\n* // returns 'Pi: ~3.14'\n*/\nfunction format( str ) {\n\tvar tokens;\n\tvar args;\n\tvar i;\n\n\tif ( !isString( str ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a string. Value: `%s`.', str ) );\n\t}\n\ttokens = tokenize( str );\n\targs = new Array( arguments.length );\n\targs[ 0 ] = tokens;\n\tfor ( i = 1; i < args.length; i++ ) {\n\t\targs[ i ] = arguments[ i ];\n\t}\n\treturn interpolate.apply( null, args );\n}\n\n\n// EXPORTS //\n\nexport default format;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable no-underscore-dangle, no-proto */\n\n'use strict';\n\n// MODULES //\n\nimport format from '@stdlib/string-format';\n\n\n// VARIABLES //\n\nvar objectProtoype = Object.prototype;\nvar toStr = objectProtoype.toString;\nvar defineGetter = objectProtoype.__defineGetter__;\nvar defineSetter = objectProtoype.__defineSetter__;\nvar lookupGetter = objectProtoype.__lookupGetter__;\nvar lookupSetter = objectProtoype.__lookupSetter__;\n\n\n// MAIN //\n\n/**\n* Defines (or modifies) an object property.\n*\n* ## Notes\n*\n* - Property descriptors come in two flavors: **data descriptors** and **accessor descriptors**. A data descriptor is a property that has a value, which may or may not be writable. An accessor descriptor is a property described by a getter-setter function pair. A descriptor must be one of these two flavors and cannot be both.\n*\n* @param {Object} obj - object on which to define the property\n* @param {string} prop - property name\n* @param {Object} descriptor - property descriptor\n* @param {boolean} [descriptor.configurable=false] - boolean indicating if property descriptor can be changed and if the property can be deleted from the provided object\n* @param {boolean} [descriptor.enumerable=false] - boolean indicating if the property shows up when enumerating object properties\n* @param {boolean} [descriptor.writable=false] - boolean indicating if the value associated with the property can be changed with an assignment operator\n* @param {*} [descriptor.value] - property value\n* @param {(Function|void)} [descriptor.get=undefined] - function which serves as a getter for the property, or, if no getter, undefined. When the property is accessed, a getter function is called without arguments and with the `this` context set to the object through which the property is accessed (which may not be the object on which the property is defined due to inheritance). The return value will be used as the property value.\n* @param {(Function|void)} [descriptor.set=undefined] - function which serves as a setter for the property, or, if no setter, undefined. When assigning a property value, a setter function is called with one argument (the value being assigned to the property) and with the `this` context set to the object through which the property is assigned.\n* @throws {TypeError} first argument must be an object\n* @throws {TypeError} third argument must be an object\n* @throws {Error} property descriptor cannot have both a value and a setter and/or getter\n* @returns {Object} object with added property\n*\n* @example\n* var obj = {};\n*\n* defineProperty( obj, 'foo', {\n* 'value': 'bar'\n* });\n*\n* var str = obj.foo;\n* // returns 'bar'\n*/\nfunction defineProperty( obj, prop, descriptor ) {\n\tvar prototype;\n\tvar hasValue;\n\tvar hasGet;\n\tvar hasSet;\n\n\tif ( typeof obj !== 'object' || obj === null || toStr.call( obj ) === '[object Array]' ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be an object. Value: `%s`.', obj ) );\n\t}\n\tif ( typeof descriptor !== 'object' || descriptor === null || toStr.call( descriptor ) === '[object Array]' ) {\n\t\tthrow new TypeError( format( 'invalid argument. Property descriptor must be an object. Value: `%s`.', descriptor ) );\n\t}\n\thasValue = ( 'value' in descriptor );\n\tif ( hasValue ) {\n\t\tif (\n\t\t\tlookupGetter.call( obj, prop ) ||\n\t\t\tlookupSetter.call( obj, prop )\n\t\t) {\n\t\t\t// Override `__proto__` to avoid touching inherited accessors:\n\t\t\tprototype = obj.__proto__;\n\t\t\tobj.__proto__ = objectProtoype;\n\n\t\t\t// Delete property as existing getters/setters prevent assigning value to specified property:\n\t\t\tdelete obj[ prop ];\n\t\t\tobj[ prop ] = descriptor.value;\n\n\t\t\t// Restore original prototype:\n\t\t\tobj.__proto__ = prototype;\n\t\t} else {\n\t\t\tobj[ prop ] = descriptor.value;\n\t\t}\n\t}\n\thasGet = ( 'get' in descriptor );\n\thasSet = ( 'set' in descriptor );\n\n\tif ( hasValue && ( hasGet || hasSet ) ) {\n\t\tthrow new Error( 'invalid argument. Cannot specify one or more accessors and a value or writable attribute in the property descriptor.' );\n\t}\n\n\tif ( hasGet && defineGetter ) {\n\t\tdefineGetter.call( obj, prop, descriptor.get );\n\t}\n\tif ( hasSet && defineSetter ) {\n\t\tdefineSetter.call( obj, prop, descriptor.set );\n\t}\n\treturn obj;\n}\n\n\n// EXPORTS //\n\nexport default defineProperty;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Define (or modify) an object property.\n*\n* @module @stdlib/utils-define-property\n*\n* @example\n* import defineProperty from '@stdlib/utils-define-property';\n*\n* var obj = {};\n* defineProperty( obj, 'foo', {\n* 'value': 'bar',\n* 'writable': false,\n* 'configurable': false,\n* 'enumerable': false\n* });\n* obj.foo = 'boop'; // => throws\n*/\n\n// MODULES //\n\nimport hasDefinePropertySupport from './has_define_property_support.js';\nimport builtin from './builtin.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar defineProperty;\nif ( hasDefinePropertySupport() ) {\n\tdefineProperty = builtin;\n} else {\n\tdefineProperty = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default defineProperty;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport defineProperty from './define_property.js';\n\n\n// MAIN //\n\n/**\n* Tests for `Object.defineProperty` support.\n*\n* @private\n* @returns {boolean} boolean indicating if an environment has `Object.defineProperty` support\n*\n* @example\n* var bool = hasDefinePropertySupport();\n* // returns \n*/\nfunction hasDefinePropertySupport() {\n\t// Test basic support...\n\ttry {\n\t\tdefineProperty( {}, 'x', {} );\n\t\treturn true;\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\treturn false;\n\t}\n}\n\n\n// EXPORTS //\n\nexport default hasDefinePropertySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport defineProperty from '@stdlib/utils-define-property';\n\n\n// MAIN //\n\n/**\n* Defines a non-enumerable read-only property.\n*\n* @param {Object} obj - object on which to define the property\n* @param {(string|symbol)} prop - property name\n* @param {*} value - value to set\n*\n* @example\n* var obj = {};\n*\n* setNonEnumerableReadOnly( obj, 'foo', 'bar' );\n*\n* try {\n* obj.foo = 'boop';\n* } catch ( err ) {\n* console.error( err.message );\n* }\n*/\nfunction setNonEnumerableReadOnly( obj, prop, value ) {\n\tdefineProperty( obj, prop, {\n\t\t'configurable': false,\n\t\t'enumerable': false,\n\t\t'writable': false,\n\t\t'value': value\n\t});\n}\n\n\n// EXPORTS //\n\nexport default setNonEnumerableReadOnly;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Tests if a value is a number primitive.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number primitive\n*\n* @example\n* var bool = isNumber( 3.14 );\n* // returns true\n*\n* @example\n* var bool = isNumber( NaN );\n* // returns true\n*\n* @example\n* var bool = isNumber( new Number( 3.14 ) );\n* // returns false\n*/\nfunction isNumber( value ) {\n\treturn ( typeof value === 'number' );\n}\n\n\n// EXPORTS //\n\nexport default isNumber;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport hasSymbols from '@stdlib/assert-has-symbol-support';\n\n\n// VARIABLES //\n\nvar FLG = hasSymbols();\n\n\n// MAIN //\n\n/**\n* Tests for native `toStringTag` support.\n*\n* @returns {boolean} boolean indicating if an environment has `toStringTag` support\n*\n* @example\n* var bool = hasToStringTagSupport();\n* // returns \n*/\nfunction hasToStringTagSupport() {\n\treturn ( FLG && typeof Symbol.toStringTag === 'symbol' );\n}\n\n\n// EXPORTS //\n\nexport default hasToStringTagSupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Tests for native `Symbol` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Symbol` support\n*\n* @example\n* var bool = hasSymbolSupport();\n* // returns \n*/\nfunction hasSymbolSupport() {\n\treturn (\n\t\ttypeof Symbol === 'function' &&\n\t\ttypeof Symbol( 'foo' ) === 'symbol'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default hasSymbolSupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar toStr = Object.prototype.toString;\n\n\n// EXPORTS //\n\nexport default toStr;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// FUNCTIONS //\n\nvar has = Object.prototype.hasOwnProperty;\n\n\n// MAIN //\n\n/**\n* Tests if an object has a specified property.\n*\n* @param {*} value - value to test\n* @param {*} property - property to test\n* @returns {boolean} boolean indicating if an object has a specified property\n*\n* @example\n* var beep = {\n* 'boop': true\n* };\n*\n* var bool = hasOwnProp( beep, 'boop' );\n* // returns true\n*\n* @example\n* var beep = {\n* 'boop': true\n* };\n*\n* var bool = hasOwnProp( beep, 'bap' );\n* // returns false\n*/\nfunction hasOwnProp( value, property ) {\n\tif (\n\t\tvalue === void 0 ||\n\t\tvalue === null\n\t) {\n\t\treturn false;\n\t}\n\treturn has.call( value, property );\n}\n\n\n// EXPORTS //\n\nexport default hasOwnProp;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar Sym = ( typeof Symbol === 'function' ) ? Symbol : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default Sym;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport Symbol from '@stdlib/symbol-ctor';\n\n\n// MAIN //\n\nvar toStrTag = ( typeof Symbol === 'function' ) ? Symbol.toStringTag : '';\n\n\n// EXPORTS //\n\nexport default toStrTag;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Return a string value indicating a specification defined classification of an object.\n*\n* @module @stdlib/utils-native-class\n*\n* @example\n* import nativeClass from '@stdlib/utils-native-class';\n*\n* var str = nativeClass( 'a' );\n* // returns '[object String]'\n*\n* str = nativeClass( 5 );\n* // returns '[object Number]'\n*\n* function Beep() {\n* return this;\n* }\n* str = nativeClass( new Beep() );\n* // returns '[object Object]'\n*/\n\n// MODULES //\n\nimport hasToStringTag from '@stdlib/assert-has-tostringtag-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar main;\nif ( hasToStringTag() ) {\n\tmain = polyfill;\n} else {\n\tmain = builtin;\n}\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport hasOwnProp from '@stdlib/assert-has-own-property';\nimport toStringTag from './tostringtag.js';\nimport toStr from './tostring.js';\n\n\n// MAIN //\n\n/**\n* Returns a string value indicating a specification defined classification of an object in environments supporting `Symbol.toStringTag`.\n*\n* @param {*} v - input value\n* @returns {string} string value indicating a specification defined classification of the input value\n*\n* @example\n* var str = nativeClass( 'a' );\n* // returns '[object String]'\n*\n* @example\n* var str = nativeClass( 5 );\n* // returns '[object Number]'\n*\n* @example\n* function Beep() {\n* return this;\n* }\n* var str = nativeClass( new Beep() );\n* // returns '[object Object]'\n*/\nfunction nativeClass( v ) {\n\tvar isOwn;\n\tvar tag;\n\tvar out;\n\n\tif ( v === null || v === void 0 ) {\n\t\treturn toStr.call( v );\n\t}\n\ttag = v[ toStringTag ];\n\tisOwn = hasOwnProp( v, toStringTag );\n\n\t// Attempt to override the `toStringTag` property. For built-ins having a `Symbol.toStringTag` property (e.g., `JSON`, `Math`, etc), the `Symbol.toStringTag` property is read-only (e.g., , so we need to wrap in a `try/catch`.\n\ttry {\n\t\tv[ toStringTag ] = void 0;\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\treturn toStr.call( v );\n\t}\n\tout = toStr.call( v );\n\n\tif ( isOwn ) {\n\t\tv[ toStringTag ] = tag;\n\t} else {\n\t\tdelete v[ toStringTag ];\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default nativeClass;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport toStr from './tostring.js';\n\n\n// MAIN //\n\n/**\n* Returns a string value indicating a specification defined classification (via the internal property `[[Class]]`) of an object.\n*\n* @param {*} v - input value\n* @returns {string} string value indicating a specification defined classification of the input value\n*\n* @example\n* var str = nativeClass( 'a' );\n* // returns '[object String]'\n*\n* @example\n* var str = nativeClass( 5 );\n* // returns '[object Number]'\n*\n* @example\n* function Beep() {\n* return this;\n* }\n* var str = nativeClass( new Beep() );\n* // returns '[object Object]'\n*/\nfunction nativeClass( v ) {\n\treturn toStr.call( v );\n}\n\n\n// EXPORTS //\n\nexport default nativeClass;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// EXPORTS //\n\nexport default Number; // eslint-disable-line stdlib/require-globals\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport Number from '@stdlib/number-ctor';\n\n\n// MAIN //\n\n// eslint-disable-next-line stdlib/no-redeclare\nvar toString = Number.prototype.toString; // non-generic\n\n\n// EXPORTS //\n\nexport default toString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport hasToStringTag from '@stdlib/assert-has-tostringtag-support';\nimport nativeClass from '@stdlib/utils-native-class';\nimport Number from '@stdlib/number-ctor';\nimport test from './try2serialize.js';\n\n\n// VARIABLES //\n\nvar FLG = hasToStringTag();\n\n\n// MAIN //\n\n/**\n* Tests if a value is a number object.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number object\n*\n* @example\n* var bool = isNumber( 3.14 );\n* // returns false\n*\n* @example\n* var bool = isNumber( new Number( 3.14 ) );\n* // returns true\n*/\nfunction isNumber( value ) {\n\tif ( typeof value === 'object' ) {\n\t\tif ( value instanceof Number ) {\n\t\t\treturn true;\n\t\t}\n\t\tif ( FLG ) {\n\t\t\treturn test( value );\n\t\t}\n\t\treturn ( nativeClass( value ) === '[object Number]' );\n\t}\n\treturn false;\n}\n\n\n// EXPORTS //\n\nexport default isNumber;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport toString from './tostring.js'; // eslint-disable-line stdlib/no-redeclare\n\n\n// MAIN //\n\n/**\n* Attempts to serialize a value to a string.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value can be serialized\n*/\nfunction test( value ) {\n\ttry {\n\t\ttoString.call( value );\n\t\treturn true;\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\treturn false;\n\t}\n}\n\n\n// EXPORTS //\n\nexport default test;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a number.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a number\n*\n* @example\n* var bool = isNumber( 3.14 );\n* // returns true\n*\n* @example\n* var bool = isNumber( new Number( 3.14 ) );\n* // returns true\n*\n* @example\n* var bool = isNumber( NaN );\n* // returns true\n*\n* @example\n* var bool = isNumber( null );\n* // returns false\n*/\nfunction isNumber( value ) {\n\treturn ( isPrimitive( value ) || isObject( value ) );\n}\n\n\n// EXPORTS //\n\nexport default isNumber;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test if a value is a number.\n*\n* @module @stdlib/assert-is-number\n*\n* @example\n* import isNumber from '@stdlib/assert-is-number';\n*\n* var bool = isNumber( 3.14 );\n* // returns true\n*\n* bool = isNumber( new Number( 3.14 ) );\n* // returns true\n*\n* bool = isNumber( NaN );\n* // returns true\n*\n* bool = isNumber( null );\n* // returns false\n*\n* @example\n* import { isPrimitive as isNumber } from '@stdlib/assert-is-number';\n*\n* var bool = isNumber( 3.14 );\n* // returns true\n*\n* bool = isNumber( NaN );\n* // returns true\n*\n* bool = isNumber( new Number( 3.14 ) );\n* // returns false\n*\n* @example\n* import { isObject as isNumber } from '@stdlib/assert-is-number';\n*\n* var bool = isNumber( 3.14 );\n* // returns false\n*\n* bool = isNumber( new Number( 3.14 ) );\n* // returns true\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'isPrimitive', isPrimitive );\nsetReadOnly( main, 'isObject', isObject );\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Double-precision floating-point positive infinity.\n*\n* @module @stdlib/constants-float64-pinf\n* @type {number}\n*\n* @example\n* import FLOAT64_PINF from '@stdlib/constants-float64-pinf';\n* // returns Infinity\n*/\n\n\n// MAIN //\n\n/**\n* Double-precision floating-point positive infinity.\n*\n* ## Notes\n*\n* Double-precision floating-point positive infinity has the bit sequence\n*\n* ```binarystring\n* 0 11111111111 00000000000000000000 00000000000000000000000000000000\n* ```\n*\n* @constant\n* @type {number}\n* @default Number.POSITIVE_INFINITY\n* @see [IEEE 754]{@link https://en.wikipedia.org/wiki/IEEE_754-1985}\n*/\nvar FLOAT64_PINF = Number.POSITIVE_INFINITY; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default FLOAT64_PINF;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Double-precision floating-point negative infinity.\n*\n* @module @stdlib/constants-float64-ninf\n* @type {number}\n*\n* @example\n* import FLOAT64_NINF from '@stdlib/constants-float64-ninf';\n* // returns -Infinity\n*/\n\n// MODULES //\n\nimport Number from '@stdlib/number-ctor';\n\n\n// MAIN //\n\n/**\n* Double-precision floating-point negative infinity.\n*\n* ## Notes\n*\n* Double-precision floating-point negative infinity has the bit sequence\n*\n* ```binarystring\n* 1 11111111111 00000000000000000000 00000000000000000000000000000000\n* ```\n*\n* @constant\n* @type {number}\n* @default Number.NEGATIVE_INFINITY\n* @see [IEEE 754]{@link https://en.wikipedia.org/wiki/IEEE_754-1985}\n*/\nvar FLOAT64_NINF = Number.NEGATIVE_INFINITY;\n\n\n// EXPORTS //\n\nexport default FLOAT64_NINF;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: implementation (?)\n\n/**\n* Rounds a double-precision floating-point number toward negative infinity.\n*\n* @param {number} x - input value\n* @returns {number} rounded value\n*\n* @example\n* var v = floor( -4.2 );\n* // returns -5.0\n*\n* @example\n* var v = floor( 9.99999 );\n* // returns 9.0\n*\n* @example\n* var v = floor( 0.0 );\n* // returns 0.0\n*\n* @example\n* var v = floor( NaN );\n* // returns NaN\n*/\nvar floor = Math.floor; // eslint-disable-line stdlib/no-builtin-math\n\n\n// EXPORTS //\n\nexport default floor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport floor from '@stdlib/math-base-special-floor';\n\n\n// MAIN //\n\n/**\n* Tests if a finite double-precision floating-point number is an integer.\n*\n* @param {number} x - value to test\n* @returns {boolean} boolean indicating whether the value is an integer\n*\n* @example\n* var bool = isInteger( 1.0 );\n* // returns true\n*\n* @example\n* var bool = isInteger( 3.14 );\n* // returns false\n*/\nfunction isInteger( x ) {\n\treturn (floor(x) === x);\n}\n\n\n// EXPORTS //\n\nexport default isInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport PINF from '@stdlib/constants-float64-pinf';\nimport NINF from '@stdlib/constants-float64-ninf';\nimport isInt from '@stdlib/math-base-assert-is-integer';\n\n\n// MAIN //\n\n/**\n* Tests if a number primitive is an integer value.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a number primitive is an integer value\n*/\nfunction isInteger( value ) {\n\treturn (\n\t\tvalue < PINF &&\n\t\tvalue > NINF &&\n\t\tisInt( value )\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isNumber } from '@stdlib/assert-is-number';\nimport isInt from './integer.js';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a number primitive having an integer value.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number primitive having an integer value\n*\n* @example\n* var bool = isInteger( -3.0 );\n* // returns true\n*\n* @example\n* var bool = isInteger( new Number( -3.0 ) );\n* // returns false\n*/\nfunction isInteger( value ) {\n\treturn (\n\t\tisNumber( value ) &&\n\t\tisInt( value )\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isObject as isNumber } from '@stdlib/assert-is-number';\nimport isInt from './integer.js';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a number object having an integer value.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number object having an integer value\n*\n* @example\n* var bool = isInteger( 3.0 );\n* // returns false\n*\n* @example\n* var bool = isInteger( new Number( 3.0 ) );\n* // returns true\n*/\nfunction isInteger( value ) {\n\treturn (\n\t\tisNumber( value ) &&\n\t\tisInt( value.valueOf() )\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\n/**\n* Tests if a value is an integer.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an integer\n*\n* @example\n* var bool = isInteger( 5.0 );\n* // returns true\n*\n* @example\n* var bool = isInteger( new Number( 5.0 ) );\n* // returns true\n*\n* @example\n* var bool = isInteger( -3.14 );\n* // returns false\n*\n* @example\n* var bool = isInteger( null );\n* // returns false\n*/\nfunction isInteger( value ) {\n\treturn ( isPrimitive( value ) || isObject( value ) );\n}\n\n\n// EXPORTS //\n\nexport default isInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isInteger } from '@stdlib/assert-is-integer';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a number primitive having a nonnegative integer value.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number primitive having a nonnegative integer value\n*\n* @example\n* var bool = isNonNegativeInteger( 3.0 );\n* // returns true\n*\n* @example\n* var bool = isNonNegativeInteger( new Number( 3.0 ) );\n* // returns false\n*/\nfunction isNonNegativeInteger( value ) {\n\treturn (\n\t\tisInteger( value ) &&\n\t\tvalue >= 0\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isNonNegativeInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isObject as isInteger } from '@stdlib/assert-is-integer';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a number object having a nonnegative integer value.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number object having a nonnegative integer value\n*\n* @example\n* var bool = isNonNegativeInteger( 3.0 );\n* // returns false\n*\n* @example\n* var bool = isNonNegativeInteger( new Number( 3.0 ) );\n* // returns true\n*/\nfunction isNonNegativeInteger( value ) {\n\treturn (\n\t\tisInteger( value ) &&\n\t\tvalue.valueOf() >= 0\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isNonNegativeInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a nonnegative integer.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a nonnegative integer\n*\n* @example\n* var bool = isNonNegativeInteger( 5.0 );\n* // returns true\n*\n* @example\n* var bool = isNonNegativeInteger( new Number( 5.0 ) );\n* // returns true\n*\n* @example\n* var bool = isNonNegativeInteger( -5.0 );\n* // returns false\n*\n* @example\n* var bool = isNonNegativeInteger( 3.14 );\n* // returns false\n*\n* @example\n* var bool = isNonNegativeInteger( null );\n* // returns false\n*/\nfunction isNonNegativeInteger( value ) {\n\treturn ( isPrimitive( value ) || isObject( value ) );\n}\n\n\n// EXPORTS //\n\nexport default isNonNegativeInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test if a value is an integer.\n*\n* @module @stdlib/assert-is-integer\n*\n* @example\n* import isInteger from '@stdlib/assert-is-integer';\n*\n* var bool = isInteger( 5.0 );\n* // returns true\n*\n* bool = isInteger( new Number( 5.0 ) );\n* // returns true\n*\n* bool = isInteger( -3.14 );\n* // returns false\n*\n* bool = isInteger( null );\n* // returns false\n*\n* @example\n* // Use interface to check for integer primitives...\n* import { isPrimitive as isInteger } from '@stdlib/assert-is-integer';\n*\n* var bool = isInteger( -3.0 );\n* // returns true\n*\n* bool = isInteger( new Number( -3.0 ) );\n* // returns false\n*\n* @example\n* // Use interface to check for integer objects...\n* import { isObject as isInteger } from '@stdlib/assert-is-integer';\n*\n* var bool = isInteger( 3.0 );\n* // returns false\n*\n* bool = isInteger( new Number( 3.0 ) );\n* // returns true\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'isPrimitive', isPrimitive );\nsetReadOnly( main, 'isObject', isObject );\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test if a value is a nonnegative integer.\n*\n* @module @stdlib/assert-is-nonnegative-integer\n*\n* @example\n* import isNonNegativeInteger from '@stdlib/assert-is-nonnegative-integer';\n*\n* var bool = isNonNegativeInteger( 5.0 );\n* // returns true\n*\n* bool = isNonNegativeInteger( new Number( 5.0 ) );\n* // returns true\n*\n* bool = isNonNegativeInteger( -5.0 );\n* // returns false\n*\n* bool = isNonNegativeInteger( 3.14 );\n* // returns false\n*\n* bool = isNonNegativeInteger( null );\n* // returns false\n*\n* @example\n* import { isPrimitive as isNonNegativeInteger } from '@stdlib/assert-is-nonnegative-integer';\n*\n* var bool = isNonNegativeInteger( 3.0 );\n* // returns true\n*\n* bool = isNonNegativeInteger( new Number( 3.0 ) );\n* // returns false\n*\n* @example\n* import { isObject as isNonNegativeInteger } from '@stdlib/assert-is-nonnegative-integer';\n*\n* var bool = isNonNegativeInteger( 3.0 );\n* // returns false\n*\n* bool = isNonNegativeInteger( new Number( 3.0 ) );\n* // returns true\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'isPrimitive', isPrimitive );\nsetReadOnly( main, 'isObject', isObject );\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasFloat64Array = ( typeof Float64Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Float64Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a Float64Array\n*\n* @example\n* var bool = isFloat64Array( new Float64Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isFloat64Array( [] );\n* // returns false\n*/\nfunction isFloat64Array( value ) {\n\treturn (\n\t\t( hasFloat64Array && value instanceof Float64Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Float64Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isFloat64Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Float64Array === 'function' ) ? Float64Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Float64Array === 'function' ) ? Float64Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of double-precision floating-point numbers in the platform byte order.\n*\n* @module @stdlib/array-float64\n*\n* @example\n* import ctor from '@stdlib/array-float64';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasFloat64ArraySupport from '@stdlib/assert-has-float64array-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasFloat64ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isFloat64Array from '@stdlib/assert-is-float64array';\nimport GlobalFloat64Array from './float64array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Float64Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Float64Array` support\n*\n* @example\n* var bool = hasFloat64ArraySupport();\n* // returns \n*/\nfunction hasFloat64ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalFloat64Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = new GlobalFloat64Array( [ 1.0, 3.14, -3.14, NaN ] );\n\t\tbool = (\n\t\t\tisFloat64Array( arr ) &&\n\t\t\tarr[ 0 ] === 1.0 &&\n\t\t\tarr[ 1 ] === 3.14 &&\n\t\t\tarr[ 2 ] === -3.14 &&\n\t\t\tarr[ 3 ] !== arr[ 3 ]\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasFloat64ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of double-precision floating-point numbers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasFloat32Array = ( typeof Float32Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Float32Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a Float32Array\n*\n* @example\n* var bool = isFloat32Array( new Float32Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isFloat32Array( [] );\n* // returns false\n*/\nfunction isFloat32Array( value ) {\n\treturn (\n\t\t( hasFloat32Array && value instanceof Float32Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Float32Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isFloat32Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Float32Array === 'function' ) ? Float32Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Float32Array === 'function' ) ? Float32Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of single-precision floating-point numbers in the platform byte order.\n*\n* @module @stdlib/array-float32\n*\n* @example\n* import ctor from '@stdlib/array-float32';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasFloat32ArraySupport from '@stdlib/assert-has-float32array-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasFloat32ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isFloat32Array from '@stdlib/assert-is-float32array';\nimport PINF from '@stdlib/constants-float64-pinf';\nimport GlobalFloat32Array from './float32array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Float32Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Float32Array` support\n*\n* @example\n* var bool = hasFloat32ArraySupport();\n* // returns \n*/\nfunction hasFloat32ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalFloat32Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = new GlobalFloat32Array( [ 1.0, 3.14, -3.14, 5.0e40 ] );\n\t\tbool = (\n\t\t\tisFloat32Array( arr ) &&\n\t\t\tarr[ 0 ] === 1.0 &&\n\t\t\tarr[ 1 ] === 3.140000104904175 &&\n\t\t\tarr[ 2 ] === -3.140000104904175 &&\n\t\t\tarr[ 3 ] === PINF\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasFloat32ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of single-precision floating-point numbers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasInt16Array = ( typeof Int16Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is an Int16Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an Int16Array\n*\n* @example\n* var bool = isInt16Array( new Int16Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isInt16Array( [] );\n* // returns false\n*/\nfunction isInt16Array( value ) {\n\treturn (\n\t\t( hasInt16Array && value instanceof Int16Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Int16Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isInt16Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum signed 16-bit integer.\n*\n* @module @stdlib/constants-int16-max\n* @type {integer32}\n*\n* @example\n* import INT16_MAX from '@stdlib/constants-int16-max';\n* // returns 32767\n*/\n\n\n// MAIN //\n\n/**\n* Maximum signed 16-bit integer.\n*\n* ## Notes\n*\n* The number has the value\n*\n* ```tex\n* 2^{15} - 1\n* ```\n*\n* which corresponds to the bit sequence\n*\n* ```binarystring\n* 0111111111111111\n* ```\n*\n* @constant\n* @type {integer32}\n* @default 32767\n*/\nvar INT16_MAX = 32767|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default INT16_MAX;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Int16Array === 'function' ) ? Int16Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Int16Array === 'function' ) ? Int16Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of twos-complement 16-bit signed integers in the platform byte order.\n*\n* @module @stdlib/array-int16\n*\n* @example\n* import ctor from '@stdlib/array-int16';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasInt16ArraySupport from '@stdlib/assert-has-int16array-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasInt16ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isInt16Array from '@stdlib/assert-is-int16array';\nimport INT16_MAX from '@stdlib/constants-int16-max';\nimport INT16_MIN from '@stdlib/constants-int16-min';\nimport GlobalInt16Array from './int16array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Int16Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Int16Array` support\n*\n* @example\n* var bool = hasInt16ArraySupport();\n* // returns \n*/\nfunction hasInt16ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalInt16Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = new GlobalInt16Array( [ 1, 3.14, -3.14, INT16_MAX+1 ] );\n\t\tbool = (\n\t\t\tisInt16Array( arr ) &&\n\t\t\tarr[ 0 ] === 1 &&\n\t\t\tarr[ 1 ] === 3 && // truncation\n\t\t\tarr[ 2 ] === -3 && // truncation\n\t\t\tarr[ 3 ] === INT16_MIN // wrap around\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasInt16ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Minimum signed 16-bit integer.\n*\n* @module @stdlib/constants-int16-min\n* @type {integer32}\n*\n* @example\n* import INT16_MIN from '@stdlib/constants-int16-min';\n* // returns -32768\n*/\n\n\n// MAIN //\n\n/**\n* Minimum signed 16-bit integer.\n*\n* ## Notes\n*\n* The number has the value\n*\n* ```tex\n* -(2^{15})\n* ```\n*\n* which corresponds to the two's complement bit sequence\n*\n* ```binarystring\n* 1000000000000000\n* ```\n*\n* @constant\n* @type {integer32}\n* @default -32768\n*/\nvar INT16_MIN = -32768|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default INT16_MIN;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of twos-complement 16-bit signed integers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasInt32Array = ( typeof Int32Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is an Int32Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an Int32Array\n*\n* @example\n* var bool = isInt32Array( new Int32Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isInt32Array( [] );\n* // returns false\n*/\nfunction isInt32Array( value ) {\n\treturn (\n\t\t( hasInt32Array && value instanceof Int32Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Int32Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isInt32Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum signed 32-bit integer.\n*\n* @module @stdlib/constants-int32-max\n* @type {integer32}\n*\n* @example\n* import INT32_MAX from '@stdlib/constants-int32-max';\n* // returns 2147483647\n*/\n\n\n// MAIN //\n\n/**\n* Maximum signed 32-bit integer.\n*\n* ## Notes\n*\n* The number has the value\n*\n* ```tex\n* 2^{31} - 1\n* ```\n*\n* which corresponds to the bit sequence\n*\n* ```binarystring\n* 01111111111111111111111111111111\n* ```\n*\n* @constant\n* @type {integer32}\n* @default 2147483647\n*/\nvar INT32_MAX = 2147483647|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default INT32_MAX;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Int32Array === 'function' ) ? Int32Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Int32Array === 'function' ) ? Int32Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of twos-complement 32-bit signed integers in the platform byte order.\n*\n* @module @stdlib/array-int32\n*\n* @example\n* import ctor from '@stdlib/array-int32';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasInt32ArraySupport from '@stdlib/assert-has-int32array-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasInt32ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isInt32Array from '@stdlib/assert-is-int32array';\nimport INT32_MAX from '@stdlib/constants-int32-max';\nimport INT32_MIN from '@stdlib/constants-int32-min';\nimport GlobalInt32Array from './int32array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Int32Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Int32Array` support\n*\n* @example\n* var bool = hasInt32ArraySupport();\n* // returns \n*/\nfunction hasInt32ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalInt32Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = new GlobalInt32Array( [ 1, 3.14, -3.14, INT32_MAX+1 ] );\n\t\tbool = (\n\t\t\tisInt32Array( arr ) &&\n\t\t\tarr[ 0 ] === 1 &&\n\t\t\tarr[ 1 ] === 3 && // truncation\n\t\t\tarr[ 2 ] === -3 && // truncation\n\t\t\tarr[ 3 ] === INT32_MIN // wrap around\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasInt32ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Minimum signed 32-bit integer.\n*\n* @module @stdlib/constants-int32-min\n* @type {integer32}\n*\n* @example\n* import INT32_MIN from '@stdlib/constants-int32-min';\n* // returns -2147483648\n*/\n\n\n// MAIN //\n\n/**\n* Minimum signed 32-bit integer.\n*\n* ## Notes\n*\n* The number has the value\n*\n* ```tex\n* -(2^{31})\n* ```\n*\n* which corresponds to the two's complement bit sequence\n*\n* ```binarystring\n* 10000000000000000000000000000000\n* ```\n*\n* @constant\n* @type {integer32}\n* @default -2147483648\n*/\nvar INT32_MIN = -2147483648|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default INT32_MIN;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of twos-complement 32-bit signed integers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasInt8Array = ( typeof Int8Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is an Int8Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an Int8Array\n*\n* @example\n* var bool = isInt8Array( new Int8Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isInt8Array( [] );\n* // returns false\n*/\nfunction isInt8Array( value ) {\n\treturn (\n\t\t( hasInt8Array && value instanceof Int8Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Int8Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isInt8Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum signed 8-bit integer.\n*\n* @module @stdlib/constants-int8-max\n* @type {integer32}\n*\n* @example\n* import INT8_MAX from '@stdlib/constants-int8-max';\n* // returns 127\n*/\n\n\n// MAIN //\n\n/**\n* Maximum signed 8-bit integer.\n*\n* ## Notes\n*\n* The number is given by\n*\n* ```tex\n* 2^{7} - 1\n* ```\n*\n* which corresponds to the bit sequence\n*\n* ```binarystring\n* 01111111\n* ```\n*\n* @constant\n* @type {integer32}\n* @default 127\n*/\nvar INT8_MAX = 127|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default INT8_MAX;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Int8Array === 'function' ) ? Int8Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Int8Array === 'function' ) ? Int8Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of twos-complement 8-bit signed integers in the platform byte order.\n*\n* @module @stdlib/array-int8\n*\n* @example\n* import ctor from '@stdlib/array-int8';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasInt8ArraySupport from '@stdlib/assert-has-int8array-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasInt8ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isInt8Array from '@stdlib/assert-is-int8array';\nimport INT8_MAX from '@stdlib/constants-int8-max';\nimport INT8_MIN from '@stdlib/constants-int8-min';\nimport GlobalInt8Array from './int8array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Int8Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Int8Array` support\n*\n* @example\n* var bool = hasInt8ArraySupport();\n* // returns \n*/\nfunction hasInt8ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalInt8Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = new GlobalInt8Array( [ 1, 3.14, -3.14, INT8_MAX+1 ] );\n\t\tbool = (\n\t\t\tisInt8Array( arr ) &&\n\t\t\tarr[ 0 ] === 1 &&\n\t\t\tarr[ 1 ] === 3 && // truncation\n\t\t\tarr[ 2 ] === -3 && // truncation\n\t\t\tarr[ 3 ] === INT8_MIN // wrap around\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasInt8ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Minimum signed 8-bit integer.\n*\n* @module @stdlib/constants-int8-min\n* @type {integer32}\n*\n* @example\n* import INT8_MIN from '@stdlib/constants-int8-min';\n* // returns -128\n*/\n\n\n// MAIN //\n\n/**\n* Minimum signed 8-bit integer.\n*\n* ## Notes\n*\n* The number is given by\n*\n* ```tex\n* -(2^{7})\n* ```\n*\n* which corresponds to the two's complement bit sequence\n*\n* ```binarystring\n* 10000000\n* ```\n*\n* @constant\n* @type {integer32}\n* @default -128\n*/\nvar INT8_MIN = -128|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default INT8_MIN;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of twos-complement 8-bit signed integers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasUint16Array = ( typeof Uint16Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Uint16Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a Uint16Array\n*\n* @example\n* var bool = isUint16Array( new Uint16Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isUint16Array( [] );\n* // returns false\n*/\nfunction isUint16Array( value ) {\n\treturn (\n\t\t( hasUint16Array && value instanceof Uint16Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Uint16Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isUint16Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum unsigned 16-bit integer.\n*\n* @module @stdlib/constants-uint16-max\n* @type {integer32}\n*\n* @example\n* import UINT16_MAX from '@stdlib/constants-uint16-max';\n* // returns 65535\n*/\n\n\n// MAIN //\n\n/**\n* Maximum unsigned 16-bit integer.\n*\n* ## Notes\n*\n* The number has the value\n*\n* ```tex\n* 2^{16} - 1\n* ```\n*\n* which corresponds to the bit sequence\n*\n* ```binarystring\n* 1111111111111111\n* ```\n*\n* @constant\n* @type {integer32}\n* @default 65535\n*/\nvar UINT16_MAX = 65535|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default UINT16_MAX;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Uint16Array === 'function' ) ? Uint16Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Uint16Array === 'function' ) ? Uint16Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of 16-bit unsigned integers in the platform byte order.\n*\n* @module @stdlib/array-uint16\n*\n* @example\n* import ctor from '@stdlib/array-uint16';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasUint16ArraySupport from '@stdlib/assert-has-uint16array-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasUint16ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isUint16Array from '@stdlib/assert-is-uint16array';\nimport UINT16_MAX from '@stdlib/constants-uint16-max';\nimport GlobalUint16Array from './uint16array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Uint16Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Uint16Array` support\n*\n* @example\n* var bool = hasUint16ArraySupport();\n* // returns \n*/\nfunction hasUint16ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalUint16Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = [ 1, 3.14, -3.14, UINT16_MAX+1, UINT16_MAX+2 ];\n\t\tarr = new GlobalUint16Array( arr );\n\t\tbool = (\n\t\t\tisUint16Array( arr ) &&\n\t\t\tarr[ 0 ] === 1 &&\n\t\t\tarr[ 1 ] === 3 && // truncation\n\t\t\tarr[ 2 ] === UINT16_MAX-2 && // truncation and wrap around\n\t\t\tarr[ 3 ] === 0 && // wrap around\n\t\t\tarr[ 4 ] === 1 // wrap around\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasUint16ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of 16-bit unsigned integers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasUint32Array = ( typeof Uint32Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Uint32Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a Uint32Array\n*\n* @example\n* var bool = isUint32Array( new Uint32Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isUint32Array( [] );\n* // returns false\n*/\nfunction isUint32Array( value ) {\n\treturn (\n\t\t( hasUint32Array && value instanceof Uint32Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Uint32Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isUint32Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum unsigned 32-bit integer.\n*\n* @module @stdlib/constants-uint32-max\n* @type {uinteger32}\n*\n* @example\n* import UINT32_MAX from '@stdlib/constants-uint32-max';\n* // returns 4294967295\n*/\n\n\n// MAIN //\n\n/**\n* Maximum unsigned 32-bit integer.\n*\n* ## Notes\n*\n* The number has the value\n*\n* ```tex\n* 2^{32} - 1\n* ```\n*\n* which corresponds to the bit sequence\n*\n* ```binarystring\n* 11111111111111111111111111111111\n* ```\n*\n* @constant\n* @type {uinteger32}\n* @default 4294967295\n*/\nvar UINT32_MAX = 4294967295;\n\n\n// EXPORTS //\n\nexport default UINT32_MAX;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Uint32Array === 'function' ) ? Uint32Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Uint32Array === 'function' ) ? Uint32Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of 32-bit unsigned integers in the platform byte order.\n*\n* @module @stdlib/array-uint32\n*\n* @example\n* import ctor from '@stdlib/array-uint32';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasUint32ArraySupport from '@stdlib/assert-has-uint32array-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasUint32ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isUint32Array from '@stdlib/assert-is-uint32array';\nimport UINT32_MAX from '@stdlib/constants-uint32-max';\nimport GlobalUint32Array from './uint32array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Uint32Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Uint32Array` support\n*\n* @example\n* var bool = hasUint32ArraySupport();\n* // returns \n*/\nfunction hasUint32ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalUint32Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = [ 1, 3.14, -3.14, UINT32_MAX+1, UINT32_MAX+2 ];\n\t\tarr = new GlobalUint32Array( arr );\n\t\tbool = (\n\t\t\tisUint32Array( arr ) &&\n\t\t\tarr[ 0 ] === 1 &&\n\t\t\tarr[ 1 ] === 3 && // truncation\n\t\t\tarr[ 2 ] === UINT32_MAX-2 && // truncation and wrap around\n\t\t\tarr[ 3 ] === 0 && // wrap around\n\t\t\tarr[ 4 ] === 1 // wrap around\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasUint32ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of 32-bit unsigned integers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasUint8Array = ( typeof Uint8Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Uint8Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a Uint8Array\n*\n* @example\n* var bool = isUint8Array( new Uint8Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isUint8Array( [] );\n* // returns false\n*/\nfunction isUint8Array( value ) {\n\treturn (\n\t\t( hasUint8Array && value instanceof Uint8Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Uint8Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isUint8Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum unsigned 8-bit integer.\n*\n* @module @stdlib/constants-uint8-max\n* @type {integer32}\n*\n* @example\n* import UINT8_MAX from '@stdlib/constants-uint8-max';\n* // returns 255\n*/\n\n\n// MAIN //\n\n/**\n* Maximum unsigned 8-bit integer.\n*\n* ## Notes\n*\n* The number has the value\n*\n* ```tex\n* 2^{8} - 1\n* ```\n*\n* which corresponds to the bit sequence\n*\n* ```binarystring\n* 11111111\n* ```\n*\n* @constant\n* @type {integer32}\n* @default 255\n*/\nvar UINT8_MAX = 255|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default UINT8_MAX;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Uint8Array === 'function' ) ? Uint8Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Uint8Array === 'function' ) ? Uint8Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of 8-bit unsigned integers in the platform byte order.\n*\n* @module @stdlib/array-uint8\n*\n* @example\n* import ctor from '@stdlib/array-uint8';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasUint8ArraySupport from '@stdlib/assert-has-uint8array-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasUint8ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isUint8Array from '@stdlib/assert-is-uint8array';\nimport UINT8_MAX from '@stdlib/constants-uint8-max';\nimport GlobalUint8Array from './uint8array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Uint8Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Uint8Array` support\n*\n* @example\n* var bool = hasUint8ArraySupport();\n* // returns \n*/\nfunction hasUint8ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalUint8Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = [ 1, 3.14, -3.14, UINT8_MAX+1, UINT8_MAX+2 ];\n\t\tarr = new GlobalUint8Array( arr );\n\t\tbool = (\n\t\t\tisUint8Array( arr ) &&\n\t\t\tarr[ 0 ] === 1 &&\n\t\t\tarr[ 1 ] === 3 && // truncation\n\t\t\tarr[ 2 ] === UINT8_MAX-2 && // truncation and wrap around\n\t\t\tarr[ 3 ] === 0 && // wrap around\n\t\t\tarr[ 4 ] === 1 // wrap around\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasUint8ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of 8-bit unsigned integers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasUint8ClampedArray = ( typeof Uint8ClampedArray === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Uint8ClampedArray.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a Uint8ClampedArray\n*\n* @example\n* var bool = isUint8ClampedArray( new Uint8ClampedArray( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isUint8ClampedArray( [] );\n* // returns false\n*/\nfunction isUint8ClampedArray( value ) {\n\treturn (\n\t\t( hasUint8ClampedArray && value instanceof Uint8ClampedArray ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Uint8ClampedArray]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isUint8ClampedArray;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Uint8ClampedArray === 'function' ) ? Uint8ClampedArray : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Uint8ClampedArray === 'function' ) ? Uint8ClampedArray : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of 8-bit unsigned integers in the platform byte order clamped to 0-255.\n*\n* @module @stdlib/array-uint8c\n*\n* @example\n* import ctor from '@stdlib/array-uint8c';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasUint8ClampedArraySupport from '@stdlib/assert-has-uint8clampedarray-support'; // eslint-disable-line id-length\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasUint8ClampedArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isUint8ClampedArray from '@stdlib/assert-is-uint8clampedarray';\nimport GlobalUint8ClampedArray from './uint8clampedarray.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Uint8ClampedArray` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Uint8ClampedArray` support\n*\n* @example\n* var bool = hasUint8ClampedArraySupport();\n* // returns \n*/\nfunction hasUint8ClampedArraySupport() { // eslint-disable-line id-length\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalUint8ClampedArray !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = new GlobalUint8ClampedArray( [ -1, 0, 1, 3.14, 4.99, 255, 256 ] );\n\t\tbool = (\n\t\t\tisUint8ClampedArray( arr ) &&\n\t\t\tarr[ 0 ] === 0 && // clamped\n\t\t\tarr[ 1 ] === 0 &&\n\t\t\tarr[ 2 ] === 1 &&\n\t\t\tarr[ 3 ] === 3 && // round to nearest\n\t\t\tarr[ 4 ] === 5 && // round to nearest\n\t\t\tarr[ 5 ] === 255 &&\n\t\t\tarr[ 6 ] === 255 // clamped\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasUint8ClampedArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of 8-bit unsigned integers in the platform byte order clamped to 0-255.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isInteger from '@stdlib/math-base-assert-is-integer';\nimport MAX_LENGTH from '@stdlib/constants-array-max-array-length';\n\n\n// MAIN //\n\n/**\n* Tests if a value is an array-like object.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is an array-like object\n*\n* @example\n* var bool = isArrayLikeObject( [] );\n* // returns true\n*\n* @example\n* var bool = isArrayLikeObject( { 'length':10 } );\n* // returns true\n*\n* @example\n* var bool = isArrayLikeObject( 'beep' );\n* // returns false\n*/\nfunction isArrayLikeObject( value ) {\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\ttypeof value.length === 'number' &&\n\t\tisInteger( value.length ) &&\n\t\tvalue.length >= 0 &&\n\t\tvalue.length <= MAX_LENGTH\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isArrayLikeObject;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum length of a generic array.\n*\n* @module @stdlib/constants-array-max-array-length\n*\n* @example\n* import MAX_ARRAY_LENGTH from '@stdlib/constants-array-max-array-length';\n* // returns 4294967295\n*/\n\n// MAIN //\n\n/**\n* Maximum length of a generic array.\n*\n* ```tex\n* 2^{32} - 1\n* ```\n*\n* @constant\n* @type {uinteger32}\n* @default 4294967295\n*/\nvar MAX_ARRAY_LENGTH = 4294967295>>>0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default MAX_ARRAY_LENGTH;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isInteger from '@stdlib/math-base-assert-is-integer';\nimport MAX_LENGTH from '@stdlib/constants-array-max-typed-array-length';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a collection.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether a value is a collection\n*\n* @example\n* var bool = isCollection( [] );\n* // returns true\n*\n* @example\n* var bool = isCollection( {} );\n* // returns false\n*/\nfunction isCollection( value ) {\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\ttypeof value.length === 'number' &&\n\t\tisInteger( value.length ) &&\n\t\tvalue.length >= 0 &&\n\t\tvalue.length <= MAX_LENGTH\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isCollection;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum length of a typed array.\n*\n* @module @stdlib/constants-array-max-typed-array-length\n*\n* @example\n* import MAX_TYPED_ARRAY_LENGTH from '@stdlib/constants-array-max-typed-array-length';\n* // returns 9007199254740991\n*/\n\n// MAIN //\n\n/**\n* Maximum length of a typed array.\n*\n* ```tex\n* 2^{53} - 1\n* ```\n*\n* @constant\n* @type {number}\n* @default 9007199254740991\n*/\nvar MAX_TYPED_ARRAY_LENGTH = 9007199254740991;\n\n\n// EXPORTS //\n\nexport default MAX_TYPED_ARRAY_LENGTH;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasArrayBuffer = ( typeof ArrayBuffer === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is an ArrayBuffer.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an ArrayBuffer\n*\n* @example\n* import ArrayBuffer from '@stdlib/array-buffer';\n*\n* var bool = isArrayBuffer( new ArrayBuffer( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isArrayBuffer( [] );\n* // returns false\n*/\nfunction isArrayBuffer( value ) {\n\treturn (\n\t\t( hasArrayBuffer && value instanceof ArrayBuffer ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object ArrayBuffer]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isArrayBuffer;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar f;\n\n\n// FUNCTIONS //\n\n/**\n* Tests if a value is an array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an array\n*\n* @example\n* var bool = isArray( [] );\n* // returns true\n*\n* @example\n* var bool = isArray( {} );\n* // returns false\n*/\nfunction isArray( value ) {\n\treturn ( nativeClass( value ) === '[object Array]' );\n}\n\n\n// MAIN //\n\nif ( Array.isArray ) {\n\tf = Array.isArray;\n} else {\n\tf = isArray;\n}\n\n\n// EXPORTS //\n\nexport default f;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isArray from '@stdlib/assert-is-array';\n\n\n// MAIN //\n\n/**\n* Tests if a value is an object; e.g., `{}`.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an object\n*\n* @example\n* var bool = isObject( {} );\n* // returns true\n*\n* @example\n* var bool = isObject( null );\n* // returns false\n*/\nfunction isObject( value ) {\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\t!isArray( value )\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isObject;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\nvar RE = /./;\n\n\n// EXPORTS //\n\nexport default RE;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Tests if a value is a boolean primitive.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a boolean primitive\n*\n* @example\n* var bool = isBoolean( true );\n* // returns true\n*\n* @example\n* var bool = isBoolean( false );\n* // returns true\n*\n* @example\n* import Boolean from '@stdlib/boolean-ctor';\n*\n* var bool = isBoolean( new Boolean( true ) );\n* // returns false\n*/\nfunction isBoolean( value ) {\n\treturn ( typeof value === 'boolean' );\n}\n\n\n// EXPORTS //\n\nexport default isBoolean;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Returns a boolean.\n*\n* @name Boolean\n* @constructor\n* @type {Function}\n* @param {*} value - input value\n* @returns {(boolean|Boolean)} boolean\n*\n* @example\n* var b = Boolean( null );\n* // returns false\n*\n* b = Boolean( [] );\n* // returns true\n*\n* b = Boolean( {} );\n* // returns true\n*\n* @example\n* var b = new Boolean( false );\n* // returns \n*/\nvar Bool = Boolean; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default Bool;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// eslint-disable-next-line stdlib/no-redeclare\nvar toString = Boolean.prototype.toString; // non-generic\n\n\n// EXPORTS //\n\nexport default toString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport hasToStringTag from '@stdlib/assert-has-tostringtag-support';\nimport nativeClass from '@stdlib/utils-native-class';\nimport Boolean from '@stdlib/boolean-ctor';\nimport test from './try2serialize.js';\n\n\n// VARIABLES //\n\nvar FLG = hasToStringTag();\n\n\n// MAIN //\n\n/**\n* Tests if a value is a boolean object.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a boolean object\n*\n* @example\n* var bool = isBoolean( true );\n* // returns false\n*\n* @example\n* import Boolean from '@stdlib/boolean-ctor';\n*\n* var bool = isBoolean( new Boolean( false ) );\n* // returns true\n*/\nfunction isBoolean( value ) {\n\tif ( typeof value === 'object' ) {\n\t\tif ( value instanceof Boolean ) {\n\t\t\treturn true;\n\t\t}\n\t\tif ( FLG ) {\n\t\t\treturn test( value );\n\t\t}\n\t\treturn ( nativeClass( value ) === '[object Boolean]' );\n\t}\n\treturn false;\n}\n\n\n// EXPORTS //\n\nexport default isBoolean;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport toString from './tostring.js'; // eslint-disable-line stdlib/no-redeclare\n\n\n// MAIN //\n\n/**\n* Attempts to serialize a value to a string.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value can be serialized\n*/\nfunction test( value ) {\n\ttry {\n\t\ttoString.call( value );\n\t\treturn true;\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\treturn false;\n\t}\n}\n\n\n// EXPORTS //\n\nexport default test;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a boolean.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a boolean\n*\n* @example\n* var bool = isBoolean( false );\n* // returns true\n*\n* @example\n* var bool = isBoolean( true );\n* // returns true\n*\n* @example\n* import Boolean from '@stdlib/boolean-ctor';\n*\n* var bool = isBoolean( new Boolean( false ) );\n* // returns true\n*\n* @example\n* import Boolean from '@stdlib/boolean-ctor';\n*\n* var bool = isBoolean( new Boolean( true ) );\n* // returns true\n*/\nfunction isBoolean( value ) {\n\treturn ( isPrimitive( value ) || isObject( value ) );\n}\n\n\n// EXPORTS //\n\nexport default isBoolean;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Returns the global object using code generation.\n*\n* @private\n* @returns {Object} global object\n*/\nfunction getGlobal() {\n\treturn new Function( 'return this;' )(); // eslint-disable-line no-new-func, stdlib/require-globals\n}\n\n\n// EXPORTS //\n\nexport default getGlobal;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test if a value is a boolean.\n*\n* @module @stdlib/assert-is-boolean\n*\n* @example\n* import Boolean from '@stdlib/boolean-ctor';\n* import isBoolean from '@stdlib/assert-is-boolean';\n*\n* var bool = isBoolean( false );\n* // returns true\n*\n* bool = isBoolean( new Boolean( false ) );\n* // returns true\n*\n* @example\n* import Boolean from '@stdlib/boolean-ctor';\n* import { isPrimitive as isBoolean } from '@stdlib/assert-is-boolean';\n*\n* var bool = isBoolean( false );\n* // returns true\n*\n* bool = isBoolean( new Boolean( true ) );\n* // returns false\n*\n* @example\n* import Boolean from '@stdlib/boolean-ctor';\n* import { isObject as isBoolean } from '@stdlib/assert-is-boolean';\n*\n* var bool = isBoolean( true );\n* // returns false\n*\n* bool = isBoolean( new Boolean( false ) );\n* // returns true\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'isPrimitive', isPrimitive );\nsetReadOnly( main, 'isObject', isObject );\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar obj = ( typeof self === 'object' ) ? self : null;\n\n\n// EXPORTS //\n\nexport default obj;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar obj = ( typeof window === 'object' ) ? window : null;\n\n\n// EXPORTS //\n\nexport default obj;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar obj = ( typeof global === 'object' ) ? global : null;\n\n\n// EXPORTS //\n\nexport default obj;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar obj = ( typeof globalThis === 'object' ) ? globalThis : null; // eslint-disable-line no-undef\n\n\n// EXPORTS //\n\nexport default obj;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport getGlobal from '@stdlib/utils-global';\n\n\n// MAIN //\n\nvar root = getGlobal();\nvar nodeList = root.document && root.document.childNodes;\n\n\n// EXPORTS //\n\nexport default nodeList;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isBoolean } from '@stdlib/assert-is-boolean';\nimport format from '@stdlib/string-format';\nimport getThis from './codegen.js';\nimport Self from './self.js';\nimport Win from './window.js';\nimport Global from './global.js';\nimport GlobalThis from './global_this.js';\n\n\n// MAIN //\n\n/**\n* Returns the global object.\n*\n* ## Notes\n*\n* - Using code generation is the **most** reliable way to resolve the global object; however, doing so is likely to violate content security policies (CSPs) in, e.g., Chrome Apps and elsewhere.\n*\n* @param {boolean} [codegen=false] - boolean indicating whether to use code generation to resolve the global object\n* @throws {TypeError} must provide a boolean\n* @throws {Error} unable to resolve global object\n* @returns {Object} global object\n*\n* @example\n* var g = getGlobal();\n* // returns {...}\n*/\nfunction getGlobal( codegen ) {\n\tif ( arguments.length ) {\n\t\tif ( !isBoolean( codegen ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Must provide a boolean. Value: `%s`.', codegen ) );\n\t\t}\n\t\tif ( codegen ) {\n\t\t\treturn getThis();\n\t\t}\n\t\t// Fall through...\n\t}\n\t// Case: 2020 revision of ECMAScript standard\n\tif ( GlobalThis ) {\n\t\treturn GlobalThis;\n\t}\n\t// Case: browsers and web workers\n\tif ( Self ) {\n\t\treturn Self;\n\t}\n\t// Case: browsers\n\tif ( Win ) {\n\t\treturn Win;\n\t}\n\t// Case: Node.js\n\tif ( Global ) {\n\t\treturn Global;\n\t}\n\t// Case: unknown\n\tthrow new Error( 'unexpected error. Unable to resolve global object.' );\n}\n\n\n// EXPORTS //\n\nexport default getGlobal;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\nvar typedarray = Int8Array; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default typedarray;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Returns a regular expression to capture everything that is not a space immediately after the `function` keyword and before the first left parenthesis.\n*\n* @returns {RegExp} regular expression\n*\n* @example\n* var RE_FUNCTION_NAME = reFunctionName();\n*\n* function fname( fcn ) {\n* return RE_FUNCTION_NAME.exec( fcn.toString() )[ 1 ];\n* }\n*\n* var fn = fname( Math.sqrt );\n* // returns 'sqrt'\n*\n* fn = fname( Int8Array );\n* // returns 'Int8Array'\n*\n* fn = fname( Object.prototype.toString );\n* // returns 'toString'\n*\n* fn = fname( function(){} );\n* // returns ''\n*/\nfunction reFunctionName() {\n\treturn /^\\s*function\\s*([^(]*)/i;\n}\n\n\n// EXPORTS //\n\nexport default reFunctionName;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport reFunctionName from './main.js';\n\n\n// MAIN //\n\n/**\n* Captures everything that is not a space immediately after the `function` keyword and before the first left parenthesis.\n*\n* Regular expression: `/^\\s*function\\s*([^(]*)/i`\n*\n* - `/^\\s*`\n* - Match zero or more spaces at beginning\n*\n* - `function`\n* - Match the word `function`\n*\n* - `\\s*`\n* - Match zero or more spaces after the word `function`\n*\n* - `()`\n* - Capture\n*\n* - `[^(]*`\n* - Match anything except a left parenthesis `(` zero or more times\n*\n* - `/i`\n* - ignore case\n*\n* @constant\n* @type {RegExp}\n* @default /^\\s*function\\s*([^(]*)/i\n*/\nvar RE_FUNCTION_NAME = reFunctionName();\n\n\n// EXPORTS //\n\nexport default RE_FUNCTION_NAME;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Tests if a value is object-like.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether a value is object-like\n*\n* @example\n* var bool = isObjectLike( {} );\n* // returns true\n*\n* @example\n* var bool = isObjectLike( [] );\n* // returns true\n*\n* @example\n* var bool = isObjectLike( null );\n* // returns false\n*/\nfunction isObjectLike( value ) {\n\treturn (\n\t\tvalue !== null &&\n\t\ttypeof value === 'object'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isObjectLike;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\nimport { REGEXP as RE } from '@stdlib/regexp-function-name';\nimport isBuffer from '@stdlib/assert-is-buffer';\n\n\n// MAIN //\n\n/**\n* Determines the name of a value's constructor.\n*\n* @param {*} v - input value\n* @returns {string} name of a value's constructor\n*\n* @example\n* var v = constructorName( 'a' );\n* // returns 'String'\n*\n* @example\n* var v = constructorName( 5 );\n* // returns 'Number'\n*\n* @example\n* var v = constructorName( null );\n* // returns 'Null'\n*\n* @example\n* var v = constructorName( undefined );\n* // returns 'Undefined'\n*\n* @example\n* var v = constructorName( function noop() {} );\n* // returns 'Function'\n*/\nfunction constructorName( v ) {\n\tvar match;\n\tvar name;\n\tvar ctor;\n\tname = nativeClass( v ).slice( 8, -1 );\n\tif ( (name === 'Object' || name === 'Error') && v.constructor ) {\n\t\tctor = v.constructor;\n\t\tif ( typeof ctor.name === 'string' ) {\n\t\t\treturn ctor.name;\n\t\t}\n\t\tmatch = RE.exec( ctor.toString() );\n\t\tif ( match ) {\n\t\t\treturn match[ 1 ];\n\t\t}\n\t}\n\tif ( isBuffer( v ) ) {\n\t\treturn 'Buffer';\n\t}\n\treturn name;\n}\n\n\n// EXPORTS //\n\nexport default constructorName;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isObjectLike from '@stdlib/assert-is-object-like';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Buffer instance.\n*\n* @param {*} value - value to validate\n* @returns {boolean} boolean indicating if a value is a Buffer instance\n*\n* @example\n* var v = isBuffer( new Buffer( 'beep' ) );\n* // returns true\n*\n* @example\n* var v = isBuffer( new Buffer( [1,2,3,4] ) );\n* // returns true\n*\n* @example\n* var v = isBuffer( {} );\n* // returns false\n*\n* @example\n* var v = isBuffer( [] );\n* // returns false\n*/\nfunction isBuffer( value ) {\n\treturn (\n\t\tisObjectLike( value ) &&\n\t\t(\n\t\t\t// eslint-disable-next-line no-underscore-dangle\n\t\t\tvalue._isBuffer || // for envs missing Object.prototype.constructor (e.g., Safari 5-7)\n\t\t\t(\n\t\t\t\tvalue.constructor &&\n\n\t\t\t\t// WARNING: `typeof` is not a foolproof check, as certain envs consider RegExp and NodeList instances to be functions\n\t\t\t\ttypeof value.constructor.isBuffer === 'function' &&\n\t\t\t\tvalue.constructor.isBuffer( value )\n\t\t\t)\n\t\t)\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isBuffer;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Regular expression to capture everything that is not a space immediately after the `function` keyword and before the first left parenthesis.\n*\n* @module @stdlib/regexp-function-name\n*\n* @example\n* import reFunctionName from '@stdlib/regexp-function-name';\n* var RE_FUNCTION_NAME = reFunctionName();\n*\n* function fname( fcn ) {\n* return RE_FUNCTION_NAME.exec( fcn.toString() )[ 1 ];\n* }\n*\n* var fn = fname( Math.sqrt );\n* // returns 'sqrt'\n*\n* fn = fname( Int8Array );\n* // returns 'Int8Array'\n*\n* fn = fname( Object.prototype.toString );\n* // returns 'toString'\n*\n* fn = fname( function(){} );\n* // returns ''\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport REGEXP from './regexp.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'REGEXP', REGEXP );\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test if a value is object-like.\n*\n* @module @stdlib/assert-is-object-like\n*\n* @example\n* import isObjectLike from '@stdlib/assert-is-object-like';\n*\n* var bool = isObjectLike( {} );\n* // returns true\n*\n* bool = isObjectLike( [] );\n* // returns true\n*\n* bool = isObjectLike( null );\n* // returns false\n*\n* @example\n* import { isObjectLikeArray as isObjectLike } from '@stdlib/assert-is-object-like';\n*\n* var bool = isObjectLike( [ {}, [] ] );\n* // returns true\n*\n* bool = isObjectLike( [ {}, '3.0' ] );\n* // returns false\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport arrayfun from '@stdlib/assert-tools-array-function';\nimport main from './main.js';\n\n\n// VARIABLES //\n\nvar isObjectLikeArray = arrayfun( main );\n\n\n// MAIN //\n\nsetReadOnly( main, 'isObjectLikeArray', isObjectLikeArray );\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isArray from '@stdlib/assert-is-array';\nimport format from '@stdlib/string-format';\n\n\n// MAIN //\n\n/**\n* Returns a function which tests if every element in an array passes a test condition.\n*\n* @param {Function} predicate - function to apply\n* @throws {TypeError} must provide a function\n* @returns {Function} an array function\n*\n* @example\n* import isOdd from '@stdlib/assert-is-odd';\n*\n* var arr1 = [ 1, 3, 5, 7 ];\n* var arr2 = [ 3, 5, 8 ];\n*\n* var validate = arrayfcn( isOdd );\n*\n* var bool = validate( arr1 );\n* // returns true\n*\n* bool = validate( arr2 );\n* // returns false\n*/\nfunction arrayfcn( predicate ) {\n\tif ( typeof predicate !== 'function' ) {\n\t\tthrow new TypeError( format( 'invalid argument. Must provide a function. Value: `%s`.', predicate ) );\n\t}\n\treturn every;\n\n\t/**\n\t* Tests if every element in an array passes a test condition.\n\t*\n\t* @private\n\t* @param {*} value - value to test\n\t* @returns {boolean} boolean indicating whether a value is an array for which all elements pass a test condition\n\t*/\n\tfunction every( value ) {\n\t\tvar len;\n\t\tvar i;\n\t\tif ( !isArray( value ) ) {\n\t\t\treturn false;\n\t\t}\n\t\tlen = value.length;\n\t\tif ( len === 0 ) {\n\t\t\treturn false;\n\t\t}\n\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\tif ( predicate( value[ i ] ) === false ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}\n}\n\n\n// EXPORTS //\n\nexport default arrayfcn;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Determine a value's type.\n*\n* @module @stdlib/utils-type-of\n*\n* @example\n* import typeOf from '@stdlib/utils-type-of';\n*\n* var str = typeOf( 'a' );\n* // returns 'string'\n*\n* str = typeOf( 5 );\n* // returns 'number'\n*/\n\n// MODULES //\n\nimport usePolyfill from './check.js';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar main = ( usePolyfill() ) ? polyfill : builtin;\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport RE from './fixtures/re.js';\nimport nodeList from './fixtures/nodelist.js';\nimport typedarray from './fixtures/typedarray.js';\n\n\n// MAIN //\n\n/**\n* Checks whether a polyfill is needed when using the `typeof` operator.\n*\n* @private\n* @returns {boolean} boolean indicating whether a polyfill is needed\n*/\nfunction check() {\n\tif (\n\t\t// Chrome 1-12 returns 'function' for regular expression instances (see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/typeof):\n\t\ttypeof RE === 'function' ||\n\n\t\t// Safari 8 returns 'object' for typed array and weak map constructors (underscore #1929):\n\t\ttypeof typedarray === 'object' ||\n\n\t\t// PhantomJS 1.9 returns 'function' for `NodeList` instances (underscore #2236):\n\t\ttypeof nodeList === 'function'\n\t) {\n\t\treturn true;\n\t}\n\treturn false;\n}\n\n\n// EXPORTS //\n\nexport default check;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport ctorName from '@stdlib/utils-constructor-name';\n\n\n// MAIN //\n\n/**\n* Determines a value's type.\n*\n* @param {*} v - input value\n* @returns {string} string indicating the value's type\n*/\nfunction typeOf( v ) {\n\treturn ctorName( v ).toLowerCase();\n}\n\n\n// EXPORTS //\n\nexport default typeOf;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport ctorName from '@stdlib/utils-constructor-name';\n\n\n// NOTES //\n\n/*\n* Built-in `typeof` operator behavior:\n*\n* ```text\n* typeof null => 'object'\n* typeof undefined => 'undefined'\n* typeof 'a' => 'string'\n* typeof 5 => 'number'\n* typeof NaN => 'number'\n* typeof true => 'boolean'\n* typeof false => 'boolean'\n* typeof {} => 'object'\n* typeof [] => 'object'\n* typeof function foo(){} => 'function'\n* typeof function* foo(){} => 'object'\n* typeof Symbol() => 'symbol'\n* ```\n*\n*/\n\n\n// MAIN //\n\n/**\n* Determines a value's type.\n*\n* @param {*} v - input value\n* @returns {string} string indicating the value's type\n*/\nfunction typeOf( v ) {\n\tvar type;\n\n\t// Address `typeof null` => `object` (see http://wiki.ecmascript.org/doku.php?id=harmony:typeof_null):\n\tif ( v === null ) {\n\t\treturn 'null';\n\t}\n\ttype = typeof v;\n\n\t// If the `typeof` operator returned something other than `object`, we are done. Otherwise, we need to check for an internal class name or search for a constructor.\n\tif ( type === 'object' ) {\n\t\treturn ctorName( v ).toLowerCase();\n\t}\n\treturn type;\n}\n\n\n// EXPORTS //\n\nexport default typeOf;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport typeOf from '@stdlib/utils-type-of';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a function.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a function\n*\n* @example\n* function beep() {\n* return 'beep';\n* }\n*\n* var bool = isFunction( beep );\n* // returns true\n*/\nfunction isFunction( value ) {\n\t// Note: cannot use `typeof` directly, as various browser engines incorrectly return `'function'` when operating on non-function objects, such as regular expressions and NodeLists.\n\treturn ( typeOf( value ) === 'function' );\n}\n\n\n// EXPORTS //\n\nexport default isFunction;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isNumber } from '@stdlib/assert-is-number';\nimport defineProperty from '@stdlib/utils-define-property';\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport format from '@stdlib/string-format';\nimport toStr from './tostring.js';\nimport toJSON from './tojson.js';\n\n\n// MAIN //\n\n/**\n* 128-bit complex number constructor.\n*\n* @constructor\n* @param {number} real - real component\n* @param {number} imag - imaginary component\n* @throws {TypeError} must invoke using the `new` keyword\n* @throws {TypeError} real component must be a number\n* @throws {TypeError} imaginary component must be a number\n* @returns {Complex128} 128-bit complex number\n*\n* @example\n* var z = new Complex128( 5.0, 3.0 );\n* // returns \n*/\nfunction Complex128( real, imag ) {\n\tif ( !( this instanceof Complex128 ) ) {\n\t\tthrow new TypeError( 'invalid invocation. Constructor must be called with the `new` keyword.' );\n\t}\n\tif ( !isNumber( real ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Real component must be a number. Value: `%s`.', real ) );\n\t}\n\tif ( !isNumber( imag ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Imaginary component must be a number. Value: `%s`.', imag ) );\n\t}\n\tdefineProperty( this, 're', {\n\t\t'configurable': false,\n\t\t'enumerable': true,\n\t\t'writable': false,\n\t\t'value': real\n\t});\n\tdefineProperty( this, 'im', {\n\t\t'configurable': false,\n\t\t'enumerable': true,\n\t\t'writable': false,\n\t\t'value': imag\n\t});\n\treturn this;\n}\n\n/**\n* Size (in bytes) of each component.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex128\n* @type {integer}\n* @returns {integer} size of each component\n*\n* @example\n* var nbytes = Complex128.BYTES_PER_ELEMENT;\n* // returns 8\n*/\nsetReadOnly( Complex128, 'BYTES_PER_ELEMENT', 8 );\n\n/**\n* Size (in bytes) of each component.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex128.prototype\n* @type {integer}\n* @returns {integer} size of each component\n*\n* @example\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var nbytes = z.BYTES_PER_ELEMENT;\n* // returns 8\n*/\nsetReadOnly( Complex128.prototype, 'BYTES_PER_ELEMENT', 8 );\n\n/**\n* Length (in bytes) of a complex number.\n*\n* @name byteLength\n* @memberof Complex128.prototype\n* @type {integer}\n* @returns {integer} byte length\n*\n* @example\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var nbytes = z.byteLength;\n* // returns 16\n*/\nsetReadOnly( Complex128.prototype, 'byteLength', 16 );\n\n/**\n* Serializes a complex number as a string.\n*\n* @name toString\n* @memberof Complex128.prototype\n* @type {Function}\n* @returns {string} serialized complex number\n*\n* @example\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var str = z.toString();\n* // returns '5 + 3i'\n*/\nsetReadOnly( Complex128.prototype, 'toString', toStr );\n\n/**\n* Serializes a complex number as a JSON object.\n*\n* ## Notes\n*\n* - `JSON.stringify()` implicitly calls this method when stringifying a `Complex128` instance.\n*\n* @name toJSON\n* @memberof Complex128.prototype\n* @type {Function}\n* @returns {Object} serialized complex number\n*\n* @example\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var obj = z.toJSON();\n* // returns { 'type': 'Complex128', 're': 5.0, 'im': 3.0 }\n*/\nsetReadOnly( Complex128.prototype, 'toJSON', toJSON );\n\n\n// EXPORTS //\n\nexport default Complex128;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Serializes a complex number as a string.\n*\n* @private\n* @returns {string} serialized complex number\n*/\nfunction toString() { // eslint-disable-line stdlib/no-redeclare\n\t/* eslint-disable no-invalid-this */\n\tvar str = '' + this.re;\n\tif ( this.im < 0 ) {\n\t\tstr += ' - ' + (-this.im);\n\t} else {\n\t\tstr += ' + ' + this.im;\n\t}\n\tstr += 'i';\n\treturn str;\n}\n\n\n// EXPORTS //\n\nexport default toString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Serializes a complex number as a JSON object.\n*\n* @private\n* @returns {Object} JSON representation\n*/\nfunction toJSON() {\n\t/* eslint-disable no-invalid-this */\n\tvar out = {};\n\tout.type = 'Complex128';\n\tout.re = this.re;\n\tout.im = this.im;\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default toJSON;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar fround = ( typeof Math.fround === 'function' ) ? Math.fround : null; // eslint-disable-line stdlib/no-builtin-math\n\n\n// EXPORTS //\n\nexport default fround;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport Float32Array from '@stdlib/array-float32';\n\n\n// VARIABLES //\n\nvar FLOAT32_VIEW = new Float32Array( 1 );\n\n\n// MAIN //\n\n/**\n* Converts a double-precision floating-point number to the nearest single-precision floating-point number.\n*\n* @param {number} x - double-precision floating-point number\n* @returns {number} nearest single-precision floating-point number\n*\n* @example\n* var y = float64ToFloat32( 1.337 );\n* // returns 1.3370000123977661\n*/\nfunction float64ToFloat32( x ) {\n\tFLOAT32_VIEW[ 0 ] = x;\n\treturn FLOAT32_VIEW[ 0 ];\n}\n\n\n// EXPORTS //\n\nexport default float64ToFloat32;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Convert a double-precision floating-point number to the nearest single-precision floating-point number.\n*\n* @module @stdlib/number-float64-base-to-float32\n*\n* @example\n* import float64ToFloat32 from '@stdlib/number-float64-base-to-float32';\n*\n* var y = float64ToFloat32( 1.337 );\n* // returns 1.3370000123977661\n*/\n\n// MODULES //\n\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar float64ToFloat32;\nif ( typeof builtin === 'function' ) {\n\tfloat64ToFloat32 = builtin;\n} else {\n\tfloat64ToFloat32 = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default float64ToFloat32;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isNumber } from '@stdlib/assert-is-number';\nimport defineProperty from '@stdlib/utils-define-property';\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport float64ToFloat32 from '@stdlib/number-float64-base-to-float32';\nimport format from '@stdlib/string-format';\nimport toStr from './tostring.js';\nimport toJSON from './tojson.js';\n\n\n// MAIN //\n\n/**\n* 64-bit complex number constructor.\n*\n* @constructor\n* @param {number} real - real component\n* @param {number} imag - imaginary component\n* @throws {TypeError} must invoke using the `new` keyword\n* @throws {TypeError} real component must be a number\n* @throws {TypeError} imaginary component must be a number\n* @returns {Complex64} 64-bit complex number\n*\n* @example\n* var z = new Complex64( 5.0, 3.0 );\n* // returns \n*/\nfunction Complex64( real, imag ) {\n\tif ( !( this instanceof Complex64 ) ) {\n\t\tthrow new TypeError( 'invalid invocation. Constructor must be called with the `new` keyword.' );\n\t}\n\tif ( !isNumber( real ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Real component must be a number. Value: `%s`.', real ) );\n\t}\n\tif ( !isNumber( imag ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Imaginary component must be a number. Value: `%s`.', imag ) );\n\t}\n\tdefineProperty( this, 're', {\n\t\t'configurable': false,\n\t\t'enumerable': true,\n\t\t'writable': false,\n\t\t'value': float64ToFloat32( real )\n\t});\n\tdefineProperty( this, 'im', {\n\t\t'configurable': false,\n\t\t'enumerable': true,\n\t\t'writable': false,\n\t\t'value': float64ToFloat32( imag )\n\t});\n\treturn this;\n}\n\n/**\n* Size (in bytes) of each component.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex64\n* @type {integer}\n* @returns {integer} size of each component\n*\n* @example\n* var nbytes = Complex64.BYTES_PER_ELEMENT;\n* // returns 4\n*/\nsetReadOnly( Complex64, 'BYTES_PER_ELEMENT', 4 );\n\n/**\n* Size (in bytes) of each component.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex64.prototype\n* @type {integer}\n* @returns {integer} size of each component\n*\n* @example\n* var z = new Complex64( 5.0, 3.0 );\n*\n* var nbytes = z.BYTES_PER_ELEMENT;\n* // returns 4\n*/\nsetReadOnly( Complex64.prototype, 'BYTES_PER_ELEMENT', 4 );\n\n/**\n* Length (in bytes) of a complex number.\n*\n* @name byteLength\n* @memberof Complex64.prototype\n* @type {integer}\n* @returns {integer} byte length\n*\n* @example\n* var z = new Complex64( 5.0, 3.0 );\n*\n* var nbytes = z.byteLength;\n* // returns 8\n*/\nsetReadOnly( Complex64.prototype, 'byteLength', 8 );\n\n/**\n* Serializes a complex number as a string.\n*\n* @name toString\n* @memberof Complex64.prototype\n* @type {Function}\n* @returns {string} serialized complex number\n*\n* @example\n* var z = new Complex64( 5.0, 3.0 );\n*\n* var str = z.toString();\n* // returns '5 + 3i'\n*/\nsetReadOnly( Complex64.prototype, 'toString', toStr );\n\n/**\n* Serializes a complex number as a JSON object.\n*\n* ## Notes\n*\n* - `JSON.stringify()` implicitly calls this method when stringifying a `Complex64` instance.\n*\n* @name toJSON\n* @memberof Complex64.prototype\n* @type {Function}\n* @returns {Object} serialized complex number\n*\n* @example\n* var z = new Complex64( 5.0, 3.0 );\n*\n* var obj = z.toJSON();\n* // returns { 'type': 'Complex64', 're': 5.0, 'im': 3.0 }\n*/\nsetReadOnly( Complex64.prototype, 'toJSON', toJSON );\n\n\n// EXPORTS //\n\nexport default Complex64;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport Complex128 from '@stdlib/complex-float64';\nimport Complex64 from '@stdlib/complex-float32';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a complex number-like object.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a complex number-like object.\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n* import Complex64 from '@stdlib/complex-float32';\n*\n* var x = new Complex128( 4.0, 2.0 );\n* var bool = isComplexLike( x );\n* // returns true\n*\n* x = new Complex64( 4.0, 2.0 );\n* bool = isComplexLike( x );\n* // returns true\n*/\nfunction isComplexLike( value ) {\n\tif ( value instanceof Complex128 || value instanceof Complex64 ) {\n\t\treturn true;\n\t}\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\ttypeof value.re === 'number' &&\n\t\ttypeof value.im === 'number'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isComplexLike;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isInteger from '@stdlib/math-base-assert-is-integer';\n\n\n// MAIN //\n\n/**\n* Tests if a finite numeric value is an even number.\n*\n* @param {number} x - value to test\n* @returns {boolean} boolean indicating whether the value is an even number\n*\n* @example\n* var bool = isEven( 5.0 );\n* // returns false\n*\n* @example\n* var bool = isEven( -2.0 );\n* // returns true\n*\n* @example\n* var bool = isEven( 0.0 );\n* // returns true\n*\n* @example\n* var bool = isEven( NaN );\n* // returns false\n*/\nfunction isEven( x ) {\n\treturn isInteger( x/2.0 );\n}\n\n\n// EXPORTS //\n\nexport default isEven;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport hasOwnProp from '@stdlib/assert-has-own-property';\nimport Symbol from '@stdlib/symbol-ctor';\n\n\n// MAIN //\n\n/**\n* Tests for native `Symbol.iterator` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Symbol.iterator` support\n*\n* @example\n* var bool = hasIteratorSymbolSupport();\n* // returns \n*/\nfunction hasIteratorSymbolSupport() {\n\treturn (\n\t\ttypeof Symbol === 'function' &&\n\t\ttypeof Symbol( 'foo' ) === 'symbol' &&\n\t\thasOwnProp( Symbol, 'iterator' ) &&\n\t\ttypeof Symbol.iterator === 'symbol'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default hasIteratorSymbolSupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Serializes a complex number as a string.\n*\n* @private\n* @returns {string} serialized complex number\n*/\nfunction toString() { // eslint-disable-line stdlib/no-redeclare\n\t/* eslint-disable no-invalid-this */\n\tvar str = '' + this.re;\n\tif ( this.im < 0 ) {\n\t\tstr += ' - ' + (-this.im);\n\t} else {\n\t\tstr += ' + ' + this.im;\n\t}\n\tstr += 'i';\n\treturn str;\n}\n\n\n// EXPORTS //\n\nexport default toString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Serializes a complex number as a JSON object.\n*\n* @private\n* @returns {Object} JSON representation\n*/\nfunction toJSON() {\n\t/* eslint-disable no-invalid-this */\n\tvar out = {};\n\tout.type = 'Complex64';\n\tout.re = this.re;\n\tout.im = this.im;\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default toJSON;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport hasIteratorSymbolSupport from '@stdlib/assert-has-iterator-symbol-support';\n\n\n// MAIN //\n\n/**\n* Iterator symbol.\n*\n* @name IteratorSymbol\n* @constant\n* @type {(symbol|null)}\n*\n* @example\n* function iterator() {\n* var it;\n* var i;\n*\n* i = -1;\n*\n* it = {};\n* it.next = next;\n* it.return = done;\n*\n* if ( IteratorSymbol ) {\n* it[ IteratorSymbol ] = iterator;\n* }\n* return it;\n*\n* function next() {\n* i += 1;\n* return {\n* 'value': i,\n* 'done': false\n* };\n* }\n*\n* function done( value ) {\n* if ( arguments.length === 0 ) {\n* return {\n* 'done': true\n* };\n* }\n* return {\n* 'value': value,\n* 'done': true\n* };\n* }\n* }\n*\n* var obj = iterator();\n*/\nvar IteratorSymbol = ( hasIteratorSymbolSupport() ) ? Symbol.iterator : null;\n\n\n// EXPORTS //\n\nexport default IteratorSymbol;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport defineProperty from '@stdlib/utils-define-property';\n\n\n// MAIN //\n\n/**\n* Defines a non-enumerable read-only accessor.\n*\n* @param {Object} obj - object on which to define the property\n* @param {(string|symbol)} prop - property name\n* @param {Function} getter - accessor\n*\n* @example\n* function getter() {\n* return 'bar';\n* }\n*\n* var obj = {};\n*\n* setNonEnumerableReadOnlyAccessor( obj, 'foo', getter );\n*\n* try {\n* obj.foo = 'boop';\n* } catch ( err ) {\n* console.error( err.message );\n* }\n*/\nfunction setNonEnumerableReadOnlyAccessor( obj, prop, getter ) { // eslint-disable-line id-length\n\tdefineProperty( obj, prop, {\n\t\t'configurable': false,\n\t\t'enumerable': false,\n\t\t'get': getter\n\t});\n}\n\n\n// EXPORTS //\n\nexport default setNonEnumerableReadOnlyAccessor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Returns the real component of a single-precision complex floating-point number.\n*\n* @param {Complex} z - complex number\n* @returns {number} real component\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n*\n* var z = new Complex64( 5.0, 3.0 );\n*\n* var re = realf( z );\n* // returns 5.0\n*/\nfunction realf( z ) {\n\treturn z.re;\n}\n\n\n// EXPORTS //\n\nexport default realf;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Returns the imaginary component of a single-precision complex floating-point number.\n*\n* @param {Complex} z - complex number\n* @returns {number} imaginary component\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n*\n* var z = new Complex64( 5.0, 3.0 );\n*\n* var im = imagf( z );\n* // returns 3.0\n*/\nfunction imagf( z ) {\n\treturn z.im;\n}\n\n\n// EXPORTS //\n\nexport default imagf;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport Float32Array from '@stdlib/array-float32';\n\n\n// MAIN //\n\n/**\n* Reinterprets a `Complex64Array` as a `Float32Array`.\n*\n* @param {Complex64Array} x - input array\n* @param {NonNegativeInteger} offset - starting index\n* @returns {Float32Array} `Float32Array` view\n*\n* @example\n* import Complex64Array from '@stdlib/array-complex64';\n*\n* var x = new Complex64Array( 10 );\n*\n* var out = reinterpret( x, 0 );\n* // returns \n*\n* var bool = ( out.buffer === x.buffer );\n* // returns true\n*/\nfunction reinterpret( x, offset ) {\n\treturn new Float32Array( x.buffer, x.byteOffset+(x.BYTES_PER_ELEMENT*offset), 2*(x.length-offset) ); // eslint-disable-line max-len\n}\n\n\n// EXPORTS //\n\nexport default reinterpret;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport Float64Array from '@stdlib/array-float64';\n\n\n// MAIN //\n\n/**\n* Reinterprets a `Complex128Array` as a `Float64Array`.\n*\n* @param {Complex128Array} x - input array\n* @param {NonNegativeInteger} offset - starting index\n* @returns {Float64Array} `Float64Array` view\n*\n* @example\n* import Complex128Array from '@stdlib/array-complex128';\n*\n* var x = new Complex128Array( 10 );\n*\n* var out = reinterpret( x, 0 );\n* // returns \n*\n* var bool = ( out.buffer === x.buffer );\n* // returns true\n*/\nfunction reinterpret( x, offset ) {\n\treturn new Float64Array( x.buffer, x.byteOffset+(x.BYTES_PER_ELEMENT*offset), 2*(x.length-offset) ); // eslint-disable-line max-len\n}\n\n\n// EXPORTS //\n\nexport default reinterpret;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// VARIABLES //\n\nvar GETTERS = {\n\t'float64': getFloat64,\n\t'float32': getFloat32,\n\t'int32': getInt32,\n\t'int16': getInt16,\n\t'int8': getInt8,\n\t'uint32': getUint32,\n\t'uint16': getUint16,\n\t'uint8': getUint8,\n\t'uint8c': getUint8c,\n\t'generic': getGeneric,\n\t'default': getArrayLike\n};\n\n\n// FUNCTIONS //\n\n/**\n* Returns an element from a `Float64Array`.\n*\n* @private\n* @param {Float64Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n*\n* var arr = new Float64Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getFloat64( arr, 2 );\n* // returns 3.0\n*/\nfunction getFloat64( arr, idx ) {\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from a `Float32Array`.\n*\n* @private\n* @param {Float32Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Float32Array from '@stdlib/array-float32';\n*\n* var arr = new Float32Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getFloat32( arr, 2 );\n* // returns 3.0\n*/\nfunction getFloat32( arr, idx ) {\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from an `Int32Array`.\n*\n* @private\n* @param {Int32Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Int32Array from '@stdlib/array-int32';\n*\n* var arr = new Int32Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getInt32( arr, 2 );\n* // returns 3\n*/\nfunction getInt32( arr, idx ) { // eslint-disable-line stdlib/jsdoc-doctest-decimal-point\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from an `Int16Array`.\n*\n* @private\n* @param {Int16Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Int16Array from '@stdlib/array-int16';\n*\n* var arr = new Int16Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getInt16( arr, 2 );\n* // returns 3\n*/\nfunction getInt16( arr, idx ) { // eslint-disable-line stdlib/jsdoc-doctest-decimal-point\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from an `Int8Array`.\n*\n* @private\n* @param {Int8Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Int8Array from '@stdlib/array-int8';\n*\n* var arr = new Int8Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getInt8( arr, 2 );\n* // returns 3\n*/\nfunction getInt8( arr, idx ) { // eslint-disable-line stdlib/jsdoc-doctest-decimal-point\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from a `Uint32Array`.\n*\n* @private\n* @param {Uint32Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Uint32Array from '@stdlib/array-uint32';\n*\n* var arr = new Uint32Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getUint32( arr, 2 );\n* // returns 3\n*/\nfunction getUint32( arr, idx ) { // eslint-disable-line stdlib/jsdoc-doctest-decimal-point\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from a `Uint16Array`.\n*\n* @private\n* @param {Uint16Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Uint16Array from '@stdlib/array-uint16';\n*\n* var arr = new Uint16Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getUint16( arr, 2 );\n* // returns 3\n*/\nfunction getUint16( arr, idx ) { // eslint-disable-line stdlib/jsdoc-doctest-decimal-point\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from a `Uint8Array`.\n*\n* @private\n* @param {Uint8Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Uint8Array from '@stdlib/array-uint8';\n*\n* var arr = new Uint8Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getUint8( arr, 2 );\n* // returns 3\n*/\nfunction getUint8( arr, idx ) { // eslint-disable-line stdlib/jsdoc-doctest-decimal-point\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from a `Uint8ClampedArray`.\n*\n* @private\n* @param {Uint8ClampedArray} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Uint8ClampedArray from '@stdlib/array-uint8c';\n*\n* var arr = new Uint8ClampedArray( [ 1, 2, 3, 4 ] );\n*\n* var v = getUint8c( arr, 2 );\n* // returns 3\n*/\nfunction getUint8c( arr, idx ) { // eslint-disable-line stdlib/jsdoc-doctest-decimal-point\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from a generic `Array`.\n*\n* @private\n* @param {Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {*} element value\n*\n* @example\n* var arr = [ 1, 2, 3, 4 ];\n*\n* var v = getGeneric( arr, 2 );\n* // returns 3\n*/\nfunction getGeneric( arr, idx ) {\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from an indexed array-like object.\n*\n* @private\n* @param {Collection} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {*} element value\n*\n* @example\n* var arr = [ 1, 2, 3, 4 ];\n*\n* var v = getArrayLike( arr, 2 );\n* // returns 3\n*/\nfunction getArrayLike( arr, idx ) {\n\treturn arr[ idx ];\n}\n\n\n// MAIN //\n\n/**\n* Returns an accessor function for retrieving an element from an indexed array-like object.\n*\n* @param {string} dtype - array dtype\n* @returns {Function} accessor\n*\n* @example\n* import dtype from '@stdlib/array-dtype';\n*\n* var arr = [ 1, 2, 3, 4 ];\n*\n* var get = getter( dtype( arr ) );\n* var v = get( arr, 2 );\n* // returns 3\n*/\nfunction getter( dtype ) {\n\tvar f = GETTERS[ dtype ];\n\tif ( typeof f === 'function' ) {\n\t\treturn f;\n\t}\n\treturn GETTERS.default;\n}\n\n\n// EXPORTS //\n\nexport default getter;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// VARIABLES //\n\nvar GETTERS = {\n\t'complex128': getComplex128,\n\t'complex64': getComplex64,\n\t'default': getArrayLike\n};\n\n\n// FUNCTIONS //\n\n/**\n* Returns an element from a `Complex128Array`.\n*\n* @private\n* @param {Complex128Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Complex128Array from '@stdlib/array-complex128';\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* var arr = new Complex128Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getComplex128( arr, 1 );\n* // returns \n*\n* var re = real( v );\n* // returns 3.0\n*\n* var im = imag( v );\n* // returns 4.0\n*/\nfunction getComplex128( arr, idx ) {\n\treturn arr.get( idx );\n}\n\n/**\n* Returns an element from a `Complex64Array`.\n*\n* @private\n* @param {Complex64Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Complex64Array from '@stdlib/array-complex64';\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* var arr = new Complex64Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getComplex64( arr, 1 );\n* // returns \n*\n* var re = realf( v );\n* // returns 3.0\n*\n* var im = imagf( v );\n* // returns 4.0\n*/\nfunction getComplex64( arr, idx ) {\n\treturn arr.get( idx );\n}\n\n/**\n* Returns an element from an array-like object supporting the get/set protocol.\n*\n* @private\n* @param {Collection} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {*} element value\n*\n* @example\n* var arr = [ 1, 2, 3, 4 ];\n*\n* function get( idx ) {\n* return arr[ idx ];\n* }\n*\n* function set( value, idx ) {\n* arr[ idx ] = value;\n* }\n*\n* arr.get = get;\n* arr.set = set;\n*\n* var v = getArrayLike( arr, 2 );\n* // returns 3\n*/\nfunction getArrayLike( arr, idx ) {\n\treturn arr.get( idx );\n}\n\n\n// MAIN //\n\n/**\n* Returns an accessor function for retrieving an element from an array-like object supporting the get/set protocol.\n*\n* @param {string} dtype - array dtype\n* @returns {Function} accessor\n*\n* @example\n* import Complex64Array from '@stdlib/array-complex64';\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n* import dtype from '@stdlib/array-dtype';\n*\n* var arr = new Complex64Array( [ 1, 2, 3, 4 ] );\n*\n* var get = getter( dtype( arr ) );\n* var v = get( arr, 1 );\n* // returns \n*\n* var re = realf( v );\n* // returns 3.0\n*\n* var im = imagf( v );\n* // returns 4.0\n*/\nfunction getter( dtype ) {\n\tvar f = GETTERS[ dtype ];\n\tif ( typeof f === 'function' ) {\n\t\treturn f;\n\t}\n\treturn GETTERS.default;\n}\n\n\n// EXPORTS //\n\nexport default getter;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isArrayLikeObject from '@stdlib/assert-is-array-like-object';\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport realf from '@stdlib/complex-realf';\nimport imagf from '@stdlib/complex-imagf';\nimport format from '@stdlib/string-format';\n\n\n// MAIN //\n\n/**\n* Returns an array of iterated values.\n*\n* @private\n* @param {Object} it - iterator\n* @returns {(Array|TypeError)} array or an error\n*/\nfunction fromIterator( it ) {\n\tvar out;\n\tvar v;\n\tvar z;\n\n\tout = [];\n\twhile ( true ) {\n\t\tv = it.next();\n\t\tif ( v.done ) {\n\t\t\tbreak;\n\t\t}\n\t\tz = v.value;\n\t\tif ( isArrayLikeObject( z ) && z.length >= 2 ) {\n\t\t\tout.push( z[ 0 ], z[ 1 ] );\n\t\t} else if ( isComplexLike( z ) ) {\n\t\t\tout.push( realf( z ), imagf( z ) );\n\t\t} else {\n\t\t\treturn new TypeError( format( 'invalid argument. An iterator must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', z ) );\n\t\t}\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default fromIterator;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isArrayLikeObject from '@stdlib/assert-is-array-like-object';\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport realf from '@stdlib/complex-realf';\nimport imagf from '@stdlib/complex-imagf';\nimport format from '@stdlib/string-format';\n\n\n// MAIN //\n\n/**\n* Returns an array of iterated values.\n*\n* @private\n* @param {Object} it - iterator\n* @param {Function} clbk - callback to invoke for each iterated value\n* @param {*} thisArg - invocation context\n* @returns {(Array|TypeError)} array or an error\n*/\nfunction fromIteratorMap( it, clbk, thisArg ) {\n\tvar out;\n\tvar v;\n\tvar z;\n\tvar i;\n\n\tout = [];\n\ti = -1;\n\twhile ( true ) {\n\t\tv = it.next();\n\t\tif ( v.done ) {\n\t\t\tbreak;\n\t\t}\n\t\ti += 1;\n\t\tz = clbk.call( thisArg, v.value, i );\n\t\tif ( isArrayLikeObject( z ) && z.length >= 2 ) {\n\t\t\tout.push( z[ 0 ], z[ 1 ] );\n\t\t} else if ( isComplexLike( z ) ) {\n\t\t\tout.push( realf( z ), imagf( z ) );\n\t\t} else {\n\t\t\treturn new TypeError( format( 'invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', z ) );\n\t\t}\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default fromIteratorMap;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport realf from '@stdlib/complex-realf';\nimport imagf from '@stdlib/complex-imagf';\n\n\n// MAIN //\n\n/**\n* Returns a strided array of real and imaginary components.\n*\n* @private\n* @param {Float32Array} buf - output array\n* @param {Array} arr - array containing complex numbers\n* @returns {(Float32Array|null)} output array or null\n*/\nfunction fromArray( buf, arr ) {\n\tvar len;\n\tvar v;\n\tvar i;\n\tvar j;\n\n\tlen = arr.length;\n\tj = 0;\n\tfor ( i = 0; i < len; i++ ) {\n\t\tv = arr[ i ];\n\t\tif ( !isComplexLike( v ) ) {\n\t\t\treturn null;\n\t\t}\n\t\tbuf[ j ] = realf( v );\n\t\tbuf[ j+1 ] = imagf( v );\n\t\tj += 2; // stride\n\t}\n\treturn buf;\n}\n\n\n// EXPORTS //\n\nexport default fromArray;\n","/* eslint-disable no-restricted-syntax, max-lines, no-invalid-this */\n\n/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isNonNegativeInteger } from '@stdlib/assert-is-nonnegative-integer';\nimport isArrayLikeObject from '@stdlib/assert-is-array-like-object';\nimport isCollection from '@stdlib/assert-is-collection';\nimport isArrayBuffer from '@stdlib/assert-is-arraybuffer';\nimport isObject from '@stdlib/assert-is-object';\nimport isArray from '@stdlib/assert-is-array';\nimport isFunction from '@stdlib/assert-is-function';\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport isEven from '@stdlib/math-base-assert-is-even';\nimport isInteger from '@stdlib/math-base-assert-is-integer';\nimport hasIteratorSymbolSupport from '@stdlib/assert-has-iterator-symbol-support';\nimport ITERATOR_SYMBOL from '@stdlib/symbol-iterator';\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport setReadOnlyAccessor from '@stdlib/utils-define-nonenumerable-read-only-accessor';\nimport Float32Array from '@stdlib/array-float32';\nimport Complex64 from '@stdlib/complex-float32';\nimport format from '@stdlib/string-format';\nimport realf from '@stdlib/complex-realf';\nimport imagf from '@stdlib/complex-imagf';\nimport reinterpret64 from '@stdlib/strided-base-reinterpret-complex64';\nimport reinterpret128 from '@stdlib/strided-base-reinterpret-complex128';\nimport getter from '@stdlib/array-base-getter';\nimport accessorGetter from '@stdlib/array-base-accessor-getter';\nimport fromIterator from './from_iterator.js';\nimport fromIteratorMap from './from_iterator_map.js';\nimport fromArray from './from_array.js';\n\n\n// VARIABLES //\n\nvar BYTES_PER_ELEMENT = Float32Array.BYTES_PER_ELEMENT * 2;\nvar HAS_ITERATOR_SYMBOL = hasIteratorSymbolSupport();\n\n\n// FUNCTIONS //\n\n/**\n* Returns a boolean indicating if a value is a complex typed array.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a complex typed array\n*/\nfunction isComplexArray( value ) {\n\treturn (\n\t\tvalue instanceof Complex64Array ||\n\t\t(\n\t\t\ttypeof value === 'object' &&\n\t\t\tvalue !== null &&\n\t\t\t(\n\t\t\t\tvalue.constructor.name === 'Complex64Array' ||\n\t\t\t\tvalue.constructor.name === 'Complex128Array'\n\t\t\t) &&\n\t\t\ttypeof value._length === 'number' && // eslint-disable-line no-underscore-dangle\n\n\t\t\t// NOTE: we don't perform a more rigorous test here for a typed array for performance reasons, as robustly checking for a typed array instance could require walking the prototype tree and performing relatively expensive constructor checks...\n\t\t\ttypeof value._buffer === 'object' // eslint-disable-line no-underscore-dangle\n\t\t)\n\t);\n}\n\n/**\n* Returns a boolean indicating if a value is a complex typed array constructor.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a complex typed array constructor\n*/\nfunction isComplexArrayConstructor( value ) {\n\treturn (\n\t\tvalue === Complex64Array ||\n\n\t\t// NOTE: weaker test in order to avoid a circular dependency with Complex128Array...\n\t\tvalue.name === 'Complex128Array'\n\t);\n}\n\n/**\n* Returns a boolean indicating if a value is a `Complex64Array`.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a `Complex64Array`\n*/\nfunction isComplex64Array( value ) {\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\tvalue.constructor.name === 'Complex64Array' &&\n\t\tvalue.BYTES_PER_ELEMENT === BYTES_PER_ELEMENT\n\t);\n}\n\n/**\n* Returns a boolean indicating if a value is a `Complex128Array`.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a `Complex128Array`\n*/\nfunction isComplex128Array( value ) {\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\tvalue.constructor.name === 'Complex128Array' &&\n\t\tvalue.BYTES_PER_ELEMENT === BYTES_PER_ELEMENT*2\n\t);\n}\n\n\n// MAIN //\n\n/**\n* 64-bit complex number array constructor.\n*\n* @constructor\n* @param {(NonNegativeInteger|Collection|ArrayBuffer|Iterable)} [arg] - length, typed array, array-like object, buffer, or an iterable\n* @param {NonNegativeInteger} [byteOffset=0] - byte offset\n* @param {NonNegativeInteger} [length] - view length\n* @throws {RangeError} ArrayBuffer byte length must be a multiple of `8`\n* @throws {RangeError} array-like object and typed array input arguments must have a length which is a multiple of two\n* @throws {TypeError} if provided only a single argument, must provide a valid argument\n* @throws {TypeError} byte offset must be a nonnegative integer\n* @throws {RangeError} byte offset must be a multiple of `8`\n* @throws {TypeError} view length must be a positive multiple of `8`\n* @throws {RangeError} must provide sufficient memory to accommodate byte offset and view length requirements\n* @throws {TypeError} an iterator must return either a two element array containing real and imaginary components or a complex number\n* @returns {Complex64Array} complex number array\n*\n* @example\n* var arr = new Complex64Array();\n* // returns \n*\n* var len = arr.length;\n* // returns 0\n*\n* @example\n* var arr = new Complex64Array( 2 );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*\n* @example\n* var arr = new Complex64Array( [ 1.0, -1.0 ] );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* import ArrayBuffer from '@stdlib/array-buffer';\n*\n* var buf = new ArrayBuffer( 16 );\n* var arr = new Complex64Array( buf );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*\n* @example\n* import ArrayBuffer from '@stdlib/array-buffer';\n*\n* var buf = new ArrayBuffer( 16 );\n* var arr = new Complex64Array( buf, 8 );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* import ArrayBuffer from '@stdlib/array-buffer';\n*\n* var buf = new ArrayBuffer( 32 );\n* var arr = new Complex64Array( buf, 8, 2 );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*/\nfunction Complex64Array() {\n\tvar byteOffset;\n\tvar nargs;\n\tvar buf;\n\tvar len;\n\n\tnargs = arguments.length;\n\tif ( !(this instanceof Complex64Array) ) {\n\t\tif ( nargs === 0 ) {\n\t\t\treturn new Complex64Array();\n\t\t}\n\t\tif ( nargs === 1 ) {\n\t\t\treturn new Complex64Array( arguments[0] );\n\t\t}\n\t\tif ( nargs === 2 ) {\n\t\t\treturn new Complex64Array( arguments[0], arguments[1] );\n\t\t}\n\t\treturn new Complex64Array( arguments[0], arguments[1], arguments[2] );\n\t}\n\t// Create the underlying data buffer...\n\tif ( nargs === 0 ) {\n\t\tbuf = new Float32Array( 0 ); // backward-compatibility\n\t} else if ( nargs === 1 ) {\n\t\tif ( isNonNegativeInteger( arguments[0] ) ) {\n\t\t\tbuf = new Float32Array( arguments[0]*2 );\n\t\t} else if ( isCollection( arguments[0] ) ) {\n\t\t\tbuf = arguments[ 0 ];\n\t\t\tlen = buf.length;\n\n\t\t\t// If provided a \"generic\" array, peak at the first value, and, if the value is a complex number, try to process as an array of complex numbers, falling back to \"normal\" typed array initialization if we fail and ensuring consistency if the first value had not been a complex number...\n\t\t\tif ( len && isArray( buf ) && isComplexLike( buf[0] ) ) {\n\t\t\t\tbuf = fromArray( new Float32Array( len*2 ), buf );\n\t\t\t\tif ( buf === null ) {\n\t\t\t\t\t// We failed and we are now forced to allocate a new array :-(\n\t\t\t\t\tif ( !isEven( len ) ) {\n\t\t\t\t\t\tthrow new RangeError( format( 'invalid argument. Array-like object arguments must have a length which is a multiple of two. Length: `%u`.', len ) );\n\t\t\t\t\t}\n\t\t\t\t\t// We failed, so fall back to directly setting values...\n\t\t\t\t\tbuf = new Float32Array( arguments[0] );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ( isComplex64Array( buf ) ) {\n\t\t\t\t\tbuf = reinterpret64( buf, 0 );\n\t\t\t\t} else if ( isComplex128Array( buf ) ) {\n\t\t\t\t\tbuf = reinterpret128( buf, 0 );\n\t\t\t\t} else if ( !isEven( len ) ) {\n\t\t\t\t\tthrow new RangeError( format( 'invalid argument. Array-like object and typed array arguments must have a length which is a multiple of two. Length: `%u`.', len ) );\n\t\t\t\t}\n\t\t\t\tbuf = new Float32Array( buf );\n\t\t\t}\n\t\t} else if ( isArrayBuffer( arguments[0] ) ) {\n\t\t\tbuf = arguments[ 0 ];\n\t\t\tif ( !isInteger( buf.byteLength/BYTES_PER_ELEMENT ) ) {\n\t\t\t\tthrow new RangeError( format( 'invalid argument. ArrayBuffer byte length must be a multiple of %u. Byte length: `%u`.', BYTES_PER_ELEMENT, buf.byteLength ) );\n\t\t\t}\n\t\t\tbuf = new Float32Array( buf );\n\t\t} else if ( isObject( arguments[0] ) ) {\n\t\t\tbuf = arguments[ 0 ];\n\t\t\tif ( HAS_ITERATOR_SYMBOL === false ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Environment lacks Symbol.iterator support. Must provide a length, ArrayBuffer, typed array, or array-like object. Value: `%s`.', buf ) );\n\t\t\t}\n\t\t\tif ( !isFunction( buf[ ITERATOR_SYMBOL ] ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.', buf ) );\n\t\t\t}\n\t\t\tbuf = buf[ ITERATOR_SYMBOL ]();\n\t\t\tif ( !isFunction( buf.next ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.', buf ) );\n\t\t\t}\n\t\t\tbuf = fromIterator( buf );\n\t\t\tif ( buf instanceof Error ) {\n\t\t\t\tthrow buf;\n\t\t\t}\n\t\t\tbuf = new Float32Array( buf );\n\t\t} else {\n\t\t\tthrow new TypeError( format( 'invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.', arguments[0] ) );\n\t\t}\n\t} else {\n\t\tbuf = arguments[ 0 ];\n\t\tif ( !isArrayBuffer( buf ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. First argument must be an ArrayBuffer. Value: `%s`.', buf ) );\n\t\t}\n\t\tbyteOffset = arguments[ 1 ];\n\t\tif ( !isNonNegativeInteger( byteOffset ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Byte offset must be a nonnegative integer. Value: `%s`.', byteOffset ) );\n\t\t}\n\t\tif ( !isInteger( byteOffset/BYTES_PER_ELEMENT ) ) {\n\t\t\tthrow new RangeError( format( 'invalid argument. Byte offset must be a multiple of %u. Value: `%u`.', BYTES_PER_ELEMENT, byteOffset ) );\n\t\t}\n\t\tif ( nargs === 2 ) {\n\t\t\tlen = buf.byteLength - byteOffset;\n\t\t\tif ( !isInteger( len/BYTES_PER_ELEMENT ) ) {\n\t\t\t\tthrow new RangeError( format( 'invalid arguments. ArrayBuffer view byte length must be a multiple of %u. View byte length: `%u`.', BYTES_PER_ELEMENT, len ) );\n\t\t\t}\n\t\t\tbuf = new Float32Array( buf, byteOffset );\n\t\t} else {\n\t\t\tlen = arguments[ 2 ];\n\t\t\tif ( !isNonNegativeInteger( len ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Length must be a nonnegative integer. Value: `%s`.', len ) );\n\t\t\t}\n\t\t\tif ( (len*BYTES_PER_ELEMENT) > (buf.byteLength-byteOffset) ) {\n\t\t\t\tthrow new RangeError( format( 'invalid arguments. ArrayBuffer has insufficient capacity. Either decrease the array length or provide a bigger buffer. Minimum capacity: `%u`.', len*BYTES_PER_ELEMENT ) );\n\t\t\t}\n\t\t\tbuf = new Float32Array( buf, byteOffset, len*2 );\n\t\t}\n\t}\n\tsetReadOnly( this, '_buffer', buf );\n\tsetReadOnly( this, '_length', buf.length/2 );\n\n\treturn this;\n}\n\n/**\n* Size (in bytes) of each array element.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex64Array\n* @readonly\n* @type {PositiveInteger}\n* @default 8\n*\n* @example\n* var nbytes = Complex64Array.BYTES_PER_ELEMENT;\n* // returns 8\n*/\nsetReadOnly( Complex64Array, 'BYTES_PER_ELEMENT', BYTES_PER_ELEMENT );\n\n/**\n* Constructor name.\n*\n* @name name\n* @memberof Complex64Array\n* @readonly\n* @type {string}\n* @default 'Complex64Array'\n*\n* @example\n* var str = Complex64Array.name;\n* // returns 'Complex64Array'\n*/\nsetReadOnly( Complex64Array, 'name', 'Complex64Array' );\n\n/**\n* Creates a new 64-bit complex number array from an array-like object or an iterable.\n*\n* @name from\n* @memberof Complex64Array\n* @type {Function}\n* @param {(Collection|Iterable)} src - array-like object or iterable\n* @param {Function} [clbk] - callback to invoke for each source element\n* @param {*} [thisArg] - context\n* @throws {TypeError} `this` context must be a constructor\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be an array-like object or an iterable\n* @throws {TypeError} second argument must be a function\n* @throws {RangeError} array-like objects must have a length which is a multiple of two\n* @throws {TypeError} an iterator must return either a two element array containing real and imaginary components or a complex number\n* @throws {TypeError} when provided an iterator, a callback must return either a two element array containing real and imaginary components or a complex number\n* @returns {Complex64Array} 64-bit complex number array\n*\n* @example\n* var arr = Complex64Array.from( [ 1.0, -1.0 ] );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n*\n* var arr = Complex64Array.from( [ new Complex64( 1.0, 1.0 ) ] );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* function clbk( v ) {\n* return new Complex64( realf(v)*2.0, imagf(v)*2.0 );\n* }\n*\n* var arr = Complex64Array.from( [ new Complex64( 1.0, 1.0 ) ], clbk );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*/\nsetReadOnly( Complex64Array, 'from', function from( src ) {\n\tvar thisArg;\n\tvar nargs;\n\tvar clbk;\n\tvar out;\n\tvar buf;\n\tvar tmp;\n\tvar get;\n\tvar len;\n\tvar flg;\n\tvar v;\n\tvar i;\n\tvar j;\n\tif ( !isFunction( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` context must be a constructor.' );\n\t}\n\tif ( !isComplexArrayConstructor( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tnargs = arguments.length;\n\tif ( nargs > 1 ) {\n\t\tclbk = arguments[ 1 ];\n\t\tif ( !isFunction( clbk ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be a function. Value: `%s`.', clbk ) );\n\t\t}\n\t\tif ( nargs > 2 ) {\n\t\t\tthisArg = arguments[ 2 ];\n\t\t}\n\t}\n\tif ( isComplexArray( src ) ) {\n\t\tlen = src.length;\n\t\tif ( clbk ) {\n\t\t\tout = new this( len );\n\t\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\t\tj = 0;\n\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\tv = clbk.call( thisArg, src.get( i ), i );\n\t\t\t\tif ( isComplexLike( v ) ) {\n\t\t\t\t\tbuf[ j ] = realf( v );\n\t\t\t\t\tbuf[ j+1 ] = imagf( v );\n\t\t\t\t} else if ( isArrayLikeObject( v ) && v.length >= 2 ) {\n\t\t\t\t\tbuf[ j ] = v[ 0 ];\n\t\t\t\t\tbuf[ j+1 ] = v[ 1 ];\n\t\t\t\t} else {\n\t\t\t\t\tthrow new TypeError( format( 'invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', v ) );\n\t\t\t\t}\n\t\t\t\tj += 2; // stride\n\t\t\t}\n\t\t\treturn out;\n\t\t}\n\t\treturn new this( src );\n\t}\n\tif ( isCollection( src ) ) {\n\t\tif ( clbk ) {\n\t\t\t// Note: array contents affect how we iterate over a provided data source. If only complex number objects, we can extract real and imaginary components. Otherwise, for non-complex number arrays (e.g., `Float64Array`, etc), we assume a strided array where real and imaginary components are interleaved. In the former case, we expect a callback to return real and imaginary components (possibly as a complex number). In the latter case, we expect a callback to return *either* a real or imaginary component.\n\n\t\t\tlen = src.length;\n\t\t\tif ( src.get && src.set ) {\n\t\t\t\tget = accessorGetter( 'default' );\n\t\t\t} else {\n\t\t\t\tget = getter( 'default' );\n\t\t\t}\n\t\t\t// Detect whether we've been provided an array which returns complex number objects...\n\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\tif ( !isComplexLike( get( src, i ) ) ) {\n\t\t\t\t\tflg = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// If an array does not contain only complex number objects, then we assume interleaved real and imaginary components...\n\t\t\tif ( flg ) {\n\t\t\t\tif ( !isEven( len ) ) {\n\t\t\t\t\tthrow new RangeError( format( 'invalid argument. First argument must have a length which is a multiple of %u. Length: `%u`.', 2, len ) );\n\t\t\t\t}\n\t\t\t\tout = new this( len/2 );\n\t\t\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\t\tbuf[ i ] = clbk.call( thisArg, get( src, i ), i );\n\t\t\t\t}\n\t\t\t\treturn out;\n\t\t\t}\n\t\t\t// If an array contains only complex number objects, then we need to extract real and imaginary components...\n\t\t\tout = new this( len );\n\t\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\t\tj = 0;\n\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\tv = clbk.call( thisArg, get( src, i ), i );\n\t\t\t\tif ( isComplexLike( v ) ) {\n\t\t\t\t\tbuf[ j ] = realf( v );\n\t\t\t\t\tbuf[ j+1 ] = imagf( v );\n\t\t\t\t} else if ( isArrayLikeObject( v ) && v.length >= 2 ) {\n\t\t\t\t\tbuf[ j ] = v[ 0 ];\n\t\t\t\t\tbuf[ j+1 ] = v[ 1 ];\n\t\t\t\t} else {\n\t\t\t\t\tthrow new TypeError( format( 'invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', v ) );\n\t\t\t\t}\n\t\t\t\tj += 2; // stride\n\t\t\t}\n\t\t\treturn out;\n\t\t}\n\t\treturn new this( src );\n\t}\n\tif ( isObject( src ) && HAS_ITERATOR_SYMBOL && isFunction( src[ ITERATOR_SYMBOL ] ) ) { // eslint-disable-line max-len\n\t\tbuf = src[ ITERATOR_SYMBOL ]();\n\t\tif ( !isFunction( buf.next ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.', src ) );\n\t\t}\n\t\tif ( clbk ) {\n\t\t\ttmp = fromIteratorMap( buf, clbk, thisArg );\n\t\t} else {\n\t\t\ttmp = fromIterator( buf );\n\t\t}\n\t\tif ( tmp instanceof Error ) {\n\t\t\tthrow tmp;\n\t\t}\n\t\tlen = tmp.length / 2;\n\t\tout = new this( len );\n\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\tbuf[ i ] = tmp[ i ];\n\t\t}\n\t\treturn out;\n\t}\n\tthrow new TypeError( format( 'invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.', src ) );\n});\n\n/**\n* Creates a new 64-bit complex number array from a variable number of arguments.\n*\n* @name of\n* @memberof Complex64Array\n* @type {Function}\n* @param {...*} element - array elements\n* @throws {TypeError} `this` context must be a constructor\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Complex64Array} 64-bit complex number array\n*\n* @example\n* var arr = Complex64Array.of( 1.0, 1.0, 1.0, 1.0 );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*/\nsetReadOnly( Complex64Array, 'of', function of() {\n\tvar args;\n\tvar i;\n\tif ( !isFunction( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` context must be a constructor.' );\n\t}\n\tif ( !isComplexArrayConstructor( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\targs = [];\n\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\targs.push( arguments[ i ] );\n\t}\n\treturn new this( args );\n});\n\n/**\n* Pointer to the underlying data buffer.\n*\n* @name buffer\n* @memberof Complex64Array.prototype\n* @readonly\n* @type {ArrayBuffer}\n*\n* @example\n* var arr = new Complex64Array( 10 );\n*\n* var buf = arr.buffer;\n* // returns \n*/\nsetReadOnlyAccessor( Complex64Array.prototype, 'buffer', function get() {\n\treturn this._buffer.buffer;\n});\n\n/**\n* Size (in bytes) of the array.\n*\n* @name byteLength\n* @memberof Complex64Array.prototype\n* @readonly\n* @type {NonNegativeInteger}\n*\n* @example\n* var arr = new Complex64Array( 10 );\n*\n* var byteLength = arr.byteLength;\n* // returns 80\n*/\nsetReadOnlyAccessor( Complex64Array.prototype, 'byteLength', function get() {\n\treturn this._buffer.byteLength;\n});\n\n/**\n* Offset (in bytes) of the array from the start of its underlying `ArrayBuffer`.\n*\n* @name byteOffset\n* @memberof Complex64Array.prototype\n* @readonly\n* @type {NonNegativeInteger}\n*\n* @example\n* var arr = new Complex64Array( 10 );\n*\n* var byteOffset = arr.byteOffset;\n* // returns 0\n*/\nsetReadOnlyAccessor( Complex64Array.prototype, 'byteOffset', function get() {\n\treturn this._buffer.byteOffset;\n});\n\n/**\n* Size (in bytes) of each array element.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex64Array.prototype\n* @readonly\n* @type {PositiveInteger}\n* @default 8\n*\n* @example\n* var arr = new Complex64Array( 10 );\n*\n* var nbytes = arr.BYTES_PER_ELEMENT;\n* // returns 8\n*/\nsetReadOnly( Complex64Array.prototype, 'BYTES_PER_ELEMENT', Complex64Array.BYTES_PER_ELEMENT );\n\n/**\n* Copies a sequence of elements within the array to the position starting at `target`.\n*\n* @name copyWithin\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {integer} target - index at which to start copying elements\n* @param {integer} start - source index at which to copy elements from\n* @param {integer} [end] - source index at which to stop copying elements from\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Complex64Array} modified array\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* var arr = new Complex64Array( 4 );\n*\n* // Set the array elements:\n* arr.set( new Complex64( 1.0, 1.0 ), 0 );\n* arr.set( new Complex64( 2.0, 2.0 ), 1 );\n* arr.set( new Complex64( 3.0, 3.0 ), 2 );\n* arr.set( new Complex64( 4.0, 4.0 ), 3 );\n*\n* // Copy the first two elements to the last two elements:\n* arr.copyWithin( 2, 0, 2 );\n*\n* // Get the last array element:\n* var z = arr.get( 3 );\n*\n* var re = realf( z );\n* // returns 2.0\n*\n* var im = imagf( z );\n* // returns 2.0\n*/\nsetReadOnly( Complex64Array.prototype, 'copyWithin', function copyWithin( target, start ) {\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\t// FIXME: prefer a functional `copyWithin` implementation which addresses lack of universal browser support (e.g., IE11 and Safari) or ensure that typed arrays are polyfilled\n\tif ( arguments.length === 2 ) {\n\t\tthis._buffer.copyWithin( target*2, start*2 );\n\t} else {\n\t\tthis._buffer.copyWithin( target*2, start*2, arguments[2]*2 );\n\t}\n\treturn this;\n});\n\n/**\n* Returns an iterator for iterating over array key-value pairs.\n*\n* @name entries\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Iterator} iterator\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n*\n* var arr = [\n* new Complex64( 1.0, 1.0 ),\n* new Complex64( 2.0, 2.0 ),\n* new Complex64( 3.0, 3.0 )\n* ];\n* arr = new Complex64Array( arr );\n*\n* // Create an iterator:\n* var it = arr.entries();\n*\n* // Iterate over the key-value pairs...\n* var v = it.next().value;\n* // returns [ 0, ]\n*\n* v = it.next().value;\n* // returns [ 1, ]\n*\n* v = it.next().value;\n* // returns [ 2, ]\n*\n* var bool = it.next().done;\n* // returns true\n*/\nsetReadOnly( Complex64Array.prototype, 'entries', function entries() {\n\tvar buffer;\n\tvar self;\n\tvar iter;\n\tvar len;\n\tvar FLG;\n\tvar i;\n\tvar j;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tself = this;\n\tbuffer = this._buffer;\n\tlen = this._length;\n\n\t// Initialize the iteration indices:\n\ti = -1;\n\tj = -2;\n\n\t// Create an iterator protocol-compliant object:\n\titer = {};\n\tsetReadOnly( iter, 'next', next );\n\tsetReadOnly( iter, 'return', end );\n\n\tif ( ITERATOR_SYMBOL ) {\n\t\tsetReadOnly( iter, ITERATOR_SYMBOL, factory );\n\t}\n\treturn iter;\n\n\t/**\n\t* Returns an iterator protocol-compliant object containing the next iterated value.\n\t*\n\t* @private\n\t* @returns {Object} iterator protocol-compliant object\n\t*/\n\tfunction next() {\n\t\tvar z;\n\t\ti += 1;\n\t\tif ( FLG || i >= len ) {\n\t\t\treturn {\n\t\t\t\t'done': true\n\t\t\t};\n\t\t}\n\t\tj += 2;\n\t\tz = new Complex64( buffer[ j ], buffer[ j+1 ] );\n\t\treturn {\n\t\t\t'value': [ i, z ],\n\t\t\t'done': false\n\t\t};\n\t}\n\n\t/**\n\t* Finishes an iterator.\n\t*\n\t* @private\n\t* @param {*} [value] - value to return\n\t* @returns {Object} iterator protocol-compliant object\n\t*/\n\tfunction end( value ) {\n\t\tFLG = true;\n\t\tif ( arguments.length ) {\n\t\t\treturn {\n\t\t\t\t'value': value,\n\t\t\t\t'done': true\n\t\t\t};\n\t\t}\n\t\treturn {\n\t\t\t'done': true\n\t\t};\n\t}\n\n\t/**\n\t* Returns a new iterator.\n\t*\n\t* @private\n\t* @returns {Iterator} iterator\n\t*/\n\tfunction factory() {\n\t\treturn self.entries();\n\t}\n});\n\n/**\n* Returns an array element.\n*\n* @name get\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {NonNegativeInteger} idx - element index\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} must provide a nonnegative integer\n* @returns {(Complex64|void)} array element\n*\n* @example\n* var arr = new Complex64Array( 10 );\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* var z = arr.get( 0 );\n* // returns \n*\n* var re = realf( z );\n* // returns 0.0\n*\n* var im = imagf( z );\n* // returns 0.0\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n*\n* z = arr.get( 0 );\n* // returns \n*\n* re = realf( z );\n* // returns 1.0\n*\n* im = imagf( z );\n* // returns -1.0\n*\n* z = arr.get( 100 );\n* // returns undefined\n*/\nsetReadOnly( Complex64Array.prototype, 'get', function get( idx ) {\n\tvar buf;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isNonNegativeInteger( idx ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Must provide a nonnegative integer. Value: `%s`.', idx ) );\n\t}\n\tif ( idx >= this._length ) {\n\t\treturn;\n\t}\n\tbuf = this._buffer;\n\tidx *= 2;\n\treturn new Complex64( buf[ idx ], buf[ idx+1 ] );\n});\n\n/**\n* Number of array elements.\n*\n* @name length\n* @memberof Complex64Array.prototype\n* @readonly\n* @type {NonNegativeInteger}\n*\n* @example\n* var arr = new Complex64Array( 10 );\n*\n* var len = arr.length;\n* // returns 10\n*/\nsetReadOnlyAccessor( Complex64Array.prototype, 'length', function get() {\n\treturn this._length;\n});\n\n/**\n* Sets an array element.\n*\n* ## Notes\n*\n* - When provided a typed array, real or complex, we must check whether the source array shares the same buffer as the target array and whether the underlying memory overlaps. In particular, we are concerned with the following scenario:\n*\n* ```text\n* buf: ---------------------\n* src: ---------------------\n* ```\n*\n* In the above, as we copy values from `src`, we will overwrite values in the `src` view, resulting in duplicated values copied into the end of `buf`, which is not intended. Hence, to avoid overwriting source values, we must **copy** source values to a temporary array.\n*\n* In the other overlapping scenario,\n*\n* ```text\n* buf: ---------------------\n* src: ---------------------\n* ```\n*\n* by the time we begin copying into the overlapping region, we are copying from the end of `src`, a non-overlapping region, which means we don't run the risk of copying copied values, rather than the original `src` values as intended.\n*\n*\n* @name set\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {(Collection|Complex|ComplexArray)} value - value(s)\n* @param {NonNegativeInteger} [i=0] - element index at which to start writing values\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be either a complex number, an array-like object, or a complex number array\n* @throws {TypeError} index argument must be a nonnegative integer\n* @throws {RangeError} array-like objects must have a length which is a multiple of two\n* @throws {RangeError} index argument is out-of-bounds\n* @throws {RangeError} target array lacks sufficient storage to accommodate source values\n* @returns {void}\n*\n* @example\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* var arr = new Complex64Array( 10 );\n*\n* var z = arr.get( 0 );\n* // returns \n*\n* var re = realf( z );\n* // returns 0.0\n*\n* var im = imagf( z );\n* // returns 0.0\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n*\n* z = arr.get( 0 );\n* // returns \n*\n* re = realf( z );\n* // returns 1.0\n*\n* im = imagf( z );\n* // returns -1.0\n*/\nsetReadOnly( Complex64Array.prototype, 'set', function set( value ) {\n\t/* eslint-disable no-underscore-dangle */\n\tvar sbuf;\n\tvar idx;\n\tvar buf;\n\tvar tmp;\n\tvar flg;\n\tvar N;\n\tvar v;\n\tvar i;\n\tvar j;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tbuf = this._buffer;\n\tif ( arguments.length > 1 ) {\n\t\tidx = arguments[ 1 ];\n\t\tif ( !isNonNegativeInteger( idx ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Index argument must be a nonnegative integer. Value: `%s`.', idx ) );\n\t\t}\n\t} else {\n\t\tidx = 0;\n\t}\n\tif ( isComplexLike( value ) ) {\n\t\tif ( idx >= this._length ) {\n\t\t\tthrow new RangeError( format( 'invalid argument. Index argument is out-of-bounds. Value: `%u`.', idx ) );\n\t\t}\n\t\tidx *= 2;\n\t\tbuf[ idx ] = realf( value );\n\t\tbuf[ idx+1 ] = imagf( value );\n\t\treturn;\n\t}\n\tif ( isComplexArray( value ) ) {\n\t\tN = value._length;\n\t\tif ( idx+N > this._length ) {\n\t\t\tthrow new RangeError( 'invalid arguments. Target array lacks sufficient storage to accommodate source values.' );\n\t\t}\n\t\tsbuf = value._buffer;\n\n\t\t// Check for overlapping memory...\n\t\tj = buf.byteOffset + (idx*BYTES_PER_ELEMENT);\n\t\tif (\n\t\t\tsbuf.buffer === buf.buffer &&\n\t\t\t(\n\t\t\t\tsbuf.byteOffset < j &&\n\t\t\t\tsbuf.byteOffset+sbuf.byteLength > j\n\t\t\t)\n\t\t) {\n\t\t\t// We need to copy source values...\n\t\t\ttmp = new Float32Array( sbuf.length );\n\t\t\tfor ( i = 0; i < sbuf.length; i++ ) {\n\t\t\t\ttmp[ i ] = sbuf[ i ];\n\t\t\t}\n\t\t\tsbuf = tmp;\n\t\t}\n\t\tidx *= 2;\n\t\tj = 0;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\tbuf[ idx ] = sbuf[ j ];\n\t\t\tbuf[ idx+1 ] = sbuf[ j+1 ];\n\t\t\tidx += 2; // stride\n\t\t\tj += 2; // stride\n\t\t}\n\t\treturn;\n\t}\n\tif ( isCollection( value ) ) {\n\t\t// Detect whether we've been provided an array of complex numbers...\n\t\tN = value.length;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\tif ( !isComplexLike( value[ i ] ) ) {\n\t\t\t\tflg = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t// If an array does not contain only complex numbers, then we assume interleaved real and imaginary components...\n\t\tif ( flg ) {\n\t\t\tif ( !isEven( N ) ) {\n\t\t\t\tthrow new RangeError( format( 'invalid argument. Array-like object arguments must have a length which is a multiple of two. Length: `%u`.', N ) );\n\t\t\t}\n\t\t\tif ( idx+(N/2) > this._length ) {\n\t\t\t\tthrow new RangeError( 'invalid arguments. Target array lacks sufficient storage to accommodate source values.' );\n\t\t\t}\n\t\t\tsbuf = value;\n\n\t\t\t// Check for overlapping memory...\n\t\t\tj = buf.byteOffset + (idx*BYTES_PER_ELEMENT);\n\t\t\tif (\n\t\t\t\tsbuf.buffer === buf.buffer &&\n\t\t\t\t(\n\t\t\t\t\tsbuf.byteOffset < j &&\n\t\t\t\t\tsbuf.byteOffset+sbuf.byteLength > j\n\t\t\t\t)\n\t\t\t) {\n\t\t\t\t// We need to copy source values...\n\t\t\t\ttmp = new Float32Array( N );\n\t\t\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\t\t\ttmp[ i ] = sbuf[ i ];\n\t\t\t\t}\n\t\t\t\tsbuf = tmp;\n\t\t\t}\n\t\t\tidx *= 2;\n\t\t\tN /= 2;\n\t\t\tj = 0;\n\t\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\t\tbuf[ idx ] = sbuf[ j ];\n\t\t\t\tbuf[ idx+1 ] = sbuf[ j+1 ];\n\t\t\t\tidx += 2; // stride\n\t\t\t\tj += 2; // stride\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\t// If an array contains only complex numbers, then we need to extract real and imaginary components...\n\t\tif ( idx+N > this._length ) {\n\t\t\tthrow new RangeError( 'invalid arguments. Target array lacks sufficient storage to accommodate source values.' );\n\t\t}\n\t\tidx *= 2;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\tv = value[ i ];\n\t\t\tbuf[ idx ] = realf( v );\n\t\t\tbuf[ idx+1 ] = imagf( v );\n\t\t\tidx += 2; // stride\n\t\t}\n\t\treturn;\n\t}\n\tthrow new TypeError( format( 'invalid argument. First argument must be either a complex number, an array-like object, or a complex number array. Value: `%s`.', value ) );\n\n\t/* eslint-enable no-underscore-dangle */\n});\n\n\n// EXPORTS //\n\nexport default Complex64Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Returns the real component of a double-precision complex floating-point number.\n*\n* @param {Complex} z - complex number\n* @returns {number} real component\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n*\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var re = real( z );\n* // returns 5.0\n*/\nfunction real( z ) {\n\treturn z.re;\n}\n\n\n// EXPORTS //\n\nexport default real;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Returns the imaginary component of a double-precision complex floating-point number.\n*\n* @param {Complex} z - complex number\n* @returns {number} imaginary component\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n*\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var im = imag( z );\n* // returns 3.0\n*/\nfunction imag( z ) {\n\treturn z.im;\n}\n\n\n// EXPORTS //\n\nexport default imag;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isArrayLikeObject from '@stdlib/assert-is-array-like-object';\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport format from '@stdlib/string-format';\nimport real from '@stdlib/complex-real';\nimport imag from '@stdlib/complex-imag';\n\n\n// MAIN //\n\n/**\n* Returns an array of iterated values.\n*\n* @private\n* @param {Object} it - iterator\n* @returns {(Array|TypeError)} array or an error\n*/\nfunction fromIterator( it ) {\n\tvar out;\n\tvar v;\n\tvar z;\n\n\tout = [];\n\twhile ( true ) {\n\t\tv = it.next();\n\t\tif ( v.done ) {\n\t\t\tbreak;\n\t\t}\n\t\tz = v.value;\n\t\tif ( isArrayLikeObject( z ) && z.length >= 2 ) {\n\t\t\tout.push( z[ 0 ], z[ 1 ] );\n\t\t} else if ( isComplexLike( z ) ) {\n\t\t\tout.push( real( z ), imag( z ) );\n\t\t} else {\n\t\t\treturn new TypeError( format( 'invalid argument. An iterator must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', z ) );\n\t\t}\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default fromIterator;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isArrayLikeObject from '@stdlib/assert-is-array-like-object';\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport format from '@stdlib/string-format';\nimport real from '@stdlib/complex-real';\nimport imag from '@stdlib/complex-imag';\n\n\n// MAIN //\n\n/**\n* Returns an array of iterated values.\n*\n* @private\n* @param {Object} it - iterator\n* @param {Function} clbk - callback to invoke for each iterated value\n* @param {*} thisArg - invocation context\n* @returns {(Array|TypeError)} array or an error\n*/\nfunction fromIteratorMap( it, clbk, thisArg ) {\n\tvar out;\n\tvar v;\n\tvar z;\n\tvar i;\n\n\tout = [];\n\ti = -1;\n\twhile ( true ) {\n\t\tv = it.next();\n\t\tif ( v.done ) {\n\t\t\tbreak;\n\t\t}\n\t\ti += 1;\n\t\tz = clbk.call( thisArg, v.value, i );\n\t\tif ( isArrayLikeObject( z ) && z.length >= 2 ) {\n\t\t\tout.push( z[ 0 ], z[ 1 ] );\n\t\t} else if ( isComplexLike( z ) ) {\n\t\t\tout.push( real( z ), imag( z ) );\n\t\t} else {\n\t\t\treturn new TypeError( format( 'invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', z ) );\n\t\t}\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default fromIteratorMap;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport real from '@stdlib/complex-real';\nimport imag from '@stdlib/complex-imag';\n\n\n// MAIN //\n\n/**\n* Returns a strided array of real and imaginary components.\n*\n* @private\n* @param {Float64Array} buf - output array\n* @param {Array} arr - array containing complex numbers\n* @returns {(Float64Array|null)} output array or null\n*/\nfunction fromArray( buf, arr ) {\n\tvar len;\n\tvar v;\n\tvar i;\n\tvar j;\n\n\tlen = arr.length;\n\tj = 0;\n\tfor ( i = 0; i < len; i++ ) {\n\t\tv = arr[ i ];\n\t\tif ( !isComplexLike( v ) ) {\n\t\t\treturn null;\n\t\t}\n\t\tbuf[ j ] = real( v );\n\t\tbuf[ j+1 ] = imag( v );\n\t\tj += 2; // stride\n\t}\n\treturn buf;\n}\n\n\n// EXPORTS //\n\nexport default fromArray;\n","/* eslint-disable no-restricted-syntax, max-lines, no-invalid-this */\n\n/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isNonNegativeInteger } from '@stdlib/assert-is-nonnegative-integer';\nimport isArrayLikeObject from '@stdlib/assert-is-array-like-object';\nimport isCollection from '@stdlib/assert-is-collection';\nimport isArrayBuffer from '@stdlib/assert-is-arraybuffer';\nimport isObject from '@stdlib/assert-is-object';\nimport isArray from '@stdlib/assert-is-array';\nimport isFunction from '@stdlib/assert-is-function';\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport isEven from '@stdlib/math-base-assert-is-even';\nimport isInteger from '@stdlib/math-base-assert-is-integer';\nimport hasIteratorSymbolSupport from '@stdlib/assert-has-iterator-symbol-support';\nimport ITERATOR_SYMBOL from '@stdlib/symbol-iterator';\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport setReadOnlyAccessor from '@stdlib/utils-define-nonenumerable-read-only-accessor';\nimport Float64Array from '@stdlib/array-float64';\nimport Complex128 from '@stdlib/complex-float64';\nimport real from '@stdlib/complex-real';\nimport imag from '@stdlib/complex-imag';\nimport reinterpret64 from '@stdlib/strided-base-reinterpret-complex64';\nimport reinterpret128 from '@stdlib/strided-base-reinterpret-complex128';\nimport getter from '@stdlib/array-base-getter';\nimport accessorGetter from '@stdlib/array-base-accessor-getter';\nimport format from '@stdlib/string-format';\nimport fromIterator from './from_iterator.js';\nimport fromIteratorMap from './from_iterator_map.js';\nimport fromArray from './from_array.js';\n\n\n// VARIABLES //\n\nvar BYTES_PER_ELEMENT = Float64Array.BYTES_PER_ELEMENT * 2;\nvar HAS_ITERATOR_SYMBOL = hasIteratorSymbolSupport();\n\n\n// FUNCTIONS //\n\n/**\n* Returns a boolean indicating if a value is a complex typed array.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a complex typed array\n*/\nfunction isComplexArray( value ) {\n\treturn (\n\t\tvalue instanceof Complex128Array ||\n\t\t(\n\t\t\ttypeof value === 'object' &&\n\t\t\tvalue !== null &&\n\t\t\t(\n\t\t\t\tvalue.constructor.name === 'Complex64Array' ||\n\t\t\t\tvalue.constructor.name === 'Complex128Array'\n\t\t\t) &&\n\t\t\ttypeof value._length === 'number' && // eslint-disable-line no-underscore-dangle\n\n\t\t\t// NOTE: we don't perform a more rigorous test here for a typed array for performance reasons, as robustly checking for a typed array instance could require walking the prototype tree and performing relatively expensive constructor checks...\n\t\t\ttypeof value._buffer === 'object' // eslint-disable-line no-underscore-dangle\n\t\t)\n\t);\n}\n\n/**\n* Returns a boolean indicating if a value is a complex typed array constructor.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a complex typed array constructor\n*/\nfunction isComplexArrayConstructor( value ) {\n\treturn (\n\t\tvalue === Complex128Array ||\n\n\t\t// NOTE: weaker test in order to avoid a circular dependency with Complex64Array...\n\t\tvalue.name === 'Complex64Array'\n\t);\n}\n\n/**\n* Returns a boolean indicating if a value is a `Complex64Array`.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a `Complex64Array`\n*/\nfunction isComplex64Array( value ) {\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\tvalue.constructor.name === 'Complex64Array' &&\n\t\tvalue.BYTES_PER_ELEMENT === BYTES_PER_ELEMENT/2\n\t);\n}\n\n/**\n* Returns a boolean indicating if a value is a `Complex128Array`.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a `Complex128Array`\n*/\nfunction isComplex128Array( value ) {\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\tvalue.constructor.name === 'Complex128Array' &&\n\t\tvalue.BYTES_PER_ELEMENT === BYTES_PER_ELEMENT\n\t);\n}\n\n\n// MAIN //\n\n/**\n* 128-bit complex number array constructor.\n*\n* @constructor\n* @param {(NonNegativeInteger|Collection|ArrayBuffer|Iterable)} [arg] - length, typed array, array-like object, buffer, or iterable\n* @param {NonNegativeInteger} [byteOffset=0] - byte offset\n* @param {NonNegativeInteger} [length] - view length\n* @throws {RangeError} ArrayBuffer byte length must be a multiple of `16`\n* @throws {RangeError} array-like object and typed array input arguments must have a length which is a multiple of two\n* @throws {TypeError} if provided only a single argument, must provide a valid argument\n* @throws {TypeError} byte offset must be a nonnegative integer\n* @throws {RangeError} byte offset must be a multiple of `16`\n* @throws {TypeError} view length must be a positive multiple of `16`\n* @throws {RangeError} must provide sufficient memory to accommodate byte offset and view length requirements\n* @throws {TypeError} an iterator must return either a two element array containing real and imaginary components or a complex number\n* @returns {Complex128Array} complex number array\n*\n* @example\n* var arr = new Complex128Array();\n* // returns \n*\n* var len = arr.length;\n* // returns 0\n*\n* @example\n* var arr = new Complex128Array( 2 );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*\n* @example\n* var arr = new Complex128Array( [ 1.0, -1.0 ] );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* import ArrayBuffer from '@stdlib/array-buffer';\n*\n* var buf = new ArrayBuffer( 32 );\n* var arr = new Complex128Array( buf );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*\n* @example\n* import ArrayBuffer from '@stdlib/array-buffer';\n*\n* var buf = new ArrayBuffer( 32 );\n* var arr = new Complex128Array( buf, 16 );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* import ArrayBuffer from '@stdlib/array-buffer';\n*\n* var buf = new ArrayBuffer( 64 );\n* var arr = new Complex128Array( buf, 16, 2 );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*/\nfunction Complex128Array() {\n\tvar byteOffset;\n\tvar nargs;\n\tvar buf;\n\tvar len;\n\n\tnargs = arguments.length;\n\tif ( !(this instanceof Complex128Array) ) {\n\t\tif ( nargs === 0 ) {\n\t\t\treturn new Complex128Array();\n\t\t}\n\t\tif ( nargs === 1 ) {\n\t\t\treturn new Complex128Array( arguments[0] );\n\t\t}\n\t\tif ( nargs === 2 ) {\n\t\t\treturn new Complex128Array( arguments[0], arguments[1] );\n\t\t}\n\t\treturn new Complex128Array( arguments[0], arguments[1], arguments[2] );\n\t}\n\t// Create the underlying data buffer...\n\tif ( nargs === 0 ) {\n\t\tbuf = new Float64Array( 0 ); // backward-compatibility\n\t} else if ( nargs === 1 ) {\n\t\tif ( isNonNegativeInteger( arguments[0] ) ) {\n\t\t\tbuf = new Float64Array( arguments[0]*2 );\n\t\t} else if ( isCollection( arguments[0] ) ) {\n\t\t\tbuf = arguments[ 0 ];\n\t\t\tlen = buf.length;\n\n\t\t\t// If provided a \"generic\" array, peak at the first value, and, if the value is a complex number, try to process as an array of complex numbers, falling back to \"normal\" typed array initialization if we fail and ensuring consistency if the first value had not been a complex number...\n\t\t\tif ( len && isArray( buf ) && isComplexLike( buf[0] ) ) {\n\t\t\t\tbuf = fromArray( new Float64Array( len*2 ), buf );\n\t\t\t\tif ( buf === null ) {\n\t\t\t\t\t// We failed and we are now forced to allocate a new array :-(\n\t\t\t\t\tif ( !isEven( len ) ) {\n\t\t\t\t\t\tthrow new RangeError( format( 'invalid argument. Array-like object arguments must have a length which is a multiple of two. Length: `%u`.', len ) );\n\t\t\t\t\t}\n\t\t\t\t\t// We failed, so fall back to directly setting values...\n\t\t\t\t\tbuf = new Float64Array( arguments[0] );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ( isComplex64Array( buf ) ) {\n\t\t\t\t\tbuf = reinterpret64( buf, 0 );\n\t\t\t\t} else if ( isComplex128Array( buf ) ) {\n\t\t\t\t\tbuf = reinterpret128( buf, 0 );\n\t\t\t\t} else if ( !isEven( len ) ) {\n\t\t\t\t\tthrow new RangeError( format( 'invalid argument. Array-like object and typed array arguments must have a length which is a multiple of two. Length: `%u`.', len ) );\n\t\t\t\t}\n\t\t\t\tbuf = new Float64Array( buf );\n\t\t\t}\n\t\t} else if ( isArrayBuffer( arguments[0] ) ) {\n\t\t\tbuf = arguments[ 0 ];\n\t\t\tif ( !isInteger( buf.byteLength/BYTES_PER_ELEMENT ) ) {\n\t\t\t\tthrow new RangeError( format( 'invalid argument. ArrayBuffer byte length must be a multiple of %u. Byte length: `%u`.', BYTES_PER_ELEMENT, buf.byteLength ) );\n\t\t\t}\n\t\t\tbuf = new Float64Array( buf );\n\t\t} else if ( isObject( arguments[0] ) ) {\n\t\t\tbuf = arguments[ 0 ];\n\t\t\tif ( HAS_ITERATOR_SYMBOL === false ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Environment lacks Symbol.iterator support. Must provide a length, ArrayBuffer, typed array, or array-like object. Value: `%s`.', buf ) );\n\t\t\t}\n\t\t\tif ( !isFunction( buf[ ITERATOR_SYMBOL ] ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.', buf ) );\n\t\t\t}\n\t\t\tbuf = buf[ ITERATOR_SYMBOL ]();\n\t\t\tif ( !isFunction( buf.next ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.', buf ) );\n\t\t\t}\n\t\t\tbuf = fromIterator( buf );\n\t\t\tif ( buf instanceof Error ) {\n\t\t\t\tthrow buf;\n\t\t\t}\n\t\t\tbuf = new Float64Array( buf );\n\t\t} else {\n\t\t\tthrow new TypeError( format( 'invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.', arguments[0] ) );\n\t\t}\n\t} else {\n\t\tbuf = arguments[ 0 ];\n\t\tif ( !isArrayBuffer( buf ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. First argument must be an ArrayBuffer. Value: `%s`.', buf ) );\n\t\t}\n\t\tbyteOffset = arguments[ 1 ];\n\t\tif ( !isNonNegativeInteger( byteOffset ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Byte offset must be a nonnegative integer. Value: `%s`.', byteOffset ) );\n\t\t}\n\t\tif ( !isInteger( byteOffset/BYTES_PER_ELEMENT ) ) {\n\t\t\tthrow new RangeError( format( 'invalid argument. Byte offset must be a multiple of %u. Value: `%u`.', BYTES_PER_ELEMENT, byteOffset ) );\n\t\t}\n\t\tif ( nargs === 2 ) {\n\t\t\tlen = buf.byteLength - byteOffset;\n\t\t\tif ( !isInteger( len/BYTES_PER_ELEMENT ) ) {\n\t\t\t\tthrow new RangeError( format( 'invalid arguments. ArrayBuffer view byte length must be a multiple of %u. View byte length: `%u`.', BYTES_PER_ELEMENT, len ) );\n\t\t\t}\n\t\t\tbuf = new Float64Array( buf, byteOffset );\n\t\t} else {\n\t\t\tlen = arguments[ 2 ];\n\t\t\tif ( !isNonNegativeInteger( len ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Length must be a nonnegative integer. Value: `%s`.', len ) );\n\t\t\t}\n\t\t\tif ( (len*BYTES_PER_ELEMENT) > (buf.byteLength-byteOffset) ) {\n\t\t\t\tthrow new RangeError( format( 'invalid arguments. ArrayBuffer has insufficient capacity. Either decrease the array length or provide a bigger buffer. Minimum capacity: `%u`.', len*BYTES_PER_ELEMENT ) );\n\t\t\t}\n\t\t\tbuf = new Float64Array( buf, byteOffset, len*2 );\n\t\t}\n\t}\n\tsetReadOnly( this, '_buffer', buf );\n\tsetReadOnly( this, '_length', buf.length/2 );\n\n\treturn this;\n}\n\n/**\n* Size (in bytes) of each array element.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex128Array\n* @readonly\n* @type {PositiveInteger}\n* @default 16\n*\n* @example\n* var nbytes = Complex128Array.BYTES_PER_ELEMENT;\n* // returns 16\n*/\nsetReadOnly( Complex128Array, 'BYTES_PER_ELEMENT', BYTES_PER_ELEMENT );\n\n/**\n* Constructor name.\n*\n* @name name\n* @memberof Complex128Array\n* @readonly\n* @type {string}\n* @default 'Complex128Array'\n*\n* @example\n* var name = Complex128Array.name;\n* // returns 'Complex128Array'\n*/\nsetReadOnly( Complex128Array, 'name', 'Complex128Array' );\n\n/**\n* Creates a new 128-bit complex number array from an array-like object or an iterable.\n*\n* @name from\n* @memberof Complex128Array\n* @type {Function}\n* @param {(Collection|Object)} src - array-like object or iterable\n* @param {Function} [clbk] - callback to invoke for each source element\n* @param {*} [thisArg] - context\n* @throws {TypeError} `this` context must be a constructor\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be an array-like object or an iterable\n* @throws {TypeError} second argument must be a function\n* @throws {RangeError} array-like objects must have a length which is a multiple of two\n* @throws {TypeError} an iterator must return either a two element array containing real and imaginary components or a complex number\n* @throws {TypeError} when provided an iterator, a callback must return either a two element array containing real and imaginary components or a complex number\n* @returns {Complex128Array} 128-bit complex number array\n*\n* @example\n* var arr = Complex128Array.from( [ 1.0, -1.0 ] );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n*\n* var arr = Complex128Array.from( [ new Complex128( 1.0, 1.0 ) ] );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* function clbk( v ) {\n* return new Complex128( real(v)*2.0, imag(v)*2.0 );\n* }\n*\n* var arr = Complex128Array.from( [ new Complex128( 1.0, 1.0 ) ], clbk );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*/\nsetReadOnly( Complex128Array, 'from', function from( src ) {\n\tvar thisArg;\n\tvar nargs;\n\tvar clbk;\n\tvar out;\n\tvar buf;\n\tvar tmp;\n\tvar get;\n\tvar len;\n\tvar flg;\n\tvar v;\n\tvar i;\n\tvar j;\n\tif ( !isFunction( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` context must be a constructor.' );\n\t}\n\tif ( !isComplexArrayConstructor( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tnargs = arguments.length;\n\tif ( nargs > 1 ) {\n\t\tclbk = arguments[ 1 ];\n\t\tif ( !isFunction( clbk ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be a function. Value: `%s`.', clbk ) );\n\t\t}\n\t\tif ( nargs > 2 ) {\n\t\t\tthisArg = arguments[ 2 ];\n\t\t}\n\t}\n\tif ( isComplexArray( src ) ) {\n\t\tlen = src.length;\n\t\tif ( clbk ) {\n\t\t\tout = new this( len );\n\t\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\t\tj = 0;\n\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\tv = clbk.call( thisArg, src.get( i ), i );\n\t\t\t\tif ( isComplexLike( v ) ) {\n\t\t\t\t\tbuf[ j ] = real( v );\n\t\t\t\t\tbuf[ j+1 ] = imag( v );\n\t\t\t\t} else if ( isArrayLikeObject( v ) && v.length >= 2 ) {\n\t\t\t\t\tbuf[ j ] = v[ 0 ];\n\t\t\t\t\tbuf[ j+1 ] = v[ 1 ];\n\t\t\t\t} else {\n\t\t\t\t\tthrow new TypeError( format( 'invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', v ) );\n\t\t\t\t}\n\t\t\t\tj += 2; // stride\n\t\t\t}\n\t\t\treturn out;\n\t\t}\n\t\treturn new this( src );\n\t}\n\tif ( isCollection( src ) ) {\n\t\tif ( clbk ) {\n\t\t\t// Note: array contents affect how we iterate over a provided data source. If only complex number objects, we can extract real and imaginary components. Otherwise, for non-complex number arrays (e.g., `Float64Array`, etc), we assume a strided array where real and imaginary components are interleaved. In the former case, we expect a callback to return real and imaginary components (possibly as a complex number). In the latter case, we expect a callback to return *either* a real or imaginary component.\n\n\t\t\tlen = src.length;\n\t\t\tif ( src.get && src.set ) {\n\t\t\t\tget = accessorGetter( 'default' );\n\t\t\t} else {\n\t\t\t\tget = getter( 'default' );\n\t\t\t}\n\t\t\t// Detect whether we've been provided an array which returns complex number objects...\n\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\tif ( !isComplexLike( get( src, i ) ) ) {\n\t\t\t\t\tflg = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// If an array does not contain only complex number objects, then we assume interleaved real and imaginary components...\n\t\t\tif ( flg ) {\n\t\t\t\tif ( !isEven( len ) ) {\n\t\t\t\t\tthrow new RangeError( format( 'invalid argument. First argument must have a length which is a multiple of two. Length: `%u`.', len ) );\n\t\t\t\t}\n\t\t\t\tout = new this( len/2 );\n\t\t\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\t\tbuf[ i ] = clbk.call( thisArg, get( src, i ), i );\n\t\t\t\t}\n\t\t\t\treturn out;\n\t\t\t}\n\t\t\t// If an array contains only complex number objects, then we need to extract real and imaginary components...\n\t\t\tout = new this( len );\n\t\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\t\tj = 0;\n\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\tv = clbk.call( thisArg, get( src, i ), i );\n\t\t\t\tif ( isComplexLike( v ) ) {\n\t\t\t\t\tbuf[ j ] = real( v );\n\t\t\t\t\tbuf[ j+1 ] = imag( v );\n\t\t\t\t} else if ( isArrayLikeObject( v ) && v.length >= 2 ) {\n\t\t\t\t\tbuf[ j ] = v[ 0 ];\n\t\t\t\t\tbuf[ j+1 ] = v[ 1 ];\n\t\t\t\t} else {\n\t\t\t\t\tthrow new TypeError( format( 'invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', v ) );\n\t\t\t\t}\n\t\t\t\tj += 2; // stride\n\t\t\t}\n\t\t\treturn out;\n\t\t}\n\t\treturn new this( src );\n\t}\n\tif ( isObject( src ) && HAS_ITERATOR_SYMBOL && isFunction( src[ ITERATOR_SYMBOL ] ) ) { // eslint-disable-line max-len\n\t\tbuf = src[ ITERATOR_SYMBOL ]();\n\t\tif ( !isFunction( buf.next ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.', src ) );\n\t\t}\n\t\tif ( clbk ) {\n\t\t\ttmp = fromIteratorMap( buf, clbk, thisArg );\n\t\t} else {\n\t\t\ttmp = fromIterator( buf );\n\t\t}\n\t\tif ( tmp instanceof Error ) {\n\t\t\tthrow tmp;\n\t\t}\n\t\tlen = tmp.length / 2;\n\t\tout = new this( len );\n\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\tbuf[ i ] = tmp[ i ];\n\t\t}\n\t\treturn out;\n\t}\n\tthrow new TypeError( format( 'invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.', src ) );\n});\n\n/**\n* Creates a new 128-bit complex number array from a variable number of arguments.\n*\n* @name of\n* @memberof Complex128Array\n* @type {Function}\n* @param {...*} element - array elements\n* @throws {TypeError} `this` context must be a constructor\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Complex128Array} 128-bit complex number array\n*\n* @example\n* var arr = Complex128Array.of( 1.0, 1.0, 1.0, 1.0 );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*/\nsetReadOnly( Complex128Array, 'of', function of() {\n\tvar args;\n\tvar i;\n\tif ( !isFunction( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` context must be a constructor.' );\n\t}\n\tif ( !isComplexArrayConstructor( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\targs = [];\n\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\targs.push( arguments[ i ] );\n\t}\n\treturn new this( args );\n});\n\n/**\n* Pointer to the underlying data buffer.\n*\n* @name buffer\n* @memberof Complex128Array.prototype\n* @readonly\n* @type {ArrayBuffer}\n*\n* @example\n* var arr = new Complex128Array( 10 );\n*\n* var buf = arr.buffer;\n* // returns \n*/\nsetReadOnlyAccessor( Complex128Array.prototype, 'buffer', function get() {\n\treturn this._buffer.buffer;\n});\n\n/**\n* Size (in bytes) of the array.\n*\n* @name byteLength\n* @memberof Complex128Array.prototype\n* @readonly\n* @type {NonNegativeInteger}\n*\n* @example\n* var arr = new Complex128Array( 10 );\n*\n* var byteLength = arr.byteLength;\n* // returns 160\n*/\nsetReadOnlyAccessor( Complex128Array.prototype, 'byteLength', function get() {\n\treturn this._buffer.byteLength;\n});\n\n/**\n* Offset (in bytes) of the array from the start of its underlying `ArrayBuffer`.\n*\n* @name byteOffset\n* @memberof Complex128Array.prototype\n* @readonly\n* @type {NonNegativeInteger}\n*\n* @example\n* var arr = new Complex128Array( 10 );\n*\n* var byteOffset = arr.byteOffset;\n* // returns 0\n*/\nsetReadOnlyAccessor( Complex128Array.prototype, 'byteOffset', function get() {\n\treturn this._buffer.byteOffset;\n});\n\n/**\n* Size (in bytes) of each array element.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex128Array.prototype\n* @readonly\n* @type {PositiveInteger}\n* @default 16\n*\n* @example\n* var arr = new Complex128Array( 10 );\n*\n* var nbytes = arr.BYTES_PER_ELEMENT;\n* // returns 16\n*/\nsetReadOnly( Complex128Array.prototype, 'BYTES_PER_ELEMENT', Complex128Array.BYTES_PER_ELEMENT );\n\n/**\n* Copies a sequence of elements within the array to the position starting at `target`.\n*\n* @name copyWithin\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {integer} target - index at which to start copying elements\n* @param {integer} start - source index at which to copy elements from\n* @param {integer} [end] - source index at which to stop copying elements from\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Complex128Array} modified array\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* var arr = new Complex128Array( 4 );\n*\n* // Set the array elements:\n* arr.set( new Complex128( 1.0, 1.0 ), 0 );\n* arr.set( new Complex128( 2.0, 2.0 ), 1 );\n* arr.set( new Complex128( 3.0, 3.0 ), 2 );\n* arr.set( new Complex128( 4.0, 4.0 ), 3 );\n*\n* // Copy the first two elements to the last two elements:\n* arr.copyWithin( 2, 0, 2 );\n*\n* // Get the last array element:\n* var z = arr.get( 3 );\n*\n* var re = real( z );\n* // returns 2.0\n*\n* var im = imag( z );\n* // returns 2.0\n*/\nsetReadOnly( Complex128Array.prototype, 'copyWithin', function copyWithin( target, start ) {\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\t// FIXME: prefer a functional `copyWithin` implementation which addresses lack of universal browser support (e.g., IE11 and Safari) or ensure that typed arrays are polyfilled\n\tif ( arguments.length === 2 ) {\n\t\tthis._buffer.copyWithin( target*2, start*2 );\n\t} else {\n\t\tthis._buffer.copyWithin( target*2, start*2, arguments[2]*2 );\n\t}\n\treturn this;\n});\n\n/**\n* Returns an iterator for iterating over array key-value pairs.\n*\n* @name entries\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Iterator} iterator\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n*\n* var arr = [\n* new Complex128( 1.0, 1.0 ),\n* new Complex128( 2.0, 2.0 ),\n* new Complex128( 3.0, 3.0 )\n* ];\n* arr = new Complex128Array( arr );\n*\n* // Create an iterator:\n* var it = arr.entries();\n*\n* // Iterate over the key-value pairs...\n* var v = it.next().value;\n* // returns [ 0, ]\n*\n* v = it.next().value;\n* // returns [ 1, ]\n*\n* v = it.next().value;\n* // returns [ 2, ]\n*\n* var bool = it.next().done;\n* // returns true\n*/\nsetReadOnly( Complex128Array.prototype, 'entries', function entries() {\n\tvar buffer;\n\tvar self;\n\tvar iter;\n\tvar len;\n\tvar FLG;\n\tvar i;\n\tvar j;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tself = this;\n\tbuffer = this._buffer;\n\tlen = this._length;\n\n\t// Initialize the iteration indices:\n\ti = -1;\n\tj = -2;\n\n\t// Create an iterator protocol-compliant object:\n\titer = {};\n\tsetReadOnly( iter, 'next', next );\n\tsetReadOnly( iter, 'return', end );\n\n\tif ( ITERATOR_SYMBOL ) {\n\t\tsetReadOnly( iter, ITERATOR_SYMBOL, factory );\n\t}\n\treturn iter;\n\n\t/**\n\t* Returns an iterator protocol-compliant object containing the next iterated value.\n\t*\n\t* @private\n\t* @returns {Object} iterator protocol-compliant object\n\t*/\n\tfunction next() {\n\t\tvar z;\n\t\ti += 1;\n\t\tif ( FLG || i >= len ) {\n\t\t\treturn {\n\t\t\t\t'done': true\n\t\t\t};\n\t\t}\n\t\tj += 2;\n\t\tz = new Complex128( buffer[ j ], buffer[ j+1 ] );\n\t\treturn {\n\t\t\t'value': [ i, z ],\n\t\t\t'done': false\n\t\t};\n\t}\n\n\t/**\n\t* Finishes an iterator.\n\t*\n\t* @private\n\t* @param {*} [value] - value to return\n\t* @returns {Object} iterator protocol-compliant object\n\t*/\n\tfunction end( value ) {\n\t\tFLG = true;\n\t\tif ( arguments.length ) {\n\t\t\treturn {\n\t\t\t\t'value': value,\n\t\t\t\t'done': true\n\t\t\t};\n\t\t}\n\t\treturn {\n\t\t\t'done': true\n\t\t};\n\t}\n\n\t/**\n\t* Returns a new iterator.\n\t*\n\t* @private\n\t* @returns {Iterator} iterator\n\t*/\n\tfunction factory() {\n\t\treturn self.entries();\n\t}\n});\n\n/**\n* Returns an array element.\n*\n* @name get\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {NonNegativeInteger} idx - element index\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} must provide a nonnegative integer\n* @returns {(Complex128|void)} array element\n*\n* @example\n* var arr = new Complex128Array( 10 );\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* var z = arr.get( 0 );\n* // returns \n*\n* var re = real( z );\n* // returns 0.0\n*\n* var im = imag( z );\n* // returns 0.0\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n*\n* z = arr.get( 0 );\n* // returns \n*\n* re = real( z );\n* // returns 1.0\n*\n* im = imag( z );\n* // returns -1.0\n*\n* z = arr.get( 100 );\n* // returns undefined\n*/\nsetReadOnly( Complex128Array.prototype, 'get', function get( idx ) {\n\tvar buf;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isNonNegativeInteger( idx ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Must provide a nonnegative integer. Value: `%s`.', idx ) );\n\t}\n\tif ( idx >= this._length ) {\n\t\treturn;\n\t}\n\tbuf = this._buffer;\n\tidx *= 2;\n\treturn new Complex128( buf[ idx ], buf[ idx+1 ] );\n});\n\n/**\n* Number of array elements.\n*\n* @name length\n* @memberof Complex128Array.prototype\n* @readonly\n* @type {NonNegativeInteger}\n*\n* @example\n* var arr = new Complex128Array( 10 );\n*\n* var len = arr.length;\n* // returns 10\n*/\nsetReadOnlyAccessor( Complex128Array.prototype, 'length', function get() {\n\treturn this._length;\n});\n\n/**\n* Sets an array element.\n*\n* ## Notes\n*\n* - When provided a typed array, real or complex, we must check whether the source array shares the same buffer as the target array and whether the underlying memory overlaps. In particular, we are concerned with the following scenario:\n*\n* ```text\n* buf: ---------------------\n* src: ---------------------\n* ```\n*\n* In the above, as we copy values from `src`, we will overwrite values in the `src` view, resulting in duplicated values copied into the end of `buf`, which is not intended. Hence, to avoid overwriting source values, we must **copy** source values to a temporary array.\n*\n* In the other overlapping scenario,\n*\n* ```text\n* buf: ---------------------\n* src: ---------------------\n* ```\n*\n* by the time we begin copying into the overlapping region, we are copying from the end of `src`, a non-overlapping region, which means we don't run the risk of copying copied values, rather than the original `src` values as intended.\n*\n*\n* @name set\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {(Collection|Complex|ComplexArray)} value - value(s)\n* @param {NonNegativeInteger} [i=0] - element index at which to start writing values\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be either a complex number, an array-like object, or a complex number array\n* @throws {TypeError} index argument must be a nonnegative integer\n* @throws {RangeError} array-like objects must have a length which is a multiple of two\n* @throws {RangeError} index argument is out-of-bounds\n* @throws {RangeError} target array lacks sufficient storage to accommodate source values\n* @returns {void}\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* var arr = new Complex128Array( 10 );\n*\n* var z = arr.get( 0 );\n* // returns \n*\n* var re = real( z );\n* // returns 0.0\n*\n* var im = imag( z );\n* // returns 0.0\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n*\n* z = arr.get( 0 );\n* // returns \n*\n* re = real( z );\n* // returns 1.0\n*\n* im = imag( z );\n* // returns -1.0\n*/\nsetReadOnly( Complex128Array.prototype, 'set', function set( value ) {\n\t/* eslint-disable no-underscore-dangle */\n\tvar sbuf;\n\tvar idx;\n\tvar buf;\n\tvar tmp;\n\tvar flg;\n\tvar N;\n\tvar v;\n\tvar i;\n\tvar j;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tbuf = this._buffer;\n\tif ( arguments.length > 1 ) {\n\t\tidx = arguments[ 1 ];\n\t\tif ( !isNonNegativeInteger( idx ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Index argument must be a nonnegative integer. Value: `%s`.', idx ) );\n\t\t}\n\t} else {\n\t\tidx = 0;\n\t}\n\tif ( isComplexLike( value ) ) {\n\t\tif ( idx >= this._length ) {\n\t\t\tthrow new RangeError( format( 'invalid argument. Index argument is out-of-bounds. Value: `%u`.', idx ) );\n\t\t}\n\t\tidx *= 2;\n\t\tbuf[ idx ] = real( value );\n\t\tbuf[ idx+1 ] = imag( value );\n\t\treturn;\n\t}\n\tif ( isComplexArray( value ) ) {\n\t\tN = value._length;\n\t\tif ( idx+N > this._length ) {\n\t\t\tthrow new RangeError( 'invalid arguments. Target array lacks sufficient storage to accommodate source values.' );\n\t\t}\n\t\tsbuf = value._buffer;\n\n\t\t// Check for overlapping memory...\n\t\tj = buf.byteOffset + (idx*BYTES_PER_ELEMENT);\n\t\tif (\n\t\t\tsbuf.buffer === buf.buffer &&\n\t\t\t(\n\t\t\t\tsbuf.byteOffset < j &&\n\t\t\t\tsbuf.byteOffset+sbuf.byteLength > j\n\t\t\t)\n\t\t) {\n\t\t\t// We need to copy source values...\n\t\t\ttmp = new Float64Array( sbuf.length );\n\t\t\tfor ( i = 0; i < sbuf.length; i++ ) {\n\t\t\t\ttmp[ i ] = sbuf[ i ];\n\t\t\t}\n\t\t\tsbuf = tmp;\n\t\t}\n\t\tidx *= 2;\n\t\tj = 0;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\tbuf[ idx ] = sbuf[ j ];\n\t\t\tbuf[ idx+1 ] = sbuf[ j+1 ];\n\t\t\tidx += 2; // stride\n\t\t\tj += 2; // stride\n\t\t}\n\t\treturn;\n\t}\n\tif ( isCollection( value ) ) {\n\t\t// Detect whether we've been provided an array of complex numbers...\n\t\tN = value.length;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\tif ( !isComplexLike( value[ i ] ) ) {\n\t\t\t\tflg = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t// If an array does not contain only complex numbers, then we assume interleaved real and imaginary components...\n\t\tif ( flg ) {\n\t\t\tif ( !isEven( N ) ) {\n\t\t\t\tthrow new RangeError( format( 'invalid argument. Array-like object arguments must have a length which is a multiple of two. Length: `%u`.', N ) );\n\t\t\t}\n\t\t\tif ( idx+(N/2) > this._length ) {\n\t\t\t\tthrow new RangeError( 'invalid arguments. Target array lacks sufficient storage to accommodate source values.' );\n\t\t\t}\n\t\t\tsbuf = value;\n\n\t\t\t// Check for overlapping memory...\n\t\t\tj = buf.byteOffset + (idx*BYTES_PER_ELEMENT);\n\t\t\tif (\n\t\t\t\tsbuf.buffer === buf.buffer &&\n\t\t\t\t(\n\t\t\t\t\tsbuf.byteOffset < j &&\n\t\t\t\t\tsbuf.byteOffset+sbuf.byteLength > j\n\t\t\t\t)\n\t\t\t) {\n\t\t\t\t// We need to copy source values...\n\t\t\t\ttmp = new Float64Array( N );\n\t\t\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\t\t\ttmp[ i ] = sbuf[ i ];\n\t\t\t\t}\n\t\t\t\tsbuf = tmp;\n\t\t\t}\n\t\t\tidx *= 2;\n\t\t\tN /= 2;\n\t\t\tj = 0;\n\t\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\t\tbuf[ idx ] = sbuf[ j ];\n\t\t\t\tbuf[ idx+1 ] = sbuf[ j+1 ];\n\t\t\t\tidx += 2; // stride\n\t\t\t\tj += 2; // stride\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\t// If an array contains only complex numbers, then we need to extract real and imaginary components...\n\t\tif ( idx+N > this._length ) {\n\t\t\tthrow new RangeError( 'invalid arguments. Target array lacks sufficient storage to accommodate source values.' );\n\t\t}\n\t\tidx *= 2;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\tv = value[ i ];\n\t\t\tbuf[ idx ] = real( v );\n\t\t\tbuf[ idx+1 ] = imag( v );\n\t\t\tidx += 2; // stride\n\t\t}\n\t\treturn;\n\t}\n\tthrow new TypeError( format( 'invalid argument. First argument must be either a complex number, an array-like object, or a complex number array. Value: `%s`.', value ) );\n\n\t/* eslint-enable no-underscore-dangle */\n});\n\n\n// EXPORTS //\n\nexport default Complex128Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport Float64Array from '@stdlib/array-float64';\nimport Float32Array from '@stdlib/array-float32';\nimport Int16Array from '@stdlib/array-int16';\nimport Int32Array from '@stdlib/array-int32';\nimport Int8Array from '@stdlib/array-int8';\nimport Uint16Array from '@stdlib/array-uint16';\nimport Uint32Array from '@stdlib/array-uint32';\nimport Uint8Array from '@stdlib/array-uint8';\nimport Uint8ClampedArray from '@stdlib/array-uint8c';\nimport Complex64Array from '@stdlib/array-complex64';\nimport Complex128Array from '@stdlib/array-complex128';\n\n\n// MAIN //\n\n// Mapping from data types to constructors...\nvar ctors = {\n\t'float64': Float64Array,\n\t'float32': Float32Array,\n\t'generic': Array, // TODO: replace with `stdlib` pkg\n\t'int16': Int16Array,\n\t'int32': Int32Array,\n\t'int8': Int8Array,\n\t'uint16': Uint16Array,\n\t'uint32': Uint32Array,\n\t'uint8': Uint8Array,\n\t'uint8c': Uint8ClampedArray,\n\t'complex64': Complex64Array,\n\t'complex128': Complex128Array\n};\n\n\n// EXPORTS //\n\nexport default ctors;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport table from './ctors.js';\n\n\n// MAIN //\n\n/**\n* Returns an array constructor.\n*\n* @param {string} dtype - data type\n* @returns {(Function|null)} constructor or null\n*\n* @example\n* var ctor = ctors( 'float64' );\n* // returns \n*\n* @example\n* var ctor = ctors( 'float' );\n* // returns null\n*/\nfunction ctors( dtype ) {\n\treturn table[ dtype ] || null;\n}\n\n\n// EXPORTS //\n\nexport default ctors;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport filled from '@stdlib/array-base-filled';\n\n\n// MAIN //\n\n/**\n* Returns a zero-filled \"generic\" array.\n*\n* @param {NonNegativeInteger} len - array length\n* @returns {Array} output array\n*\n* @example\n* var out = zeros( 3 );\n* // returns [ 0.0, 0.0, 0.0 ]\n*/\nfunction zeros( len ) {\n\treturn filled( 0.0, len );\n}\n\n\n// EXPORTS //\n\nexport default zeros;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Returns a filled \"generic\" array.\n*\n* @param {*} value - fill value\n* @param {NonNegativeInteger} len - array length\n* @returns {Array} filled array\n*\n* @example\n* var out = filled( 0.0, 3 );\n* // returns [ 0.0, 0.0, 0.0 ]\n*\n* @example\n* var out = filled( 'beep', 3 );\n* // returns [ 'beep', 'beep', 'beep' ]\n*/\nfunction filled( value, len ) {\n\tvar arr;\n\tvar i;\n\n\t// Manually push elements in order to ensure \"fast\" elements...\n\tarr = [];\n\tfor ( i = 0; i < len; i++ ) {\n\t\tarr.push( value );\n\t}\n\treturn arr;\n}\n\n\n// EXPORTS //\n\nexport default filled;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isNonNegativeInteger } from '@stdlib/assert-is-nonnegative-integer';\nimport ctors from '@stdlib/array-ctors';\nimport gzeros from '@stdlib/array-base-zeros';\nimport format from '@stdlib/string-format';\n\n\n// MAIN //\n\n/**\n* Creates a zero-filled array having a specified length.\n*\n* @param {NonNegativeInteger} length - array length\n* @param {string} [dtype=\"float64\"] - data type\n* @throws {TypeError} first argument must be a nonnegative integer\n* @throws {TypeError} second argument must be a recognized data type\n* @returns {(TypedArray|Array|ComplexArray)} array or typed array\n*\n* @example\n* var arr = zeros( 2 );\n* // returns [ 0.0, 0.0 ]\n*\n* @example\n* var arr = zeros( 2, 'float32' );\n* // returns [ 0.0, 0.0 ]\n*/\nfunction zeros( length ) {\n\tvar dtype;\n\tvar ctor;\n\tif ( !isNonNegativeInteger( length ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a nonnegative integer. Value: `%s`.', length ) );\n\t}\n\tif ( arguments.length > 1 ) {\n\t\tdtype = arguments[ 1 ];\n\t} else {\n\t\tdtype = 'float64';\n\t}\n\tif ( dtype === 'generic' ) {\n\t\treturn gzeros( length );\n\t}\n\tctor = ctors( dtype );\n\tif ( ctor === null ) {\n\t\tthrow new TypeError( format( 'invalid argument. Second argument must be a recognized data type. Value: `%s`.', dtype ) );\n\t}\n\treturn new ctor( length ); // WARNING: we assume that, apart from 'generic', the constructors for supported array data types are zero-filled by default\n}\n\n\n// EXPORTS //\n\nexport default zeros;\n","/**\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// MODULES //\n\nimport zeros from '@stdlib/array-zeros';\n\n\n// MAIN //\n\n/**\n* Creates an uninitialized array having a specified length.\n*\n* @private\n* @param {NonNegativeInteger} length - array length\n* @param {string} [dtype=\"float64\"] - data type\n* @throws {TypeError} first argument must be a nonnegative integer\n* @throws {TypeError} second argument must be a recognized data type\n* @returns {(TypedArray|Array|ComplexArray)} array or typed array\n*\n* @example\n* var arr = empty( 2 );\n* // returns \n*\n* @example\n* var arr = empty( 2, 'float32' );\n* // returns \n*/\nfunction empty( length ) {\n\tif ( arguments.length > 1 ) {\n\t\treturn zeros( length, arguments[ 1 ] );\n\t}\n\treturn zeros( length );\n}\n\n\n// EXPORTS //\n\nexport default empty;\n"],"names":["main","Object","defineProperty","isNumber","value","zeros","n","i","out","zeroPad","str","width","right","negative","pad","length","startsWithMinus","substr","lowercase","String","prototype","toLowerCase","uppercase","toUpperCase","formatInteger","token","base","specifier","arg","parseInt","isFinite","Error","toString","precision","padRight","sign","alternate","call","charAt","isString","abs","Math","replace","RE_EXP_POS_DIGITS","RE_EXP_NEG_DIGITS","RE_ONLY_DIGITS","RE_DIGITS_BEFORE_EXP","RE_TRAILING_PERIOD_ZERO","RE_PERIOD_ZERO_EXP","RE_ZERO_BEFORE_EXP","formatDouble","digits","f","parseFloat","toExponential","toFixed","toPrecision","spaces","spacePad","fromCharCode","isnan","isNaN","isArray","Array","initialize","flags","mapping","formatInterpolate","tokens","hasPeriod","flag","num","pos","j","TypeError","padZeros","indexOf","arguments","maxWidth","substring","RE","parse","match","formatTokenize","content","prev","exec","slice","lastIndex","push","format","args","tokenize","interpolate","apply","objectProtoype","toStr","defineGetter","__defineGetter__","defineSetter","__defineSetter__","lookupGetter","__lookupGetter__","lookupSetter","__lookupSetter__","err","hasDefinePropertySupport","builtin","obj","prop","descriptor","hasValue","hasGet","hasSet","__proto__","get","set","defineProperty$1","setNonEnumerableReadOnly","configurable","enumerable","writable","FLG","Symbol","hasToStringTagSupport","toStringTag","has","hasOwnProperty","hasOwnProp","property","Sym","toStrTag","nativeClass","hasToStringTag","v","isOwn","tag","main$b","Number","test","isPrimitive","isObject","setReadOnly","FLOAT64_PINF","POSITIVE_INFINITY","FLOAT64_NINF","NEGATIVE_INFINITY","floor","isInteger","x","PINF","NINF","isInt","valueOf","isNonNegativeInteger","hasFloat64Array","Float64Array","ctor","Float64Array$1","bool","arr","GlobalFloat64Array","NaN","hasFloat64ArraySupport","hasFloat32Array","Float32Array","Float32Array$1","GlobalFloat32Array","hasFloat32ArraySupport","hasInt16Array","Int16Array","Int16Array$1","GlobalInt16Array","INT16_MAX","hasInt16ArraySupport","hasInt32Array","Int32Array","Int32Array$1","GlobalInt32Array","INT32_MAX","hasInt32ArraySupport","hasInt8Array","Int8Array","Int8Array$1","GlobalInt8Array","INT8_MAX","hasInt8ArraySupport","hasUint16Array","Uint16Array","Uint16Array$1","GlobalUint16Array","UINT16_MAX","hasUint16ArraySupport","hasUint32Array","Uint32Array","Uint32Array$1","GlobalUint32Array","UINT32_MAX","hasUint32ArraySupport","hasUint8Array","Uint8Array","Uint8Array$1","GlobalUint8Array","UINT8_MAX","hasUint8ArraySupport","hasUint8ClampedArray","Uint8ClampedArray","Uint8ClampedArray$1","GlobalUint8ClampedArray","hasUint8ClampedArraySupport","isArrayLikeObject","isCollection","hasArrayBuffer","ArrayBuffer","isArrayBuffer","main$1","isBoolean","Bool","Boolean","getGlobal","Function","self","window","global","globalThis","root","codegen","getThis","GlobalThis","Self","Win","Global","nodeList","document","childNodes","typedarray","reFunctionName","RE_FUNCTION_NAME","isObjectLike","constructorName","name","constructor","_isBuffer","isBuffer","REGEXP","predicate","len","arrayfun","ctorName","type","isFunction","typeOf","Complex128","real","imag","this","re","im","fround","FLOAT32_VIEW","float64ToFloat32$1","Complex64","float64ToFloat32","isComplexLike","isEven","hasIteratorSymbolSupport","iterator","IteratorSymbol","setNonEnumerableReadOnlyAccessor","getter","realf","z","imagf","reinterpret","offset","buffer","byteOffset","BYTES_PER_ELEMENT","GETTERS","float64","idx","float32","int32","int16","int8","uint32","uint16","uint8","uint8c","generic","default","dtype","complex128","complex64","fromIterator","it","next","done","fromIteratorMap","clbk","thisArg","fromArray","buf","HAS_ITERATOR_SYMBOL","isComplexArray","Complex64Array","_length","_buffer","isComplexArrayConstructor","isComplex64Array","isComplex128Array","nargs","RangeError","reinterpret64","reinterpret128","byteLength","ITERATOR_SYMBOL","src","tmp","flg","accessorGetter","setReadOnlyAccessor","target","start","copyWithin","iter","entries","sbuf","N","Complex128Array","ctors","table","filled","gzeros","empty"],"mappings":";;AAsBA,IAAIA,EAA0C,mBAA1BC,OAAOC,eAAkCD,OAAOC,eAAiB,KCiCrF,IAAIA,EAAiBD,OAAOC,eCjB5B,SAASC,EAAUC,GAClB,MAA0B,iBAAVA,CACjB,CCAA,SAASC,EAAOC,GACf,IACIC,EADAC,EAAM,GAEV,IAAMD,EAAI,EAAGA,EAAID,EAAGC,IACnBC,GAAO,IAER,OAAOA,CACR,CAcA,SAASC,EAASC,EAAKC,EAAOC,GAC7B,IAAIC,GAAW,EACXC,EAAMH,EAAQD,EAAIK,OACtB,OAAKD,EAAM,IAnCZ,SAA0BJ,GACzB,MAAoB,MAAbA,EAAK,EACb,CAoCMM,CAAiBN,KACrBG,GAAW,EACXH,EAAMA,EAAIO,OAAQ,IAEnBP,EAAM,EACLA,EAAML,EAAOS,GACbT,EAAOS,GAAQJ,EACXG,IACJH,EAAM,IAAMA,IAVLA,CAaT,CCpDA,IAAIQ,EAAYC,OAAOC,UAAUC,YAC7BC,EAAYH,OAAOC,UAAUG,YAajC,SAASC,EAAeC,GACvB,IAAIC,EACAlB,EACAD,EAEJ,OAASkB,EAAME,WACf,IAAK,IAEJD,EAAO,EACP,MACD,IAAK,IAEJA,EAAO,EACP,MACD,IAAK,IACL,IAAK,IAEJA,EAAO,GACP,MAID,QAECA,EAAO,GAKR,GAFAlB,EAAMiB,EAAMG,IACZrB,EAAIsB,SAAUrB,EAAK,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WAAA,0FAGA,IADAhC,GAAA,EACAjR,EAAA,EAAAA,EAAAiU,EAAAjU,IACA+H,EAAAlI,EAAAG,GACAuS,EAAAtB,GAAA3B,GAAAvH,GACAwK,EAAAtB,EAAA,GAAA1B,GAAAxH,GACAkJ,GAAA,CAxDA,CA+DA,ICz/BA,IAAIkD,GAAQ,CACXnD,QAAW3H,GACX6H,QAAWpH,GACX4H,QAAWlO,MACX4N,MAASjH,GACTgH,MAAS1G,GACT4G,KAAQtG,GACRwG,OAAUlG,GACViG,OAAU3F,GACV6F,MAASvF,GACTwF,OAAUlF,GACVuF,UAAaY,GACbb,WAAcqC,ICTf,SAASC,GAAOvC,GACf,OAAOwC,GAAOxC,IAAW,IAC1B,CCNA,SAAS9R,GAAOiP,GACf,OCDD,SAAiBlP,EAAOkP,GACvB,IAAItF,EACAzJ,EAIJ,IADAyJ,EAAM,GACAzJ,EAAI,EAAGA,EAAI+O,EAAK/O,IACrByJ,EAAIvE,KAAMrF,GAEX,OAAO4J,CACR,CDTQ4K,CAAQ,EAAKtF,EACrB,CEQA,SAASjP,GAAOU,GACf,IAAIoR,EACAtI,EACJ,IAAMH,GAAsB3I,GAC3B,MAAM,IAAI2D,UAAWgB,EAAQ,+EAAgF3E,IAO9G,GAAe,aAJdoR,EADItN,UAAU9D,OAAS,EACf8D,UAAW,GAEX,WAGR,OAAOgQ,GAAQ9T,GAGhB,GAAc,QADd8I,EAAO6K,GAAOvC,IAEb,MAAM,IAAIzN,UAAWgB,EAAQ,iFAAkFyM,IAEhH,OAAO,IAAItI,EAAM9I,EAClB,CCrBA,SAAS+T,GAAO/T,GACf,OAAK8D,UAAU9D,OAAS,EAChBV,GAAOU,EAAQ8D,UAAW,IAE3BxE,GAAOU,EACf"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index 94b2659..0000000 --- a/stats.html +++ /dev/null @@ -1,6177 +0,0 @@ - - - - - - - - Rollup Visualizer - - - -
- - - - - From 9afe674661891c43645c45bfb6697e414a2a3697 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Thu, 1 Feb 2024 14:18:18 +0000 Subject: [PATCH 39/75] 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 | 36 +- SECURITY.md | 5 - benchmark/benchmark.js | 264 - benchmark/benchmark.length.complex128.js | 93 - benchmark/benchmark.length.complex64.js | 93 - benchmark/benchmark.length.float32.js | 93 - benchmark/benchmark.length.float64.js | 93 - benchmark/benchmark.length.generic.js | 93 - benchmark/benchmark.length.int16.js | 93 - benchmark/benchmark.length.int32.js | 93 - benchmark/benchmark.length.int8.js | 93 - benchmark/benchmark.length.uint16.js | 93 - benchmark/benchmark.length.uint32.js | 93 - benchmark/benchmark.length.uint8.js | 93 - benchmark/benchmark.length.uint8c.js | 93 - branches.md | 56 - dist/index.d.ts | 3 - dist/index.js | 9 - dist/index.js.map | 7 - docs/repl.txt | 52 - docs/types/test.ts | 77 - examples/index.js | 33 - lib/index.js | 58 - lib/is_buffer_uint8array.js | 47 - lib/main.js | 107 - lib/polyfill.js | 56 - docs/types/index.d.ts => mod.d.ts | 2 +- mod.js | 4 + mod.js.map | 1 + package.json | 81 +- stats.html | 6177 +++++++++++++++++++++ test/dist/test.js | 33 - test/test.js | 60 - test/test.main.js | 274 - test/test.polyfill.js | 324 -- 59 files changed, 6194 insertions(+), 5852 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 benchmark/benchmark.js delete mode 100644 benchmark/benchmark.length.complex128.js delete mode 100644 benchmark/benchmark.length.complex64.js delete mode 100644 benchmark/benchmark.length.float32.js delete mode 100644 benchmark/benchmark.length.float64.js delete mode 100644 benchmark/benchmark.length.generic.js delete mode 100644 benchmark/benchmark.length.int16.js delete mode 100644 benchmark/benchmark.length.int32.js delete mode 100644 benchmark/benchmark.length.int8.js delete mode 100644 benchmark/benchmark.length.uint16.js delete mode 100644 benchmark/benchmark.length.uint32.js delete mode 100644 benchmark/benchmark.length.uint8.js delete mode 100644 benchmark/benchmark.length.uint8c.js 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/repl.txt delete mode 100644 docs/types/test.ts delete mode 100644 examples/index.js delete mode 100644 lib/index.js delete mode 100644 lib/is_buffer_uint8array.js delete mode 100644 lib/main.js delete mode 100644 lib/polyfill.js rename docs/types/index.d.ts => mod.d.ts (99%) create mode 100644 mod.js create mode 100644 mod.js.map create mode 100644 stats.html delete mode 100644 test/dist/test.js delete mode 100644 test/test.js delete mode 100644 test/test.main.js delete mode 100644 test/test.polyfill.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 9737331..0000000 --- a/.github/.keepalive +++ /dev/null @@ -1 +0,0 @@ -2024-02-01T06:14:20.680Z diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index 96f81a8..0000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,7 +0,0 @@ - - -We are excited about your pull request, but unfortunately we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/empty) 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 ddb353e..0000000 --- a/.github/workflows/close_pull_requests.yml +++ /dev/null @@ -1,54 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: close_pull_requests - -# Workflow triggers: -on: - pull_request_target: - types: [opened] - -# Workflow jobs: -jobs: - - # Define job to close all pull requests: - run: - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Close pull request - - name: 'Close pull request' - # Pin action to full length commit SHA corresponding to v3.1.2 - uses: superbrothers/close-pull-request@9c18513d320d7b2c7185fb93396d0c664d5d8448 - with: - comment: | - Thank you for submitting a pull request. :raised_hands: - - We greatly appreciate your willingness to submit a contribution. However, we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). - - We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/empty) 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 2e70061..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: '49 1 * * 5' - - # 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 + + + + 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 8e62cb8..0000000 --- a/test/test.js +++ /dev/null @@ -1,60 +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 proxyquire = require( 'proxyquire' ); -var main = require( './../lib/main.js' ); -var polyfill = require( './../lib/polyfill.js' ); -var empty = require( './../lib' ); - - -// TESTS // - -tape( 'main export is a function', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof empty, 'function', 'main export is a function' ); - t.end(); -}); - -tape( 'if an environment supports Node.js buffer instances inheriting from Uint8Array, the main export supports returning arrays having uninitialized memory', function test( t ) { - var empty = proxyquire( './../lib', { - './is_buffer_uint8array.js': mock - }); - t.strictEqual( empty, main, 'returns expected value' ); - t.end(); - - function mock() { - return true; - } -}); - -tape( 'if an environment does not support Node.js buffer instances inheriting from Uint8Array, the main export supports returning zero-filled arrays', function test( t ) { - var empty = proxyquire( './../lib', { - './is_buffer_uint8array.js': mock - }); - t.strictEqual( empty, polyfill, 'returns expected value' ); - t.end(); - - function mock() { - return false; - } -}); diff --git a/test/test.main.js b/test/test.main.js deleted file mode 100644 index 3ceb26e..0000000 --- a/test/test.main.js +++ /dev/null @@ -1,274 +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 Float64Array = require( '@stdlib/array-float64' ); -var Float32Array = require( '@stdlib/array-float32' ); -var Int32Array = require( '@stdlib/array-int32' ); -var Uint32Array = require( '@stdlib/array-uint32' ); -var Int16Array = require( '@stdlib/array-int16' ); -var Uint16Array = require( '@stdlib/array-uint16' ); -var Int8Array = require( '@stdlib/array-int8' ); -var Uint8Array = require( '@stdlib/array-uint8' ); -var Uint8ClampedArray = require( '@stdlib/array-uint8c' ); -var Complex64Array = require( '@stdlib/array-complex64' ); -var Complex128Array = require( '@stdlib/array-complex128' ); -var instanceOf = require( '@stdlib/assert-instance-of' ); -var empty = require( './../lib/main.js' ); - - -// TESTS // - -tape( 'main export is a function', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof empty, 'function', 'main export is a function' ); - t.end(); -}); - -tape( 'the function throws an error if provided a value other than a nonnegative integer for the first argument', function test( t ) { - var values; - var i; - - values = [ - '5', - -3, - 3.14, - NaN, - true, - false, - null, - void 0, - [], - {}, - function noop() {} - ]; - - for ( i = 0; i < values.length; i++ ) { - t.throws( badValue( values[i] ), TypeError, 'throws an error when provided '+values[i] ); - } - t.end(); - - function badValue( value ) { - return function badValue() { - empty( value ); - }; - } -}); - -tape( 'the function throws an error if provided a value other than a nonnegative integer for the first argument (dtype)', function test( t ) { - var values; - var i; - - values = [ - '5', - -3, - 3.14, - NaN, - true, - false, - null, - void 0, - [], - {}, - function noop() {} - ]; - - for ( i = 0; i < values.length; i++ ) { - t.throws( badValue( values[i] ), TypeError, 'throws an error when provided '+values[i] ); - } - t.end(); - - function badValue( value ) { - return function badValue() { - empty( value, 'float32' ); - }; - } -}); - -tape( 'the function throws an error if provided an unrecognized data type', function test( t ) { - var values; - var i; - - values = [ - '5', - 'beep', - 'empty', - 'Int32', - 'Uint32', - 'Int16', - 'Uint16', - 'Int8', - 'Uint8', - 'Uint8c', - 'uint8_clamped', - 'Float64', - 'Float32', - 'FLOAT64', - 'FLOAT32', - 'GENERIC' - ]; - - for ( i = 0; i < values.length; i++ ) { - t.throws( badValue( values[i] ), TypeError, 'throws an error when provided '+values[i] ); - } - t.end(); - - function badValue( value ) { - return function badValue() { - empty( 10, value ); - }; - } -}); - -tape( 'the function returns an empty array (default)', function test( t ) { - var arr; - - arr = empty( 5 ); - t.strictEqual( instanceOf( arr, Float64Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=float64)', function test( t ) { - var arr; - - arr = empty( 5, 'float64' ); - t.strictEqual( instanceOf( arr, Float64Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=float32)', function test( t ) { - var arr; - - arr = empty( 5, 'float32' ); - t.strictEqual( instanceOf( arr, Float32Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=complex128)', function test( t ) { - var arr; - - arr = empty( 5, 'complex128' ); - t.strictEqual( instanceOf( arr, Complex128Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=complex64)', function test( t ) { - var arr; - - arr = empty( 5, 'complex64' ); - t.strictEqual( instanceOf( arr, Complex64Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=int32)', function test( t ) { - var arr; - - arr = empty( 5, 'int32' ); - t.strictEqual( instanceOf( arr, Int32Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=uint32)', function test( t ) { - var arr; - - arr = empty( 5, 'uint32' ); - t.strictEqual( instanceOf( arr, Uint32Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=int16)', function test( t ) { - var arr; - - arr = empty( 5, 'int16' ); - t.strictEqual( instanceOf( arr, Int16Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=uint16)', function test( t ) { - var arr; - - arr = empty( 5, 'uint16' ); - t.strictEqual( instanceOf( arr, Uint16Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=int8)', function test( t ) { - var arr; - - arr = empty( 5, 'int8' ); - t.strictEqual( instanceOf( arr, Int8Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=uint8)', function test( t ) { - var arr; - - arr = empty( 5, 'uint8' ); - t.strictEqual( instanceOf( arr, Uint8Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=uint8c)', function test( t ) { - var arr; - - arr = empty( 5, 'uint8c' ); - t.strictEqual( instanceOf( arr, Uint8ClampedArray ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=generic)', function test( t ) { - var expected; - var arr; - - expected = [ 0, 0, 0, 0, 0 ]; - - arr = empty( 5, 'generic' ); - t.strictEqual( instanceOf( arr, Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); diff --git a/test/test.polyfill.js b/test/test.polyfill.js deleted file mode 100644 index 17b99f3..0000000 --- a/test/test.polyfill.js +++ /dev/null @@ -1,324 +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 Float64Array = require( '@stdlib/array-float64' ); -var Float32Array = require( '@stdlib/array-float32' ); -var Int32Array = require( '@stdlib/array-int32' ); -var Uint32Array = require( '@stdlib/array-uint32' ); -var Int16Array = require( '@stdlib/array-int16' ); -var Uint16Array = require( '@stdlib/array-uint16' ); -var Int8Array = require( '@stdlib/array-int8' ); -var Uint8Array = require( '@stdlib/array-uint8' ); -var Uint8ClampedArray = require( '@stdlib/array-uint8c' ); -var Complex64Array = require( '@stdlib/array-complex64' ); -var Complex128Array = require( '@stdlib/array-complex128' ); -var reinterpret64 = require( '@stdlib/strided-base-reinterpret-complex64' ); -var reinterpret128 = require( '@stdlib/strided-base-reinterpret-complex128' ); -var instanceOf = require( '@stdlib/assert-instance-of' ); -var empty = require( './../lib/polyfill.js' ); - - -// TESTS // - -tape( 'main export is a function', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof empty, 'function', 'main export is a function' ); - t.end(); -}); - -tape( 'the function throws an error if provided a value other than a nonnegative integer for the first argument', function test( t ) { - var values; - var i; - - values = [ - '5', - -3, - 3.14, - NaN, - true, - false, - null, - void 0, - [], - {}, - function noop() {} - ]; - - for ( i = 0; i < values.length; i++ ) { - t.throws( badValue( values[i] ), TypeError, 'throws an error when provided '+values[i] ); - } - t.end(); - - function badValue( value ) { - return function badValue() { - empty( value ); - }; - } -}); - -tape( 'the function throws an error if provided a value other than a nonnegative integer for the first argument (dtype)', function test( t ) { - var values; - var i; - - values = [ - '5', - -3, - 3.14, - NaN, - true, - false, - null, - void 0, - [], - {}, - function noop() {} - ]; - - for ( i = 0; i < values.length; i++ ) { - t.throws( badValue( values[i] ), TypeError, 'throws an error when provided '+values[i] ); - } - t.end(); - - function badValue( value ) { - return function badValue() { - empty( value, 'float32' ); - }; - } -}); - -tape( 'the function throws an error if provided an unrecognized data type', function test( t ) { - var values; - var i; - - values = [ - '5', - 'beep', - 'empty', - 'Int32', - 'Uint32', - 'Int16', - 'Uint16', - 'Int8', - 'Uint8', - 'Uint8c', - 'uint8_clamped', - 'Float64', - 'Float32', - 'FLOAT64', - 'FLOAT32', - 'GENERIC' - ]; - - for ( i = 0; i < values.length; i++ ) { - t.throws( badValue( values[i] ), TypeError, 'throws an error when provided '+values[i] ); - } - t.end(); - - function badValue( value ) { - return function badValue() { - empty( 10, value ); - }; - } -}); - -tape( 'the function returns a zero-filled array (default)', function test( t ) { - var expected; - var arr; - - expected = new Float64Array( [ 0.0, 0.0, 0.0, 0.0, 0.0 ] ); - - arr = empty( 5 ); - t.strictEqual( instanceOf( arr, Float64Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=float64)', function test( t ) { - var expected; - var arr; - - expected = new Float64Array( [ 0.0, 0.0, 0.0, 0.0, 0.0 ] ); - - arr = empty( 5, 'float64' ); - t.strictEqual( instanceOf( arr, Float64Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=float32)', function test( t ) { - var expected; - var arr; - - expected = new Float32Array( [ 0.0, 0.0, 0.0, 0.0, 0.0 ] ); - - arr = empty( 5, 'float32' ); - t.strictEqual( instanceOf( arr, Float32Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=complex128)', function test( t ) { - var expected; - var arr; - - expected = new Float64Array( [ 0.0, 0.0, 0.0, 0.0 ] ); - - arr = empty( 2, 'complex128' ); - t.strictEqual( instanceOf( arr, Complex128Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length/2, 'returns expected value' ); - t.deepEqual( reinterpret128( arr, 0 ), expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=complex64)', function test( t ) { - var expected; - var arr; - - expected = new Float32Array( [ 0.0, 0.0, 0.0, 0.0 ] ); - - arr = empty( 2, 'complex64' ); - t.strictEqual( instanceOf( arr, Complex64Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length/2, 'returns expected value' ); - t.deepEqual( reinterpret64( arr, 0 ), expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=int32)', function test( t ) { - var expected; - var arr; - - expected = new Int32Array( [ 0, 0, 0, 0, 0 ] ); - - arr = empty( 5, 'int32' ); - t.strictEqual( instanceOf( arr, Int32Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=uint32)', function test( t ) { - var expected; - var arr; - - expected = new Uint32Array( [ 0, 0, 0, 0, 0 ] ); - - arr = empty( 5, 'uint32' ); - t.strictEqual( instanceOf( arr, Uint32Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=int16)', function test( t ) { - var expected; - var arr; - - expected = new Int16Array( [ 0, 0, 0, 0, 0 ] ); - - arr = empty( 5, 'int16' ); - t.strictEqual( instanceOf( arr, Int16Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=uint16)', function test( t ) { - var expected; - var arr; - - expected = new Uint16Array( [ 0, 0, 0, 0, 0 ] ); - - arr = empty( 5, 'uint16' ); - t.strictEqual( instanceOf( arr, Uint16Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=int8)', function test( t ) { - var expected; - var arr; - - expected = new Int8Array( [ 0, 0, 0, 0, 0 ] ); - - arr = empty( 5, 'int8' ); - t.strictEqual( instanceOf( arr, Int8Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=uint8)', function test( t ) { - var expected; - var arr; - - expected = new Uint8Array( [ 0, 0, 0, 0, 0 ] ); - - arr = empty( 5, 'uint8' ); - t.strictEqual( instanceOf( arr, Uint8Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=uint8c)', function test( t ) { - var expected; - var arr; - - expected = new Uint8ClampedArray( [ 0, 0, 0, 0, 0 ] ); - - arr = empty( 5, 'uint8c' ); - t.strictEqual( instanceOf( arr, Uint8ClampedArray ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=generic)', function test( t ) { - var expected; - var arr; - - expected = [ 0, 0, 0, 0, 0 ]; - - arr = empty( 5, 'generic' ); - t.strictEqual( instanceOf( arr, Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); From 11664c6659df32c638ae1fc3dd3751e2c092649f Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Thu, 15 Feb 2024 00:58:09 +0000 Subject: [PATCH 40/75] Transform error messages --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 851f621..b714ed5 100644 --- a/package.json +++ b/package.json @@ -46,7 +46,7 @@ "@stdlib/assert-is-uint8array": "^0.2.0", "@stdlib/buffer-alloc-unsafe": "^0.2.0", "@stdlib/ndarray-base-bytes-per-element": "^0.2.0", - "@stdlib/string-format": "^0.2.0", + "@stdlib/error-tools-fmtprodmsg": "^0.2.0", "@stdlib/types": "^0.3.1" }, "devDependencies": { From b1dce2cc6448cf2f0b715e0a73335b6cbe1af6d7 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Thu, 15 Feb 2024 04:14:21 +0000 Subject: [PATCH 41/75] Remove files --- mod.d.ts | 277 --- mod.js | 4 - mod.js.map | 1 - stats.html | 6177 ---------------------------------------------------- 4 files changed, 6459 deletions(-) delete mode 100644 mod.d.ts delete mode 100644 mod.js delete mode 100644 mod.js.map delete mode 100644 stats.html diff --git a/mod.d.ts b/mod.d.ts deleted file mode 100644 index c071f4d..0000000 --- a/mod.d.ts +++ /dev/null @@ -1,277 +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 - -/// - -import { Complex128Array, Complex64Array, DataType } from '@stdlib/types/array'; - -/** -* Creates an uninitialized array having a specified length. -* -* ## Notes -* -* - In browser environments, the function always returns zero-filled arrays. -* - In Node.js versions `>=3.0.0`, the underlying memory of returned typed arrays is **not** initialized. Memory contents are unknown and may contain **sensitive** data. -* -* @param length - array length -* @param dtype - data type -* @returns empty array -* -* @example -* var arr = empty( 2, 'float64' ); -* // returns -*/ -declare function empty( length: number, dtype: 'float64' ): Float64Array; - -/** -* Creates an uninitialized array having a specified length. -* -* ## Notes -* -* - In browser environments, the function always returns zero-filled arrays. -* - In Node.js versions `>=3.0.0`, the underlying memory of returned typed arrays is **not** initialized. Memory contents are unknown and may contain **sensitive** data. -* -* @param length - array length -* @param dtype - data type -* @returns empty array -* -* @example -* var arr = empty( 2, 'float32' ); -* // returns -*/ -declare function empty( length: number, dtype: 'float32' ): Float32Array; - -/** -* Creates an uninitialized array having a specified length. -* -* ## Notes -* -* - In browser environments, the function always returns zero-filled arrays. -* - In Node.js versions `>=3.0.0`, the underlying memory of returned typed arrays is **not** initialized. Memory contents are unknown and may contain **sensitive** data. -* -* @param length - array length -* @param dtype - data type -* @returns empty array -* -* @example -* var arr = empty( 2, 'complex128' ); -* // returns -*/ -declare function empty( length: number, dtype: 'complex128' ): Complex128Array; - -/** -* Creates an uninitialized array having a specified length. -* -* ## Notes -* -* - In browser environments, the function always returns zero-filled arrays. -* - In Node.js versions `>=3.0.0`, the underlying memory of returned typed arrays is **not** initialized. Memory contents are unknown and may contain **sensitive** data. -* -* @param length - array length -* @param dtype - data type -* @returns empty array -* -* @example -* var arr = empty( 2, 'complex64' ); -* // returns -*/ -declare function empty( length: number, dtype: 'complex64' ): Complex64Array; - -/** -* Creates an uninitialized array having a specified length. -* -* ## Notes -* -* - In browser environments, the function always returns zero-filled arrays. -* - In Node.js versions `>=3.0.0`, the underlying memory of returned typed arrays is **not** initialized. Memory contents are unknown and may contain **sensitive** data. -* -* @param length - array length -* @param dtype - data type -* @returns empty array -* -* @example -* var arr = empty( 2, 'int32' ); -* // returns -*/ -declare function empty( length: number, dtype: 'int32' ): Int32Array; - -/** -* Creates an uninitialized array having a specified length. -* -* ## Notes -* -* - In browser environments, the function always returns zero-filled arrays. -* - In Node.js versions `>=3.0.0`, the underlying memory of returned typed arrays is **not** initialized. Memory contents are unknown and may contain **sensitive** data. -* -* @param length - array length -* @param dtype - data type -* @returns empty array -* -* @example -* var arr = empty( 2, 'int16' ); -* // returns -*/ -declare function empty( length: number, dtype: 'int16' ): Int16Array; - -/** -* Creates an uninitialized array having a specified length. -* -* ## Notes -* -* - In browser environments, the function always returns zero-filled arrays. -* - In Node.js versions `>=3.0.0`, the underlying memory of returned typed arrays is **not** initialized. Memory contents are unknown and may contain **sensitive** data. -* -* @param length - array length -* @param dtype - data type -* @returns empty array -* -* @example -* var arr = empty( 2, 'int8' ); -* // returns -*/ -declare function empty( length: number, dtype: 'int8' ): Int8Array; - -/** -* Creates an uninitialized array having a specified length. -* -* ## Notes -* -* - In browser environments, the function always returns zero-filled arrays. -* - In Node.js versions `>=3.0.0`, the underlying memory of returned typed arrays is **not** initialized. Memory contents are unknown and may contain **sensitive** data. -* -* @param length - array length -* @param dtype - data type -* @returns empty array -* -* @example -* var arr = empty( 2, 'uint32' ); -* // returns -*/ -declare function empty( length: number, dtype: 'uint32' ): Uint32Array; - -/** -* Creates an uninitialized array having a specified length. -* -* ## Notes -* -* - In browser environments, the function always returns zero-filled arrays. -* - In Node.js versions `>=3.0.0`, the underlying memory of returned typed arrays is **not** initialized. Memory contents are unknown and may contain **sensitive** data. -* -* @param length - array length -* @param dtype - data type -* @returns empty array -* -* @example -* var arr = empty( 2, 'uint16' ); -* // returns -*/ -declare function empty( length: number, dtype: 'uint16' ): Uint16Array; - -/** -* Creates an uninitialized array having a specified length. -* -* ## Notes -* -* - In browser environments, the function always returns zero-filled arrays. -* - In Node.js versions `>=3.0.0`, the underlying memory of returned typed arrays is **not** initialized. Memory contents are unknown and may contain **sensitive** data. -* -* @param length - array length -* @param dtype - data type -* @returns empty array -* -* @example -* var arr = empty( 2, 'uint8' ); -* // returns -*/ -declare function empty( length: number, dtype: 'uint8' ): Uint8Array; - -/** -* Creates an uninitialized array having a specified length. -* -* ## Notes -* -* - In browser environments, the function always returns zero-filled arrays. -* - In Node.js versions `>=3.0.0`, the underlying memory of returned typed arrays is **not** initialized. Memory contents are unknown and may contain **sensitive** data. -* -* @param length - array length -* @param dtype - data type -* @returns empty array -* -* @example -* var arr = empty( 2, 'uint8c' ); -* // returns -*/ -declare function empty( length: number, dtype: 'uint8c' ): Uint8ClampedArray; - -/** -* Creates a zero-filled array having a specified length. -* -* @param length - array length -* @param dtype - data type -* @returns zero-filled array -* -* @example -* var arr = empty( 2, 'generic' ); -* // returns -*/ -declare function empty( length: number, dtype: 'generic' ): Array; - -/** -* Creates an uninitialized array having a specified length. -* -* ## Notes -* -* - In browser environments, the function always returns zero-filled arrays. -* - If `dtype` is `'generic'`, the function always returns a zero-filled array. -* - In Node.js versions `>=3.0.0`, the underlying memory of returned typed arrays is **not** initialized. Memory contents are unknown and may contain **sensitive** data. -* -* The function recognizes the following data types: -* -* - `float64`: double-precision floating-point numbers (IEEE 754) -* - `float32`: single-precision floating-point numbers (IEEE 754) -* - `complex128`: double-precision complex floating-point numbers -* - `complex64`: single-precision complex floating-point numbers -* - `int32`: 32-bit two's complement signed integers -* - `uint32`: 32-bit unsigned integers -* - `int16`: 16-bit two's complement signed integers -* - `uint16`: 16-bit unsigned integers -* - `int8`: 8-bit two's complement signed integers -* - `uint8`: 8-bit unsigned integers -* - `uint8c`: 8-bit unsigned integers clamped to `0-255` -* - `generic`: generic JavaScript values -* -* @param length - array length -* @param dtype - data type (default: 'float64') -* @returns empty array -* -* @example -* var arr = empty( 2 ); -* // returns -* -* @example -* var arr = empty( 2, 'float32' ); -* // returns -*/ -declare function empty( length: number, dtype?: DataType ): Float64Array; - - -// EXPORTS // - -export = empty; diff --git a/mod.js b/mod.js deleted file mode 100644 index 1c04a33..0000000 --- a/mod.js +++ /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 -/// -var e="function"==typeof Object.defineProperty?Object.defineProperty:null;var r=Object.defineProperty;function t(e){return"number"==typeof e}function n(e){var r,t="";for(r=0;r0&&(r-=1),n=i.toExponential(r)):n=i.toPrecision(e.precision),e.alternate||(n=y.call(n,v,"$1e"),n=y.call(n,b,"e"),n=y.call(n,w,""));break;default:throw new Error("invalid double notation. Value: "+e.specifier)}return n=y.call(n,h,"e+0$1"),n=y.call(n,p,"e-0$1"),e.alternate&&(n=y.call(n,g,"$1."),n=y.call(n,m,"$1.e")),i>=0&&e.sign&&(n=e.sign+n),n=e.specifier===s.call(e.specifier)?s.call(n):c.call(n)}function E(e){var r,t="";for(r=0;r127)throw new Error("invalid character code. Value: "+n.arg);n.arg=_(a)?String(n.arg):T(a)}break;case"e":case"E":case"f":case"F":case"g":case"G":r||(n.precision=6),n.arg=d(n);break;default:throw new Error("invalid specifier: "+n.specifier)}n.maxWidth>=0&&n.arg.length>n.maxWidth&&(n.arg=n.arg.substring(0,n.maxWidth)),n.padZeros?n.arg=i(n.arg,n.width||n.precision,n.padRight):n.width&&(n.arg=A(n.arg,n.width,n.padRight)),l+=n.arg||"",c+=1}return l}var k=/%(?:([1-9]\d*)\$)?([0 +\-#]*)(\*|\d+)?(?:(\.)(\*|\d+)?)?[hlL]?([%A-Za-z])/g;function L(e){var r={mapping:e[1]?parseInt(e[1],10):void 0,flags:e[2],width:e[3],precision:e[5],specifier:e[6]};return"."===e[4]&&void 0===e[5]&&(r.precision="1"),r}function S(e){var r,t,n,i;for(t=[],i=0,n=k.exec(e);n;)(r=e.slice(i,k.lastIndex-n[0].length)).length&&t.push(r),t.push(L(n)),i=k.lastIndex,n=k.exec(e);return(r=e.slice(i)).length&&t.push(r),t}function R(e){return"string"==typeof e}function B(e){var r,t,n;if(!R(e))throw new TypeError(B("invalid argument. First argument must be a string. Value: `%s`.",e));for(r=S(e),(t=new Array(arguments.length))[0]=r,n=1;nne&&oe(e)}function ue(e){return W(e)&&ae(e)}function fe(e){return ee(e)&&ae(e.valueOf())}function le(e){return ue(e)||fe(e)}function ce(e){return ue(e)&&e>=0}function se(e){return fe(e)&&e.valueOf()>=0}function ye(e){return ce(e)||se(e)}Y(le,"isPrimitive",ue),Y(le,"isObject",fe),Y(ye,"isPrimitive",ce),Y(ye,"isObject",se);var he="function"==typeof Float64Array;var pe="function"==typeof Float64Array?Float64Array:null;var ge="function"==typeof Float64Array?Float64Array:void 0;var me=function(){var e,r,t;if("function"!=typeof pe)return!1;try{r=new pe([1,3.14,-3.14,NaN]),t=r,e=(he&&t instanceof Float64Array||"[object Float64Array]"===D(t))&&1===r[0]&&3.14===r[1]&&-3.14===r[2]&&r[3]!=r[3]}catch(r){e=!1}return e}()?ge:function(){throw new Error("not implemented")},we="function"==typeof Float32Array;var be="function"==typeof Float32Array?Float32Array:null;var ve="function"==typeof Float32Array?Float32Array:void 0;var de=function(){var e,r,t;if("function"!=typeof be)return!1;try{r=new be([1,3.14,-3.14,5e40]),t=r,e=(we&&t instanceof Float32Array||"[object Float32Array]"===D(t))&&1===r[0]&&3.140000104904175===r[1]&&-3.140000104904175===r[2]&&r[3]===te}catch(r){e=!1}return e}()?ve:function(){throw new Error("not implemented")},Ee="function"==typeof Int16Array;var Ae="function"==typeof Int16Array?Int16Array:null;var Te="function"==typeof Int16Array?Int16Array:void 0;var _e=function(){var e,r,t;if("function"!=typeof Ae)return!1;try{r=new Ae([1,3.14,-3.14,32768]),t=r,e=(Ee&&t instanceof Int16Array||"[object Int16Array]"===D(t))&&1===r[0]&&3===r[1]&&-3===r[2]&&-32768===r[3]}catch(r){e=!1}return e}()?Te:function(){throw new Error("not implemented")},xe="function"==typeof Int32Array;var je="function"==typeof Int32Array?Int32Array:null;var Ve="function"==typeof Int32Array?Int32Array:void 0;var ke=function(){var e,r,t;if("function"!=typeof je)return!1;try{r=new je([1,3.14,-3.14,2147483648]),t=r,e=(xe&&t instanceof Int32Array||"[object Int32Array]"===D(t))&&1===r[0]&&3===r[1]&&-3===r[2]&&-2147483648===r[3]}catch(r){e=!1}return e}()?Ve:function(){throw new Error("not implemented")},Le="function"==typeof Int8Array;var Se="function"==typeof Int8Array?Int8Array:null;var Re="function"==typeof Int8Array?Int8Array:void 0;var Be=function(){var e,r,t;if("function"!=typeof Se)return!1;try{r=new Se([1,3.14,-3.14,128]),t=r,e=(Le&&t instanceof Int8Array||"[object Int8Array]"===D(t))&&1===r[0]&&3===r[1]&&-3===r[2]&&-128===r[3]}catch(r){e=!1}return e}()?Re:function(){throw new Error("not implemented")},Ie="function"==typeof Uint16Array;var Ce="function"==typeof Uint16Array?Uint16Array:null;var Fe="function"==typeof Uint16Array?Uint16Array:void 0;var Oe=function(){var e,r,t;if("function"!=typeof Ce)return!1;try{r=new Ce(r=[1,3.14,-3.14,65536,65537]),t=r,e=(Ie&&t instanceof Uint16Array||"[object Uint16Array]"===D(t))&&1===r[0]&&3===r[1]&&65533===r[2]&&0===r[3]&&1===r[4]}catch(r){e=!1}return e}()?Fe:function(){throw new Error("not implemented")},Me="function"==typeof Uint32Array;var Ne="function"==typeof Uint32Array?Uint32Array:null;var Ue="function"==typeof Uint32Array?Uint32Array:void 0;var Pe=function(){var e,r,t;if("function"!=typeof Ne)return!1;try{r=new Ne(r=[1,3.14,-3.14,4294967296,4294967297]),t=r,e=(Me&&t instanceof Uint32Array||"[object Uint32Array]"===D(t))&&1===r[0]&&3===r[1]&&4294967293===r[2]&&0===r[3]&&1===r[4]}catch(r){e=!1}return e}()?Ue:function(){throw new Error("not implemented")},Ye="function"==typeof Uint8Array;var We="function"==typeof Uint8Array?Uint8Array:null;var $e="function"==typeof Uint8Array?Uint8Array:void 0;var Ge=function(){var e,r,t;if("function"!=typeof We)return!1;try{r=new We(r=[1,3.14,-3.14,256,257]),t=r,e=(Ye&&t instanceof Uint8Array||"[object Uint8Array]"===D(t))&&1===r[0]&&3===r[1]&&253===r[2]&&0===r[3]&&1===r[4]}catch(r){e=!1}return e}()?$e:function(){throw new Error("not implemented")},Ze="function"==typeof Uint8ClampedArray;var Xe="function"==typeof Uint8ClampedArray?Uint8ClampedArray:null;var ze="function"==typeof Uint8ClampedArray?Uint8ClampedArray:void 0;var Je=function(){var e,r,t;if("function"!=typeof Xe)return!1;try{r=new Xe([-1,0,1,3.14,4.99,255,256]),t=r,e=(Ze&&t instanceof Uint8ClampedArray||"[object Uint8ClampedArray]"===D(t))&&0===r[0]&&0===r[1]&&1===r[2]&&3===r[3]&&5===r[4]&&255===r[5]&&255===r[6]}catch(r){e=!1}return e}()?ze:function(){throw new Error("not implemented")};function qe(e){return"object"==typeof e&&null!==e&&"number"==typeof e.length&&oe(e.length)&&e.length>=0&&e.length<=4294967295}function De(e){return"object"==typeof e&&null!==e&&"number"==typeof e.length&&oe(e.length)&&e.length>=0&&e.length<=9007199254740991}var He="function"==typeof ArrayBuffer;function Ke(e){return He&&e instanceof ArrayBuffer||"[object ArrayBuffer]"===D(e)}var Qe=Array.isArray?Array.isArray:function(e){return"[object Array]"===D(e)};function er(e){return"object"==typeof e&&null!==e&&!Qe(e)}var rr=/./;function tr(e){return"boolean"==typeof e}var nr=Boolean,ir=Boolean.prototype.toString;var or=G();function ar(e){return"object"==typeof e&&(e instanceof nr||(or?function(e){try{return ir.call(e),!0}catch(e){return!1}}(e):"[object Boolean]"===D(e)))}function ur(e){return tr(e)||ar(e)}function fr(){return new Function("return this;")()}Y(ur,"isPrimitive",tr),Y(ur,"isObject",ar);var lr="object"==typeof self?self:null,cr="object"==typeof window?window:null,sr="undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},yr="object"==typeof sr?sr:null,hr="object"==typeof globalThis?globalThis:null;var pr=function(e){if(arguments.length){if(!tr(e))throw new TypeError(B("invalid argument. Must provide a boolean. Value: `%s`.",e));if(e)return fr()}if(hr)return hr;if(lr)return lr;if(cr)return cr;if(yr)return yr;throw new Error("unexpected error. Unable to resolve global object.")}(),gr=pr.document&&pr.document.childNodes,mr=Int8Array;function wr(){return/^\s*function\s*([^(]*)/i}var br=/^\s*function\s*([^(]*)/i;function vr(e){return null!==e&&"object"==typeof e}function dr(e){var r,t,n,i;if(("Object"===(t=D(e).slice(8,-1))||"Error"===t)&&e.constructor){if("string"==typeof(n=e.constructor).name)return n.name;if(r=br.exec(n.toString()))return r[1]}return vr(i=e)&&(i._isBuffer||i.constructor&&"function"==typeof i.constructor.isBuffer&&i.constructor.isBuffer(i))?"Buffer":t}Y(wr,"REGEXP",br),Y(vr,"isObjectLikeArray",function(e){if("function"!=typeof e)throw new TypeError(B("invalid argument. Must provide a function. Value: `%s`.",e));return function(r){var t,n;if(!Qe(r))return!1;if(0===(t=r.length))return!1;for(n=0;n=2)r.push(n[0],n[1]);else{if(!kr(n))return new TypeError(B("invalid argument. An iterator must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",n));r.push(Ir(n),Cr(n))}return r}function Wr(e,r,t){var n,i,o,a;for(n=[],a=-1;!(i=e.next()).done;)if(a+=1,qe(o=r.call(t,i.value,a))&&o.length>=2)n.push(o[0],o[1]);else{if(!kr(o))return new TypeError(B("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",o));n.push(Ir(o),Cr(o))}return n}function $r(e,r){var t,n,i,o;for(t=r.length,o=0,i=0;it.byteLength-e)throw new RangeError(B("invalid arguments. ArrayBuffer has insufficient capacity. Either decrease the array length or provide a bigger buffer. Minimum capacity: `%u`.",n*Gr));t=new de(t,e,2*n)}}return Y(this,"_buffer",t),Y(this,"_length",t.length/2),this}function Hr(e){return e.re}function Kr(e){return e.im}function Qr(e){var r,t,n;for(r=[];!(t=e.next()).done;)if(qe(n=t.value)&&n.length>=2)r.push(n[0],n[1]);else{if(!kr(n))return new TypeError(B("invalid argument. An iterator must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",n));r.push(Hr(n),Kr(n))}return r}function et(e,r,t){var n,i,o,a;for(n=[],a=-1;!(i=e.next()).done;)if(a+=1,qe(o=r.call(t,i.value,a))&&o.length>=2)n.push(o[0],o[1]);else{if(!kr(o))return new TypeError(B("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",o));n.push(Hr(o),Kr(o))}return n}function rt(e,r){var t,n,i,o;for(t=r.length,o=0,i=0;i1){if(!Ar(n=arguments[1]))throw new TypeError(B("invalid argument. Second argument must be a function. Value: `%s`.",n));t>2&&(r=arguments[2])}if(Xr(e)){if(f=e.length,n){for(o=(i=new this(f))._buffer,y=0,s=0;s=2))throw new TypeError(B("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",c));o[y]=c[0],o[y+1]=c[1]}y+=2}return i}return new this(e)}if(De(e)){if(n){for(f=e.length,u=e.get&&e.set?Pr("default"):Nr("default"),s=0;s=2))throw new TypeError(B("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",c));o[y]=c[0],o[y+1]=c[1]}y+=2}return i}return new this(e)}if(er(e)&&Zr&&Ar(e[Rr])){if(!Ar((o=e[Rr]()).next))throw new TypeError(B("invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.",e));if((a=n?Wr(o,n,r):Yr(o))instanceof Error)throw a;for(o=(i=new this(f=a.length/2))._buffer,s=0;s=n)return{done:!0};return r=new Vr(e[a+=2],e[a+1]),{value:[o,r],done:!1}})),Y(t,"return",(function(e){if(i=!0,arguments.length)return{value:e,done:!0};return{done:!0}})),Rr&&Y(t,Rr,(function(){return r.entries()})),t})),Y(Dr.prototype,"get",(function(e){var r;if(!Xr(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!ce(e))throw new TypeError(B("invalid argument. Must provide a nonnegative integer. Value: `%s`.",e));if(!(e>=this._length))return new Vr((r=this._buffer)[e*=2],r[e+1])})),Br(Dr.prototype,"length",(function(){return this._length})),Y(Dr.prototype,"set",(function(e){var r,t,n,i,o,a,u,f,l;if(!Xr(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(n=this._buffer,arguments.length>1){if(!ce(t=arguments[1]))throw new TypeError(B("invalid argument. Index argument must be a nonnegative integer. Value: `%s`.",t))}else t=0;if(kr(e)){if(t>=this._length)throw new RangeError(B("invalid argument. Index argument is out-of-bounds. Value: `%u`.",t));return n[t*=2]=Ir(e),void(n[t+1]=Cr(e))}if(Xr(e)){if(t+(a=e._length)>this._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");if(r=e._buffer,l=n.byteOffset+t*Gr,r.buffer===n.buffer&&r.byteOffsetl){for(i=new de(r.length),f=0;fthis._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");if(r=e,l=n.byteOffset+t*Gr,r.buffer===n.buffer&&r.byteOffsetl){for(i=new de(a),f=0;fthis._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");for(t*=2,f=0;ft.byteLength-e)throw new RangeError(B("invalid arguments. ArrayBuffer has insufficient capacity. Either decrease the array length or provide a bigger buffer. Minimum capacity: `%u`.",n*tt));t=new me(t,e,2*n)}}return Y(this,"_buffer",t),Y(this,"_length",t.length/2),this}Y(ft,"BYTES_PER_ELEMENT",tt),Y(ft,"name","Complex128Array"),Y(ft,"from",(function(e){var r,t,n,i,o,a,u,f,l,c,s,y;if(!Ar(this))throw new TypeError("invalid invocation. `this` context must be a constructor.");if(!ot(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if((t=arguments.length)>1){if(!Ar(n=arguments[1]))throw new TypeError(B("invalid argument. Second argument must be a function. Value: `%s`.",n));t>2&&(r=arguments[2])}if(it(e)){if(f=e.length,n){for(o=(i=new this(f))._buffer,y=0,s=0;s=2))throw new TypeError(B("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",c));o[y]=c[0],o[y+1]=c[1]}y+=2}return i}return new this(e)}if(De(e)){if(n){for(f=e.length,u=e.get&&e.set?Pr("default"):Nr("default"),s=0;s=2))throw new TypeError(B("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",c));o[y]=c[0],o[y+1]=c[1]}y+=2}return i}return new this(e)}if(er(e)&&nt&&Ar(e[Rr])){if(!Ar((o=e[Rr]()).next))throw new TypeError(B("invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.",e));if((a=n?et(o,n,r):Qr(o))instanceof Error)throw a;for(o=(i=new this(f=a.length/2))._buffer,s=0;s=n)return{done:!0};return r=new Tr(e[a+=2],e[a+1]),{value:[o,r],done:!1}})),Y(t,"return",(function(e){if(i=!0,arguments.length)return{value:e,done:!0};return{done:!0}})),Rr&&Y(t,Rr,(function(){return r.entries()})),t})),Y(ft.prototype,"get",(function(e){var r;if(!it(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!ce(e))throw new TypeError(B("invalid argument. Must provide a nonnegative integer. Value: `%s`.",e));if(!(e>=this._length))return new Tr((r=this._buffer)[e*=2],r[e+1])})),Br(ft.prototype,"length",(function(){return this._length})),Y(ft.prototype,"set",(function(e){var r,t,n,i,o,a,u,f,l;if(!it(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(n=this._buffer,arguments.length>1){if(!ce(t=arguments[1]))throw new TypeError(B("invalid argument. Index argument must be a nonnegative integer. Value: `%s`.",t))}else t=0;if(kr(e)){if(t>=this._length)throw new RangeError(B("invalid argument. Index argument is out-of-bounds. Value: `%u`.",t));return n[t*=2]=Hr(e),void(n[t+1]=Kr(e))}if(it(e)){if(t+(a=e._length)>this._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");if(r=e._buffer,l=n.byteOffset+t*tt,r.buffer===n.buffer&&r.byteOffsetl){for(i=new me(r.length),f=0;fthis._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");if(r=e,l=n.byteOffset+t*tt,r.buffer===n.buffer&&r.byteOffsetl){for(i=new me(a),f=0;fthis._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");for(t*=2,f=0;f1?arguments[1]:"float64"))return st(e);if(null===(t=ct(r)))throw new TypeError(B("invalid argument. Second argument must be a recognized data type. Value: `%s`.",r));return new t(e)}function ht(e){return arguments.length>1?yt(e,arguments[1]):yt(e)}export{ht as default}; -//# sourceMappingURL=mod.js.map diff --git a/mod.js.map b/mod.js.map deleted file mode 100644 index ca3f210..0000000 --- a/mod.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"mod.js","sources":["../node_modules/@stdlib/utils-define-property/lib/define_property.js","../node_modules/@stdlib/utils-define-property/lib/builtin.js","../node_modules/@stdlib/string-base-format-interpolate/lib/is_number.js","../node_modules/@stdlib/string-base-format-interpolate/lib/zero_pad.js","../node_modules/@stdlib/string-base-format-interpolate/lib/format_integer.js","../node_modules/@stdlib/string-base-format-interpolate/lib/is_string.js","../node_modules/@stdlib/string-base-format-interpolate/lib/format_double.js","../node_modules/@stdlib/string-base-format-interpolate/lib/space_pad.js","../node_modules/@stdlib/string-base-format-interpolate/lib/main.js","../node_modules/@stdlib/string-base-format-tokenize/lib/main.js","../node_modules/@stdlib/string-format/lib/is_string.js","../node_modules/@stdlib/string-format/lib/main.js","../node_modules/@stdlib/utils-define-property/lib/polyfill.js","../node_modules/@stdlib/utils-define-property/lib/index.js","../node_modules/@stdlib/utils-define-property/lib/has_define_property_support.js","../node_modules/@stdlib/utils-define-nonenumerable-read-only-property/lib/main.js","../node_modules/@stdlib/assert-is-number/lib/primitive.js","../node_modules/@stdlib/assert-has-tostringtag-support/lib/main.js","../node_modules/@stdlib/assert-has-symbol-support/lib/main.js","../node_modules/@stdlib/utils-native-class/lib/tostring.js","../node_modules/@stdlib/assert-has-own-property/lib/main.js","../node_modules/@stdlib/symbol-ctor/lib/main.js","../node_modules/@stdlib/utils-native-class/lib/tostringtag.js","../node_modules/@stdlib/utils-native-class/lib/index.js","../node_modules/@stdlib/utils-native-class/lib/polyfill.js","../node_modules/@stdlib/utils-native-class/lib/main.js","../node_modules/@stdlib/number-ctor/lib/main.js","../node_modules/@stdlib/assert-is-number/lib/tostring.js","../node_modules/@stdlib/assert-is-number/lib/object.js","../node_modules/@stdlib/assert-is-number/lib/try2serialize.js","../node_modules/@stdlib/assert-is-number/lib/main.js","../node_modules/@stdlib/assert-is-number/lib/index.js","../node_modules/@stdlib/constants-float64-pinf/lib/index.js","../node_modules/@stdlib/constants-float64-ninf/lib/index.js","../node_modules/@stdlib/math-base-special-floor/lib/main.js","../node_modules/@stdlib/math-base-assert-is-integer/lib/main.js","../node_modules/@stdlib/assert-is-integer/lib/integer.js","../node_modules/@stdlib/assert-is-integer/lib/primitive.js","../node_modules/@stdlib/assert-is-integer/lib/object.js","../node_modules/@stdlib/assert-is-integer/lib/main.js","../node_modules/@stdlib/assert-is-nonnegative-integer/lib/primitive.js","../node_modules/@stdlib/assert-is-nonnegative-integer/lib/object.js","../node_modules/@stdlib/assert-is-nonnegative-integer/lib/main.js","../node_modules/@stdlib/assert-is-integer/lib/index.js","../node_modules/@stdlib/assert-is-nonnegative-integer/lib/index.js","../node_modules/@stdlib/assert-is-float64array/lib/main.js","../node_modules/@stdlib/assert-has-float64array-support/lib/float64array.js","../node_modules/@stdlib/array-float64/lib/main.js","../node_modules/@stdlib/array-float64/lib/index.js","../node_modules/@stdlib/assert-has-float64array-support/lib/main.js","../node_modules/@stdlib/array-float64/lib/polyfill.js","../node_modules/@stdlib/assert-is-float32array/lib/main.js","../node_modules/@stdlib/assert-has-float32array-support/lib/float32array.js","../node_modules/@stdlib/array-float32/lib/main.js","../node_modules/@stdlib/array-float32/lib/index.js","../node_modules/@stdlib/assert-has-float32array-support/lib/main.js","../node_modules/@stdlib/array-float32/lib/polyfill.js","../node_modules/@stdlib/assert-is-int16array/lib/main.js","../node_modules/@stdlib/constants-int16-max/lib/index.js","../node_modules/@stdlib/assert-has-int16array-support/lib/int16array.js","../node_modules/@stdlib/array-int16/lib/main.js","../node_modules/@stdlib/array-int16/lib/index.js","../node_modules/@stdlib/assert-has-int16array-support/lib/main.js","../node_modules/@stdlib/constants-int16-min/lib/index.js","../node_modules/@stdlib/array-int16/lib/polyfill.js","../node_modules/@stdlib/assert-is-int32array/lib/main.js","../node_modules/@stdlib/constants-int32-max/lib/index.js","../node_modules/@stdlib/assert-has-int32array-support/lib/int32array.js","../node_modules/@stdlib/array-int32/lib/main.js","../node_modules/@stdlib/array-int32/lib/index.js","../node_modules/@stdlib/assert-has-int32array-support/lib/main.js","../node_modules/@stdlib/constants-int32-min/lib/index.js","../node_modules/@stdlib/array-int32/lib/polyfill.js","../node_modules/@stdlib/assert-is-int8array/lib/main.js","../node_modules/@stdlib/constants-int8-max/lib/index.js","../node_modules/@stdlib/assert-has-int8array-support/lib/int8array.js","../node_modules/@stdlib/array-int8/lib/main.js","../node_modules/@stdlib/array-int8/lib/index.js","../node_modules/@stdlib/assert-has-int8array-support/lib/main.js","../node_modules/@stdlib/constants-int8-min/lib/index.js","../node_modules/@stdlib/array-int8/lib/polyfill.js","../node_modules/@stdlib/assert-is-uint16array/lib/main.js","../node_modules/@stdlib/constants-uint16-max/lib/index.js","../node_modules/@stdlib/assert-has-uint16array-support/lib/uint16array.js","../node_modules/@stdlib/array-uint16/lib/main.js","../node_modules/@stdlib/array-uint16/lib/index.js","../node_modules/@stdlib/assert-has-uint16array-support/lib/main.js","../node_modules/@stdlib/array-uint16/lib/polyfill.js","../node_modules/@stdlib/assert-is-uint32array/lib/main.js","../node_modules/@stdlib/constants-uint32-max/lib/index.js","../node_modules/@stdlib/assert-has-uint32array-support/lib/uint32array.js","../node_modules/@stdlib/array-uint32/lib/main.js","../node_modules/@stdlib/array-uint32/lib/index.js","../node_modules/@stdlib/assert-has-uint32array-support/lib/main.js","../node_modules/@stdlib/array-uint32/lib/polyfill.js","../node_modules/@stdlib/assert-is-uint8array/lib/main.js","../node_modules/@stdlib/constants-uint8-max/lib/index.js","../node_modules/@stdlib/assert-has-uint8array-support/lib/uint8array.js","../node_modules/@stdlib/array-uint8/lib/main.js","../node_modules/@stdlib/array-uint8/lib/index.js","../node_modules/@stdlib/assert-has-uint8array-support/lib/main.js","../node_modules/@stdlib/array-uint8/lib/polyfill.js","../node_modules/@stdlib/assert-is-uint8clampedarray/lib/main.js","../node_modules/@stdlib/assert-has-uint8clampedarray-support/lib/uint8clampedarray.js","../node_modules/@stdlib/array-uint8c/lib/main.js","../node_modules/@stdlib/array-uint8c/lib/index.js","../node_modules/@stdlib/assert-has-uint8clampedarray-support/lib/main.js","../node_modules/@stdlib/array-uint8c/lib/polyfill.js","../node_modules/@stdlib/assert-is-array-like-object/lib/main.js","../node_modules/@stdlib/constants-array-max-array-length/lib/index.js","../node_modules/@stdlib/assert-is-collection/lib/main.js","../node_modules/@stdlib/constants-array-max-typed-array-length/lib/index.js","../node_modules/@stdlib/assert-is-arraybuffer/lib/main.js","../node_modules/@stdlib/assert-is-array/lib/main.js","../node_modules/@stdlib/assert-is-object/lib/main.js","../node_modules/@stdlib/utils-type-of/lib/fixtures/re.js","../node_modules/@stdlib/assert-is-boolean/lib/primitive.js","../node_modules/@stdlib/boolean-ctor/lib/main.js","../node_modules/@stdlib/assert-is-boolean/lib/tostring.js","../node_modules/@stdlib/assert-is-boolean/lib/object.js","../node_modules/@stdlib/assert-is-boolean/lib/try2serialize.js","../node_modules/@stdlib/assert-is-boolean/lib/main.js","../node_modules/@stdlib/utils-global/lib/codegen.js","../node_modules/@stdlib/assert-is-boolean/lib/index.js","../node_modules/@stdlib/utils-global/lib/self.js","../node_modules/@stdlib/utils-global/lib/window.js","../node_modules/@stdlib/utils-global/lib/global.js","../node_modules/@stdlib/utils-global/lib/global_this.js","../node_modules/@stdlib/utils-type-of/lib/fixtures/nodelist.js","../node_modules/@stdlib/utils-global/lib/main.js","../node_modules/@stdlib/utils-type-of/lib/fixtures/typedarray.js","../node_modules/@stdlib/regexp-function-name/lib/main.js","../node_modules/@stdlib/regexp-function-name/lib/regexp.js","../node_modules/@stdlib/assert-is-object-like/lib/main.js","../node_modules/@stdlib/utils-constructor-name/lib/main.js","../node_modules/@stdlib/assert-is-buffer/lib/main.js","../node_modules/@stdlib/regexp-function-name/lib/index.js","../node_modules/@stdlib/assert-is-object-like/lib/index.js","../node_modules/@stdlib/assert-tools-array-function/lib/main.js","../node_modules/@stdlib/utils-type-of/lib/index.js","../node_modules/@stdlib/utils-type-of/lib/check.js","../node_modules/@stdlib/utils-type-of/lib/polyfill.js","../node_modules/@stdlib/utils-type-of/lib/main.js","../node_modules/@stdlib/assert-is-function/lib/main.js","../node_modules/@stdlib/complex-float64/lib/main.js","../node_modules/@stdlib/complex-float64/lib/tostring.js","../node_modules/@stdlib/complex-float64/lib/tojson.js","../node_modules/@stdlib/number-float64-base-to-float32/lib/main.js","../node_modules/@stdlib/number-float64-base-to-float32/lib/polyfill.js","../node_modules/@stdlib/number-float64-base-to-float32/lib/index.js","../node_modules/@stdlib/complex-float32/lib/main.js","../node_modules/@stdlib/assert-is-complex-like/lib/main.js","../node_modules/@stdlib/math-base-assert-is-even/lib/main.js","../node_modules/@stdlib/assert-has-iterator-symbol-support/lib/main.js","../node_modules/@stdlib/complex-float32/lib/tostring.js","../node_modules/@stdlib/complex-float32/lib/tojson.js","../node_modules/@stdlib/symbol-iterator/lib/main.js","../node_modules/@stdlib/utils-define-nonenumerable-read-only-accessor/lib/main.js","../node_modules/@stdlib/complex-realf/lib/main.js","../node_modules/@stdlib/complex-imagf/lib/main.js","../node_modules/@stdlib/strided-base-reinterpret-complex64/lib/main.js","../node_modules/@stdlib/strided-base-reinterpret-complex128/lib/main.js","../node_modules/@stdlib/array-base-getter/lib/main.js","../node_modules/@stdlib/array-base-accessor-getter/lib/main.js","../node_modules/@stdlib/array-complex64/lib/from_iterator.js","../node_modules/@stdlib/array-complex64/lib/from_iterator_map.js","../node_modules/@stdlib/array-complex64/lib/from_array.js","../node_modules/@stdlib/array-complex64/lib/main.js","../node_modules/@stdlib/complex-real/lib/main.js","../node_modules/@stdlib/complex-imag/lib/main.js","../node_modules/@stdlib/array-complex128/lib/from_iterator.js","../node_modules/@stdlib/array-complex128/lib/from_iterator_map.js","../node_modules/@stdlib/array-complex128/lib/from_array.js","../node_modules/@stdlib/array-complex128/lib/main.js","../node_modules/@stdlib/array-ctors/lib/ctors.js","../node_modules/@stdlib/array-ctors/lib/main.js","../node_modules/@stdlib/array-base-zeros/lib/main.js","../node_modules/@stdlib/array-base-filled/lib/main.js","../node_modules/@stdlib/array-zeros/lib/main.js","../lib/polyfill.js"],"sourcesContent":["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Object.defineProperty === 'function' ) ? Object.defineProperty : null;\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Defines (or modifies) an object property.\n*\n* ## Notes\n*\n* - Property descriptors come in two flavors: **data descriptors** and **accessor descriptors**. A data descriptor is a property that has a value, which may or may not be writable. An accessor descriptor is a property described by a getter-setter function pair. A descriptor must be one of these two flavors and cannot be both.\n*\n* @name defineProperty\n* @type {Function}\n* @param {Object} obj - object on which to define the property\n* @param {(string|symbol)} prop - property name\n* @param {Object} descriptor - property descriptor\n* @param {boolean} [descriptor.configurable=false] - boolean indicating if property descriptor can be changed and if the property can be deleted from the provided object\n* @param {boolean} [descriptor.enumerable=false] - boolean indicating if the property shows up when enumerating object properties\n* @param {boolean} [descriptor.writable=false] - boolean indicating if the value associated with the property can be changed with an assignment operator\n* @param {*} [descriptor.value] - property value\n* @param {(Function|void)} [descriptor.get=undefined] - function which serves as a getter for the property, or, if no getter, undefined. When the property is accessed, a getter function is called without arguments and with the `this` context set to the object through which the property is accessed (which may not be the object on which the property is defined due to inheritance). The return value will be used as the property value.\n* @param {(Function|void)} [descriptor.set=undefined] - function which serves as a setter for the property, or, if no setter, undefined. When assigning a property value, a setter function is called with one argument (the value being assigned to the property) and with the `this` context set to the object through which the property is assigned.\n* @throws {TypeError} first argument must be an object\n* @throws {TypeError} third argument must be an object\n* @throws {Error} property descriptor cannot have both a value and a setter and/or getter\n* @returns {Object} object with added property\n*\n* @example\n* var obj = {};\n*\n* defineProperty( obj, 'foo', {\n* 'value': 'bar'\n* });\n*\n* var str = obj.foo;\n* // returns 'bar'\n*/\nvar defineProperty = Object.defineProperty;\n\n\n// EXPORTS //\n\nexport default defineProperty;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Tests if a value is a number primitive.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number primitive\n*\n* @example\n* var bool = isNumber( 3.14 );\n* // returns true\n*\n* @example\n* var bool = isNumber( NaN );\n* // returns true\n*\n* @example\n* var bool = isNumber( new Number( 3.14 ) );\n* // returns false\n*/\nfunction isNumber( value ) {\n\treturn ( typeof value === 'number' ); // NOTE: we inline the `isNumber.isPrimitive` function from `@stdlib/assert/is-number` in order to avoid circular dependencies.\n}\n\n\n// EXPORTS //\n\nexport default isNumber;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// FUNCTIONS //\n\n/**\n* Tests if a string starts with a minus sign (`-`).\n*\n* @private\n* @param {string} str - input string\n* @returns {boolean} boolean indicating if a string starts with a minus sign (`-`)\n*/\nfunction startsWithMinus( str ) {\n\treturn str[ 0 ] === '-';\n}\n\n/**\n* Returns a string of `n` zeros.\n*\n* @private\n* @param {number} n - number of zeros\n* @returns {string} string of zeros\n*/\nfunction zeros( n ) {\n\tvar out = '';\n\tvar i;\n\tfor ( i = 0; i < n; i++ ) {\n\t\tout += '0';\n\t}\n\treturn out;\n}\n\n\n// MAIN //\n\n/**\n* Pads a token with zeros to the specified width.\n*\n* @private\n* @param {string} str - token argument\n* @param {number} width - token width\n* @param {boolean} [right=false] - boolean indicating whether to pad to the right\n* @returns {string} padded token argument\n*/\nfunction zeroPad( str, width, right ) {\n\tvar negative = false;\n\tvar pad = width - str.length;\n\tif ( pad < 0 ) {\n\t\treturn str;\n\t}\n\tif ( startsWithMinus( str ) ) {\n\t\tnegative = true;\n\t\tstr = str.substr( 1 );\n\t}\n\tstr = ( right ) ?\n\t\tstr + zeros( pad ) :\n\t\tzeros( pad ) + str;\n\tif ( negative ) {\n\t\tstr = '-' + str;\n\t}\n\treturn str;\n}\n\n\n// EXPORTS //\n\nexport default zeroPad;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isNumber from './is_number.js';\nimport zeroPad from './zero_pad.js';\n\n// NOTE: for the following, we explicitly avoid using stdlib packages in this particular package in order to avoid circular dependencies.\nvar lowercase = String.prototype.toLowerCase;\nvar uppercase = String.prototype.toUpperCase;\n\n\n// MAIN //\n\n/**\n* Formats a token object argument as an integer.\n*\n* @private\n* @param {Object} token - token object\n* @throws {Error} must provide a valid integer\n* @returns {string} formatted token argument\n*/\nfunction formatInteger( token ) {\n\tvar base;\n\tvar out;\n\tvar i;\n\n\tswitch ( token.specifier ) {\n\tcase 'b':\n\t\t// Case: %b (binary)\n\t\tbase = 2;\n\t\tbreak;\n\tcase 'o':\n\t\t// Case: %o (octal)\n\t\tbase = 8;\n\t\tbreak;\n\tcase 'x':\n\tcase 'X':\n\t\t// Case: %x, %X (hexadecimal)\n\t\tbase = 16;\n\t\tbreak;\n\tcase 'd':\n\tcase 'i':\n\tcase 'u':\n\tdefault:\n\t\t// Case: %d, %i, %u (decimal)\n\t\tbase = 10;\n\t\tbreak;\n\t}\n\tout = token.arg;\n\ti = parseInt( out, 10 );\n\tif ( !isFinite( i ) ) { // NOTE: We use the global `isFinite` function here instead of `@stdlib/math/base/assert/is-finite` in order to avoid circular dependencies.\n\t\tif ( !isNumber( out ) ) {\n\t\t\tthrow new Error( 'invalid integer. Value: ' + out );\n\t\t}\n\t\ti = 0;\n\t}\n\tif ( i < 0 && ( token.specifier === 'u' || base !== 10 ) ) {\n\t\ti = 0xffffffff + i + 1;\n\t}\n\tif ( i < 0 ) {\n\t\tout = ( -i ).toString( base );\n\t\tif ( token.precision ) {\n\t\t\tout = zeroPad( out, token.precision, token.padRight );\n\t\t}\n\t\tout = '-' + out;\n\t} else {\n\t\tout = i.toString( base );\n\t\tif ( !i && !token.precision ) {\n\t\t\tout = '';\n\t\t} else if ( token.precision ) {\n\t\t\tout = zeroPad( out, token.precision, token.padRight );\n\t\t}\n\t\tif ( token.sign ) {\n\t\t\tout = token.sign + out;\n\t\t}\n\t}\n\tif ( base === 16 ) {\n\t\tif ( token.alternate ) {\n\t\t\tout = '0x' + out;\n\t\t}\n\t\tout = ( token.specifier === uppercase.call( token.specifier ) ) ?\n\t\t\tuppercase.call( out ) :\n\t\t\tlowercase.call( out );\n\t}\n\tif ( base === 8 ) {\n\t\tif ( token.alternate && out.charAt( 0 ) !== '0' ) {\n\t\t\tout = '0' + out;\n\t\t}\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default formatInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Tests if a value is a string primitive.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a string primitive\n*\n* @example\n* var bool = isString( 'beep' );\n* // returns true\n*\n* @example\n* var bool = isString( new String( 'beep' ) );\n* // returns false\n*/\nfunction isString( value ) {\n\treturn ( typeof value === 'string' ); // NOTE: we inline the `isString.isPrimitive` function from `@stdlib/assert/is-string` in order to avoid circular dependencies.\n}\n\n\n// EXPORTS //\n\nexport default isString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isNumber from './is_number.js';\n\n// NOTE: for the following, we explicitly avoid using stdlib packages in this particular package in order to avoid circular dependencies.\nvar abs = Math.abs; // eslint-disable-line stdlib/no-builtin-math\nvar lowercase = String.prototype.toLowerCase;\nvar uppercase = String.prototype.toUpperCase;\nvar replace = String.prototype.replace;\n\n\n// VARIABLES //\n\nvar RE_EXP_POS_DIGITS = /e\\+(\\d)$/;\nvar RE_EXP_NEG_DIGITS = /e-(\\d)$/;\nvar RE_ONLY_DIGITS = /^(\\d+)$/;\nvar RE_DIGITS_BEFORE_EXP = /^(\\d+)e/;\nvar RE_TRAILING_PERIOD_ZERO = /\\.0$/;\nvar RE_PERIOD_ZERO_EXP = /\\.0*e/;\nvar RE_ZERO_BEFORE_EXP = /(\\..*[^0])0*e/;\n\n\n// MAIN //\n\n/**\n* Formats a token object argument as a floating-point number.\n*\n* @private\n* @param {Object} token - token object\n* @throws {Error} must provide a valid floating-point number\n* @returns {string} formatted token argument\n*/\nfunction formatDouble( token ) {\n\tvar digits;\n\tvar out;\n\tvar f = parseFloat( token.arg );\n\tif ( !isFinite( f ) ) { // NOTE: We use the global `isFinite` function here instead of `@stdlib/math/base/assert/is-finite` in order to avoid circular dependencies.\n\t\tif ( !isNumber( token.arg ) ) {\n\t\t\tthrow new Error( 'invalid floating-point number. Value: ' + out );\n\t\t}\n\t\t// Case: NaN, Infinity, or -Infinity\n\t\tf = token.arg;\n\t}\n\tswitch ( token.specifier ) {\n\tcase 'e':\n\tcase 'E':\n\t\tout = f.toExponential( token.precision );\n\t\tbreak;\n\tcase 'f':\n\tcase 'F':\n\t\tout = f.toFixed( token.precision );\n\t\tbreak;\n\tcase 'g':\n\tcase 'G':\n\t\tif ( abs( f ) < 0.0001 ) {\n\t\t\tdigits = token.precision;\n\t\t\tif ( digits > 0 ) {\n\t\t\t\tdigits -= 1;\n\t\t\t}\n\t\t\tout = f.toExponential( digits );\n\t\t} else {\n\t\t\tout = f.toPrecision( token.precision );\n\t\t}\n\t\tif ( !token.alternate ) {\n\t\t\tout = replace.call( out, RE_ZERO_BEFORE_EXP, '$1e' );\n\t\t\tout = replace.call( out, RE_PERIOD_ZERO_EXP, 'e');\n\t\t\tout = replace.call( out, RE_TRAILING_PERIOD_ZERO, '' );\n\t\t}\n\t\tbreak;\n\tdefault:\n\t\tthrow new Error( 'invalid double notation. Value: ' + token.specifier );\n\t}\n\tout = replace.call( out, RE_EXP_POS_DIGITS, 'e+0$1' );\n\tout = replace.call( out, RE_EXP_NEG_DIGITS, 'e-0$1' );\n\tif ( token.alternate ) {\n\t\tout = replace.call( out, RE_ONLY_DIGITS, '$1.' );\n\t\tout = replace.call( out, RE_DIGITS_BEFORE_EXP, '$1.e' );\n\t}\n\tif ( f >= 0 && token.sign ) {\n\t\tout = token.sign + out;\n\t}\n\tout = ( token.specifier === uppercase.call( token.specifier ) ) ?\n\t\tuppercase.call( out ) :\n\t\tlowercase.call( out );\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default formatDouble;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// FUNCTIONS //\n\n/**\n* Returns `n` spaces.\n*\n* @private\n* @param {number} n - number of spaces\n* @returns {string} string of spaces\n*/\nfunction spaces( n ) {\n\tvar out = '';\n\tvar i;\n\tfor ( i = 0; i < n; i++ ) {\n\t\tout += ' ';\n\t}\n\treturn out;\n}\n\n\n// MAIN //\n\n/**\n* Pads a token with spaces to the specified width.\n*\n* @private\n* @param {string} str - token argument\n* @param {number} width - token width\n* @param {boolean} [right=false] - boolean indicating whether to pad to the right\n* @returns {string} padded token argument\n*/\nfunction spacePad( str, width, right ) {\n\tvar pad = width - str.length;\n\tif ( pad < 0 ) {\n\t\treturn str;\n\t}\n\tstr = ( right ) ?\n\t\tstr + spaces( pad ) :\n\t\tspaces( pad ) + str;\n\treturn str;\n}\n\n\n// EXPORTS //\n\nexport default spacePad;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport formatInteger from './format_integer.js';\nimport isString from './is_string.js';\nimport formatDouble from './format_double.js';\nimport spacePad from './space_pad.js';\nimport zeroPad from './zero_pad.js';\n\n\n// VARIABLES //\n\nvar fromCharCode = String.fromCharCode;\nvar isnan = isNaN; // NOTE: We use the global `isNaN` function here instead of `@stdlib/math/base/assert/is-nan` to avoid circular dependencies.\nvar isArray = Array.isArray; // NOTE: We use the global `Array.isArray` function here instead of `@stdlib/assert/is-array` to avoid circular dependencies.\n\n\n// FUNCTIONS //\n\n/**\n* Initializes token object with properties of supplied format identifier object or default values if not present.\n*\n* @private\n* @param {Object} token - format identifier object\n* @returns {Object} token object\n*/\nfunction initialize( token ) {\n\tvar out = {};\n\tout.specifier = token.specifier;\n\tout.precision = ( token.precision === void 0 ) ? 1 : token.precision;\n\tout.width = token.width;\n\tout.flags = token.flags || '';\n\tout.mapping = token.mapping;\n\treturn out;\n}\n\n\n// MAIN //\n\n/**\n* Generates string from a token array by interpolating values.\n*\n* @param {Array} tokens - string parts and format identifier objects\n* @param {Array} ...args - variable values\n* @throws {TypeError} first argument must be an array\n* @throws {Error} invalid flags\n* @returns {string} formatted string\n*\n* @example\n* var tokens = [ 'beep ', { 'specifier': 's' } ];\n* var out = formatInterpolate( tokens, 'boop' );\n* // returns 'beep boop'\n*/\nfunction formatInterpolate( tokens ) {\n\tvar hasPeriod;\n\tvar flags;\n\tvar token;\n\tvar flag;\n\tvar num;\n\tvar out;\n\tvar pos;\n\tvar i;\n\tvar j;\n\n\tif ( !isArray( tokens ) ) {\n\t\tthrow new TypeError( 'invalid argument. First argument must be an array. Value: `' + tokens + '`.' );\n\t}\n\tout = '';\n\tpos = 1;\n\tfor ( i = 0; i < tokens.length; i++ ) {\n\t\ttoken = tokens[ i ];\n\t\tif ( isString( token ) ) {\n\t\t\tout += token;\n\t\t} else {\n\t\t\thasPeriod = token.precision !== void 0;\n\t\t\ttoken = initialize( token );\n\t\t\tif ( !token.specifier ) {\n\t\t\t\tthrow new TypeError( 'invalid argument. Token is missing `specifier` property. Index: `'+ i +'`. Value: `' + token + '`.' );\n\t\t\t}\n\t\t\tif ( token.mapping ) {\n\t\t\t\tpos = token.mapping;\n\t\t\t}\n\t\t\tflags = token.flags;\n\t\t\tfor ( j = 0; j < flags.length; j++ ) {\n\t\t\t\tflag = flags.charAt( j );\n\t\t\t\tswitch ( flag ) {\n\t\t\t\tcase ' ':\n\t\t\t\t\ttoken.sign = ' ';\n\t\t\t\t\tbreak;\n\t\t\t\tcase '+':\n\t\t\t\t\ttoken.sign = '+';\n\t\t\t\t\tbreak;\n\t\t\t\tcase '-':\n\t\t\t\t\ttoken.padRight = true;\n\t\t\t\t\ttoken.padZeros = false;\n\t\t\t\t\tbreak;\n\t\t\t\tcase '0':\n\t\t\t\t\ttoken.padZeros = flags.indexOf( '-' ) < 0; // NOTE: We use built-in `Array.prototype.indexOf` here instead of `@stdlib/assert/contains` in order to avoid circular dependencies.\n\t\t\t\t\tbreak;\n\t\t\t\tcase '#':\n\t\t\t\t\ttoken.alternate = true;\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tthrow new Error( 'invalid flag: ' + flag );\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( token.width === '*' ) {\n\t\t\t\ttoken.width = parseInt( arguments[ pos ], 10 );\n\t\t\t\tpos += 1;\n\t\t\t\tif ( isnan( token.width ) ) {\n\t\t\t\t\tthrow new TypeError( 'the argument for * width at position ' + pos + ' is not a number. Value: `' + token.width + '`.' );\n\t\t\t\t}\n\t\t\t\tif ( token.width < 0 ) {\n\t\t\t\t\ttoken.padRight = true;\n\t\t\t\t\ttoken.width = -token.width;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( hasPeriod ) {\n\t\t\t\tif ( token.precision === '*' ) {\n\t\t\t\t\ttoken.precision = parseInt( arguments[ pos ], 10 );\n\t\t\t\t\tpos += 1;\n\t\t\t\t\tif ( isnan( token.precision ) ) {\n\t\t\t\t\t\tthrow new TypeError( 'the argument for * precision at position ' + pos + ' is not a number. Value: `' + token.precision + '`.' );\n\t\t\t\t\t}\n\t\t\t\t\tif ( token.precision < 0 ) {\n\t\t\t\t\t\ttoken.precision = 1;\n\t\t\t\t\t\thasPeriod = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\ttoken.arg = arguments[ pos ];\n\t\t\tswitch ( token.specifier ) {\n\t\t\tcase 'b':\n\t\t\tcase 'o':\n\t\t\tcase 'x':\n\t\t\tcase 'X':\n\t\t\tcase 'd':\n\t\t\tcase 'i':\n\t\t\tcase 'u':\n\t\t\t\t// Case: %b (binary), %o (octal), %x, %X (hexadecimal), %d, %i (decimal), %u (unsigned decimal)\n\t\t\t\tif ( hasPeriod ) {\n\t\t\t\t\ttoken.padZeros = false;\n\t\t\t\t}\n\t\t\t\ttoken.arg = formatInteger( token );\n\t\t\t\tbreak;\n\t\t\tcase 's':\n\t\t\t\t// Case: %s (string)\n\t\t\t\ttoken.maxWidth = ( hasPeriod ) ? token.precision : -1;\n\t\t\t\tbreak;\n\t\t\tcase 'c':\n\t\t\t\t// Case: %c (character)\n\t\t\t\tif ( !isnan( token.arg ) ) {\n\t\t\t\t\tnum = parseInt( token.arg, 10 );\n\t\t\t\t\tif ( num < 0 || num > 127 ) {\n\t\t\t\t\t\tthrow new Error( 'invalid character code. Value: ' + token.arg );\n\t\t\t\t\t}\n\t\t\t\t\ttoken.arg = ( isnan( num ) ) ?\n\t\t\t\t\t\tString( token.arg ) :\n\t\t\t\t\t\tfromCharCode( num );\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'e':\n\t\t\tcase 'E':\n\t\t\tcase 'f':\n\t\t\tcase 'F':\n\t\t\tcase 'g':\n\t\t\tcase 'G':\n\t\t\t\t// Case: %e, %E (scientific notation), %f, %F (decimal floating point), %g, %G (uses the shorter of %e/E or %f/F)\n\t\t\t\tif ( !hasPeriod ) {\n\t\t\t\t\ttoken.precision = 6;\n\t\t\t\t}\n\t\t\t\ttoken.arg = formatDouble( token );\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tthrow new Error( 'invalid specifier: ' + token.specifier );\n\t\t\t}\n\t\t\t// Fit argument into field width...\n\t\t\tif ( token.maxWidth >= 0 && token.arg.length > token.maxWidth ) {\n\t\t\t\ttoken.arg = token.arg.substring( 0, token.maxWidth );\n\t\t\t}\n\t\t\tif ( token.padZeros ) {\n\t\t\t\ttoken.arg = zeroPad( token.arg, token.width || token.precision, token.padRight ); // eslint-disable-line max-len\n\t\t\t} else if ( token.width ) {\n\t\t\t\ttoken.arg = spacePad( token.arg, token.width, token.padRight );\n\t\t\t}\n\t\t\tout += token.arg || '';\n\t\t\tpos += 1;\n\t\t}\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default formatInterpolate;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// VARIABLES //\n\nvar RE = /%(?:([1-9]\\d*)\\$)?([0 +\\-#]*)(\\*|\\d+)?(?:(\\.)(\\*|\\d+)?)?[hlL]?([%A-Za-z])/g;\n\n\n// FUNCTIONS //\n\n/**\n* Parses a delimiter.\n*\n* @private\n* @param {Array} match - regular expression match\n* @returns {Object} delimiter token object\n*/\nfunction parse( match ) {\n\tvar token = {\n\t\t'mapping': ( match[ 1 ] ) ? parseInt( match[ 1 ], 10 ) : void 0,\n\t\t'flags': match[ 2 ],\n\t\t'width': match[ 3 ],\n\t\t'precision': match[ 5 ],\n\t\t'specifier': match[ 6 ]\n\t};\n\tif ( match[ 4 ] === '.' && match[ 5 ] === void 0 ) {\n\t\ttoken.precision = '1';\n\t}\n\treturn token;\n}\n\n\n// MAIN //\n\n/**\n* Tokenizes a string into an array of string parts and format identifier objects.\n*\n* @param {string} str - input string\n* @returns {Array} tokens\n*\n* @example\n* var tokens = formatTokenize( 'Hello %s!' );\n* // returns [ 'Hello ', {...}, '!' ]\n*/\nfunction formatTokenize( str ) {\n\tvar content;\n\tvar tokens;\n\tvar match;\n\tvar prev;\n\n\ttokens = [];\n\tprev = 0;\n\tmatch = RE.exec( str );\n\twhile ( match ) {\n\t\tcontent = str.slice( prev, RE.lastIndex - match[ 0 ].length );\n\t\tif ( content.length ) {\n\t\t\ttokens.push( content );\n\t\t}\n\t\ttokens.push( parse( match ) );\n\t\tprev = RE.lastIndex;\n\t\tmatch = RE.exec( str );\n\t}\n\tcontent = str.slice( prev );\n\tif ( content.length ) {\n\t\ttokens.push( content );\n\t}\n\treturn tokens;\n}\n\n\n// EXPORTS //\n\nexport default formatTokenize;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Tests if a value is a string primitive.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a string primitive\n*\n* @example\n* var bool = isString( 'beep' );\n* // returns true\n*\n* @example\n* var bool = isString( new String( 'beep' ) );\n* // returns false\n*/\nfunction isString( value ) {\n\treturn ( typeof value === 'string' ); // NOTE: we inline the `isString.isPrimitive` function from `@stdlib/assert/is-string` in order to avoid circular dependencies.\n}\n\n\n// EXPORTS //\n\nexport default isString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport interpolate from '@stdlib/string-base-format-interpolate';\nimport tokenize from '@stdlib/string-base-format-tokenize';\nimport isString from './is_string.js';\n\n\n// MAIN //\n\n/**\n* Inserts supplied variable values into a format string.\n*\n* @param {string} str - input string\n* @param {Array} ...args - variable values\n* @throws {TypeError} first argument must be a string\n* @throws {Error} invalid flags\n* @returns {string} formatted string\n*\n* @example\n* var str = format( 'Hello %s!', 'world' );\n* // returns 'Hello world!'\n*\n* @example\n* var str = format( 'Pi: ~%.2f', 3.141592653589793 );\n* // returns 'Pi: ~3.14'\n*/\nfunction format( str ) {\n\tvar tokens;\n\tvar args;\n\tvar i;\n\n\tif ( !isString( str ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a string. Value: `%s`.', str ) );\n\t}\n\ttokens = tokenize( str );\n\targs = new Array( arguments.length );\n\targs[ 0 ] = tokens;\n\tfor ( i = 1; i < args.length; i++ ) {\n\t\targs[ i ] = arguments[ i ];\n\t}\n\treturn interpolate.apply( null, args );\n}\n\n\n// EXPORTS //\n\nexport default format;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable no-underscore-dangle, no-proto */\n\n'use strict';\n\n// MODULES //\n\nimport format from '@stdlib/string-format';\n\n\n// VARIABLES //\n\nvar objectProtoype = Object.prototype;\nvar toStr = objectProtoype.toString;\nvar defineGetter = objectProtoype.__defineGetter__;\nvar defineSetter = objectProtoype.__defineSetter__;\nvar lookupGetter = objectProtoype.__lookupGetter__;\nvar lookupSetter = objectProtoype.__lookupSetter__;\n\n\n// MAIN //\n\n/**\n* Defines (or modifies) an object property.\n*\n* ## Notes\n*\n* - Property descriptors come in two flavors: **data descriptors** and **accessor descriptors**. A data descriptor is a property that has a value, which may or may not be writable. An accessor descriptor is a property described by a getter-setter function pair. A descriptor must be one of these two flavors and cannot be both.\n*\n* @param {Object} obj - object on which to define the property\n* @param {string} prop - property name\n* @param {Object} descriptor - property descriptor\n* @param {boolean} [descriptor.configurable=false] - boolean indicating if property descriptor can be changed and if the property can be deleted from the provided object\n* @param {boolean} [descriptor.enumerable=false] - boolean indicating if the property shows up when enumerating object properties\n* @param {boolean} [descriptor.writable=false] - boolean indicating if the value associated with the property can be changed with an assignment operator\n* @param {*} [descriptor.value] - property value\n* @param {(Function|void)} [descriptor.get=undefined] - function which serves as a getter for the property, or, if no getter, undefined. When the property is accessed, a getter function is called without arguments and with the `this` context set to the object through which the property is accessed (which may not be the object on which the property is defined due to inheritance). The return value will be used as the property value.\n* @param {(Function|void)} [descriptor.set=undefined] - function which serves as a setter for the property, or, if no setter, undefined. When assigning a property value, a setter function is called with one argument (the value being assigned to the property) and with the `this` context set to the object through which the property is assigned.\n* @throws {TypeError} first argument must be an object\n* @throws {TypeError} third argument must be an object\n* @throws {Error} property descriptor cannot have both a value and a setter and/or getter\n* @returns {Object} object with added property\n*\n* @example\n* var obj = {};\n*\n* defineProperty( obj, 'foo', {\n* 'value': 'bar'\n* });\n*\n* var str = obj.foo;\n* // returns 'bar'\n*/\nfunction defineProperty( obj, prop, descriptor ) {\n\tvar prototype;\n\tvar hasValue;\n\tvar hasGet;\n\tvar hasSet;\n\n\tif ( typeof obj !== 'object' || obj === null || toStr.call( obj ) === '[object Array]' ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be an object. Value: `%s`.', obj ) );\n\t}\n\tif ( typeof descriptor !== 'object' || descriptor === null || toStr.call( descriptor ) === '[object Array]' ) {\n\t\tthrow new TypeError( format( 'invalid argument. Property descriptor must be an object. Value: `%s`.', descriptor ) );\n\t}\n\thasValue = ( 'value' in descriptor );\n\tif ( hasValue ) {\n\t\tif (\n\t\t\tlookupGetter.call( obj, prop ) ||\n\t\t\tlookupSetter.call( obj, prop )\n\t\t) {\n\t\t\t// Override `__proto__` to avoid touching inherited accessors:\n\t\t\tprototype = obj.__proto__;\n\t\t\tobj.__proto__ = objectProtoype;\n\n\t\t\t// Delete property as existing getters/setters prevent assigning value to specified property:\n\t\t\tdelete obj[ prop ];\n\t\t\tobj[ prop ] = descriptor.value;\n\n\t\t\t// Restore original prototype:\n\t\t\tobj.__proto__ = prototype;\n\t\t} else {\n\t\t\tobj[ prop ] = descriptor.value;\n\t\t}\n\t}\n\thasGet = ( 'get' in descriptor );\n\thasSet = ( 'set' in descriptor );\n\n\tif ( hasValue && ( hasGet || hasSet ) ) {\n\t\tthrow new Error( 'invalid argument. Cannot specify one or more accessors and a value or writable attribute in the property descriptor.' );\n\t}\n\n\tif ( hasGet && defineGetter ) {\n\t\tdefineGetter.call( obj, prop, descriptor.get );\n\t}\n\tif ( hasSet && defineSetter ) {\n\t\tdefineSetter.call( obj, prop, descriptor.set );\n\t}\n\treturn obj;\n}\n\n\n// EXPORTS //\n\nexport default defineProperty;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Define (or modify) an object property.\n*\n* @module @stdlib/utils-define-property\n*\n* @example\n* import defineProperty from '@stdlib/utils-define-property';\n*\n* var obj = {};\n* defineProperty( obj, 'foo', {\n* 'value': 'bar',\n* 'writable': false,\n* 'configurable': false,\n* 'enumerable': false\n* });\n* obj.foo = 'boop'; // => throws\n*/\n\n// MODULES //\n\nimport hasDefinePropertySupport from './has_define_property_support.js';\nimport builtin from './builtin.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar defineProperty;\nif ( hasDefinePropertySupport() ) {\n\tdefineProperty = builtin;\n} else {\n\tdefineProperty = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default defineProperty;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport defineProperty from './define_property.js';\n\n\n// MAIN //\n\n/**\n* Tests for `Object.defineProperty` support.\n*\n* @private\n* @returns {boolean} boolean indicating if an environment has `Object.defineProperty` support\n*\n* @example\n* var bool = hasDefinePropertySupport();\n* // returns \n*/\nfunction hasDefinePropertySupport() {\n\t// Test basic support...\n\ttry {\n\t\tdefineProperty( {}, 'x', {} );\n\t\treturn true;\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\treturn false;\n\t}\n}\n\n\n// EXPORTS //\n\nexport default hasDefinePropertySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport defineProperty from '@stdlib/utils-define-property';\n\n\n// MAIN //\n\n/**\n* Defines a non-enumerable read-only property.\n*\n* @param {Object} obj - object on which to define the property\n* @param {(string|symbol)} prop - property name\n* @param {*} value - value to set\n*\n* @example\n* var obj = {};\n*\n* setNonEnumerableReadOnly( obj, 'foo', 'bar' );\n*\n* try {\n* obj.foo = 'boop';\n* } catch ( err ) {\n* console.error( err.message );\n* }\n*/\nfunction setNonEnumerableReadOnly( obj, prop, value ) {\n\tdefineProperty( obj, prop, {\n\t\t'configurable': false,\n\t\t'enumerable': false,\n\t\t'writable': false,\n\t\t'value': value\n\t});\n}\n\n\n// EXPORTS //\n\nexport default setNonEnumerableReadOnly;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Tests if a value is a number primitive.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number primitive\n*\n* @example\n* var bool = isNumber( 3.14 );\n* // returns true\n*\n* @example\n* var bool = isNumber( NaN );\n* // returns true\n*\n* @example\n* var bool = isNumber( new Number( 3.14 ) );\n* // returns false\n*/\nfunction isNumber( value ) {\n\treturn ( typeof value === 'number' );\n}\n\n\n// EXPORTS //\n\nexport default isNumber;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport hasSymbols from '@stdlib/assert-has-symbol-support';\n\n\n// VARIABLES //\n\nvar FLG = hasSymbols();\n\n\n// MAIN //\n\n/**\n* Tests for native `toStringTag` support.\n*\n* @returns {boolean} boolean indicating if an environment has `toStringTag` support\n*\n* @example\n* var bool = hasToStringTagSupport();\n* // returns \n*/\nfunction hasToStringTagSupport() {\n\treturn ( FLG && typeof Symbol.toStringTag === 'symbol' );\n}\n\n\n// EXPORTS //\n\nexport default hasToStringTagSupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Tests for native `Symbol` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Symbol` support\n*\n* @example\n* var bool = hasSymbolSupport();\n* // returns \n*/\nfunction hasSymbolSupport() {\n\treturn (\n\t\ttypeof Symbol === 'function' &&\n\t\ttypeof Symbol( 'foo' ) === 'symbol'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default hasSymbolSupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar toStr = Object.prototype.toString;\n\n\n// EXPORTS //\n\nexport default toStr;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// FUNCTIONS //\n\nvar has = Object.prototype.hasOwnProperty;\n\n\n// MAIN //\n\n/**\n* Tests if an object has a specified property.\n*\n* @param {*} value - value to test\n* @param {*} property - property to test\n* @returns {boolean} boolean indicating if an object has a specified property\n*\n* @example\n* var beep = {\n* 'boop': true\n* };\n*\n* var bool = hasOwnProp( beep, 'boop' );\n* // returns true\n*\n* @example\n* var beep = {\n* 'boop': true\n* };\n*\n* var bool = hasOwnProp( beep, 'bap' );\n* // returns false\n*/\nfunction hasOwnProp( value, property ) {\n\tif (\n\t\tvalue === void 0 ||\n\t\tvalue === null\n\t) {\n\t\treturn false;\n\t}\n\treturn has.call( value, property );\n}\n\n\n// EXPORTS //\n\nexport default hasOwnProp;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar Sym = ( typeof Symbol === 'function' ) ? Symbol : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default Sym;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport Symbol from '@stdlib/symbol-ctor';\n\n\n// MAIN //\n\nvar toStrTag = ( typeof Symbol === 'function' ) ? Symbol.toStringTag : '';\n\n\n// EXPORTS //\n\nexport default toStrTag;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Return a string value indicating a specification defined classification of an object.\n*\n* @module @stdlib/utils-native-class\n*\n* @example\n* import nativeClass from '@stdlib/utils-native-class';\n*\n* var str = nativeClass( 'a' );\n* // returns '[object String]'\n*\n* str = nativeClass( 5 );\n* // returns '[object Number]'\n*\n* function Beep() {\n* return this;\n* }\n* str = nativeClass( new Beep() );\n* // returns '[object Object]'\n*/\n\n// MODULES //\n\nimport hasToStringTag from '@stdlib/assert-has-tostringtag-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar main;\nif ( hasToStringTag() ) {\n\tmain = polyfill;\n} else {\n\tmain = builtin;\n}\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport hasOwnProp from '@stdlib/assert-has-own-property';\nimport toStringTag from './tostringtag.js';\nimport toStr from './tostring.js';\n\n\n// MAIN //\n\n/**\n* Returns a string value indicating a specification defined classification of an object in environments supporting `Symbol.toStringTag`.\n*\n* @param {*} v - input value\n* @returns {string} string value indicating a specification defined classification of the input value\n*\n* @example\n* var str = nativeClass( 'a' );\n* // returns '[object String]'\n*\n* @example\n* var str = nativeClass( 5 );\n* // returns '[object Number]'\n*\n* @example\n* function Beep() {\n* return this;\n* }\n* var str = nativeClass( new Beep() );\n* // returns '[object Object]'\n*/\nfunction nativeClass( v ) {\n\tvar isOwn;\n\tvar tag;\n\tvar out;\n\n\tif ( v === null || v === void 0 ) {\n\t\treturn toStr.call( v );\n\t}\n\ttag = v[ toStringTag ];\n\tisOwn = hasOwnProp( v, toStringTag );\n\n\t// Attempt to override the `toStringTag` property. For built-ins having a `Symbol.toStringTag` property (e.g., `JSON`, `Math`, etc), the `Symbol.toStringTag` property is read-only (e.g., , so we need to wrap in a `try/catch`.\n\ttry {\n\t\tv[ toStringTag ] = void 0;\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\treturn toStr.call( v );\n\t}\n\tout = toStr.call( v );\n\n\tif ( isOwn ) {\n\t\tv[ toStringTag ] = tag;\n\t} else {\n\t\tdelete v[ toStringTag ];\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default nativeClass;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport toStr from './tostring.js';\n\n\n// MAIN //\n\n/**\n* Returns a string value indicating a specification defined classification (via the internal property `[[Class]]`) of an object.\n*\n* @param {*} v - input value\n* @returns {string} string value indicating a specification defined classification of the input value\n*\n* @example\n* var str = nativeClass( 'a' );\n* // returns '[object String]'\n*\n* @example\n* var str = nativeClass( 5 );\n* // returns '[object Number]'\n*\n* @example\n* function Beep() {\n* return this;\n* }\n* var str = nativeClass( new Beep() );\n* // returns '[object Object]'\n*/\nfunction nativeClass( v ) {\n\treturn toStr.call( v );\n}\n\n\n// EXPORTS //\n\nexport default nativeClass;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// EXPORTS //\n\nexport default Number; // eslint-disable-line stdlib/require-globals\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport Number from '@stdlib/number-ctor';\n\n\n// MAIN //\n\n// eslint-disable-next-line stdlib/no-redeclare\nvar toString = Number.prototype.toString; // non-generic\n\n\n// EXPORTS //\n\nexport default toString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport hasToStringTag from '@stdlib/assert-has-tostringtag-support';\nimport nativeClass from '@stdlib/utils-native-class';\nimport Number from '@stdlib/number-ctor';\nimport test from './try2serialize.js';\n\n\n// VARIABLES //\n\nvar FLG = hasToStringTag();\n\n\n// MAIN //\n\n/**\n* Tests if a value is a number object.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number object\n*\n* @example\n* var bool = isNumber( 3.14 );\n* // returns false\n*\n* @example\n* var bool = isNumber( new Number( 3.14 ) );\n* // returns true\n*/\nfunction isNumber( value ) {\n\tif ( typeof value === 'object' ) {\n\t\tif ( value instanceof Number ) {\n\t\t\treturn true;\n\t\t}\n\t\tif ( FLG ) {\n\t\t\treturn test( value );\n\t\t}\n\t\treturn ( nativeClass( value ) === '[object Number]' );\n\t}\n\treturn false;\n}\n\n\n// EXPORTS //\n\nexport default isNumber;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport toString from './tostring.js'; // eslint-disable-line stdlib/no-redeclare\n\n\n// MAIN //\n\n/**\n* Attempts to serialize a value to a string.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value can be serialized\n*/\nfunction test( value ) {\n\ttry {\n\t\ttoString.call( value );\n\t\treturn true;\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\treturn false;\n\t}\n}\n\n\n// EXPORTS //\n\nexport default test;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a number.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a number\n*\n* @example\n* var bool = isNumber( 3.14 );\n* // returns true\n*\n* @example\n* var bool = isNumber( new Number( 3.14 ) );\n* // returns true\n*\n* @example\n* var bool = isNumber( NaN );\n* // returns true\n*\n* @example\n* var bool = isNumber( null );\n* // returns false\n*/\nfunction isNumber( value ) {\n\treturn ( isPrimitive( value ) || isObject( value ) );\n}\n\n\n// EXPORTS //\n\nexport default isNumber;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test if a value is a number.\n*\n* @module @stdlib/assert-is-number\n*\n* @example\n* import isNumber from '@stdlib/assert-is-number';\n*\n* var bool = isNumber( 3.14 );\n* // returns true\n*\n* bool = isNumber( new Number( 3.14 ) );\n* // returns true\n*\n* bool = isNumber( NaN );\n* // returns true\n*\n* bool = isNumber( null );\n* // returns false\n*\n* @example\n* import { isPrimitive as isNumber } from '@stdlib/assert-is-number';\n*\n* var bool = isNumber( 3.14 );\n* // returns true\n*\n* bool = isNumber( NaN );\n* // returns true\n*\n* bool = isNumber( new Number( 3.14 ) );\n* // returns false\n*\n* @example\n* import { isObject as isNumber } from '@stdlib/assert-is-number';\n*\n* var bool = isNumber( 3.14 );\n* // returns false\n*\n* bool = isNumber( new Number( 3.14 ) );\n* // returns true\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'isPrimitive', isPrimitive );\nsetReadOnly( main, 'isObject', isObject );\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Double-precision floating-point positive infinity.\n*\n* @module @stdlib/constants-float64-pinf\n* @type {number}\n*\n* @example\n* import FLOAT64_PINF from '@stdlib/constants-float64-pinf';\n* // returns Infinity\n*/\n\n\n// MAIN //\n\n/**\n* Double-precision floating-point positive infinity.\n*\n* ## Notes\n*\n* Double-precision floating-point positive infinity has the bit sequence\n*\n* ```binarystring\n* 0 11111111111 00000000000000000000 00000000000000000000000000000000\n* ```\n*\n* @constant\n* @type {number}\n* @default Number.POSITIVE_INFINITY\n* @see [IEEE 754]{@link https://en.wikipedia.org/wiki/IEEE_754-1985}\n*/\nvar FLOAT64_PINF = Number.POSITIVE_INFINITY; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default FLOAT64_PINF;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Double-precision floating-point negative infinity.\n*\n* @module @stdlib/constants-float64-ninf\n* @type {number}\n*\n* @example\n* import FLOAT64_NINF from '@stdlib/constants-float64-ninf';\n* // returns -Infinity\n*/\n\n// MODULES //\n\nimport Number from '@stdlib/number-ctor';\n\n\n// MAIN //\n\n/**\n* Double-precision floating-point negative infinity.\n*\n* ## Notes\n*\n* Double-precision floating-point negative infinity has the bit sequence\n*\n* ```binarystring\n* 1 11111111111 00000000000000000000 00000000000000000000000000000000\n* ```\n*\n* @constant\n* @type {number}\n* @default Number.NEGATIVE_INFINITY\n* @see [IEEE 754]{@link https://en.wikipedia.org/wiki/IEEE_754-1985}\n*/\nvar FLOAT64_NINF = Number.NEGATIVE_INFINITY;\n\n\n// EXPORTS //\n\nexport default FLOAT64_NINF;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: implementation (?)\n\n/**\n* Rounds a double-precision floating-point number toward negative infinity.\n*\n* @param {number} x - input value\n* @returns {number} rounded value\n*\n* @example\n* var v = floor( -4.2 );\n* // returns -5.0\n*\n* @example\n* var v = floor( 9.99999 );\n* // returns 9.0\n*\n* @example\n* var v = floor( 0.0 );\n* // returns 0.0\n*\n* @example\n* var v = floor( NaN );\n* // returns NaN\n*/\nvar floor = Math.floor; // eslint-disable-line stdlib/no-builtin-math\n\n\n// EXPORTS //\n\nexport default floor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport floor from '@stdlib/math-base-special-floor';\n\n\n// MAIN //\n\n/**\n* Tests if a finite double-precision floating-point number is an integer.\n*\n* @param {number} x - value to test\n* @returns {boolean} boolean indicating whether the value is an integer\n*\n* @example\n* var bool = isInteger( 1.0 );\n* // returns true\n*\n* @example\n* var bool = isInteger( 3.14 );\n* // returns false\n*/\nfunction isInteger( x ) {\n\treturn (floor(x) === x);\n}\n\n\n// EXPORTS //\n\nexport default isInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport PINF from '@stdlib/constants-float64-pinf';\nimport NINF from '@stdlib/constants-float64-ninf';\nimport isInt from '@stdlib/math-base-assert-is-integer';\n\n\n// MAIN //\n\n/**\n* Tests if a number primitive is an integer value.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a number primitive is an integer value\n*/\nfunction isInteger( value ) {\n\treturn (\n\t\tvalue < PINF &&\n\t\tvalue > NINF &&\n\t\tisInt( value )\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isNumber } from '@stdlib/assert-is-number';\nimport isInt from './integer.js';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a number primitive having an integer value.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number primitive having an integer value\n*\n* @example\n* var bool = isInteger( -3.0 );\n* // returns true\n*\n* @example\n* var bool = isInteger( new Number( -3.0 ) );\n* // returns false\n*/\nfunction isInteger( value ) {\n\treturn (\n\t\tisNumber( value ) &&\n\t\tisInt( value )\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isObject as isNumber } from '@stdlib/assert-is-number';\nimport isInt from './integer.js';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a number object having an integer value.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number object having an integer value\n*\n* @example\n* var bool = isInteger( 3.0 );\n* // returns false\n*\n* @example\n* var bool = isInteger( new Number( 3.0 ) );\n* // returns true\n*/\nfunction isInteger( value ) {\n\treturn (\n\t\tisNumber( value ) &&\n\t\tisInt( value.valueOf() )\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\n/**\n* Tests if a value is an integer.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an integer\n*\n* @example\n* var bool = isInteger( 5.0 );\n* // returns true\n*\n* @example\n* var bool = isInteger( new Number( 5.0 ) );\n* // returns true\n*\n* @example\n* var bool = isInteger( -3.14 );\n* // returns false\n*\n* @example\n* var bool = isInteger( null );\n* // returns false\n*/\nfunction isInteger( value ) {\n\treturn ( isPrimitive( value ) || isObject( value ) );\n}\n\n\n// EXPORTS //\n\nexport default isInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isInteger } from '@stdlib/assert-is-integer';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a number primitive having a nonnegative integer value.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number primitive having a nonnegative integer value\n*\n* @example\n* var bool = isNonNegativeInteger( 3.0 );\n* // returns true\n*\n* @example\n* var bool = isNonNegativeInteger( new Number( 3.0 ) );\n* // returns false\n*/\nfunction isNonNegativeInteger( value ) {\n\treturn (\n\t\tisInteger( value ) &&\n\t\tvalue >= 0\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isNonNegativeInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isObject as isInteger } from '@stdlib/assert-is-integer';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a number object having a nonnegative integer value.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number object having a nonnegative integer value\n*\n* @example\n* var bool = isNonNegativeInteger( 3.0 );\n* // returns false\n*\n* @example\n* var bool = isNonNegativeInteger( new Number( 3.0 ) );\n* // returns true\n*/\nfunction isNonNegativeInteger( value ) {\n\treturn (\n\t\tisInteger( value ) &&\n\t\tvalue.valueOf() >= 0\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isNonNegativeInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a nonnegative integer.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a nonnegative integer\n*\n* @example\n* var bool = isNonNegativeInteger( 5.0 );\n* // returns true\n*\n* @example\n* var bool = isNonNegativeInteger( new Number( 5.0 ) );\n* // returns true\n*\n* @example\n* var bool = isNonNegativeInteger( -5.0 );\n* // returns false\n*\n* @example\n* var bool = isNonNegativeInteger( 3.14 );\n* // returns false\n*\n* @example\n* var bool = isNonNegativeInteger( null );\n* // returns false\n*/\nfunction isNonNegativeInteger( value ) {\n\treturn ( isPrimitive( value ) || isObject( value ) );\n}\n\n\n// EXPORTS //\n\nexport default isNonNegativeInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test if a value is an integer.\n*\n* @module @stdlib/assert-is-integer\n*\n* @example\n* import isInteger from '@stdlib/assert-is-integer';\n*\n* var bool = isInteger( 5.0 );\n* // returns true\n*\n* bool = isInteger( new Number( 5.0 ) );\n* // returns true\n*\n* bool = isInteger( -3.14 );\n* // returns false\n*\n* bool = isInteger( null );\n* // returns false\n*\n* @example\n* // Use interface to check for integer primitives...\n* import { isPrimitive as isInteger } from '@stdlib/assert-is-integer';\n*\n* var bool = isInteger( -3.0 );\n* // returns true\n*\n* bool = isInteger( new Number( -3.0 ) );\n* // returns false\n*\n* @example\n* // Use interface to check for integer objects...\n* import { isObject as isInteger } from '@stdlib/assert-is-integer';\n*\n* var bool = isInteger( 3.0 );\n* // returns false\n*\n* bool = isInteger( new Number( 3.0 ) );\n* // returns true\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'isPrimitive', isPrimitive );\nsetReadOnly( main, 'isObject', isObject );\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test if a value is a nonnegative integer.\n*\n* @module @stdlib/assert-is-nonnegative-integer\n*\n* @example\n* import isNonNegativeInteger from '@stdlib/assert-is-nonnegative-integer';\n*\n* var bool = isNonNegativeInteger( 5.0 );\n* // returns true\n*\n* bool = isNonNegativeInteger( new Number( 5.0 ) );\n* // returns true\n*\n* bool = isNonNegativeInteger( -5.0 );\n* // returns false\n*\n* bool = isNonNegativeInteger( 3.14 );\n* // returns false\n*\n* bool = isNonNegativeInteger( null );\n* // returns false\n*\n* @example\n* import { isPrimitive as isNonNegativeInteger } from '@stdlib/assert-is-nonnegative-integer';\n*\n* var bool = isNonNegativeInteger( 3.0 );\n* // returns true\n*\n* bool = isNonNegativeInteger( new Number( 3.0 ) );\n* // returns false\n*\n* @example\n* import { isObject as isNonNegativeInteger } from '@stdlib/assert-is-nonnegative-integer';\n*\n* var bool = isNonNegativeInteger( 3.0 );\n* // returns false\n*\n* bool = isNonNegativeInteger( new Number( 3.0 ) );\n* // returns true\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'isPrimitive', isPrimitive );\nsetReadOnly( main, 'isObject', isObject );\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasFloat64Array = ( typeof Float64Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Float64Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a Float64Array\n*\n* @example\n* var bool = isFloat64Array( new Float64Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isFloat64Array( [] );\n* // returns false\n*/\nfunction isFloat64Array( value ) {\n\treturn (\n\t\t( hasFloat64Array && value instanceof Float64Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Float64Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isFloat64Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Float64Array === 'function' ) ? Float64Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Float64Array === 'function' ) ? Float64Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of double-precision floating-point numbers in the platform byte order.\n*\n* @module @stdlib/array-float64\n*\n* @example\n* import ctor from '@stdlib/array-float64';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasFloat64ArraySupport from '@stdlib/assert-has-float64array-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasFloat64ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isFloat64Array from '@stdlib/assert-is-float64array';\nimport GlobalFloat64Array from './float64array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Float64Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Float64Array` support\n*\n* @example\n* var bool = hasFloat64ArraySupport();\n* // returns \n*/\nfunction hasFloat64ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalFloat64Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = new GlobalFloat64Array( [ 1.0, 3.14, -3.14, NaN ] );\n\t\tbool = (\n\t\t\tisFloat64Array( arr ) &&\n\t\t\tarr[ 0 ] === 1.0 &&\n\t\t\tarr[ 1 ] === 3.14 &&\n\t\t\tarr[ 2 ] === -3.14 &&\n\t\t\tarr[ 3 ] !== arr[ 3 ]\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasFloat64ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of double-precision floating-point numbers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasFloat32Array = ( typeof Float32Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Float32Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a Float32Array\n*\n* @example\n* var bool = isFloat32Array( new Float32Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isFloat32Array( [] );\n* // returns false\n*/\nfunction isFloat32Array( value ) {\n\treturn (\n\t\t( hasFloat32Array && value instanceof Float32Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Float32Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isFloat32Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Float32Array === 'function' ) ? Float32Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Float32Array === 'function' ) ? Float32Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of single-precision floating-point numbers in the platform byte order.\n*\n* @module @stdlib/array-float32\n*\n* @example\n* import ctor from '@stdlib/array-float32';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasFloat32ArraySupport from '@stdlib/assert-has-float32array-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasFloat32ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isFloat32Array from '@stdlib/assert-is-float32array';\nimport PINF from '@stdlib/constants-float64-pinf';\nimport GlobalFloat32Array from './float32array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Float32Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Float32Array` support\n*\n* @example\n* var bool = hasFloat32ArraySupport();\n* // returns \n*/\nfunction hasFloat32ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalFloat32Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = new GlobalFloat32Array( [ 1.0, 3.14, -3.14, 5.0e40 ] );\n\t\tbool = (\n\t\t\tisFloat32Array( arr ) &&\n\t\t\tarr[ 0 ] === 1.0 &&\n\t\t\tarr[ 1 ] === 3.140000104904175 &&\n\t\t\tarr[ 2 ] === -3.140000104904175 &&\n\t\t\tarr[ 3 ] === PINF\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasFloat32ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of single-precision floating-point numbers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasInt16Array = ( typeof Int16Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is an Int16Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an Int16Array\n*\n* @example\n* var bool = isInt16Array( new Int16Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isInt16Array( [] );\n* // returns false\n*/\nfunction isInt16Array( value ) {\n\treturn (\n\t\t( hasInt16Array && value instanceof Int16Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Int16Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isInt16Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum signed 16-bit integer.\n*\n* @module @stdlib/constants-int16-max\n* @type {integer32}\n*\n* @example\n* import INT16_MAX from '@stdlib/constants-int16-max';\n* // returns 32767\n*/\n\n\n// MAIN //\n\n/**\n* Maximum signed 16-bit integer.\n*\n* ## Notes\n*\n* The number has the value\n*\n* ```tex\n* 2^{15} - 1\n* ```\n*\n* which corresponds to the bit sequence\n*\n* ```binarystring\n* 0111111111111111\n* ```\n*\n* @constant\n* @type {integer32}\n* @default 32767\n*/\nvar INT16_MAX = 32767|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default INT16_MAX;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Int16Array === 'function' ) ? Int16Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Int16Array === 'function' ) ? Int16Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of twos-complement 16-bit signed integers in the platform byte order.\n*\n* @module @stdlib/array-int16\n*\n* @example\n* import ctor from '@stdlib/array-int16';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasInt16ArraySupport from '@stdlib/assert-has-int16array-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasInt16ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isInt16Array from '@stdlib/assert-is-int16array';\nimport INT16_MAX from '@stdlib/constants-int16-max';\nimport INT16_MIN from '@stdlib/constants-int16-min';\nimport GlobalInt16Array from './int16array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Int16Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Int16Array` support\n*\n* @example\n* var bool = hasInt16ArraySupport();\n* // returns \n*/\nfunction hasInt16ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalInt16Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = new GlobalInt16Array( [ 1, 3.14, -3.14, INT16_MAX+1 ] );\n\t\tbool = (\n\t\t\tisInt16Array( arr ) &&\n\t\t\tarr[ 0 ] === 1 &&\n\t\t\tarr[ 1 ] === 3 && // truncation\n\t\t\tarr[ 2 ] === -3 && // truncation\n\t\t\tarr[ 3 ] === INT16_MIN // wrap around\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasInt16ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Minimum signed 16-bit integer.\n*\n* @module @stdlib/constants-int16-min\n* @type {integer32}\n*\n* @example\n* import INT16_MIN from '@stdlib/constants-int16-min';\n* // returns -32768\n*/\n\n\n// MAIN //\n\n/**\n* Minimum signed 16-bit integer.\n*\n* ## Notes\n*\n* The number has the value\n*\n* ```tex\n* -(2^{15})\n* ```\n*\n* which corresponds to the two's complement bit sequence\n*\n* ```binarystring\n* 1000000000000000\n* ```\n*\n* @constant\n* @type {integer32}\n* @default -32768\n*/\nvar INT16_MIN = -32768|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default INT16_MIN;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of twos-complement 16-bit signed integers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasInt32Array = ( typeof Int32Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is an Int32Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an Int32Array\n*\n* @example\n* var bool = isInt32Array( new Int32Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isInt32Array( [] );\n* // returns false\n*/\nfunction isInt32Array( value ) {\n\treturn (\n\t\t( hasInt32Array && value instanceof Int32Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Int32Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isInt32Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum signed 32-bit integer.\n*\n* @module @stdlib/constants-int32-max\n* @type {integer32}\n*\n* @example\n* import INT32_MAX from '@stdlib/constants-int32-max';\n* // returns 2147483647\n*/\n\n\n// MAIN //\n\n/**\n* Maximum signed 32-bit integer.\n*\n* ## Notes\n*\n* The number has the value\n*\n* ```tex\n* 2^{31} - 1\n* ```\n*\n* which corresponds to the bit sequence\n*\n* ```binarystring\n* 01111111111111111111111111111111\n* ```\n*\n* @constant\n* @type {integer32}\n* @default 2147483647\n*/\nvar INT32_MAX = 2147483647|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default INT32_MAX;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Int32Array === 'function' ) ? Int32Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Int32Array === 'function' ) ? Int32Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of twos-complement 32-bit signed integers in the platform byte order.\n*\n* @module @stdlib/array-int32\n*\n* @example\n* import ctor from '@stdlib/array-int32';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasInt32ArraySupport from '@stdlib/assert-has-int32array-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasInt32ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isInt32Array from '@stdlib/assert-is-int32array';\nimport INT32_MAX from '@stdlib/constants-int32-max';\nimport INT32_MIN from '@stdlib/constants-int32-min';\nimport GlobalInt32Array from './int32array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Int32Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Int32Array` support\n*\n* @example\n* var bool = hasInt32ArraySupport();\n* // returns \n*/\nfunction hasInt32ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalInt32Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = new GlobalInt32Array( [ 1, 3.14, -3.14, INT32_MAX+1 ] );\n\t\tbool = (\n\t\t\tisInt32Array( arr ) &&\n\t\t\tarr[ 0 ] === 1 &&\n\t\t\tarr[ 1 ] === 3 && // truncation\n\t\t\tarr[ 2 ] === -3 && // truncation\n\t\t\tarr[ 3 ] === INT32_MIN // wrap around\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasInt32ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Minimum signed 32-bit integer.\n*\n* @module @stdlib/constants-int32-min\n* @type {integer32}\n*\n* @example\n* import INT32_MIN from '@stdlib/constants-int32-min';\n* // returns -2147483648\n*/\n\n\n// MAIN //\n\n/**\n* Minimum signed 32-bit integer.\n*\n* ## Notes\n*\n* The number has the value\n*\n* ```tex\n* -(2^{31})\n* ```\n*\n* which corresponds to the two's complement bit sequence\n*\n* ```binarystring\n* 10000000000000000000000000000000\n* ```\n*\n* @constant\n* @type {integer32}\n* @default -2147483648\n*/\nvar INT32_MIN = -2147483648|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default INT32_MIN;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of twos-complement 32-bit signed integers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasInt8Array = ( typeof Int8Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is an Int8Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an Int8Array\n*\n* @example\n* var bool = isInt8Array( new Int8Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isInt8Array( [] );\n* // returns false\n*/\nfunction isInt8Array( value ) {\n\treturn (\n\t\t( hasInt8Array && value instanceof Int8Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Int8Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isInt8Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum signed 8-bit integer.\n*\n* @module @stdlib/constants-int8-max\n* @type {integer32}\n*\n* @example\n* import INT8_MAX from '@stdlib/constants-int8-max';\n* // returns 127\n*/\n\n\n// MAIN //\n\n/**\n* Maximum signed 8-bit integer.\n*\n* ## Notes\n*\n* The number is given by\n*\n* ```tex\n* 2^{7} - 1\n* ```\n*\n* which corresponds to the bit sequence\n*\n* ```binarystring\n* 01111111\n* ```\n*\n* @constant\n* @type {integer32}\n* @default 127\n*/\nvar INT8_MAX = 127|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default INT8_MAX;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Int8Array === 'function' ) ? Int8Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Int8Array === 'function' ) ? Int8Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of twos-complement 8-bit signed integers in the platform byte order.\n*\n* @module @stdlib/array-int8\n*\n* @example\n* import ctor from '@stdlib/array-int8';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasInt8ArraySupport from '@stdlib/assert-has-int8array-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasInt8ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isInt8Array from '@stdlib/assert-is-int8array';\nimport INT8_MAX from '@stdlib/constants-int8-max';\nimport INT8_MIN from '@stdlib/constants-int8-min';\nimport GlobalInt8Array from './int8array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Int8Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Int8Array` support\n*\n* @example\n* var bool = hasInt8ArraySupport();\n* // returns \n*/\nfunction hasInt8ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalInt8Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = new GlobalInt8Array( [ 1, 3.14, -3.14, INT8_MAX+1 ] );\n\t\tbool = (\n\t\t\tisInt8Array( arr ) &&\n\t\t\tarr[ 0 ] === 1 &&\n\t\t\tarr[ 1 ] === 3 && // truncation\n\t\t\tarr[ 2 ] === -3 && // truncation\n\t\t\tarr[ 3 ] === INT8_MIN // wrap around\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasInt8ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Minimum signed 8-bit integer.\n*\n* @module @stdlib/constants-int8-min\n* @type {integer32}\n*\n* @example\n* import INT8_MIN from '@stdlib/constants-int8-min';\n* // returns -128\n*/\n\n\n// MAIN //\n\n/**\n* Minimum signed 8-bit integer.\n*\n* ## Notes\n*\n* The number is given by\n*\n* ```tex\n* -(2^{7})\n* ```\n*\n* which corresponds to the two's complement bit sequence\n*\n* ```binarystring\n* 10000000\n* ```\n*\n* @constant\n* @type {integer32}\n* @default -128\n*/\nvar INT8_MIN = -128|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default INT8_MIN;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of twos-complement 8-bit signed integers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasUint16Array = ( typeof Uint16Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Uint16Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a Uint16Array\n*\n* @example\n* var bool = isUint16Array( new Uint16Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isUint16Array( [] );\n* // returns false\n*/\nfunction isUint16Array( value ) {\n\treturn (\n\t\t( hasUint16Array && value instanceof Uint16Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Uint16Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isUint16Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum unsigned 16-bit integer.\n*\n* @module @stdlib/constants-uint16-max\n* @type {integer32}\n*\n* @example\n* import UINT16_MAX from '@stdlib/constants-uint16-max';\n* // returns 65535\n*/\n\n\n// MAIN //\n\n/**\n* Maximum unsigned 16-bit integer.\n*\n* ## Notes\n*\n* The number has the value\n*\n* ```tex\n* 2^{16} - 1\n* ```\n*\n* which corresponds to the bit sequence\n*\n* ```binarystring\n* 1111111111111111\n* ```\n*\n* @constant\n* @type {integer32}\n* @default 65535\n*/\nvar UINT16_MAX = 65535|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default UINT16_MAX;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Uint16Array === 'function' ) ? Uint16Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Uint16Array === 'function' ) ? Uint16Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of 16-bit unsigned integers in the platform byte order.\n*\n* @module @stdlib/array-uint16\n*\n* @example\n* import ctor from '@stdlib/array-uint16';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasUint16ArraySupport from '@stdlib/assert-has-uint16array-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasUint16ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isUint16Array from '@stdlib/assert-is-uint16array';\nimport UINT16_MAX from '@stdlib/constants-uint16-max';\nimport GlobalUint16Array from './uint16array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Uint16Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Uint16Array` support\n*\n* @example\n* var bool = hasUint16ArraySupport();\n* // returns \n*/\nfunction hasUint16ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalUint16Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = [ 1, 3.14, -3.14, UINT16_MAX+1, UINT16_MAX+2 ];\n\t\tarr = new GlobalUint16Array( arr );\n\t\tbool = (\n\t\t\tisUint16Array( arr ) &&\n\t\t\tarr[ 0 ] === 1 &&\n\t\t\tarr[ 1 ] === 3 && // truncation\n\t\t\tarr[ 2 ] === UINT16_MAX-2 && // truncation and wrap around\n\t\t\tarr[ 3 ] === 0 && // wrap around\n\t\t\tarr[ 4 ] === 1 // wrap around\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasUint16ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of 16-bit unsigned integers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasUint32Array = ( typeof Uint32Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Uint32Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a Uint32Array\n*\n* @example\n* var bool = isUint32Array( new Uint32Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isUint32Array( [] );\n* // returns false\n*/\nfunction isUint32Array( value ) {\n\treturn (\n\t\t( hasUint32Array && value instanceof Uint32Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Uint32Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isUint32Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum unsigned 32-bit integer.\n*\n* @module @stdlib/constants-uint32-max\n* @type {uinteger32}\n*\n* @example\n* import UINT32_MAX from '@stdlib/constants-uint32-max';\n* // returns 4294967295\n*/\n\n\n// MAIN //\n\n/**\n* Maximum unsigned 32-bit integer.\n*\n* ## Notes\n*\n* The number has the value\n*\n* ```tex\n* 2^{32} - 1\n* ```\n*\n* which corresponds to the bit sequence\n*\n* ```binarystring\n* 11111111111111111111111111111111\n* ```\n*\n* @constant\n* @type {uinteger32}\n* @default 4294967295\n*/\nvar UINT32_MAX = 4294967295;\n\n\n// EXPORTS //\n\nexport default UINT32_MAX;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Uint32Array === 'function' ) ? Uint32Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Uint32Array === 'function' ) ? Uint32Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of 32-bit unsigned integers in the platform byte order.\n*\n* @module @stdlib/array-uint32\n*\n* @example\n* import ctor from '@stdlib/array-uint32';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasUint32ArraySupport from '@stdlib/assert-has-uint32array-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasUint32ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isUint32Array from '@stdlib/assert-is-uint32array';\nimport UINT32_MAX from '@stdlib/constants-uint32-max';\nimport GlobalUint32Array from './uint32array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Uint32Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Uint32Array` support\n*\n* @example\n* var bool = hasUint32ArraySupport();\n* // returns \n*/\nfunction hasUint32ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalUint32Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = [ 1, 3.14, -3.14, UINT32_MAX+1, UINT32_MAX+2 ];\n\t\tarr = new GlobalUint32Array( arr );\n\t\tbool = (\n\t\t\tisUint32Array( arr ) &&\n\t\t\tarr[ 0 ] === 1 &&\n\t\t\tarr[ 1 ] === 3 && // truncation\n\t\t\tarr[ 2 ] === UINT32_MAX-2 && // truncation and wrap around\n\t\t\tarr[ 3 ] === 0 && // wrap around\n\t\t\tarr[ 4 ] === 1 // wrap around\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasUint32ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of 32-bit unsigned integers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasUint8Array = ( typeof Uint8Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Uint8Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a Uint8Array\n*\n* @example\n* var bool = isUint8Array( new Uint8Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isUint8Array( [] );\n* // returns false\n*/\nfunction isUint8Array( value ) {\n\treturn (\n\t\t( hasUint8Array && value instanceof Uint8Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Uint8Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isUint8Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum unsigned 8-bit integer.\n*\n* @module @stdlib/constants-uint8-max\n* @type {integer32}\n*\n* @example\n* import UINT8_MAX from '@stdlib/constants-uint8-max';\n* // returns 255\n*/\n\n\n// MAIN //\n\n/**\n* Maximum unsigned 8-bit integer.\n*\n* ## Notes\n*\n* The number has the value\n*\n* ```tex\n* 2^{8} - 1\n* ```\n*\n* which corresponds to the bit sequence\n*\n* ```binarystring\n* 11111111\n* ```\n*\n* @constant\n* @type {integer32}\n* @default 255\n*/\nvar UINT8_MAX = 255|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default UINT8_MAX;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Uint8Array === 'function' ) ? Uint8Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Uint8Array === 'function' ) ? Uint8Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of 8-bit unsigned integers in the platform byte order.\n*\n* @module @stdlib/array-uint8\n*\n* @example\n* import ctor from '@stdlib/array-uint8';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasUint8ArraySupport from '@stdlib/assert-has-uint8array-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasUint8ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isUint8Array from '@stdlib/assert-is-uint8array';\nimport UINT8_MAX from '@stdlib/constants-uint8-max';\nimport GlobalUint8Array from './uint8array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Uint8Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Uint8Array` support\n*\n* @example\n* var bool = hasUint8ArraySupport();\n* // returns \n*/\nfunction hasUint8ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalUint8Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = [ 1, 3.14, -3.14, UINT8_MAX+1, UINT8_MAX+2 ];\n\t\tarr = new GlobalUint8Array( arr );\n\t\tbool = (\n\t\t\tisUint8Array( arr ) &&\n\t\t\tarr[ 0 ] === 1 &&\n\t\t\tarr[ 1 ] === 3 && // truncation\n\t\t\tarr[ 2 ] === UINT8_MAX-2 && // truncation and wrap around\n\t\t\tarr[ 3 ] === 0 && // wrap around\n\t\t\tarr[ 4 ] === 1 // wrap around\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasUint8ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of 8-bit unsigned integers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasUint8ClampedArray = ( typeof Uint8ClampedArray === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Uint8ClampedArray.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a Uint8ClampedArray\n*\n* @example\n* var bool = isUint8ClampedArray( new Uint8ClampedArray( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isUint8ClampedArray( [] );\n* // returns false\n*/\nfunction isUint8ClampedArray( value ) {\n\treturn (\n\t\t( hasUint8ClampedArray && value instanceof Uint8ClampedArray ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Uint8ClampedArray]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isUint8ClampedArray;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Uint8ClampedArray === 'function' ) ? Uint8ClampedArray : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Uint8ClampedArray === 'function' ) ? Uint8ClampedArray : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of 8-bit unsigned integers in the platform byte order clamped to 0-255.\n*\n* @module @stdlib/array-uint8c\n*\n* @example\n* import ctor from '@stdlib/array-uint8c';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasUint8ClampedArraySupport from '@stdlib/assert-has-uint8clampedarray-support'; // eslint-disable-line id-length\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasUint8ClampedArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isUint8ClampedArray from '@stdlib/assert-is-uint8clampedarray';\nimport GlobalUint8ClampedArray from './uint8clampedarray.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Uint8ClampedArray` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Uint8ClampedArray` support\n*\n* @example\n* var bool = hasUint8ClampedArraySupport();\n* // returns \n*/\nfunction hasUint8ClampedArraySupport() { // eslint-disable-line id-length\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalUint8ClampedArray !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = new GlobalUint8ClampedArray( [ -1, 0, 1, 3.14, 4.99, 255, 256 ] );\n\t\tbool = (\n\t\t\tisUint8ClampedArray( arr ) &&\n\t\t\tarr[ 0 ] === 0 && // clamped\n\t\t\tarr[ 1 ] === 0 &&\n\t\t\tarr[ 2 ] === 1 &&\n\t\t\tarr[ 3 ] === 3 && // round to nearest\n\t\t\tarr[ 4 ] === 5 && // round to nearest\n\t\t\tarr[ 5 ] === 255 &&\n\t\t\tarr[ 6 ] === 255 // clamped\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasUint8ClampedArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of 8-bit unsigned integers in the platform byte order clamped to 0-255.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isInteger from '@stdlib/math-base-assert-is-integer';\nimport MAX_LENGTH from '@stdlib/constants-array-max-array-length';\n\n\n// MAIN //\n\n/**\n* Tests if a value is an array-like object.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is an array-like object\n*\n* @example\n* var bool = isArrayLikeObject( [] );\n* // returns true\n*\n* @example\n* var bool = isArrayLikeObject( { 'length':10 } );\n* // returns true\n*\n* @example\n* var bool = isArrayLikeObject( 'beep' );\n* // returns false\n*/\nfunction isArrayLikeObject( value ) {\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\ttypeof value.length === 'number' &&\n\t\tisInteger( value.length ) &&\n\t\tvalue.length >= 0 &&\n\t\tvalue.length <= MAX_LENGTH\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isArrayLikeObject;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum length of a generic array.\n*\n* @module @stdlib/constants-array-max-array-length\n*\n* @example\n* import MAX_ARRAY_LENGTH from '@stdlib/constants-array-max-array-length';\n* // returns 4294967295\n*/\n\n// MAIN //\n\n/**\n* Maximum length of a generic array.\n*\n* ```tex\n* 2^{32} - 1\n* ```\n*\n* @constant\n* @type {uinteger32}\n* @default 4294967295\n*/\nvar MAX_ARRAY_LENGTH = 4294967295>>>0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default MAX_ARRAY_LENGTH;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isInteger from '@stdlib/math-base-assert-is-integer';\nimport MAX_LENGTH from '@stdlib/constants-array-max-typed-array-length';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a collection.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether a value is a collection\n*\n* @example\n* var bool = isCollection( [] );\n* // returns true\n*\n* @example\n* var bool = isCollection( {} );\n* // returns false\n*/\nfunction isCollection( value ) {\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\ttypeof value.length === 'number' &&\n\t\tisInteger( value.length ) &&\n\t\tvalue.length >= 0 &&\n\t\tvalue.length <= MAX_LENGTH\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isCollection;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum length of a typed array.\n*\n* @module @stdlib/constants-array-max-typed-array-length\n*\n* @example\n* import MAX_TYPED_ARRAY_LENGTH from '@stdlib/constants-array-max-typed-array-length';\n* // returns 9007199254740991\n*/\n\n// MAIN //\n\n/**\n* Maximum length of a typed array.\n*\n* ```tex\n* 2^{53} - 1\n* ```\n*\n* @constant\n* @type {number}\n* @default 9007199254740991\n*/\nvar MAX_TYPED_ARRAY_LENGTH = 9007199254740991;\n\n\n// EXPORTS //\n\nexport default MAX_TYPED_ARRAY_LENGTH;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasArrayBuffer = ( typeof ArrayBuffer === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is an ArrayBuffer.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an ArrayBuffer\n*\n* @example\n* import ArrayBuffer from '@stdlib/array-buffer';\n*\n* var bool = isArrayBuffer( new ArrayBuffer( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isArrayBuffer( [] );\n* // returns false\n*/\nfunction isArrayBuffer( value ) {\n\treturn (\n\t\t( hasArrayBuffer && value instanceof ArrayBuffer ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object ArrayBuffer]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isArrayBuffer;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar f;\n\n\n// FUNCTIONS //\n\n/**\n* Tests if a value is an array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an array\n*\n* @example\n* var bool = isArray( [] );\n* // returns true\n*\n* @example\n* var bool = isArray( {} );\n* // returns false\n*/\nfunction isArray( value ) {\n\treturn ( nativeClass( value ) === '[object Array]' );\n}\n\n\n// MAIN //\n\nif ( Array.isArray ) {\n\tf = Array.isArray;\n} else {\n\tf = isArray;\n}\n\n\n// EXPORTS //\n\nexport default f;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isArray from '@stdlib/assert-is-array';\n\n\n// MAIN //\n\n/**\n* Tests if a value is an object; e.g., `{}`.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an object\n*\n* @example\n* var bool = isObject( {} );\n* // returns true\n*\n* @example\n* var bool = isObject( null );\n* // returns false\n*/\nfunction isObject( value ) {\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\t!isArray( value )\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isObject;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\nvar RE = /./;\n\n\n// EXPORTS //\n\nexport default RE;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Tests if a value is a boolean primitive.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a boolean primitive\n*\n* @example\n* var bool = isBoolean( true );\n* // returns true\n*\n* @example\n* var bool = isBoolean( false );\n* // returns true\n*\n* @example\n* import Boolean from '@stdlib/boolean-ctor';\n*\n* var bool = isBoolean( new Boolean( true ) );\n* // returns false\n*/\nfunction isBoolean( value ) {\n\treturn ( typeof value === 'boolean' );\n}\n\n\n// EXPORTS //\n\nexport default isBoolean;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Returns a boolean.\n*\n* @name Boolean\n* @constructor\n* @type {Function}\n* @param {*} value - input value\n* @returns {(boolean|Boolean)} boolean\n*\n* @example\n* var b = Boolean( null );\n* // returns false\n*\n* b = Boolean( [] );\n* // returns true\n*\n* b = Boolean( {} );\n* // returns true\n*\n* @example\n* var b = new Boolean( false );\n* // returns \n*/\nvar Bool = Boolean; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default Bool;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// eslint-disable-next-line stdlib/no-redeclare\nvar toString = Boolean.prototype.toString; // non-generic\n\n\n// EXPORTS //\n\nexport default toString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport hasToStringTag from '@stdlib/assert-has-tostringtag-support';\nimport nativeClass from '@stdlib/utils-native-class';\nimport Boolean from '@stdlib/boolean-ctor';\nimport test from './try2serialize.js';\n\n\n// VARIABLES //\n\nvar FLG = hasToStringTag();\n\n\n// MAIN //\n\n/**\n* Tests if a value is a boolean object.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a boolean object\n*\n* @example\n* var bool = isBoolean( true );\n* // returns false\n*\n* @example\n* import Boolean from '@stdlib/boolean-ctor';\n*\n* var bool = isBoolean( new Boolean( false ) );\n* // returns true\n*/\nfunction isBoolean( value ) {\n\tif ( typeof value === 'object' ) {\n\t\tif ( value instanceof Boolean ) {\n\t\t\treturn true;\n\t\t}\n\t\tif ( FLG ) {\n\t\t\treturn test( value );\n\t\t}\n\t\treturn ( nativeClass( value ) === '[object Boolean]' );\n\t}\n\treturn false;\n}\n\n\n// EXPORTS //\n\nexport default isBoolean;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport toString from './tostring.js'; // eslint-disable-line stdlib/no-redeclare\n\n\n// MAIN //\n\n/**\n* Attempts to serialize a value to a string.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value can be serialized\n*/\nfunction test( value ) {\n\ttry {\n\t\ttoString.call( value );\n\t\treturn true;\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\treturn false;\n\t}\n}\n\n\n// EXPORTS //\n\nexport default test;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a boolean.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a boolean\n*\n* @example\n* var bool = isBoolean( false );\n* // returns true\n*\n* @example\n* var bool = isBoolean( true );\n* // returns true\n*\n* @example\n* import Boolean from '@stdlib/boolean-ctor';\n*\n* var bool = isBoolean( new Boolean( false ) );\n* // returns true\n*\n* @example\n* import Boolean from '@stdlib/boolean-ctor';\n*\n* var bool = isBoolean( new Boolean( true ) );\n* // returns true\n*/\nfunction isBoolean( value ) {\n\treturn ( isPrimitive( value ) || isObject( value ) );\n}\n\n\n// EXPORTS //\n\nexport default isBoolean;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Returns the global object using code generation.\n*\n* @private\n* @returns {Object} global object\n*/\nfunction getGlobal() {\n\treturn new Function( 'return this;' )(); // eslint-disable-line no-new-func, stdlib/require-globals\n}\n\n\n// EXPORTS //\n\nexport default getGlobal;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test if a value is a boolean.\n*\n* @module @stdlib/assert-is-boolean\n*\n* @example\n* import Boolean from '@stdlib/boolean-ctor';\n* import isBoolean from '@stdlib/assert-is-boolean';\n*\n* var bool = isBoolean( false );\n* // returns true\n*\n* bool = isBoolean( new Boolean( false ) );\n* // returns true\n*\n* @example\n* import Boolean from '@stdlib/boolean-ctor';\n* import { isPrimitive as isBoolean } from '@stdlib/assert-is-boolean';\n*\n* var bool = isBoolean( false );\n* // returns true\n*\n* bool = isBoolean( new Boolean( true ) );\n* // returns false\n*\n* @example\n* import Boolean from '@stdlib/boolean-ctor';\n* import { isObject as isBoolean } from '@stdlib/assert-is-boolean';\n*\n* var bool = isBoolean( true );\n* // returns false\n*\n* bool = isBoolean( new Boolean( false ) );\n* // returns true\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'isPrimitive', isPrimitive );\nsetReadOnly( main, 'isObject', isObject );\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar obj = ( typeof self === 'object' ) ? self : null;\n\n\n// EXPORTS //\n\nexport default obj;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar obj = ( typeof window === 'object' ) ? window : null;\n\n\n// EXPORTS //\n\nexport default obj;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar obj = ( typeof global === 'object' ) ? global : null;\n\n\n// EXPORTS //\n\nexport default obj;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar obj = ( typeof globalThis === 'object' ) ? globalThis : null; // eslint-disable-line no-undef\n\n\n// EXPORTS //\n\nexport default obj;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport getGlobal from '@stdlib/utils-global';\n\n\n// MAIN //\n\nvar root = getGlobal();\nvar nodeList = root.document && root.document.childNodes;\n\n\n// EXPORTS //\n\nexport default nodeList;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isBoolean } from '@stdlib/assert-is-boolean';\nimport format from '@stdlib/string-format';\nimport getThis from './codegen.js';\nimport Self from './self.js';\nimport Win from './window.js';\nimport Global from './global.js';\nimport GlobalThis from './global_this.js';\n\n\n// MAIN //\n\n/**\n* Returns the global object.\n*\n* ## Notes\n*\n* - Using code generation is the **most** reliable way to resolve the global object; however, doing so is likely to violate content security policies (CSPs) in, e.g., Chrome Apps and elsewhere.\n*\n* @param {boolean} [codegen=false] - boolean indicating whether to use code generation to resolve the global object\n* @throws {TypeError} must provide a boolean\n* @throws {Error} unable to resolve global object\n* @returns {Object} global object\n*\n* @example\n* var g = getGlobal();\n* // returns {...}\n*/\nfunction getGlobal( codegen ) {\n\tif ( arguments.length ) {\n\t\tif ( !isBoolean( codegen ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Must provide a boolean. Value: `%s`.', codegen ) );\n\t\t}\n\t\tif ( codegen ) {\n\t\t\treturn getThis();\n\t\t}\n\t\t// Fall through...\n\t}\n\t// Case: 2020 revision of ECMAScript standard\n\tif ( GlobalThis ) {\n\t\treturn GlobalThis;\n\t}\n\t// Case: browsers and web workers\n\tif ( Self ) {\n\t\treturn Self;\n\t}\n\t// Case: browsers\n\tif ( Win ) {\n\t\treturn Win;\n\t}\n\t// Case: Node.js\n\tif ( Global ) {\n\t\treturn Global;\n\t}\n\t// Case: unknown\n\tthrow new Error( 'unexpected error. Unable to resolve global object.' );\n}\n\n\n// EXPORTS //\n\nexport default getGlobal;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\nvar typedarray = Int8Array; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default typedarray;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Returns a regular expression to capture everything that is not a space immediately after the `function` keyword and before the first left parenthesis.\n*\n* @returns {RegExp} regular expression\n*\n* @example\n* var RE_FUNCTION_NAME = reFunctionName();\n*\n* function fname( fcn ) {\n* return RE_FUNCTION_NAME.exec( fcn.toString() )[ 1 ];\n* }\n*\n* var fn = fname( Math.sqrt );\n* // returns 'sqrt'\n*\n* fn = fname( Int8Array );\n* // returns 'Int8Array'\n*\n* fn = fname( Object.prototype.toString );\n* // returns 'toString'\n*\n* fn = fname( function(){} );\n* // returns ''\n*/\nfunction reFunctionName() {\n\treturn /^\\s*function\\s*([^(]*)/i;\n}\n\n\n// EXPORTS //\n\nexport default reFunctionName;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport reFunctionName from './main.js';\n\n\n// MAIN //\n\n/**\n* Captures everything that is not a space immediately after the `function` keyword and before the first left parenthesis.\n*\n* Regular expression: `/^\\s*function\\s*([^(]*)/i`\n*\n* - `/^\\s*`\n* - Match zero or more spaces at beginning\n*\n* - `function`\n* - Match the word `function`\n*\n* - `\\s*`\n* - Match zero or more spaces after the word `function`\n*\n* - `()`\n* - Capture\n*\n* - `[^(]*`\n* - Match anything except a left parenthesis `(` zero or more times\n*\n* - `/i`\n* - ignore case\n*\n* @constant\n* @type {RegExp}\n* @default /^\\s*function\\s*([^(]*)/i\n*/\nvar RE_FUNCTION_NAME = reFunctionName();\n\n\n// EXPORTS //\n\nexport default RE_FUNCTION_NAME;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Tests if a value is object-like.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether a value is object-like\n*\n* @example\n* var bool = isObjectLike( {} );\n* // returns true\n*\n* @example\n* var bool = isObjectLike( [] );\n* // returns true\n*\n* @example\n* var bool = isObjectLike( null );\n* // returns false\n*/\nfunction isObjectLike( value ) {\n\treturn (\n\t\tvalue !== null &&\n\t\ttypeof value === 'object'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isObjectLike;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\nimport { REGEXP as RE } from '@stdlib/regexp-function-name';\nimport isBuffer from '@stdlib/assert-is-buffer';\n\n\n// MAIN //\n\n/**\n* Determines the name of a value's constructor.\n*\n* @param {*} v - input value\n* @returns {string} name of a value's constructor\n*\n* @example\n* var v = constructorName( 'a' );\n* // returns 'String'\n*\n* @example\n* var v = constructorName( 5 );\n* // returns 'Number'\n*\n* @example\n* var v = constructorName( null );\n* // returns 'Null'\n*\n* @example\n* var v = constructorName( undefined );\n* // returns 'Undefined'\n*\n* @example\n* var v = constructorName( function noop() {} );\n* // returns 'Function'\n*/\nfunction constructorName( v ) {\n\tvar match;\n\tvar name;\n\tvar ctor;\n\tname = nativeClass( v ).slice( 8, -1 );\n\tif ( (name === 'Object' || name === 'Error') && v.constructor ) {\n\t\tctor = v.constructor;\n\t\tif ( typeof ctor.name === 'string' ) {\n\t\t\treturn ctor.name;\n\t\t}\n\t\tmatch = RE.exec( ctor.toString() );\n\t\tif ( match ) {\n\t\t\treturn match[ 1 ];\n\t\t}\n\t}\n\tif ( isBuffer( v ) ) {\n\t\treturn 'Buffer';\n\t}\n\treturn name;\n}\n\n\n// EXPORTS //\n\nexport default constructorName;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isObjectLike from '@stdlib/assert-is-object-like';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Buffer instance.\n*\n* @param {*} value - value to validate\n* @returns {boolean} boolean indicating if a value is a Buffer instance\n*\n* @example\n* var v = isBuffer( new Buffer( 'beep' ) );\n* // returns true\n*\n* @example\n* var v = isBuffer( new Buffer( [1,2,3,4] ) );\n* // returns true\n*\n* @example\n* var v = isBuffer( {} );\n* // returns false\n*\n* @example\n* var v = isBuffer( [] );\n* // returns false\n*/\nfunction isBuffer( value ) {\n\treturn (\n\t\tisObjectLike( value ) &&\n\t\t(\n\t\t\t// eslint-disable-next-line no-underscore-dangle\n\t\t\tvalue._isBuffer || // for envs missing Object.prototype.constructor (e.g., Safari 5-7)\n\t\t\t(\n\t\t\t\tvalue.constructor &&\n\n\t\t\t\t// WARNING: `typeof` is not a foolproof check, as certain envs consider RegExp and NodeList instances to be functions\n\t\t\t\ttypeof value.constructor.isBuffer === 'function' &&\n\t\t\t\tvalue.constructor.isBuffer( value )\n\t\t\t)\n\t\t)\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isBuffer;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Regular expression to capture everything that is not a space immediately after the `function` keyword and before the first left parenthesis.\n*\n* @module @stdlib/regexp-function-name\n*\n* @example\n* import reFunctionName from '@stdlib/regexp-function-name';\n* var RE_FUNCTION_NAME = reFunctionName();\n*\n* function fname( fcn ) {\n* return RE_FUNCTION_NAME.exec( fcn.toString() )[ 1 ];\n* }\n*\n* var fn = fname( Math.sqrt );\n* // returns 'sqrt'\n*\n* fn = fname( Int8Array );\n* // returns 'Int8Array'\n*\n* fn = fname( Object.prototype.toString );\n* // returns 'toString'\n*\n* fn = fname( function(){} );\n* // returns ''\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport REGEXP from './regexp.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'REGEXP', REGEXP );\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test if a value is object-like.\n*\n* @module @stdlib/assert-is-object-like\n*\n* @example\n* import isObjectLike from '@stdlib/assert-is-object-like';\n*\n* var bool = isObjectLike( {} );\n* // returns true\n*\n* bool = isObjectLike( [] );\n* // returns true\n*\n* bool = isObjectLike( null );\n* // returns false\n*\n* @example\n* import { isObjectLikeArray as isObjectLike } from '@stdlib/assert-is-object-like';\n*\n* var bool = isObjectLike( [ {}, [] ] );\n* // returns true\n*\n* bool = isObjectLike( [ {}, '3.0' ] );\n* // returns false\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport arrayfun from '@stdlib/assert-tools-array-function';\nimport main from './main.js';\n\n\n// VARIABLES //\n\nvar isObjectLikeArray = arrayfun( main );\n\n\n// MAIN //\n\nsetReadOnly( main, 'isObjectLikeArray', isObjectLikeArray );\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isArray from '@stdlib/assert-is-array';\nimport format from '@stdlib/string-format';\n\n\n// MAIN //\n\n/**\n* Returns a function which tests if every element in an array passes a test condition.\n*\n* @param {Function} predicate - function to apply\n* @throws {TypeError} must provide a function\n* @returns {Function} an array function\n*\n* @example\n* import isOdd from '@stdlib/assert-is-odd';\n*\n* var arr1 = [ 1, 3, 5, 7 ];\n* var arr2 = [ 3, 5, 8 ];\n*\n* var validate = arrayfcn( isOdd );\n*\n* var bool = validate( arr1 );\n* // returns true\n*\n* bool = validate( arr2 );\n* // returns false\n*/\nfunction arrayfcn( predicate ) {\n\tif ( typeof predicate !== 'function' ) {\n\t\tthrow new TypeError( format( 'invalid argument. Must provide a function. Value: `%s`.', predicate ) );\n\t}\n\treturn every;\n\n\t/**\n\t* Tests if every element in an array passes a test condition.\n\t*\n\t* @private\n\t* @param {*} value - value to test\n\t* @returns {boolean} boolean indicating whether a value is an array for which all elements pass a test condition\n\t*/\n\tfunction every( value ) {\n\t\tvar len;\n\t\tvar i;\n\t\tif ( !isArray( value ) ) {\n\t\t\treturn false;\n\t\t}\n\t\tlen = value.length;\n\t\tif ( len === 0 ) {\n\t\t\treturn false;\n\t\t}\n\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\tif ( predicate( value[ i ] ) === false ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}\n}\n\n\n// EXPORTS //\n\nexport default arrayfcn;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Determine a value's type.\n*\n* @module @stdlib/utils-type-of\n*\n* @example\n* import typeOf from '@stdlib/utils-type-of';\n*\n* var str = typeOf( 'a' );\n* // returns 'string'\n*\n* str = typeOf( 5 );\n* // returns 'number'\n*/\n\n// MODULES //\n\nimport usePolyfill from './check.js';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar main = ( usePolyfill() ) ? polyfill : builtin;\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport RE from './fixtures/re.js';\nimport nodeList from './fixtures/nodelist.js';\nimport typedarray from './fixtures/typedarray.js';\n\n\n// MAIN //\n\n/**\n* Checks whether a polyfill is needed when using the `typeof` operator.\n*\n* @private\n* @returns {boolean} boolean indicating whether a polyfill is needed\n*/\nfunction check() {\n\tif (\n\t\t// Chrome 1-12 returns 'function' for regular expression instances (see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/typeof):\n\t\ttypeof RE === 'function' ||\n\n\t\t// Safari 8 returns 'object' for typed array and weak map constructors (underscore #1929):\n\t\ttypeof typedarray === 'object' ||\n\n\t\t// PhantomJS 1.9 returns 'function' for `NodeList` instances (underscore #2236):\n\t\ttypeof nodeList === 'function'\n\t) {\n\t\treturn true;\n\t}\n\treturn false;\n}\n\n\n// EXPORTS //\n\nexport default check;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport ctorName from '@stdlib/utils-constructor-name';\n\n\n// MAIN //\n\n/**\n* Determines a value's type.\n*\n* @param {*} v - input value\n* @returns {string} string indicating the value's type\n*/\nfunction typeOf( v ) {\n\treturn ctorName( v ).toLowerCase();\n}\n\n\n// EXPORTS //\n\nexport default typeOf;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport ctorName from '@stdlib/utils-constructor-name';\n\n\n// NOTES //\n\n/*\n* Built-in `typeof` operator behavior:\n*\n* ```text\n* typeof null => 'object'\n* typeof undefined => 'undefined'\n* typeof 'a' => 'string'\n* typeof 5 => 'number'\n* typeof NaN => 'number'\n* typeof true => 'boolean'\n* typeof false => 'boolean'\n* typeof {} => 'object'\n* typeof [] => 'object'\n* typeof function foo(){} => 'function'\n* typeof function* foo(){} => 'object'\n* typeof Symbol() => 'symbol'\n* ```\n*\n*/\n\n\n// MAIN //\n\n/**\n* Determines a value's type.\n*\n* @param {*} v - input value\n* @returns {string} string indicating the value's type\n*/\nfunction typeOf( v ) {\n\tvar type;\n\n\t// Address `typeof null` => `object` (see http://wiki.ecmascript.org/doku.php?id=harmony:typeof_null):\n\tif ( v === null ) {\n\t\treturn 'null';\n\t}\n\ttype = typeof v;\n\n\t// If the `typeof` operator returned something other than `object`, we are done. Otherwise, we need to check for an internal class name or search for a constructor.\n\tif ( type === 'object' ) {\n\t\treturn ctorName( v ).toLowerCase();\n\t}\n\treturn type;\n}\n\n\n// EXPORTS //\n\nexport default typeOf;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport typeOf from '@stdlib/utils-type-of';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a function.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a function\n*\n* @example\n* function beep() {\n* return 'beep';\n* }\n*\n* var bool = isFunction( beep );\n* // returns true\n*/\nfunction isFunction( value ) {\n\t// Note: cannot use `typeof` directly, as various browser engines incorrectly return `'function'` when operating on non-function objects, such as regular expressions and NodeLists.\n\treturn ( typeOf( value ) === 'function' );\n}\n\n\n// EXPORTS //\n\nexport default isFunction;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isNumber } from '@stdlib/assert-is-number';\nimport defineProperty from '@stdlib/utils-define-property';\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport format from '@stdlib/string-format';\nimport toStr from './tostring.js';\nimport toJSON from './tojson.js';\n\n\n// MAIN //\n\n/**\n* 128-bit complex number constructor.\n*\n* @constructor\n* @param {number} real - real component\n* @param {number} imag - imaginary component\n* @throws {TypeError} must invoke using the `new` keyword\n* @throws {TypeError} real component must be a number\n* @throws {TypeError} imaginary component must be a number\n* @returns {Complex128} 128-bit complex number\n*\n* @example\n* var z = new Complex128( 5.0, 3.0 );\n* // returns \n*/\nfunction Complex128( real, imag ) {\n\tif ( !( this instanceof Complex128 ) ) {\n\t\tthrow new TypeError( 'invalid invocation. Constructor must be called with the `new` keyword.' );\n\t}\n\tif ( !isNumber( real ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Real component must be a number. Value: `%s`.', real ) );\n\t}\n\tif ( !isNumber( imag ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Imaginary component must be a number. Value: `%s`.', imag ) );\n\t}\n\tdefineProperty( this, 're', {\n\t\t'configurable': false,\n\t\t'enumerable': true,\n\t\t'writable': false,\n\t\t'value': real\n\t});\n\tdefineProperty( this, 'im', {\n\t\t'configurable': false,\n\t\t'enumerable': true,\n\t\t'writable': false,\n\t\t'value': imag\n\t});\n\treturn this;\n}\n\n/**\n* Size (in bytes) of each component.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex128\n* @type {integer}\n* @returns {integer} size of each component\n*\n* @example\n* var nbytes = Complex128.BYTES_PER_ELEMENT;\n* // returns 8\n*/\nsetReadOnly( Complex128, 'BYTES_PER_ELEMENT', 8 );\n\n/**\n* Size (in bytes) of each component.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex128.prototype\n* @type {integer}\n* @returns {integer} size of each component\n*\n* @example\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var nbytes = z.BYTES_PER_ELEMENT;\n* // returns 8\n*/\nsetReadOnly( Complex128.prototype, 'BYTES_PER_ELEMENT', 8 );\n\n/**\n* Length (in bytes) of a complex number.\n*\n* @name byteLength\n* @memberof Complex128.prototype\n* @type {integer}\n* @returns {integer} byte length\n*\n* @example\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var nbytes = z.byteLength;\n* // returns 16\n*/\nsetReadOnly( Complex128.prototype, 'byteLength', 16 );\n\n/**\n* Serializes a complex number as a string.\n*\n* @name toString\n* @memberof Complex128.prototype\n* @type {Function}\n* @returns {string} serialized complex number\n*\n* @example\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var str = z.toString();\n* // returns '5 + 3i'\n*/\nsetReadOnly( Complex128.prototype, 'toString', toStr );\n\n/**\n* Serializes a complex number as a JSON object.\n*\n* ## Notes\n*\n* - `JSON.stringify()` implicitly calls this method when stringifying a `Complex128` instance.\n*\n* @name toJSON\n* @memberof Complex128.prototype\n* @type {Function}\n* @returns {Object} serialized complex number\n*\n* @example\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var obj = z.toJSON();\n* // returns { 'type': 'Complex128', 're': 5.0, 'im': 3.0 }\n*/\nsetReadOnly( Complex128.prototype, 'toJSON', toJSON );\n\n\n// EXPORTS //\n\nexport default Complex128;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Serializes a complex number as a string.\n*\n* @private\n* @returns {string} serialized complex number\n*/\nfunction toString() { // eslint-disable-line stdlib/no-redeclare\n\t/* eslint-disable no-invalid-this */\n\tvar str = '' + this.re;\n\tif ( this.im < 0 ) {\n\t\tstr += ' - ' + (-this.im);\n\t} else {\n\t\tstr += ' + ' + this.im;\n\t}\n\tstr += 'i';\n\treturn str;\n}\n\n\n// EXPORTS //\n\nexport default toString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Serializes a complex number as a JSON object.\n*\n* @private\n* @returns {Object} JSON representation\n*/\nfunction toJSON() {\n\t/* eslint-disable no-invalid-this */\n\tvar out = {};\n\tout.type = 'Complex128';\n\tout.re = this.re;\n\tout.im = this.im;\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default toJSON;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar fround = ( typeof Math.fround === 'function' ) ? Math.fround : null; // eslint-disable-line stdlib/no-builtin-math\n\n\n// EXPORTS //\n\nexport default fround;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport Float32Array from '@stdlib/array-float32';\n\n\n// VARIABLES //\n\nvar FLOAT32_VIEW = new Float32Array( 1 );\n\n\n// MAIN //\n\n/**\n* Converts a double-precision floating-point number to the nearest single-precision floating-point number.\n*\n* @param {number} x - double-precision floating-point number\n* @returns {number} nearest single-precision floating-point number\n*\n* @example\n* var y = float64ToFloat32( 1.337 );\n* // returns 1.3370000123977661\n*/\nfunction float64ToFloat32( x ) {\n\tFLOAT32_VIEW[ 0 ] = x;\n\treturn FLOAT32_VIEW[ 0 ];\n}\n\n\n// EXPORTS //\n\nexport default float64ToFloat32;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Convert a double-precision floating-point number to the nearest single-precision floating-point number.\n*\n* @module @stdlib/number-float64-base-to-float32\n*\n* @example\n* import float64ToFloat32 from '@stdlib/number-float64-base-to-float32';\n*\n* var y = float64ToFloat32( 1.337 );\n* // returns 1.3370000123977661\n*/\n\n// MODULES //\n\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar float64ToFloat32;\nif ( typeof builtin === 'function' ) {\n\tfloat64ToFloat32 = builtin;\n} else {\n\tfloat64ToFloat32 = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default float64ToFloat32;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isNumber } from '@stdlib/assert-is-number';\nimport defineProperty from '@stdlib/utils-define-property';\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport float64ToFloat32 from '@stdlib/number-float64-base-to-float32';\nimport format from '@stdlib/string-format';\nimport toStr from './tostring.js';\nimport toJSON from './tojson.js';\n\n\n// MAIN //\n\n/**\n* 64-bit complex number constructor.\n*\n* @constructor\n* @param {number} real - real component\n* @param {number} imag - imaginary component\n* @throws {TypeError} must invoke using the `new` keyword\n* @throws {TypeError} real component must be a number\n* @throws {TypeError} imaginary component must be a number\n* @returns {Complex64} 64-bit complex number\n*\n* @example\n* var z = new Complex64( 5.0, 3.0 );\n* // returns \n*/\nfunction Complex64( real, imag ) {\n\tif ( !( this instanceof Complex64 ) ) {\n\t\tthrow new TypeError( 'invalid invocation. Constructor must be called with the `new` keyword.' );\n\t}\n\tif ( !isNumber( real ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Real component must be a number. Value: `%s`.', real ) );\n\t}\n\tif ( !isNumber( imag ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Imaginary component must be a number. Value: `%s`.', imag ) );\n\t}\n\tdefineProperty( this, 're', {\n\t\t'configurable': false,\n\t\t'enumerable': true,\n\t\t'writable': false,\n\t\t'value': float64ToFloat32( real )\n\t});\n\tdefineProperty( this, 'im', {\n\t\t'configurable': false,\n\t\t'enumerable': true,\n\t\t'writable': false,\n\t\t'value': float64ToFloat32( imag )\n\t});\n\treturn this;\n}\n\n/**\n* Size (in bytes) of each component.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex64\n* @type {integer}\n* @returns {integer} size of each component\n*\n* @example\n* var nbytes = Complex64.BYTES_PER_ELEMENT;\n* // returns 4\n*/\nsetReadOnly( Complex64, 'BYTES_PER_ELEMENT', 4 );\n\n/**\n* Size (in bytes) of each component.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex64.prototype\n* @type {integer}\n* @returns {integer} size of each component\n*\n* @example\n* var z = new Complex64( 5.0, 3.0 );\n*\n* var nbytes = z.BYTES_PER_ELEMENT;\n* // returns 4\n*/\nsetReadOnly( Complex64.prototype, 'BYTES_PER_ELEMENT', 4 );\n\n/**\n* Length (in bytes) of a complex number.\n*\n* @name byteLength\n* @memberof Complex64.prototype\n* @type {integer}\n* @returns {integer} byte length\n*\n* @example\n* var z = new Complex64( 5.0, 3.0 );\n*\n* var nbytes = z.byteLength;\n* // returns 8\n*/\nsetReadOnly( Complex64.prototype, 'byteLength', 8 );\n\n/**\n* Serializes a complex number as a string.\n*\n* @name toString\n* @memberof Complex64.prototype\n* @type {Function}\n* @returns {string} serialized complex number\n*\n* @example\n* var z = new Complex64( 5.0, 3.0 );\n*\n* var str = z.toString();\n* // returns '5 + 3i'\n*/\nsetReadOnly( Complex64.prototype, 'toString', toStr );\n\n/**\n* Serializes a complex number as a JSON object.\n*\n* ## Notes\n*\n* - `JSON.stringify()` implicitly calls this method when stringifying a `Complex64` instance.\n*\n* @name toJSON\n* @memberof Complex64.prototype\n* @type {Function}\n* @returns {Object} serialized complex number\n*\n* @example\n* var z = new Complex64( 5.0, 3.0 );\n*\n* var obj = z.toJSON();\n* // returns { 'type': 'Complex64', 're': 5.0, 'im': 3.0 }\n*/\nsetReadOnly( Complex64.prototype, 'toJSON', toJSON );\n\n\n// EXPORTS //\n\nexport default Complex64;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport Complex128 from '@stdlib/complex-float64';\nimport Complex64 from '@stdlib/complex-float32';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a complex number-like object.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a complex number-like object.\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n* import Complex64 from '@stdlib/complex-float32';\n*\n* var x = new Complex128( 4.0, 2.0 );\n* var bool = isComplexLike( x );\n* // returns true\n*\n* x = new Complex64( 4.0, 2.0 );\n* bool = isComplexLike( x );\n* // returns true\n*/\nfunction isComplexLike( value ) {\n\tif ( value instanceof Complex128 || value instanceof Complex64 ) {\n\t\treturn true;\n\t}\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\ttypeof value.re === 'number' &&\n\t\ttypeof value.im === 'number'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isComplexLike;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isInteger from '@stdlib/math-base-assert-is-integer';\n\n\n// MAIN //\n\n/**\n* Tests if a finite numeric value is an even number.\n*\n* @param {number} x - value to test\n* @returns {boolean} boolean indicating whether the value is an even number\n*\n* @example\n* var bool = isEven( 5.0 );\n* // returns false\n*\n* @example\n* var bool = isEven( -2.0 );\n* // returns true\n*\n* @example\n* var bool = isEven( 0.0 );\n* // returns true\n*\n* @example\n* var bool = isEven( NaN );\n* // returns false\n*/\nfunction isEven( x ) {\n\treturn isInteger( x/2.0 );\n}\n\n\n// EXPORTS //\n\nexport default isEven;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport hasOwnProp from '@stdlib/assert-has-own-property';\nimport Symbol from '@stdlib/symbol-ctor';\n\n\n// MAIN //\n\n/**\n* Tests for native `Symbol.iterator` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Symbol.iterator` support\n*\n* @example\n* var bool = hasIteratorSymbolSupport();\n* // returns \n*/\nfunction hasIteratorSymbolSupport() {\n\treturn (\n\t\ttypeof Symbol === 'function' &&\n\t\ttypeof Symbol( 'foo' ) === 'symbol' &&\n\t\thasOwnProp( Symbol, 'iterator' ) &&\n\t\ttypeof Symbol.iterator === 'symbol'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default hasIteratorSymbolSupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Serializes a complex number as a string.\n*\n* @private\n* @returns {string} serialized complex number\n*/\nfunction toString() { // eslint-disable-line stdlib/no-redeclare\n\t/* eslint-disable no-invalid-this */\n\tvar str = '' + this.re;\n\tif ( this.im < 0 ) {\n\t\tstr += ' - ' + (-this.im);\n\t} else {\n\t\tstr += ' + ' + this.im;\n\t}\n\tstr += 'i';\n\treturn str;\n}\n\n\n// EXPORTS //\n\nexport default toString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Serializes a complex number as a JSON object.\n*\n* @private\n* @returns {Object} JSON representation\n*/\nfunction toJSON() {\n\t/* eslint-disable no-invalid-this */\n\tvar out = {};\n\tout.type = 'Complex64';\n\tout.re = this.re;\n\tout.im = this.im;\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default toJSON;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport hasIteratorSymbolSupport from '@stdlib/assert-has-iterator-symbol-support';\n\n\n// MAIN //\n\n/**\n* Iterator symbol.\n*\n* @name IteratorSymbol\n* @constant\n* @type {(symbol|null)}\n*\n* @example\n* function iterator() {\n* var it;\n* var i;\n*\n* i = -1;\n*\n* it = {};\n* it.next = next;\n* it.return = done;\n*\n* if ( IteratorSymbol ) {\n* it[ IteratorSymbol ] = iterator;\n* }\n* return it;\n*\n* function next() {\n* i += 1;\n* return {\n* 'value': i,\n* 'done': false\n* };\n* }\n*\n* function done( value ) {\n* if ( arguments.length === 0 ) {\n* return {\n* 'done': true\n* };\n* }\n* return {\n* 'value': value,\n* 'done': true\n* };\n* }\n* }\n*\n* var obj = iterator();\n*/\nvar IteratorSymbol = ( hasIteratorSymbolSupport() ) ? Symbol.iterator : null;\n\n\n// EXPORTS //\n\nexport default IteratorSymbol;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport defineProperty from '@stdlib/utils-define-property';\n\n\n// MAIN //\n\n/**\n* Defines a non-enumerable read-only accessor.\n*\n* @param {Object} obj - object on which to define the property\n* @param {(string|symbol)} prop - property name\n* @param {Function} getter - accessor\n*\n* @example\n* function getter() {\n* return 'bar';\n* }\n*\n* var obj = {};\n*\n* setNonEnumerableReadOnlyAccessor( obj, 'foo', getter );\n*\n* try {\n* obj.foo = 'boop';\n* } catch ( err ) {\n* console.error( err.message );\n* }\n*/\nfunction setNonEnumerableReadOnlyAccessor( obj, prop, getter ) { // eslint-disable-line id-length\n\tdefineProperty( obj, prop, {\n\t\t'configurable': false,\n\t\t'enumerable': false,\n\t\t'get': getter\n\t});\n}\n\n\n// EXPORTS //\n\nexport default setNonEnumerableReadOnlyAccessor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Returns the real component of a single-precision complex floating-point number.\n*\n* @param {Complex} z - complex number\n* @returns {number} real component\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n*\n* var z = new Complex64( 5.0, 3.0 );\n*\n* var re = realf( z );\n* // returns 5.0\n*/\nfunction realf( z ) {\n\treturn z.re;\n}\n\n\n// EXPORTS //\n\nexport default realf;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Returns the imaginary component of a single-precision complex floating-point number.\n*\n* @param {Complex} z - complex number\n* @returns {number} imaginary component\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n*\n* var z = new Complex64( 5.0, 3.0 );\n*\n* var im = imagf( z );\n* // returns 3.0\n*/\nfunction imagf( z ) {\n\treturn z.im;\n}\n\n\n// EXPORTS //\n\nexport default imagf;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport Float32Array from '@stdlib/array-float32';\n\n\n// MAIN //\n\n/**\n* Reinterprets a `Complex64Array` as a `Float32Array`.\n*\n* @param {Complex64Array} x - input array\n* @param {NonNegativeInteger} offset - starting index\n* @returns {Float32Array} `Float32Array` view\n*\n* @example\n* import Complex64Array from '@stdlib/array-complex64';\n*\n* var x = new Complex64Array( 10 );\n*\n* var out = reinterpret( x, 0 );\n* // returns \n*\n* var bool = ( out.buffer === x.buffer );\n* // returns true\n*/\nfunction reinterpret( x, offset ) {\n\treturn new Float32Array( x.buffer, x.byteOffset+(x.BYTES_PER_ELEMENT*offset), 2*(x.length-offset) ); // eslint-disable-line max-len\n}\n\n\n// EXPORTS //\n\nexport default reinterpret;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport Float64Array from '@stdlib/array-float64';\n\n\n// MAIN //\n\n/**\n* Reinterprets a `Complex128Array` as a `Float64Array`.\n*\n* @param {Complex128Array} x - input array\n* @param {NonNegativeInteger} offset - starting index\n* @returns {Float64Array} `Float64Array` view\n*\n* @example\n* import Complex128Array from '@stdlib/array-complex128';\n*\n* var x = new Complex128Array( 10 );\n*\n* var out = reinterpret( x, 0 );\n* // returns \n*\n* var bool = ( out.buffer === x.buffer );\n* // returns true\n*/\nfunction reinterpret( x, offset ) {\n\treturn new Float64Array( x.buffer, x.byteOffset+(x.BYTES_PER_ELEMENT*offset), 2*(x.length-offset) ); // eslint-disable-line max-len\n}\n\n\n// EXPORTS //\n\nexport default reinterpret;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// VARIABLES //\n\nvar GETTERS = {\n\t'float64': getFloat64,\n\t'float32': getFloat32,\n\t'int32': getInt32,\n\t'int16': getInt16,\n\t'int8': getInt8,\n\t'uint32': getUint32,\n\t'uint16': getUint16,\n\t'uint8': getUint8,\n\t'uint8c': getUint8c,\n\t'generic': getGeneric,\n\t'default': getArrayLike\n};\n\n\n// FUNCTIONS //\n\n/**\n* Returns an element from a `Float64Array`.\n*\n* @private\n* @param {Float64Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n*\n* var arr = new Float64Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getFloat64( arr, 2 );\n* // returns 3.0\n*/\nfunction getFloat64( arr, idx ) {\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from a `Float32Array`.\n*\n* @private\n* @param {Float32Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Float32Array from '@stdlib/array-float32';\n*\n* var arr = new Float32Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getFloat32( arr, 2 );\n* // returns 3.0\n*/\nfunction getFloat32( arr, idx ) {\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from an `Int32Array`.\n*\n* @private\n* @param {Int32Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Int32Array from '@stdlib/array-int32';\n*\n* var arr = new Int32Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getInt32( arr, 2 );\n* // returns 3\n*/\nfunction getInt32( arr, idx ) { // eslint-disable-line stdlib/jsdoc-doctest-decimal-point\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from an `Int16Array`.\n*\n* @private\n* @param {Int16Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Int16Array from '@stdlib/array-int16';\n*\n* var arr = new Int16Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getInt16( arr, 2 );\n* // returns 3\n*/\nfunction getInt16( arr, idx ) { // eslint-disable-line stdlib/jsdoc-doctest-decimal-point\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from an `Int8Array`.\n*\n* @private\n* @param {Int8Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Int8Array from '@stdlib/array-int8';\n*\n* var arr = new Int8Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getInt8( arr, 2 );\n* // returns 3\n*/\nfunction getInt8( arr, idx ) { // eslint-disable-line stdlib/jsdoc-doctest-decimal-point\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from a `Uint32Array`.\n*\n* @private\n* @param {Uint32Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Uint32Array from '@stdlib/array-uint32';\n*\n* var arr = new Uint32Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getUint32( arr, 2 );\n* // returns 3\n*/\nfunction getUint32( arr, idx ) { // eslint-disable-line stdlib/jsdoc-doctest-decimal-point\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from a `Uint16Array`.\n*\n* @private\n* @param {Uint16Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Uint16Array from '@stdlib/array-uint16';\n*\n* var arr = new Uint16Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getUint16( arr, 2 );\n* // returns 3\n*/\nfunction getUint16( arr, idx ) { // eslint-disable-line stdlib/jsdoc-doctest-decimal-point\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from a `Uint8Array`.\n*\n* @private\n* @param {Uint8Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Uint8Array from '@stdlib/array-uint8';\n*\n* var arr = new Uint8Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getUint8( arr, 2 );\n* // returns 3\n*/\nfunction getUint8( arr, idx ) { // eslint-disable-line stdlib/jsdoc-doctest-decimal-point\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from a `Uint8ClampedArray`.\n*\n* @private\n* @param {Uint8ClampedArray} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Uint8ClampedArray from '@stdlib/array-uint8c';\n*\n* var arr = new Uint8ClampedArray( [ 1, 2, 3, 4 ] );\n*\n* var v = getUint8c( arr, 2 );\n* // returns 3\n*/\nfunction getUint8c( arr, idx ) { // eslint-disable-line stdlib/jsdoc-doctest-decimal-point\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from a generic `Array`.\n*\n* @private\n* @param {Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {*} element value\n*\n* @example\n* var arr = [ 1, 2, 3, 4 ];\n*\n* var v = getGeneric( arr, 2 );\n* // returns 3\n*/\nfunction getGeneric( arr, idx ) {\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from an indexed array-like object.\n*\n* @private\n* @param {Collection} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {*} element value\n*\n* @example\n* var arr = [ 1, 2, 3, 4 ];\n*\n* var v = getArrayLike( arr, 2 );\n* // returns 3\n*/\nfunction getArrayLike( arr, idx ) {\n\treturn arr[ idx ];\n}\n\n\n// MAIN //\n\n/**\n* Returns an accessor function for retrieving an element from an indexed array-like object.\n*\n* @param {string} dtype - array dtype\n* @returns {Function} accessor\n*\n* @example\n* import dtype from '@stdlib/array-dtype';\n*\n* var arr = [ 1, 2, 3, 4 ];\n*\n* var get = getter( dtype( arr ) );\n* var v = get( arr, 2 );\n* // returns 3\n*/\nfunction getter( dtype ) {\n\tvar f = GETTERS[ dtype ];\n\tif ( typeof f === 'function' ) {\n\t\treturn f;\n\t}\n\treturn GETTERS.default;\n}\n\n\n// EXPORTS //\n\nexport default getter;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// VARIABLES //\n\nvar GETTERS = {\n\t'complex128': getComplex128,\n\t'complex64': getComplex64,\n\t'default': getArrayLike\n};\n\n\n// FUNCTIONS //\n\n/**\n* Returns an element from a `Complex128Array`.\n*\n* @private\n* @param {Complex128Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Complex128Array from '@stdlib/array-complex128';\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* var arr = new Complex128Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getComplex128( arr, 1 );\n* // returns \n*\n* var re = real( v );\n* // returns 3.0\n*\n* var im = imag( v );\n* // returns 4.0\n*/\nfunction getComplex128( arr, idx ) {\n\treturn arr.get( idx );\n}\n\n/**\n* Returns an element from a `Complex64Array`.\n*\n* @private\n* @param {Complex64Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Complex64Array from '@stdlib/array-complex64';\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* var arr = new Complex64Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getComplex64( arr, 1 );\n* // returns \n*\n* var re = realf( v );\n* // returns 3.0\n*\n* var im = imagf( v );\n* // returns 4.0\n*/\nfunction getComplex64( arr, idx ) {\n\treturn arr.get( idx );\n}\n\n/**\n* Returns an element from an array-like object supporting the get/set protocol.\n*\n* @private\n* @param {Collection} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {*} element value\n*\n* @example\n* var arr = [ 1, 2, 3, 4 ];\n*\n* function get( idx ) {\n* return arr[ idx ];\n* }\n*\n* function set( value, idx ) {\n* arr[ idx ] = value;\n* }\n*\n* arr.get = get;\n* arr.set = set;\n*\n* var v = getArrayLike( arr, 2 );\n* // returns 3\n*/\nfunction getArrayLike( arr, idx ) {\n\treturn arr.get( idx );\n}\n\n\n// MAIN //\n\n/**\n* Returns an accessor function for retrieving an element from an array-like object supporting the get/set protocol.\n*\n* @param {string} dtype - array dtype\n* @returns {Function} accessor\n*\n* @example\n* import Complex64Array from '@stdlib/array-complex64';\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n* import dtype from '@stdlib/array-dtype';\n*\n* var arr = new Complex64Array( [ 1, 2, 3, 4 ] );\n*\n* var get = getter( dtype( arr ) );\n* var v = get( arr, 1 );\n* // returns \n*\n* var re = realf( v );\n* // returns 3.0\n*\n* var im = imagf( v );\n* // returns 4.0\n*/\nfunction getter( dtype ) {\n\tvar f = GETTERS[ dtype ];\n\tif ( typeof f === 'function' ) {\n\t\treturn f;\n\t}\n\treturn GETTERS.default;\n}\n\n\n// EXPORTS //\n\nexport default getter;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isArrayLikeObject from '@stdlib/assert-is-array-like-object';\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport realf from '@stdlib/complex-realf';\nimport imagf from '@stdlib/complex-imagf';\nimport format from '@stdlib/string-format';\n\n\n// MAIN //\n\n/**\n* Returns an array of iterated values.\n*\n* @private\n* @param {Object} it - iterator\n* @returns {(Array|TypeError)} array or an error\n*/\nfunction fromIterator( it ) {\n\tvar out;\n\tvar v;\n\tvar z;\n\n\tout = [];\n\twhile ( true ) {\n\t\tv = it.next();\n\t\tif ( v.done ) {\n\t\t\tbreak;\n\t\t}\n\t\tz = v.value;\n\t\tif ( isArrayLikeObject( z ) && z.length >= 2 ) {\n\t\t\tout.push( z[ 0 ], z[ 1 ] );\n\t\t} else if ( isComplexLike( z ) ) {\n\t\t\tout.push( realf( z ), imagf( z ) );\n\t\t} else {\n\t\t\treturn new TypeError( format( 'invalid argument. An iterator must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', z ) );\n\t\t}\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default fromIterator;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isArrayLikeObject from '@stdlib/assert-is-array-like-object';\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport realf from '@stdlib/complex-realf';\nimport imagf from '@stdlib/complex-imagf';\nimport format from '@stdlib/string-format';\n\n\n// MAIN //\n\n/**\n* Returns an array of iterated values.\n*\n* @private\n* @param {Object} it - iterator\n* @param {Function} clbk - callback to invoke for each iterated value\n* @param {*} thisArg - invocation context\n* @returns {(Array|TypeError)} array or an error\n*/\nfunction fromIteratorMap( it, clbk, thisArg ) {\n\tvar out;\n\tvar v;\n\tvar z;\n\tvar i;\n\n\tout = [];\n\ti = -1;\n\twhile ( true ) {\n\t\tv = it.next();\n\t\tif ( v.done ) {\n\t\t\tbreak;\n\t\t}\n\t\ti += 1;\n\t\tz = clbk.call( thisArg, v.value, i );\n\t\tif ( isArrayLikeObject( z ) && z.length >= 2 ) {\n\t\t\tout.push( z[ 0 ], z[ 1 ] );\n\t\t} else if ( isComplexLike( z ) ) {\n\t\t\tout.push( realf( z ), imagf( z ) );\n\t\t} else {\n\t\t\treturn new TypeError( format( 'invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', z ) );\n\t\t}\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default fromIteratorMap;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport realf from '@stdlib/complex-realf';\nimport imagf from '@stdlib/complex-imagf';\n\n\n// MAIN //\n\n/**\n* Returns a strided array of real and imaginary components.\n*\n* @private\n* @param {Float32Array} buf - output array\n* @param {Array} arr - array containing complex numbers\n* @returns {(Float32Array|null)} output array or null\n*/\nfunction fromArray( buf, arr ) {\n\tvar len;\n\tvar v;\n\tvar i;\n\tvar j;\n\n\tlen = arr.length;\n\tj = 0;\n\tfor ( i = 0; i < len; i++ ) {\n\t\tv = arr[ i ];\n\t\tif ( !isComplexLike( v ) ) {\n\t\t\treturn null;\n\t\t}\n\t\tbuf[ j ] = realf( v );\n\t\tbuf[ j+1 ] = imagf( v );\n\t\tj += 2; // stride\n\t}\n\treturn buf;\n}\n\n\n// EXPORTS //\n\nexport default fromArray;\n","/* eslint-disable no-restricted-syntax, max-lines, no-invalid-this */\n\n/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isNonNegativeInteger } from '@stdlib/assert-is-nonnegative-integer';\nimport isArrayLikeObject from '@stdlib/assert-is-array-like-object';\nimport isCollection from '@stdlib/assert-is-collection';\nimport isArrayBuffer from '@stdlib/assert-is-arraybuffer';\nimport isObject from '@stdlib/assert-is-object';\nimport isArray from '@stdlib/assert-is-array';\nimport isFunction from '@stdlib/assert-is-function';\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport isEven from '@stdlib/math-base-assert-is-even';\nimport isInteger from '@stdlib/math-base-assert-is-integer';\nimport hasIteratorSymbolSupport from '@stdlib/assert-has-iterator-symbol-support';\nimport ITERATOR_SYMBOL from '@stdlib/symbol-iterator';\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport setReadOnlyAccessor from '@stdlib/utils-define-nonenumerable-read-only-accessor';\nimport Float32Array from '@stdlib/array-float32';\nimport Complex64 from '@stdlib/complex-float32';\nimport format from '@stdlib/string-format';\nimport realf from '@stdlib/complex-realf';\nimport imagf from '@stdlib/complex-imagf';\nimport reinterpret64 from '@stdlib/strided-base-reinterpret-complex64';\nimport reinterpret128 from '@stdlib/strided-base-reinterpret-complex128';\nimport getter from '@stdlib/array-base-getter';\nimport accessorGetter from '@stdlib/array-base-accessor-getter';\nimport fromIterator from './from_iterator.js';\nimport fromIteratorMap from './from_iterator_map.js';\nimport fromArray from './from_array.js';\n\n\n// VARIABLES //\n\nvar BYTES_PER_ELEMENT = Float32Array.BYTES_PER_ELEMENT * 2;\nvar HAS_ITERATOR_SYMBOL = hasIteratorSymbolSupport();\n\n\n// FUNCTIONS //\n\n/**\n* Returns a boolean indicating if a value is a complex typed array.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a complex typed array\n*/\nfunction isComplexArray( value ) {\n\treturn (\n\t\tvalue instanceof Complex64Array ||\n\t\t(\n\t\t\ttypeof value === 'object' &&\n\t\t\tvalue !== null &&\n\t\t\t(\n\t\t\t\tvalue.constructor.name === 'Complex64Array' ||\n\t\t\t\tvalue.constructor.name === 'Complex128Array'\n\t\t\t) &&\n\t\t\ttypeof value._length === 'number' && // eslint-disable-line no-underscore-dangle\n\n\t\t\t// NOTE: we don't perform a more rigorous test here for a typed array for performance reasons, as robustly checking for a typed array instance could require walking the prototype tree and performing relatively expensive constructor checks...\n\t\t\ttypeof value._buffer === 'object' // eslint-disable-line no-underscore-dangle\n\t\t)\n\t);\n}\n\n/**\n* Returns a boolean indicating if a value is a complex typed array constructor.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a complex typed array constructor\n*/\nfunction isComplexArrayConstructor( value ) {\n\treturn (\n\t\tvalue === Complex64Array ||\n\n\t\t// NOTE: weaker test in order to avoid a circular dependency with Complex128Array...\n\t\tvalue.name === 'Complex128Array'\n\t);\n}\n\n/**\n* Returns a boolean indicating if a value is a `Complex64Array`.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a `Complex64Array`\n*/\nfunction isComplex64Array( value ) {\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\tvalue.constructor.name === 'Complex64Array' &&\n\t\tvalue.BYTES_PER_ELEMENT === BYTES_PER_ELEMENT\n\t);\n}\n\n/**\n* Returns a boolean indicating if a value is a `Complex128Array`.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a `Complex128Array`\n*/\nfunction isComplex128Array( value ) {\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\tvalue.constructor.name === 'Complex128Array' &&\n\t\tvalue.BYTES_PER_ELEMENT === BYTES_PER_ELEMENT*2\n\t);\n}\n\n\n// MAIN //\n\n/**\n* 64-bit complex number array constructor.\n*\n* @constructor\n* @param {(NonNegativeInteger|Collection|ArrayBuffer|Iterable)} [arg] - length, typed array, array-like object, buffer, or an iterable\n* @param {NonNegativeInteger} [byteOffset=0] - byte offset\n* @param {NonNegativeInteger} [length] - view length\n* @throws {RangeError} ArrayBuffer byte length must be a multiple of `8`\n* @throws {RangeError} array-like object and typed array input arguments must have a length which is a multiple of two\n* @throws {TypeError} if provided only a single argument, must provide a valid argument\n* @throws {TypeError} byte offset must be a nonnegative integer\n* @throws {RangeError} byte offset must be a multiple of `8`\n* @throws {TypeError} view length must be a positive multiple of `8`\n* @throws {RangeError} must provide sufficient memory to accommodate byte offset and view length requirements\n* @throws {TypeError} an iterator must return either a two element array containing real and imaginary components or a complex number\n* @returns {Complex64Array} complex number array\n*\n* @example\n* var arr = new Complex64Array();\n* // returns \n*\n* var len = arr.length;\n* // returns 0\n*\n* @example\n* var arr = new Complex64Array( 2 );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*\n* @example\n* var arr = new Complex64Array( [ 1.0, -1.0 ] );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* import ArrayBuffer from '@stdlib/array-buffer';\n*\n* var buf = new ArrayBuffer( 16 );\n* var arr = new Complex64Array( buf );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*\n* @example\n* import ArrayBuffer from '@stdlib/array-buffer';\n*\n* var buf = new ArrayBuffer( 16 );\n* var arr = new Complex64Array( buf, 8 );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* import ArrayBuffer from '@stdlib/array-buffer';\n*\n* var buf = new ArrayBuffer( 32 );\n* var arr = new Complex64Array( buf, 8, 2 );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*/\nfunction Complex64Array() {\n\tvar byteOffset;\n\tvar nargs;\n\tvar buf;\n\tvar len;\n\n\tnargs = arguments.length;\n\tif ( !(this instanceof Complex64Array) ) {\n\t\tif ( nargs === 0 ) {\n\t\t\treturn new Complex64Array();\n\t\t}\n\t\tif ( nargs === 1 ) {\n\t\t\treturn new Complex64Array( arguments[0] );\n\t\t}\n\t\tif ( nargs === 2 ) {\n\t\t\treturn new Complex64Array( arguments[0], arguments[1] );\n\t\t}\n\t\treturn new Complex64Array( arguments[0], arguments[1], arguments[2] );\n\t}\n\t// Create the underlying data buffer...\n\tif ( nargs === 0 ) {\n\t\tbuf = new Float32Array( 0 ); // backward-compatibility\n\t} else if ( nargs === 1 ) {\n\t\tif ( isNonNegativeInteger( arguments[0] ) ) {\n\t\t\tbuf = new Float32Array( arguments[0]*2 );\n\t\t} else if ( isCollection( arguments[0] ) ) {\n\t\t\tbuf = arguments[ 0 ];\n\t\t\tlen = buf.length;\n\n\t\t\t// If provided a \"generic\" array, peak at the first value, and, if the value is a complex number, try to process as an array of complex numbers, falling back to \"normal\" typed array initialization if we fail and ensuring consistency if the first value had not been a complex number...\n\t\t\tif ( len && isArray( buf ) && isComplexLike( buf[0] ) ) {\n\t\t\t\tbuf = fromArray( new Float32Array( len*2 ), buf );\n\t\t\t\tif ( buf === null ) {\n\t\t\t\t\t// We failed and we are now forced to allocate a new array :-(\n\t\t\t\t\tif ( !isEven( len ) ) {\n\t\t\t\t\t\tthrow new RangeError( format( 'invalid argument. Array-like object arguments must have a length which is a multiple of two. Length: `%u`.', len ) );\n\t\t\t\t\t}\n\t\t\t\t\t// We failed, so fall back to directly setting values...\n\t\t\t\t\tbuf = new Float32Array( arguments[0] );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ( isComplex64Array( buf ) ) {\n\t\t\t\t\tbuf = reinterpret64( buf, 0 );\n\t\t\t\t} else if ( isComplex128Array( buf ) ) {\n\t\t\t\t\tbuf = reinterpret128( buf, 0 );\n\t\t\t\t} else if ( !isEven( len ) ) {\n\t\t\t\t\tthrow new RangeError( format( 'invalid argument. Array-like object and typed array arguments must have a length which is a multiple of two. Length: `%u`.', len ) );\n\t\t\t\t}\n\t\t\t\tbuf = new Float32Array( buf );\n\t\t\t}\n\t\t} else if ( isArrayBuffer( arguments[0] ) ) {\n\t\t\tbuf = arguments[ 0 ];\n\t\t\tif ( !isInteger( buf.byteLength/BYTES_PER_ELEMENT ) ) {\n\t\t\t\tthrow new RangeError( format( 'invalid argument. ArrayBuffer byte length must be a multiple of %u. Byte length: `%u`.', BYTES_PER_ELEMENT, buf.byteLength ) );\n\t\t\t}\n\t\t\tbuf = new Float32Array( buf );\n\t\t} else if ( isObject( arguments[0] ) ) {\n\t\t\tbuf = arguments[ 0 ];\n\t\t\tif ( HAS_ITERATOR_SYMBOL === false ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Environment lacks Symbol.iterator support. Must provide a length, ArrayBuffer, typed array, or array-like object. Value: `%s`.', buf ) );\n\t\t\t}\n\t\t\tif ( !isFunction( buf[ ITERATOR_SYMBOL ] ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.', buf ) );\n\t\t\t}\n\t\t\tbuf = buf[ ITERATOR_SYMBOL ]();\n\t\t\tif ( !isFunction( buf.next ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.', buf ) );\n\t\t\t}\n\t\t\tbuf = fromIterator( buf );\n\t\t\tif ( buf instanceof Error ) {\n\t\t\t\tthrow buf;\n\t\t\t}\n\t\t\tbuf = new Float32Array( buf );\n\t\t} else {\n\t\t\tthrow new TypeError( format( 'invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.', arguments[0] ) );\n\t\t}\n\t} else {\n\t\tbuf = arguments[ 0 ];\n\t\tif ( !isArrayBuffer( buf ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. First argument must be an ArrayBuffer. Value: `%s`.', buf ) );\n\t\t}\n\t\tbyteOffset = arguments[ 1 ];\n\t\tif ( !isNonNegativeInteger( byteOffset ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Byte offset must be a nonnegative integer. Value: `%s`.', byteOffset ) );\n\t\t}\n\t\tif ( !isInteger( byteOffset/BYTES_PER_ELEMENT ) ) {\n\t\t\tthrow new RangeError( format( 'invalid argument. Byte offset must be a multiple of %u. Value: `%u`.', BYTES_PER_ELEMENT, byteOffset ) );\n\t\t}\n\t\tif ( nargs === 2 ) {\n\t\t\tlen = buf.byteLength - byteOffset;\n\t\t\tif ( !isInteger( len/BYTES_PER_ELEMENT ) ) {\n\t\t\t\tthrow new RangeError( format( 'invalid arguments. ArrayBuffer view byte length must be a multiple of %u. View byte length: `%u`.', BYTES_PER_ELEMENT, len ) );\n\t\t\t}\n\t\t\tbuf = new Float32Array( buf, byteOffset );\n\t\t} else {\n\t\t\tlen = arguments[ 2 ];\n\t\t\tif ( !isNonNegativeInteger( len ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Length must be a nonnegative integer. Value: `%s`.', len ) );\n\t\t\t}\n\t\t\tif ( (len*BYTES_PER_ELEMENT) > (buf.byteLength-byteOffset) ) {\n\t\t\t\tthrow new RangeError( format( 'invalid arguments. ArrayBuffer has insufficient capacity. Either decrease the array length or provide a bigger buffer. Minimum capacity: `%u`.', len*BYTES_PER_ELEMENT ) );\n\t\t\t}\n\t\t\tbuf = new Float32Array( buf, byteOffset, len*2 );\n\t\t}\n\t}\n\tsetReadOnly( this, '_buffer', buf );\n\tsetReadOnly( this, '_length', buf.length/2 );\n\n\treturn this;\n}\n\n/**\n* Size (in bytes) of each array element.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex64Array\n* @readonly\n* @type {PositiveInteger}\n* @default 8\n*\n* @example\n* var nbytes = Complex64Array.BYTES_PER_ELEMENT;\n* // returns 8\n*/\nsetReadOnly( Complex64Array, 'BYTES_PER_ELEMENT', BYTES_PER_ELEMENT );\n\n/**\n* Constructor name.\n*\n* @name name\n* @memberof Complex64Array\n* @readonly\n* @type {string}\n* @default 'Complex64Array'\n*\n* @example\n* var str = Complex64Array.name;\n* // returns 'Complex64Array'\n*/\nsetReadOnly( Complex64Array, 'name', 'Complex64Array' );\n\n/**\n* Creates a new 64-bit complex number array from an array-like object or an iterable.\n*\n* @name from\n* @memberof Complex64Array\n* @type {Function}\n* @param {(Collection|Iterable)} src - array-like object or iterable\n* @param {Function} [clbk] - callback to invoke for each source element\n* @param {*} [thisArg] - context\n* @throws {TypeError} `this` context must be a constructor\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be an array-like object or an iterable\n* @throws {TypeError} second argument must be a function\n* @throws {RangeError} array-like objects must have a length which is a multiple of two\n* @throws {TypeError} an iterator must return either a two element array containing real and imaginary components or a complex number\n* @throws {TypeError} when provided an iterator, a callback must return either a two element array containing real and imaginary components or a complex number\n* @returns {Complex64Array} 64-bit complex number array\n*\n* @example\n* var arr = Complex64Array.from( [ 1.0, -1.0 ] );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n*\n* var arr = Complex64Array.from( [ new Complex64( 1.0, 1.0 ) ] );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* function clbk( v ) {\n* return new Complex64( realf(v)*2.0, imagf(v)*2.0 );\n* }\n*\n* var arr = Complex64Array.from( [ new Complex64( 1.0, 1.0 ) ], clbk );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*/\nsetReadOnly( Complex64Array, 'from', function from( src ) {\n\tvar thisArg;\n\tvar nargs;\n\tvar clbk;\n\tvar out;\n\tvar buf;\n\tvar tmp;\n\tvar get;\n\tvar len;\n\tvar flg;\n\tvar v;\n\tvar i;\n\tvar j;\n\tif ( !isFunction( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` context must be a constructor.' );\n\t}\n\tif ( !isComplexArrayConstructor( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tnargs = arguments.length;\n\tif ( nargs > 1 ) {\n\t\tclbk = arguments[ 1 ];\n\t\tif ( !isFunction( clbk ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be a function. Value: `%s`.', clbk ) );\n\t\t}\n\t\tif ( nargs > 2 ) {\n\t\t\tthisArg = arguments[ 2 ];\n\t\t}\n\t}\n\tif ( isComplexArray( src ) ) {\n\t\tlen = src.length;\n\t\tif ( clbk ) {\n\t\t\tout = new this( len );\n\t\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\t\tj = 0;\n\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\tv = clbk.call( thisArg, src.get( i ), i );\n\t\t\t\tif ( isComplexLike( v ) ) {\n\t\t\t\t\tbuf[ j ] = realf( v );\n\t\t\t\t\tbuf[ j+1 ] = imagf( v );\n\t\t\t\t} else if ( isArrayLikeObject( v ) && v.length >= 2 ) {\n\t\t\t\t\tbuf[ j ] = v[ 0 ];\n\t\t\t\t\tbuf[ j+1 ] = v[ 1 ];\n\t\t\t\t} else {\n\t\t\t\t\tthrow new TypeError( format( 'invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', v ) );\n\t\t\t\t}\n\t\t\t\tj += 2; // stride\n\t\t\t}\n\t\t\treturn out;\n\t\t}\n\t\treturn new this( src );\n\t}\n\tif ( isCollection( src ) ) {\n\t\tif ( clbk ) {\n\t\t\t// Note: array contents affect how we iterate over a provided data source. If only complex number objects, we can extract real and imaginary components. Otherwise, for non-complex number arrays (e.g., `Float64Array`, etc), we assume a strided array where real and imaginary components are interleaved. In the former case, we expect a callback to return real and imaginary components (possibly as a complex number). In the latter case, we expect a callback to return *either* a real or imaginary component.\n\n\t\t\tlen = src.length;\n\t\t\tif ( src.get && src.set ) {\n\t\t\t\tget = accessorGetter( 'default' );\n\t\t\t} else {\n\t\t\t\tget = getter( 'default' );\n\t\t\t}\n\t\t\t// Detect whether we've been provided an array which returns complex number objects...\n\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\tif ( !isComplexLike( get( src, i ) ) ) {\n\t\t\t\t\tflg = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// If an array does not contain only complex number objects, then we assume interleaved real and imaginary components...\n\t\t\tif ( flg ) {\n\t\t\t\tif ( !isEven( len ) ) {\n\t\t\t\t\tthrow new RangeError( format( 'invalid argument. First argument must have a length which is a multiple of %u. Length: `%u`.', 2, len ) );\n\t\t\t\t}\n\t\t\t\tout = new this( len/2 );\n\t\t\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\t\tbuf[ i ] = clbk.call( thisArg, get( src, i ), i );\n\t\t\t\t}\n\t\t\t\treturn out;\n\t\t\t}\n\t\t\t// If an array contains only complex number objects, then we need to extract real and imaginary components...\n\t\t\tout = new this( len );\n\t\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\t\tj = 0;\n\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\tv = clbk.call( thisArg, get( src, i ), i );\n\t\t\t\tif ( isComplexLike( v ) ) {\n\t\t\t\t\tbuf[ j ] = realf( v );\n\t\t\t\t\tbuf[ j+1 ] = imagf( v );\n\t\t\t\t} else if ( isArrayLikeObject( v ) && v.length >= 2 ) {\n\t\t\t\t\tbuf[ j ] = v[ 0 ];\n\t\t\t\t\tbuf[ j+1 ] = v[ 1 ];\n\t\t\t\t} else {\n\t\t\t\t\tthrow new TypeError( format( 'invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', v ) );\n\t\t\t\t}\n\t\t\t\tj += 2; // stride\n\t\t\t}\n\t\t\treturn out;\n\t\t}\n\t\treturn new this( src );\n\t}\n\tif ( isObject( src ) && HAS_ITERATOR_SYMBOL && isFunction( src[ ITERATOR_SYMBOL ] ) ) { // eslint-disable-line max-len\n\t\tbuf = src[ ITERATOR_SYMBOL ]();\n\t\tif ( !isFunction( buf.next ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.', src ) );\n\t\t}\n\t\tif ( clbk ) {\n\t\t\ttmp = fromIteratorMap( buf, clbk, thisArg );\n\t\t} else {\n\t\t\ttmp = fromIterator( buf );\n\t\t}\n\t\tif ( tmp instanceof Error ) {\n\t\t\tthrow tmp;\n\t\t}\n\t\tlen = tmp.length / 2;\n\t\tout = new this( len );\n\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\tbuf[ i ] = tmp[ i ];\n\t\t}\n\t\treturn out;\n\t}\n\tthrow new TypeError( format( 'invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.', src ) );\n});\n\n/**\n* Creates a new 64-bit complex number array from a variable number of arguments.\n*\n* @name of\n* @memberof Complex64Array\n* @type {Function}\n* @param {...*} element - array elements\n* @throws {TypeError} `this` context must be a constructor\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Complex64Array} 64-bit complex number array\n*\n* @example\n* var arr = Complex64Array.of( 1.0, 1.0, 1.0, 1.0 );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*/\nsetReadOnly( Complex64Array, 'of', function of() {\n\tvar args;\n\tvar i;\n\tif ( !isFunction( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` context must be a constructor.' );\n\t}\n\tif ( !isComplexArrayConstructor( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\targs = [];\n\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\targs.push( arguments[ i ] );\n\t}\n\treturn new this( args );\n});\n\n/**\n* Pointer to the underlying data buffer.\n*\n* @name buffer\n* @memberof Complex64Array.prototype\n* @readonly\n* @type {ArrayBuffer}\n*\n* @example\n* var arr = new Complex64Array( 10 );\n*\n* var buf = arr.buffer;\n* // returns \n*/\nsetReadOnlyAccessor( Complex64Array.prototype, 'buffer', function get() {\n\treturn this._buffer.buffer;\n});\n\n/**\n* Size (in bytes) of the array.\n*\n* @name byteLength\n* @memberof Complex64Array.prototype\n* @readonly\n* @type {NonNegativeInteger}\n*\n* @example\n* var arr = new Complex64Array( 10 );\n*\n* var byteLength = arr.byteLength;\n* // returns 80\n*/\nsetReadOnlyAccessor( Complex64Array.prototype, 'byteLength', function get() {\n\treturn this._buffer.byteLength;\n});\n\n/**\n* Offset (in bytes) of the array from the start of its underlying `ArrayBuffer`.\n*\n* @name byteOffset\n* @memberof Complex64Array.prototype\n* @readonly\n* @type {NonNegativeInteger}\n*\n* @example\n* var arr = new Complex64Array( 10 );\n*\n* var byteOffset = arr.byteOffset;\n* // returns 0\n*/\nsetReadOnlyAccessor( Complex64Array.prototype, 'byteOffset', function get() {\n\treturn this._buffer.byteOffset;\n});\n\n/**\n* Size (in bytes) of each array element.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex64Array.prototype\n* @readonly\n* @type {PositiveInteger}\n* @default 8\n*\n* @example\n* var arr = new Complex64Array( 10 );\n*\n* var nbytes = arr.BYTES_PER_ELEMENT;\n* // returns 8\n*/\nsetReadOnly( Complex64Array.prototype, 'BYTES_PER_ELEMENT', Complex64Array.BYTES_PER_ELEMENT );\n\n/**\n* Copies a sequence of elements within the array to the position starting at `target`.\n*\n* @name copyWithin\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {integer} target - index at which to start copying elements\n* @param {integer} start - source index at which to copy elements from\n* @param {integer} [end] - source index at which to stop copying elements from\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Complex64Array} modified array\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* var arr = new Complex64Array( 4 );\n*\n* // Set the array elements:\n* arr.set( new Complex64( 1.0, 1.0 ), 0 );\n* arr.set( new Complex64( 2.0, 2.0 ), 1 );\n* arr.set( new Complex64( 3.0, 3.0 ), 2 );\n* arr.set( new Complex64( 4.0, 4.0 ), 3 );\n*\n* // Copy the first two elements to the last two elements:\n* arr.copyWithin( 2, 0, 2 );\n*\n* // Get the last array element:\n* var z = arr.get( 3 );\n*\n* var re = realf( z );\n* // returns 2.0\n*\n* var im = imagf( z );\n* // returns 2.0\n*/\nsetReadOnly( Complex64Array.prototype, 'copyWithin', function copyWithin( target, start ) {\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\t// FIXME: prefer a functional `copyWithin` implementation which addresses lack of universal browser support (e.g., IE11 and Safari) or ensure that typed arrays are polyfilled\n\tif ( arguments.length === 2 ) {\n\t\tthis._buffer.copyWithin( target*2, start*2 );\n\t} else {\n\t\tthis._buffer.copyWithin( target*2, start*2, arguments[2]*2 );\n\t}\n\treturn this;\n});\n\n/**\n* Returns an iterator for iterating over array key-value pairs.\n*\n* @name entries\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Iterator} iterator\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n*\n* var arr = [\n* new Complex64( 1.0, 1.0 ),\n* new Complex64( 2.0, 2.0 ),\n* new Complex64( 3.0, 3.0 )\n* ];\n* arr = new Complex64Array( arr );\n*\n* // Create an iterator:\n* var it = arr.entries();\n*\n* // Iterate over the key-value pairs...\n* var v = it.next().value;\n* // returns [ 0, ]\n*\n* v = it.next().value;\n* // returns [ 1, ]\n*\n* v = it.next().value;\n* // returns [ 2, ]\n*\n* var bool = it.next().done;\n* // returns true\n*/\nsetReadOnly( Complex64Array.prototype, 'entries', function entries() {\n\tvar buffer;\n\tvar self;\n\tvar iter;\n\tvar len;\n\tvar FLG;\n\tvar i;\n\tvar j;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tself = this;\n\tbuffer = this._buffer;\n\tlen = this._length;\n\n\t// Initialize the iteration indices:\n\ti = -1;\n\tj = -2;\n\n\t// Create an iterator protocol-compliant object:\n\titer = {};\n\tsetReadOnly( iter, 'next', next );\n\tsetReadOnly( iter, 'return', end );\n\n\tif ( ITERATOR_SYMBOL ) {\n\t\tsetReadOnly( iter, ITERATOR_SYMBOL, factory );\n\t}\n\treturn iter;\n\n\t/**\n\t* Returns an iterator protocol-compliant object containing the next iterated value.\n\t*\n\t* @private\n\t* @returns {Object} iterator protocol-compliant object\n\t*/\n\tfunction next() {\n\t\tvar z;\n\t\ti += 1;\n\t\tif ( FLG || i >= len ) {\n\t\t\treturn {\n\t\t\t\t'done': true\n\t\t\t};\n\t\t}\n\t\tj += 2;\n\t\tz = new Complex64( buffer[ j ], buffer[ j+1 ] );\n\t\treturn {\n\t\t\t'value': [ i, z ],\n\t\t\t'done': false\n\t\t};\n\t}\n\n\t/**\n\t* Finishes an iterator.\n\t*\n\t* @private\n\t* @param {*} [value] - value to return\n\t* @returns {Object} iterator protocol-compliant object\n\t*/\n\tfunction end( value ) {\n\t\tFLG = true;\n\t\tif ( arguments.length ) {\n\t\t\treturn {\n\t\t\t\t'value': value,\n\t\t\t\t'done': true\n\t\t\t};\n\t\t}\n\t\treturn {\n\t\t\t'done': true\n\t\t};\n\t}\n\n\t/**\n\t* Returns a new iterator.\n\t*\n\t* @private\n\t* @returns {Iterator} iterator\n\t*/\n\tfunction factory() {\n\t\treturn self.entries();\n\t}\n});\n\n/**\n* Returns an array element.\n*\n* @name get\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {NonNegativeInteger} idx - element index\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} must provide a nonnegative integer\n* @returns {(Complex64|void)} array element\n*\n* @example\n* var arr = new Complex64Array( 10 );\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* var z = arr.get( 0 );\n* // returns \n*\n* var re = realf( z );\n* // returns 0.0\n*\n* var im = imagf( z );\n* // returns 0.0\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n*\n* z = arr.get( 0 );\n* // returns \n*\n* re = realf( z );\n* // returns 1.0\n*\n* im = imagf( z );\n* // returns -1.0\n*\n* z = arr.get( 100 );\n* // returns undefined\n*/\nsetReadOnly( Complex64Array.prototype, 'get', function get( idx ) {\n\tvar buf;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isNonNegativeInteger( idx ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Must provide a nonnegative integer. Value: `%s`.', idx ) );\n\t}\n\tif ( idx >= this._length ) {\n\t\treturn;\n\t}\n\tbuf = this._buffer;\n\tidx *= 2;\n\treturn new Complex64( buf[ idx ], buf[ idx+1 ] );\n});\n\n/**\n* Number of array elements.\n*\n* @name length\n* @memberof Complex64Array.prototype\n* @readonly\n* @type {NonNegativeInteger}\n*\n* @example\n* var arr = new Complex64Array( 10 );\n*\n* var len = arr.length;\n* // returns 10\n*/\nsetReadOnlyAccessor( Complex64Array.prototype, 'length', function get() {\n\treturn this._length;\n});\n\n/**\n* Sets an array element.\n*\n* ## Notes\n*\n* - When provided a typed array, real or complex, we must check whether the source array shares the same buffer as the target array and whether the underlying memory overlaps. In particular, we are concerned with the following scenario:\n*\n* ```text\n* buf: ---------------------\n* src: ---------------------\n* ```\n*\n* In the above, as we copy values from `src`, we will overwrite values in the `src` view, resulting in duplicated values copied into the end of `buf`, which is not intended. Hence, to avoid overwriting source values, we must **copy** source values to a temporary array.\n*\n* In the other overlapping scenario,\n*\n* ```text\n* buf: ---------------------\n* src: ---------------------\n* ```\n*\n* by the time we begin copying into the overlapping region, we are copying from the end of `src`, a non-overlapping region, which means we don't run the risk of copying copied values, rather than the original `src` values as intended.\n*\n*\n* @name set\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {(Collection|Complex|ComplexArray)} value - value(s)\n* @param {NonNegativeInteger} [i=0] - element index at which to start writing values\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be either a complex number, an array-like object, or a complex number array\n* @throws {TypeError} index argument must be a nonnegative integer\n* @throws {RangeError} array-like objects must have a length which is a multiple of two\n* @throws {RangeError} index argument is out-of-bounds\n* @throws {RangeError} target array lacks sufficient storage to accommodate source values\n* @returns {void}\n*\n* @example\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* var arr = new Complex64Array( 10 );\n*\n* var z = arr.get( 0 );\n* // returns \n*\n* var re = realf( z );\n* // returns 0.0\n*\n* var im = imagf( z );\n* // returns 0.0\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n*\n* z = arr.get( 0 );\n* // returns \n*\n* re = realf( z );\n* // returns 1.0\n*\n* im = imagf( z );\n* // returns -1.0\n*/\nsetReadOnly( Complex64Array.prototype, 'set', function set( value ) {\n\t/* eslint-disable no-underscore-dangle */\n\tvar sbuf;\n\tvar idx;\n\tvar buf;\n\tvar tmp;\n\tvar flg;\n\tvar N;\n\tvar v;\n\tvar i;\n\tvar j;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tbuf = this._buffer;\n\tif ( arguments.length > 1 ) {\n\t\tidx = arguments[ 1 ];\n\t\tif ( !isNonNegativeInteger( idx ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Index argument must be a nonnegative integer. Value: `%s`.', idx ) );\n\t\t}\n\t} else {\n\t\tidx = 0;\n\t}\n\tif ( isComplexLike( value ) ) {\n\t\tif ( idx >= this._length ) {\n\t\t\tthrow new RangeError( format( 'invalid argument. Index argument is out-of-bounds. Value: `%u`.', idx ) );\n\t\t}\n\t\tidx *= 2;\n\t\tbuf[ idx ] = realf( value );\n\t\tbuf[ idx+1 ] = imagf( value );\n\t\treturn;\n\t}\n\tif ( isComplexArray( value ) ) {\n\t\tN = value._length;\n\t\tif ( idx+N > this._length ) {\n\t\t\tthrow new RangeError( 'invalid arguments. Target array lacks sufficient storage to accommodate source values.' );\n\t\t}\n\t\tsbuf = value._buffer;\n\n\t\t// Check for overlapping memory...\n\t\tj = buf.byteOffset + (idx*BYTES_PER_ELEMENT);\n\t\tif (\n\t\t\tsbuf.buffer === buf.buffer &&\n\t\t\t(\n\t\t\t\tsbuf.byteOffset < j &&\n\t\t\t\tsbuf.byteOffset+sbuf.byteLength > j\n\t\t\t)\n\t\t) {\n\t\t\t// We need to copy source values...\n\t\t\ttmp = new Float32Array( sbuf.length );\n\t\t\tfor ( i = 0; i < sbuf.length; i++ ) {\n\t\t\t\ttmp[ i ] = sbuf[ i ];\n\t\t\t}\n\t\t\tsbuf = tmp;\n\t\t}\n\t\tidx *= 2;\n\t\tj = 0;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\tbuf[ idx ] = sbuf[ j ];\n\t\t\tbuf[ idx+1 ] = sbuf[ j+1 ];\n\t\t\tidx += 2; // stride\n\t\t\tj += 2; // stride\n\t\t}\n\t\treturn;\n\t}\n\tif ( isCollection( value ) ) {\n\t\t// Detect whether we've been provided an array of complex numbers...\n\t\tN = value.length;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\tif ( !isComplexLike( value[ i ] ) ) {\n\t\t\t\tflg = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t// If an array does not contain only complex numbers, then we assume interleaved real and imaginary components...\n\t\tif ( flg ) {\n\t\t\tif ( !isEven( N ) ) {\n\t\t\t\tthrow new RangeError( format( 'invalid argument. Array-like object arguments must have a length which is a multiple of two. Length: `%u`.', N ) );\n\t\t\t}\n\t\t\tif ( idx+(N/2) > this._length ) {\n\t\t\t\tthrow new RangeError( 'invalid arguments. Target array lacks sufficient storage to accommodate source values.' );\n\t\t\t}\n\t\t\tsbuf = value;\n\n\t\t\t// Check for overlapping memory...\n\t\t\tj = buf.byteOffset + (idx*BYTES_PER_ELEMENT);\n\t\t\tif (\n\t\t\t\tsbuf.buffer === buf.buffer &&\n\t\t\t\t(\n\t\t\t\t\tsbuf.byteOffset < j &&\n\t\t\t\t\tsbuf.byteOffset+sbuf.byteLength > j\n\t\t\t\t)\n\t\t\t) {\n\t\t\t\t// We need to copy source values...\n\t\t\t\ttmp = new Float32Array( N );\n\t\t\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\t\t\ttmp[ i ] = sbuf[ i ];\n\t\t\t\t}\n\t\t\t\tsbuf = tmp;\n\t\t\t}\n\t\t\tidx *= 2;\n\t\t\tN /= 2;\n\t\t\tj = 0;\n\t\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\t\tbuf[ idx ] = sbuf[ j ];\n\t\t\t\tbuf[ idx+1 ] = sbuf[ j+1 ];\n\t\t\t\tidx += 2; // stride\n\t\t\t\tj += 2; // stride\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\t// If an array contains only complex numbers, then we need to extract real and imaginary components...\n\t\tif ( idx+N > this._length ) {\n\t\t\tthrow new RangeError( 'invalid arguments. Target array lacks sufficient storage to accommodate source values.' );\n\t\t}\n\t\tidx *= 2;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\tv = value[ i ];\n\t\t\tbuf[ idx ] = realf( v );\n\t\t\tbuf[ idx+1 ] = imagf( v );\n\t\t\tidx += 2; // stride\n\t\t}\n\t\treturn;\n\t}\n\tthrow new TypeError( format( 'invalid argument. First argument must be either a complex number, an array-like object, or a complex number array. Value: `%s`.', value ) );\n\n\t/* eslint-enable no-underscore-dangle */\n});\n\n\n// EXPORTS //\n\nexport default Complex64Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Returns the real component of a double-precision complex floating-point number.\n*\n* @param {Complex} z - complex number\n* @returns {number} real component\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n*\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var re = real( z );\n* // returns 5.0\n*/\nfunction real( z ) {\n\treturn z.re;\n}\n\n\n// EXPORTS //\n\nexport default real;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Returns the imaginary component of a double-precision complex floating-point number.\n*\n* @param {Complex} z - complex number\n* @returns {number} imaginary component\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n*\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var im = imag( z );\n* // returns 3.0\n*/\nfunction imag( z ) {\n\treturn z.im;\n}\n\n\n// EXPORTS //\n\nexport default imag;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isArrayLikeObject from '@stdlib/assert-is-array-like-object';\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport format from '@stdlib/string-format';\nimport real from '@stdlib/complex-real';\nimport imag from '@stdlib/complex-imag';\n\n\n// MAIN //\n\n/**\n* Returns an array of iterated values.\n*\n* @private\n* @param {Object} it - iterator\n* @returns {(Array|TypeError)} array or an error\n*/\nfunction fromIterator( it ) {\n\tvar out;\n\tvar v;\n\tvar z;\n\n\tout = [];\n\twhile ( true ) {\n\t\tv = it.next();\n\t\tif ( v.done ) {\n\t\t\tbreak;\n\t\t}\n\t\tz = v.value;\n\t\tif ( isArrayLikeObject( z ) && z.length >= 2 ) {\n\t\t\tout.push( z[ 0 ], z[ 1 ] );\n\t\t} else if ( isComplexLike( z ) ) {\n\t\t\tout.push( real( z ), imag( z ) );\n\t\t} else {\n\t\t\treturn new TypeError( format( 'invalid argument. An iterator must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', z ) );\n\t\t}\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default fromIterator;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isArrayLikeObject from '@stdlib/assert-is-array-like-object';\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport format from '@stdlib/string-format';\nimport real from '@stdlib/complex-real';\nimport imag from '@stdlib/complex-imag';\n\n\n// MAIN //\n\n/**\n* Returns an array of iterated values.\n*\n* @private\n* @param {Object} it - iterator\n* @param {Function} clbk - callback to invoke for each iterated value\n* @param {*} thisArg - invocation context\n* @returns {(Array|TypeError)} array or an error\n*/\nfunction fromIteratorMap( it, clbk, thisArg ) {\n\tvar out;\n\tvar v;\n\tvar z;\n\tvar i;\n\n\tout = [];\n\ti = -1;\n\twhile ( true ) {\n\t\tv = it.next();\n\t\tif ( v.done ) {\n\t\t\tbreak;\n\t\t}\n\t\ti += 1;\n\t\tz = clbk.call( thisArg, v.value, i );\n\t\tif ( isArrayLikeObject( z ) && z.length >= 2 ) {\n\t\t\tout.push( z[ 0 ], z[ 1 ] );\n\t\t} else if ( isComplexLike( z ) ) {\n\t\t\tout.push( real( z ), imag( z ) );\n\t\t} else {\n\t\t\treturn new TypeError( format( 'invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', z ) );\n\t\t}\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default fromIteratorMap;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport real from '@stdlib/complex-real';\nimport imag from '@stdlib/complex-imag';\n\n\n// MAIN //\n\n/**\n* Returns a strided array of real and imaginary components.\n*\n* @private\n* @param {Float64Array} buf - output array\n* @param {Array} arr - array containing complex numbers\n* @returns {(Float64Array|null)} output array or null\n*/\nfunction fromArray( buf, arr ) {\n\tvar len;\n\tvar v;\n\tvar i;\n\tvar j;\n\n\tlen = arr.length;\n\tj = 0;\n\tfor ( i = 0; i < len; i++ ) {\n\t\tv = arr[ i ];\n\t\tif ( !isComplexLike( v ) ) {\n\t\t\treturn null;\n\t\t}\n\t\tbuf[ j ] = real( v );\n\t\tbuf[ j+1 ] = imag( v );\n\t\tj += 2; // stride\n\t}\n\treturn buf;\n}\n\n\n// EXPORTS //\n\nexport default fromArray;\n","/* eslint-disable no-restricted-syntax, max-lines, no-invalid-this */\n\n/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isNonNegativeInteger } from '@stdlib/assert-is-nonnegative-integer';\nimport isArrayLikeObject from '@stdlib/assert-is-array-like-object';\nimport isCollection from '@stdlib/assert-is-collection';\nimport isArrayBuffer from '@stdlib/assert-is-arraybuffer';\nimport isObject from '@stdlib/assert-is-object';\nimport isArray from '@stdlib/assert-is-array';\nimport isFunction from '@stdlib/assert-is-function';\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport isEven from '@stdlib/math-base-assert-is-even';\nimport isInteger from '@stdlib/math-base-assert-is-integer';\nimport hasIteratorSymbolSupport from '@stdlib/assert-has-iterator-symbol-support';\nimport ITERATOR_SYMBOL from '@stdlib/symbol-iterator';\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport setReadOnlyAccessor from '@stdlib/utils-define-nonenumerable-read-only-accessor';\nimport Float64Array from '@stdlib/array-float64';\nimport Complex128 from '@stdlib/complex-float64';\nimport real from '@stdlib/complex-real';\nimport imag from '@stdlib/complex-imag';\nimport reinterpret64 from '@stdlib/strided-base-reinterpret-complex64';\nimport reinterpret128 from '@stdlib/strided-base-reinterpret-complex128';\nimport getter from '@stdlib/array-base-getter';\nimport accessorGetter from '@stdlib/array-base-accessor-getter';\nimport format from '@stdlib/string-format';\nimport fromIterator from './from_iterator.js';\nimport fromIteratorMap from './from_iterator_map.js';\nimport fromArray from './from_array.js';\n\n\n// VARIABLES //\n\nvar BYTES_PER_ELEMENT = Float64Array.BYTES_PER_ELEMENT * 2;\nvar HAS_ITERATOR_SYMBOL = hasIteratorSymbolSupport();\n\n\n// FUNCTIONS //\n\n/**\n* Returns a boolean indicating if a value is a complex typed array.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a complex typed array\n*/\nfunction isComplexArray( value ) {\n\treturn (\n\t\tvalue instanceof Complex128Array ||\n\t\t(\n\t\t\ttypeof value === 'object' &&\n\t\t\tvalue !== null &&\n\t\t\t(\n\t\t\t\tvalue.constructor.name === 'Complex64Array' ||\n\t\t\t\tvalue.constructor.name === 'Complex128Array'\n\t\t\t) &&\n\t\t\ttypeof value._length === 'number' && // eslint-disable-line no-underscore-dangle\n\n\t\t\t// NOTE: we don't perform a more rigorous test here for a typed array for performance reasons, as robustly checking for a typed array instance could require walking the prototype tree and performing relatively expensive constructor checks...\n\t\t\ttypeof value._buffer === 'object' // eslint-disable-line no-underscore-dangle\n\t\t)\n\t);\n}\n\n/**\n* Returns a boolean indicating if a value is a complex typed array constructor.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a complex typed array constructor\n*/\nfunction isComplexArrayConstructor( value ) {\n\treturn (\n\t\tvalue === Complex128Array ||\n\n\t\t// NOTE: weaker test in order to avoid a circular dependency with Complex64Array...\n\t\tvalue.name === 'Complex64Array'\n\t);\n}\n\n/**\n* Returns a boolean indicating if a value is a `Complex64Array`.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a `Complex64Array`\n*/\nfunction isComplex64Array( value ) {\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\tvalue.constructor.name === 'Complex64Array' &&\n\t\tvalue.BYTES_PER_ELEMENT === BYTES_PER_ELEMENT/2\n\t);\n}\n\n/**\n* Returns a boolean indicating if a value is a `Complex128Array`.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a `Complex128Array`\n*/\nfunction isComplex128Array( value ) {\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\tvalue.constructor.name === 'Complex128Array' &&\n\t\tvalue.BYTES_PER_ELEMENT === BYTES_PER_ELEMENT\n\t);\n}\n\n\n// MAIN //\n\n/**\n* 128-bit complex number array constructor.\n*\n* @constructor\n* @param {(NonNegativeInteger|Collection|ArrayBuffer|Iterable)} [arg] - length, typed array, array-like object, buffer, or iterable\n* @param {NonNegativeInteger} [byteOffset=0] - byte offset\n* @param {NonNegativeInteger} [length] - view length\n* @throws {RangeError} ArrayBuffer byte length must be a multiple of `16`\n* @throws {RangeError} array-like object and typed array input arguments must have a length which is a multiple of two\n* @throws {TypeError} if provided only a single argument, must provide a valid argument\n* @throws {TypeError} byte offset must be a nonnegative integer\n* @throws {RangeError} byte offset must be a multiple of `16`\n* @throws {TypeError} view length must be a positive multiple of `16`\n* @throws {RangeError} must provide sufficient memory to accommodate byte offset and view length requirements\n* @throws {TypeError} an iterator must return either a two element array containing real and imaginary components or a complex number\n* @returns {Complex128Array} complex number array\n*\n* @example\n* var arr = new Complex128Array();\n* // returns \n*\n* var len = arr.length;\n* // returns 0\n*\n* @example\n* var arr = new Complex128Array( 2 );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*\n* @example\n* var arr = new Complex128Array( [ 1.0, -1.0 ] );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* import ArrayBuffer from '@stdlib/array-buffer';\n*\n* var buf = new ArrayBuffer( 32 );\n* var arr = new Complex128Array( buf );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*\n* @example\n* import ArrayBuffer from '@stdlib/array-buffer';\n*\n* var buf = new ArrayBuffer( 32 );\n* var arr = new Complex128Array( buf, 16 );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* import ArrayBuffer from '@stdlib/array-buffer';\n*\n* var buf = new ArrayBuffer( 64 );\n* var arr = new Complex128Array( buf, 16, 2 );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*/\nfunction Complex128Array() {\n\tvar byteOffset;\n\tvar nargs;\n\tvar buf;\n\tvar len;\n\n\tnargs = arguments.length;\n\tif ( !(this instanceof Complex128Array) ) {\n\t\tif ( nargs === 0 ) {\n\t\t\treturn new Complex128Array();\n\t\t}\n\t\tif ( nargs === 1 ) {\n\t\t\treturn new Complex128Array( arguments[0] );\n\t\t}\n\t\tif ( nargs === 2 ) {\n\t\t\treturn new Complex128Array( arguments[0], arguments[1] );\n\t\t}\n\t\treturn new Complex128Array( arguments[0], arguments[1], arguments[2] );\n\t}\n\t// Create the underlying data buffer...\n\tif ( nargs === 0 ) {\n\t\tbuf = new Float64Array( 0 ); // backward-compatibility\n\t} else if ( nargs === 1 ) {\n\t\tif ( isNonNegativeInteger( arguments[0] ) ) {\n\t\t\tbuf = new Float64Array( arguments[0]*2 );\n\t\t} else if ( isCollection( arguments[0] ) ) {\n\t\t\tbuf = arguments[ 0 ];\n\t\t\tlen = buf.length;\n\n\t\t\t// If provided a \"generic\" array, peak at the first value, and, if the value is a complex number, try to process as an array of complex numbers, falling back to \"normal\" typed array initialization if we fail and ensuring consistency if the first value had not been a complex number...\n\t\t\tif ( len && isArray( buf ) && isComplexLike( buf[0] ) ) {\n\t\t\t\tbuf = fromArray( new Float64Array( len*2 ), buf );\n\t\t\t\tif ( buf === null ) {\n\t\t\t\t\t// We failed and we are now forced to allocate a new array :-(\n\t\t\t\t\tif ( !isEven( len ) ) {\n\t\t\t\t\t\tthrow new RangeError( format( 'invalid argument. Array-like object arguments must have a length which is a multiple of two. Length: `%u`.', len ) );\n\t\t\t\t\t}\n\t\t\t\t\t// We failed, so fall back to directly setting values...\n\t\t\t\t\tbuf = new Float64Array( arguments[0] );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ( isComplex64Array( buf ) ) {\n\t\t\t\t\tbuf = reinterpret64( buf, 0 );\n\t\t\t\t} else if ( isComplex128Array( buf ) ) {\n\t\t\t\t\tbuf = reinterpret128( buf, 0 );\n\t\t\t\t} else if ( !isEven( len ) ) {\n\t\t\t\t\tthrow new RangeError( format( 'invalid argument. Array-like object and typed array arguments must have a length which is a multiple of two. Length: `%u`.', len ) );\n\t\t\t\t}\n\t\t\t\tbuf = new Float64Array( buf );\n\t\t\t}\n\t\t} else if ( isArrayBuffer( arguments[0] ) ) {\n\t\t\tbuf = arguments[ 0 ];\n\t\t\tif ( !isInteger( buf.byteLength/BYTES_PER_ELEMENT ) ) {\n\t\t\t\tthrow new RangeError( format( 'invalid argument. ArrayBuffer byte length must be a multiple of %u. Byte length: `%u`.', BYTES_PER_ELEMENT, buf.byteLength ) );\n\t\t\t}\n\t\t\tbuf = new Float64Array( buf );\n\t\t} else if ( isObject( arguments[0] ) ) {\n\t\t\tbuf = arguments[ 0 ];\n\t\t\tif ( HAS_ITERATOR_SYMBOL === false ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Environment lacks Symbol.iterator support. Must provide a length, ArrayBuffer, typed array, or array-like object. Value: `%s`.', buf ) );\n\t\t\t}\n\t\t\tif ( !isFunction( buf[ ITERATOR_SYMBOL ] ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.', buf ) );\n\t\t\t}\n\t\t\tbuf = buf[ ITERATOR_SYMBOL ]();\n\t\t\tif ( !isFunction( buf.next ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.', buf ) );\n\t\t\t}\n\t\t\tbuf = fromIterator( buf );\n\t\t\tif ( buf instanceof Error ) {\n\t\t\t\tthrow buf;\n\t\t\t}\n\t\t\tbuf = new Float64Array( buf );\n\t\t} else {\n\t\t\tthrow new TypeError( format( 'invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.', arguments[0] ) );\n\t\t}\n\t} else {\n\t\tbuf = arguments[ 0 ];\n\t\tif ( !isArrayBuffer( buf ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. First argument must be an ArrayBuffer. Value: `%s`.', buf ) );\n\t\t}\n\t\tbyteOffset = arguments[ 1 ];\n\t\tif ( !isNonNegativeInteger( byteOffset ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Byte offset must be a nonnegative integer. Value: `%s`.', byteOffset ) );\n\t\t}\n\t\tif ( !isInteger( byteOffset/BYTES_PER_ELEMENT ) ) {\n\t\t\tthrow new RangeError( format( 'invalid argument. Byte offset must be a multiple of %u. Value: `%u`.', BYTES_PER_ELEMENT, byteOffset ) );\n\t\t}\n\t\tif ( nargs === 2 ) {\n\t\t\tlen = buf.byteLength - byteOffset;\n\t\t\tif ( !isInteger( len/BYTES_PER_ELEMENT ) ) {\n\t\t\t\tthrow new RangeError( format( 'invalid arguments. ArrayBuffer view byte length must be a multiple of %u. View byte length: `%u`.', BYTES_PER_ELEMENT, len ) );\n\t\t\t}\n\t\t\tbuf = new Float64Array( buf, byteOffset );\n\t\t} else {\n\t\t\tlen = arguments[ 2 ];\n\t\t\tif ( !isNonNegativeInteger( len ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Length must be a nonnegative integer. Value: `%s`.', len ) );\n\t\t\t}\n\t\t\tif ( (len*BYTES_PER_ELEMENT) > (buf.byteLength-byteOffset) ) {\n\t\t\t\tthrow new RangeError( format( 'invalid arguments. ArrayBuffer has insufficient capacity. Either decrease the array length or provide a bigger buffer. Minimum capacity: `%u`.', len*BYTES_PER_ELEMENT ) );\n\t\t\t}\n\t\t\tbuf = new Float64Array( buf, byteOffset, len*2 );\n\t\t}\n\t}\n\tsetReadOnly( this, '_buffer', buf );\n\tsetReadOnly( this, '_length', buf.length/2 );\n\n\treturn this;\n}\n\n/**\n* Size (in bytes) of each array element.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex128Array\n* @readonly\n* @type {PositiveInteger}\n* @default 16\n*\n* @example\n* var nbytes = Complex128Array.BYTES_PER_ELEMENT;\n* // returns 16\n*/\nsetReadOnly( Complex128Array, 'BYTES_PER_ELEMENT', BYTES_PER_ELEMENT );\n\n/**\n* Constructor name.\n*\n* @name name\n* @memberof Complex128Array\n* @readonly\n* @type {string}\n* @default 'Complex128Array'\n*\n* @example\n* var name = Complex128Array.name;\n* // returns 'Complex128Array'\n*/\nsetReadOnly( Complex128Array, 'name', 'Complex128Array' );\n\n/**\n* Creates a new 128-bit complex number array from an array-like object or an iterable.\n*\n* @name from\n* @memberof Complex128Array\n* @type {Function}\n* @param {(Collection|Object)} src - array-like object or iterable\n* @param {Function} [clbk] - callback to invoke for each source element\n* @param {*} [thisArg] - context\n* @throws {TypeError} `this` context must be a constructor\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be an array-like object or an iterable\n* @throws {TypeError} second argument must be a function\n* @throws {RangeError} array-like objects must have a length which is a multiple of two\n* @throws {TypeError} an iterator must return either a two element array containing real and imaginary components or a complex number\n* @throws {TypeError} when provided an iterator, a callback must return either a two element array containing real and imaginary components or a complex number\n* @returns {Complex128Array} 128-bit complex number array\n*\n* @example\n* var arr = Complex128Array.from( [ 1.0, -1.0 ] );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n*\n* var arr = Complex128Array.from( [ new Complex128( 1.0, 1.0 ) ] );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* function clbk( v ) {\n* return new Complex128( real(v)*2.0, imag(v)*2.0 );\n* }\n*\n* var arr = Complex128Array.from( [ new Complex128( 1.0, 1.0 ) ], clbk );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*/\nsetReadOnly( Complex128Array, 'from', function from( src ) {\n\tvar thisArg;\n\tvar nargs;\n\tvar clbk;\n\tvar out;\n\tvar buf;\n\tvar tmp;\n\tvar get;\n\tvar len;\n\tvar flg;\n\tvar v;\n\tvar i;\n\tvar j;\n\tif ( !isFunction( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` context must be a constructor.' );\n\t}\n\tif ( !isComplexArrayConstructor( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tnargs = arguments.length;\n\tif ( nargs > 1 ) {\n\t\tclbk = arguments[ 1 ];\n\t\tif ( !isFunction( clbk ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be a function. Value: `%s`.', clbk ) );\n\t\t}\n\t\tif ( nargs > 2 ) {\n\t\t\tthisArg = arguments[ 2 ];\n\t\t}\n\t}\n\tif ( isComplexArray( src ) ) {\n\t\tlen = src.length;\n\t\tif ( clbk ) {\n\t\t\tout = new this( len );\n\t\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\t\tj = 0;\n\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\tv = clbk.call( thisArg, src.get( i ), i );\n\t\t\t\tif ( isComplexLike( v ) ) {\n\t\t\t\t\tbuf[ j ] = real( v );\n\t\t\t\t\tbuf[ j+1 ] = imag( v );\n\t\t\t\t} else if ( isArrayLikeObject( v ) && v.length >= 2 ) {\n\t\t\t\t\tbuf[ j ] = v[ 0 ];\n\t\t\t\t\tbuf[ j+1 ] = v[ 1 ];\n\t\t\t\t} else {\n\t\t\t\t\tthrow new TypeError( format( 'invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', v ) );\n\t\t\t\t}\n\t\t\t\tj += 2; // stride\n\t\t\t}\n\t\t\treturn out;\n\t\t}\n\t\treturn new this( src );\n\t}\n\tif ( isCollection( src ) ) {\n\t\tif ( clbk ) {\n\t\t\t// Note: array contents affect how we iterate over a provided data source. If only complex number objects, we can extract real and imaginary components. Otherwise, for non-complex number arrays (e.g., `Float64Array`, etc), we assume a strided array where real and imaginary components are interleaved. In the former case, we expect a callback to return real and imaginary components (possibly as a complex number). In the latter case, we expect a callback to return *either* a real or imaginary component.\n\n\t\t\tlen = src.length;\n\t\t\tif ( src.get && src.set ) {\n\t\t\t\tget = accessorGetter( 'default' );\n\t\t\t} else {\n\t\t\t\tget = getter( 'default' );\n\t\t\t}\n\t\t\t// Detect whether we've been provided an array which returns complex number objects...\n\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\tif ( !isComplexLike( get( src, i ) ) ) {\n\t\t\t\t\tflg = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// If an array does not contain only complex number objects, then we assume interleaved real and imaginary components...\n\t\t\tif ( flg ) {\n\t\t\t\tif ( !isEven( len ) ) {\n\t\t\t\t\tthrow new RangeError( format( 'invalid argument. First argument must have a length which is a multiple of two. Length: `%u`.', len ) );\n\t\t\t\t}\n\t\t\t\tout = new this( len/2 );\n\t\t\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\t\tbuf[ i ] = clbk.call( thisArg, get( src, i ), i );\n\t\t\t\t}\n\t\t\t\treturn out;\n\t\t\t}\n\t\t\t// If an array contains only complex number objects, then we need to extract real and imaginary components...\n\t\t\tout = new this( len );\n\t\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\t\tj = 0;\n\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\tv = clbk.call( thisArg, get( src, i ), i );\n\t\t\t\tif ( isComplexLike( v ) ) {\n\t\t\t\t\tbuf[ j ] = real( v );\n\t\t\t\t\tbuf[ j+1 ] = imag( v );\n\t\t\t\t} else if ( isArrayLikeObject( v ) && v.length >= 2 ) {\n\t\t\t\t\tbuf[ j ] = v[ 0 ];\n\t\t\t\t\tbuf[ j+1 ] = v[ 1 ];\n\t\t\t\t} else {\n\t\t\t\t\tthrow new TypeError( format( 'invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', v ) );\n\t\t\t\t}\n\t\t\t\tj += 2; // stride\n\t\t\t}\n\t\t\treturn out;\n\t\t}\n\t\treturn new this( src );\n\t}\n\tif ( isObject( src ) && HAS_ITERATOR_SYMBOL && isFunction( src[ ITERATOR_SYMBOL ] ) ) { // eslint-disable-line max-len\n\t\tbuf = src[ ITERATOR_SYMBOL ]();\n\t\tif ( !isFunction( buf.next ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.', src ) );\n\t\t}\n\t\tif ( clbk ) {\n\t\t\ttmp = fromIteratorMap( buf, clbk, thisArg );\n\t\t} else {\n\t\t\ttmp = fromIterator( buf );\n\t\t}\n\t\tif ( tmp instanceof Error ) {\n\t\t\tthrow tmp;\n\t\t}\n\t\tlen = tmp.length / 2;\n\t\tout = new this( len );\n\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\tbuf[ i ] = tmp[ i ];\n\t\t}\n\t\treturn out;\n\t}\n\tthrow new TypeError( format( 'invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.', src ) );\n});\n\n/**\n* Creates a new 128-bit complex number array from a variable number of arguments.\n*\n* @name of\n* @memberof Complex128Array\n* @type {Function}\n* @param {...*} element - array elements\n* @throws {TypeError} `this` context must be a constructor\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Complex128Array} 128-bit complex number array\n*\n* @example\n* var arr = Complex128Array.of( 1.0, 1.0, 1.0, 1.0 );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*/\nsetReadOnly( Complex128Array, 'of', function of() {\n\tvar args;\n\tvar i;\n\tif ( !isFunction( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` context must be a constructor.' );\n\t}\n\tif ( !isComplexArrayConstructor( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\targs = [];\n\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\targs.push( arguments[ i ] );\n\t}\n\treturn new this( args );\n});\n\n/**\n* Pointer to the underlying data buffer.\n*\n* @name buffer\n* @memberof Complex128Array.prototype\n* @readonly\n* @type {ArrayBuffer}\n*\n* @example\n* var arr = new Complex128Array( 10 );\n*\n* var buf = arr.buffer;\n* // returns \n*/\nsetReadOnlyAccessor( Complex128Array.prototype, 'buffer', function get() {\n\treturn this._buffer.buffer;\n});\n\n/**\n* Size (in bytes) of the array.\n*\n* @name byteLength\n* @memberof Complex128Array.prototype\n* @readonly\n* @type {NonNegativeInteger}\n*\n* @example\n* var arr = new Complex128Array( 10 );\n*\n* var byteLength = arr.byteLength;\n* // returns 160\n*/\nsetReadOnlyAccessor( Complex128Array.prototype, 'byteLength', function get() {\n\treturn this._buffer.byteLength;\n});\n\n/**\n* Offset (in bytes) of the array from the start of its underlying `ArrayBuffer`.\n*\n* @name byteOffset\n* @memberof Complex128Array.prototype\n* @readonly\n* @type {NonNegativeInteger}\n*\n* @example\n* var arr = new Complex128Array( 10 );\n*\n* var byteOffset = arr.byteOffset;\n* // returns 0\n*/\nsetReadOnlyAccessor( Complex128Array.prototype, 'byteOffset', function get() {\n\treturn this._buffer.byteOffset;\n});\n\n/**\n* Size (in bytes) of each array element.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex128Array.prototype\n* @readonly\n* @type {PositiveInteger}\n* @default 16\n*\n* @example\n* var arr = new Complex128Array( 10 );\n*\n* var nbytes = arr.BYTES_PER_ELEMENT;\n* // returns 16\n*/\nsetReadOnly( Complex128Array.prototype, 'BYTES_PER_ELEMENT', Complex128Array.BYTES_PER_ELEMENT );\n\n/**\n* Copies a sequence of elements within the array to the position starting at `target`.\n*\n* @name copyWithin\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {integer} target - index at which to start copying elements\n* @param {integer} start - source index at which to copy elements from\n* @param {integer} [end] - source index at which to stop copying elements from\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Complex128Array} modified array\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* var arr = new Complex128Array( 4 );\n*\n* // Set the array elements:\n* arr.set( new Complex128( 1.0, 1.0 ), 0 );\n* arr.set( new Complex128( 2.0, 2.0 ), 1 );\n* arr.set( new Complex128( 3.0, 3.0 ), 2 );\n* arr.set( new Complex128( 4.0, 4.0 ), 3 );\n*\n* // Copy the first two elements to the last two elements:\n* arr.copyWithin( 2, 0, 2 );\n*\n* // Get the last array element:\n* var z = arr.get( 3 );\n*\n* var re = real( z );\n* // returns 2.0\n*\n* var im = imag( z );\n* // returns 2.0\n*/\nsetReadOnly( Complex128Array.prototype, 'copyWithin', function copyWithin( target, start ) {\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\t// FIXME: prefer a functional `copyWithin` implementation which addresses lack of universal browser support (e.g., IE11 and Safari) or ensure that typed arrays are polyfilled\n\tif ( arguments.length === 2 ) {\n\t\tthis._buffer.copyWithin( target*2, start*2 );\n\t} else {\n\t\tthis._buffer.copyWithin( target*2, start*2, arguments[2]*2 );\n\t}\n\treturn this;\n});\n\n/**\n* Returns an iterator for iterating over array key-value pairs.\n*\n* @name entries\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Iterator} iterator\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n*\n* var arr = [\n* new Complex128( 1.0, 1.0 ),\n* new Complex128( 2.0, 2.0 ),\n* new Complex128( 3.0, 3.0 )\n* ];\n* arr = new Complex128Array( arr );\n*\n* // Create an iterator:\n* var it = arr.entries();\n*\n* // Iterate over the key-value pairs...\n* var v = it.next().value;\n* // returns [ 0, ]\n*\n* v = it.next().value;\n* // returns [ 1, ]\n*\n* v = it.next().value;\n* // returns [ 2, ]\n*\n* var bool = it.next().done;\n* // returns true\n*/\nsetReadOnly( Complex128Array.prototype, 'entries', function entries() {\n\tvar buffer;\n\tvar self;\n\tvar iter;\n\tvar len;\n\tvar FLG;\n\tvar i;\n\tvar j;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tself = this;\n\tbuffer = this._buffer;\n\tlen = this._length;\n\n\t// Initialize the iteration indices:\n\ti = -1;\n\tj = -2;\n\n\t// Create an iterator protocol-compliant object:\n\titer = {};\n\tsetReadOnly( iter, 'next', next );\n\tsetReadOnly( iter, 'return', end );\n\n\tif ( ITERATOR_SYMBOL ) {\n\t\tsetReadOnly( iter, ITERATOR_SYMBOL, factory );\n\t}\n\treturn iter;\n\n\t/**\n\t* Returns an iterator protocol-compliant object containing the next iterated value.\n\t*\n\t* @private\n\t* @returns {Object} iterator protocol-compliant object\n\t*/\n\tfunction next() {\n\t\tvar z;\n\t\ti += 1;\n\t\tif ( FLG || i >= len ) {\n\t\t\treturn {\n\t\t\t\t'done': true\n\t\t\t};\n\t\t}\n\t\tj += 2;\n\t\tz = new Complex128( buffer[ j ], buffer[ j+1 ] );\n\t\treturn {\n\t\t\t'value': [ i, z ],\n\t\t\t'done': false\n\t\t};\n\t}\n\n\t/**\n\t* Finishes an iterator.\n\t*\n\t* @private\n\t* @param {*} [value] - value to return\n\t* @returns {Object} iterator protocol-compliant object\n\t*/\n\tfunction end( value ) {\n\t\tFLG = true;\n\t\tif ( arguments.length ) {\n\t\t\treturn {\n\t\t\t\t'value': value,\n\t\t\t\t'done': true\n\t\t\t};\n\t\t}\n\t\treturn {\n\t\t\t'done': true\n\t\t};\n\t}\n\n\t/**\n\t* Returns a new iterator.\n\t*\n\t* @private\n\t* @returns {Iterator} iterator\n\t*/\n\tfunction factory() {\n\t\treturn self.entries();\n\t}\n});\n\n/**\n* Returns an array element.\n*\n* @name get\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {NonNegativeInteger} idx - element index\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} must provide a nonnegative integer\n* @returns {(Complex128|void)} array element\n*\n* @example\n* var arr = new Complex128Array( 10 );\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* var z = arr.get( 0 );\n* // returns \n*\n* var re = real( z );\n* // returns 0.0\n*\n* var im = imag( z );\n* // returns 0.0\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n*\n* z = arr.get( 0 );\n* // returns \n*\n* re = real( z );\n* // returns 1.0\n*\n* im = imag( z );\n* // returns -1.0\n*\n* z = arr.get( 100 );\n* // returns undefined\n*/\nsetReadOnly( Complex128Array.prototype, 'get', function get( idx ) {\n\tvar buf;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isNonNegativeInteger( idx ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Must provide a nonnegative integer. Value: `%s`.', idx ) );\n\t}\n\tif ( idx >= this._length ) {\n\t\treturn;\n\t}\n\tbuf = this._buffer;\n\tidx *= 2;\n\treturn new Complex128( buf[ idx ], buf[ idx+1 ] );\n});\n\n/**\n* Number of array elements.\n*\n* @name length\n* @memberof Complex128Array.prototype\n* @readonly\n* @type {NonNegativeInteger}\n*\n* @example\n* var arr = new Complex128Array( 10 );\n*\n* var len = arr.length;\n* // returns 10\n*/\nsetReadOnlyAccessor( Complex128Array.prototype, 'length', function get() {\n\treturn this._length;\n});\n\n/**\n* Sets an array element.\n*\n* ## Notes\n*\n* - When provided a typed array, real or complex, we must check whether the source array shares the same buffer as the target array and whether the underlying memory overlaps. In particular, we are concerned with the following scenario:\n*\n* ```text\n* buf: ---------------------\n* src: ---------------------\n* ```\n*\n* In the above, as we copy values from `src`, we will overwrite values in the `src` view, resulting in duplicated values copied into the end of `buf`, which is not intended. Hence, to avoid overwriting source values, we must **copy** source values to a temporary array.\n*\n* In the other overlapping scenario,\n*\n* ```text\n* buf: ---------------------\n* src: ---------------------\n* ```\n*\n* by the time we begin copying into the overlapping region, we are copying from the end of `src`, a non-overlapping region, which means we don't run the risk of copying copied values, rather than the original `src` values as intended.\n*\n*\n* @name set\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {(Collection|Complex|ComplexArray)} value - value(s)\n* @param {NonNegativeInteger} [i=0] - element index at which to start writing values\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be either a complex number, an array-like object, or a complex number array\n* @throws {TypeError} index argument must be a nonnegative integer\n* @throws {RangeError} array-like objects must have a length which is a multiple of two\n* @throws {RangeError} index argument is out-of-bounds\n* @throws {RangeError} target array lacks sufficient storage to accommodate source values\n* @returns {void}\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* var arr = new Complex128Array( 10 );\n*\n* var z = arr.get( 0 );\n* // returns \n*\n* var re = real( z );\n* // returns 0.0\n*\n* var im = imag( z );\n* // returns 0.0\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n*\n* z = arr.get( 0 );\n* // returns \n*\n* re = real( z );\n* // returns 1.0\n*\n* im = imag( z );\n* // returns -1.0\n*/\nsetReadOnly( Complex128Array.prototype, 'set', function set( value ) {\n\t/* eslint-disable no-underscore-dangle */\n\tvar sbuf;\n\tvar idx;\n\tvar buf;\n\tvar tmp;\n\tvar flg;\n\tvar N;\n\tvar v;\n\tvar i;\n\tvar j;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tbuf = this._buffer;\n\tif ( arguments.length > 1 ) {\n\t\tidx = arguments[ 1 ];\n\t\tif ( !isNonNegativeInteger( idx ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Index argument must be a nonnegative integer. Value: `%s`.', idx ) );\n\t\t}\n\t} else {\n\t\tidx = 0;\n\t}\n\tif ( isComplexLike( value ) ) {\n\t\tif ( idx >= this._length ) {\n\t\t\tthrow new RangeError( format( 'invalid argument. Index argument is out-of-bounds. Value: `%u`.', idx ) );\n\t\t}\n\t\tidx *= 2;\n\t\tbuf[ idx ] = real( value );\n\t\tbuf[ idx+1 ] = imag( value );\n\t\treturn;\n\t}\n\tif ( isComplexArray( value ) ) {\n\t\tN = value._length;\n\t\tif ( idx+N > this._length ) {\n\t\t\tthrow new RangeError( 'invalid arguments. Target array lacks sufficient storage to accommodate source values.' );\n\t\t}\n\t\tsbuf = value._buffer;\n\n\t\t// Check for overlapping memory...\n\t\tj = buf.byteOffset + (idx*BYTES_PER_ELEMENT);\n\t\tif (\n\t\t\tsbuf.buffer === buf.buffer &&\n\t\t\t(\n\t\t\t\tsbuf.byteOffset < j &&\n\t\t\t\tsbuf.byteOffset+sbuf.byteLength > j\n\t\t\t)\n\t\t) {\n\t\t\t// We need to copy source values...\n\t\t\ttmp = new Float64Array( sbuf.length );\n\t\t\tfor ( i = 0; i < sbuf.length; i++ ) {\n\t\t\t\ttmp[ i ] = sbuf[ i ];\n\t\t\t}\n\t\t\tsbuf = tmp;\n\t\t}\n\t\tidx *= 2;\n\t\tj = 0;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\tbuf[ idx ] = sbuf[ j ];\n\t\t\tbuf[ idx+1 ] = sbuf[ j+1 ];\n\t\t\tidx += 2; // stride\n\t\t\tj += 2; // stride\n\t\t}\n\t\treturn;\n\t}\n\tif ( isCollection( value ) ) {\n\t\t// Detect whether we've been provided an array of complex numbers...\n\t\tN = value.length;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\tif ( !isComplexLike( value[ i ] ) ) {\n\t\t\t\tflg = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t// If an array does not contain only complex numbers, then we assume interleaved real and imaginary components...\n\t\tif ( flg ) {\n\t\t\tif ( !isEven( N ) ) {\n\t\t\t\tthrow new RangeError( format( 'invalid argument. Array-like object arguments must have a length which is a multiple of two. Length: `%u`.', N ) );\n\t\t\t}\n\t\t\tif ( idx+(N/2) > this._length ) {\n\t\t\t\tthrow new RangeError( 'invalid arguments. Target array lacks sufficient storage to accommodate source values.' );\n\t\t\t}\n\t\t\tsbuf = value;\n\n\t\t\t// Check for overlapping memory...\n\t\t\tj = buf.byteOffset + (idx*BYTES_PER_ELEMENT);\n\t\t\tif (\n\t\t\t\tsbuf.buffer === buf.buffer &&\n\t\t\t\t(\n\t\t\t\t\tsbuf.byteOffset < j &&\n\t\t\t\t\tsbuf.byteOffset+sbuf.byteLength > j\n\t\t\t\t)\n\t\t\t) {\n\t\t\t\t// We need to copy source values...\n\t\t\t\ttmp = new Float64Array( N );\n\t\t\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\t\t\ttmp[ i ] = sbuf[ i ];\n\t\t\t\t}\n\t\t\t\tsbuf = tmp;\n\t\t\t}\n\t\t\tidx *= 2;\n\t\t\tN /= 2;\n\t\t\tj = 0;\n\t\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\t\tbuf[ idx ] = sbuf[ j ];\n\t\t\t\tbuf[ idx+1 ] = sbuf[ j+1 ];\n\t\t\t\tidx += 2; // stride\n\t\t\t\tj += 2; // stride\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\t// If an array contains only complex numbers, then we need to extract real and imaginary components...\n\t\tif ( idx+N > this._length ) {\n\t\t\tthrow new RangeError( 'invalid arguments. Target array lacks sufficient storage to accommodate source values.' );\n\t\t}\n\t\tidx *= 2;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\tv = value[ i ];\n\t\t\tbuf[ idx ] = real( v );\n\t\t\tbuf[ idx+1 ] = imag( v );\n\t\t\tidx += 2; // stride\n\t\t}\n\t\treturn;\n\t}\n\tthrow new TypeError( format( 'invalid argument. First argument must be either a complex number, an array-like object, or a complex number array. Value: `%s`.', value ) );\n\n\t/* eslint-enable no-underscore-dangle */\n});\n\n\n// EXPORTS //\n\nexport default Complex128Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport Float64Array from '@stdlib/array-float64';\nimport Float32Array from '@stdlib/array-float32';\nimport Int16Array from '@stdlib/array-int16';\nimport Int32Array from '@stdlib/array-int32';\nimport Int8Array from '@stdlib/array-int8';\nimport Uint16Array from '@stdlib/array-uint16';\nimport Uint32Array from '@stdlib/array-uint32';\nimport Uint8Array from '@stdlib/array-uint8';\nimport Uint8ClampedArray from '@stdlib/array-uint8c';\nimport Complex64Array from '@stdlib/array-complex64';\nimport Complex128Array from '@stdlib/array-complex128';\n\n\n// MAIN //\n\n// Mapping from data types to constructors...\nvar ctors = {\n\t'float64': Float64Array,\n\t'float32': Float32Array,\n\t'generic': Array, // TODO: replace with `stdlib` pkg\n\t'int16': Int16Array,\n\t'int32': Int32Array,\n\t'int8': Int8Array,\n\t'uint16': Uint16Array,\n\t'uint32': Uint32Array,\n\t'uint8': Uint8Array,\n\t'uint8c': Uint8ClampedArray,\n\t'complex64': Complex64Array,\n\t'complex128': Complex128Array\n};\n\n\n// EXPORTS //\n\nexport default ctors;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport table from './ctors.js';\n\n\n// MAIN //\n\n/**\n* Returns an array constructor.\n*\n* @param {string} dtype - data type\n* @returns {(Function|null)} constructor or null\n*\n* @example\n* var ctor = ctors( 'float64' );\n* // returns \n*\n* @example\n* var ctor = ctors( 'float' );\n* // returns null\n*/\nfunction ctors( dtype ) {\n\treturn table[ dtype ] || null;\n}\n\n\n// EXPORTS //\n\nexport default ctors;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport filled from '@stdlib/array-base-filled';\n\n\n// MAIN //\n\n/**\n* Returns a zero-filled \"generic\" array.\n*\n* @param {NonNegativeInteger} len - array length\n* @returns {Array} output array\n*\n* @example\n* var out = zeros( 3 );\n* // returns [ 0.0, 0.0, 0.0 ]\n*/\nfunction zeros( len ) {\n\treturn filled( 0.0, len );\n}\n\n\n// EXPORTS //\n\nexport default zeros;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Returns a filled \"generic\" array.\n*\n* @param {*} value - fill value\n* @param {NonNegativeInteger} len - array length\n* @returns {Array} filled array\n*\n* @example\n* var out = filled( 0.0, 3 );\n* // returns [ 0.0, 0.0, 0.0 ]\n*\n* @example\n* var out = filled( 'beep', 3 );\n* // returns [ 'beep', 'beep', 'beep' ]\n*/\nfunction filled( value, len ) {\n\tvar arr;\n\tvar i;\n\n\t// Manually push elements in order to ensure \"fast\" elements...\n\tarr = [];\n\tfor ( i = 0; i < len; i++ ) {\n\t\tarr.push( value );\n\t}\n\treturn arr;\n}\n\n\n// EXPORTS //\n\nexport default filled;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isNonNegativeInteger } from '@stdlib/assert-is-nonnegative-integer';\nimport ctors from '@stdlib/array-ctors';\nimport gzeros from '@stdlib/array-base-zeros';\nimport format from '@stdlib/string-format';\n\n\n// MAIN //\n\n/**\n* Creates a zero-filled array having a specified length.\n*\n* @param {NonNegativeInteger} length - array length\n* @param {string} [dtype=\"float64\"] - data type\n* @throws {TypeError} first argument must be a nonnegative integer\n* @throws {TypeError} second argument must be a recognized data type\n* @returns {(TypedArray|Array|ComplexArray)} array or typed array\n*\n* @example\n* var arr = zeros( 2 );\n* // returns [ 0.0, 0.0 ]\n*\n* @example\n* var arr = zeros( 2, 'float32' );\n* // returns [ 0.0, 0.0 ]\n*/\nfunction zeros( length ) {\n\tvar dtype;\n\tvar ctor;\n\tif ( !isNonNegativeInteger( length ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a nonnegative integer. Value: `%s`.', length ) );\n\t}\n\tif ( arguments.length > 1 ) {\n\t\tdtype = arguments[ 1 ];\n\t} else {\n\t\tdtype = 'float64';\n\t}\n\tif ( dtype === 'generic' ) {\n\t\treturn gzeros( length );\n\t}\n\tctor = ctors( dtype );\n\tif ( ctor === null ) {\n\t\tthrow new TypeError( format( 'invalid argument. Second argument must be a recognized data type. Value: `%s`.', dtype ) );\n\t}\n\treturn new ctor( length ); // WARNING: we assume that, apart from 'generic', the constructors for supported array data types are zero-filled by default\n}\n\n\n// EXPORTS //\n\nexport default zeros;\n","/**\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// MODULES //\n\nimport zeros from '@stdlib/array-zeros';\n\n\n// MAIN //\n\n/**\n* Creates an uninitialized array having a specified length.\n*\n* @private\n* @param {NonNegativeInteger} length - array length\n* @param {string} [dtype=\"float64\"] - data type\n* @throws {TypeError} first argument must be a nonnegative integer\n* @throws {TypeError} second argument must be a recognized data type\n* @returns {(TypedArray|Array|ComplexArray)} array or typed array\n*\n* @example\n* var arr = empty( 2 );\n* // returns \n*\n* @example\n* var arr = empty( 2, 'float32' );\n* // returns \n*/\nfunction empty( length ) {\n\tif ( arguments.length > 1 ) {\n\t\treturn zeros( length, arguments[ 1 ] );\n\t}\n\treturn zeros( length );\n}\n\n\n// EXPORTS //\n\nexport default empty;\n"],"names":["main","Object","defineProperty","isNumber","value","zeros","n","i","out","zeroPad","str","width","right","negative","pad","length","startsWithMinus","substr","lowercase","String","prototype","toLowerCase","uppercase","toUpperCase","formatInteger","token","base","specifier","arg","parseInt","isFinite","Error","toString","precision","padRight","sign","alternate","call","charAt","isString","abs","Math","replace","RE_EXP_POS_DIGITS","RE_EXP_NEG_DIGITS","RE_ONLY_DIGITS","RE_DIGITS_BEFORE_EXP","RE_TRAILING_PERIOD_ZERO","RE_PERIOD_ZERO_EXP","RE_ZERO_BEFORE_EXP","formatDouble","digits","f","parseFloat","toExponential","toFixed","toPrecision","spaces","spacePad","fromCharCode","isnan","isNaN","isArray","Array","initialize","flags","mapping","formatInterpolate","tokens","hasPeriod","flag","num","pos","j","TypeError","padZeros","indexOf","arguments","maxWidth","substring","RE","parse","match","formatTokenize","content","prev","exec","slice","lastIndex","push","format","args","tokenize","interpolate","apply","objectProtoype","toStr","defineGetter","__defineGetter__","defineSetter","__defineSetter__","lookupGetter","__lookupGetter__","lookupSetter","__lookupSetter__","err","hasDefinePropertySupport","builtin","obj","prop","descriptor","hasValue","hasGet","hasSet","__proto__","get","set","defineProperty$1","setNonEnumerableReadOnly","configurable","enumerable","writable","FLG","Symbol","hasToStringTagSupport","toStringTag","has","hasOwnProperty","hasOwnProp","property","Sym","toStrTag","nativeClass","hasToStringTag","v","isOwn","tag","main$b","Number","test","isPrimitive","isObject","setReadOnly","FLOAT64_PINF","POSITIVE_INFINITY","FLOAT64_NINF","NEGATIVE_INFINITY","floor","isInteger","x","PINF","NINF","isInt","valueOf","isNonNegativeInteger","hasFloat64Array","Float64Array","ctor","Float64Array$1","bool","arr","GlobalFloat64Array","NaN","hasFloat64ArraySupport","hasFloat32Array","Float32Array","Float32Array$1","GlobalFloat32Array","hasFloat32ArraySupport","hasInt16Array","Int16Array","Int16Array$1","GlobalInt16Array","INT16_MAX","hasInt16ArraySupport","hasInt32Array","Int32Array","Int32Array$1","GlobalInt32Array","INT32_MAX","hasInt32ArraySupport","hasInt8Array","Int8Array","Int8Array$1","GlobalInt8Array","INT8_MAX","hasInt8ArraySupport","hasUint16Array","Uint16Array","Uint16Array$1","GlobalUint16Array","UINT16_MAX","hasUint16ArraySupport","hasUint32Array","Uint32Array","Uint32Array$1","GlobalUint32Array","UINT32_MAX","hasUint32ArraySupport","hasUint8Array","Uint8Array","Uint8Array$1","GlobalUint8Array","UINT8_MAX","hasUint8ArraySupport","hasUint8ClampedArray","Uint8ClampedArray","Uint8ClampedArray$1","GlobalUint8ClampedArray","hasUint8ClampedArraySupport","isArrayLikeObject","isCollection","hasArrayBuffer","ArrayBuffer","isArrayBuffer","main$1","isBoolean","Bool","Boolean","getGlobal","Function","self","window","global","globalThis","root","codegen","getThis","GlobalThis","Self","Win","Global","nodeList","document","childNodes","typedarray","reFunctionName","RE_FUNCTION_NAME","isObjectLike","constructorName","name","constructor","_isBuffer","isBuffer","REGEXP","predicate","len","arrayfun","ctorName","type","isFunction","typeOf","Complex128","real","imag","this","re","im","fround","FLOAT32_VIEW","float64ToFloat32$1","Complex64","float64ToFloat32","isComplexLike","isEven","hasIteratorSymbolSupport","iterator","IteratorSymbol","setNonEnumerableReadOnlyAccessor","getter","realf","z","imagf","reinterpret","offset","buffer","byteOffset","BYTES_PER_ELEMENT","GETTERS","float64","idx","float32","int32","int16","int8","uint32","uint16","uint8","uint8c","generic","default","dtype","complex128","complex64","fromIterator","it","next","done","fromIteratorMap","clbk","thisArg","fromArray","buf","HAS_ITERATOR_SYMBOL","isComplexArray","Complex64Array","_length","_buffer","isComplexArrayConstructor","isComplex64Array","isComplex128Array","nargs","RangeError","reinterpret64","reinterpret128","byteLength","ITERATOR_SYMBOL","src","tmp","flg","accessorGetter","setReadOnlyAccessor","target","start","copyWithin","iter","entries","sbuf","N","Complex128Array","ctors","table","filled","gzeros","empty"],"mappings":";;AAsBA,IAAIA,EAA0C,mBAA1BC,OAAOC,eAAkCD,OAAOC,eAAiB,KCiCrF,IAAIA,EAAiBD,OAAOC,eCjB5B,SAASC,EAAUC,GAClB,MAA0B,iBAAVA,CACjB,CCAA,SAASC,EAAOC,GACf,IACIC,EADAC,EAAM,GAEV,IAAMD,EAAI,EAAGA,EAAID,EAAGC,IACnBC,GAAO,IAER,OAAOA,CACR,CAcA,SAASC,EAASC,EAAKC,EAAOC,GAC7B,IAAIC,GAAW,EACXC,EAAMH,EAAQD,EAAIK,OACtB,OAAKD,EAAM,IAnCZ,SAA0BJ,GACzB,MAAoB,MAAbA,EAAK,EACb,CAoCMM,CAAiBN,KACrBG,GAAW,EACXH,EAAMA,EAAIO,OAAQ,IAEnBP,EAAM,EACLA,EAAML,EAAOS,GACbT,EAAOS,GAAQJ,EACXG,IACJH,EAAM,IAAMA,IAVLA,CAaT,CCpDA,IAAIQ,EAAYC,OAAOC,UAAUC,YAC7BC,EAAYH,OAAOC,UAAUG,YAajC,SAASC,EAAeC,GACvB,IAAIC,EACAlB,EACAD,EAEJ,OAASkB,EAAME,WACf,IAAK,IAEJD,EAAO,EACP,MACD,IAAK,IAEJA,EAAO,EACP,MACD,IAAK,IACL,IAAK,IAEJA,EAAO,GACP,MAID,QAECA,EAAO,GAKR,GAFAlB,EAAMiB,EAAMG,IACZrB,EAAIsB,SAAUrB,EAAK,KACbsB,SAAUvB,GAAM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GAAA,EACAjR,EAAA,EAAAA,EAAAiU,EAAAjU,IACA+H,EAAAlI,EAAAG,GACAuS,EAAAtB,GAAA3B,GAAAvH,GACAwK,EAAAtB,EAAA,GAAA1B,GAAAxH,GACAkJ,GAAA,CAxDA,CA+DA,ICz/BA,IAAIkD,GAAQ,CACXnD,QAAW3H,GACX6H,QAAWpH,GACX4H,QAAWlO,MACX4N,MAASjH,GACTgH,MAAS1G,GACT4G,KAAQtG,GACRwG,OAAUlG,GACViG,OAAU3F,GACV6F,MAASvF,GACTwF,OAAUlF,GACVuF,UAAaY,GACbb,WAAcqC,ICTf,SAASC,GAAOvC,GACf,OAAOwC,GAAOxC,IAAW,IAC1B,CCNA,SAAS9R,GAAOiP,GACf,OCDD,SAAiBlP,EAAOkP,GACvB,IAAItF,EACAzJ,EAIJ,IADAyJ,EAAM,GACAzJ,EAAI,EAAGA,EAAI+O,EAAK/O,IACrByJ,EAAIvE,KAAMrF,GAEX,OAAO4J,CACR,CDTQ4K,CAAQ,EAAKtF,EACrB,CEQA,SAASjP,GAAOU,GACf,IAAIoR,EACAtI,EACJ,IAAMH,GAAsB3I,GAC3B,MAAM,IAAI2D,UAAWgB,EAAQ,+EAAgF3E,IAO9G,GAAe,aAJdoR,EADItN,UAAU9D,OAAS,EACf8D,UAAW,GAEX,WAGR,OAAOgQ,GAAQ9T,GAGhB,GAAc,QADd8I,EAAO6K,GAAOvC,IAEb,MAAM,IAAIzN,UAAWgB,EAAQ,iFAAkFyM,IAEhH,OAAO,IAAItI,EAAM9I,EAClB,CCrBA,SAAS+T,GAAO/T,GACf,OAAK8D,UAAU9D,OAAS,EAChBV,GAAOU,EAAQ8D,UAAW,IAE3BxE,GAAOU,EACf"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index 1787057..0000000 --- a/stats.html +++ /dev/null @@ -1,6177 +0,0 @@ - - - - - - - - Rollup Visualizer - - - -
- - - - - From f69cfe98a46260aedf333df146e185fdb3e2500c Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Thu, 15 Feb 2024 04:15:02 +0000 Subject: [PATCH 42/75] 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 | 36 +- SECURITY.md | 5 - benchmark/benchmark.js | 264 - benchmark/benchmark.length.complex128.js | 93 - benchmark/benchmark.length.complex64.js | 93 - benchmark/benchmark.length.float32.js | 93 - benchmark/benchmark.length.float64.js | 93 - benchmark/benchmark.length.generic.js | 93 - benchmark/benchmark.length.int16.js | 93 - benchmark/benchmark.length.int32.js | 93 - benchmark/benchmark.length.int8.js | 93 - benchmark/benchmark.length.uint16.js | 93 - benchmark/benchmark.length.uint32.js | 93 - benchmark/benchmark.length.uint8.js | 93 - benchmark/benchmark.length.uint8c.js | 93 - branches.md | 56 - dist/index.d.ts | 3 - dist/index.js | 9 - dist/index.js.map | 7 - docs/repl.txt | 52 - docs/types/test.ts | 77 - examples/index.js | 33 - lib/index.js | 58 - lib/is_buffer_uint8array.js | 47 - lib/main.js | 107 - lib/polyfill.js | 56 - docs/types/index.d.ts => mod.d.ts | 2 +- mod.js | 4 + mod.js.map | 1 + package.json | 81 +- stats.html | 6177 +++++++++++++++++++++ test/dist/test.js | 33 - test/test.js | 60 - test/test.main.js | 274 - test/test.polyfill.js | 324 -- 58 files changed, 6194 insertions(+), 5855 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 benchmark/benchmark.js delete mode 100644 benchmark/benchmark.length.complex128.js delete mode 100644 benchmark/benchmark.length.complex64.js delete mode 100644 benchmark/benchmark.length.float32.js delete mode 100644 benchmark/benchmark.length.float64.js delete mode 100644 benchmark/benchmark.length.generic.js delete mode 100644 benchmark/benchmark.length.int16.js delete mode 100644 benchmark/benchmark.length.int32.js delete mode 100644 benchmark/benchmark.length.int8.js delete mode 100644 benchmark/benchmark.length.uint16.js delete mode 100644 benchmark/benchmark.length.uint32.js delete mode 100644 benchmark/benchmark.length.uint8.js delete mode 100644 benchmark/benchmark.length.uint8c.js 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/repl.txt delete mode 100644 docs/types/test.ts delete mode 100644 examples/index.js delete mode 100644 lib/index.js delete mode 100644 lib/is_buffer_uint8array.js delete mode 100644 lib/main.js delete mode 100644 lib/polyfill.js rename docs/types/index.d.ts => mod.d.ts (99%) create mode 100644 mod.js create mode 100644 mod.js.map create mode 100644 stats.html delete mode 100644 test/dist/test.js delete mode 100644 test/test.js delete mode 100644 test/test.main.js delete mode 100644 test/test.polyfill.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 96f81a8..0000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,7 +0,0 @@ - - -We are excited about your pull request, but unfortunately we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/empty) 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 ddb353e..0000000 --- a/.github/workflows/close_pull_requests.yml +++ /dev/null @@ -1,54 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: close_pull_requests - -# Workflow triggers: -on: - pull_request_target: - types: [opened] - -# Workflow jobs: -jobs: - - # Define job to close all pull requests: - run: - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Close pull request - - name: 'Close pull request' - # Pin action to full length commit SHA corresponding to v3.1.2 - uses: superbrothers/close-pull-request@9c18513d320d7b2c7185fb93396d0c664d5d8448 - with: - comment: | - Thank you for submitting a pull request. :raised_hands: - - We greatly appreciate your willingness to submit a contribution. However, we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). - - We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/empty) 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 daf1c6a..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: '49 1 * * 5' - - # 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 + + + + 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 8e62cb8..0000000 --- a/test/test.js +++ /dev/null @@ -1,60 +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 proxyquire = require( 'proxyquire' ); -var main = require( './../lib/main.js' ); -var polyfill = require( './../lib/polyfill.js' ); -var empty = require( './../lib' ); - - -// TESTS // - -tape( 'main export is a function', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof empty, 'function', 'main export is a function' ); - t.end(); -}); - -tape( 'if an environment supports Node.js buffer instances inheriting from Uint8Array, the main export supports returning arrays having uninitialized memory', function test( t ) { - var empty = proxyquire( './../lib', { - './is_buffer_uint8array.js': mock - }); - t.strictEqual( empty, main, 'returns expected value' ); - t.end(); - - function mock() { - return true; - } -}); - -tape( 'if an environment does not support Node.js buffer instances inheriting from Uint8Array, the main export supports returning zero-filled arrays', function test( t ) { - var empty = proxyquire( './../lib', { - './is_buffer_uint8array.js': mock - }); - t.strictEqual( empty, polyfill, 'returns expected value' ); - t.end(); - - function mock() { - return false; - } -}); diff --git a/test/test.main.js b/test/test.main.js deleted file mode 100644 index 3ceb26e..0000000 --- a/test/test.main.js +++ /dev/null @@ -1,274 +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 Float64Array = require( '@stdlib/array-float64' ); -var Float32Array = require( '@stdlib/array-float32' ); -var Int32Array = require( '@stdlib/array-int32' ); -var Uint32Array = require( '@stdlib/array-uint32' ); -var Int16Array = require( '@stdlib/array-int16' ); -var Uint16Array = require( '@stdlib/array-uint16' ); -var Int8Array = require( '@stdlib/array-int8' ); -var Uint8Array = require( '@stdlib/array-uint8' ); -var Uint8ClampedArray = require( '@stdlib/array-uint8c' ); -var Complex64Array = require( '@stdlib/array-complex64' ); -var Complex128Array = require( '@stdlib/array-complex128' ); -var instanceOf = require( '@stdlib/assert-instance-of' ); -var empty = require( './../lib/main.js' ); - - -// TESTS // - -tape( 'main export is a function', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof empty, 'function', 'main export is a function' ); - t.end(); -}); - -tape( 'the function throws an error if provided a value other than a nonnegative integer for the first argument', function test( t ) { - var values; - var i; - - values = [ - '5', - -3, - 3.14, - NaN, - true, - false, - null, - void 0, - [], - {}, - function noop() {} - ]; - - for ( i = 0; i < values.length; i++ ) { - t.throws( badValue( values[i] ), TypeError, 'throws an error when provided '+values[i] ); - } - t.end(); - - function badValue( value ) { - return function badValue() { - empty( value ); - }; - } -}); - -tape( 'the function throws an error if provided a value other than a nonnegative integer for the first argument (dtype)', function test( t ) { - var values; - var i; - - values = [ - '5', - -3, - 3.14, - NaN, - true, - false, - null, - void 0, - [], - {}, - function noop() {} - ]; - - for ( i = 0; i < values.length; i++ ) { - t.throws( badValue( values[i] ), TypeError, 'throws an error when provided '+values[i] ); - } - t.end(); - - function badValue( value ) { - return function badValue() { - empty( value, 'float32' ); - }; - } -}); - -tape( 'the function throws an error if provided an unrecognized data type', function test( t ) { - var values; - var i; - - values = [ - '5', - 'beep', - 'empty', - 'Int32', - 'Uint32', - 'Int16', - 'Uint16', - 'Int8', - 'Uint8', - 'Uint8c', - 'uint8_clamped', - 'Float64', - 'Float32', - 'FLOAT64', - 'FLOAT32', - 'GENERIC' - ]; - - for ( i = 0; i < values.length; i++ ) { - t.throws( badValue( values[i] ), TypeError, 'throws an error when provided '+values[i] ); - } - t.end(); - - function badValue( value ) { - return function badValue() { - empty( 10, value ); - }; - } -}); - -tape( 'the function returns an empty array (default)', function test( t ) { - var arr; - - arr = empty( 5 ); - t.strictEqual( instanceOf( arr, Float64Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=float64)', function test( t ) { - var arr; - - arr = empty( 5, 'float64' ); - t.strictEqual( instanceOf( arr, Float64Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=float32)', function test( t ) { - var arr; - - arr = empty( 5, 'float32' ); - t.strictEqual( instanceOf( arr, Float32Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=complex128)', function test( t ) { - var arr; - - arr = empty( 5, 'complex128' ); - t.strictEqual( instanceOf( arr, Complex128Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=complex64)', function test( t ) { - var arr; - - arr = empty( 5, 'complex64' ); - t.strictEqual( instanceOf( arr, Complex64Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=int32)', function test( t ) { - var arr; - - arr = empty( 5, 'int32' ); - t.strictEqual( instanceOf( arr, Int32Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=uint32)', function test( t ) { - var arr; - - arr = empty( 5, 'uint32' ); - t.strictEqual( instanceOf( arr, Uint32Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=int16)', function test( t ) { - var arr; - - arr = empty( 5, 'int16' ); - t.strictEqual( instanceOf( arr, Int16Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=uint16)', function test( t ) { - var arr; - - arr = empty( 5, 'uint16' ); - t.strictEqual( instanceOf( arr, Uint16Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=int8)', function test( t ) { - var arr; - - arr = empty( 5, 'int8' ); - t.strictEqual( instanceOf( arr, Int8Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=uint8)', function test( t ) { - var arr; - - arr = empty( 5, 'uint8' ); - t.strictEqual( instanceOf( arr, Uint8Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=uint8c)', function test( t ) { - var arr; - - arr = empty( 5, 'uint8c' ); - t.strictEqual( instanceOf( arr, Uint8ClampedArray ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=generic)', function test( t ) { - var expected; - var arr; - - expected = [ 0, 0, 0, 0, 0 ]; - - arr = empty( 5, 'generic' ); - t.strictEqual( instanceOf( arr, Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); diff --git a/test/test.polyfill.js b/test/test.polyfill.js deleted file mode 100644 index 17b99f3..0000000 --- a/test/test.polyfill.js +++ /dev/null @@ -1,324 +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 Float64Array = require( '@stdlib/array-float64' ); -var Float32Array = require( '@stdlib/array-float32' ); -var Int32Array = require( '@stdlib/array-int32' ); -var Uint32Array = require( '@stdlib/array-uint32' ); -var Int16Array = require( '@stdlib/array-int16' ); -var Uint16Array = require( '@stdlib/array-uint16' ); -var Int8Array = require( '@stdlib/array-int8' ); -var Uint8Array = require( '@stdlib/array-uint8' ); -var Uint8ClampedArray = require( '@stdlib/array-uint8c' ); -var Complex64Array = require( '@stdlib/array-complex64' ); -var Complex128Array = require( '@stdlib/array-complex128' ); -var reinterpret64 = require( '@stdlib/strided-base-reinterpret-complex64' ); -var reinterpret128 = require( '@stdlib/strided-base-reinterpret-complex128' ); -var instanceOf = require( '@stdlib/assert-instance-of' ); -var empty = require( './../lib/polyfill.js' ); - - -// TESTS // - -tape( 'main export is a function', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof empty, 'function', 'main export is a function' ); - t.end(); -}); - -tape( 'the function throws an error if provided a value other than a nonnegative integer for the first argument', function test( t ) { - var values; - var i; - - values = [ - '5', - -3, - 3.14, - NaN, - true, - false, - null, - void 0, - [], - {}, - function noop() {} - ]; - - for ( i = 0; i < values.length; i++ ) { - t.throws( badValue( values[i] ), TypeError, 'throws an error when provided '+values[i] ); - } - t.end(); - - function badValue( value ) { - return function badValue() { - empty( value ); - }; - } -}); - -tape( 'the function throws an error if provided a value other than a nonnegative integer for the first argument (dtype)', function test( t ) { - var values; - var i; - - values = [ - '5', - -3, - 3.14, - NaN, - true, - false, - null, - void 0, - [], - {}, - function noop() {} - ]; - - for ( i = 0; i < values.length; i++ ) { - t.throws( badValue( values[i] ), TypeError, 'throws an error when provided '+values[i] ); - } - t.end(); - - function badValue( value ) { - return function badValue() { - empty( value, 'float32' ); - }; - } -}); - -tape( 'the function throws an error if provided an unrecognized data type', function test( t ) { - var values; - var i; - - values = [ - '5', - 'beep', - 'empty', - 'Int32', - 'Uint32', - 'Int16', - 'Uint16', - 'Int8', - 'Uint8', - 'Uint8c', - 'uint8_clamped', - 'Float64', - 'Float32', - 'FLOAT64', - 'FLOAT32', - 'GENERIC' - ]; - - for ( i = 0; i < values.length; i++ ) { - t.throws( badValue( values[i] ), TypeError, 'throws an error when provided '+values[i] ); - } - t.end(); - - function badValue( value ) { - return function badValue() { - empty( 10, value ); - }; - } -}); - -tape( 'the function returns a zero-filled array (default)', function test( t ) { - var expected; - var arr; - - expected = new Float64Array( [ 0.0, 0.0, 0.0, 0.0, 0.0 ] ); - - arr = empty( 5 ); - t.strictEqual( instanceOf( arr, Float64Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=float64)', function test( t ) { - var expected; - var arr; - - expected = new Float64Array( [ 0.0, 0.0, 0.0, 0.0, 0.0 ] ); - - arr = empty( 5, 'float64' ); - t.strictEqual( instanceOf( arr, Float64Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=float32)', function test( t ) { - var expected; - var arr; - - expected = new Float32Array( [ 0.0, 0.0, 0.0, 0.0, 0.0 ] ); - - arr = empty( 5, 'float32' ); - t.strictEqual( instanceOf( arr, Float32Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=complex128)', function test( t ) { - var expected; - var arr; - - expected = new Float64Array( [ 0.0, 0.0, 0.0, 0.0 ] ); - - arr = empty( 2, 'complex128' ); - t.strictEqual( instanceOf( arr, Complex128Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length/2, 'returns expected value' ); - t.deepEqual( reinterpret128( arr, 0 ), expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=complex64)', function test( t ) { - var expected; - var arr; - - expected = new Float32Array( [ 0.0, 0.0, 0.0, 0.0 ] ); - - arr = empty( 2, 'complex64' ); - t.strictEqual( instanceOf( arr, Complex64Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length/2, 'returns expected value' ); - t.deepEqual( reinterpret64( arr, 0 ), expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=int32)', function test( t ) { - var expected; - var arr; - - expected = new Int32Array( [ 0, 0, 0, 0, 0 ] ); - - arr = empty( 5, 'int32' ); - t.strictEqual( instanceOf( arr, Int32Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=uint32)', function test( t ) { - var expected; - var arr; - - expected = new Uint32Array( [ 0, 0, 0, 0, 0 ] ); - - arr = empty( 5, 'uint32' ); - t.strictEqual( instanceOf( arr, Uint32Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=int16)', function test( t ) { - var expected; - var arr; - - expected = new Int16Array( [ 0, 0, 0, 0, 0 ] ); - - arr = empty( 5, 'int16' ); - t.strictEqual( instanceOf( arr, Int16Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=uint16)', function test( t ) { - var expected; - var arr; - - expected = new Uint16Array( [ 0, 0, 0, 0, 0 ] ); - - arr = empty( 5, 'uint16' ); - t.strictEqual( instanceOf( arr, Uint16Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=int8)', function test( t ) { - var expected; - var arr; - - expected = new Int8Array( [ 0, 0, 0, 0, 0 ] ); - - arr = empty( 5, 'int8' ); - t.strictEqual( instanceOf( arr, Int8Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=uint8)', function test( t ) { - var expected; - var arr; - - expected = new Uint8Array( [ 0, 0, 0, 0, 0 ] ); - - arr = empty( 5, 'uint8' ); - t.strictEqual( instanceOf( arr, Uint8Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=uint8c)', function test( t ) { - var expected; - var arr; - - expected = new Uint8ClampedArray( [ 0, 0, 0, 0, 0 ] ); - - arr = empty( 5, 'uint8c' ); - t.strictEqual( instanceOf( arr, Uint8ClampedArray ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=generic)', function test( t ) { - var expected; - var arr; - - expected = [ 0, 0, 0, 0, 0 ]; - - arr = empty( 5, 'generic' ); - t.strictEqual( instanceOf( arr, Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); From 690c9527a9737c2f28a3daf19c27395d80cd5b9b Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Thu, 15 Feb 2024 06:11:25 +0000 Subject: [PATCH 43/75] Update README.md for Deno bundle v0.2.0 --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index fbc46df..2c6e17e 100644 --- a/README.md +++ b/README.md @@ -52,7 +52,7 @@ limitations under the License. ## Usage ```javascript -import empty from 'https://cdn.jsdelivr.net/gh/stdlib-js/array-empty@deno/mod.js'; +import empty from 'https://cdn.jsdelivr.net/gh/stdlib-js/array-empty@v0.2.0-deno/mod.js'; ``` #### empty( length\[, dtype] ) @@ -114,7 +114,7 @@ var arr = empty( 2, 'int32' ); ```javascript import dtypes from 'https://cdn.jsdelivr.net/gh/stdlib-js/array-dtypes@deno/mod.js'; -import empty from 'https://cdn.jsdelivr.net/gh/stdlib-js/array-empty@deno/mod.js'; +import empty from 'https://cdn.jsdelivr.net/gh/stdlib-js/array-empty@v0.2.0-deno/mod.js'; // Get a list of array data types: var dt = dtypes(); From 4f3fb5a23998d3729bc22609cd88f4bad28900b0 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Thu, 15 Feb 2024 06:11:25 +0000 Subject: [PATCH 44/75] Auto-generated commit --- README.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 2c6e17e..8166d12 100644 --- a/README.md +++ b/README.md @@ -51,6 +51,11 @@ limitations under the License. ## Usage +```javascript +import empty from 'https://cdn.jsdelivr.net/gh/stdlib-js/array-empty@deno/mod.js'; +``` +The previous example will load the latest bundled code from the deno branch. Alternatively, you may load a specific version by loading the file from one of the [tagged bundles](https://github.com/stdlib-js/array-empty/tags). For example, + ```javascript import empty from 'https://cdn.jsdelivr.net/gh/stdlib-js/array-empty@v0.2.0-deno/mod.js'; ``` @@ -114,7 +119,7 @@ var arr = empty( 2, 'int32' ); ```javascript import dtypes from 'https://cdn.jsdelivr.net/gh/stdlib-js/array-dtypes@deno/mod.js'; -import empty from 'https://cdn.jsdelivr.net/gh/stdlib-js/array-empty@v0.2.0-deno/mod.js'; +import empty from 'https://cdn.jsdelivr.net/gh/stdlib-js/array-empty@deno/mod.js'; // Get a list of array data types: var dt = dtypes(); From efd06c0d6366ff81d4aae7167bdb2e7704204d9d Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Thu, 22 Feb 2024 22:03:40 +0000 Subject: [PATCH 45/75] Transform error messages --- lib/main.js | 6 +++--- package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/main.js b/lib/main.js index 33d8392..44eb4a4 100644 --- a/lib/main.js +++ b/lib/main.js @@ -26,7 +26,7 @@ var ctors = require( '@stdlib/array-typed-ctors' ); var zeros = require( '@stdlib/array-base-zeros' ); var bytesPerElement = require( '@stdlib/ndarray-base-bytes-per-element' ); var defaults = require( '@stdlib/array-defaults' ); -var format = require( '@stdlib/string-format' ); +var format = require( '@stdlib/error-tools-fmtprodmsg' ); // VARIABLES // @@ -63,7 +63,7 @@ function empty( length ) { var nb; if ( !isNonNegativeInteger( length ) ) { - throw new TypeError( format( 'invalid argument. First argument must be a nonnegative integer. Value: `%s`.', length ) ); + throw new TypeError( format( '1Zj2d', length ) ); } if ( arguments.length > 1 ) { dtype = arguments[ 1 ]; @@ -75,7 +75,7 @@ function empty( length ) { } nbytes = bytesPerElement( dtype ); if ( nbytes === null ) { - throw new TypeError( format( 'invalid argument. Second argument must be a supported data type. Value: `%s`.', dtype ) ); + throw new TypeError( format( '1ZjEC', dtype ) ); } // Resolve typed array constructor: ctor = ctors( dtype ); diff --git a/package.json b/package.json index efe5848..673e88d 100644 --- a/package.json +++ b/package.json @@ -46,7 +46,7 @@ "@stdlib/assert-is-uint8array": "^0.2.1", "@stdlib/buffer-alloc-unsafe": "^0.2.0", "@stdlib/ndarray-base-bytes-per-element": "^0.2.0", - "@stdlib/string-format": "^0.2.1", + "@stdlib/error-tools-fmtprodmsg": "^0.2.1", "@stdlib/types": "^0.3.2" }, "devDependencies": { From 274ba40e00c09bcace377c6935d0624697cc7486 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Thu, 22 Feb 2024 22:47:49 +0000 Subject: [PATCH 46/75] Remove files --- mod.d.ts | 277 --- mod.js | 4 - mod.js.map | 1 - stats.html | 6177 ---------------------------------------------------- 4 files changed, 6459 deletions(-) delete mode 100644 mod.d.ts delete mode 100644 mod.js delete mode 100644 mod.js.map delete mode 100644 stats.html diff --git a/mod.d.ts b/mod.d.ts deleted file mode 100644 index c071f4d..0000000 --- a/mod.d.ts +++ /dev/null @@ -1,277 +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 - -/// - -import { Complex128Array, Complex64Array, DataType } from '@stdlib/types/array'; - -/** -* Creates an uninitialized array having a specified length. -* -* ## Notes -* -* - In browser environments, the function always returns zero-filled arrays. -* - In Node.js versions `>=3.0.0`, the underlying memory of returned typed arrays is **not** initialized. Memory contents are unknown and may contain **sensitive** data. -* -* @param length - array length -* @param dtype - data type -* @returns empty array -* -* @example -* var arr = empty( 2, 'float64' ); -* // returns -*/ -declare function empty( length: number, dtype: 'float64' ): Float64Array; - -/** -* Creates an uninitialized array having a specified length. -* -* ## Notes -* -* - In browser environments, the function always returns zero-filled arrays. -* - In Node.js versions `>=3.0.0`, the underlying memory of returned typed arrays is **not** initialized. Memory contents are unknown and may contain **sensitive** data. -* -* @param length - array length -* @param dtype - data type -* @returns empty array -* -* @example -* var arr = empty( 2, 'float32' ); -* // returns -*/ -declare function empty( length: number, dtype: 'float32' ): Float32Array; - -/** -* Creates an uninitialized array having a specified length. -* -* ## Notes -* -* - In browser environments, the function always returns zero-filled arrays. -* - In Node.js versions `>=3.0.0`, the underlying memory of returned typed arrays is **not** initialized. Memory contents are unknown and may contain **sensitive** data. -* -* @param length - array length -* @param dtype - data type -* @returns empty array -* -* @example -* var arr = empty( 2, 'complex128' ); -* // returns -*/ -declare function empty( length: number, dtype: 'complex128' ): Complex128Array; - -/** -* Creates an uninitialized array having a specified length. -* -* ## Notes -* -* - In browser environments, the function always returns zero-filled arrays. -* - In Node.js versions `>=3.0.0`, the underlying memory of returned typed arrays is **not** initialized. Memory contents are unknown and may contain **sensitive** data. -* -* @param length - array length -* @param dtype - data type -* @returns empty array -* -* @example -* var arr = empty( 2, 'complex64' ); -* // returns -*/ -declare function empty( length: number, dtype: 'complex64' ): Complex64Array; - -/** -* Creates an uninitialized array having a specified length. -* -* ## Notes -* -* - In browser environments, the function always returns zero-filled arrays. -* - In Node.js versions `>=3.0.0`, the underlying memory of returned typed arrays is **not** initialized. Memory contents are unknown and may contain **sensitive** data. -* -* @param length - array length -* @param dtype - data type -* @returns empty array -* -* @example -* var arr = empty( 2, 'int32' ); -* // returns -*/ -declare function empty( length: number, dtype: 'int32' ): Int32Array; - -/** -* Creates an uninitialized array having a specified length. -* -* ## Notes -* -* - In browser environments, the function always returns zero-filled arrays. -* - In Node.js versions `>=3.0.0`, the underlying memory of returned typed arrays is **not** initialized. Memory contents are unknown and may contain **sensitive** data. -* -* @param length - array length -* @param dtype - data type -* @returns empty array -* -* @example -* var arr = empty( 2, 'int16' ); -* // returns -*/ -declare function empty( length: number, dtype: 'int16' ): Int16Array; - -/** -* Creates an uninitialized array having a specified length. -* -* ## Notes -* -* - In browser environments, the function always returns zero-filled arrays. -* - In Node.js versions `>=3.0.0`, the underlying memory of returned typed arrays is **not** initialized. Memory contents are unknown and may contain **sensitive** data. -* -* @param length - array length -* @param dtype - data type -* @returns empty array -* -* @example -* var arr = empty( 2, 'int8' ); -* // returns -*/ -declare function empty( length: number, dtype: 'int8' ): Int8Array; - -/** -* Creates an uninitialized array having a specified length. -* -* ## Notes -* -* - In browser environments, the function always returns zero-filled arrays. -* - In Node.js versions `>=3.0.0`, the underlying memory of returned typed arrays is **not** initialized. Memory contents are unknown and may contain **sensitive** data. -* -* @param length - array length -* @param dtype - data type -* @returns empty array -* -* @example -* var arr = empty( 2, 'uint32' ); -* // returns -*/ -declare function empty( length: number, dtype: 'uint32' ): Uint32Array; - -/** -* Creates an uninitialized array having a specified length. -* -* ## Notes -* -* - In browser environments, the function always returns zero-filled arrays. -* - In Node.js versions `>=3.0.0`, the underlying memory of returned typed arrays is **not** initialized. Memory contents are unknown and may contain **sensitive** data. -* -* @param length - array length -* @param dtype - data type -* @returns empty array -* -* @example -* var arr = empty( 2, 'uint16' ); -* // returns -*/ -declare function empty( length: number, dtype: 'uint16' ): Uint16Array; - -/** -* Creates an uninitialized array having a specified length. -* -* ## Notes -* -* - In browser environments, the function always returns zero-filled arrays. -* - In Node.js versions `>=3.0.0`, the underlying memory of returned typed arrays is **not** initialized. Memory contents are unknown and may contain **sensitive** data. -* -* @param length - array length -* @param dtype - data type -* @returns empty array -* -* @example -* var arr = empty( 2, 'uint8' ); -* // returns -*/ -declare function empty( length: number, dtype: 'uint8' ): Uint8Array; - -/** -* Creates an uninitialized array having a specified length. -* -* ## Notes -* -* - In browser environments, the function always returns zero-filled arrays. -* - In Node.js versions `>=3.0.0`, the underlying memory of returned typed arrays is **not** initialized. Memory contents are unknown and may contain **sensitive** data. -* -* @param length - array length -* @param dtype - data type -* @returns empty array -* -* @example -* var arr = empty( 2, 'uint8c' ); -* // returns -*/ -declare function empty( length: number, dtype: 'uint8c' ): Uint8ClampedArray; - -/** -* Creates a zero-filled array having a specified length. -* -* @param length - array length -* @param dtype - data type -* @returns zero-filled array -* -* @example -* var arr = empty( 2, 'generic' ); -* // returns -*/ -declare function empty( length: number, dtype: 'generic' ): Array; - -/** -* Creates an uninitialized array having a specified length. -* -* ## Notes -* -* - In browser environments, the function always returns zero-filled arrays. -* - If `dtype` is `'generic'`, the function always returns a zero-filled array. -* - In Node.js versions `>=3.0.0`, the underlying memory of returned typed arrays is **not** initialized. Memory contents are unknown and may contain **sensitive** data. -* -* The function recognizes the following data types: -* -* - `float64`: double-precision floating-point numbers (IEEE 754) -* - `float32`: single-precision floating-point numbers (IEEE 754) -* - `complex128`: double-precision complex floating-point numbers -* - `complex64`: single-precision complex floating-point numbers -* - `int32`: 32-bit two's complement signed integers -* - `uint32`: 32-bit unsigned integers -* - `int16`: 16-bit two's complement signed integers -* - `uint16`: 16-bit unsigned integers -* - `int8`: 8-bit two's complement signed integers -* - `uint8`: 8-bit unsigned integers -* - `uint8c`: 8-bit unsigned integers clamped to `0-255` -* - `generic`: generic JavaScript values -* -* @param length - array length -* @param dtype - data type (default: 'float64') -* @returns empty array -* -* @example -* var arr = empty( 2 ); -* // returns -* -* @example -* var arr = empty( 2, 'float32' ); -* // returns -*/ -declare function empty( length: number, dtype?: DataType ): Float64Array; - - -// EXPORTS // - -export = empty; diff --git a/mod.js b/mod.js deleted file mode 100644 index 64e71e8..0000000 --- a/mod.js +++ /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 -/// -var r="function"==typeof Object.defineProperty?Object.defineProperty:null;var e=Object.defineProperty;function t(r){return"number"==typeof r}function n(r){var e,t="";for(e=0;e0&&(e-=1),n=i.toExponential(e)):n=i.toPrecision(r.precision),r.alternate||(n=p.call(n,b,"$1e"),n=p.call(n,d,"e"),n=p.call(n,w,""));break;default:throw new Error("invalid double notation. Value: "+r.specifier)}return n=p.call(n,h,"e+0$1"),n=p.call(n,g,"e-0$1"),r.alternate&&(n=p.call(n,m,"$1."),n=p.call(n,y,"$1.e")),i>=0&&r.sign&&(n=r.sign+n),n=r.specifier===c.call(r.specifier)?c.call(n):l.call(n)}function E(r){var e,t="";for(e=0;e127)throw new Error("invalid character code. Value: "+n.arg);n.arg=x(o)?String(n.arg):T(o)}break;case"e":case"E":case"f":case"F":case"g":case"G":e||(n.precision=6),n.arg=v(n);break;default:throw new Error("invalid specifier: "+n.specifier)}n.maxWidth>=0&&n.arg.length>n.maxWidth&&(n.arg=n.arg.substring(0,n.maxWidth)),n.padZeros?n.arg=i(n.arg,n.width||n.precision,n.padRight):n.width&&(n.arg=_(n.arg,n.width,n.padRight)),f+=n.arg||"",l+=1}return f}var S=/%(?:([1-9]\d*)\$)?([0 +\-#]*)(\*|\d+)?(?:(\.)(\*|\d+)?)?[hlL]?([%A-Za-z])/g;function F(r){var e={mapping:r[1]?parseInt(r[1],10):void 0,flags:r[2],width:r[3],precision:r[5],specifier:r[6]};return"."===r[4]&&void 0===r[5]&&(e.precision="1"),e}function I(r){var e,t,n,i;for(t=[],i=0,n=S.exec(r);n;)(e=r.slice(i,S.lastIndex-n[0].length)).length&&t.push(e),t.push(F(n)),i=S.lastIndex,n=S.exec(r);return(e=r.slice(i)).length&&t.push(e),t}function j(r){return"string"==typeof r}function R(r){var e,t;if(!j(r))throw new TypeError(R("invalid argument. First argument must be a string. Value: `%s`.",r));for(e=[I(r)],t=1;tor&&ur(e=r)===e;var e}function fr(r){return Y(r)&&sr(r)}function lr(r){return nr(r)&&sr(r.valueOf())}function cr(r){return fr(r)||lr(r)}function pr(r){return fr(r)&&r>=0}function hr(r){return lr(r)&&r.valueOf()>=0}function gr(r){return pr(r)||hr(r)}W(cr,"isPrimitive",fr),W(cr,"isObject",lr),P(gr,"isPrimitive",pr),P(gr,"isObject",hr);var mr="function"==typeof Float64Array;var yr="function"==typeof Float64Array?Float64Array:null;var wr="function"==typeof Float64Array?Float64Array:void 0;var dr=function(){var r,e,t;if("function"!=typeof yr)return!1;try{e=new yr([1,3.14,-3.14,NaN]),t=e,r=(mr&&t instanceof Float64Array||"[object Float64Array]"===Q(t))&&1===e[0]&&3.14===e[1]&&-3.14===e[2]&&e[3]!=e[3]}catch(e){r=!1}return r}()?wr:function(){throw new Error("not implemented")},br="function"==typeof Float32Array;var vr="function"==typeof Float32Array?Float32Array:null;var Er="function"==typeof Float32Array?Float32Array:void 0;var _r=function(){var r,e,t;if("function"!=typeof vr)return!1;try{e=new vr([1,3.14,-3.14,5e40]),t=e,r=(br&&t instanceof Float32Array||"[object Float32Array]"===Q(t))&&1===e[0]&&3.140000104904175===e[1]&&-3.140000104904175===e[2]&&e[3]===ar}catch(e){r=!1}return r}()?Er:function(){throw new Error("not implemented")},Tr="function"==typeof Int16Array;var xr="function"==typeof Int16Array?Int16Array:null;var Vr="function"==typeof Int16Array?Int16Array:void 0;var Ar=function(){var r,e,t;if("function"!=typeof xr)return!1;try{e=new xr([1,3.14,-3.14,32768]),t=e,r=(Tr&&t instanceof Int16Array||"[object Int16Array]"===Q(t))&&1===e[0]&&3===e[1]&&-3===e[2]&&-32768===e[3]}catch(e){r=!1}return r}()?Vr:function(){throw new Error("not implemented")},kr="function"==typeof Int32Array;var Sr="function"==typeof Int32Array?Int32Array:null;var Fr="function"==typeof Int32Array?Int32Array:void 0;var Ir=function(){var r,e,t;if("function"!=typeof Sr)return!1;try{e=new Sr([1,3.14,-3.14,2147483648]),t=e,r=(kr&&t instanceof Int32Array||"[object Int32Array]"===Q(t))&&1===e[0]&&3===e[1]&&-3===e[2]&&-2147483648===e[3]}catch(e){r=!1}return r}()?Fr:function(){throw new Error("not implemented")},jr="function"==typeof Int8Array;var Rr="function"==typeof Int8Array?Int8Array:null;var Lr="function"==typeof Int8Array?Int8Array:void 0;var Cr=function(){var r,e,t;if("function"!=typeof Rr)return!1;try{e=new Rr([1,3.14,-3.14,128]),t=e,r=(jr&&t instanceof Int8Array||"[object Int8Array]"===Q(t))&&1===e[0]&&3===e[1]&&-3===e[2]&&-128===e[3]}catch(e){r=!1}return r}()?Lr:function(){throw new Error("not implemented")},Or="function"==typeof Uint16Array;var $r="function"==typeof Uint16Array?Uint16Array:null;var Br="function"==typeof Uint16Array?Uint16Array:void 0;var Mr=function(){var r,e,t;if("function"!=typeof $r)return!1;try{e=new $r(e=[1,3.14,-3.14,65536,65537]),t=e,r=(Or&&t instanceof Uint16Array||"[object Uint16Array]"===Q(t))&&1===e[0]&&3===e[1]&&65533===e[2]&&0===e[3]&&1===e[4]}catch(e){r=!1}return r}()?Br:function(){throw new Error("not implemented")},Nr="function"==typeof Uint32Array;var Ur="function"==typeof Uint32Array?Uint32Array:null;var Pr="function"==typeof Uint32Array?Uint32Array:void 0;var Wr=function(){var r,e,t;if("function"!=typeof Ur)return!1;try{e=new Ur(e=[1,3.14,-3.14,4294967296,4294967297]),t=e,r=(Nr&&t instanceof Uint32Array||"[object Uint32Array]"===Q(t))&&1===e[0]&&3===e[1]&&4294967293===e[2]&&0===e[3]&&1===e[4]}catch(e){r=!1}return r}()?Pr:function(){throw new Error("not implemented")},Zr="function"==typeof Uint8Array;var Yr="function"==typeof Uint8Array?Uint8Array:null;var Gr="function"==typeof Uint8Array?Uint8Array:void 0;var Xr=function(){var r,e,t;if("function"!=typeof Yr)return!1;try{e=new Yr(e=[1,3.14,-3.14,256,257]),t=e,r=(Zr&&t instanceof Uint8Array||"[object Uint8Array]"===Q(t))&&1===e[0]&&3===e[1]&&253===e[2]&&0===e[3]&&1===e[4]}catch(e){r=!1}return r}()?Gr:function(){throw new Error("not implemented")},zr=G();var Jr=Object.prototype.toString;var qr="function"==typeof Symbol?Symbol:void 0,Dr="function"==typeof qr?qr.toStringTag:"";var Hr=zr&&"symbol"==typeof Symbol.toStringTag?function(r){var e,t,n;if(null==r)return Jr.call(r);t=r[Dr],e=D(r,Dr);try{r[Dr]=void 0}catch(e){return Jr.call(r)}return n=Jr.call(r),e?r[Dr]=t:delete r[Dr],n}:function(r){return Jr.call(r)},Kr="function"==typeof Uint8ClampedArray;var Qr="function"==typeof Uint8ClampedArray?Uint8ClampedArray:null;var re="function"==typeof Uint8ClampedArray?Uint8ClampedArray:void 0;var ee=function(){var r,e,t;if("function"!=typeof Qr)return!1;try{e=new Qr([-1,0,1,3.14,4.99,255,256]),t=e,r=(Kr&&t instanceof Uint8ClampedArray||"[object Uint8ClampedArray]"===Hr(t))&&0===e[0]&&0===e[1]&&1===e[2]&&3===e[3]&&5===e[4]&&255===e[5]&&255===e[6]}catch(e){r=!1}return r}()?re:function(){throw new Error("not implemented")},te=Math.floor;function ne(r){return te(r)===r}function ie(r){return"object"==typeof r&&null!==r&&"number"==typeof r.length&&ne(r.length)&&r.length>=0&&r.length<=4294967295}function ae(r){return"object"==typeof r&&null!==r&&"number"==typeof r.length&&ne(r.length)&&r.length>=0&&r.length<=9007199254740991}var oe="function"==typeof ArrayBuffer;function ue(r){return oe&&r instanceof ArrayBuffer||"[object ArrayBuffer]"===Q(r)}var se=Array.isArray?Array.isArray:function(r){return"[object Array]"===Q(r)};function fe(r){return"object"==typeof r&&null!==r&&!se(r)}function le(r,e,t){U(r,e,{configurable:!1,enumerable:!1,writable:!1,value:t})}function ce(r){return"string"==typeof r}var pe=String.prototype.valueOf;var he=z();function ge(r){return"object"==typeof r&&(r instanceof String||(he?function(r){try{return pe.call(r),!0}catch(r){return!1}}(r):"[object String]"===Q(r)))}function me(r){return ce(r)||ge(r)}le(me,"isPrimitive",ce),le(me,"isObject",ge);var ye=/./;function we(r,e,t){U(r,e,{configurable:!1,enumerable:!1,writable:!1,value:t})}function de(r){return"boolean"==typeof r}var be=Boolean,ve=Boolean.prototype.toString;var Ee=z();function _e(r){return"object"==typeof r&&(r instanceof be||(Ee?function(r){try{return ve.call(r),!0}catch(r){return!1}}(r):"[object Boolean]"===Q(r)))}function Te(r){return de(r)||_e(r)}function xe(r){return"number"==typeof r}function Ve(r){var e,t="";for(e=0;e0&&(e-=1),t=n.toExponential(e)):t=n.toPrecision(r.precision),r.alternate||(t=Ce.call(t,Pe,"$1e"),t=Ce.call(t,Ue,"e"),t=Ce.call(t,Ne,""));break;default:throw new Error("invalid double notation. Value: "+r.specifier)}return t=Ce.call(t,Oe,"e+0$1"),t=Ce.call(t,$e,"e-0$1"),r.alternate&&(t=Ce.call(t,Be,"$1."),t=Ce.call(t,Me,"$1.e")),n>=0&&r.sign&&(t=r.sign+t),t=r.specifier===Le.call(r.specifier)?Le.call(t):Re.call(t)}function Ze(r){var e,t="";for(e=0;e127)throw new Error("invalid character code. Value: "+n.arg);n.arg=Xe(a)?String(n.arg):Ge(a)}break;case"e":case"E":case"f":case"F":case"g":case"G":e||(n.precision=6),n.arg=We(n);break;default:throw new Error("invalid specifier: "+n.specifier)}n.maxWidth>=0&&n.arg.length>n.maxWidth&&(n.arg=n.arg.substring(0,n.maxWidth)),n.padZeros?n.arg=Ae(n.arg,n.width||n.precision,n.padRight):n.width&&(n.arg=Ye(n.arg,n.width,n.padRight)),o+=n.arg||"",u+=1}return o}var De=/%(?:([1-9]\d*)\$)?([0 +\-#]*)(\*|\d+)?(?:(\.)(\*|\d+)?)?[hlL]?([%A-Za-z])/g;function He(r){var e={mapping:r[1]?parseInt(r[1],10):void 0,flags:r[2],width:r[3],precision:r[5],specifier:r[6]};return"."===r[4]&&void 0===r[5]&&(e.precision="1"),e}function Ke(r){var e,t,n,i;for(t=[],i=0,n=De.exec(r);n;)(e=r.slice(i,De.lastIndex-n[0].length)).length&&t.push(e),t.push(He(n)),i=De.lastIndex,n=De.exec(r);return(e=r.slice(i)).length&&t.push(e),t}function Qe(r){return"string"==typeof r}function rt(r){var e,t;if(!Qe(r))throw new TypeError(rt("invalid argument. First argument must be a string. Value: `%s`.",r));for(e=[Ke(r)],t=1;t0&&(e-=1),t=n.toExponential(e)):t=n.toPrecision(r.precision),r.alternate||(t=_t.call(t,Ft,"$1e"),t=_t.call(t,St,"e"),t=_t.call(t,kt,""));break;default:throw new Error("invalid double notation. Value: "+r.specifier)}return t=_t.call(t,Tt,"e+0$1"),t=_t.call(t,xt,"e-0$1"),r.alternate&&(t=_t.call(t,Vt,"$1."),t=_t.call(t,At,"$1.e")),n>=0&&r.sign&&(t=r.sign+t),t=r.specifier===Et.call(r.specifier)?Et.call(t):vt.call(t)}function jt(r){var e,t="";for(e=0;e127)throw new Error("invalid character code. Value: "+n.arg);n.arg=Ct(a)?String(n.arg):Lt(a)}break;case"e":case"E":case"f":case"F":case"g":case"G":e||(n.precision=6),n.arg=It(n);break;default:throw new Error("invalid specifier: "+n.specifier)}n.maxWidth>=0&&n.arg.length>n.maxWidth&&(n.arg=n.arg.substring(0,n.maxWidth)),n.padZeros?n.arg=gt(n.arg,n.width||n.precision,n.padRight):n.width&&(n.arg=Rt(n.arg,n.width,n.padRight)),o+=n.arg||"",u+=1}return o}var Mt=/%(?:([1-9]\d*)\$)?([0 +\-#]*)(\*|\d+)?(?:(\.)(\*|\d+)?)?[hlL]?([%A-Za-z])/g;function Nt(r){var e={mapping:r[1]?parseInt(r[1],10):void 0,flags:r[2],width:r[3],precision:r[5],specifier:r[6]};return"."===r[4]&&void 0===r[5]&&(e.precision="1"),e}function Ut(r){var e,t,n,i;for(t=[],i=0,n=Mt.exec(r);n;)(e=r.slice(i,Mt.lastIndex-n[0].length)).length&&t.push(e),t.push(Nt(n)),i=Mt.lastIndex,n=Mt.exec(r);return(e=r.slice(i)).length&&t.push(e),t}function Pt(r){return"string"==typeof r}function Wt(r){var e,t;if(!Pt(r))throw new TypeError(Wt("invalid argument. First argument must be a string. Value: `%s`.",r));for(e=[Ut(r)],t=1;t0&&(e-=1),t=n.toExponential(e)):t=n.toPrecision(r.precision),r.alternate||(t=an.call(t,pn,"$1e"),t=an.call(t,cn,"e"),t=an.call(t,ln,""));break;default:throw new Error("invalid double notation. Value: "+r.specifier)}return t=an.call(t,on,"e+0$1"),t=an.call(t,un,"e-0$1"),r.alternate&&(t=an.call(t,sn,"$1."),t=an.call(t,fn,"$1.e")),n>=0&&r.sign&&(t=r.sign+t),t=r.specifier===nn.call(r.specifier)?nn.call(t):tn.call(t)}function gn(r){var e,t="";for(e=0;e127)throw new Error("invalid character code. Value: "+n.arg);n.arg=wn(a)?String(n.arg):yn(a)}break;case"e":case"E":case"f":case"F":case"g":case"G":e||(n.precision=6),n.arg=hn(n);break;default:throw new Error("invalid specifier: "+n.specifier)}n.maxWidth>=0&&n.arg.length>n.maxWidth&&(n.arg=n.arg.substring(0,n.maxWidth)),n.padZeros?n.arg=Dt(n.arg,n.width||n.precision,n.padRight):n.width&&(n.arg=mn(n.arg,n.width,n.padRight)),o+=n.arg||"",u+=1}return o}var En=/%(?:([1-9]\d*)\$)?([0 +\-#]*)(\*|\d+)?(?:(\.)(\*|\d+)?)?[hlL]?([%A-Za-z])/g;function _n(r){var e={mapping:r[1]?parseInt(r[1],10):void 0,flags:r[2],width:r[3],precision:r[5],specifier:r[6]};return"."===r[4]&&void 0===r[5]&&(e.precision="1"),e}function Tn(r){var e,t,n,i;for(t=[],i=0,n=En.exec(r);n;)(e=r.slice(i,En.lastIndex-n[0].length)).length&&t.push(e),t.push(_n(n)),i=En.lastIndex,n=En.exec(r);return(e=r.slice(i)).length&&t.push(e),t}function xn(r){return"string"==typeof r}function Vn(r){var e,t;if(!xn(r))throw new TypeError(Vn("invalid argument. First argument must be a string. Value: `%s`.",r));for(e=[Tn(r)],t=1;t=2)e.push(n[0],n[1]);else{if(!jn(n))return new TypeError(Vn("invalid argument. An iterator must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",n));e.push(Nn(n),Un(n))}return e}function Jn(r,e,t){var n,i,a,o;for(n=[],o=-1;!(i=r.next()).done;)if(o+=1,ie(a=e.call(t,i.value,o))&&a.length>=2)n.push(a[0],a[1]);else{if(!jn(a))return new TypeError(Vn("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",a));n.push(Nn(a),Un(a))}return n}function qn(r,e){var t,n,i,a;for(t=e.length,a=0,i=0;it.byteLength-r)throw new RangeError(Vn("invalid arguments. ArrayBuffer has insufficient capacity. Either decrease the array length or provide a bigger buffer. Minimum capacity: `%u`.",n*Dn));t=new _r(t,r,2*n)}}return zt(this,"_buffer",t),zt(this,"_length",t.length/2),this}function ti(r){return r.re}function ni(r){return r.im}function ii(r){var e,t,n;for(e=[];!(t=r.next()).done;)if(ie(n=t.value)&&n.length>=2)e.push(n[0],n[1]);else{if(!jn(n))return new TypeError(Vn("invalid argument. An iterator must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",n));e.push(ti(n),ni(n))}return e}function ai(r,e,t){var n,i,a,o;for(n=[],o=-1;!(i=r.next()).done;)if(o+=1,ie(a=e.call(t,i.value,o))&&a.length>=2)n.push(a[0],a[1]);else{if(!jn(a))return new TypeError(Vn("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",a));n.push(ti(a),ni(a))}return n}function oi(r,e){var t,n,i,a;for(t=e.length,a=0,i=0;i1){if(!Xt(n=arguments[1]))throw new TypeError(Vn("invalid argument. Second argument must be a function. Value: `%s`.",n));t>2&&(e=arguments[2])}if(Kn(r)){if(s=r.length,n){for(a=(i=new this(s))._buffer,p=0,c=0;c=2))throw new TypeError(Vn("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",l));a[p]=l[0],a[p+1]=l[1]}p+=2}return i}return new this(r)}if(ae(r)){if(n){for(s=r.length,u=r.get&&r.set?Xn("default"):Yn("default"),c=0;c=2))throw new TypeError(Vn("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",l));a[p]=l[0],a[p+1]=l[1]}p+=2}return i}return new this(r)}if(fe(r)&&Hn&&Xt(r[Bn])){if(!Xt((a=r[Bn]()).next))throw new TypeError(Vn("invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.",r));if((o=n?Jn(a,n,e):zn(a))instanceof Error)throw o;for(a=(i=new this(s=o.length/2))._buffer,c=0;c=this._length))return ri(this._buffer,r)})),Mn(ei.prototype,"buffer",(function(){return this._buffer.buffer})),Mn(ei.prototype,"byteLength",(function(){return this._buffer.byteLength})),Mn(ei.prototype,"byteOffset",(function(){return this._buffer.byteOffset})),zt(ei.prototype,"BYTES_PER_ELEMENT",ei.BYTES_PER_ELEMENT),zt(ei.prototype,"copyWithin",(function(r,e){if(!Kn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");return 2===arguments.length?this._buffer.copyWithin(2*r,2*e):this._buffer.copyWithin(2*r,2*e,2*arguments[2]),this})),zt(ei.prototype,"entries",(function(){var r,e,t,n,i,a,o;if(!Kn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");return e=this,r=this._buffer,n=this._length,a=-1,o=-2,zt(t={},"next",(function(){var e;if(a+=1,i||a>=n)return{done:!0};return e=new In(r[o+=2],r[o+1]),{value:[a,e],done:!1}})),zt(t,"return",(function(r){if(i=!0,arguments.length)return{value:r,done:!0};return{done:!0}})),Bn&&zt(t,Bn,(function(){return e.entries()})),t})),zt(ei.prototype,"every",(function(r,e){var t,n;if(!Kn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Xt(r))throw new TypeError(Vn("invalid argument. First argument must be a function. Value: `%s`.",r));for(t=this._buffer,n=0;n1){if(!ne(e))throw new TypeError(Vn("invalid argument. Second argument must be an integer. Value: `%s`.",e));if(e<0&&(e+=i)<0&&(e=0),arguments.length>2){if(!ne(t))throw new TypeError(Vn("invalid argument. Third argument must be an integer. Value: `%s`.",t));t<0&&(t+=i)<0&&(t=0),t>i&&(t=i)}else t=i}else e=0,t=i;for(o=Nn(r),u=Un(r),s=e;s=0;n--)if(i=ri(t,n),r.call(e,i,n,this))return i})),zt(ei.prototype,"findLastIndex",(function(r,e){var t,n,i;if(!Kn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Xt(r))throw new TypeError(Vn("invalid argument. First argument must be a function. Value: `%s`.",r));for(t=this._buffer,n=this._length-1;n>=0;n--)if(i=ri(t,n),r.call(e,i,n,this))return n;return-1})),zt(ei.prototype,"forEach",(function(r,e){var t,n,i;if(!Kn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Xt(r))throw new TypeError(Vn("invalid argument. First argument must be a function. Value: `%s`.",r));for(t=this._buffer,n=0;n=this._length))return ri(this._buffer,r)})),zt(ei.prototype,"includes",(function(r,e){var t,n,i,a,o;if(!Kn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!jn(r))throw new TypeError(Vn("invalid argument. First argument must be a complex number. Value: `%s`.",r));if(arguments.length>1){if(!ne(e))throw new TypeError(Vn("invalid argument. Second argument must be an integer. Value: `%s`.",e));e<0&&(e+=this._length)<0&&(e=0)}else e=0;for(i=Nn(r),a=Un(r),t=this._buffer,o=e;o1){if(!ne(e))throw new TypeError(Vn("invalid argument. Second argument must be an integer. Value: `%s`.",e));e<0&&(e+=this._length)<0&&(e=0)}else e=0;for(i=Nn(r),a=Un(r),t=this._buffer,o=e;o1){if(!ne(e))throw new TypeError(Vn("invalid argument. Second argument must be an integer. Value: `%s`.",e));e>=this._length?e=this._length-1:e<0&&(e+=this._length)}else e=this._length-1;for(i=Nn(r),a=Un(r),t=this._buffer,o=e;o>=0;o--)if(i===t[n=2*o]&&a===t[n+1])return o;return-1})),Mn(ei.prototype,"length",(function(){return this._length})),zt(ei.prototype,"map",(function(r,e){var t,n,i,a,o;if(!Kn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Xt(r))throw new TypeError(Vn("invalid argument. First argument must be a function. Value: `%s`.",r));for(n=this._buffer,t=(i=new this.constructor(this._length))._buffer,a=0;a1){if(!pr(t=arguments[1]))throw new TypeError(Vn("invalid argument. Index argument must be a nonnegative integer. Value: `%s`.",t))}else t=0;if(jn(r)){if(t>=this._length)throw new RangeError(Vn("invalid argument. Index argument is out-of-bounds. Value: `%u`.",t));return n[t*=2]=Nn(r),void(n[t+1]=Un(r))}if(Kn(r)){if(t+(o=r._length)>this._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");if(e=r._buffer,f=n.byteOffset+t*Dn,e.buffer===n.buffer&&e.byteOffsetf){for(i=new _r(e.length),s=0;sthis._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");if(e=r,f=n.byteOffset+t*Dn,e.buffer===n.buffer&&e.byteOffsetf){for(i=new _r(o),s=0;sthis._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");for(t*=2,s=0;su&&(e=u)}}for(t=ri&&(e=i)}}return r>=i?(i=0,t=n.byteLength):r>=e?(i=0,t=n.byteOffset+r*Dn):(i=e-r,t=n.byteOffset+r*Dn),new this.constructor(n.buffer,t,i<0?0:i)})),zt(ei.prototype,"toReversed",(function(){var r,e,t,n,i,a;if(!Kn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");for(t=this._length,e=new this.constructor(t),n=this._buffer,r=e._buffer,i=0;i=i)throw new RangeError(Vn("invalid argument. Index argument is out-of-bounds. Value: `%s`.",r));if(!jn(e))throw new TypeError(Vn("invalid argument. Second argument must be a complex number. Value: `%s`.",e));return(t=(n=new this.constructor(this._buffer))._buffer)[2*r]=Nn(e),t[2*r+1]=Un(e),n}));var ui=2*dr.BYTES_PER_ELEMENT,si=$n();function fi(r){return r instanceof pi||"object"==typeof r&&null!==r&&("Complex64Array"===r.constructor.name||"Complex128Array"===r.constructor.name)&&"number"==typeof r._length&&"object"==typeof r._buffer}function li(r){return r===pi||"Complex64Array"===r.name}function ci(r,e){return new An(r[e*=2],r[e+1])}function pi(){var r,e,t,n;if(e=arguments.length,!(this instanceof pi))return 0===e?new pi:1===e?new pi(arguments[0]):2===e?new pi(arguments[0],arguments[1]):new pi(arguments[0],arguments[1],arguments[2]);if(0===e)t=new dr(0);else if(1===e)if(pr(arguments[0]))t=new dr(2*arguments[0]);else if(ae(arguments[0]))if((n=(t=arguments[0]).length)&&se(t)&&jn(t[0])){if(null===(t=oi(new dr(2*n),t))){if(!Rn(n))throw new RangeError(Vn("invalid argument. Array-like object arguments must have a length which is a multiple of two. Length: `%u`.",n));t=new dr(arguments[0])}}else{if(Ln(t))t=Pn(t,0);else if(Cn(t))t=Wn(t,0);else if(!Rn(n))throw new RangeError(Vn("invalid argument. Array-like object and typed array arguments must have a length which is a multiple of two. Length: `%u`.",n));t=new dr(t)}else if(ue(arguments[0])){if(!ne((t=arguments[0]).byteLength/ui))throw new RangeError(Vn("invalid argument. ArrayBuffer byte length must be a multiple of %u. Byte length: `%u`.",ui,t.byteLength));t=new dr(t)}else{if(!fe(arguments[0]))throw new TypeError(Vn("invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.",arguments[0]));if(t=arguments[0],!1===si)throw new TypeError(Vn("invalid argument. Environment lacks Symbol.iterator support. Must provide a length, ArrayBuffer, typed array, or array-like object. Value: `%s`.",t));if(!Xt(t[Bn]))throw new TypeError(Vn("invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.",t));if(!Xt((t=t[Bn]()).next))throw new TypeError(Vn("invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.",t));if((t=ii(t))instanceof Error)throw t;t=new dr(t)}else{if(!ue(t=arguments[0]))throw new TypeError(Vn("invalid argument. First argument must be an ArrayBuffer. Value: `%s`.",t));if(!pr(r=arguments[1]))throw new TypeError(Vn("invalid argument. Byte offset must be a nonnegative integer. Value: `%s`.",r));if(!ne(r/ui))throw new RangeError(Vn("invalid argument. Byte offset must be a multiple of %u. Value: `%u`.",ui,r));if(2===e){if(!ne((n=t.byteLength-r)/ui))throw new RangeError(Vn("invalid arguments. ArrayBuffer view byte length must be a multiple of %u. View byte length: `%u`.",ui,n));t=new dr(t,r)}else{if(!pr(n=arguments[2]))throw new TypeError(Vn("invalid argument. Length must be a nonnegative integer. Value: `%s`.",n));if(n*ui>t.byteLength-r)throw new RangeError(Vn("invalid arguments. ArrayBuffer has insufficient capacity. Either decrease the array length or provide a bigger buffer. Minimum capacity: `%u`.",n*ui));t=new dr(t,r,2*n)}}return zt(this,"_buffer",t),zt(this,"_length",t.length/2),this}zt(pi,"BYTES_PER_ELEMENT",ui),zt(pi,"name","Complex128Array"),zt(pi,"from",(function(r){var e,t,n,i,a,o,u,s,f,l,c,p;if(!Xt(this))throw new TypeError("invalid invocation. `this` context must be a constructor.");if(!li(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if((t=arguments.length)>1){if(!Xt(n=arguments[1]))throw new TypeError(Vn("invalid argument. Second argument must be a function. Value: `%s`.",n));t>2&&(e=arguments[2])}if(fi(r)){if(s=r.length,n){for(a=(i=new this(s))._buffer,p=0,c=0;c=2))throw new TypeError(Vn("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",l));a[p]=l[0],a[p+1]=l[1]}p+=2}return i}return new this(r)}if(ae(r)){if(n){for(s=r.length,u=r.get&&r.set?Xn("default"):Yn("default"),c=0;c=2))throw new TypeError(Vn("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",l));a[p]=l[0],a[p+1]=l[1]}p+=2}return i}return new this(r)}if(fe(r)&&si&&Xt(r[Bn])){if(!Xt((a=r[Bn]()).next))throw new TypeError(Vn("invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.",r));if((o=n?ai(a,n,e):ii(a))instanceof Error)throw o;for(a=(i=new this(s=o.length/2))._buffer,c=0;c=this._length))return ci(this._buffer,r)})),Mn(pi.prototype,"buffer",(function(){return this._buffer.buffer})),Mn(pi.prototype,"byteLength",(function(){return this._buffer.byteLength})),Mn(pi.prototype,"byteOffset",(function(){return this._buffer.byteOffset})),zt(pi.prototype,"BYTES_PER_ELEMENT",pi.BYTES_PER_ELEMENT),zt(pi.prototype,"copyWithin",(function(r,e){if(!fi(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");return 2===arguments.length?this._buffer.copyWithin(2*r,2*e):this._buffer.copyWithin(2*r,2*e,2*arguments[2]),this})),zt(pi.prototype,"entries",(function(){var r,e,t,n,i,a,o;if(!fi(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");return e=this,r=this._buffer,n=this._length,a=-1,o=-2,zt(t={},"next",(function(){var e;if(a+=1,i||a>=n)return{done:!0};return e=new An(r[o+=2],r[o+1]),{value:[a,e],done:!1}})),zt(t,"return",(function(r){if(i=!0,arguments.length)return{value:r,done:!0};return{done:!0}})),Bn&&zt(t,Bn,(function(){return e.entries()})),t})),zt(pi.prototype,"every",(function(r,e){var t,n;if(!fi(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Xt(r))throw new TypeError(Vn("invalid argument. First argument must be a function. Value: `%s`.",r));for(t=this._buffer,n=0;n1){if(!ne(e))throw new TypeError(Vn("invalid argument. Second argument must be an integer. Value: `%s`.",e));if(e<0&&(e+=i)<0&&(e=0),arguments.length>2){if(!ne(t))throw new TypeError(Vn("invalid argument. Third argument must be an integer. Value: `%s`.",t));t<0&&(t+=i)<0&&(t=0),t>i&&(t=i)}else t=i}else e=0,t=i;for(o=ti(r),u=ni(r),s=e;s=0;n--)if(i=ci(t,n),r.call(e,i,n,this))return i})),zt(pi.prototype,"findLastIndex",(function(r,e){var t,n,i;if(!fi(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Xt(r))throw new TypeError(Vn("invalid argument. First argument must be a function. Value: `%s`.",r));for(t=this._buffer,n=this._length-1;n>=0;n--)if(i=ci(t,n),r.call(e,i,n,this))return n;return-1})),zt(pi.prototype,"forEach",(function(r,e){var t,n,i;if(!fi(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Xt(r))throw new TypeError(Vn("invalid argument. First argument must be a function. Value: `%s`.",r));for(t=this._buffer,n=0;n=this._length))return ci(this._buffer,r)})),Mn(pi.prototype,"length",(function(){return this._length})),zt(pi.prototype,"includes",(function(r,e){var t,n,i,a,o;if(!fi(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!jn(r))throw new TypeError(Vn("invalid argument. First argument must be a complex number. Value: `%s`.",r));if(arguments.length>1){if(!ne(e))throw new TypeError(Vn("invalid argument. Second argument must be an integer. Value: `%s`.",e));e<0&&(e+=this._length)<0&&(e=0)}else e=0;for(i=ti(r),a=ni(r),t=this._buffer,o=e;o1){if(!ne(e))throw new TypeError(Vn("invalid argument. Second argument must be an integer. Value: `%s`.",e));e<0&&(e+=this._length)<0&&(e=0)}else e=0;for(i=ti(r),a=ni(r),t=this._buffer,o=e;o1){if(!ne(e))throw new TypeError(Vn("invalid argument. Second argument must be an integer. Value: `%s`.",e));e>=this._length?e=this._length-1:e<0&&(e+=this._length)}else e=this._length-1;for(i=ti(r),a=ni(r),t=this._buffer,o=e;o>=0;o--)if(i===t[n=2*o]&&a===t[n+1])return o;return-1})),zt(pi.prototype,"map",(function(r,e){var t,n,i,a,o;if(!fi(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Xt(r))throw new TypeError(Vn("invalid argument. First argument must be a function. Value: `%s`.",r));for(n=this._buffer,t=(i=new this.constructor(this._length))._buffer,a=0;a1){if(!pr(t=arguments[1]))throw new TypeError(Vn("invalid argument. Index argument must be a nonnegative integer. Value: `%s`.",t))}else t=0;if(jn(r)){if(t>=this._length)throw new RangeError(Vn("invalid argument. Index argument is out-of-bounds. Value: `%u`.",t));return n[t*=2]=ti(r),void(n[t+1]=ni(r))}if(fi(r)){if(t+(o=r._length)>this._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");if(e=r._buffer,f=n.byteOffset+t*ui,e.buffer===n.buffer&&e.byteOffsetf){for(i=new dr(e.length),s=0;sthis._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");if(e=r,f=n.byteOffset+t*ui,e.buffer===n.buffer&&e.byteOffsetf){for(i=new dr(o),s=0;sthis._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");for(t*=2,s=0;si&&(e=i)}}return r>=i?(i=0,t=n.byteLength):r>=e?(i=0,t=n.byteOffset+r*ui):(i=e-r,t=n.byteOffset+r*ui),new this.constructor(n.buffer,t,i<0?0:i)})),zt(pi.prototype,"toReversed",(function(){var r,e,t,n,i,a;if(!fi(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");for(t=this._length,e=new this.constructor(t),n=this._buffer,r=e._buffer,i=0;i=i)throw new RangeError(Vn("invalid argument. Index argument is out-of-bounds. Value: `%s`.",r));if(!jn(e))throw new TypeError(Vn("invalid argument. Second argument must be a complex number. Value: `%s`.",e));return(t=(n=new this.constructor(this._buffer))._buffer)[2*r]=ti(e),t[2*r+1]=ni(e),n}));var hi={float64:dr,float32:_r,generic:Array,int16:Ar,int32:Ir,int8:Cr,uint16:Mr,uint32:Wr,uint8:Xr,uint8c:ee,complex64:ei,complex128:pi};function gi(r){return hi[r]||null}function mi(r){return function(r,e){var t,n;for(t=[],n=0;n0&&(e-=1),t=n.toExponential(e)):t=n.toPrecision(r.precision),r.alternate||(t=Fi.call(t,$i,"$1e"),t=Fi.call(t,Oi,"e"),t=Fi.call(t,Ci,""));break;default:throw new Error("invalid double notation. Value: "+r.specifier)}return t=Fi.call(t,Ii,"e+0$1"),t=Fi.call(t,ji,"e-0$1"),r.alternate&&(t=Fi.call(t,Ri,"$1."),t=Fi.call(t,Li,"$1.e")),n>=0&&r.sign&&(t=r.sign+t),t=r.specifier===Si.call(r.specifier)?Si.call(t):ki.call(t)}function Mi(r){var e,t="";for(e=0;e127)throw new Error("invalid character code. Value: "+n.arg);n.arg=Pi(a)?String(n.arg):Ui(a)}break;case"e":case"E":case"f":case"F":case"g":case"G":e||(n.precision=6),n.arg=Bi(n);break;default:throw new Error("invalid specifier: "+n.specifier)}n.maxWidth>=0&&n.arg.length>n.maxWidth&&(n.arg=n.arg.substring(0,n.maxWidth)),n.padZeros?n.arg=Ei(n.arg,n.width||n.precision,n.padRight):n.width&&(n.arg=Ni(n.arg,n.width,n.padRight)),o+=n.arg||"",u+=1}return o}var Gi=/%(?:([1-9]\d*)\$)?([0 +\-#]*)(\*|\d+)?(?:(\.)(\*|\d+)?)?[hlL]?([%A-Za-z])/g;function Xi(r){var e={mapping:r[1]?parseInt(r[1],10):void 0,flags:r[2],width:r[3],precision:r[5],specifier:r[6]};return"."===r[4]&&void 0===r[5]&&(e.precision="1"),e}function zi(r){var e,t,n,i;for(t=[],i=0,n=Gi.exec(r);n;)(e=r.slice(i,Gi.lastIndex-n[0].length)).length&&t.push(e),t.push(Xi(n)),i=Gi.lastIndex,n=Gi.exec(r);return(e=r.slice(i)).length&&t.push(e),t}function Ji(r){return"string"==typeof r}function qi(r){var e,t;if(!Ji(r))throw new TypeError(qi("invalid argument. First argument must be a string. Value: `%s`.",r));for(e=[zi(r)],t=1;t1?arguments[1]:Di))return mi(r);if(null===(t=gi(e)))throw new TypeError(qi("invalid argument. Second argument must be a recognized data type. Value: `%s`.",e));return new t(r)}function Ki(r){return arguments.length>1?Hi(r,arguments[1]):Hi(r)}export{Ki as default}; -//# sourceMappingURL=mod.js.map diff --git a/mod.js.map b/mod.js.map deleted file mode 100644 index 2260d32..0000000 --- a/mod.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"mod.js","sources":["../node_modules/@stdlib/utils-define-property/lib/define_property.js","../node_modules/@stdlib/utils-define-property/lib/builtin.js","../node_modules/@stdlib/utils-define-property/node_modules/@stdlib/string-base-format-interpolate/lib/is_number.js","../node_modules/@stdlib/utils-define-property/node_modules/@stdlib/string-base-format-interpolate/lib/zero_pad.js","../node_modules/@stdlib/utils-define-property/node_modules/@stdlib/string-base-format-interpolate/lib/format_integer.js","../node_modules/@stdlib/utils-define-property/node_modules/@stdlib/string-base-format-interpolate/lib/is_string.js","../node_modules/@stdlib/utils-define-property/node_modules/@stdlib/string-base-format-interpolate/lib/format_double.js","../node_modules/@stdlib/utils-define-property/node_modules/@stdlib/string-base-format-interpolate/lib/space_pad.js","../node_modules/@stdlib/utils-define-property/node_modules/@stdlib/string-base-format-interpolate/lib/main.js","../node_modules/@stdlib/utils-define-property/node_modules/@stdlib/string-base-format-tokenize/lib/main.js","../node_modules/@stdlib/utils-define-property/node_modules/@stdlib/string-format/lib/is_string.js","../node_modules/@stdlib/utils-define-property/node_modules/@stdlib/string-format/lib/main.js","../node_modules/@stdlib/utils-define-property/lib/polyfill.js","../node_modules/@stdlib/utils-define-property/lib/index.js","../node_modules/@stdlib/utils-define-property/lib/has_define_property_support.js","../node_modules/@stdlib/assert-is-nonnegative-integer/node_modules/@stdlib/utils-define-nonenumerable-read-only-property/lib/main.js","../node_modules/@stdlib/assert-is-integer/node_modules/@stdlib/utils-define-nonenumerable-read-only-property/lib/main.js","../node_modules/@stdlib/assert-is-number/node_modules/@stdlib/utils-define-nonenumerable-read-only-property/lib/main.js","../node_modules/@stdlib/assert-is-number/lib/primitive.js","../node_modules/@stdlib/assert-has-symbol-support/lib/main.js","../node_modules/@stdlib/assert-has-tostringtag-support/lib/main.js","../node_modules/@stdlib/utils-native-class/lib/tostring.js","../node_modules/@stdlib/assert-has-own-property/lib/main.js","../node_modules/@stdlib/utils-native-class/node_modules/@stdlib/symbol-ctor/lib/main.js","../node_modules/@stdlib/utils-native-class/lib/tostringtag.js","../node_modules/@stdlib/utils-native-class/lib/index.js","../node_modules/@stdlib/utils-native-class/lib/polyfill.js","../node_modules/@stdlib/utils-native-class/lib/main.js","../node_modules/@stdlib/number-ctor/lib/main.js","../node_modules/@stdlib/assert-is-number/lib/tostring.js","../node_modules/@stdlib/assert-is-number/lib/object.js","../node_modules/@stdlib/assert-is-number/lib/try2serialize.js","../node_modules/@stdlib/assert-is-number/lib/main.js","../node_modules/@stdlib/assert-is-number/lib/index.js","../node_modules/@stdlib/constants-float64-pinf/lib/index.js","../node_modules/@stdlib/constants-float64-ninf/lib/index.js","../node_modules/@stdlib/assert-is-integer/node_modules/@stdlib/math-base-special-floor/lib/main.js","../node_modules/@stdlib/assert-is-integer/lib/integer.js","../node_modules/@stdlib/assert-is-integer/node_modules/@stdlib/math-base-assert-is-integer/lib/main.js","../node_modules/@stdlib/assert-is-integer/lib/primitive.js","../node_modules/@stdlib/assert-is-integer/lib/object.js","../node_modules/@stdlib/assert-is-integer/lib/main.js","../node_modules/@stdlib/assert-is-nonnegative-integer/lib/primitive.js","../node_modules/@stdlib/assert-is-nonnegative-integer/lib/object.js","../node_modules/@stdlib/assert-is-nonnegative-integer/lib/main.js","../node_modules/@stdlib/assert-is-integer/lib/index.js","../node_modules/@stdlib/assert-is-nonnegative-integer/lib/index.js","../node_modules/@stdlib/assert-is-float64array/lib/main.js","../node_modules/@stdlib/assert-has-float64array-support/lib/float64array.js","../node_modules/@stdlib/array-float64/lib/main.js","../node_modules/@stdlib/array-float64/lib/index.js","../node_modules/@stdlib/assert-has-float64array-support/lib/main.js","../node_modules/@stdlib/array-float64/lib/polyfill.js","../node_modules/@stdlib/assert-is-float32array/lib/main.js","../node_modules/@stdlib/assert-has-float32array-support/lib/float32array.js","../node_modules/@stdlib/array-float32/lib/main.js","../node_modules/@stdlib/array-float32/lib/index.js","../node_modules/@stdlib/assert-has-float32array-support/lib/main.js","../node_modules/@stdlib/array-float32/lib/polyfill.js","../node_modules/@stdlib/assert-is-int16array/lib/main.js","../node_modules/@stdlib/constants-int16-max/lib/index.js","../node_modules/@stdlib/assert-has-int16array-support/lib/int16array.js","../node_modules/@stdlib/array-int16/lib/main.js","../node_modules/@stdlib/array-int16/lib/index.js","../node_modules/@stdlib/assert-has-int16array-support/lib/main.js","../node_modules/@stdlib/constants-int16-min/lib/index.js","../node_modules/@stdlib/array-int16/lib/polyfill.js","../node_modules/@stdlib/assert-is-int32array/lib/main.js","../node_modules/@stdlib/constants-int32-max/lib/index.js","../node_modules/@stdlib/assert-has-int32array-support/lib/int32array.js","../node_modules/@stdlib/array-int32/lib/main.js","../node_modules/@stdlib/array-int32/lib/index.js","../node_modules/@stdlib/assert-has-int32array-support/lib/main.js","../node_modules/@stdlib/constants-int32-min/lib/index.js","../node_modules/@stdlib/array-int32/lib/polyfill.js","../node_modules/@stdlib/assert-is-int8array/lib/main.js","../node_modules/@stdlib/constants-int8-max/lib/index.js","../node_modules/@stdlib/assert-has-int8array-support/lib/int8array.js","../node_modules/@stdlib/array-int8/lib/main.js","../node_modules/@stdlib/array-int8/lib/index.js","../node_modules/@stdlib/assert-has-int8array-support/lib/main.js","../node_modules/@stdlib/constants-int8-min/lib/index.js","../node_modules/@stdlib/array-int8/lib/polyfill.js","../node_modules/@stdlib/assert-is-uint16array/lib/main.js","../node_modules/@stdlib/constants-uint16-max/lib/index.js","../node_modules/@stdlib/assert-has-uint16array-support/lib/uint16array.js","../node_modules/@stdlib/array-uint16/lib/main.js","../node_modules/@stdlib/array-uint16/lib/index.js","../node_modules/@stdlib/assert-has-uint16array-support/lib/main.js","../node_modules/@stdlib/array-uint16/lib/polyfill.js","../node_modules/@stdlib/assert-is-uint32array/lib/main.js","../node_modules/@stdlib/constants-uint32-max/lib/index.js","../node_modules/@stdlib/assert-has-uint32array-support/lib/uint32array.js","../node_modules/@stdlib/array-uint32/lib/main.js","../node_modules/@stdlib/array-uint32/lib/index.js","../node_modules/@stdlib/assert-has-uint32array-support/lib/main.js","../node_modules/@stdlib/array-uint32/lib/polyfill.js","../node_modules/@stdlib/assert-is-uint8array/lib/main.js","../node_modules/@stdlib/constants-uint8-max/lib/index.js","../node_modules/@stdlib/assert-has-uint8array-support/lib/uint8array.js","../node_modules/@stdlib/array-uint8/lib/main.js","../node_modules/@stdlib/array-uint8/lib/index.js","../node_modules/@stdlib/assert-has-uint8array-support/lib/main.js","../node_modules/@stdlib/array-uint8/lib/polyfill.js","../node_modules/@stdlib/assert-is-uint8clampedarray/node_modules/@stdlib/assert-has-tostringtag-support/lib/main.js","../node_modules/@stdlib/assert-is-uint8clampedarray/node_modules/@stdlib/utils-native-class/lib/tostring.js","../node_modules/@stdlib/symbol-ctor/lib/main.js","../node_modules/@stdlib/assert-is-uint8clampedarray/node_modules/@stdlib/utils-native-class/lib/tostringtag.js","../node_modules/@stdlib/assert-is-uint8clampedarray/node_modules/@stdlib/utils-native-class/lib/index.js","../node_modules/@stdlib/assert-is-uint8clampedarray/node_modules/@stdlib/utils-native-class/lib/polyfill.js","../node_modules/@stdlib/assert-is-uint8clampedarray/node_modules/@stdlib/utils-native-class/lib/main.js","../node_modules/@stdlib/assert-is-uint8clampedarray/lib/main.js","../node_modules/@stdlib/assert-has-uint8clampedarray-support/lib/uint8clampedarray.js","../node_modules/@stdlib/array-uint8c/lib/main.js","../node_modules/@stdlib/array-uint8c/lib/index.js","../node_modules/@stdlib/assert-has-uint8clampedarray-support/lib/main.js","../node_modules/@stdlib/array-uint8c/lib/polyfill.js","../node_modules/@stdlib/array-ctors/node_modules/@stdlib/math-base-special-floor/lib/main.js","../node_modules/@stdlib/array-ctors/node_modules/@stdlib/math-base-assert-is-integer/lib/main.js","../node_modules/@stdlib/array-ctors/node_modules/@stdlib/assert-is-array-like-object/lib/main.js","../node_modules/@stdlib/array-ctors/node_modules/@stdlib/constants-array-max-array-length/lib/index.js","../node_modules/@stdlib/array-ctors/node_modules/@stdlib/assert-is-collection/lib/main.js","../node_modules/@stdlib/array-ctors/node_modules/@stdlib/constants-array-max-typed-array-length/lib/index.js","../node_modules/@stdlib/array-ctors/node_modules/@stdlib/assert-is-arraybuffer/lib/main.js","../node_modules/@stdlib/assert-is-array/lib/main.js","../node_modules/@stdlib/array-ctors/node_modules/@stdlib/assert-is-object/lib/main.js","../node_modules/@stdlib/assert-is-string/node_modules/@stdlib/utils-define-nonenumerable-read-only-property/lib/main.js","../node_modules/@stdlib/assert-is-string/lib/primitive.js","../node_modules/@stdlib/assert-is-string/lib/valueof.js","../node_modules/@stdlib/assert-is-string/lib/object.js","../node_modules/@stdlib/assert-is-string/lib/try2valueof.js","../node_modules/@stdlib/assert-is-string/lib/main.js","../node_modules/@stdlib/assert-is-string/lib/index.js","../node_modules/@stdlib/array-ctors/node_modules/@stdlib/utils-type-of/lib/fixtures/re.js","../node_modules/@stdlib/assert-is-boolean/node_modules/@stdlib/utils-define-nonenumerable-read-only-property/lib/main.js","../node_modules/@stdlib/assert-is-boolean/lib/primitive.js","../node_modules/@stdlib/boolean-ctor/lib/main.js","../node_modules/@stdlib/assert-is-boolean/lib/tostring.js","../node_modules/@stdlib/assert-is-boolean/lib/object.js","../node_modules/@stdlib/assert-is-boolean/lib/try2serialize.js","../node_modules/@stdlib/assert-is-boolean/lib/main.js","../node_modules/@stdlib/utils-global/node_modules/@stdlib/string-base-format-interpolate/lib/is_number.js","../node_modules/@stdlib/utils-global/node_modules/@stdlib/string-base-format-interpolate/lib/zero_pad.js","../node_modules/@stdlib/assert-is-boolean/lib/index.js","../node_modules/@stdlib/utils-global/node_modules/@stdlib/string-base-format-interpolate/lib/format_integer.js","../node_modules/@stdlib/utils-global/node_modules/@stdlib/string-base-format-interpolate/lib/is_string.js","../node_modules/@stdlib/utils-global/node_modules/@stdlib/string-base-format-interpolate/lib/format_double.js","../node_modules/@stdlib/utils-global/node_modules/@stdlib/string-base-format-interpolate/lib/space_pad.js","../node_modules/@stdlib/utils-global/node_modules/@stdlib/string-base-format-interpolate/lib/main.js","../node_modules/@stdlib/utils-global/node_modules/@stdlib/string-base-format-tokenize/lib/main.js","../node_modules/@stdlib/utils-global/node_modules/@stdlib/string-format/lib/is_string.js","../node_modules/@stdlib/utils-global/node_modules/@stdlib/string-format/lib/main.js","../node_modules/@stdlib/utils-global/lib/codegen.js","../node_modules/@stdlib/utils-global/lib/self.js","../node_modules/@stdlib/utils-global/lib/window.js","../node_modules/@stdlib/utils-global/lib/global.js","../node_modules/@stdlib/utils-global/lib/global_this.js","../node_modules/@stdlib/array-ctors/node_modules/@stdlib/utils-type-of/lib/fixtures/nodelist.js","../node_modules/@stdlib/utils-global/lib/main.js","../node_modules/@stdlib/array-ctors/node_modules/@stdlib/utils-type-of/lib/fixtures/typedarray.js","../node_modules/@stdlib/regexp-function-name/lib/main.js","../node_modules/@stdlib/regexp-function-name/lib/regexp.js","../node_modules/@stdlib/assert-tools-array-function/node_modules/@stdlib/string-base-format-interpolate/lib/is_number.js","../node_modules/@stdlib/assert-tools-array-function/node_modules/@stdlib/string-base-format-interpolate/lib/zero_pad.js","../node_modules/@stdlib/regexp-function-name/node_modules/@stdlib/utils-define-nonenumerable-read-only-property/lib/main.js","../node_modules/@stdlib/regexp-function-name/lib/index.js","../node_modules/@stdlib/assert-tools-array-function/node_modules/@stdlib/string-base-format-interpolate/lib/format_integer.js","../node_modules/@stdlib/assert-tools-array-function/node_modules/@stdlib/string-base-format-interpolate/lib/is_string.js","../node_modules/@stdlib/assert-tools-array-function/node_modules/@stdlib/string-base-format-interpolate/lib/format_double.js","../node_modules/@stdlib/assert-tools-array-function/node_modules/@stdlib/string-base-format-interpolate/lib/space_pad.js","../node_modules/@stdlib/assert-tools-array-function/node_modules/@stdlib/string-base-format-interpolate/lib/main.js","../node_modules/@stdlib/assert-tools-array-function/node_modules/@stdlib/string-base-format-tokenize/lib/main.js","../node_modules/@stdlib/assert-tools-array-function/node_modules/@stdlib/string-format/lib/is_string.js","../node_modules/@stdlib/assert-tools-array-function/node_modules/@stdlib/string-format/lib/main.js","../node_modules/@stdlib/assert-is-object-like/lib/main.js","../node_modules/@stdlib/utils-constructor-name/lib/main.js","../node_modules/@stdlib/assert-is-buffer/lib/main.js","../node_modules/@stdlib/assert-is-object-like/node_modules/@stdlib/utils-define-nonenumerable-read-only-property/lib/main.js","../node_modules/@stdlib/assert-is-object-like/lib/index.js","../node_modules/@stdlib/assert-tools-array-function/lib/main.js","../node_modules/@stdlib/array-ctors/node_modules/@stdlib/utils-type-of/lib/index.js","../node_modules/@stdlib/array-ctors/node_modules/@stdlib/utils-type-of/lib/check.js","../node_modules/@stdlib/array-ctors/node_modules/@stdlib/utils-type-of/lib/polyfill.js","../node_modules/@stdlib/array-ctors/node_modules/@stdlib/utils-type-of/lib/main.js","../node_modules/@stdlib/array-ctors/node_modules/@stdlib/assert-is-function/lib/main.js","../node_modules/@stdlib/array-ctors/node_modules/@stdlib/utils-define-nonenumerable-read-only-property/lib/main.js","../node_modules/@stdlib/array-ctors/node_modules/@stdlib/string-base-format-interpolate/lib/is_number.js","../node_modules/@stdlib/array-ctors/node_modules/@stdlib/string-base-format-interpolate/lib/zero_pad.js","../node_modules/@stdlib/array-ctors/node_modules/@stdlib/string-base-format-interpolate/lib/format_integer.js","../node_modules/@stdlib/array-ctors/node_modules/@stdlib/string-base-format-interpolate/lib/is_string.js","../node_modules/@stdlib/array-ctors/node_modules/@stdlib/string-base-format-interpolate/lib/format_double.js","../node_modules/@stdlib/array-ctors/node_modules/@stdlib/string-base-format-interpolate/lib/space_pad.js","../node_modules/@stdlib/array-ctors/node_modules/@stdlib/string-base-format-interpolate/lib/main.js","../node_modules/@stdlib/array-ctors/node_modules/@stdlib/string-base-format-tokenize/lib/main.js","../node_modules/@stdlib/array-ctors/node_modules/@stdlib/string-format/lib/is_string.js","../node_modules/@stdlib/array-ctors/node_modules/@stdlib/string-format/lib/main.js","../node_modules/@stdlib/array-ctors/node_modules/@stdlib/complex-float64/lib/main.js","../node_modules/@stdlib/array-ctors/node_modules/@stdlib/complex-float64/lib/tostring.js","../node_modules/@stdlib/array-ctors/node_modules/@stdlib/complex-float64/lib/tojson.js","../node_modules/@stdlib/array-ctors/node_modules/@stdlib/number-float64-base-to-float32/lib/main.js","../node_modules/@stdlib/array-ctors/node_modules/@stdlib/number-float64-base-to-float32/lib/polyfill.js","../node_modules/@stdlib/array-ctors/node_modules/@stdlib/number-float64-base-to-float32/lib/index.js","../node_modules/@stdlib/array-ctors/node_modules/@stdlib/complex-float32/lib/main.js","../node_modules/@stdlib/array-ctors/node_modules/@stdlib/assert-is-complex-like/lib/main.js","../node_modules/@stdlib/array-ctors/node_modules/@stdlib/math-base-assert-is-even/lib/main.js","../node_modules/@stdlib/array-ctors/node_modules/@stdlib/complex-float32/lib/tostring.js","../node_modules/@stdlib/array-ctors/node_modules/@stdlib/complex-float32/lib/tojson.js","../node_modules/@stdlib/array-base-assert-is-complex64array/lib/main.js","../node_modules/@stdlib/array-base-assert-is-complex128array/lib/main.js","../node_modules/@stdlib/array-ctors/node_modules/@stdlib/symbol-ctor/lib/main.js","../node_modules/@stdlib/array-ctors/node_modules/@stdlib/assert-has-iterator-symbol-support/lib/main.js","../node_modules/@stdlib/array-ctors/node_modules/@stdlib/symbol-iterator/lib/main.js","../node_modules/@stdlib/array-ctors/node_modules/@stdlib/utils-define-nonenumerable-read-only-accessor/lib/main.js","../node_modules/@stdlib/array-ctors/node_modules/@stdlib/complex-realf/lib/main.js","../node_modules/@stdlib/array-ctors/node_modules/@stdlib/complex-imagf/lib/main.js","../node_modules/@stdlib/strided-base-reinterpret-complex64/lib/main.js","../node_modules/@stdlib/strided-base-reinterpret-complex128/lib/main.js","../node_modules/@stdlib/array-ctors/node_modules/@stdlib/array-base-getter/lib/main.js","../node_modules/@stdlib/array-ctors/node_modules/@stdlib/array-base-accessor-getter/lib/main.js","../node_modules/@stdlib/array-ctors/node_modules/@stdlib/array-complex64/lib/from_iterator.js","../node_modules/@stdlib/array-ctors/node_modules/@stdlib/array-complex64/lib/from_iterator_map.js","../node_modules/@stdlib/array-ctors/node_modules/@stdlib/array-complex64/lib/from_array.js","../node_modules/@stdlib/array-ctors/node_modules/@stdlib/array-complex64/lib/main.js","../node_modules/@stdlib/array-ctors/node_modules/@stdlib/complex-real/lib/main.js","../node_modules/@stdlib/array-ctors/node_modules/@stdlib/complex-imag/lib/main.js","../node_modules/@stdlib/array-ctors/node_modules/@stdlib/array-complex128/lib/from_iterator.js","../node_modules/@stdlib/array-ctors/node_modules/@stdlib/array-complex128/lib/from_iterator_map.js","../node_modules/@stdlib/array-ctors/node_modules/@stdlib/array-complex128/lib/from_array.js","../node_modules/@stdlib/array-ctors/node_modules/@stdlib/array-complex128/lib/main.js","../node_modules/@stdlib/array-ctors/lib/ctors.js","../node_modules/@stdlib/array-ctors/lib/main.js","../node_modules/@stdlib/array-base-zeros/lib/main.js","../node_modules/@stdlib/array-base-filled/lib/main.js","../node_modules/@stdlib/array-defaults/lib/main.js","../node_modules/@stdlib/array-defaults/lib/get.js","../node_modules/@stdlib/array-zeros/node_modules/@stdlib/string-base-format-interpolate/lib/is_number.js","../node_modules/@stdlib/array-zeros/node_modules/@stdlib/string-base-format-interpolate/lib/zero_pad.js","../node_modules/@stdlib/array-defaults/node_modules/@stdlib/utils-define-nonenumerable-read-only-property/lib/main.js","../node_modules/@stdlib/array-defaults/lib/index.js","../node_modules/@stdlib/array-zeros/node_modules/@stdlib/string-base-format-interpolate/lib/format_integer.js","../node_modules/@stdlib/array-zeros/node_modules/@stdlib/string-base-format-interpolate/lib/is_string.js","../node_modules/@stdlib/array-zeros/node_modules/@stdlib/string-base-format-interpolate/lib/format_double.js","../node_modules/@stdlib/array-zeros/node_modules/@stdlib/string-base-format-interpolate/lib/space_pad.js","../node_modules/@stdlib/array-zeros/node_modules/@stdlib/string-base-format-interpolate/lib/main.js","../node_modules/@stdlib/array-zeros/node_modules/@stdlib/string-base-format-tokenize/lib/main.js","../node_modules/@stdlib/array-zeros/node_modules/@stdlib/string-format/lib/is_string.js","../node_modules/@stdlib/array-zeros/node_modules/@stdlib/string-format/lib/main.js","../node_modules/@stdlib/array-zeros/lib/main.js","../lib/polyfill.js"],"sourcesContent":["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Object.defineProperty === 'function' ) ? Object.defineProperty : null;\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Defines (or modifies) an object property.\n*\n* ## Notes\n*\n* - Property descriptors come in two flavors: **data descriptors** and **accessor descriptors**. A data descriptor is a property that has a value, which may or may not be writable. An accessor descriptor is a property described by a getter-setter function pair. A descriptor must be one of these two flavors and cannot be both.\n*\n* @name defineProperty\n* @type {Function}\n* @param {Object} obj - object on which to define the property\n* @param {(string|symbol)} prop - property name\n* @param {Object} descriptor - property descriptor\n* @param {boolean} [descriptor.configurable=false] - boolean indicating if property descriptor can be changed and if the property can be deleted from the provided object\n* @param {boolean} [descriptor.enumerable=false] - boolean indicating if the property shows up when enumerating object properties\n* @param {boolean} [descriptor.writable=false] - boolean indicating if the value associated with the property can be changed with an assignment operator\n* @param {*} [descriptor.value] - property value\n* @param {(Function|void)} [descriptor.get=undefined] - function which serves as a getter for the property, or, if no getter, undefined. When the property is accessed, a getter function is called without arguments and with the `this` context set to the object through which the property is accessed (which may not be the object on which the property is defined due to inheritance). The return value will be used as the property value.\n* @param {(Function|void)} [descriptor.set=undefined] - function which serves as a setter for the property, or, if no setter, undefined. When assigning a property value, a setter function is called with one argument (the value being assigned to the property) and with the `this` context set to the object through which the property is assigned.\n* @throws {TypeError} first argument must be an object\n* @throws {TypeError} third argument must be an object\n* @throws {Error} property descriptor cannot have both a value and a setter and/or getter\n* @returns {Object} object with added property\n*\n* @example\n* var obj = {};\n*\n* defineProperty( obj, 'foo', {\n* 'value': 'bar'\n* });\n*\n* var str = obj.foo;\n* // returns 'bar'\n*/\nvar defineProperty = Object.defineProperty;\n\n\n// EXPORTS //\n\nexport default defineProperty;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Tests if a value is a number primitive.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number primitive\n*\n* @example\n* var bool = isNumber( 3.14 );\n* // returns true\n*\n* @example\n* var bool = isNumber( NaN );\n* // returns true\n*\n* @example\n* var bool = isNumber( new Number( 3.14 ) );\n* // returns false\n*/\nfunction isNumber( value ) {\n\treturn ( typeof value === 'number' ); // NOTE: we inline the `isNumber.isPrimitive` function from `@stdlib/assert/is-number` in order to avoid circular dependencies.\n}\n\n\n// EXPORTS //\n\nexport default isNumber;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// FUNCTIONS //\n\n/**\n* Tests if a string starts with a minus sign (`-`).\n*\n* @private\n* @param {string} str - input string\n* @returns {boolean} boolean indicating if a string starts with a minus sign (`-`)\n*/\nfunction startsWithMinus( str ) {\n\treturn str[ 0 ] === '-';\n}\n\n/**\n* Returns a string of `n` zeros.\n*\n* @private\n* @param {number} n - number of zeros\n* @returns {string} string of zeros\n*/\nfunction zeros( n ) {\n\tvar out = '';\n\tvar i;\n\tfor ( i = 0; i < n; i++ ) {\n\t\tout += '0';\n\t}\n\treturn out;\n}\n\n\n// MAIN //\n\n/**\n* Pads a token with zeros to the specified width.\n*\n* @private\n* @param {string} str - token argument\n* @param {number} width - token width\n* @param {boolean} [right=false] - boolean indicating whether to pad to the right\n* @returns {string} padded token argument\n*/\nfunction zeroPad( str, width, right ) {\n\tvar negative = false;\n\tvar pad = width - str.length;\n\tif ( pad < 0 ) {\n\t\treturn str;\n\t}\n\tif ( startsWithMinus( str ) ) {\n\t\tnegative = true;\n\t\tstr = str.substr( 1 );\n\t}\n\tstr = ( right ) ?\n\t\tstr + zeros( pad ) :\n\t\tzeros( pad ) + str;\n\tif ( negative ) {\n\t\tstr = '-' + str;\n\t}\n\treturn str;\n}\n\n\n// EXPORTS //\n\nexport default zeroPad;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isNumber from './is_number.js';\nimport zeroPad from './zero_pad.js';\n\n// NOTE: for the following, we explicitly avoid using stdlib packages in this particular package in order to avoid circular dependencies.\nvar lowercase = String.prototype.toLowerCase;\nvar uppercase = String.prototype.toUpperCase;\n\n\n// MAIN //\n\n/**\n* Formats a token object argument as an integer.\n*\n* @private\n* @param {Object} token - token object\n* @throws {Error} must provide a valid integer\n* @returns {string} formatted token argument\n*/\nfunction formatInteger( token ) {\n\tvar base;\n\tvar out;\n\tvar i;\n\n\tswitch ( token.specifier ) {\n\tcase 'b':\n\t\t// Case: %b (binary)\n\t\tbase = 2;\n\t\tbreak;\n\tcase 'o':\n\t\t// Case: %o (octal)\n\t\tbase = 8;\n\t\tbreak;\n\tcase 'x':\n\tcase 'X':\n\t\t// Case: %x, %X (hexadecimal)\n\t\tbase = 16;\n\t\tbreak;\n\tcase 'd':\n\tcase 'i':\n\tcase 'u':\n\tdefault:\n\t\t// Case: %d, %i, %u (decimal)\n\t\tbase = 10;\n\t\tbreak;\n\t}\n\tout = token.arg;\n\ti = parseInt( out, 10 );\n\tif ( !isFinite( i ) ) { // NOTE: We use the global `isFinite` function here instead of `@stdlib/math/base/assert/is-finite` in order to avoid circular dependencies.\n\t\tif ( !isNumber( out ) ) {\n\t\t\tthrow new Error( 'invalid integer. Value: ' + out );\n\t\t}\n\t\ti = 0;\n\t}\n\tif ( i < 0 && ( token.specifier === 'u' || base !== 10 ) ) {\n\t\ti = 0xffffffff + i + 1;\n\t}\n\tif ( i < 0 ) {\n\t\tout = ( -i ).toString( base );\n\t\tif ( token.precision ) {\n\t\t\tout = zeroPad( out, token.precision, token.padRight );\n\t\t}\n\t\tout = '-' + out;\n\t} else {\n\t\tout = i.toString( base );\n\t\tif ( !i && !token.precision ) {\n\t\t\tout = '';\n\t\t} else if ( token.precision ) {\n\t\t\tout = zeroPad( out, token.precision, token.padRight );\n\t\t}\n\t\tif ( token.sign ) {\n\t\t\tout = token.sign + out;\n\t\t}\n\t}\n\tif ( base === 16 ) {\n\t\tif ( token.alternate ) {\n\t\t\tout = '0x' + out;\n\t\t}\n\t\tout = ( token.specifier === uppercase.call( token.specifier ) ) ?\n\t\t\tuppercase.call( out ) :\n\t\t\tlowercase.call( out );\n\t}\n\tif ( base === 8 ) {\n\t\tif ( token.alternate && out.charAt( 0 ) !== '0' ) {\n\t\t\tout = '0' + out;\n\t\t}\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default formatInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Tests if a value is a string primitive.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a string primitive\n*\n* @example\n* var bool = isString( 'beep' );\n* // returns true\n*\n* @example\n* var bool = isString( new String( 'beep' ) );\n* // returns false\n*/\nfunction isString( value ) {\n\treturn ( typeof value === 'string' ); // NOTE: we inline the `isString.isPrimitive` function from `@stdlib/assert/is-string` in order to avoid circular dependencies.\n}\n\n\n// EXPORTS //\n\nexport default isString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isNumber from './is_number.js';\n\n// NOTE: for the following, we explicitly avoid using stdlib packages in this particular package in order to avoid circular dependencies.\nvar abs = Math.abs; // eslint-disable-line stdlib/no-builtin-math\nvar lowercase = String.prototype.toLowerCase;\nvar uppercase = String.prototype.toUpperCase;\nvar replace = String.prototype.replace;\n\n\n// VARIABLES //\n\nvar RE_EXP_POS_DIGITS = /e\\+(\\d)$/;\nvar RE_EXP_NEG_DIGITS = /e-(\\d)$/;\nvar RE_ONLY_DIGITS = /^(\\d+)$/;\nvar RE_DIGITS_BEFORE_EXP = /^(\\d+)e/;\nvar RE_TRAILING_PERIOD_ZERO = /\\.0$/;\nvar RE_PERIOD_ZERO_EXP = /\\.0*e/;\nvar RE_ZERO_BEFORE_EXP = /(\\..*[^0])0*e/;\n\n\n// MAIN //\n\n/**\n* Formats a token object argument as a floating-point number.\n*\n* @private\n* @param {Object} token - token object\n* @throws {Error} must provide a valid floating-point number\n* @returns {string} formatted token argument\n*/\nfunction formatDouble( token ) {\n\tvar digits;\n\tvar out;\n\tvar f = parseFloat( token.arg );\n\tif ( !isFinite( f ) ) { // NOTE: We use the global `isFinite` function here instead of `@stdlib/math/base/assert/is-finite` in order to avoid circular dependencies.\n\t\tif ( !isNumber( token.arg ) ) {\n\t\t\tthrow new Error( 'invalid floating-point number. Value: ' + out );\n\t\t}\n\t\t// Case: NaN, Infinity, or -Infinity\n\t\tf = token.arg;\n\t}\n\tswitch ( token.specifier ) {\n\tcase 'e':\n\tcase 'E':\n\t\tout = f.toExponential( token.precision );\n\t\tbreak;\n\tcase 'f':\n\tcase 'F':\n\t\tout = f.toFixed( token.precision );\n\t\tbreak;\n\tcase 'g':\n\tcase 'G':\n\t\tif ( abs( f ) < 0.0001 ) {\n\t\t\tdigits = token.precision;\n\t\t\tif ( digits > 0 ) {\n\t\t\t\tdigits -= 1;\n\t\t\t}\n\t\t\tout = f.toExponential( digits );\n\t\t} else {\n\t\t\tout = f.toPrecision( token.precision );\n\t\t}\n\t\tif ( !token.alternate ) {\n\t\t\tout = replace.call( out, RE_ZERO_BEFORE_EXP, '$1e' );\n\t\t\tout = replace.call( out, RE_PERIOD_ZERO_EXP, 'e');\n\t\t\tout = replace.call( out, RE_TRAILING_PERIOD_ZERO, '' );\n\t\t}\n\t\tbreak;\n\tdefault:\n\t\tthrow new Error( 'invalid double notation. Value: ' + token.specifier );\n\t}\n\tout = replace.call( out, RE_EXP_POS_DIGITS, 'e+0$1' );\n\tout = replace.call( out, RE_EXP_NEG_DIGITS, 'e-0$1' );\n\tif ( token.alternate ) {\n\t\tout = replace.call( out, RE_ONLY_DIGITS, '$1.' );\n\t\tout = replace.call( out, RE_DIGITS_BEFORE_EXP, '$1.e' );\n\t}\n\tif ( f >= 0 && token.sign ) {\n\t\tout = token.sign + out;\n\t}\n\tout = ( token.specifier === uppercase.call( token.specifier ) ) ?\n\t\tuppercase.call( out ) :\n\t\tlowercase.call( out );\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default formatDouble;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// FUNCTIONS //\n\n/**\n* Returns `n` spaces.\n*\n* @private\n* @param {number} n - number of spaces\n* @returns {string} string of spaces\n*/\nfunction spaces( n ) {\n\tvar out = '';\n\tvar i;\n\tfor ( i = 0; i < n; i++ ) {\n\t\tout += ' ';\n\t}\n\treturn out;\n}\n\n\n// MAIN //\n\n/**\n* Pads a token with spaces to the specified width.\n*\n* @private\n* @param {string} str - token argument\n* @param {number} width - token width\n* @param {boolean} [right=false] - boolean indicating whether to pad to the right\n* @returns {string} padded token argument\n*/\nfunction spacePad( str, width, right ) {\n\tvar pad = width - str.length;\n\tif ( pad < 0 ) {\n\t\treturn str;\n\t}\n\tstr = ( right ) ?\n\t\tstr + spaces( pad ) :\n\t\tspaces( pad ) + str;\n\treturn str;\n}\n\n\n// EXPORTS //\n\nexport default spacePad;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport formatInteger from './format_integer.js';\nimport isString from './is_string.js';\nimport formatDouble from './format_double.js';\nimport spacePad from './space_pad.js';\nimport zeroPad from './zero_pad.js';\n\n\n// VARIABLES //\n\nvar fromCharCode = String.fromCharCode;\nvar isnan = isNaN; // NOTE: We use the global `isNaN` function here instead of `@stdlib/math/base/assert/is-nan` to avoid circular dependencies.\nvar isArray = Array.isArray; // NOTE: We use the global `Array.isArray` function here instead of `@stdlib/assert/is-array` to avoid circular dependencies.\n\n\n// FUNCTIONS //\n\n/**\n* Initializes token object with properties of supplied format identifier object or default values if not present.\n*\n* @private\n* @param {Object} token - format identifier object\n* @returns {Object} token object\n*/\nfunction initialize( token ) {\n\tvar out = {};\n\tout.specifier = token.specifier;\n\tout.precision = ( token.precision === void 0 ) ? 1 : token.precision;\n\tout.width = token.width;\n\tout.flags = token.flags || '';\n\tout.mapping = token.mapping;\n\treturn out;\n}\n\n\n// MAIN //\n\n/**\n* Generates string from a token array by interpolating values.\n*\n* @param {Array} tokens - string parts and format identifier objects\n* @param {Array} ...args - variable values\n* @throws {TypeError} first argument must be an array\n* @throws {Error} invalid flags\n* @returns {string} formatted string\n*\n* @example\n* var tokens = [ 'beep ', { 'specifier': 's' } ];\n* var out = formatInterpolate( tokens, 'boop' );\n* // returns 'beep boop'\n*/\nfunction formatInterpolate( tokens ) {\n\tvar hasPeriod;\n\tvar flags;\n\tvar token;\n\tvar flag;\n\tvar num;\n\tvar out;\n\tvar pos;\n\tvar i;\n\tvar j;\n\n\tif ( !isArray( tokens ) ) {\n\t\tthrow new TypeError( 'invalid argument. First argument must be an array. Value: `' + tokens + '`.' );\n\t}\n\tout = '';\n\tpos = 1;\n\tfor ( i = 0; i < tokens.length; i++ ) {\n\t\ttoken = tokens[ i ];\n\t\tif ( isString( token ) ) {\n\t\t\tout += token;\n\t\t} else {\n\t\t\thasPeriod = token.precision !== void 0;\n\t\t\ttoken = initialize( token );\n\t\t\tif ( !token.specifier ) {\n\t\t\t\tthrow new TypeError( 'invalid argument. Token is missing `specifier` property. Index: `'+ i +'`. Value: `' + token + '`.' );\n\t\t\t}\n\t\t\tif ( token.mapping ) {\n\t\t\t\tpos = token.mapping;\n\t\t\t}\n\t\t\tflags = token.flags;\n\t\t\tfor ( j = 0; j < flags.length; j++ ) {\n\t\t\t\tflag = flags.charAt( j );\n\t\t\t\tswitch ( flag ) {\n\t\t\t\tcase ' ':\n\t\t\t\t\ttoken.sign = ' ';\n\t\t\t\t\tbreak;\n\t\t\t\tcase '+':\n\t\t\t\t\ttoken.sign = '+';\n\t\t\t\t\tbreak;\n\t\t\t\tcase '-':\n\t\t\t\t\ttoken.padRight = true;\n\t\t\t\t\ttoken.padZeros = false;\n\t\t\t\t\tbreak;\n\t\t\t\tcase '0':\n\t\t\t\t\ttoken.padZeros = flags.indexOf( '-' ) < 0; // NOTE: We use built-in `Array.prototype.indexOf` here instead of `@stdlib/assert/contains` in order to avoid circular dependencies.\n\t\t\t\t\tbreak;\n\t\t\t\tcase '#':\n\t\t\t\t\ttoken.alternate = true;\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tthrow new Error( 'invalid flag: ' + flag );\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( token.width === '*' ) {\n\t\t\t\ttoken.width = parseInt( arguments[ pos ], 10 );\n\t\t\t\tpos += 1;\n\t\t\t\tif ( isnan( token.width ) ) {\n\t\t\t\t\tthrow new TypeError( 'the argument for * width at position ' + pos + ' is not a number. Value: `' + token.width + '`.' );\n\t\t\t\t}\n\t\t\t\tif ( token.width < 0 ) {\n\t\t\t\t\ttoken.padRight = true;\n\t\t\t\t\ttoken.width = -token.width;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( hasPeriod ) {\n\t\t\t\tif ( token.precision === '*' ) {\n\t\t\t\t\ttoken.precision = parseInt( arguments[ pos ], 10 );\n\t\t\t\t\tpos += 1;\n\t\t\t\t\tif ( isnan( token.precision ) ) {\n\t\t\t\t\t\tthrow new TypeError( 'the argument for * precision at position ' + pos + ' is not a number. Value: `' + token.precision + '`.' );\n\t\t\t\t\t}\n\t\t\t\t\tif ( token.precision < 0 ) {\n\t\t\t\t\t\ttoken.precision = 1;\n\t\t\t\t\t\thasPeriod = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\ttoken.arg = arguments[ pos ];\n\t\t\tswitch ( token.specifier ) {\n\t\t\tcase 'b':\n\t\t\tcase 'o':\n\t\t\tcase 'x':\n\t\t\tcase 'X':\n\t\t\tcase 'd':\n\t\t\tcase 'i':\n\t\t\tcase 'u':\n\t\t\t\t// Case: %b (binary), %o (octal), %x, %X (hexadecimal), %d, %i (decimal), %u (unsigned decimal)\n\t\t\t\tif ( hasPeriod ) {\n\t\t\t\t\ttoken.padZeros = false;\n\t\t\t\t}\n\t\t\t\ttoken.arg = formatInteger( token );\n\t\t\t\tbreak;\n\t\t\tcase 's':\n\t\t\t\t// Case: %s (string)\n\t\t\t\ttoken.maxWidth = ( hasPeriod ) ? token.precision : -1;\n\t\t\t\tbreak;\n\t\t\tcase 'c':\n\t\t\t\t// Case: %c (character)\n\t\t\t\tif ( !isnan( token.arg ) ) {\n\t\t\t\t\tnum = parseInt( token.arg, 10 );\n\t\t\t\t\tif ( num < 0 || num > 127 ) {\n\t\t\t\t\t\tthrow new Error( 'invalid character code. Value: ' + token.arg );\n\t\t\t\t\t}\n\t\t\t\t\ttoken.arg = ( isnan( num ) ) ?\n\t\t\t\t\t\tString( token.arg ) :\n\t\t\t\t\t\tfromCharCode( num );\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'e':\n\t\t\tcase 'E':\n\t\t\tcase 'f':\n\t\t\tcase 'F':\n\t\t\tcase 'g':\n\t\t\tcase 'G':\n\t\t\t\t// Case: %e, %E (scientific notation), %f, %F (decimal floating point), %g, %G (uses the shorter of %e/E or %f/F)\n\t\t\t\tif ( !hasPeriod ) {\n\t\t\t\t\ttoken.precision = 6;\n\t\t\t\t}\n\t\t\t\ttoken.arg = formatDouble( token );\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tthrow new Error( 'invalid specifier: ' + token.specifier );\n\t\t\t}\n\t\t\t// Fit argument into field width...\n\t\t\tif ( token.maxWidth >= 0 && token.arg.length > token.maxWidth ) {\n\t\t\t\ttoken.arg = token.arg.substring( 0, token.maxWidth );\n\t\t\t}\n\t\t\tif ( token.padZeros ) {\n\t\t\t\ttoken.arg = zeroPad( token.arg, token.width || token.precision, token.padRight ); // eslint-disable-line max-len\n\t\t\t} else if ( token.width ) {\n\t\t\t\ttoken.arg = spacePad( token.arg, token.width, token.padRight );\n\t\t\t}\n\t\t\tout += token.arg || '';\n\t\t\tpos += 1;\n\t\t}\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default formatInterpolate;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// VARIABLES //\n\nvar RE = /%(?:([1-9]\\d*)\\$)?([0 +\\-#]*)(\\*|\\d+)?(?:(\\.)(\\*|\\d+)?)?[hlL]?([%A-Za-z])/g;\n\n\n// FUNCTIONS //\n\n/**\n* Parses a delimiter.\n*\n* @private\n* @param {Array} match - regular expression match\n* @returns {Object} delimiter token object\n*/\nfunction parse( match ) {\n\tvar token = {\n\t\t'mapping': ( match[ 1 ] ) ? parseInt( match[ 1 ], 10 ) : void 0,\n\t\t'flags': match[ 2 ],\n\t\t'width': match[ 3 ],\n\t\t'precision': match[ 5 ],\n\t\t'specifier': match[ 6 ]\n\t};\n\tif ( match[ 4 ] === '.' && match[ 5 ] === void 0 ) {\n\t\ttoken.precision = '1';\n\t}\n\treturn token;\n}\n\n\n// MAIN //\n\n/**\n* Tokenizes a string into an array of string parts and format identifier objects.\n*\n* @param {string} str - input string\n* @returns {Array} tokens\n*\n* @example\n* var tokens = formatTokenize( 'Hello %s!' );\n* // returns [ 'Hello ', {...}, '!' ]\n*/\nfunction formatTokenize( str ) {\n\tvar content;\n\tvar tokens;\n\tvar match;\n\tvar prev;\n\n\ttokens = [];\n\tprev = 0;\n\tmatch = RE.exec( str );\n\twhile ( match ) {\n\t\tcontent = str.slice( prev, RE.lastIndex - match[ 0 ].length );\n\t\tif ( content.length ) {\n\t\t\ttokens.push( content );\n\t\t}\n\t\ttokens.push( parse( match ) );\n\t\tprev = RE.lastIndex;\n\t\tmatch = RE.exec( str );\n\t}\n\tcontent = str.slice( prev );\n\tif ( content.length ) {\n\t\ttokens.push( content );\n\t}\n\treturn tokens;\n}\n\n\n// EXPORTS //\n\nexport default formatTokenize;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Tests if a value is a string primitive.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a string primitive\n*\n* @example\n* var bool = isString( 'beep' );\n* // returns true\n*\n* @example\n* var bool = isString( new String( 'beep' ) );\n* // returns false\n*/\nfunction isString( value ) {\n\treturn ( typeof value === 'string' ); // NOTE: we inline the `isString.isPrimitive` function from `@stdlib/assert/is-string` in order to avoid circular dependencies.\n}\n\n\n// EXPORTS //\n\nexport default isString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport interpolate from '@stdlib/string-base-format-interpolate';\nimport tokenize from '@stdlib/string-base-format-tokenize';\nimport isString from './is_string.js';\n\n\n// MAIN //\n\n/**\n* Inserts supplied variable values into a format string.\n*\n* @param {string} str - input string\n* @param {Array} ...args - variable values\n* @throws {TypeError} first argument must be a string\n* @throws {Error} invalid flags\n* @returns {string} formatted string\n*\n* @example\n* var str = format( 'Hello %s!', 'world' );\n* // returns 'Hello world!'\n*\n* @example\n* var str = format( 'Pi: ~%.2f', 3.141592653589793 );\n* // returns 'Pi: ~3.14'\n*/\nfunction format( str ) {\n\tvar args;\n\tvar i;\n\n\tif ( !isString( str ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a string. Value: `%s`.', str ) );\n\t}\n\targs = [ tokenize( str ) ];\n\tfor ( i = 1; i < arguments.length; i++ ) {\n\t\targs.push( arguments[ i ] );\n\t}\n\treturn interpolate.apply( null, args );\n}\n\n\n// EXPORTS //\n\nexport default format;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable no-underscore-dangle, no-proto */\n\n'use strict';\n\n// MODULES //\n\nimport format from '@stdlib/string-format';\n\n\n// VARIABLES //\n\nvar objectProtoype = Object.prototype;\nvar toStr = objectProtoype.toString;\nvar defineGetter = objectProtoype.__defineGetter__;\nvar defineSetter = objectProtoype.__defineSetter__;\nvar lookupGetter = objectProtoype.__lookupGetter__;\nvar lookupSetter = objectProtoype.__lookupSetter__;\n\n\n// MAIN //\n\n/**\n* Defines (or modifies) an object property.\n*\n* ## Notes\n*\n* - Property descriptors come in two flavors: **data descriptors** and **accessor descriptors**. A data descriptor is a property that has a value, which may or may not be writable. An accessor descriptor is a property described by a getter-setter function pair. A descriptor must be one of these two flavors and cannot be both.\n*\n* @param {Object} obj - object on which to define the property\n* @param {string} prop - property name\n* @param {Object} descriptor - property descriptor\n* @param {boolean} [descriptor.configurable=false] - boolean indicating if property descriptor can be changed and if the property can be deleted from the provided object\n* @param {boolean} [descriptor.enumerable=false] - boolean indicating if the property shows up when enumerating object properties\n* @param {boolean} [descriptor.writable=false] - boolean indicating if the value associated with the property can be changed with an assignment operator\n* @param {*} [descriptor.value] - property value\n* @param {(Function|void)} [descriptor.get=undefined] - function which serves as a getter for the property, or, if no getter, undefined. When the property is accessed, a getter function is called without arguments and with the `this` context set to the object through which the property is accessed (which may not be the object on which the property is defined due to inheritance). The return value will be used as the property value.\n* @param {(Function|void)} [descriptor.set=undefined] - function which serves as a setter for the property, or, if no setter, undefined. When assigning a property value, a setter function is called with one argument (the value being assigned to the property) and with the `this` context set to the object through which the property is assigned.\n* @throws {TypeError} first argument must be an object\n* @throws {TypeError} third argument must be an object\n* @throws {Error} property descriptor cannot have both a value and a setter and/or getter\n* @returns {Object} object with added property\n*\n* @example\n* var obj = {};\n*\n* defineProperty( obj, 'foo', {\n* 'value': 'bar'\n* });\n*\n* var str = obj.foo;\n* // returns 'bar'\n*/\nfunction defineProperty( obj, prop, descriptor ) {\n\tvar prototype;\n\tvar hasValue;\n\tvar hasGet;\n\tvar hasSet;\n\n\tif ( typeof obj !== 'object' || obj === null || toStr.call( obj ) === '[object Array]' ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be an object. Value: `%s`.', obj ) );\n\t}\n\tif ( typeof descriptor !== 'object' || descriptor === null || toStr.call( descriptor ) === '[object Array]' ) {\n\t\tthrow new TypeError( format( 'invalid argument. Property descriptor must be an object. Value: `%s`.', descriptor ) );\n\t}\n\thasValue = ( 'value' in descriptor );\n\tif ( hasValue ) {\n\t\tif (\n\t\t\tlookupGetter.call( obj, prop ) ||\n\t\t\tlookupSetter.call( obj, prop )\n\t\t) {\n\t\t\t// Override `__proto__` to avoid touching inherited accessors:\n\t\t\tprototype = obj.__proto__;\n\t\t\tobj.__proto__ = objectProtoype;\n\n\t\t\t// Delete property as existing getters/setters prevent assigning value to specified property:\n\t\t\tdelete obj[ prop ];\n\t\t\tobj[ prop ] = descriptor.value;\n\n\t\t\t// Restore original prototype:\n\t\t\tobj.__proto__ = prototype;\n\t\t} else {\n\t\t\tobj[ prop ] = descriptor.value;\n\t\t}\n\t}\n\thasGet = ( 'get' in descriptor );\n\thasSet = ( 'set' in descriptor );\n\n\tif ( hasValue && ( hasGet || hasSet ) ) {\n\t\tthrow new Error( 'invalid argument. Cannot specify one or more accessors and a value or writable attribute in the property descriptor.' );\n\t}\n\n\tif ( hasGet && defineGetter ) {\n\t\tdefineGetter.call( obj, prop, descriptor.get );\n\t}\n\tif ( hasSet && defineSetter ) {\n\t\tdefineSetter.call( obj, prop, descriptor.set );\n\t}\n\treturn obj;\n}\n\n\n// EXPORTS //\n\nexport default defineProperty;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Define (or modify) an object property.\n*\n* @module @stdlib/utils-define-property\n*\n* @example\n* import defineProperty from '@stdlib/utils-define-property';\n*\n* var obj = {};\n* defineProperty( obj, 'foo', {\n* 'value': 'bar',\n* 'writable': false,\n* 'configurable': false,\n* 'enumerable': false\n* });\n* obj.foo = 'boop'; // => throws\n*/\n\n// MODULES //\n\nimport hasDefinePropertySupport from './has_define_property_support.js';\nimport builtin from './builtin.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar defineProperty;\nif ( hasDefinePropertySupport() ) {\n\tdefineProperty = builtin;\n} else {\n\tdefineProperty = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default defineProperty;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport defineProperty from './define_property.js';\n\n\n// MAIN //\n\n/**\n* Tests for `Object.defineProperty` support.\n*\n* @private\n* @returns {boolean} boolean indicating if an environment has `Object.defineProperty` support\n*\n* @example\n* var bool = hasDefinePropertySupport();\n* // returns \n*/\nfunction hasDefinePropertySupport() {\n\t// Test basic support...\n\ttry {\n\t\tdefineProperty( {}, 'x', {} );\n\t\treturn true;\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\treturn false;\n\t}\n}\n\n\n// EXPORTS //\n\nexport default hasDefinePropertySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport defineProperty from '@stdlib/utils-define-property';\n\n\n// MAIN //\n\n/**\n* Defines a non-enumerable read-only property.\n*\n* @param {Object} obj - object on which to define the property\n* @param {(string|symbol)} prop - property name\n* @param {*} value - value to set\n*\n* @example\n* var obj = {};\n*\n* setNonEnumerableReadOnly( obj, 'foo', 'bar' );\n*\n* try {\n* obj.foo = 'boop';\n* } catch ( err ) {\n* console.error( err.message );\n* }\n*/\nfunction setNonEnumerableReadOnly( obj, prop, value ) {\n\tdefineProperty( obj, prop, {\n\t\t'configurable': false,\n\t\t'enumerable': false,\n\t\t'writable': false,\n\t\t'value': value\n\t});\n}\n\n\n// EXPORTS //\n\nexport default setNonEnumerableReadOnly;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport defineProperty from '@stdlib/utils-define-property';\n\n\n// MAIN //\n\n/**\n* Defines a non-enumerable read-only property.\n*\n* @param {Object} obj - object on which to define the property\n* @param {(string|symbol)} prop - property name\n* @param {*} value - value to set\n*\n* @example\n* var obj = {};\n*\n* setNonEnumerableReadOnly( obj, 'foo', 'bar' );\n*\n* try {\n* obj.foo = 'boop';\n* } catch ( err ) {\n* console.error( err.message );\n* }\n*/\nfunction setNonEnumerableReadOnly( obj, prop, value ) {\n\tdefineProperty( obj, prop, {\n\t\t'configurable': false,\n\t\t'enumerable': false,\n\t\t'writable': false,\n\t\t'value': value\n\t});\n}\n\n\n// EXPORTS //\n\nexport default setNonEnumerableReadOnly;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport defineProperty from '@stdlib/utils-define-property';\n\n\n// MAIN //\n\n/**\n* Defines a non-enumerable read-only property.\n*\n* @param {Object} obj - object on which to define the property\n* @param {(string|symbol)} prop - property name\n* @param {*} value - value to set\n*\n* @example\n* var obj = {};\n*\n* setNonEnumerableReadOnly( obj, 'foo', 'bar' );\n*\n* try {\n* obj.foo = 'boop';\n* } catch ( err ) {\n* console.error( err.message );\n* }\n*/\nfunction setNonEnumerableReadOnly( obj, prop, value ) {\n\tdefineProperty( obj, prop, {\n\t\t'configurable': false,\n\t\t'enumerable': false,\n\t\t'writable': false,\n\t\t'value': value\n\t});\n}\n\n\n// EXPORTS //\n\nexport default setNonEnumerableReadOnly;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Tests if a value is a number primitive.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number primitive\n*\n* @example\n* var bool = isNumber( 3.14 );\n* // returns true\n*\n* @example\n* var bool = isNumber( NaN );\n* // returns true\n*\n* @example\n* var bool = isNumber( new Number( 3.14 ) );\n* // returns false\n*/\nfunction isNumber( value ) {\n\treturn ( typeof value === 'number' );\n}\n\n\n// EXPORTS //\n\nexport default isNumber;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Tests for native `Symbol` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Symbol` support\n*\n* @example\n* var bool = hasSymbolSupport();\n* // returns \n*/\nfunction hasSymbolSupport() {\n\treturn (\n\t\ttypeof Symbol === 'function' &&\n\t\ttypeof Symbol( 'foo' ) === 'symbol'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default hasSymbolSupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport hasSymbols from '@stdlib/assert-has-symbol-support';\n\n\n// VARIABLES //\n\nvar FLG = hasSymbols();\n\n\n// MAIN //\n\n/**\n* Tests for native `toStringTag` support.\n*\n* @returns {boolean} boolean indicating if an environment has `toStringTag` support\n*\n* @example\n* var bool = hasToStringTagSupport();\n* // returns \n*/\nfunction hasToStringTagSupport() {\n\treturn ( FLG && typeof Symbol.toStringTag === 'symbol' );\n}\n\n\n// EXPORTS //\n\nexport default hasToStringTagSupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar toStr = Object.prototype.toString;\n\n\n// EXPORTS //\n\nexport default toStr;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// FUNCTIONS //\n\nvar has = Object.prototype.hasOwnProperty;\n\n\n// MAIN //\n\n/**\n* Tests if an object has a specified property.\n*\n* @param {*} value - value to test\n* @param {*} property - property to test\n* @returns {boolean} boolean indicating if an object has a specified property\n*\n* @example\n* var beep = {\n* 'boop': true\n* };\n*\n* var bool = hasOwnProp( beep, 'boop' );\n* // returns true\n*\n* @example\n* var beep = {\n* 'boop': true\n* };\n*\n* var bool = hasOwnProp( beep, 'bap' );\n* // returns false\n*/\nfunction hasOwnProp( value, property ) {\n\tif (\n\t\tvalue === void 0 ||\n\t\tvalue === null\n\t) {\n\t\treturn false;\n\t}\n\treturn has.call( value, property );\n}\n\n\n// EXPORTS //\n\nexport default hasOwnProp;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar Sym = ( typeof Symbol === 'function' ) ? Symbol : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default Sym;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport Symbol from '@stdlib/symbol-ctor';\n\n\n// MAIN //\n\nvar toStrTag = ( typeof Symbol === 'function' ) ? Symbol.toStringTag : '';\n\n\n// EXPORTS //\n\nexport default toStrTag;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Return a string value indicating a specification defined classification of an object.\n*\n* @module @stdlib/utils-native-class\n*\n* @example\n* import nativeClass from '@stdlib/utils-native-class';\n*\n* var str = nativeClass( 'a' );\n* // returns '[object String]'\n*\n* str = nativeClass( 5 );\n* // returns '[object Number]'\n*\n* function Beep() {\n* return this;\n* }\n* str = nativeClass( new Beep() );\n* // returns '[object Object]'\n*/\n\n// MODULES //\n\nimport hasToStringTag from '@stdlib/assert-has-tostringtag-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar main;\nif ( hasToStringTag() ) {\n\tmain = polyfill;\n} else {\n\tmain = builtin;\n}\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport hasOwnProp from '@stdlib/assert-has-own-property';\nimport toStringTag from './tostringtag.js';\nimport toStr from './tostring.js';\n\n\n// MAIN //\n\n/**\n* Returns a string value indicating a specification defined classification of an object in environments supporting `Symbol.toStringTag`.\n*\n* @param {*} v - input value\n* @returns {string} string value indicating a specification defined classification of the input value\n*\n* @example\n* var str = nativeClass( 'a' );\n* // returns '[object String]'\n*\n* @example\n* var str = nativeClass( 5 );\n* // returns '[object Number]'\n*\n* @example\n* function Beep() {\n* return this;\n* }\n* var str = nativeClass( new Beep() );\n* // returns '[object Object]'\n*/\nfunction nativeClass( v ) {\n\tvar isOwn;\n\tvar tag;\n\tvar out;\n\n\tif ( v === null || v === void 0 ) {\n\t\treturn toStr.call( v );\n\t}\n\ttag = v[ toStringTag ];\n\tisOwn = hasOwnProp( v, toStringTag );\n\n\t// Attempt to override the `toStringTag` property. For built-ins having a `Symbol.toStringTag` property (e.g., `JSON`, `Math`, etc), the `Symbol.toStringTag` property is read-only (e.g., , so we need to wrap in a `try/catch`.\n\ttry {\n\t\tv[ toStringTag ] = void 0;\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\treturn toStr.call( v );\n\t}\n\tout = toStr.call( v );\n\n\tif ( isOwn ) {\n\t\tv[ toStringTag ] = tag;\n\t} else {\n\t\tdelete v[ toStringTag ];\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default nativeClass;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport toStr from './tostring.js';\n\n\n// MAIN //\n\n/**\n* Returns a string value indicating a specification defined classification (via the internal property `[[Class]]`) of an object.\n*\n* @param {*} v - input value\n* @returns {string} string value indicating a specification defined classification of the input value\n*\n* @example\n* var str = nativeClass( 'a' );\n* // returns '[object String]'\n*\n* @example\n* var str = nativeClass( 5 );\n* // returns '[object Number]'\n*\n* @example\n* function Beep() {\n* return this;\n* }\n* var str = nativeClass( new Beep() );\n* // returns '[object Object]'\n*/\nfunction nativeClass( v ) {\n\treturn toStr.call( v );\n}\n\n\n// EXPORTS //\n\nexport default nativeClass;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// EXPORTS //\n\nexport default Number; // eslint-disable-line stdlib/require-globals\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport Number from '@stdlib/number-ctor';\n\n\n// MAIN //\n\n// eslint-disable-next-line stdlib/no-redeclare\nvar toString = Number.prototype.toString; // non-generic\n\n\n// EXPORTS //\n\nexport default toString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport hasToStringTag from '@stdlib/assert-has-tostringtag-support';\nimport nativeClass from '@stdlib/utils-native-class';\nimport Number from '@stdlib/number-ctor';\nimport test from './try2serialize.js';\n\n\n// VARIABLES //\n\nvar FLG = hasToStringTag();\n\n\n// MAIN //\n\n/**\n* Tests if a value is a number object.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number object\n*\n* @example\n* var bool = isNumber( 3.14 );\n* // returns false\n*\n* @example\n* var bool = isNumber( new Number( 3.14 ) );\n* // returns true\n*/\nfunction isNumber( value ) {\n\tif ( typeof value === 'object' ) {\n\t\tif ( value instanceof Number ) {\n\t\t\treturn true;\n\t\t}\n\t\tif ( FLG ) {\n\t\t\treturn test( value );\n\t\t}\n\t\treturn ( nativeClass( value ) === '[object Number]' );\n\t}\n\treturn false;\n}\n\n\n// EXPORTS //\n\nexport default isNumber;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport toString from './tostring.js'; // eslint-disable-line stdlib/no-redeclare\n\n\n// MAIN //\n\n/**\n* Attempts to serialize a value to a string.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value can be serialized\n*/\nfunction test( value ) {\n\ttry {\n\t\ttoString.call( value );\n\t\treturn true;\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\treturn false;\n\t}\n}\n\n\n// EXPORTS //\n\nexport default test;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a number.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a number\n*\n* @example\n* var bool = isNumber( 3.14 );\n* // returns true\n*\n* @example\n* var bool = isNumber( new Number( 3.14 ) );\n* // returns true\n*\n* @example\n* var bool = isNumber( NaN );\n* // returns true\n*\n* @example\n* var bool = isNumber( null );\n* // returns false\n*/\nfunction isNumber( value ) {\n\treturn ( isPrimitive( value ) || isObject( value ) );\n}\n\n\n// EXPORTS //\n\nexport default isNumber;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test if a value is a number.\n*\n* @module @stdlib/assert-is-number\n*\n* @example\n* import isNumber from '@stdlib/assert-is-number';\n*\n* var bool = isNumber( 3.14 );\n* // returns true\n*\n* bool = isNumber( new Number( 3.14 ) );\n* // returns true\n*\n* bool = isNumber( NaN );\n* // returns true\n*\n* bool = isNumber( null );\n* // returns false\n*\n* @example\n* import { isPrimitive as isNumber } from '@stdlib/assert-is-number';\n*\n* var bool = isNumber( 3.14 );\n* // returns true\n*\n* bool = isNumber( NaN );\n* // returns true\n*\n* bool = isNumber( new Number( 3.14 ) );\n* // returns false\n*\n* @example\n* import { isObject as isNumber } from '@stdlib/assert-is-number';\n*\n* var bool = isNumber( 3.14 );\n* // returns false\n*\n* bool = isNumber( new Number( 3.14 ) );\n* // returns true\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'isPrimitive', isPrimitive );\nsetReadOnly( main, 'isObject', isObject );\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Double-precision floating-point positive infinity.\n*\n* @module @stdlib/constants-float64-pinf\n* @type {number}\n*\n* @example\n* import FLOAT64_PINF from '@stdlib/constants-float64-pinf';\n* // returns Infinity\n*/\n\n\n// MAIN //\n\n/**\n* Double-precision floating-point positive infinity.\n*\n* ## Notes\n*\n* Double-precision floating-point positive infinity has the bit sequence\n*\n* ```binarystring\n* 0 11111111111 00000000000000000000 00000000000000000000000000000000\n* ```\n*\n* @constant\n* @type {number}\n* @default Number.POSITIVE_INFINITY\n* @see [IEEE 754]{@link https://en.wikipedia.org/wiki/IEEE_754-1985}\n*/\nvar FLOAT64_PINF = Number.POSITIVE_INFINITY; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default FLOAT64_PINF;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Double-precision floating-point negative infinity.\n*\n* @module @stdlib/constants-float64-ninf\n* @type {number}\n*\n* @example\n* import FLOAT64_NINF from '@stdlib/constants-float64-ninf';\n* // returns -Infinity\n*/\n\n// MODULES //\n\nimport Number from '@stdlib/number-ctor';\n\n\n// MAIN //\n\n/**\n* Double-precision floating-point negative infinity.\n*\n* ## Notes\n*\n* Double-precision floating-point negative infinity has the bit sequence\n*\n* ```binarystring\n* 1 11111111111 00000000000000000000 00000000000000000000000000000000\n* ```\n*\n* @constant\n* @type {number}\n* @default Number.NEGATIVE_INFINITY\n* @see [IEEE 754]{@link https://en.wikipedia.org/wiki/IEEE_754-1985}\n*/\nvar FLOAT64_NINF = Number.NEGATIVE_INFINITY;\n\n\n// EXPORTS //\n\nexport default FLOAT64_NINF;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: implementation (?)\n\n/**\n* Rounds a double-precision floating-point number toward negative infinity.\n*\n* @param {number} x - input value\n* @returns {number} rounded value\n*\n* @example\n* var v = floor( -4.2 );\n* // returns -5.0\n*\n* @example\n* var v = floor( 9.99999 );\n* // returns 9.0\n*\n* @example\n* var v = floor( 0.0 );\n* // returns 0.0\n*\n* @example\n* var v = floor( NaN );\n* // returns NaN\n*/\nvar floor = Math.floor; // eslint-disable-line stdlib/no-builtin-math\n\n\n// EXPORTS //\n\nexport default floor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport PINF from '@stdlib/constants-float64-pinf';\nimport NINF from '@stdlib/constants-float64-ninf';\nimport isInt from '@stdlib/math-base-assert-is-integer';\n\n\n// MAIN //\n\n/**\n* Tests if a number primitive is an integer value.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a number primitive is an integer value\n*/\nfunction isInteger( value ) {\n\treturn (\n\t\tvalue < PINF &&\n\t\tvalue > NINF &&\n\t\tisInt( value )\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport floor from '@stdlib/math-base-special-floor';\n\n\n// MAIN //\n\n/**\n* Tests if a finite double-precision floating-point number is an integer.\n*\n* @param {number} x - value to test\n* @returns {boolean} boolean indicating whether the value is an integer\n*\n* @example\n* var bool = isInteger( 1.0 );\n* // returns true\n*\n* @example\n* var bool = isInteger( 3.14 );\n* // returns false\n*/\nfunction isInteger( x ) {\n\treturn (floor(x) === x);\n}\n\n\n// EXPORTS //\n\nexport default isInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isNumber } from '@stdlib/assert-is-number';\nimport isInt from './integer.js';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a number primitive having an integer value.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number primitive having an integer value\n*\n* @example\n* var bool = isInteger( -3.0 );\n* // returns true\n*\n* @example\n* var bool = isInteger( new Number( -3.0 ) );\n* // returns false\n*/\nfunction isInteger( value ) {\n\treturn (\n\t\tisNumber( value ) &&\n\t\tisInt( value )\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isObject as isNumber } from '@stdlib/assert-is-number';\nimport isInt from './integer.js';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a number object having an integer value.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number object having an integer value\n*\n* @example\n* var bool = isInteger( 3.0 );\n* // returns false\n*\n* @example\n* var bool = isInteger( new Number( 3.0 ) );\n* // returns true\n*/\nfunction isInteger( value ) {\n\treturn (\n\t\tisNumber( value ) &&\n\t\tisInt( value.valueOf() )\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\n/**\n* Tests if a value is an integer.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an integer\n*\n* @example\n* var bool = isInteger( 5.0 );\n* // returns true\n*\n* @example\n* var bool = isInteger( new Number( 5.0 ) );\n* // returns true\n*\n* @example\n* var bool = isInteger( -3.14 );\n* // returns false\n*\n* @example\n* var bool = isInteger( null );\n* // returns false\n*/\nfunction isInteger( value ) {\n\treturn ( isPrimitive( value ) || isObject( value ) );\n}\n\n\n// EXPORTS //\n\nexport default isInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isInteger } from '@stdlib/assert-is-integer';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a number primitive having a nonnegative integer value.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number primitive having a nonnegative integer value\n*\n* @example\n* var bool = isNonNegativeInteger( 3.0 );\n* // returns true\n*\n* @example\n* var bool = isNonNegativeInteger( new Number( 3.0 ) );\n* // returns false\n*/\nfunction isNonNegativeInteger( value ) {\n\treturn (\n\t\tisInteger( value ) &&\n\t\tvalue >= 0\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isNonNegativeInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isObject as isInteger } from '@stdlib/assert-is-integer';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a number object having a nonnegative integer value.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number object having a nonnegative integer value\n*\n* @example\n* var bool = isNonNegativeInteger( 3.0 );\n* // returns false\n*\n* @example\n* var bool = isNonNegativeInteger( new Number( 3.0 ) );\n* // returns true\n*/\nfunction isNonNegativeInteger( value ) {\n\treturn (\n\t\tisInteger( value ) &&\n\t\tvalue.valueOf() >= 0\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isNonNegativeInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a nonnegative integer.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a nonnegative integer\n*\n* @example\n* var bool = isNonNegativeInteger( 5.0 );\n* // returns true\n*\n* @example\n* var bool = isNonNegativeInteger( new Number( 5.0 ) );\n* // returns true\n*\n* @example\n* var bool = isNonNegativeInteger( -5.0 );\n* // returns false\n*\n* @example\n* var bool = isNonNegativeInteger( 3.14 );\n* // returns false\n*\n* @example\n* var bool = isNonNegativeInteger( null );\n* // returns false\n*/\nfunction isNonNegativeInteger( value ) {\n\treturn ( isPrimitive( value ) || isObject( value ) );\n}\n\n\n// EXPORTS //\n\nexport default isNonNegativeInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test if a value is an integer.\n*\n* @module @stdlib/assert-is-integer\n*\n* @example\n* import isInteger from '@stdlib/assert-is-integer';\n*\n* var bool = isInteger( 5.0 );\n* // returns true\n*\n* bool = isInteger( new Number( 5.0 ) );\n* // returns true\n*\n* bool = isInteger( -3.14 );\n* // returns false\n*\n* bool = isInteger( null );\n* // returns false\n*\n* @example\n* // Use interface to check for integer primitives...\n* import { isPrimitive as isInteger } from '@stdlib/assert-is-integer';\n*\n* var bool = isInteger( -3.0 );\n* // returns true\n*\n* bool = isInteger( new Number( -3.0 ) );\n* // returns false\n*\n* @example\n* // Use interface to check for integer objects...\n* import { isObject as isInteger } from '@stdlib/assert-is-integer';\n*\n* var bool = isInteger( 3.0 );\n* // returns false\n*\n* bool = isInteger( new Number( 3.0 ) );\n* // returns true\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'isPrimitive', isPrimitive );\nsetReadOnly( main, 'isObject', isObject );\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test if a value is a nonnegative integer.\n*\n* @module @stdlib/assert-is-nonnegative-integer\n*\n* @example\n* import isNonNegativeInteger from '@stdlib/assert-is-nonnegative-integer';\n*\n* var bool = isNonNegativeInteger( 5.0 );\n* // returns true\n*\n* bool = isNonNegativeInteger( new Number( 5.0 ) );\n* // returns true\n*\n* bool = isNonNegativeInteger( -5.0 );\n* // returns false\n*\n* bool = isNonNegativeInteger( 3.14 );\n* // returns false\n*\n* bool = isNonNegativeInteger( null );\n* // returns false\n*\n* @example\n* import { isPrimitive as isNonNegativeInteger } from '@stdlib/assert-is-nonnegative-integer';\n*\n* var bool = isNonNegativeInteger( 3.0 );\n* // returns true\n*\n* bool = isNonNegativeInteger( new Number( 3.0 ) );\n* // returns false\n*\n* @example\n* import { isObject as isNonNegativeInteger } from '@stdlib/assert-is-nonnegative-integer';\n*\n* var bool = isNonNegativeInteger( 3.0 );\n* // returns false\n*\n* bool = isNonNegativeInteger( new Number( 3.0 ) );\n* // returns true\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'isPrimitive', isPrimitive );\nsetReadOnly( main, 'isObject', isObject );\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasFloat64Array = ( typeof Float64Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Float64Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a Float64Array\n*\n* @example\n* var bool = isFloat64Array( new Float64Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isFloat64Array( [] );\n* // returns false\n*/\nfunction isFloat64Array( value ) {\n\treturn (\n\t\t( hasFloat64Array && value instanceof Float64Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Float64Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isFloat64Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Float64Array === 'function' ) ? Float64Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Float64Array === 'function' ) ? Float64Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of double-precision floating-point numbers in the platform byte order.\n*\n* @module @stdlib/array-float64\n*\n* @example\n* import ctor from '@stdlib/array-float64';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasFloat64ArraySupport from '@stdlib/assert-has-float64array-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasFloat64ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isFloat64Array from '@stdlib/assert-is-float64array';\nimport GlobalFloat64Array from './float64array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Float64Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Float64Array` support\n*\n* @example\n* var bool = hasFloat64ArraySupport();\n* // returns \n*/\nfunction hasFloat64ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalFloat64Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = new GlobalFloat64Array( [ 1.0, 3.14, -3.14, NaN ] );\n\t\tbool = (\n\t\t\tisFloat64Array( arr ) &&\n\t\t\tarr[ 0 ] === 1.0 &&\n\t\t\tarr[ 1 ] === 3.14 &&\n\t\t\tarr[ 2 ] === -3.14 &&\n\t\t\tarr[ 3 ] !== arr[ 3 ]\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasFloat64ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of double-precision floating-point numbers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasFloat32Array = ( typeof Float32Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Float32Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a Float32Array\n*\n* @example\n* var bool = isFloat32Array( new Float32Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isFloat32Array( [] );\n* // returns false\n*/\nfunction isFloat32Array( value ) {\n\treturn (\n\t\t( hasFloat32Array && value instanceof Float32Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Float32Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isFloat32Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Float32Array === 'function' ) ? Float32Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Float32Array === 'function' ) ? Float32Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of single-precision floating-point numbers in the platform byte order.\n*\n* @module @stdlib/array-float32\n*\n* @example\n* import ctor from '@stdlib/array-float32';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasFloat32ArraySupport from '@stdlib/assert-has-float32array-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasFloat32ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isFloat32Array from '@stdlib/assert-is-float32array';\nimport PINF from '@stdlib/constants-float64-pinf';\nimport GlobalFloat32Array from './float32array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Float32Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Float32Array` support\n*\n* @example\n* var bool = hasFloat32ArraySupport();\n* // returns \n*/\nfunction hasFloat32ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalFloat32Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = new GlobalFloat32Array( [ 1.0, 3.14, -3.14, 5.0e40 ] );\n\t\tbool = (\n\t\t\tisFloat32Array( arr ) &&\n\t\t\tarr[ 0 ] === 1.0 &&\n\t\t\tarr[ 1 ] === 3.140000104904175 &&\n\t\t\tarr[ 2 ] === -3.140000104904175 &&\n\t\t\tarr[ 3 ] === PINF\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasFloat32ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of single-precision floating-point numbers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasInt16Array = ( typeof Int16Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is an Int16Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an Int16Array\n*\n* @example\n* var bool = isInt16Array( new Int16Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isInt16Array( [] );\n* // returns false\n*/\nfunction isInt16Array( value ) {\n\treturn (\n\t\t( hasInt16Array && value instanceof Int16Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Int16Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isInt16Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum signed 16-bit integer.\n*\n* @module @stdlib/constants-int16-max\n* @type {integer32}\n*\n* @example\n* import INT16_MAX from '@stdlib/constants-int16-max';\n* // returns 32767\n*/\n\n\n// MAIN //\n\n/**\n* Maximum signed 16-bit integer.\n*\n* ## Notes\n*\n* The number has the value\n*\n* ```tex\n* 2^{15} - 1\n* ```\n*\n* which corresponds to the bit sequence\n*\n* ```binarystring\n* 0111111111111111\n* ```\n*\n* @constant\n* @type {integer32}\n* @default 32767\n*/\nvar INT16_MAX = 32767|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default INT16_MAX;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Int16Array === 'function' ) ? Int16Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Int16Array === 'function' ) ? Int16Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of twos-complement 16-bit signed integers in the platform byte order.\n*\n* @module @stdlib/array-int16\n*\n* @example\n* import ctor from '@stdlib/array-int16';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasInt16ArraySupport from '@stdlib/assert-has-int16array-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasInt16ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isInt16Array from '@stdlib/assert-is-int16array';\nimport INT16_MAX from '@stdlib/constants-int16-max';\nimport INT16_MIN from '@stdlib/constants-int16-min';\nimport GlobalInt16Array from './int16array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Int16Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Int16Array` support\n*\n* @example\n* var bool = hasInt16ArraySupport();\n* // returns \n*/\nfunction hasInt16ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalInt16Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = new GlobalInt16Array( [ 1, 3.14, -3.14, INT16_MAX+1 ] );\n\t\tbool = (\n\t\t\tisInt16Array( arr ) &&\n\t\t\tarr[ 0 ] === 1 &&\n\t\t\tarr[ 1 ] === 3 && // truncation\n\t\t\tarr[ 2 ] === -3 && // truncation\n\t\t\tarr[ 3 ] === INT16_MIN // wrap around\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasInt16ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Minimum signed 16-bit integer.\n*\n* @module @stdlib/constants-int16-min\n* @type {integer32}\n*\n* @example\n* import INT16_MIN from '@stdlib/constants-int16-min';\n* // returns -32768\n*/\n\n\n// MAIN //\n\n/**\n* Minimum signed 16-bit integer.\n*\n* ## Notes\n*\n* The number has the value\n*\n* ```tex\n* -(2^{15})\n* ```\n*\n* which corresponds to the two's complement bit sequence\n*\n* ```binarystring\n* 1000000000000000\n* ```\n*\n* @constant\n* @type {integer32}\n* @default -32768\n*/\nvar INT16_MIN = -32768|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default INT16_MIN;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of twos-complement 16-bit signed integers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasInt32Array = ( typeof Int32Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is an Int32Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an Int32Array\n*\n* @example\n* var bool = isInt32Array( new Int32Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isInt32Array( [] );\n* // returns false\n*/\nfunction isInt32Array( value ) {\n\treturn (\n\t\t( hasInt32Array && value instanceof Int32Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Int32Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isInt32Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum signed 32-bit integer.\n*\n* @module @stdlib/constants-int32-max\n* @type {integer32}\n*\n* @example\n* import INT32_MAX from '@stdlib/constants-int32-max';\n* // returns 2147483647\n*/\n\n\n// MAIN //\n\n/**\n* Maximum signed 32-bit integer.\n*\n* ## Notes\n*\n* The number has the value\n*\n* ```tex\n* 2^{31} - 1\n* ```\n*\n* which corresponds to the bit sequence\n*\n* ```binarystring\n* 01111111111111111111111111111111\n* ```\n*\n* @constant\n* @type {integer32}\n* @default 2147483647\n*/\nvar INT32_MAX = 2147483647|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default INT32_MAX;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Int32Array === 'function' ) ? Int32Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Int32Array === 'function' ) ? Int32Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of twos-complement 32-bit signed integers in the platform byte order.\n*\n* @module @stdlib/array-int32\n*\n* @example\n* import ctor from '@stdlib/array-int32';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasInt32ArraySupport from '@stdlib/assert-has-int32array-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasInt32ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isInt32Array from '@stdlib/assert-is-int32array';\nimport INT32_MAX from '@stdlib/constants-int32-max';\nimport INT32_MIN from '@stdlib/constants-int32-min';\nimport GlobalInt32Array from './int32array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Int32Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Int32Array` support\n*\n* @example\n* var bool = hasInt32ArraySupport();\n* // returns \n*/\nfunction hasInt32ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalInt32Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = new GlobalInt32Array( [ 1, 3.14, -3.14, INT32_MAX+1 ] );\n\t\tbool = (\n\t\t\tisInt32Array( arr ) &&\n\t\t\tarr[ 0 ] === 1 &&\n\t\t\tarr[ 1 ] === 3 && // truncation\n\t\t\tarr[ 2 ] === -3 && // truncation\n\t\t\tarr[ 3 ] === INT32_MIN // wrap around\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasInt32ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Minimum signed 32-bit integer.\n*\n* @module @stdlib/constants-int32-min\n* @type {integer32}\n*\n* @example\n* import INT32_MIN from '@stdlib/constants-int32-min';\n* // returns -2147483648\n*/\n\n\n// MAIN //\n\n/**\n* Minimum signed 32-bit integer.\n*\n* ## Notes\n*\n* The number has the value\n*\n* ```tex\n* -(2^{31})\n* ```\n*\n* which corresponds to the two's complement bit sequence\n*\n* ```binarystring\n* 10000000000000000000000000000000\n* ```\n*\n* @constant\n* @type {integer32}\n* @default -2147483648\n*/\nvar INT32_MIN = -2147483648|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default INT32_MIN;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of twos-complement 32-bit signed integers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasInt8Array = ( typeof Int8Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is an Int8Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an Int8Array\n*\n* @example\n* var bool = isInt8Array( new Int8Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isInt8Array( [] );\n* // returns false\n*/\nfunction isInt8Array( value ) {\n\treturn (\n\t\t( hasInt8Array && value instanceof Int8Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Int8Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isInt8Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum signed 8-bit integer.\n*\n* @module @stdlib/constants-int8-max\n* @type {integer32}\n*\n* @example\n* import INT8_MAX from '@stdlib/constants-int8-max';\n* // returns 127\n*/\n\n\n// MAIN //\n\n/**\n* Maximum signed 8-bit integer.\n*\n* ## Notes\n*\n* The number is given by\n*\n* ```tex\n* 2^{7} - 1\n* ```\n*\n* which corresponds to the bit sequence\n*\n* ```binarystring\n* 01111111\n* ```\n*\n* @constant\n* @type {integer32}\n* @default 127\n*/\nvar INT8_MAX = 127|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default INT8_MAX;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Int8Array === 'function' ) ? Int8Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Int8Array === 'function' ) ? Int8Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of twos-complement 8-bit signed integers in the platform byte order.\n*\n* @module @stdlib/array-int8\n*\n* @example\n* import ctor from '@stdlib/array-int8';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasInt8ArraySupport from '@stdlib/assert-has-int8array-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasInt8ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isInt8Array from '@stdlib/assert-is-int8array';\nimport INT8_MAX from '@stdlib/constants-int8-max';\nimport INT8_MIN from '@stdlib/constants-int8-min';\nimport GlobalInt8Array from './int8array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Int8Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Int8Array` support\n*\n* @example\n* var bool = hasInt8ArraySupport();\n* // returns \n*/\nfunction hasInt8ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalInt8Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = new GlobalInt8Array( [ 1, 3.14, -3.14, INT8_MAX+1 ] );\n\t\tbool = (\n\t\t\tisInt8Array( arr ) &&\n\t\t\tarr[ 0 ] === 1 &&\n\t\t\tarr[ 1 ] === 3 && // truncation\n\t\t\tarr[ 2 ] === -3 && // truncation\n\t\t\tarr[ 3 ] === INT8_MIN // wrap around\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasInt8ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Minimum signed 8-bit integer.\n*\n* @module @stdlib/constants-int8-min\n* @type {integer32}\n*\n* @example\n* import INT8_MIN from '@stdlib/constants-int8-min';\n* // returns -128\n*/\n\n\n// MAIN //\n\n/**\n* Minimum signed 8-bit integer.\n*\n* ## Notes\n*\n* The number is given by\n*\n* ```tex\n* -(2^{7})\n* ```\n*\n* which corresponds to the two's complement bit sequence\n*\n* ```binarystring\n* 10000000\n* ```\n*\n* @constant\n* @type {integer32}\n* @default -128\n*/\nvar INT8_MIN = -128|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default INT8_MIN;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of twos-complement 8-bit signed integers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasUint16Array = ( typeof Uint16Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Uint16Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a Uint16Array\n*\n* @example\n* var bool = isUint16Array( new Uint16Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isUint16Array( [] );\n* // returns false\n*/\nfunction isUint16Array( value ) {\n\treturn (\n\t\t( hasUint16Array && value instanceof Uint16Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Uint16Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isUint16Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum unsigned 16-bit integer.\n*\n* @module @stdlib/constants-uint16-max\n* @type {integer32}\n*\n* @example\n* import UINT16_MAX from '@stdlib/constants-uint16-max';\n* // returns 65535\n*/\n\n\n// MAIN //\n\n/**\n* Maximum unsigned 16-bit integer.\n*\n* ## Notes\n*\n* The number has the value\n*\n* ```tex\n* 2^{16} - 1\n* ```\n*\n* which corresponds to the bit sequence\n*\n* ```binarystring\n* 1111111111111111\n* ```\n*\n* @constant\n* @type {integer32}\n* @default 65535\n*/\nvar UINT16_MAX = 65535|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default UINT16_MAX;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Uint16Array === 'function' ) ? Uint16Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Uint16Array === 'function' ) ? Uint16Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of 16-bit unsigned integers in the platform byte order.\n*\n* @module @stdlib/array-uint16\n*\n* @example\n* import ctor from '@stdlib/array-uint16';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasUint16ArraySupport from '@stdlib/assert-has-uint16array-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasUint16ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isUint16Array from '@stdlib/assert-is-uint16array';\nimport UINT16_MAX from '@stdlib/constants-uint16-max';\nimport GlobalUint16Array from './uint16array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Uint16Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Uint16Array` support\n*\n* @example\n* var bool = hasUint16ArraySupport();\n* // returns \n*/\nfunction hasUint16ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalUint16Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = [ 1, 3.14, -3.14, UINT16_MAX+1, UINT16_MAX+2 ];\n\t\tarr = new GlobalUint16Array( arr );\n\t\tbool = (\n\t\t\tisUint16Array( arr ) &&\n\t\t\tarr[ 0 ] === 1 &&\n\t\t\tarr[ 1 ] === 3 && // truncation\n\t\t\tarr[ 2 ] === UINT16_MAX-2 && // truncation and wrap around\n\t\t\tarr[ 3 ] === 0 && // wrap around\n\t\t\tarr[ 4 ] === 1 // wrap around\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasUint16ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of 16-bit unsigned integers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasUint32Array = ( typeof Uint32Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Uint32Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a Uint32Array\n*\n* @example\n* var bool = isUint32Array( new Uint32Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isUint32Array( [] );\n* // returns false\n*/\nfunction isUint32Array( value ) {\n\treturn (\n\t\t( hasUint32Array && value instanceof Uint32Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Uint32Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isUint32Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum unsigned 32-bit integer.\n*\n* @module @stdlib/constants-uint32-max\n* @type {uinteger32}\n*\n* @example\n* import UINT32_MAX from '@stdlib/constants-uint32-max';\n* // returns 4294967295\n*/\n\n\n// MAIN //\n\n/**\n* Maximum unsigned 32-bit integer.\n*\n* ## Notes\n*\n* The number has the value\n*\n* ```tex\n* 2^{32} - 1\n* ```\n*\n* which corresponds to the bit sequence\n*\n* ```binarystring\n* 11111111111111111111111111111111\n* ```\n*\n* @constant\n* @type {uinteger32}\n* @default 4294967295\n*/\nvar UINT32_MAX = 4294967295;\n\n\n// EXPORTS //\n\nexport default UINT32_MAX;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Uint32Array === 'function' ) ? Uint32Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Uint32Array === 'function' ) ? Uint32Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of 32-bit unsigned integers in the platform byte order.\n*\n* @module @stdlib/array-uint32\n*\n* @example\n* import ctor from '@stdlib/array-uint32';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasUint32ArraySupport from '@stdlib/assert-has-uint32array-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasUint32ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isUint32Array from '@stdlib/assert-is-uint32array';\nimport UINT32_MAX from '@stdlib/constants-uint32-max';\nimport GlobalUint32Array from './uint32array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Uint32Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Uint32Array` support\n*\n* @example\n* var bool = hasUint32ArraySupport();\n* // returns \n*/\nfunction hasUint32ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalUint32Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = [ 1, 3.14, -3.14, UINT32_MAX+1, UINT32_MAX+2 ];\n\t\tarr = new GlobalUint32Array( arr );\n\t\tbool = (\n\t\t\tisUint32Array( arr ) &&\n\t\t\tarr[ 0 ] === 1 &&\n\t\t\tarr[ 1 ] === 3 && // truncation\n\t\t\tarr[ 2 ] === UINT32_MAX-2 && // truncation and wrap around\n\t\t\tarr[ 3 ] === 0 && // wrap around\n\t\t\tarr[ 4 ] === 1 // wrap around\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasUint32ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of 32-bit unsigned integers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasUint8Array = ( typeof Uint8Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Uint8Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a Uint8Array\n*\n* @example\n* var bool = isUint8Array( new Uint8Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isUint8Array( [] );\n* // returns false\n*/\nfunction isUint8Array( value ) {\n\treturn (\n\t\t( hasUint8Array && value instanceof Uint8Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Uint8Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isUint8Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum unsigned 8-bit integer.\n*\n* @module @stdlib/constants-uint8-max\n* @type {integer32}\n*\n* @example\n* import UINT8_MAX from '@stdlib/constants-uint8-max';\n* // returns 255\n*/\n\n\n// MAIN //\n\n/**\n* Maximum unsigned 8-bit integer.\n*\n* ## Notes\n*\n* The number has the value\n*\n* ```tex\n* 2^{8} - 1\n* ```\n*\n* which corresponds to the bit sequence\n*\n* ```binarystring\n* 11111111\n* ```\n*\n* @constant\n* @type {integer32}\n* @default 255\n*/\nvar UINT8_MAX = 255|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default UINT8_MAX;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Uint8Array === 'function' ) ? Uint8Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Uint8Array === 'function' ) ? Uint8Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of 8-bit unsigned integers in the platform byte order.\n*\n* @module @stdlib/array-uint8\n*\n* @example\n* import ctor from '@stdlib/array-uint8';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasUint8ArraySupport from '@stdlib/assert-has-uint8array-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasUint8ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isUint8Array from '@stdlib/assert-is-uint8array';\nimport UINT8_MAX from '@stdlib/constants-uint8-max';\nimport GlobalUint8Array from './uint8array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Uint8Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Uint8Array` support\n*\n* @example\n* var bool = hasUint8ArraySupport();\n* // returns \n*/\nfunction hasUint8ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalUint8Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = [ 1, 3.14, -3.14, UINT8_MAX+1, UINT8_MAX+2 ];\n\t\tarr = new GlobalUint8Array( arr );\n\t\tbool = (\n\t\t\tisUint8Array( arr ) &&\n\t\t\tarr[ 0 ] === 1 &&\n\t\t\tarr[ 1 ] === 3 && // truncation\n\t\t\tarr[ 2 ] === UINT8_MAX-2 && // truncation and wrap around\n\t\t\tarr[ 3 ] === 0 && // wrap around\n\t\t\tarr[ 4 ] === 1 // wrap around\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasUint8ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of 8-bit unsigned integers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport hasSymbols from '@stdlib/assert-has-symbol-support';\n\n\n// VARIABLES //\n\nvar FLG = hasSymbols();\n\n\n// MAIN //\n\n/**\n* Tests for native `toStringTag` support.\n*\n* @returns {boolean} boolean indicating if an environment has `toStringTag` support\n*\n* @example\n* var bool = hasToStringTagSupport();\n* // returns \n*/\nfunction hasToStringTagSupport() {\n\treturn ( FLG && typeof Symbol.toStringTag === 'symbol' );\n}\n\n\n// EXPORTS //\n\nexport default hasToStringTagSupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar toStr = Object.prototype.toString;\n\n\n// EXPORTS //\n\nexport default toStr;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar Sym = ( typeof Symbol === 'function' ) ? Symbol : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default Sym;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport Symbol from '@stdlib/symbol-ctor';\n\n\n// MAIN //\n\nvar toStrTag = ( typeof Symbol === 'function' ) ? Symbol.toStringTag : '';\n\n\n// EXPORTS //\n\nexport default toStrTag;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Return a string value indicating a specification defined classification of an object.\n*\n* @module @stdlib/utils-native-class\n*\n* @example\n* import nativeClass from '@stdlib/utils-native-class';\n*\n* var str = nativeClass( 'a' );\n* // returns '[object String]'\n*\n* str = nativeClass( 5 );\n* // returns '[object Number]'\n*\n* function Beep() {\n* return this;\n* }\n* str = nativeClass( new Beep() );\n* // returns '[object Object]'\n*/\n\n// MODULES //\n\nimport hasToStringTag from '@stdlib/assert-has-tostringtag-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar main;\nif ( hasToStringTag() ) {\n\tmain = polyfill;\n} else {\n\tmain = builtin;\n}\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport hasOwnProp from '@stdlib/assert-has-own-property';\nimport toStringTag from './tostringtag.js';\nimport toStr from './tostring.js';\n\n\n// MAIN //\n\n/**\n* Returns a string value indicating a specification defined classification of an object in environments supporting `Symbol.toStringTag`.\n*\n* @param {*} v - input value\n* @returns {string} string value indicating a specification defined classification of the input value\n*\n* @example\n* var str = nativeClass( 'a' );\n* // returns '[object String]'\n*\n* @example\n* var str = nativeClass( 5 );\n* // returns '[object Number]'\n*\n* @example\n* function Beep() {\n* return this;\n* }\n* var str = nativeClass( new Beep() );\n* // returns '[object Object]'\n*/\nfunction nativeClass( v ) {\n\tvar isOwn;\n\tvar tag;\n\tvar out;\n\n\tif ( v === null || v === void 0 ) {\n\t\treturn toStr.call( v );\n\t}\n\ttag = v[ toStringTag ];\n\tisOwn = hasOwnProp( v, toStringTag );\n\n\t// Attempt to override the `toStringTag` property. For built-ins having a `Symbol.toStringTag` property (e.g., `JSON`, `Math`, etc), the `Symbol.toStringTag` property is read-only (e.g., , so we need to wrap in a `try/catch`.\n\ttry {\n\t\tv[ toStringTag ] = void 0;\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\treturn toStr.call( v );\n\t}\n\tout = toStr.call( v );\n\n\tif ( isOwn ) {\n\t\tv[ toStringTag ] = tag;\n\t} else {\n\t\tdelete v[ toStringTag ];\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default nativeClass;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport toStr from './tostring.js';\n\n\n// MAIN //\n\n/**\n* Returns a string value indicating a specification defined classification (via the internal property `[[Class]]`) of an object.\n*\n* @param {*} v - input value\n* @returns {string} string value indicating a specification defined classification of the input value\n*\n* @example\n* var str = nativeClass( 'a' );\n* // returns '[object String]'\n*\n* @example\n* var str = nativeClass( 5 );\n* // returns '[object Number]'\n*\n* @example\n* function Beep() {\n* return this;\n* }\n* var str = nativeClass( new Beep() );\n* // returns '[object Object]'\n*/\nfunction nativeClass( v ) {\n\treturn toStr.call( v );\n}\n\n\n// EXPORTS //\n\nexport default nativeClass;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasUint8ClampedArray = ( typeof Uint8ClampedArray === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Uint8ClampedArray.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a Uint8ClampedArray\n*\n* @example\n* var bool = isUint8ClampedArray( new Uint8ClampedArray( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isUint8ClampedArray( [] );\n* // returns false\n*/\nfunction isUint8ClampedArray( value ) {\n\treturn (\n\t\t( hasUint8ClampedArray && value instanceof Uint8ClampedArray ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Uint8ClampedArray]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isUint8ClampedArray;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Uint8ClampedArray === 'function' ) ? Uint8ClampedArray : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Uint8ClampedArray === 'function' ) ? Uint8ClampedArray : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of 8-bit unsigned integers in the platform byte order clamped to 0-255.\n*\n* @module @stdlib/array-uint8c\n*\n* @example\n* import ctor from '@stdlib/array-uint8c';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasUint8ClampedArraySupport from '@stdlib/assert-has-uint8clampedarray-support'; // eslint-disable-line id-length\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasUint8ClampedArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isUint8ClampedArray from '@stdlib/assert-is-uint8clampedarray';\nimport GlobalUint8ClampedArray from './uint8clampedarray.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Uint8ClampedArray` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Uint8ClampedArray` support\n*\n* @example\n* var bool = hasUint8ClampedArraySupport();\n* // returns \n*/\nfunction hasUint8ClampedArraySupport() { // eslint-disable-line id-length\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalUint8ClampedArray !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = new GlobalUint8ClampedArray( [ -1, 0, 1, 3.14, 4.99, 255, 256 ] );\n\t\tbool = (\n\t\t\tisUint8ClampedArray( arr ) &&\n\t\t\tarr[ 0 ] === 0 && // clamped\n\t\t\tarr[ 1 ] === 0 &&\n\t\t\tarr[ 2 ] === 1 &&\n\t\t\tarr[ 3 ] === 3 && // round to nearest\n\t\t\tarr[ 4 ] === 5 && // round to nearest\n\t\t\tarr[ 5 ] === 255 &&\n\t\t\tarr[ 6 ] === 255 // clamped\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasUint8ClampedArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of 8-bit unsigned integers in the platform byte order clamped to 0-255.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: implementation (?)\n\n/**\n* Rounds a double-precision floating-point number toward negative infinity.\n*\n* @param {number} x - input value\n* @returns {number} rounded value\n*\n* @example\n* var v = floor( -4.2 );\n* // returns -5.0\n*\n* @example\n* var v = floor( 9.99999 );\n* // returns 9.0\n*\n* @example\n* var v = floor( 0.0 );\n* // returns 0.0\n*\n* @example\n* var v = floor( NaN );\n* // returns NaN\n*/\nvar floor = Math.floor; // eslint-disable-line stdlib/no-builtin-math\n\n\n// EXPORTS //\n\nexport default floor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport floor from '@stdlib/math-base-special-floor';\n\n\n// MAIN //\n\n/**\n* Tests if a finite double-precision floating-point number is an integer.\n*\n* @param {number} x - value to test\n* @returns {boolean} boolean indicating whether the value is an integer\n*\n* @example\n* var bool = isInteger( 1.0 );\n* // returns true\n*\n* @example\n* var bool = isInteger( 3.14 );\n* // returns false\n*/\nfunction isInteger( x ) {\n\treturn (floor(x) === x);\n}\n\n\n// EXPORTS //\n\nexport default isInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isInteger from '@stdlib/math-base-assert-is-integer';\nimport MAX_LENGTH from '@stdlib/constants-array-max-array-length';\n\n\n// MAIN //\n\n/**\n* Tests if a value is an array-like object.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is an array-like object\n*\n* @example\n* var bool = isArrayLikeObject( [] );\n* // returns true\n*\n* @example\n* var bool = isArrayLikeObject( { 'length':10 } );\n* // returns true\n*\n* @example\n* var bool = isArrayLikeObject( 'beep' );\n* // returns false\n*/\nfunction isArrayLikeObject( value ) {\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\ttypeof value.length === 'number' &&\n\t\tisInteger( value.length ) &&\n\t\tvalue.length >= 0 &&\n\t\tvalue.length <= MAX_LENGTH\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isArrayLikeObject;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum length of a generic array.\n*\n* @module @stdlib/constants-array-max-array-length\n*\n* @example\n* import MAX_ARRAY_LENGTH from '@stdlib/constants-array-max-array-length';\n* // returns 4294967295\n*/\n\n// MAIN //\n\n/**\n* Maximum length of a generic array.\n*\n* ```tex\n* 2^{32} - 1\n* ```\n*\n* @constant\n* @type {uinteger32}\n* @default 4294967295\n*/\nvar MAX_ARRAY_LENGTH = 4294967295>>>0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default MAX_ARRAY_LENGTH;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isInteger from '@stdlib/math-base-assert-is-integer';\nimport MAX_LENGTH from '@stdlib/constants-array-max-typed-array-length';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a collection.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether a value is a collection\n*\n* @example\n* var bool = isCollection( [] );\n* // returns true\n*\n* @example\n* var bool = isCollection( {} );\n* // returns false\n*/\nfunction isCollection( value ) {\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\ttypeof value.length === 'number' &&\n\t\tisInteger( value.length ) &&\n\t\tvalue.length >= 0 &&\n\t\tvalue.length <= MAX_LENGTH\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isCollection;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum length of a typed array.\n*\n* @module @stdlib/constants-array-max-typed-array-length\n*\n* @example\n* import MAX_TYPED_ARRAY_LENGTH from '@stdlib/constants-array-max-typed-array-length';\n* // returns 9007199254740991\n*/\n\n// MAIN //\n\n/**\n* Maximum length of a typed array.\n*\n* ```tex\n* 2^{53} - 1\n* ```\n*\n* @constant\n* @type {number}\n* @default 9007199254740991\n*/\nvar MAX_TYPED_ARRAY_LENGTH = 9007199254740991;\n\n\n// EXPORTS //\n\nexport default MAX_TYPED_ARRAY_LENGTH;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasArrayBuffer = ( typeof ArrayBuffer === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is an ArrayBuffer.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an ArrayBuffer\n*\n* @example\n* import ArrayBuffer from '@stdlib/array-buffer';\n*\n* var bool = isArrayBuffer( new ArrayBuffer( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isArrayBuffer( [] );\n* // returns false\n*/\nfunction isArrayBuffer( value ) {\n\treturn (\n\t\t( hasArrayBuffer && value instanceof ArrayBuffer ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object ArrayBuffer]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isArrayBuffer;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar f;\n\n\n// FUNCTIONS //\n\n/**\n* Tests if a value is an array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an array\n*\n* @example\n* var bool = isArray( [] );\n* // returns true\n*\n* @example\n* var bool = isArray( {} );\n* // returns false\n*/\nfunction isArray( value ) {\n\treturn ( nativeClass( value ) === '[object Array]' );\n}\n\n\n// MAIN //\n\nif ( Array.isArray ) {\n\tf = Array.isArray;\n} else {\n\tf = isArray;\n}\n\n\n// EXPORTS //\n\nexport default f;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isArray from '@stdlib/assert-is-array';\n\n\n// MAIN //\n\n/**\n* Tests if a value is an object; e.g., `{}`.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an object\n*\n* @example\n* var bool = isObject( {} );\n* // returns true\n*\n* @example\n* var bool = isObject( null );\n* // returns false\n*/\nfunction isObject( value ) {\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\t!isArray( value )\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isObject;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport defineProperty from '@stdlib/utils-define-property';\n\n\n// MAIN //\n\n/**\n* Defines a non-enumerable read-only property.\n*\n* @param {Object} obj - object on which to define the property\n* @param {(string|symbol)} prop - property name\n* @param {*} value - value to set\n*\n* @example\n* var obj = {};\n*\n* setNonEnumerableReadOnly( obj, 'foo', 'bar' );\n*\n* try {\n* obj.foo = 'boop';\n* } catch ( err ) {\n* console.error( err.message );\n* }\n*/\nfunction setNonEnumerableReadOnly( obj, prop, value ) {\n\tdefineProperty( obj, prop, {\n\t\t'configurable': false,\n\t\t'enumerable': false,\n\t\t'writable': false,\n\t\t'value': value\n\t});\n}\n\n\n// EXPORTS //\n\nexport default setNonEnumerableReadOnly;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Tests if a value is a string primitive.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a string primitive\n*\n* @example\n* var bool = isString( 'beep' );\n* // returns true\n*\n* @example\n* var bool = isString( new String( 'beep' ) );\n* // returns false\n*/\nfunction isString( value ) {\n\treturn ( typeof value === 'string' );\n}\n\n\n// EXPORTS //\n\nexport default isString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// eslint-disable-next-line stdlib/no-redeclare\nvar valueOf = String.prototype.valueOf; // non-generic\n\n\n// EXPORTS //\n\nexport default valueOf;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport hasToStringTag from '@stdlib/assert-has-tostringtag-support';\nimport nativeClass from '@stdlib/utils-native-class';\nimport test from './try2valueof.js';\n\n\n// VARIABLES //\n\nvar FLG = hasToStringTag();\n\n\n// MAIN //\n\n/**\n* Tests if a value is a string object.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a string object\n*\n* @example\n* var bool = isString( new String( 'beep' ) );\n* // returns true\n*\n* @example\n* var bool = isString( 'beep' );\n* // returns false\n*/\nfunction isString( value ) {\n\tif ( typeof value === 'object' ) {\n\t\tif ( value instanceof String ) {\n\t\t\treturn true;\n\t\t}\n\t\tif ( FLG ) {\n\t\t\treturn test( value );\n\t\t}\n\t\treturn ( nativeClass( value ) === '[object String]' );\n\t}\n\treturn false;\n}\n\n\n// EXPORTS //\n\nexport default isString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport valueOf from './valueof.js'; // eslint-disable-line stdlib/no-redeclare\n\n\n// MAIN //\n\n/**\n* Attempts to extract a string value.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a string can be extracted\n*/\nfunction test( value ) {\n\ttry {\n\t\tvalueOf.call( value );\n\t\treturn true;\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\treturn false;\n\t}\n}\n\n\n// EXPORTS //\n\nexport default test;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a string.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a string\n*\n* @example\n* var bool = isString( new String( 'beep' ) );\n* // returns true\n*\n* @example\n* var bool = isString( 'beep' );\n* // returns true\n*/\nfunction isString( value ) {\n\treturn ( isPrimitive( value ) || isObject( value ) );\n}\n\n\n// EXPORTS //\n\nexport default isString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test if a value is a string.\n*\n* @module @stdlib/assert-is-string\n*\n* @example\n* import isString from '@stdlib/assert-is-string';\n*\n* var bool = isString( 'beep' );\n* // returns true\n*\n* bool = isString( new String( 'beep' ) );\n* // returns true\n*\n* bool = isString( 5 );\n* // returns false\n*\n* @example\n* import { isObject as isString } from '@stdlib/assert-is-string';\n*\n* var bool = isString( new String( 'beep' ) );\n* // returns true\n*\n* bool = isString( 'beep' );\n* // returns false\n*\n* @example\n* import { isPrimitive as isString } from '@stdlib/assert-is-string';\n*\n* var bool = isString( 'beep' );\n* // returns true\n*\n* bool = isString( new String( 'beep' ) );\n* // returns false\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'isPrimitive', isPrimitive );\nsetReadOnly( main, 'isObject', isObject );\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\nvar RE = /./;\n\n\n// EXPORTS //\n\nexport default RE;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport defineProperty from '@stdlib/utils-define-property';\n\n\n// MAIN //\n\n/**\n* Defines a non-enumerable read-only property.\n*\n* @param {Object} obj - object on which to define the property\n* @param {(string|symbol)} prop - property name\n* @param {*} value - value to set\n*\n* @example\n* var obj = {};\n*\n* setNonEnumerableReadOnly( obj, 'foo', 'bar' );\n*\n* try {\n* obj.foo = 'boop';\n* } catch ( err ) {\n* console.error( err.message );\n* }\n*/\nfunction setNonEnumerableReadOnly( obj, prop, value ) {\n\tdefineProperty( obj, prop, {\n\t\t'configurable': false,\n\t\t'enumerable': false,\n\t\t'writable': false,\n\t\t'value': value\n\t});\n}\n\n\n// EXPORTS //\n\nexport default setNonEnumerableReadOnly;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Tests if a value is a boolean primitive.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a boolean primitive\n*\n* @example\n* var bool = isBoolean( true );\n* // returns true\n*\n* @example\n* var bool = isBoolean( false );\n* // returns true\n*\n* @example\n* import Boolean from '@stdlib/boolean-ctor';\n*\n* var bool = isBoolean( new Boolean( true ) );\n* // returns false\n*/\nfunction isBoolean( value ) {\n\treturn ( typeof value === 'boolean' );\n}\n\n\n// EXPORTS //\n\nexport default isBoolean;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Returns a boolean.\n*\n* @name Boolean\n* @constructor\n* @type {Function}\n* @param {*} value - input value\n* @returns {(boolean|Boolean)} boolean\n*\n* @example\n* var b = Boolean( null );\n* // returns false\n*\n* b = Boolean( [] );\n* // returns true\n*\n* b = Boolean( {} );\n* // returns true\n*\n* @example\n* var b = new Boolean( false );\n* // returns \n*/\nvar Bool = Boolean; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default Bool;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// eslint-disable-next-line stdlib/no-redeclare\nvar toString = Boolean.prototype.toString; // non-generic\n\n\n// EXPORTS //\n\nexport default toString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport hasToStringTag from '@stdlib/assert-has-tostringtag-support';\nimport nativeClass from '@stdlib/utils-native-class';\nimport Boolean from '@stdlib/boolean-ctor';\nimport test from './try2serialize.js';\n\n\n// VARIABLES //\n\nvar FLG = hasToStringTag();\n\n\n// MAIN //\n\n/**\n* Tests if a value is a boolean object.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a boolean object\n*\n* @example\n* var bool = isBoolean( true );\n* // returns false\n*\n* @example\n* import Boolean from '@stdlib/boolean-ctor';\n*\n* var bool = isBoolean( new Boolean( false ) );\n* // returns true\n*/\nfunction isBoolean( value ) {\n\tif ( typeof value === 'object' ) {\n\t\tif ( value instanceof Boolean ) {\n\t\t\treturn true;\n\t\t}\n\t\tif ( FLG ) {\n\t\t\treturn test( value );\n\t\t}\n\t\treturn ( nativeClass( value ) === '[object Boolean]' );\n\t}\n\treturn false;\n}\n\n\n// EXPORTS //\n\nexport default isBoolean;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport toString from './tostring.js'; // eslint-disable-line stdlib/no-redeclare\n\n\n// MAIN //\n\n/**\n* Attempts to serialize a value to a string.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value can be serialized\n*/\nfunction test( value ) {\n\ttry {\n\t\ttoString.call( value );\n\t\treturn true;\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\treturn false;\n\t}\n}\n\n\n// EXPORTS //\n\nexport default test;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a boolean.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a boolean\n*\n* @example\n* var bool = isBoolean( false );\n* // returns true\n*\n* @example\n* var bool = isBoolean( true );\n* // returns true\n*\n* @example\n* import Boolean from '@stdlib/boolean-ctor';\n*\n* var bool = isBoolean( new Boolean( false ) );\n* // returns true\n*\n* @example\n* import Boolean from '@stdlib/boolean-ctor';\n*\n* var bool = isBoolean( new Boolean( true ) );\n* // returns true\n*/\nfunction isBoolean( value ) {\n\treturn ( isPrimitive( value ) || isObject( value ) );\n}\n\n\n// EXPORTS //\n\nexport default isBoolean;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Tests if a value is a number primitive.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number primitive\n*\n* @example\n* var bool = isNumber( 3.14 );\n* // returns true\n*\n* @example\n* var bool = isNumber( NaN );\n* // returns true\n*\n* @example\n* var bool = isNumber( new Number( 3.14 ) );\n* // returns false\n*/\nfunction isNumber( value ) {\n\treturn ( typeof value === 'number' ); // NOTE: we inline the `isNumber.isPrimitive` function from `@stdlib/assert/is-number` in order to avoid circular dependencies.\n}\n\n\n// EXPORTS //\n\nexport default isNumber;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// FUNCTIONS //\n\n/**\n* Tests if a string starts with a minus sign (`-`).\n*\n* @private\n* @param {string} str - input string\n* @returns {boolean} boolean indicating if a string starts with a minus sign (`-`)\n*/\nfunction startsWithMinus( str ) {\n\treturn str[ 0 ] === '-';\n}\n\n/**\n* Returns a string of `n` zeros.\n*\n* @private\n* @param {number} n - number of zeros\n* @returns {string} string of zeros\n*/\nfunction zeros( n ) {\n\tvar out = '';\n\tvar i;\n\tfor ( i = 0; i < n; i++ ) {\n\t\tout += '0';\n\t}\n\treturn out;\n}\n\n\n// MAIN //\n\n/**\n* Pads a token with zeros to the specified width.\n*\n* @private\n* @param {string} str - token argument\n* @param {number} width - token width\n* @param {boolean} [right=false] - boolean indicating whether to pad to the right\n* @returns {string} padded token argument\n*/\nfunction zeroPad( str, width, right ) {\n\tvar negative = false;\n\tvar pad = width - str.length;\n\tif ( pad < 0 ) {\n\t\treturn str;\n\t}\n\tif ( startsWithMinus( str ) ) {\n\t\tnegative = true;\n\t\tstr = str.substr( 1 );\n\t}\n\tstr = ( right ) ?\n\t\tstr + zeros( pad ) :\n\t\tzeros( pad ) + str;\n\tif ( negative ) {\n\t\tstr = '-' + str;\n\t}\n\treturn str;\n}\n\n\n// EXPORTS //\n\nexport default zeroPad;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test if a value is a boolean.\n*\n* @module @stdlib/assert-is-boolean\n*\n* @example\n* import Boolean from '@stdlib/boolean-ctor';\n* import isBoolean from '@stdlib/assert-is-boolean';\n*\n* var bool = isBoolean( false );\n* // returns true\n*\n* bool = isBoolean( new Boolean( false ) );\n* // returns true\n*\n* @example\n* import Boolean from '@stdlib/boolean-ctor';\n* import { isPrimitive as isBoolean } from '@stdlib/assert-is-boolean';\n*\n* var bool = isBoolean( false );\n* // returns true\n*\n* bool = isBoolean( new Boolean( true ) );\n* // returns false\n*\n* @example\n* import Boolean from '@stdlib/boolean-ctor';\n* import { isObject as isBoolean } from '@stdlib/assert-is-boolean';\n*\n* var bool = isBoolean( true );\n* // returns false\n*\n* bool = isBoolean( new Boolean( false ) );\n* // returns true\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'isPrimitive', isPrimitive );\nsetReadOnly( main, 'isObject', isObject );\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isNumber from './is_number.js';\nimport zeroPad from './zero_pad.js';\n\n// NOTE: for the following, we explicitly avoid using stdlib packages in this particular package in order to avoid circular dependencies.\nvar lowercase = String.prototype.toLowerCase;\nvar uppercase = String.prototype.toUpperCase;\n\n\n// MAIN //\n\n/**\n* Formats a token object argument as an integer.\n*\n* @private\n* @param {Object} token - token object\n* @throws {Error} must provide a valid integer\n* @returns {string} formatted token argument\n*/\nfunction formatInteger( token ) {\n\tvar base;\n\tvar out;\n\tvar i;\n\n\tswitch ( token.specifier ) {\n\tcase 'b':\n\t\t// Case: %b (binary)\n\t\tbase = 2;\n\t\tbreak;\n\tcase 'o':\n\t\t// Case: %o (octal)\n\t\tbase = 8;\n\t\tbreak;\n\tcase 'x':\n\tcase 'X':\n\t\t// Case: %x, %X (hexadecimal)\n\t\tbase = 16;\n\t\tbreak;\n\tcase 'd':\n\tcase 'i':\n\tcase 'u':\n\tdefault:\n\t\t// Case: %d, %i, %u (decimal)\n\t\tbase = 10;\n\t\tbreak;\n\t}\n\tout = token.arg;\n\ti = parseInt( out, 10 );\n\tif ( !isFinite( i ) ) { // NOTE: We use the global `isFinite` function here instead of `@stdlib/math/base/assert/is-finite` in order to avoid circular dependencies.\n\t\tif ( !isNumber( out ) ) {\n\t\t\tthrow new Error( 'invalid integer. Value: ' + out );\n\t\t}\n\t\ti = 0;\n\t}\n\tif ( i < 0 && ( token.specifier === 'u' || base !== 10 ) ) {\n\t\ti = 0xffffffff + i + 1;\n\t}\n\tif ( i < 0 ) {\n\t\tout = ( -i ).toString( base );\n\t\tif ( token.precision ) {\n\t\t\tout = zeroPad( out, token.precision, token.padRight );\n\t\t}\n\t\tout = '-' + out;\n\t} else {\n\t\tout = i.toString( base );\n\t\tif ( !i && !token.precision ) {\n\t\t\tout = '';\n\t\t} else if ( token.precision ) {\n\t\t\tout = zeroPad( out, token.precision, token.padRight );\n\t\t}\n\t\tif ( token.sign ) {\n\t\t\tout = token.sign + out;\n\t\t}\n\t}\n\tif ( base === 16 ) {\n\t\tif ( token.alternate ) {\n\t\t\tout = '0x' + out;\n\t\t}\n\t\tout = ( token.specifier === uppercase.call( token.specifier ) ) ?\n\t\t\tuppercase.call( out ) :\n\t\t\tlowercase.call( out );\n\t}\n\tif ( base === 8 ) {\n\t\tif ( token.alternate && out.charAt( 0 ) !== '0' ) {\n\t\t\tout = '0' + out;\n\t\t}\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default formatInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Tests if a value is a string primitive.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a string primitive\n*\n* @example\n* var bool = isString( 'beep' );\n* // returns true\n*\n* @example\n* var bool = isString( new String( 'beep' ) );\n* // returns false\n*/\nfunction isString( value ) {\n\treturn ( typeof value === 'string' ); // NOTE: we inline the `isString.isPrimitive` function from `@stdlib/assert/is-string` in order to avoid circular dependencies.\n}\n\n\n// EXPORTS //\n\nexport default isString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isNumber from './is_number.js';\n\n// NOTE: for the following, we explicitly avoid using stdlib packages in this particular package in order to avoid circular dependencies.\nvar abs = Math.abs; // eslint-disable-line stdlib/no-builtin-math\nvar lowercase = String.prototype.toLowerCase;\nvar uppercase = String.prototype.toUpperCase;\nvar replace = String.prototype.replace;\n\n\n// VARIABLES //\n\nvar RE_EXP_POS_DIGITS = /e\\+(\\d)$/;\nvar RE_EXP_NEG_DIGITS = /e-(\\d)$/;\nvar RE_ONLY_DIGITS = /^(\\d+)$/;\nvar RE_DIGITS_BEFORE_EXP = /^(\\d+)e/;\nvar RE_TRAILING_PERIOD_ZERO = /\\.0$/;\nvar RE_PERIOD_ZERO_EXP = /\\.0*e/;\nvar RE_ZERO_BEFORE_EXP = /(\\..*[^0])0*e/;\n\n\n// MAIN //\n\n/**\n* Formats a token object argument as a floating-point number.\n*\n* @private\n* @param {Object} token - token object\n* @throws {Error} must provide a valid floating-point number\n* @returns {string} formatted token argument\n*/\nfunction formatDouble( token ) {\n\tvar digits;\n\tvar out;\n\tvar f = parseFloat( token.arg );\n\tif ( !isFinite( f ) ) { // NOTE: We use the global `isFinite` function here instead of `@stdlib/math/base/assert/is-finite` in order to avoid circular dependencies.\n\t\tif ( !isNumber( token.arg ) ) {\n\t\t\tthrow new Error( 'invalid floating-point number. Value: ' + out );\n\t\t}\n\t\t// Case: NaN, Infinity, or -Infinity\n\t\tf = token.arg;\n\t}\n\tswitch ( token.specifier ) {\n\tcase 'e':\n\tcase 'E':\n\t\tout = f.toExponential( token.precision );\n\t\tbreak;\n\tcase 'f':\n\tcase 'F':\n\t\tout = f.toFixed( token.precision );\n\t\tbreak;\n\tcase 'g':\n\tcase 'G':\n\t\tif ( abs( f ) < 0.0001 ) {\n\t\t\tdigits = token.precision;\n\t\t\tif ( digits > 0 ) {\n\t\t\t\tdigits -= 1;\n\t\t\t}\n\t\t\tout = f.toExponential( digits );\n\t\t} else {\n\t\t\tout = f.toPrecision( token.precision );\n\t\t}\n\t\tif ( !token.alternate ) {\n\t\t\tout = replace.call( out, RE_ZERO_BEFORE_EXP, '$1e' );\n\t\t\tout = replace.call( out, RE_PERIOD_ZERO_EXP, 'e');\n\t\t\tout = replace.call( out, RE_TRAILING_PERIOD_ZERO, '' );\n\t\t}\n\t\tbreak;\n\tdefault:\n\t\tthrow new Error( 'invalid double notation. Value: ' + token.specifier );\n\t}\n\tout = replace.call( out, RE_EXP_POS_DIGITS, 'e+0$1' );\n\tout = replace.call( out, RE_EXP_NEG_DIGITS, 'e-0$1' );\n\tif ( token.alternate ) {\n\t\tout = replace.call( out, RE_ONLY_DIGITS, '$1.' );\n\t\tout = replace.call( out, RE_DIGITS_BEFORE_EXP, '$1.e' );\n\t}\n\tif ( f >= 0 && token.sign ) {\n\t\tout = token.sign + out;\n\t}\n\tout = ( token.specifier === uppercase.call( token.specifier ) ) ?\n\t\tuppercase.call( out ) :\n\t\tlowercase.call( out );\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default formatDouble;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// FUNCTIONS //\n\n/**\n* Returns `n` spaces.\n*\n* @private\n* @param {number} n - number of spaces\n* @returns {string} string of spaces\n*/\nfunction spaces( n ) {\n\tvar out = '';\n\tvar i;\n\tfor ( i = 0; i < n; i++ ) {\n\t\tout += ' ';\n\t}\n\treturn out;\n}\n\n\n// MAIN //\n\n/**\n* Pads a token with spaces to the specified width.\n*\n* @private\n* @param {string} str - token argument\n* @param {number} width - token width\n* @param {boolean} [right=false] - boolean indicating whether to pad to the right\n* @returns {string} padded token argument\n*/\nfunction spacePad( str, width, right ) {\n\tvar pad = width - str.length;\n\tif ( pad < 0 ) {\n\t\treturn str;\n\t}\n\tstr = ( right ) ?\n\t\tstr + spaces( pad ) :\n\t\tspaces( pad ) + str;\n\treturn str;\n}\n\n\n// EXPORTS //\n\nexport default spacePad;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport formatInteger from './format_integer.js';\nimport isString from './is_string.js';\nimport formatDouble from './format_double.js';\nimport spacePad from './space_pad.js';\nimport zeroPad from './zero_pad.js';\n\n\n// VARIABLES //\n\nvar fromCharCode = String.fromCharCode;\nvar isnan = isNaN; // NOTE: We use the global `isNaN` function here instead of `@stdlib/math/base/assert/is-nan` to avoid circular dependencies.\nvar isArray = Array.isArray; // NOTE: We use the global `Array.isArray` function here instead of `@stdlib/assert/is-array` to avoid circular dependencies.\n\n\n// FUNCTIONS //\n\n/**\n* Initializes token object with properties of supplied format identifier object or default values if not present.\n*\n* @private\n* @param {Object} token - format identifier object\n* @returns {Object} token object\n*/\nfunction initialize( token ) {\n\tvar out = {};\n\tout.specifier = token.specifier;\n\tout.precision = ( token.precision === void 0 ) ? 1 : token.precision;\n\tout.width = token.width;\n\tout.flags = token.flags || '';\n\tout.mapping = token.mapping;\n\treturn out;\n}\n\n\n// MAIN //\n\n/**\n* Generates string from a token array by interpolating values.\n*\n* @param {Array} tokens - string parts and format identifier objects\n* @param {Array} ...args - variable values\n* @throws {TypeError} first argument must be an array\n* @throws {Error} invalid flags\n* @returns {string} formatted string\n*\n* @example\n* var tokens = [ 'beep ', { 'specifier': 's' } ];\n* var out = formatInterpolate( tokens, 'boop' );\n* // returns 'beep boop'\n*/\nfunction formatInterpolate( tokens ) {\n\tvar hasPeriod;\n\tvar flags;\n\tvar token;\n\tvar flag;\n\tvar num;\n\tvar out;\n\tvar pos;\n\tvar i;\n\tvar j;\n\n\tif ( !isArray( tokens ) ) {\n\t\tthrow new TypeError( 'invalid argument. First argument must be an array. Value: `' + tokens + '`.' );\n\t}\n\tout = '';\n\tpos = 1;\n\tfor ( i = 0; i < tokens.length; i++ ) {\n\t\ttoken = tokens[ i ];\n\t\tif ( isString( token ) ) {\n\t\t\tout += token;\n\t\t} else {\n\t\t\thasPeriod = token.precision !== void 0;\n\t\t\ttoken = initialize( token );\n\t\t\tif ( !token.specifier ) {\n\t\t\t\tthrow new TypeError( 'invalid argument. Token is missing `specifier` property. Index: `'+ i +'`. Value: `' + token + '`.' );\n\t\t\t}\n\t\t\tif ( token.mapping ) {\n\t\t\t\tpos = token.mapping;\n\t\t\t}\n\t\t\tflags = token.flags;\n\t\t\tfor ( j = 0; j < flags.length; j++ ) {\n\t\t\t\tflag = flags.charAt( j );\n\t\t\t\tswitch ( flag ) {\n\t\t\t\tcase ' ':\n\t\t\t\t\ttoken.sign = ' ';\n\t\t\t\t\tbreak;\n\t\t\t\tcase '+':\n\t\t\t\t\ttoken.sign = '+';\n\t\t\t\t\tbreak;\n\t\t\t\tcase '-':\n\t\t\t\t\ttoken.padRight = true;\n\t\t\t\t\ttoken.padZeros = false;\n\t\t\t\t\tbreak;\n\t\t\t\tcase '0':\n\t\t\t\t\ttoken.padZeros = flags.indexOf( '-' ) < 0; // NOTE: We use built-in `Array.prototype.indexOf` here instead of `@stdlib/assert/contains` in order to avoid circular dependencies.\n\t\t\t\t\tbreak;\n\t\t\t\tcase '#':\n\t\t\t\t\ttoken.alternate = true;\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tthrow new Error( 'invalid flag: ' + flag );\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( token.width === '*' ) {\n\t\t\t\ttoken.width = parseInt( arguments[ pos ], 10 );\n\t\t\t\tpos += 1;\n\t\t\t\tif ( isnan( token.width ) ) {\n\t\t\t\t\tthrow new TypeError( 'the argument for * width at position ' + pos + ' is not a number. Value: `' + token.width + '`.' );\n\t\t\t\t}\n\t\t\t\tif ( token.width < 0 ) {\n\t\t\t\t\ttoken.padRight = true;\n\t\t\t\t\ttoken.width = -token.width;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( hasPeriod ) {\n\t\t\t\tif ( token.precision === '*' ) {\n\t\t\t\t\ttoken.precision = parseInt( arguments[ pos ], 10 );\n\t\t\t\t\tpos += 1;\n\t\t\t\t\tif ( isnan( token.precision ) ) {\n\t\t\t\t\t\tthrow new TypeError( 'the argument for * precision at position ' + pos + ' is not a number. Value: `' + token.precision + '`.' );\n\t\t\t\t\t}\n\t\t\t\t\tif ( token.precision < 0 ) {\n\t\t\t\t\t\ttoken.precision = 1;\n\t\t\t\t\t\thasPeriod = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\ttoken.arg = arguments[ pos ];\n\t\t\tswitch ( token.specifier ) {\n\t\t\tcase 'b':\n\t\t\tcase 'o':\n\t\t\tcase 'x':\n\t\t\tcase 'X':\n\t\t\tcase 'd':\n\t\t\tcase 'i':\n\t\t\tcase 'u':\n\t\t\t\t// Case: %b (binary), %o (octal), %x, %X (hexadecimal), %d, %i (decimal), %u (unsigned decimal)\n\t\t\t\tif ( hasPeriod ) {\n\t\t\t\t\ttoken.padZeros = false;\n\t\t\t\t}\n\t\t\t\ttoken.arg = formatInteger( token );\n\t\t\t\tbreak;\n\t\t\tcase 's':\n\t\t\t\t// Case: %s (string)\n\t\t\t\ttoken.maxWidth = ( hasPeriod ) ? token.precision : -1;\n\t\t\t\tbreak;\n\t\t\tcase 'c':\n\t\t\t\t// Case: %c (character)\n\t\t\t\tif ( !isnan( token.arg ) ) {\n\t\t\t\t\tnum = parseInt( token.arg, 10 );\n\t\t\t\t\tif ( num < 0 || num > 127 ) {\n\t\t\t\t\t\tthrow new Error( 'invalid character code. Value: ' + token.arg );\n\t\t\t\t\t}\n\t\t\t\t\ttoken.arg = ( isnan( num ) ) ?\n\t\t\t\t\t\tString( token.arg ) :\n\t\t\t\t\t\tfromCharCode( num );\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'e':\n\t\t\tcase 'E':\n\t\t\tcase 'f':\n\t\t\tcase 'F':\n\t\t\tcase 'g':\n\t\t\tcase 'G':\n\t\t\t\t// Case: %e, %E (scientific notation), %f, %F (decimal floating point), %g, %G (uses the shorter of %e/E or %f/F)\n\t\t\t\tif ( !hasPeriod ) {\n\t\t\t\t\ttoken.precision = 6;\n\t\t\t\t}\n\t\t\t\ttoken.arg = formatDouble( token );\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tthrow new Error( 'invalid specifier: ' + token.specifier );\n\t\t\t}\n\t\t\t// Fit argument into field width...\n\t\t\tif ( token.maxWidth >= 0 && token.arg.length > token.maxWidth ) {\n\t\t\t\ttoken.arg = token.arg.substring( 0, token.maxWidth );\n\t\t\t}\n\t\t\tif ( token.padZeros ) {\n\t\t\t\ttoken.arg = zeroPad( token.arg, token.width || token.precision, token.padRight ); // eslint-disable-line max-len\n\t\t\t} else if ( token.width ) {\n\t\t\t\ttoken.arg = spacePad( token.arg, token.width, token.padRight );\n\t\t\t}\n\t\t\tout += token.arg || '';\n\t\t\tpos += 1;\n\t\t}\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default formatInterpolate;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// VARIABLES //\n\nvar RE = /%(?:([1-9]\\d*)\\$)?([0 +\\-#]*)(\\*|\\d+)?(?:(\\.)(\\*|\\d+)?)?[hlL]?([%A-Za-z])/g;\n\n\n// FUNCTIONS //\n\n/**\n* Parses a delimiter.\n*\n* @private\n* @param {Array} match - regular expression match\n* @returns {Object} delimiter token object\n*/\nfunction parse( match ) {\n\tvar token = {\n\t\t'mapping': ( match[ 1 ] ) ? parseInt( match[ 1 ], 10 ) : void 0,\n\t\t'flags': match[ 2 ],\n\t\t'width': match[ 3 ],\n\t\t'precision': match[ 5 ],\n\t\t'specifier': match[ 6 ]\n\t};\n\tif ( match[ 4 ] === '.' && match[ 5 ] === void 0 ) {\n\t\ttoken.precision = '1';\n\t}\n\treturn token;\n}\n\n\n// MAIN //\n\n/**\n* Tokenizes a string into an array of string parts and format identifier objects.\n*\n* @param {string} str - input string\n* @returns {Array} tokens\n*\n* @example\n* var tokens = formatTokenize( 'Hello %s!' );\n* // returns [ 'Hello ', {...}, '!' ]\n*/\nfunction formatTokenize( str ) {\n\tvar content;\n\tvar tokens;\n\tvar match;\n\tvar prev;\n\n\ttokens = [];\n\tprev = 0;\n\tmatch = RE.exec( str );\n\twhile ( match ) {\n\t\tcontent = str.slice( prev, RE.lastIndex - match[ 0 ].length );\n\t\tif ( content.length ) {\n\t\t\ttokens.push( content );\n\t\t}\n\t\ttokens.push( parse( match ) );\n\t\tprev = RE.lastIndex;\n\t\tmatch = RE.exec( str );\n\t}\n\tcontent = str.slice( prev );\n\tif ( content.length ) {\n\t\ttokens.push( content );\n\t}\n\treturn tokens;\n}\n\n\n// EXPORTS //\n\nexport default formatTokenize;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Tests if a value is a string primitive.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a string primitive\n*\n* @example\n* var bool = isString( 'beep' );\n* // returns true\n*\n* @example\n* var bool = isString( new String( 'beep' ) );\n* // returns false\n*/\nfunction isString( value ) {\n\treturn ( typeof value === 'string' ); // NOTE: we inline the `isString.isPrimitive` function from `@stdlib/assert/is-string` in order to avoid circular dependencies.\n}\n\n\n// EXPORTS //\n\nexport default isString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport interpolate from '@stdlib/string-base-format-interpolate';\nimport tokenize from '@stdlib/string-base-format-tokenize';\nimport isString from './is_string.js';\n\n\n// MAIN //\n\n/**\n* Inserts supplied variable values into a format string.\n*\n* @param {string} str - input string\n* @param {Array} ...args - variable values\n* @throws {TypeError} first argument must be a string\n* @throws {Error} invalid flags\n* @returns {string} formatted string\n*\n* @example\n* var str = format( 'Hello %s!', 'world' );\n* // returns 'Hello world!'\n*\n* @example\n* var str = format( 'Pi: ~%.2f', 3.141592653589793 );\n* // returns 'Pi: ~3.14'\n*/\nfunction format( str ) {\n\tvar args;\n\tvar i;\n\n\tif ( !isString( str ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a string. Value: `%s`.', str ) );\n\t}\n\targs = [ tokenize( str ) ];\n\tfor ( i = 1; i < arguments.length; i++ ) {\n\t\targs.push( arguments[ i ] );\n\t}\n\treturn interpolate.apply( null, args );\n}\n\n\n// EXPORTS //\n\nexport default format;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Returns the global object using code generation.\n*\n* @private\n* @returns {Object} global object\n*/\nfunction getGlobal() {\n\treturn new Function( 'return this;' )(); // eslint-disable-line no-new-func, stdlib/require-globals\n}\n\n\n// EXPORTS //\n\nexport default getGlobal;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar obj = ( typeof self === 'object' ) ? self : null;\n\n\n// EXPORTS //\n\nexport default obj;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar obj = ( typeof window === 'object' ) ? window : null;\n\n\n// EXPORTS //\n\nexport default obj;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar obj = ( typeof global === 'object' ) ? global : null;\n\n\n// EXPORTS //\n\nexport default obj;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar obj = ( typeof globalThis === 'object' ) ? globalThis : null; // eslint-disable-line no-undef\n\n\n// EXPORTS //\n\nexport default obj;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport getGlobal from '@stdlib/utils-global';\n\n\n// MAIN //\n\nvar root = getGlobal();\nvar nodeList = root.document && root.document.childNodes;\n\n\n// EXPORTS //\n\nexport default nodeList;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isBoolean } from '@stdlib/assert-is-boolean';\nimport format from '@stdlib/string-format';\nimport getThis from './codegen.js';\nimport Self from './self.js';\nimport Win from './window.js';\nimport Global from './global.js';\nimport GlobalThis from './global_this.js';\n\n\n// MAIN //\n\n/**\n* Returns the global object.\n*\n* ## Notes\n*\n* - Using code generation is the **most** reliable way to resolve the global object; however, doing so is likely to violate content security policies (CSPs) in, e.g., Chrome Apps and elsewhere.\n*\n* @param {boolean} [codegen=false] - boolean indicating whether to use code generation to resolve the global object\n* @throws {TypeError} must provide a boolean\n* @throws {Error} unable to resolve global object\n* @returns {Object} global object\n*\n* @example\n* var g = getGlobal();\n* // returns {...}\n*/\nfunction getGlobal( codegen ) {\n\tif ( arguments.length ) {\n\t\tif ( !isBoolean( codegen ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Must provide a boolean. Value: `%s`.', codegen ) );\n\t\t}\n\t\tif ( codegen ) {\n\t\t\treturn getThis();\n\t\t}\n\t\t// Fall through...\n\t}\n\t// Case: 2020 revision of ECMAScript standard\n\tif ( GlobalThis ) {\n\t\treturn GlobalThis;\n\t}\n\t// Case: browsers and web workers\n\tif ( Self ) {\n\t\treturn Self;\n\t}\n\t// Case: browsers\n\tif ( Win ) {\n\t\treturn Win;\n\t}\n\t// Case: Node.js\n\tif ( Global ) {\n\t\treturn Global;\n\t}\n\t// Case: unknown\n\tthrow new Error( 'unexpected error. Unable to resolve global object.' );\n}\n\n\n// EXPORTS //\n\nexport default getGlobal;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\nvar typedarray = Int8Array; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default typedarray;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Returns a regular expression to capture everything that is not a space immediately after the `function` keyword and before the first left parenthesis.\n*\n* @returns {RegExp} regular expression\n*\n* @example\n* var RE_FUNCTION_NAME = reFunctionName();\n*\n* function fname( fcn ) {\n* return RE_FUNCTION_NAME.exec( fcn.toString() )[ 1 ];\n* }\n*\n* var fn = fname( Math.sqrt );\n* // returns 'sqrt'\n*\n* fn = fname( Int8Array );\n* // returns 'Int8Array'\n*\n* fn = fname( Object.prototype.toString );\n* // returns 'toString'\n*\n* fn = fname( function(){} );\n* // returns ''\n*/\nfunction reFunctionName() {\n\treturn /^\\s*function\\s*([^(]*)/i;\n}\n\n\n// EXPORTS //\n\nexport default reFunctionName;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport reFunctionName from './main.js';\n\n\n// MAIN //\n\n/**\n* Captures everything that is not a space immediately after the `function` keyword and before the first left parenthesis.\n*\n* Regular expression: `/^\\s*function\\s*([^(]*)/i`\n*\n* - `/^\\s*`\n* - Match zero or more spaces at beginning\n*\n* - `function`\n* - Match the word `function`\n*\n* - `\\s*`\n* - Match zero or more spaces after the word `function`\n*\n* - `()`\n* - Capture\n*\n* - `[^(]*`\n* - Match anything except a left parenthesis `(` zero or more times\n*\n* - `/i`\n* - ignore case\n*\n* @constant\n* @type {RegExp}\n* @default /^\\s*function\\s*([^(]*)/i\n*/\nvar RE_FUNCTION_NAME = reFunctionName();\n\n\n// EXPORTS //\n\nexport default RE_FUNCTION_NAME;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Tests if a value is a number primitive.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number primitive\n*\n* @example\n* var bool = isNumber( 3.14 );\n* // returns true\n*\n* @example\n* var bool = isNumber( NaN );\n* // returns true\n*\n* @example\n* var bool = isNumber( new Number( 3.14 ) );\n* // returns false\n*/\nfunction isNumber( value ) {\n\treturn ( typeof value === 'number' ); // NOTE: we inline the `isNumber.isPrimitive` function from `@stdlib/assert/is-number` in order to avoid circular dependencies.\n}\n\n\n// EXPORTS //\n\nexport default isNumber;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// FUNCTIONS //\n\n/**\n* Tests if a string starts with a minus sign (`-`).\n*\n* @private\n* @param {string} str - input string\n* @returns {boolean} boolean indicating if a string starts with a minus sign (`-`)\n*/\nfunction startsWithMinus( str ) {\n\treturn str[ 0 ] === '-';\n}\n\n/**\n* Returns a string of `n` zeros.\n*\n* @private\n* @param {number} n - number of zeros\n* @returns {string} string of zeros\n*/\nfunction zeros( n ) {\n\tvar out = '';\n\tvar i;\n\tfor ( i = 0; i < n; i++ ) {\n\t\tout += '0';\n\t}\n\treturn out;\n}\n\n\n// MAIN //\n\n/**\n* Pads a token with zeros to the specified width.\n*\n* @private\n* @param {string} str - token argument\n* @param {number} width - token width\n* @param {boolean} [right=false] - boolean indicating whether to pad to the right\n* @returns {string} padded token argument\n*/\nfunction zeroPad( str, width, right ) {\n\tvar negative = false;\n\tvar pad = width - str.length;\n\tif ( pad < 0 ) {\n\t\treturn str;\n\t}\n\tif ( startsWithMinus( str ) ) {\n\t\tnegative = true;\n\t\tstr = str.substr( 1 );\n\t}\n\tstr = ( right ) ?\n\t\tstr + zeros( pad ) :\n\t\tzeros( pad ) + str;\n\tif ( negative ) {\n\t\tstr = '-' + str;\n\t}\n\treturn str;\n}\n\n\n// EXPORTS //\n\nexport default zeroPad;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport defineProperty from '@stdlib/utils-define-property';\n\n\n// MAIN //\n\n/**\n* Defines a non-enumerable read-only property.\n*\n* @param {Object} obj - object on which to define the property\n* @param {(string|symbol)} prop - property name\n* @param {*} value - value to set\n*\n* @example\n* var obj = {};\n*\n* setNonEnumerableReadOnly( obj, 'foo', 'bar' );\n*\n* try {\n* obj.foo = 'boop';\n* } catch ( err ) {\n* console.error( err.message );\n* }\n*/\nfunction setNonEnumerableReadOnly( obj, prop, value ) {\n\tdefineProperty( obj, prop, {\n\t\t'configurable': false,\n\t\t'enumerable': false,\n\t\t'writable': false,\n\t\t'value': value\n\t});\n}\n\n\n// EXPORTS //\n\nexport default setNonEnumerableReadOnly;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Regular expression to capture everything that is not a space immediately after the `function` keyword and before the first left parenthesis.\n*\n* @module @stdlib/regexp-function-name\n*\n* @example\n* import reFunctionName from '@stdlib/regexp-function-name';\n* var RE_FUNCTION_NAME = reFunctionName();\n*\n* function fname( fcn ) {\n* return RE_FUNCTION_NAME.exec( fcn.toString() )[ 1 ];\n* }\n*\n* var fn = fname( Math.sqrt );\n* // returns 'sqrt'\n*\n* fn = fname( Int8Array );\n* // returns 'Int8Array'\n*\n* fn = fname( Object.prototype.toString );\n* // returns 'toString'\n*\n* fn = fname( function(){} );\n* // returns ''\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport REGEXP from './regexp.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'REGEXP', REGEXP );\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isNumber from './is_number.js';\nimport zeroPad from './zero_pad.js';\n\n// NOTE: for the following, we explicitly avoid using stdlib packages in this particular package in order to avoid circular dependencies.\nvar lowercase = String.prototype.toLowerCase;\nvar uppercase = String.prototype.toUpperCase;\n\n\n// MAIN //\n\n/**\n* Formats a token object argument as an integer.\n*\n* @private\n* @param {Object} token - token object\n* @throws {Error} must provide a valid integer\n* @returns {string} formatted token argument\n*/\nfunction formatInteger( token ) {\n\tvar base;\n\tvar out;\n\tvar i;\n\n\tswitch ( token.specifier ) {\n\tcase 'b':\n\t\t// Case: %b (binary)\n\t\tbase = 2;\n\t\tbreak;\n\tcase 'o':\n\t\t// Case: %o (octal)\n\t\tbase = 8;\n\t\tbreak;\n\tcase 'x':\n\tcase 'X':\n\t\t// Case: %x, %X (hexadecimal)\n\t\tbase = 16;\n\t\tbreak;\n\tcase 'd':\n\tcase 'i':\n\tcase 'u':\n\tdefault:\n\t\t// Case: %d, %i, %u (decimal)\n\t\tbase = 10;\n\t\tbreak;\n\t}\n\tout = token.arg;\n\ti = parseInt( out, 10 );\n\tif ( !isFinite( i ) ) { // NOTE: We use the global `isFinite` function here instead of `@stdlib/math/base/assert/is-finite` in order to avoid circular dependencies.\n\t\tif ( !isNumber( out ) ) {\n\t\t\tthrow new Error( 'invalid integer. Value: ' + out );\n\t\t}\n\t\ti = 0;\n\t}\n\tif ( i < 0 && ( token.specifier === 'u' || base !== 10 ) ) {\n\t\ti = 0xffffffff + i + 1;\n\t}\n\tif ( i < 0 ) {\n\t\tout = ( -i ).toString( base );\n\t\tif ( token.precision ) {\n\t\t\tout = zeroPad( out, token.precision, token.padRight );\n\t\t}\n\t\tout = '-' + out;\n\t} else {\n\t\tout = i.toString( base );\n\t\tif ( !i && !token.precision ) {\n\t\t\tout = '';\n\t\t} else if ( token.precision ) {\n\t\t\tout = zeroPad( out, token.precision, token.padRight );\n\t\t}\n\t\tif ( token.sign ) {\n\t\t\tout = token.sign + out;\n\t\t}\n\t}\n\tif ( base === 16 ) {\n\t\tif ( token.alternate ) {\n\t\t\tout = '0x' + out;\n\t\t}\n\t\tout = ( token.specifier === uppercase.call( token.specifier ) ) ?\n\t\t\tuppercase.call( out ) :\n\t\t\tlowercase.call( out );\n\t}\n\tif ( base === 8 ) {\n\t\tif ( token.alternate && out.charAt( 0 ) !== '0' ) {\n\t\t\tout = '0' + out;\n\t\t}\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default formatInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Tests if a value is a string primitive.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a string primitive\n*\n* @example\n* var bool = isString( 'beep' );\n* // returns true\n*\n* @example\n* var bool = isString( new String( 'beep' ) );\n* // returns false\n*/\nfunction isString( value ) {\n\treturn ( typeof value === 'string' ); // NOTE: we inline the `isString.isPrimitive` function from `@stdlib/assert/is-string` in order to avoid circular dependencies.\n}\n\n\n// EXPORTS //\n\nexport default isString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isNumber from './is_number.js';\n\n// NOTE: for the following, we explicitly avoid using stdlib packages in this particular package in order to avoid circular dependencies.\nvar abs = Math.abs; // eslint-disable-line stdlib/no-builtin-math\nvar lowercase = String.prototype.toLowerCase;\nvar uppercase = String.prototype.toUpperCase;\nvar replace = String.prototype.replace;\n\n\n// VARIABLES //\n\nvar RE_EXP_POS_DIGITS = /e\\+(\\d)$/;\nvar RE_EXP_NEG_DIGITS = /e-(\\d)$/;\nvar RE_ONLY_DIGITS = /^(\\d+)$/;\nvar RE_DIGITS_BEFORE_EXP = /^(\\d+)e/;\nvar RE_TRAILING_PERIOD_ZERO = /\\.0$/;\nvar RE_PERIOD_ZERO_EXP = /\\.0*e/;\nvar RE_ZERO_BEFORE_EXP = /(\\..*[^0])0*e/;\n\n\n// MAIN //\n\n/**\n* Formats a token object argument as a floating-point number.\n*\n* @private\n* @param {Object} token - token object\n* @throws {Error} must provide a valid floating-point number\n* @returns {string} formatted token argument\n*/\nfunction formatDouble( token ) {\n\tvar digits;\n\tvar out;\n\tvar f = parseFloat( token.arg );\n\tif ( !isFinite( f ) ) { // NOTE: We use the global `isFinite` function here instead of `@stdlib/math/base/assert/is-finite` in order to avoid circular dependencies.\n\t\tif ( !isNumber( token.arg ) ) {\n\t\t\tthrow new Error( 'invalid floating-point number. Value: ' + out );\n\t\t}\n\t\t// Case: NaN, Infinity, or -Infinity\n\t\tf = token.arg;\n\t}\n\tswitch ( token.specifier ) {\n\tcase 'e':\n\tcase 'E':\n\t\tout = f.toExponential( token.precision );\n\t\tbreak;\n\tcase 'f':\n\tcase 'F':\n\t\tout = f.toFixed( token.precision );\n\t\tbreak;\n\tcase 'g':\n\tcase 'G':\n\t\tif ( abs( f ) < 0.0001 ) {\n\t\t\tdigits = token.precision;\n\t\t\tif ( digits > 0 ) {\n\t\t\t\tdigits -= 1;\n\t\t\t}\n\t\t\tout = f.toExponential( digits );\n\t\t} else {\n\t\t\tout = f.toPrecision( token.precision );\n\t\t}\n\t\tif ( !token.alternate ) {\n\t\t\tout = replace.call( out, RE_ZERO_BEFORE_EXP, '$1e' );\n\t\t\tout = replace.call( out, RE_PERIOD_ZERO_EXP, 'e');\n\t\t\tout = replace.call( out, RE_TRAILING_PERIOD_ZERO, '' );\n\t\t}\n\t\tbreak;\n\tdefault:\n\t\tthrow new Error( 'invalid double notation. Value: ' + token.specifier );\n\t}\n\tout = replace.call( out, RE_EXP_POS_DIGITS, 'e+0$1' );\n\tout = replace.call( out, RE_EXP_NEG_DIGITS, 'e-0$1' );\n\tif ( token.alternate ) {\n\t\tout = replace.call( out, RE_ONLY_DIGITS, '$1.' );\n\t\tout = replace.call( out, RE_DIGITS_BEFORE_EXP, '$1.e' );\n\t}\n\tif ( f >= 0 && token.sign ) {\n\t\tout = token.sign + out;\n\t}\n\tout = ( token.specifier === uppercase.call( token.specifier ) ) ?\n\t\tuppercase.call( out ) :\n\t\tlowercase.call( out );\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default formatDouble;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// FUNCTIONS //\n\n/**\n* Returns `n` spaces.\n*\n* @private\n* @param {number} n - number of spaces\n* @returns {string} string of spaces\n*/\nfunction spaces( n ) {\n\tvar out = '';\n\tvar i;\n\tfor ( i = 0; i < n; i++ ) {\n\t\tout += ' ';\n\t}\n\treturn out;\n}\n\n\n// MAIN //\n\n/**\n* Pads a token with spaces to the specified width.\n*\n* @private\n* @param {string} str - token argument\n* @param {number} width - token width\n* @param {boolean} [right=false] - boolean indicating whether to pad to the right\n* @returns {string} padded token argument\n*/\nfunction spacePad( str, width, right ) {\n\tvar pad = width - str.length;\n\tif ( pad < 0 ) {\n\t\treturn str;\n\t}\n\tstr = ( right ) ?\n\t\tstr + spaces( pad ) :\n\t\tspaces( pad ) + str;\n\treturn str;\n}\n\n\n// EXPORTS //\n\nexport default spacePad;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport formatInteger from './format_integer.js';\nimport isString from './is_string.js';\nimport formatDouble from './format_double.js';\nimport spacePad from './space_pad.js';\nimport zeroPad from './zero_pad.js';\n\n\n// VARIABLES //\n\nvar fromCharCode = String.fromCharCode;\nvar isnan = isNaN; // NOTE: We use the global `isNaN` function here instead of `@stdlib/math/base/assert/is-nan` to avoid circular dependencies.\nvar isArray = Array.isArray; // NOTE: We use the global `Array.isArray` function here instead of `@stdlib/assert/is-array` to avoid circular dependencies.\n\n\n// FUNCTIONS //\n\n/**\n* Initializes token object with properties of supplied format identifier object or default values if not present.\n*\n* @private\n* @param {Object} token - format identifier object\n* @returns {Object} token object\n*/\nfunction initialize( token ) {\n\tvar out = {};\n\tout.specifier = token.specifier;\n\tout.precision = ( token.precision === void 0 ) ? 1 : token.precision;\n\tout.width = token.width;\n\tout.flags = token.flags || '';\n\tout.mapping = token.mapping;\n\treturn out;\n}\n\n\n// MAIN //\n\n/**\n* Generates string from a token array by interpolating values.\n*\n* @param {Array} tokens - string parts and format identifier objects\n* @param {Array} ...args - variable values\n* @throws {TypeError} first argument must be an array\n* @throws {Error} invalid flags\n* @returns {string} formatted string\n*\n* @example\n* var tokens = [ 'beep ', { 'specifier': 's' } ];\n* var out = formatInterpolate( tokens, 'boop' );\n* // returns 'beep boop'\n*/\nfunction formatInterpolate( tokens ) {\n\tvar hasPeriod;\n\tvar flags;\n\tvar token;\n\tvar flag;\n\tvar num;\n\tvar out;\n\tvar pos;\n\tvar i;\n\tvar j;\n\n\tif ( !isArray( tokens ) ) {\n\t\tthrow new TypeError( 'invalid argument. First argument must be an array. Value: `' + tokens + '`.' );\n\t}\n\tout = '';\n\tpos = 1;\n\tfor ( i = 0; i < tokens.length; i++ ) {\n\t\ttoken = tokens[ i ];\n\t\tif ( isString( token ) ) {\n\t\t\tout += token;\n\t\t} else {\n\t\t\thasPeriod = token.precision !== void 0;\n\t\t\ttoken = initialize( token );\n\t\t\tif ( !token.specifier ) {\n\t\t\t\tthrow new TypeError( 'invalid argument. Token is missing `specifier` property. Index: `'+ i +'`. Value: `' + token + '`.' );\n\t\t\t}\n\t\t\tif ( token.mapping ) {\n\t\t\t\tpos = token.mapping;\n\t\t\t}\n\t\t\tflags = token.flags;\n\t\t\tfor ( j = 0; j < flags.length; j++ ) {\n\t\t\t\tflag = flags.charAt( j );\n\t\t\t\tswitch ( flag ) {\n\t\t\t\tcase ' ':\n\t\t\t\t\ttoken.sign = ' ';\n\t\t\t\t\tbreak;\n\t\t\t\tcase '+':\n\t\t\t\t\ttoken.sign = '+';\n\t\t\t\t\tbreak;\n\t\t\t\tcase '-':\n\t\t\t\t\ttoken.padRight = true;\n\t\t\t\t\ttoken.padZeros = false;\n\t\t\t\t\tbreak;\n\t\t\t\tcase '0':\n\t\t\t\t\ttoken.padZeros = flags.indexOf( '-' ) < 0; // NOTE: We use built-in `Array.prototype.indexOf` here instead of `@stdlib/assert/contains` in order to avoid circular dependencies.\n\t\t\t\t\tbreak;\n\t\t\t\tcase '#':\n\t\t\t\t\ttoken.alternate = true;\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tthrow new Error( 'invalid flag: ' + flag );\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( token.width === '*' ) {\n\t\t\t\ttoken.width = parseInt( arguments[ pos ], 10 );\n\t\t\t\tpos += 1;\n\t\t\t\tif ( isnan( token.width ) ) {\n\t\t\t\t\tthrow new TypeError( 'the argument for * width at position ' + pos + ' is not a number. Value: `' + token.width + '`.' );\n\t\t\t\t}\n\t\t\t\tif ( token.width < 0 ) {\n\t\t\t\t\ttoken.padRight = true;\n\t\t\t\t\ttoken.width = -token.width;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( hasPeriod ) {\n\t\t\t\tif ( token.precision === '*' ) {\n\t\t\t\t\ttoken.precision = parseInt( arguments[ pos ], 10 );\n\t\t\t\t\tpos += 1;\n\t\t\t\t\tif ( isnan( token.precision ) ) {\n\t\t\t\t\t\tthrow new TypeError( 'the argument for * precision at position ' + pos + ' is not a number. Value: `' + token.precision + '`.' );\n\t\t\t\t\t}\n\t\t\t\t\tif ( token.precision < 0 ) {\n\t\t\t\t\t\ttoken.precision = 1;\n\t\t\t\t\t\thasPeriod = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\ttoken.arg = arguments[ pos ];\n\t\t\tswitch ( token.specifier ) {\n\t\t\tcase 'b':\n\t\t\tcase 'o':\n\t\t\tcase 'x':\n\t\t\tcase 'X':\n\t\t\tcase 'd':\n\t\t\tcase 'i':\n\t\t\tcase 'u':\n\t\t\t\t// Case: %b (binary), %o (octal), %x, %X (hexadecimal), %d, %i (decimal), %u (unsigned decimal)\n\t\t\t\tif ( hasPeriod ) {\n\t\t\t\t\ttoken.padZeros = false;\n\t\t\t\t}\n\t\t\t\ttoken.arg = formatInteger( token );\n\t\t\t\tbreak;\n\t\t\tcase 's':\n\t\t\t\t// Case: %s (string)\n\t\t\t\ttoken.maxWidth = ( hasPeriod ) ? token.precision : -1;\n\t\t\t\tbreak;\n\t\t\tcase 'c':\n\t\t\t\t// Case: %c (character)\n\t\t\t\tif ( !isnan( token.arg ) ) {\n\t\t\t\t\tnum = parseInt( token.arg, 10 );\n\t\t\t\t\tif ( num < 0 || num > 127 ) {\n\t\t\t\t\t\tthrow new Error( 'invalid character code. Value: ' + token.arg );\n\t\t\t\t\t}\n\t\t\t\t\ttoken.arg = ( isnan( num ) ) ?\n\t\t\t\t\t\tString( token.arg ) :\n\t\t\t\t\t\tfromCharCode( num );\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'e':\n\t\t\tcase 'E':\n\t\t\tcase 'f':\n\t\t\tcase 'F':\n\t\t\tcase 'g':\n\t\t\tcase 'G':\n\t\t\t\t// Case: %e, %E (scientific notation), %f, %F (decimal floating point), %g, %G (uses the shorter of %e/E or %f/F)\n\t\t\t\tif ( !hasPeriod ) {\n\t\t\t\t\ttoken.precision = 6;\n\t\t\t\t}\n\t\t\t\ttoken.arg = formatDouble( token );\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tthrow new Error( 'invalid specifier: ' + token.specifier );\n\t\t\t}\n\t\t\t// Fit argument into field width...\n\t\t\tif ( token.maxWidth >= 0 && token.arg.length > token.maxWidth ) {\n\t\t\t\ttoken.arg = token.arg.substring( 0, token.maxWidth );\n\t\t\t}\n\t\t\tif ( token.padZeros ) {\n\t\t\t\ttoken.arg = zeroPad( token.arg, token.width || token.precision, token.padRight ); // eslint-disable-line max-len\n\t\t\t} else if ( token.width ) {\n\t\t\t\ttoken.arg = spacePad( token.arg, token.width, token.padRight );\n\t\t\t}\n\t\t\tout += token.arg || '';\n\t\t\tpos += 1;\n\t\t}\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default formatInterpolate;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// VARIABLES //\n\nvar RE = /%(?:([1-9]\\d*)\\$)?([0 +\\-#]*)(\\*|\\d+)?(?:(\\.)(\\*|\\d+)?)?[hlL]?([%A-Za-z])/g;\n\n\n// FUNCTIONS //\n\n/**\n* Parses a delimiter.\n*\n* @private\n* @param {Array} match - regular expression match\n* @returns {Object} delimiter token object\n*/\nfunction parse( match ) {\n\tvar token = {\n\t\t'mapping': ( match[ 1 ] ) ? parseInt( match[ 1 ], 10 ) : void 0,\n\t\t'flags': match[ 2 ],\n\t\t'width': match[ 3 ],\n\t\t'precision': match[ 5 ],\n\t\t'specifier': match[ 6 ]\n\t};\n\tif ( match[ 4 ] === '.' && match[ 5 ] === void 0 ) {\n\t\ttoken.precision = '1';\n\t}\n\treturn token;\n}\n\n\n// MAIN //\n\n/**\n* Tokenizes a string into an array of string parts and format identifier objects.\n*\n* @param {string} str - input string\n* @returns {Array} tokens\n*\n* @example\n* var tokens = formatTokenize( 'Hello %s!' );\n* // returns [ 'Hello ', {...}, '!' ]\n*/\nfunction formatTokenize( str ) {\n\tvar content;\n\tvar tokens;\n\tvar match;\n\tvar prev;\n\n\ttokens = [];\n\tprev = 0;\n\tmatch = RE.exec( str );\n\twhile ( match ) {\n\t\tcontent = str.slice( prev, RE.lastIndex - match[ 0 ].length );\n\t\tif ( content.length ) {\n\t\t\ttokens.push( content );\n\t\t}\n\t\ttokens.push( parse( match ) );\n\t\tprev = RE.lastIndex;\n\t\tmatch = RE.exec( str );\n\t}\n\tcontent = str.slice( prev );\n\tif ( content.length ) {\n\t\ttokens.push( content );\n\t}\n\treturn tokens;\n}\n\n\n// EXPORTS //\n\nexport default formatTokenize;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Tests if a value is a string primitive.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a string primitive\n*\n* @example\n* var bool = isString( 'beep' );\n* // returns true\n*\n* @example\n* var bool = isString( new String( 'beep' ) );\n* // returns false\n*/\nfunction isString( value ) {\n\treturn ( typeof value === 'string' ); // NOTE: we inline the `isString.isPrimitive` function from `@stdlib/assert/is-string` in order to avoid circular dependencies.\n}\n\n\n// EXPORTS //\n\nexport default isString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport interpolate from '@stdlib/string-base-format-interpolate';\nimport tokenize from '@stdlib/string-base-format-tokenize';\nimport isString from './is_string.js';\n\n\n// MAIN //\n\n/**\n* Inserts supplied variable values into a format string.\n*\n* @param {string} str - input string\n* @param {Array} ...args - variable values\n* @throws {TypeError} first argument must be a string\n* @throws {Error} invalid flags\n* @returns {string} formatted string\n*\n* @example\n* var str = format( 'Hello %s!', 'world' );\n* // returns 'Hello world!'\n*\n* @example\n* var str = format( 'Pi: ~%.2f', 3.141592653589793 );\n* // returns 'Pi: ~3.14'\n*/\nfunction format( str ) {\n\tvar args;\n\tvar i;\n\n\tif ( !isString( str ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a string. Value: `%s`.', str ) );\n\t}\n\targs = [ tokenize( str ) ];\n\tfor ( i = 1; i < arguments.length; i++ ) {\n\t\targs.push( arguments[ i ] );\n\t}\n\treturn interpolate.apply( null, args );\n}\n\n\n// EXPORTS //\n\nexport default format;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Tests if a value is object-like.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether a value is object-like\n*\n* @example\n* var bool = isObjectLike( {} );\n* // returns true\n*\n* @example\n* var bool = isObjectLike( [] );\n* // returns true\n*\n* @example\n* var bool = isObjectLike( null );\n* // returns false\n*/\nfunction isObjectLike( value ) {\n\treturn (\n\t\tvalue !== null &&\n\t\ttypeof value === 'object'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isObjectLike;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\nimport { REGEXP as RE } from '@stdlib/regexp-function-name';\nimport isBuffer from '@stdlib/assert-is-buffer';\n\n\n// MAIN //\n\n/**\n* Determines the name of a value's constructor.\n*\n* @param {*} v - input value\n* @returns {string} name of a value's constructor\n*\n* @example\n* var v = constructorName( 'a' );\n* // returns 'String'\n*\n* @example\n* var v = constructorName( 5 );\n* // returns 'Number'\n*\n* @example\n* var v = constructorName( null );\n* // returns 'Null'\n*\n* @example\n* var v = constructorName( undefined );\n* // returns 'Undefined'\n*\n* @example\n* var v = constructorName( function noop() {} );\n* // returns 'Function'\n*/\nfunction constructorName( v ) {\n\tvar match;\n\tvar name;\n\tvar ctor;\n\tname = nativeClass( v ).slice( 8, -1 );\n\tif ( (name === 'Object' || name === 'Error') && v.constructor ) {\n\t\tctor = v.constructor;\n\t\tif ( typeof ctor.name === 'string' ) {\n\t\t\treturn ctor.name;\n\t\t}\n\t\tmatch = RE.exec( ctor.toString() );\n\t\tif ( match ) {\n\t\t\treturn match[ 1 ];\n\t\t}\n\t}\n\tif ( isBuffer( v ) ) {\n\t\treturn 'Buffer';\n\t}\n\treturn name;\n}\n\n\n// EXPORTS //\n\nexport default constructorName;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isObjectLike from '@stdlib/assert-is-object-like';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Buffer instance.\n*\n* @param {*} value - value to validate\n* @returns {boolean} boolean indicating if a value is a Buffer instance\n*\n* @example\n* var v = isBuffer( new Buffer( 'beep' ) );\n* // returns true\n*\n* @example\n* var v = isBuffer( new Buffer( [1,2,3,4] ) );\n* // returns true\n*\n* @example\n* var v = isBuffer( {} );\n* // returns false\n*\n* @example\n* var v = isBuffer( [] );\n* // returns false\n*/\nfunction isBuffer( value ) {\n\treturn (\n\t\tisObjectLike( value ) &&\n\t\t(\n\t\t\t// eslint-disable-next-line no-underscore-dangle\n\t\t\tvalue._isBuffer || // for envs missing Object.prototype.constructor (e.g., Safari 5-7)\n\t\t\t(\n\t\t\t\tvalue.constructor &&\n\n\t\t\t\t// WARNING: `typeof` is not a foolproof check, as certain envs consider RegExp and NodeList instances to be functions\n\t\t\t\ttypeof value.constructor.isBuffer === 'function' &&\n\t\t\t\tvalue.constructor.isBuffer( value )\n\t\t\t)\n\t\t)\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isBuffer;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport defineProperty from '@stdlib/utils-define-property';\n\n\n// MAIN //\n\n/**\n* Defines a non-enumerable read-only property.\n*\n* @param {Object} obj - object on which to define the property\n* @param {(string|symbol)} prop - property name\n* @param {*} value - value to set\n*\n* @example\n* var obj = {};\n*\n* setNonEnumerableReadOnly( obj, 'foo', 'bar' );\n*\n* try {\n* obj.foo = 'boop';\n* } catch ( err ) {\n* console.error( err.message );\n* }\n*/\nfunction setNonEnumerableReadOnly( obj, prop, value ) {\n\tdefineProperty( obj, prop, {\n\t\t'configurable': false,\n\t\t'enumerable': false,\n\t\t'writable': false,\n\t\t'value': value\n\t});\n}\n\n\n// EXPORTS //\n\nexport default setNonEnumerableReadOnly;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test if a value is object-like.\n*\n* @module @stdlib/assert-is-object-like\n*\n* @example\n* import isObjectLike from '@stdlib/assert-is-object-like';\n*\n* var bool = isObjectLike( {} );\n* // returns true\n*\n* bool = isObjectLike( [] );\n* // returns true\n*\n* bool = isObjectLike( null );\n* // returns false\n*\n* @example\n* import { isObjectLikeArray as isObjectLike } from '@stdlib/assert-is-object-like';\n*\n* var bool = isObjectLike( [ {}, [] ] );\n* // returns true\n*\n* bool = isObjectLike( [ {}, '3.0' ] );\n* // returns false\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport arrayfun from '@stdlib/assert-tools-array-function';\nimport main from './main.js';\n\n\n// VARIABLES //\n\nvar isObjectLikeArray = arrayfun( main );\n\n\n// MAIN //\n\nsetReadOnly( main, 'isObjectLikeArray', isObjectLikeArray );\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isArray from '@stdlib/assert-is-array';\nimport format from '@stdlib/string-format';\n\n\n// MAIN //\n\n/**\n* Returns a function which tests if every element in an array passes a test condition.\n*\n* @param {Function} predicate - function to apply\n* @throws {TypeError} must provide a function\n* @returns {Function} an array function\n*\n* @example\n* import isOdd from '@stdlib/assert-is-odd';\n*\n* var arr1 = [ 1, 3, 5, 7 ];\n* var arr2 = [ 3, 5, 8 ];\n*\n* var validate = arrayfcn( isOdd );\n*\n* var bool = validate( arr1 );\n* // returns true\n*\n* bool = validate( arr2 );\n* // returns false\n*/\nfunction arrayfcn( predicate ) {\n\tif ( typeof predicate !== 'function' ) {\n\t\tthrow new TypeError( format( 'invalid argument. Must provide a function. Value: `%s`.', predicate ) );\n\t}\n\treturn every;\n\n\t/**\n\t* Tests if every element in an array passes a test condition.\n\t*\n\t* @private\n\t* @param {*} value - value to test\n\t* @returns {boolean} boolean indicating whether a value is an array for which all elements pass a test condition\n\t*/\n\tfunction every( value ) {\n\t\tvar len;\n\t\tvar i;\n\t\tif ( !isArray( value ) ) {\n\t\t\treturn false;\n\t\t}\n\t\tlen = value.length;\n\t\tif ( len === 0 ) {\n\t\t\treturn false;\n\t\t}\n\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\tif ( predicate( value[ i ] ) === false ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}\n}\n\n\n// EXPORTS //\n\nexport default arrayfcn;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Determine a value's type.\n*\n* @module @stdlib/utils-type-of\n*\n* @example\n* import typeOf from '@stdlib/utils-type-of';\n*\n* var str = typeOf( 'a' );\n* // returns 'string'\n*\n* str = typeOf( 5 );\n* // returns 'number'\n*/\n\n// MODULES //\n\nimport usePolyfill from './check.js';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar main = ( usePolyfill() ) ? polyfill : builtin;\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport RE from './fixtures/re.js';\nimport nodeList from './fixtures/nodelist.js';\nimport typedarray from './fixtures/typedarray.js';\n\n\n// MAIN //\n\n/**\n* Checks whether a polyfill is needed when using the `typeof` operator.\n*\n* @private\n* @returns {boolean} boolean indicating whether a polyfill is needed\n*/\nfunction check() {\n\tif (\n\t\t// Chrome 1-12 returns 'function' for regular expression instances (see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/typeof):\n\t\ttypeof RE === 'function' ||\n\n\t\t// Safari 8 returns 'object' for typed array and weak map constructors (underscore #1929):\n\t\ttypeof typedarray === 'object' ||\n\n\t\t// PhantomJS 1.9 returns 'function' for `NodeList` instances (underscore #2236):\n\t\ttypeof nodeList === 'function'\n\t) {\n\t\treturn true;\n\t}\n\treturn false;\n}\n\n\n// EXPORTS //\n\nexport default check;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport ctorName from '@stdlib/utils-constructor-name';\n\n\n// MAIN //\n\n/**\n* Determines a value's type.\n*\n* @param {*} v - input value\n* @returns {string} string indicating the value's type\n*/\nfunction typeOf( v ) {\n\treturn ctorName( v ).toLowerCase();\n}\n\n\n// EXPORTS //\n\nexport default typeOf;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport ctorName from '@stdlib/utils-constructor-name';\n\n\n// NOTES //\n\n/*\n* Built-in `typeof` operator behavior:\n*\n* ```text\n* typeof null => 'object'\n* typeof undefined => 'undefined'\n* typeof 'a' => 'string'\n* typeof 5 => 'number'\n* typeof NaN => 'number'\n* typeof true => 'boolean'\n* typeof false => 'boolean'\n* typeof {} => 'object'\n* typeof [] => 'object'\n* typeof function foo(){} => 'function'\n* typeof function* foo(){} => 'object'\n* typeof Symbol() => 'symbol'\n* ```\n*\n*/\n\n\n// MAIN //\n\n/**\n* Determines a value's type.\n*\n* @param {*} v - input value\n* @returns {string} string indicating the value's type\n*/\nfunction typeOf( v ) {\n\tvar type;\n\n\t// Address `typeof null` => `object` (see http://wiki.ecmascript.org/doku.php?id=harmony:typeof_null):\n\tif ( v === null ) {\n\t\treturn 'null';\n\t}\n\ttype = typeof v;\n\n\t// If the `typeof` operator returned something other than `object`, we are done. Otherwise, we need to check for an internal class name or search for a constructor.\n\tif ( type === 'object' ) {\n\t\treturn ctorName( v ).toLowerCase();\n\t}\n\treturn type;\n}\n\n\n// EXPORTS //\n\nexport default typeOf;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport typeOf from '@stdlib/utils-type-of';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a function.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a function\n*\n* @example\n* function beep() {\n* return 'beep';\n* }\n*\n* var bool = isFunction( beep );\n* // returns true\n*/\nfunction isFunction( value ) {\n\t// Note: cannot use `typeof` directly, as various browser engines incorrectly return `'function'` when operating on non-function objects, such as regular expressions and NodeLists.\n\treturn ( typeOf( value ) === 'function' );\n}\n\n\n// EXPORTS //\n\nexport default isFunction;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport defineProperty from '@stdlib/utils-define-property';\n\n\n// MAIN //\n\n/**\n* Defines a non-enumerable read-only property.\n*\n* @param {Object} obj - object on which to define the property\n* @param {(string|symbol)} prop - property name\n* @param {*} value - value to set\n*\n* @example\n* var obj = {};\n*\n* setNonEnumerableReadOnly( obj, 'foo', 'bar' );\n*\n* try {\n* obj.foo = 'boop';\n* } catch ( err ) {\n* console.error( err.message );\n* }\n*/\nfunction setNonEnumerableReadOnly( obj, prop, value ) {\n\tdefineProperty( obj, prop, {\n\t\t'configurable': false,\n\t\t'enumerable': false,\n\t\t'writable': false,\n\t\t'value': value\n\t});\n}\n\n\n// EXPORTS //\n\nexport default setNonEnumerableReadOnly;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Tests if a value is a number primitive.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number primitive\n*\n* @example\n* var bool = isNumber( 3.14 );\n* // returns true\n*\n* @example\n* var bool = isNumber( NaN );\n* // returns true\n*\n* @example\n* var bool = isNumber( new Number( 3.14 ) );\n* // returns false\n*/\nfunction isNumber( value ) {\n\treturn ( typeof value === 'number' ); // NOTE: we inline the `isNumber.isPrimitive` function from `@stdlib/assert/is-number` in order to avoid circular dependencies.\n}\n\n\n// EXPORTS //\n\nexport default isNumber;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// FUNCTIONS //\n\n/**\n* Tests if a string starts with a minus sign (`-`).\n*\n* @private\n* @param {string} str - input string\n* @returns {boolean} boolean indicating if a string starts with a minus sign (`-`)\n*/\nfunction startsWithMinus( str ) {\n\treturn str[ 0 ] === '-';\n}\n\n/**\n* Returns a string of `n` zeros.\n*\n* @private\n* @param {number} n - number of zeros\n* @returns {string} string of zeros\n*/\nfunction zeros( n ) {\n\tvar out = '';\n\tvar i;\n\tfor ( i = 0; i < n; i++ ) {\n\t\tout += '0';\n\t}\n\treturn out;\n}\n\n\n// MAIN //\n\n/**\n* Pads a token with zeros to the specified width.\n*\n* @private\n* @param {string} str - token argument\n* @param {number} width - token width\n* @param {boolean} [right=false] - boolean indicating whether to pad to the right\n* @returns {string} padded token argument\n*/\nfunction zeroPad( str, width, right ) {\n\tvar negative = false;\n\tvar pad = width - str.length;\n\tif ( pad < 0 ) {\n\t\treturn str;\n\t}\n\tif ( startsWithMinus( str ) ) {\n\t\tnegative = true;\n\t\tstr = str.substr( 1 );\n\t}\n\tstr = ( right ) ?\n\t\tstr + zeros( pad ) :\n\t\tzeros( pad ) + str;\n\tif ( negative ) {\n\t\tstr = '-' + str;\n\t}\n\treturn str;\n}\n\n\n// EXPORTS //\n\nexport default zeroPad;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isNumber from './is_number.js';\nimport zeroPad from './zero_pad.js';\n\n// NOTE: for the following, we explicitly avoid using stdlib packages in this particular package in order to avoid circular dependencies.\nvar lowercase = String.prototype.toLowerCase;\nvar uppercase = String.prototype.toUpperCase;\n\n\n// MAIN //\n\n/**\n* Formats a token object argument as an integer.\n*\n* @private\n* @param {Object} token - token object\n* @throws {Error} must provide a valid integer\n* @returns {string} formatted token argument\n*/\nfunction formatInteger( token ) {\n\tvar base;\n\tvar out;\n\tvar i;\n\n\tswitch ( token.specifier ) {\n\tcase 'b':\n\t\t// Case: %b (binary)\n\t\tbase = 2;\n\t\tbreak;\n\tcase 'o':\n\t\t// Case: %o (octal)\n\t\tbase = 8;\n\t\tbreak;\n\tcase 'x':\n\tcase 'X':\n\t\t// Case: %x, %X (hexadecimal)\n\t\tbase = 16;\n\t\tbreak;\n\tcase 'd':\n\tcase 'i':\n\tcase 'u':\n\tdefault:\n\t\t// Case: %d, %i, %u (decimal)\n\t\tbase = 10;\n\t\tbreak;\n\t}\n\tout = token.arg;\n\ti = parseInt( out, 10 );\n\tif ( !isFinite( i ) ) { // NOTE: We use the global `isFinite` function here instead of `@stdlib/math/base/assert/is-finite` in order to avoid circular dependencies.\n\t\tif ( !isNumber( out ) ) {\n\t\t\tthrow new Error( 'invalid integer. Value: ' + out );\n\t\t}\n\t\ti = 0;\n\t}\n\tif ( i < 0 && ( token.specifier === 'u' || base !== 10 ) ) {\n\t\ti = 0xffffffff + i + 1;\n\t}\n\tif ( i < 0 ) {\n\t\tout = ( -i ).toString( base );\n\t\tif ( token.precision ) {\n\t\t\tout = zeroPad( out, token.precision, token.padRight );\n\t\t}\n\t\tout = '-' + out;\n\t} else {\n\t\tout = i.toString( base );\n\t\tif ( !i && !token.precision ) {\n\t\t\tout = '';\n\t\t} else if ( token.precision ) {\n\t\t\tout = zeroPad( out, token.precision, token.padRight );\n\t\t}\n\t\tif ( token.sign ) {\n\t\t\tout = token.sign + out;\n\t\t}\n\t}\n\tif ( base === 16 ) {\n\t\tif ( token.alternate ) {\n\t\t\tout = '0x' + out;\n\t\t}\n\t\tout = ( token.specifier === uppercase.call( token.specifier ) ) ?\n\t\t\tuppercase.call( out ) :\n\t\t\tlowercase.call( out );\n\t}\n\tif ( base === 8 ) {\n\t\tif ( token.alternate && out.charAt( 0 ) !== '0' ) {\n\t\t\tout = '0' + out;\n\t\t}\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default formatInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Tests if a value is a string primitive.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a string primitive\n*\n* @example\n* var bool = isString( 'beep' );\n* // returns true\n*\n* @example\n* var bool = isString( new String( 'beep' ) );\n* // returns false\n*/\nfunction isString( value ) {\n\treturn ( typeof value === 'string' ); // NOTE: we inline the `isString.isPrimitive` function from `@stdlib/assert/is-string` in order to avoid circular dependencies.\n}\n\n\n// EXPORTS //\n\nexport default isString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isNumber from './is_number.js';\n\n// NOTE: for the following, we explicitly avoid using stdlib packages in this particular package in order to avoid circular dependencies.\nvar abs = Math.abs; // eslint-disable-line stdlib/no-builtin-math\nvar lowercase = String.prototype.toLowerCase;\nvar uppercase = String.prototype.toUpperCase;\nvar replace = String.prototype.replace;\n\n\n// VARIABLES //\n\nvar RE_EXP_POS_DIGITS = /e\\+(\\d)$/;\nvar RE_EXP_NEG_DIGITS = /e-(\\d)$/;\nvar RE_ONLY_DIGITS = /^(\\d+)$/;\nvar RE_DIGITS_BEFORE_EXP = /^(\\d+)e/;\nvar RE_TRAILING_PERIOD_ZERO = /\\.0$/;\nvar RE_PERIOD_ZERO_EXP = /\\.0*e/;\nvar RE_ZERO_BEFORE_EXP = /(\\..*[^0])0*e/;\n\n\n// MAIN //\n\n/**\n* Formats a token object argument as a floating-point number.\n*\n* @private\n* @param {Object} token - token object\n* @throws {Error} must provide a valid floating-point number\n* @returns {string} formatted token argument\n*/\nfunction formatDouble( token ) {\n\tvar digits;\n\tvar out;\n\tvar f = parseFloat( token.arg );\n\tif ( !isFinite( f ) ) { // NOTE: We use the global `isFinite` function here instead of `@stdlib/math/base/assert/is-finite` in order to avoid circular dependencies.\n\t\tif ( !isNumber( token.arg ) ) {\n\t\t\tthrow new Error( 'invalid floating-point number. Value: ' + out );\n\t\t}\n\t\t// Case: NaN, Infinity, or -Infinity\n\t\tf = token.arg;\n\t}\n\tswitch ( token.specifier ) {\n\tcase 'e':\n\tcase 'E':\n\t\tout = f.toExponential( token.precision );\n\t\tbreak;\n\tcase 'f':\n\tcase 'F':\n\t\tout = f.toFixed( token.precision );\n\t\tbreak;\n\tcase 'g':\n\tcase 'G':\n\t\tif ( abs( f ) < 0.0001 ) {\n\t\t\tdigits = token.precision;\n\t\t\tif ( digits > 0 ) {\n\t\t\t\tdigits -= 1;\n\t\t\t}\n\t\t\tout = f.toExponential( digits );\n\t\t} else {\n\t\t\tout = f.toPrecision( token.precision );\n\t\t}\n\t\tif ( !token.alternate ) {\n\t\t\tout = replace.call( out, RE_ZERO_BEFORE_EXP, '$1e' );\n\t\t\tout = replace.call( out, RE_PERIOD_ZERO_EXP, 'e');\n\t\t\tout = replace.call( out, RE_TRAILING_PERIOD_ZERO, '' );\n\t\t}\n\t\tbreak;\n\tdefault:\n\t\tthrow new Error( 'invalid double notation. Value: ' + token.specifier );\n\t}\n\tout = replace.call( out, RE_EXP_POS_DIGITS, 'e+0$1' );\n\tout = replace.call( out, RE_EXP_NEG_DIGITS, 'e-0$1' );\n\tif ( token.alternate ) {\n\t\tout = replace.call( out, RE_ONLY_DIGITS, '$1.' );\n\t\tout = replace.call( out, RE_DIGITS_BEFORE_EXP, '$1.e' );\n\t}\n\tif ( f >= 0 && token.sign ) {\n\t\tout = token.sign + out;\n\t}\n\tout = ( token.specifier === uppercase.call( token.specifier ) ) ?\n\t\tuppercase.call( out ) :\n\t\tlowercase.call( out );\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default formatDouble;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// FUNCTIONS //\n\n/**\n* Returns `n` spaces.\n*\n* @private\n* @param {number} n - number of spaces\n* @returns {string} string of spaces\n*/\nfunction spaces( n ) {\n\tvar out = '';\n\tvar i;\n\tfor ( i = 0; i < n; i++ ) {\n\t\tout += ' ';\n\t}\n\treturn out;\n}\n\n\n// MAIN //\n\n/**\n* Pads a token with spaces to the specified width.\n*\n* @private\n* @param {string} str - token argument\n* @param {number} width - token width\n* @param {boolean} [right=false] - boolean indicating whether to pad to the right\n* @returns {string} padded token argument\n*/\nfunction spacePad( str, width, right ) {\n\tvar pad = width - str.length;\n\tif ( pad < 0 ) {\n\t\treturn str;\n\t}\n\tstr = ( right ) ?\n\t\tstr + spaces( pad ) :\n\t\tspaces( pad ) + str;\n\treturn str;\n}\n\n\n// EXPORTS //\n\nexport default spacePad;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport formatInteger from './format_integer.js';\nimport isString from './is_string.js';\nimport formatDouble from './format_double.js';\nimport spacePad from './space_pad.js';\nimport zeroPad from './zero_pad.js';\n\n\n// VARIABLES //\n\nvar fromCharCode = String.fromCharCode;\nvar isnan = isNaN; // NOTE: We use the global `isNaN` function here instead of `@stdlib/math/base/assert/is-nan` to avoid circular dependencies.\nvar isArray = Array.isArray; // NOTE: We use the global `Array.isArray` function here instead of `@stdlib/assert/is-array` to avoid circular dependencies.\n\n\n// FUNCTIONS //\n\n/**\n* Initializes token object with properties of supplied format identifier object or default values if not present.\n*\n* @private\n* @param {Object} token - format identifier object\n* @returns {Object} token object\n*/\nfunction initialize( token ) {\n\tvar out = {};\n\tout.specifier = token.specifier;\n\tout.precision = ( token.precision === void 0 ) ? 1 : token.precision;\n\tout.width = token.width;\n\tout.flags = token.flags || '';\n\tout.mapping = token.mapping;\n\treturn out;\n}\n\n\n// MAIN //\n\n/**\n* Generates string from a token array by interpolating values.\n*\n* @param {Array} tokens - string parts and format identifier objects\n* @param {Array} ...args - variable values\n* @throws {TypeError} first argument must be an array\n* @throws {Error} invalid flags\n* @returns {string} formatted string\n*\n* @example\n* var tokens = [ 'beep ', { 'specifier': 's' } ];\n* var out = formatInterpolate( tokens, 'boop' );\n* // returns 'beep boop'\n*/\nfunction formatInterpolate( tokens ) {\n\tvar hasPeriod;\n\tvar flags;\n\tvar token;\n\tvar flag;\n\tvar num;\n\tvar out;\n\tvar pos;\n\tvar i;\n\tvar j;\n\n\tif ( !isArray( tokens ) ) {\n\t\tthrow new TypeError( 'invalid argument. First argument must be an array. Value: `' + tokens + '`.' );\n\t}\n\tout = '';\n\tpos = 1;\n\tfor ( i = 0; i < tokens.length; i++ ) {\n\t\ttoken = tokens[ i ];\n\t\tif ( isString( token ) ) {\n\t\t\tout += token;\n\t\t} else {\n\t\t\thasPeriod = token.precision !== void 0;\n\t\t\ttoken = initialize( token );\n\t\t\tif ( !token.specifier ) {\n\t\t\t\tthrow new TypeError( 'invalid argument. Token is missing `specifier` property. Index: `'+ i +'`. Value: `' + token + '`.' );\n\t\t\t}\n\t\t\tif ( token.mapping ) {\n\t\t\t\tpos = token.mapping;\n\t\t\t}\n\t\t\tflags = token.flags;\n\t\t\tfor ( j = 0; j < flags.length; j++ ) {\n\t\t\t\tflag = flags.charAt( j );\n\t\t\t\tswitch ( flag ) {\n\t\t\t\tcase ' ':\n\t\t\t\t\ttoken.sign = ' ';\n\t\t\t\t\tbreak;\n\t\t\t\tcase '+':\n\t\t\t\t\ttoken.sign = '+';\n\t\t\t\t\tbreak;\n\t\t\t\tcase '-':\n\t\t\t\t\ttoken.padRight = true;\n\t\t\t\t\ttoken.padZeros = false;\n\t\t\t\t\tbreak;\n\t\t\t\tcase '0':\n\t\t\t\t\ttoken.padZeros = flags.indexOf( '-' ) < 0; // NOTE: We use built-in `Array.prototype.indexOf` here instead of `@stdlib/assert/contains` in order to avoid circular dependencies.\n\t\t\t\t\tbreak;\n\t\t\t\tcase '#':\n\t\t\t\t\ttoken.alternate = true;\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tthrow new Error( 'invalid flag: ' + flag );\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( token.width === '*' ) {\n\t\t\t\ttoken.width = parseInt( arguments[ pos ], 10 );\n\t\t\t\tpos += 1;\n\t\t\t\tif ( isnan( token.width ) ) {\n\t\t\t\t\tthrow new TypeError( 'the argument for * width at position ' + pos + ' is not a number. Value: `' + token.width + '`.' );\n\t\t\t\t}\n\t\t\t\tif ( token.width < 0 ) {\n\t\t\t\t\ttoken.padRight = true;\n\t\t\t\t\ttoken.width = -token.width;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( hasPeriod ) {\n\t\t\t\tif ( token.precision === '*' ) {\n\t\t\t\t\ttoken.precision = parseInt( arguments[ pos ], 10 );\n\t\t\t\t\tpos += 1;\n\t\t\t\t\tif ( isnan( token.precision ) ) {\n\t\t\t\t\t\tthrow new TypeError( 'the argument for * precision at position ' + pos + ' is not a number. Value: `' + token.precision + '`.' );\n\t\t\t\t\t}\n\t\t\t\t\tif ( token.precision < 0 ) {\n\t\t\t\t\t\ttoken.precision = 1;\n\t\t\t\t\t\thasPeriod = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\ttoken.arg = arguments[ pos ];\n\t\t\tswitch ( token.specifier ) {\n\t\t\tcase 'b':\n\t\t\tcase 'o':\n\t\t\tcase 'x':\n\t\t\tcase 'X':\n\t\t\tcase 'd':\n\t\t\tcase 'i':\n\t\t\tcase 'u':\n\t\t\t\t// Case: %b (binary), %o (octal), %x, %X (hexadecimal), %d, %i (decimal), %u (unsigned decimal)\n\t\t\t\tif ( hasPeriod ) {\n\t\t\t\t\ttoken.padZeros = false;\n\t\t\t\t}\n\t\t\t\ttoken.arg = formatInteger( token );\n\t\t\t\tbreak;\n\t\t\tcase 's':\n\t\t\t\t// Case: %s (string)\n\t\t\t\ttoken.maxWidth = ( hasPeriod ) ? token.precision : -1;\n\t\t\t\tbreak;\n\t\t\tcase 'c':\n\t\t\t\t// Case: %c (character)\n\t\t\t\tif ( !isnan( token.arg ) ) {\n\t\t\t\t\tnum = parseInt( token.arg, 10 );\n\t\t\t\t\tif ( num < 0 || num > 127 ) {\n\t\t\t\t\t\tthrow new Error( 'invalid character code. Value: ' + token.arg );\n\t\t\t\t\t}\n\t\t\t\t\ttoken.arg = ( isnan( num ) ) ?\n\t\t\t\t\t\tString( token.arg ) :\n\t\t\t\t\t\tfromCharCode( num );\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'e':\n\t\t\tcase 'E':\n\t\t\tcase 'f':\n\t\t\tcase 'F':\n\t\t\tcase 'g':\n\t\t\tcase 'G':\n\t\t\t\t// Case: %e, %E (scientific notation), %f, %F (decimal floating point), %g, %G (uses the shorter of %e/E or %f/F)\n\t\t\t\tif ( !hasPeriod ) {\n\t\t\t\t\ttoken.precision = 6;\n\t\t\t\t}\n\t\t\t\ttoken.arg = formatDouble( token );\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tthrow new Error( 'invalid specifier: ' + token.specifier );\n\t\t\t}\n\t\t\t// Fit argument into field width...\n\t\t\tif ( token.maxWidth >= 0 && token.arg.length > token.maxWidth ) {\n\t\t\t\ttoken.arg = token.arg.substring( 0, token.maxWidth );\n\t\t\t}\n\t\t\tif ( token.padZeros ) {\n\t\t\t\ttoken.arg = zeroPad( token.arg, token.width || token.precision, token.padRight ); // eslint-disable-line max-len\n\t\t\t} else if ( token.width ) {\n\t\t\t\ttoken.arg = spacePad( token.arg, token.width, token.padRight );\n\t\t\t}\n\t\t\tout += token.arg || '';\n\t\t\tpos += 1;\n\t\t}\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default formatInterpolate;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// VARIABLES //\n\nvar RE = /%(?:([1-9]\\d*)\\$)?([0 +\\-#]*)(\\*|\\d+)?(?:(\\.)(\\*|\\d+)?)?[hlL]?([%A-Za-z])/g;\n\n\n// FUNCTIONS //\n\n/**\n* Parses a delimiter.\n*\n* @private\n* @param {Array} match - regular expression match\n* @returns {Object} delimiter token object\n*/\nfunction parse( match ) {\n\tvar token = {\n\t\t'mapping': ( match[ 1 ] ) ? parseInt( match[ 1 ], 10 ) : void 0,\n\t\t'flags': match[ 2 ],\n\t\t'width': match[ 3 ],\n\t\t'precision': match[ 5 ],\n\t\t'specifier': match[ 6 ]\n\t};\n\tif ( match[ 4 ] === '.' && match[ 5 ] === void 0 ) {\n\t\ttoken.precision = '1';\n\t}\n\treturn token;\n}\n\n\n// MAIN //\n\n/**\n* Tokenizes a string into an array of string parts and format identifier objects.\n*\n* @param {string} str - input string\n* @returns {Array} tokens\n*\n* @example\n* var tokens = formatTokenize( 'Hello %s!' );\n* // returns [ 'Hello ', {...}, '!' ]\n*/\nfunction formatTokenize( str ) {\n\tvar content;\n\tvar tokens;\n\tvar match;\n\tvar prev;\n\n\ttokens = [];\n\tprev = 0;\n\tmatch = RE.exec( str );\n\twhile ( match ) {\n\t\tcontent = str.slice( prev, RE.lastIndex - match[ 0 ].length );\n\t\tif ( content.length ) {\n\t\t\ttokens.push( content );\n\t\t}\n\t\ttokens.push( parse( match ) );\n\t\tprev = RE.lastIndex;\n\t\tmatch = RE.exec( str );\n\t}\n\tcontent = str.slice( prev );\n\tif ( content.length ) {\n\t\ttokens.push( content );\n\t}\n\treturn tokens;\n}\n\n\n// EXPORTS //\n\nexport default formatTokenize;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Tests if a value is a string primitive.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a string primitive\n*\n* @example\n* var bool = isString( 'beep' );\n* // returns true\n*\n* @example\n* var bool = isString( new String( 'beep' ) );\n* // returns false\n*/\nfunction isString( value ) {\n\treturn ( typeof value === 'string' ); // NOTE: we inline the `isString.isPrimitive` function from `@stdlib/assert/is-string` in order to avoid circular dependencies.\n}\n\n\n// EXPORTS //\n\nexport default isString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport interpolate from '@stdlib/string-base-format-interpolate';\nimport tokenize from '@stdlib/string-base-format-tokenize';\nimport isString from './is_string.js';\n\n\n// MAIN //\n\n/**\n* Inserts supplied variable values into a format string.\n*\n* @param {string} str - input string\n* @param {Array} ...args - variable values\n* @throws {TypeError} first argument must be a string\n* @throws {Error} invalid flags\n* @returns {string} formatted string\n*\n* @example\n* var str = format( 'Hello %s!', 'world' );\n* // returns 'Hello world!'\n*\n* @example\n* var str = format( 'Pi: ~%.2f', 3.141592653589793 );\n* // returns 'Pi: ~3.14'\n*/\nfunction format( str ) {\n\tvar args;\n\tvar i;\n\n\tif ( !isString( str ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a string. Value: `%s`.', str ) );\n\t}\n\targs = [ tokenize( str ) ];\n\tfor ( i = 1; i < arguments.length; i++ ) {\n\t\targs.push( arguments[ i ] );\n\t}\n\treturn interpolate.apply( null, args );\n}\n\n\n// EXPORTS //\n\nexport default format;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isNumber } from '@stdlib/assert-is-number';\nimport defineProperty from '@stdlib/utils-define-property';\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport format from '@stdlib/string-format';\nimport toStr from './tostring.js';\nimport toJSON from './tojson.js';\n\n\n// MAIN //\n\n/**\n* 128-bit complex number constructor.\n*\n* @constructor\n* @param {number} real - real component\n* @param {number} imag - imaginary component\n* @throws {TypeError} must invoke using the `new` keyword\n* @throws {TypeError} real component must be a number\n* @throws {TypeError} imaginary component must be a number\n* @returns {Complex128} 128-bit complex number\n*\n* @example\n* var z = new Complex128( 5.0, 3.0 );\n* // returns \n*/\nfunction Complex128( real, imag ) {\n\tif ( !( this instanceof Complex128 ) ) {\n\t\tthrow new TypeError( 'invalid invocation. Constructor must be called with the `new` keyword.' );\n\t}\n\tif ( !isNumber( real ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Real component must be a number. Value: `%s`.', real ) );\n\t}\n\tif ( !isNumber( imag ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Imaginary component must be a number. Value: `%s`.', imag ) );\n\t}\n\tdefineProperty( this, 're', {\n\t\t'configurable': false,\n\t\t'enumerable': true,\n\t\t'writable': false,\n\t\t'value': real\n\t});\n\tdefineProperty( this, 'im', {\n\t\t'configurable': false,\n\t\t'enumerable': true,\n\t\t'writable': false,\n\t\t'value': imag\n\t});\n\treturn this;\n}\n\n/**\n* Size (in bytes) of each component.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex128\n* @type {integer}\n* @returns {integer} size of each component\n*\n* @example\n* var nbytes = Complex128.BYTES_PER_ELEMENT;\n* // returns 8\n*/\nsetReadOnly( Complex128, 'BYTES_PER_ELEMENT', 8 );\n\n/**\n* Size (in bytes) of each component.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex128.prototype\n* @type {integer}\n* @returns {integer} size of each component\n*\n* @example\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var nbytes = z.BYTES_PER_ELEMENT;\n* // returns 8\n*/\nsetReadOnly( Complex128.prototype, 'BYTES_PER_ELEMENT', 8 );\n\n/**\n* Length (in bytes) of a complex number.\n*\n* @name byteLength\n* @memberof Complex128.prototype\n* @type {integer}\n* @returns {integer} byte length\n*\n* @example\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var nbytes = z.byteLength;\n* // returns 16\n*/\nsetReadOnly( Complex128.prototype, 'byteLength', 16 );\n\n/**\n* Serializes a complex number as a string.\n*\n* @name toString\n* @memberof Complex128.prototype\n* @type {Function}\n* @returns {string} serialized complex number\n*\n* @example\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var str = z.toString();\n* // returns '5 + 3i'\n*/\nsetReadOnly( Complex128.prototype, 'toString', toStr );\n\n/**\n* Serializes a complex number as a JSON object.\n*\n* ## Notes\n*\n* - `JSON.stringify()` implicitly calls this method when stringifying a `Complex128` instance.\n*\n* @name toJSON\n* @memberof Complex128.prototype\n* @type {Function}\n* @returns {Object} serialized complex number\n*\n* @example\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var obj = z.toJSON();\n* // returns { 'type': 'Complex128', 're': 5.0, 'im': 3.0 }\n*/\nsetReadOnly( Complex128.prototype, 'toJSON', toJSON );\n\n\n// EXPORTS //\n\nexport default Complex128;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Serializes a complex number as a string.\n*\n* @private\n* @returns {string} serialized complex number\n*/\nfunction toString() { // eslint-disable-line stdlib/no-redeclare\n\t/* eslint-disable no-invalid-this */\n\tvar str = '' + this.re;\n\tif ( this.im < 0 ) {\n\t\tstr += ' - ' + (-this.im);\n\t} else {\n\t\tstr += ' + ' + this.im;\n\t}\n\tstr += 'i';\n\treturn str;\n}\n\n\n// EXPORTS //\n\nexport default toString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Serializes a complex number as a JSON object.\n*\n* @private\n* @returns {Object} JSON representation\n*/\nfunction toJSON() {\n\t/* eslint-disable no-invalid-this */\n\tvar out = {};\n\tout.type = 'Complex128';\n\tout.re = this.re;\n\tout.im = this.im;\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default toJSON;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar fround = ( typeof Math.fround === 'function' ) ? Math.fround : null; // eslint-disable-line stdlib/no-builtin-math\n\n\n// EXPORTS //\n\nexport default fround;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport Float32Array from '@stdlib/array-float32';\n\n\n// VARIABLES //\n\nvar FLOAT32_VIEW = new Float32Array( 1 );\n\n\n// MAIN //\n\n/**\n* Converts a double-precision floating-point number to the nearest single-precision floating-point number.\n*\n* @param {number} x - double-precision floating-point number\n* @returns {number} nearest single-precision floating-point number\n*\n* @example\n* var y = float64ToFloat32( 1.337 );\n* // returns 1.3370000123977661\n*/\nfunction float64ToFloat32( x ) {\n\tFLOAT32_VIEW[ 0 ] = x;\n\treturn FLOAT32_VIEW[ 0 ];\n}\n\n\n// EXPORTS //\n\nexport default float64ToFloat32;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Convert a double-precision floating-point number to the nearest single-precision floating-point number.\n*\n* @module @stdlib/number-float64-base-to-float32\n*\n* @example\n* import float64ToFloat32 from '@stdlib/number-float64-base-to-float32';\n*\n* var y = float64ToFloat32( 1.337 );\n* // returns 1.3370000123977661\n*/\n\n// MODULES //\n\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar float64ToFloat32;\nif ( typeof builtin === 'function' ) {\n\tfloat64ToFloat32 = builtin;\n} else {\n\tfloat64ToFloat32 = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default float64ToFloat32;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isNumber } from '@stdlib/assert-is-number';\nimport defineProperty from '@stdlib/utils-define-property';\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport float64ToFloat32 from '@stdlib/number-float64-base-to-float32';\nimport format from '@stdlib/string-format';\nimport toStr from './tostring.js';\nimport toJSON from './tojson.js';\n\n\n// MAIN //\n\n/**\n* 64-bit complex number constructor.\n*\n* @constructor\n* @param {number} real - real component\n* @param {number} imag - imaginary component\n* @throws {TypeError} must invoke using the `new` keyword\n* @throws {TypeError} real component must be a number\n* @throws {TypeError} imaginary component must be a number\n* @returns {Complex64} 64-bit complex number\n*\n* @example\n* var z = new Complex64( 5.0, 3.0 );\n* // returns \n*/\nfunction Complex64( real, imag ) {\n\tif ( !( this instanceof Complex64 ) ) {\n\t\tthrow new TypeError( 'invalid invocation. Constructor must be called with the `new` keyword.' );\n\t}\n\tif ( !isNumber( real ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Real component must be a number. Value: `%s`.', real ) );\n\t}\n\tif ( !isNumber( imag ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Imaginary component must be a number. Value: `%s`.', imag ) );\n\t}\n\tdefineProperty( this, 're', {\n\t\t'configurable': false,\n\t\t'enumerable': true,\n\t\t'writable': false,\n\t\t'value': float64ToFloat32( real )\n\t});\n\tdefineProperty( this, 'im', {\n\t\t'configurable': false,\n\t\t'enumerable': true,\n\t\t'writable': false,\n\t\t'value': float64ToFloat32( imag )\n\t});\n\treturn this;\n}\n\n/**\n* Size (in bytes) of each component.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex64\n* @type {integer}\n* @returns {integer} size of each component\n*\n* @example\n* var nbytes = Complex64.BYTES_PER_ELEMENT;\n* // returns 4\n*/\nsetReadOnly( Complex64, 'BYTES_PER_ELEMENT', 4 );\n\n/**\n* Size (in bytes) of each component.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex64.prototype\n* @type {integer}\n* @returns {integer} size of each component\n*\n* @example\n* var z = new Complex64( 5.0, 3.0 );\n*\n* var nbytes = z.BYTES_PER_ELEMENT;\n* // returns 4\n*/\nsetReadOnly( Complex64.prototype, 'BYTES_PER_ELEMENT', 4 );\n\n/**\n* Length (in bytes) of a complex number.\n*\n* @name byteLength\n* @memberof Complex64.prototype\n* @type {integer}\n* @returns {integer} byte length\n*\n* @example\n* var z = new Complex64( 5.0, 3.0 );\n*\n* var nbytes = z.byteLength;\n* // returns 8\n*/\nsetReadOnly( Complex64.prototype, 'byteLength', 8 );\n\n/**\n* Serializes a complex number as a string.\n*\n* @name toString\n* @memberof Complex64.prototype\n* @type {Function}\n* @returns {string} serialized complex number\n*\n* @example\n* var z = new Complex64( 5.0, 3.0 );\n*\n* var str = z.toString();\n* // returns '5 + 3i'\n*/\nsetReadOnly( Complex64.prototype, 'toString', toStr );\n\n/**\n* Serializes a complex number as a JSON object.\n*\n* ## Notes\n*\n* - `JSON.stringify()` implicitly calls this method when stringifying a `Complex64` instance.\n*\n* @name toJSON\n* @memberof Complex64.prototype\n* @type {Function}\n* @returns {Object} serialized complex number\n*\n* @example\n* var z = new Complex64( 5.0, 3.0 );\n*\n* var obj = z.toJSON();\n* // returns { 'type': 'Complex64', 're': 5.0, 'im': 3.0 }\n*/\nsetReadOnly( Complex64.prototype, 'toJSON', toJSON );\n\n\n// EXPORTS //\n\nexport default Complex64;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport Complex128 from '@stdlib/complex-float64';\nimport Complex64 from '@stdlib/complex-float32';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a complex number-like object.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a complex number-like object.\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n* import Complex64 from '@stdlib/complex-float32';\n*\n* var x = new Complex128( 4.0, 2.0 );\n* var bool = isComplexLike( x );\n* // returns true\n*\n* x = new Complex64( 4.0, 2.0 );\n* bool = isComplexLike( x );\n* // returns true\n*/\nfunction isComplexLike( value ) {\n\tif ( value instanceof Complex128 || value instanceof Complex64 ) {\n\t\treturn true;\n\t}\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\ttypeof value.re === 'number' &&\n\t\ttypeof value.im === 'number'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isComplexLike;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isInteger from '@stdlib/math-base-assert-is-integer';\n\n\n// MAIN //\n\n/**\n* Tests if a finite numeric value is an even number.\n*\n* @param {number} x - value to test\n* @returns {boolean} boolean indicating whether the value is an even number\n*\n* @example\n* var bool = isEven( 5.0 );\n* // returns false\n*\n* @example\n* var bool = isEven( -2.0 );\n* // returns true\n*\n* @example\n* var bool = isEven( 0.0 );\n* // returns true\n*\n* @example\n* var bool = isEven( NaN );\n* // returns false\n*/\nfunction isEven( x ) {\n\treturn isInteger( x/2.0 );\n}\n\n\n// EXPORTS //\n\nexport default isEven;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Serializes a complex number as a string.\n*\n* @private\n* @returns {string} serialized complex number\n*/\nfunction toString() { // eslint-disable-line stdlib/no-redeclare\n\t/* eslint-disable no-invalid-this */\n\tvar str = '' + this.re;\n\tif ( this.im < 0 ) {\n\t\tstr += ' - ' + (-this.im);\n\t} else {\n\t\tstr += ' + ' + this.im;\n\t}\n\tstr += 'i';\n\treturn str;\n}\n\n\n// EXPORTS //\n\nexport default toString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Serializes a complex number as a JSON object.\n*\n* @private\n* @returns {Object} JSON representation\n*/\nfunction toJSON() {\n\t/* eslint-disable no-invalid-this */\n\tvar out = {};\n\tout.type = 'Complex64';\n\tout.re = this.re;\n\tout.im = this.im;\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default toJSON;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// VARIABLES //\n\nvar BYTES_PER_ELEMENT = 8; // 4 bytes per float32 x (1 real + 1 imag component)\n\n\n// MAIN //\n\n/**\n* Returns a boolean indicating if a value is a `Complex64Array`.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a `Complex64Array`\n*\n* @example\n* import Complex64Array from '@stdlib/array-complex64';\n*\n* var bool = isComplex64Array( new Complex64Array( 10 ) );\n* // returns true\n*\n* bool = isComplex64Array( [] );\n* // returns false\n*/\nfunction isComplex64Array( value ) {\n\t// Note: the following is not robust and that is intentional. In this case, we are seeking a lower cost way to reasonably determine whether an input value is a `Complex64Array` in order to avoid walking the prototype chain and resolving constructors, which is necessary for robust identification of cross-realm instances. For more robust validation, see `@stdlib/assert/is-complex64array`.\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\tvalue.constructor.name === 'Complex64Array' &&\n\t\tvalue.BYTES_PER_ELEMENT === BYTES_PER_ELEMENT\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isComplex64Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// VARIABLES //\n\nvar BYTES_PER_ELEMENT = 16; // 8 bytes per float64 x (1 real + 1 imag component)\n\n\n// MAIN //\n\n/**\n* Returns a boolean indicating if a value is a `Complex128Array`.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a `Complex128Array`\n*\n* @example\n* import Complex128Array from '@stdlib/array-complex128';\n*\n* var bool = isComplex128Array( new Complex128Array( 10 ) );\n* // returns true\n*\n* bool = isComplex128Array( [] );\n* // returns false\n*/\nfunction isComplex128Array( value ) {\n\t// Note: the following is not robust and that is intentional. In this case, we are seeking a lower cost way to reasonably determine whether an input value is a `Complex128Array` in order to avoid walking the prototype chain and resolving constructors, which is necessary for robust identification of cross-realm instances. For more robust validation, see `@stdlib/assert/is-complex128array`.\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\tvalue.constructor.name === 'Complex128Array' &&\n\t\tvalue.BYTES_PER_ELEMENT === BYTES_PER_ELEMENT\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isComplex128Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar Sym = ( typeof Symbol === 'function' ) ? Symbol : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default Sym;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport hasOwnProp from '@stdlib/assert-has-own-property';\nimport Symbol from '@stdlib/symbol-ctor';\n\n\n// MAIN //\n\n/**\n* Tests for native `Symbol.iterator` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Symbol.iterator` support\n*\n* @example\n* var bool = hasIteratorSymbolSupport();\n* // returns \n*/\nfunction hasIteratorSymbolSupport() {\n\treturn (\n\t\ttypeof Symbol === 'function' &&\n\t\ttypeof Symbol( 'foo' ) === 'symbol' &&\n\t\thasOwnProp( Symbol, 'iterator' ) &&\n\t\ttypeof Symbol.iterator === 'symbol'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default hasIteratorSymbolSupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport hasIteratorSymbolSupport from '@stdlib/assert-has-iterator-symbol-support';\n\n\n// MAIN //\n\n/**\n* Iterator symbol.\n*\n* @name IteratorSymbol\n* @constant\n* @type {(symbol|null)}\n*\n* @example\n* function iterator() {\n* var it;\n* var i;\n*\n* i = -1;\n*\n* it = {};\n* it.next = next;\n* it.return = done;\n*\n* if ( IteratorSymbol ) {\n* it[ IteratorSymbol ] = iterator;\n* }\n* return it;\n*\n* function next() {\n* i += 1;\n* return {\n* 'value': i,\n* 'done': false\n* };\n* }\n*\n* function done( value ) {\n* if ( arguments.length === 0 ) {\n* return {\n* 'done': true\n* };\n* }\n* return {\n* 'value': value,\n* 'done': true\n* };\n* }\n* }\n*\n* var obj = iterator();\n*/\nvar IteratorSymbol = ( hasIteratorSymbolSupport() ) ? Symbol.iterator : null;\n\n\n// EXPORTS //\n\nexport default IteratorSymbol;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport defineProperty from '@stdlib/utils-define-property';\n\n\n// MAIN //\n\n/**\n* Defines a non-enumerable read-only accessor.\n*\n* @param {Object} obj - object on which to define the property\n* @param {(string|symbol)} prop - property name\n* @param {Function} getter - accessor\n*\n* @example\n* function getter() {\n* return 'bar';\n* }\n*\n* var obj = {};\n*\n* setNonEnumerableReadOnlyAccessor( obj, 'foo', getter );\n*\n* try {\n* obj.foo = 'boop';\n* } catch ( err ) {\n* console.error( err.message );\n* }\n*/\nfunction setNonEnumerableReadOnlyAccessor( obj, prop, getter ) { // eslint-disable-line id-length\n\tdefineProperty( obj, prop, {\n\t\t'configurable': false,\n\t\t'enumerable': false,\n\t\t'get': getter\n\t});\n}\n\n\n// EXPORTS //\n\nexport default setNonEnumerableReadOnlyAccessor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Returns the real component of a single-precision complex floating-point number.\n*\n* @param {Complex} z - complex number\n* @returns {number} real component\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n*\n* var z = new Complex64( 5.0, 3.0 );\n*\n* var re = realf( z );\n* // returns 5.0\n*/\nfunction realf( z ) {\n\treturn z.re;\n}\n\n\n// EXPORTS //\n\nexport default realf;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Returns the imaginary component of a single-precision complex floating-point number.\n*\n* @param {Complex} z - complex number\n* @returns {number} imaginary component\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n*\n* var z = new Complex64( 5.0, 3.0 );\n*\n* var im = imagf( z );\n* // returns 3.0\n*/\nfunction imagf( z ) {\n\treturn z.im;\n}\n\n\n// EXPORTS //\n\nexport default imagf;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport Float32Array from '@stdlib/array-float32';\n\n\n// MAIN //\n\n/**\n* Reinterprets a `Complex64Array` as a `Float32Array`.\n*\n* @param {Complex64Array} x - input array\n* @param {NonNegativeInteger} offset - starting index\n* @returns {Float32Array} `Float32Array` view\n*\n* @example\n* import Complex64Array from '@stdlib/array-complex64';\n*\n* var x = new Complex64Array( 10 );\n*\n* var out = reinterpret( x, 0 );\n* // returns \n*\n* var bool = ( out.buffer === x.buffer );\n* // returns true\n*/\nfunction reinterpret( x, offset ) {\n\treturn new Float32Array( x.buffer, x.byteOffset+(x.BYTES_PER_ELEMENT*offset), 2*(x.length-offset) ); // eslint-disable-line max-len\n}\n\n\n// EXPORTS //\n\nexport default reinterpret;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport Float64Array from '@stdlib/array-float64';\n\n\n// MAIN //\n\n/**\n* Reinterprets a `Complex128Array` as a `Float64Array`.\n*\n* @param {Complex128Array} x - input array\n* @param {NonNegativeInteger} offset - starting index\n* @returns {Float64Array} `Float64Array` view\n*\n* @example\n* import Complex128Array from '@stdlib/array-complex128';\n*\n* var x = new Complex128Array( 10 );\n*\n* var out = reinterpret( x, 0 );\n* // returns \n*\n* var bool = ( out.buffer === x.buffer );\n* // returns true\n*/\nfunction reinterpret( x, offset ) {\n\treturn new Float64Array( x.buffer, x.byteOffset+(x.BYTES_PER_ELEMENT*offset), 2*(x.length-offset) ); // eslint-disable-line max-len\n}\n\n\n// EXPORTS //\n\nexport default reinterpret;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// VARIABLES //\n\nvar GETTERS = {\n\t'float64': getFloat64,\n\t'float32': getFloat32,\n\t'int32': getInt32,\n\t'int16': getInt16,\n\t'int8': getInt8,\n\t'uint32': getUint32,\n\t'uint16': getUint16,\n\t'uint8': getUint8,\n\t'uint8c': getUint8c,\n\t'generic': getGeneric,\n\t'default': getArrayLike\n};\n\n\n// FUNCTIONS //\n\n/**\n* Returns an element from a `Float64Array`.\n*\n* @private\n* @param {Float64Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n*\n* var arr = new Float64Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getFloat64( arr, 2 );\n* // returns 3.0\n*/\nfunction getFloat64( arr, idx ) {\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from a `Float32Array`.\n*\n* @private\n* @param {Float32Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Float32Array from '@stdlib/array-float32';\n*\n* var arr = new Float32Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getFloat32( arr, 2 );\n* // returns 3.0\n*/\nfunction getFloat32( arr, idx ) {\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from an `Int32Array`.\n*\n* @private\n* @param {Int32Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Int32Array from '@stdlib/array-int32';\n*\n* var arr = new Int32Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getInt32( arr, 2 );\n* // returns 3\n*/\nfunction getInt32( arr, idx ) { // eslint-disable-line stdlib/jsdoc-doctest-decimal-point\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from an `Int16Array`.\n*\n* @private\n* @param {Int16Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Int16Array from '@stdlib/array-int16';\n*\n* var arr = new Int16Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getInt16( arr, 2 );\n* // returns 3\n*/\nfunction getInt16( arr, idx ) { // eslint-disable-line stdlib/jsdoc-doctest-decimal-point\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from an `Int8Array`.\n*\n* @private\n* @param {Int8Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Int8Array from '@stdlib/array-int8';\n*\n* var arr = new Int8Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getInt8( arr, 2 );\n* // returns 3\n*/\nfunction getInt8( arr, idx ) { // eslint-disable-line stdlib/jsdoc-doctest-decimal-point\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from a `Uint32Array`.\n*\n* @private\n* @param {Uint32Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Uint32Array from '@stdlib/array-uint32';\n*\n* var arr = new Uint32Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getUint32( arr, 2 );\n* // returns 3\n*/\nfunction getUint32( arr, idx ) { // eslint-disable-line stdlib/jsdoc-doctest-decimal-point\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from a `Uint16Array`.\n*\n* @private\n* @param {Uint16Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Uint16Array from '@stdlib/array-uint16';\n*\n* var arr = new Uint16Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getUint16( arr, 2 );\n* // returns 3\n*/\nfunction getUint16( arr, idx ) { // eslint-disable-line stdlib/jsdoc-doctest-decimal-point\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from a `Uint8Array`.\n*\n* @private\n* @param {Uint8Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Uint8Array from '@stdlib/array-uint8';\n*\n* var arr = new Uint8Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getUint8( arr, 2 );\n* // returns 3\n*/\nfunction getUint8( arr, idx ) { // eslint-disable-line stdlib/jsdoc-doctest-decimal-point\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from a `Uint8ClampedArray`.\n*\n* @private\n* @param {Uint8ClampedArray} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Uint8ClampedArray from '@stdlib/array-uint8c';\n*\n* var arr = new Uint8ClampedArray( [ 1, 2, 3, 4 ] );\n*\n* var v = getUint8c( arr, 2 );\n* // returns 3\n*/\nfunction getUint8c( arr, idx ) { // eslint-disable-line stdlib/jsdoc-doctest-decimal-point\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from a generic `Array`.\n*\n* @private\n* @param {Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {*} element value\n*\n* @example\n* var arr = [ 1, 2, 3, 4 ];\n*\n* var v = getGeneric( arr, 2 );\n* // returns 3\n*/\nfunction getGeneric( arr, idx ) {\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from an indexed array-like object.\n*\n* @private\n* @param {Collection} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {*} element value\n*\n* @example\n* var arr = [ 1, 2, 3, 4 ];\n*\n* var v = getArrayLike( arr, 2 );\n* // returns 3\n*/\nfunction getArrayLike( arr, idx ) {\n\treturn arr[ idx ];\n}\n\n\n// MAIN //\n\n/**\n* Returns an accessor function for retrieving an element from an indexed array-like object.\n*\n* @param {string} dtype - array dtype\n* @returns {Function} accessor\n*\n* @example\n* import dtype from '@stdlib/array-dtype';\n*\n* var arr = [ 1, 2, 3, 4 ];\n*\n* var get = getter( dtype( arr ) );\n* var v = get( arr, 2 );\n* // returns 3\n*/\nfunction getter( dtype ) {\n\tvar f = GETTERS[ dtype ];\n\tif ( typeof f === 'function' ) {\n\t\treturn f;\n\t}\n\treturn GETTERS.default;\n}\n\n\n// EXPORTS //\n\nexport default getter;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// VARIABLES //\n\nvar GETTERS = {\n\t'complex128': getComplex128,\n\t'complex64': getComplex64,\n\t'default': getArrayLike\n};\n\n\n// FUNCTIONS //\n\n/**\n* Returns an element from a `Complex128Array`.\n*\n* @private\n* @param {Complex128Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Complex128Array from '@stdlib/array-complex128';\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* var arr = new Complex128Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getComplex128( arr, 1 );\n* // returns \n*\n* var re = real( v );\n* // returns 3.0\n*\n* var im = imag( v );\n* // returns 4.0\n*/\nfunction getComplex128( arr, idx ) {\n\treturn arr.get( idx );\n}\n\n/**\n* Returns an element from a `Complex64Array`.\n*\n* @private\n* @param {Complex64Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Complex64Array from '@stdlib/array-complex64';\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* var arr = new Complex64Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getComplex64( arr, 1 );\n* // returns \n*\n* var re = realf( v );\n* // returns 3.0\n*\n* var im = imagf( v );\n* // returns 4.0\n*/\nfunction getComplex64( arr, idx ) {\n\treturn arr.get( idx );\n}\n\n/**\n* Returns an element from an array-like object supporting the get/set protocol.\n*\n* @private\n* @param {Collection} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {*} element value\n*\n* @example\n* var arr = [ 1, 2, 3, 4 ];\n*\n* function get( idx ) {\n* return arr[ idx ];\n* }\n*\n* function set( value, idx ) {\n* arr[ idx ] = value;\n* }\n*\n* arr.get = get;\n* arr.set = set;\n*\n* var v = getArrayLike( arr, 2 );\n* // returns 3\n*/\nfunction getArrayLike( arr, idx ) {\n\treturn arr.get( idx );\n}\n\n\n// MAIN //\n\n/**\n* Returns an accessor function for retrieving an element from an array-like object supporting the get/set protocol.\n*\n* @param {string} dtype - array dtype\n* @returns {Function} accessor\n*\n* @example\n* import Complex64Array from '@stdlib/array-complex64';\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n* import dtype from '@stdlib/array-dtype';\n*\n* var arr = new Complex64Array( [ 1, 2, 3, 4 ] );\n*\n* var get = getter( dtype( arr ) );\n* var v = get( arr, 1 );\n* // returns \n*\n* var re = realf( v );\n* // returns 3.0\n*\n* var im = imagf( v );\n* // returns 4.0\n*/\nfunction getter( dtype ) {\n\tvar f = GETTERS[ dtype ];\n\tif ( typeof f === 'function' ) {\n\t\treturn f;\n\t}\n\treturn GETTERS.default;\n}\n\n\n// EXPORTS //\n\nexport default getter;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isArrayLikeObject from '@stdlib/assert-is-array-like-object';\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport realf from '@stdlib/complex-realf';\nimport imagf from '@stdlib/complex-imagf';\nimport format from '@stdlib/string-format';\n\n\n// MAIN //\n\n/**\n* Returns an array of iterated values.\n*\n* @private\n* @param {Object} it - iterator\n* @returns {(Array|TypeError)} array or an error\n*/\nfunction fromIterator( it ) {\n\tvar out;\n\tvar v;\n\tvar z;\n\n\tout = [];\n\twhile ( true ) {\n\t\tv = it.next();\n\t\tif ( v.done ) {\n\t\t\tbreak;\n\t\t}\n\t\tz = v.value;\n\t\tif ( isArrayLikeObject( z ) && z.length >= 2 ) {\n\t\t\tout.push( z[ 0 ], z[ 1 ] );\n\t\t} else if ( isComplexLike( z ) ) {\n\t\t\tout.push( realf( z ), imagf( z ) );\n\t\t} else {\n\t\t\treturn new TypeError( format( 'invalid argument. An iterator must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', z ) );\n\t\t}\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default fromIterator;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isArrayLikeObject from '@stdlib/assert-is-array-like-object';\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport realf from '@stdlib/complex-realf';\nimport imagf from '@stdlib/complex-imagf';\nimport format from '@stdlib/string-format';\n\n\n// MAIN //\n\n/**\n* Returns an array of iterated values.\n*\n* @private\n* @param {Object} it - iterator\n* @param {Function} clbk - callback to invoke for each iterated value\n* @param {*} thisArg - invocation context\n* @returns {(Array|TypeError)} array or an error\n*/\nfunction fromIteratorMap( it, clbk, thisArg ) {\n\tvar out;\n\tvar v;\n\tvar z;\n\tvar i;\n\n\tout = [];\n\ti = -1;\n\twhile ( true ) {\n\t\tv = it.next();\n\t\tif ( v.done ) {\n\t\t\tbreak;\n\t\t}\n\t\ti += 1;\n\t\tz = clbk.call( thisArg, v.value, i );\n\t\tif ( isArrayLikeObject( z ) && z.length >= 2 ) {\n\t\t\tout.push( z[ 0 ], z[ 1 ] );\n\t\t} else if ( isComplexLike( z ) ) {\n\t\t\tout.push( realf( z ), imagf( z ) );\n\t\t} else {\n\t\t\treturn new TypeError( format( 'invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', z ) );\n\t\t}\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default fromIteratorMap;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport realf from '@stdlib/complex-realf';\nimport imagf from '@stdlib/complex-imagf';\n\n\n// MAIN //\n\n/**\n* Returns a strided array of real and imaginary components.\n*\n* @private\n* @param {Float32Array} buf - output array\n* @param {Array} arr - array containing complex numbers\n* @returns {(Float32Array|null)} output array or null\n*/\nfunction fromArray( buf, arr ) {\n\tvar len;\n\tvar v;\n\tvar i;\n\tvar j;\n\n\tlen = arr.length;\n\tj = 0;\n\tfor ( i = 0; i < len; i++ ) {\n\t\tv = arr[ i ];\n\t\tif ( !isComplexLike( v ) ) {\n\t\t\treturn null;\n\t\t}\n\t\tbuf[ j ] = realf( v );\n\t\tbuf[ j+1 ] = imagf( v );\n\t\tj += 2; // stride\n\t}\n\treturn buf;\n}\n\n\n// EXPORTS //\n\nexport default fromArray;\n","/* eslint-disable no-restricted-syntax, max-lines, no-invalid-this */\n\n/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isNonNegativeInteger } from '@stdlib/assert-is-nonnegative-integer';\nimport isArrayLikeObject from '@stdlib/assert-is-array-like-object';\nimport isCollection from '@stdlib/assert-is-collection';\nimport isArrayBuffer from '@stdlib/assert-is-arraybuffer';\nimport isObject from '@stdlib/assert-is-object';\nimport isArray from '@stdlib/assert-is-array';\nimport { isPrimitive as isString } from '@stdlib/assert-is-string';\nimport isFunction from '@stdlib/assert-is-function';\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport isEven from '@stdlib/math-base-assert-is-even';\nimport isInteger from '@stdlib/math-base-assert-is-integer';\nimport isComplex64Array from '@stdlib/array-base-assert-is-complex64array';\nimport isComplex128Array from '@stdlib/array-base-assert-is-complex128array';\nimport hasIteratorSymbolSupport from '@stdlib/assert-has-iterator-symbol-support';\nimport ITERATOR_SYMBOL from '@stdlib/symbol-iterator';\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport setReadOnlyAccessor from '@stdlib/utils-define-nonenumerable-read-only-accessor';\nimport Float32Array from '@stdlib/array-float32';\nimport Complex64 from '@stdlib/complex-float32';\nimport format from '@stdlib/string-format';\nimport realf from '@stdlib/complex-realf';\nimport imagf from '@stdlib/complex-imagf';\nimport floor from '@stdlib/math-base-special-floor';\nimport reinterpret64 from '@stdlib/strided-base-reinterpret-complex64';\nimport reinterpret128 from '@stdlib/strided-base-reinterpret-complex128';\nimport getter from '@stdlib/array-base-getter';\nimport accessorGetter from '@stdlib/array-base-accessor-getter';\nimport fromIterator from './from_iterator.js';\nimport fromIteratorMap from './from_iterator_map.js';\nimport fromArray from './from_array.js';\n\n\n// VARIABLES //\n\nvar BYTES_PER_ELEMENT = Float32Array.BYTES_PER_ELEMENT * 2;\nvar HAS_ITERATOR_SYMBOL = hasIteratorSymbolSupport();\n\n\n// FUNCTIONS //\n\n/**\n* Returns a boolean indicating if a value is a complex typed array.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a complex typed array\n*/\nfunction isComplexArray( value ) {\n\treturn (\n\t\tvalue instanceof Complex64Array ||\n\t\t(\n\t\t\ttypeof value === 'object' &&\n\t\t\tvalue !== null &&\n\t\t\t(\n\t\t\t\tvalue.constructor.name === 'Complex64Array' ||\n\t\t\t\tvalue.constructor.name === 'Complex128Array'\n\t\t\t) &&\n\t\t\ttypeof value._length === 'number' && // eslint-disable-line no-underscore-dangle\n\n\t\t\t// NOTE: we don't perform a more rigorous test here for a typed array for performance reasons, as robustly checking for a typed array instance could require walking the prototype tree and performing relatively expensive constructor checks...\n\t\t\ttypeof value._buffer === 'object' // eslint-disable-line no-underscore-dangle\n\t\t)\n\t);\n}\n\n/**\n* Returns a boolean indicating if a value is a complex typed array constructor.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a complex typed array constructor\n*/\nfunction isComplexArrayConstructor( value ) {\n\treturn (\n\t\tvalue === Complex64Array ||\n\n\t\t// NOTE: weaker test in order to avoid a circular dependency with Complex128Array...\n\t\tvalue.name === 'Complex128Array'\n\t);\n}\n\n/**\n* Retrieves a complex number from a complex number array buffer.\n*\n* @private\n* @param {Float32Array} buf - array buffer\n* @param {NonNegativeInteger} idx - element index\n* @returns {Complex64} complex number\n*/\nfunction getComplex64( buf, idx ) {\n\tidx *= 2;\n\treturn new Complex64( buf[ idx ], buf[ idx+1 ] );\n}\n\n\n// MAIN //\n\n/**\n* 64-bit complex number array constructor.\n*\n* @constructor\n* @param {(NonNegativeInteger|Collection|ArrayBuffer|Iterable)} [arg] - length, typed array, array-like object, buffer, or an iterable\n* @param {NonNegativeInteger} [byteOffset=0] - byte offset\n* @param {NonNegativeInteger} [length] - view length\n* @throws {RangeError} ArrayBuffer byte length must be a multiple of `8`\n* @throws {RangeError} array-like object and typed array input arguments must have a length which is a multiple of two\n* @throws {TypeError} if provided only a single argument, must provide a valid argument\n* @throws {TypeError} byte offset must be a nonnegative integer\n* @throws {RangeError} byte offset must be a multiple of `8`\n* @throws {TypeError} view length must be a positive multiple of `8`\n* @throws {RangeError} must provide sufficient memory to accommodate byte offset and view length requirements\n* @throws {TypeError} an iterator must return either a two element array containing real and imaginary components or a complex number\n* @returns {Complex64Array} complex number array\n*\n* @example\n* var arr = new Complex64Array();\n* // returns \n*\n* var len = arr.length;\n* // returns 0\n*\n* @example\n* var arr = new Complex64Array( 2 );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*\n* @example\n* var arr = new Complex64Array( [ 1.0, -1.0 ] );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* import ArrayBuffer from '@stdlib/array-buffer';\n*\n* var buf = new ArrayBuffer( 16 );\n* var arr = new Complex64Array( buf );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*\n* @example\n* import ArrayBuffer from '@stdlib/array-buffer';\n*\n* var buf = new ArrayBuffer( 16 );\n* var arr = new Complex64Array( buf, 8 );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* import ArrayBuffer from '@stdlib/array-buffer';\n*\n* var buf = new ArrayBuffer( 32 );\n* var arr = new Complex64Array( buf, 8, 2 );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*/\nfunction Complex64Array() {\n\tvar byteOffset;\n\tvar nargs;\n\tvar buf;\n\tvar len;\n\n\tnargs = arguments.length;\n\tif ( !(this instanceof Complex64Array) ) {\n\t\tif ( nargs === 0 ) {\n\t\t\treturn new Complex64Array();\n\t\t}\n\t\tif ( nargs === 1 ) {\n\t\t\treturn new Complex64Array( arguments[0] );\n\t\t}\n\t\tif ( nargs === 2 ) {\n\t\t\treturn new Complex64Array( arguments[0], arguments[1] );\n\t\t}\n\t\treturn new Complex64Array( arguments[0], arguments[1], arguments[2] );\n\t}\n\t// Create the underlying data buffer...\n\tif ( nargs === 0 ) {\n\t\tbuf = new Float32Array( 0 ); // backward-compatibility\n\t} else if ( nargs === 1 ) {\n\t\tif ( isNonNegativeInteger( arguments[0] ) ) {\n\t\t\tbuf = new Float32Array( arguments[0]*2 );\n\t\t} else if ( isCollection( arguments[0] ) ) {\n\t\t\tbuf = arguments[ 0 ];\n\t\t\tlen = buf.length;\n\n\t\t\t// If provided a \"generic\" array, peak at the first value, and, if the value is a complex number, try to process as an array of complex numbers, falling back to \"normal\" typed array initialization if we fail and ensuring consistency if the first value had not been a complex number...\n\t\t\tif ( len && isArray( buf ) && isComplexLike( buf[0] ) ) {\n\t\t\t\tbuf = fromArray( new Float32Array( len*2 ), buf );\n\t\t\t\tif ( buf === null ) {\n\t\t\t\t\t// We failed and we are now forced to allocate a new array :-(\n\t\t\t\t\tif ( !isEven( len ) ) {\n\t\t\t\t\t\tthrow new RangeError( format( 'invalid argument. Array-like object arguments must have a length which is a multiple of two. Length: `%u`.', len ) );\n\t\t\t\t\t}\n\t\t\t\t\t// We failed, so fall back to directly setting values...\n\t\t\t\t\tbuf = new Float32Array( arguments[0] );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ( isComplex64Array( buf ) ) {\n\t\t\t\t\tbuf = reinterpret64( buf, 0 );\n\t\t\t\t} else if ( isComplex128Array( buf ) ) {\n\t\t\t\t\tbuf = reinterpret128( buf, 0 );\n\t\t\t\t} else if ( !isEven( len ) ) {\n\t\t\t\t\tthrow new RangeError( format( 'invalid argument. Array-like object and typed array arguments must have a length which is a multiple of two. Length: `%u`.', len ) );\n\t\t\t\t}\n\t\t\t\tbuf = new Float32Array( buf );\n\t\t\t}\n\t\t} else if ( isArrayBuffer( arguments[0] ) ) {\n\t\t\tbuf = arguments[ 0 ];\n\t\t\tif ( !isInteger( buf.byteLength/BYTES_PER_ELEMENT ) ) {\n\t\t\t\tthrow new RangeError( format( 'invalid argument. ArrayBuffer byte length must be a multiple of %u. Byte length: `%u`.', BYTES_PER_ELEMENT, buf.byteLength ) );\n\t\t\t}\n\t\t\tbuf = new Float32Array( buf );\n\t\t} else if ( isObject( arguments[0] ) ) {\n\t\t\tbuf = arguments[ 0 ];\n\t\t\tif ( HAS_ITERATOR_SYMBOL === false ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Environment lacks Symbol.iterator support. Must provide a length, ArrayBuffer, typed array, or array-like object. Value: `%s`.', buf ) );\n\t\t\t}\n\t\t\tif ( !isFunction( buf[ ITERATOR_SYMBOL ] ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.', buf ) );\n\t\t\t}\n\t\t\tbuf = buf[ ITERATOR_SYMBOL ]();\n\t\t\tif ( !isFunction( buf.next ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.', buf ) ); // FIXME: `buf` is what is returned from above, NOT the original value\n\t\t\t}\n\t\t\tbuf = fromIterator( buf );\n\t\t\tif ( buf instanceof Error ) {\n\t\t\t\tthrow buf;\n\t\t\t}\n\t\t\tbuf = new Float32Array( buf );\n\t\t} else {\n\t\t\tthrow new TypeError( format( 'invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.', arguments[0] ) );\n\t\t}\n\t} else {\n\t\tbuf = arguments[ 0 ];\n\t\tif ( !isArrayBuffer( buf ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. First argument must be an ArrayBuffer. Value: `%s`.', buf ) );\n\t\t}\n\t\tbyteOffset = arguments[ 1 ];\n\t\tif ( !isNonNegativeInteger( byteOffset ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Byte offset must be a nonnegative integer. Value: `%s`.', byteOffset ) );\n\t\t}\n\t\tif ( !isInteger( byteOffset/BYTES_PER_ELEMENT ) ) {\n\t\t\tthrow new RangeError( format( 'invalid argument. Byte offset must be a multiple of %u. Value: `%u`.', BYTES_PER_ELEMENT, byteOffset ) );\n\t\t}\n\t\tif ( nargs === 2 ) {\n\t\t\tlen = buf.byteLength - byteOffset;\n\t\t\tif ( !isInteger( len/BYTES_PER_ELEMENT ) ) {\n\t\t\t\tthrow new RangeError( format( 'invalid arguments. ArrayBuffer view byte length must be a multiple of %u. View byte length: `%u`.', BYTES_PER_ELEMENT, len ) );\n\t\t\t}\n\t\t\tbuf = new Float32Array( buf, byteOffset );\n\t\t} else {\n\t\t\tlen = arguments[ 2 ];\n\t\t\tif ( !isNonNegativeInteger( len ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Length must be a nonnegative integer. Value: `%s`.', len ) );\n\t\t\t}\n\t\t\tif ( (len*BYTES_PER_ELEMENT) > (buf.byteLength-byteOffset) ) {\n\t\t\t\tthrow new RangeError( format( 'invalid arguments. ArrayBuffer has insufficient capacity. Either decrease the array length or provide a bigger buffer. Minimum capacity: `%u`.', len*BYTES_PER_ELEMENT ) );\n\t\t\t}\n\t\t\tbuf = new Float32Array( buf, byteOffset, len*2 );\n\t\t}\n\t}\n\tsetReadOnly( this, '_buffer', buf );\n\tsetReadOnly( this, '_length', buf.length/2 );\n\n\treturn this;\n}\n\n/**\n* Size (in bytes) of each array element.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex64Array\n* @readonly\n* @type {PositiveInteger}\n* @default 8\n*\n* @example\n* var nbytes = Complex64Array.BYTES_PER_ELEMENT;\n* // returns 8\n*/\nsetReadOnly( Complex64Array, 'BYTES_PER_ELEMENT', BYTES_PER_ELEMENT );\n\n/**\n* Constructor name.\n*\n* @name name\n* @memberof Complex64Array\n* @readonly\n* @type {string}\n* @default 'Complex64Array'\n*\n* @example\n* var str = Complex64Array.name;\n* // returns 'Complex64Array'\n*/\nsetReadOnly( Complex64Array, 'name', 'Complex64Array' );\n\n/**\n* Creates a new 64-bit complex number array from an array-like object or an iterable.\n*\n* @name from\n* @memberof Complex64Array\n* @type {Function}\n* @param {(Collection|Iterable)} src - array-like object or iterable\n* @param {Function} [clbk] - callback to invoke for each source element\n* @param {*} [thisArg] - context\n* @throws {TypeError} `this` context must be a constructor\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be an array-like object or an iterable\n* @throws {TypeError} second argument must be a function\n* @throws {RangeError} array-like objects must have a length which is a multiple of two\n* @throws {TypeError} an iterator must return either a two element array containing real and imaginary components or a complex number\n* @throws {TypeError} when provided an iterator, a callback must return either a two element array containing real and imaginary components or a complex number\n* @returns {Complex64Array} 64-bit complex number array\n*\n* @example\n* var arr = Complex64Array.from( [ 1.0, -1.0 ] );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n*\n* var arr = Complex64Array.from( [ new Complex64( 1.0, 1.0 ) ] );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* function clbk( v ) {\n* return new Complex64( realf(v)*2.0, imagf(v)*2.0 );\n* }\n*\n* var arr = Complex64Array.from( [ new Complex64( 1.0, 1.0 ) ], clbk );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*/\nsetReadOnly( Complex64Array, 'from', function from( src ) {\n\tvar thisArg;\n\tvar nargs;\n\tvar clbk;\n\tvar out;\n\tvar buf;\n\tvar tmp;\n\tvar get;\n\tvar len;\n\tvar flg;\n\tvar v;\n\tvar i;\n\tvar j;\n\tif ( !isFunction( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` context must be a constructor.' );\n\t}\n\tif ( !isComplexArrayConstructor( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tnargs = arguments.length;\n\tif ( nargs > 1 ) {\n\t\tclbk = arguments[ 1 ];\n\t\tif ( !isFunction( clbk ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be a function. Value: `%s`.', clbk ) );\n\t\t}\n\t\tif ( nargs > 2 ) {\n\t\t\tthisArg = arguments[ 2 ];\n\t\t}\n\t}\n\tif ( isComplexArray( src ) ) {\n\t\tlen = src.length;\n\t\tif ( clbk ) {\n\t\t\tout = new this( len );\n\t\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\t\tj = 0;\n\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\tv = clbk.call( thisArg, src.get( i ), i );\n\t\t\t\tif ( isComplexLike( v ) ) {\n\t\t\t\t\tbuf[ j ] = realf( v );\n\t\t\t\t\tbuf[ j+1 ] = imagf( v );\n\t\t\t\t} else if ( isArrayLikeObject( v ) && v.length >= 2 ) {\n\t\t\t\t\tbuf[ j ] = v[ 0 ];\n\t\t\t\t\tbuf[ j+1 ] = v[ 1 ];\n\t\t\t\t} else {\n\t\t\t\t\tthrow new TypeError( format( 'invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', v ) );\n\t\t\t\t}\n\t\t\t\tj += 2; // stride\n\t\t\t}\n\t\t\treturn out;\n\t\t}\n\t\treturn new this( src );\n\t}\n\tif ( isCollection( src ) ) {\n\t\tif ( clbk ) {\n\t\t\t// Note: array contents affect how we iterate over a provided data source. If only complex number objects, we can extract real and imaginary components. Otherwise, for non-complex number arrays (e.g., `Float64Array`, etc), we assume a strided array where real and imaginary components are interleaved. In the former case, we expect a callback to return real and imaginary components (possibly as a complex number). In the latter case, we expect a callback to return *either* a real or imaginary component.\n\n\t\t\tlen = src.length;\n\t\t\tif ( src.get && src.set ) {\n\t\t\t\tget = accessorGetter( 'default' );\n\t\t\t} else {\n\t\t\t\tget = getter( 'default' );\n\t\t\t}\n\t\t\t// Detect whether we've been provided an array which returns complex number objects...\n\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\tif ( !isComplexLike( get( src, i ) ) ) {\n\t\t\t\t\tflg = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// If an array does not contain only complex number objects, then we assume interleaved real and imaginary components...\n\t\t\tif ( flg ) {\n\t\t\t\tif ( !isEven( len ) ) {\n\t\t\t\t\tthrow new RangeError( format( 'invalid argument. First argument must have a length which is a multiple of %u. Length: `%u`.', 2, len ) );\n\t\t\t\t}\n\t\t\t\tout = new this( len/2 );\n\t\t\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\t\tbuf[ i ] = clbk.call( thisArg, get( src, i ), i );\n\t\t\t\t}\n\t\t\t\treturn out;\n\t\t\t}\n\t\t\t// If an array contains only complex number objects, then we need to extract real and imaginary components...\n\t\t\tout = new this( len );\n\t\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\t\tj = 0;\n\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\tv = clbk.call( thisArg, get( src, i ), i );\n\t\t\t\tif ( isComplexLike( v ) ) {\n\t\t\t\t\tbuf[ j ] = realf( v );\n\t\t\t\t\tbuf[ j+1 ] = imagf( v );\n\t\t\t\t} else if ( isArrayLikeObject( v ) && v.length >= 2 ) {\n\t\t\t\t\tbuf[ j ] = v[ 0 ];\n\t\t\t\t\tbuf[ j+1 ] = v[ 1 ];\n\t\t\t\t} else {\n\t\t\t\t\tthrow new TypeError( format( 'invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', v ) );\n\t\t\t\t}\n\t\t\t\tj += 2; // stride\n\t\t\t}\n\t\t\treturn out;\n\t\t}\n\t\treturn new this( src );\n\t}\n\tif ( isObject( src ) && HAS_ITERATOR_SYMBOL && isFunction( src[ ITERATOR_SYMBOL ] ) ) { // eslint-disable-line max-len\n\t\tbuf = src[ ITERATOR_SYMBOL ]();\n\t\tif ( !isFunction( buf.next ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.', src ) );\n\t\t}\n\t\tif ( clbk ) {\n\t\t\ttmp = fromIteratorMap( buf, clbk, thisArg );\n\t\t} else {\n\t\t\ttmp = fromIterator( buf );\n\t\t}\n\t\tif ( tmp instanceof Error ) {\n\t\t\tthrow tmp;\n\t\t}\n\t\tlen = tmp.length / 2;\n\t\tout = new this( len );\n\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\tbuf[ i ] = tmp[ i ];\n\t\t}\n\t\treturn out;\n\t}\n\tthrow new TypeError( format( 'invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.', src ) );\n});\n\n/**\n* Creates a new 64-bit complex number array from a variable number of arguments.\n*\n* @name of\n* @memberof Complex64Array\n* @type {Function}\n* @param {...*} element - array elements\n* @throws {TypeError} `this` context must be a constructor\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Complex64Array} 64-bit complex number array\n*\n* @example\n* var arr = Complex64Array.of( 1.0, 1.0, 1.0, 1.0 );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*/\nsetReadOnly( Complex64Array, 'of', function of() {\n\tvar args;\n\tvar i;\n\tif ( !isFunction( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` context must be a constructor.' );\n\t}\n\tif ( !isComplexArrayConstructor( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\targs = [];\n\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\targs.push( arguments[ i ] );\n\t}\n\treturn new this( args );\n});\n\n/**\n* Returns an array element with support for both nonnegative and negative integer indices.\n*\n* @name at\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {integer} idx - element index\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} must provide an integer\n* @returns {(Complex64|void)} array element\n*\n* @example\n* var arr = new Complex64Array( 10 );\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* var z = arr.at( 0 );\n* // returns \n*\n* var re = realf( z );\n* // returns 0.0\n*\n* var im = imagf( z );\n* // returns 0.0\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 9.0, -9.0 ], 9 );\n*\n* z = arr.at( 0 );\n* // returns \n*\n* re = realf( z );\n* // returns 1.0\n*\n* im = imagf( z );\n* // returns -1.0\n*\n* z = arr.at( -1 );\n* // returns \n*\n* re = realf( z );\n* // returns 9.0\n*\n* im = imagf( z );\n* // returns -9.0\n*\n* z = arr.at( 100 );\n* // returns undefined\n*\n* z = arr.at( -100 );\n* // returns undefined\n*/\nsetReadOnly( Complex64Array.prototype, 'at', function at( idx ) {\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isInteger( idx ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Must provide an integer. Value: `%s`.', idx ) );\n\t}\n\tif ( idx < 0 ) {\n\t\tidx += this._length;\n\t}\n\tif ( idx < 0 || idx >= this._length ) {\n\t\treturn;\n\t}\n\treturn getComplex64( this._buffer, idx );\n});\n\n/**\n* Pointer to the underlying data buffer.\n*\n* @name buffer\n* @memberof Complex64Array.prototype\n* @readonly\n* @type {ArrayBuffer}\n*\n* @example\n* var arr = new Complex64Array( 10 );\n*\n* var buf = arr.buffer;\n* // returns \n*/\nsetReadOnlyAccessor( Complex64Array.prototype, 'buffer', function get() {\n\treturn this._buffer.buffer;\n});\n\n/**\n* Size (in bytes) of the array.\n*\n* @name byteLength\n* @memberof Complex64Array.prototype\n* @readonly\n* @type {NonNegativeInteger}\n*\n* @example\n* var arr = new Complex64Array( 10 );\n*\n* var byteLength = arr.byteLength;\n* // returns 80\n*/\nsetReadOnlyAccessor( Complex64Array.prototype, 'byteLength', function get() {\n\treturn this._buffer.byteLength;\n});\n\n/**\n* Offset (in bytes) of the array from the start of its underlying `ArrayBuffer`.\n*\n* @name byteOffset\n* @memberof Complex64Array.prototype\n* @readonly\n* @type {NonNegativeInteger}\n*\n* @example\n* var arr = new Complex64Array( 10 );\n*\n* var byteOffset = arr.byteOffset;\n* // returns 0\n*/\nsetReadOnlyAccessor( Complex64Array.prototype, 'byteOffset', function get() {\n\treturn this._buffer.byteOffset;\n});\n\n/**\n* Size (in bytes) of each array element.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex64Array.prototype\n* @readonly\n* @type {PositiveInteger}\n* @default 8\n*\n* @example\n* var arr = new Complex64Array( 10 );\n*\n* var nbytes = arr.BYTES_PER_ELEMENT;\n* // returns 8\n*/\nsetReadOnly( Complex64Array.prototype, 'BYTES_PER_ELEMENT', Complex64Array.BYTES_PER_ELEMENT );\n\n/**\n* Copies a sequence of elements within the array to the position starting at `target`.\n*\n* @name copyWithin\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {integer} target - index at which to start copying elements\n* @param {integer} start - source index at which to copy elements from\n* @param {integer} [end] - source index at which to stop copying elements from\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Complex64Array} modified array\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* var arr = new Complex64Array( 4 );\n*\n* // Set the array elements:\n* arr.set( new Complex64( 1.0, 1.0 ), 0 );\n* arr.set( new Complex64( 2.0, 2.0 ), 1 );\n* arr.set( new Complex64( 3.0, 3.0 ), 2 );\n* arr.set( new Complex64( 4.0, 4.0 ), 3 );\n*\n* // Copy the first two elements to the last two elements:\n* arr.copyWithin( 2, 0, 2 );\n*\n* // Get the last array element:\n* var z = arr.get( 3 );\n*\n* var re = realf( z );\n* // returns 2.0\n*\n* var im = imagf( z );\n* // returns 2.0\n*/\nsetReadOnly( Complex64Array.prototype, 'copyWithin', function copyWithin( target, start ) {\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\t// FIXME: prefer a functional `copyWithin` implementation which addresses lack of universal browser support (e.g., IE11 and Safari) or ensure that typed arrays are polyfilled\n\tif ( arguments.length === 2 ) {\n\t\tthis._buffer.copyWithin( target*2, start*2 );\n\t} else {\n\t\tthis._buffer.copyWithin( target*2, start*2, arguments[2]*2 );\n\t}\n\treturn this;\n});\n\n/**\n* Returns an iterator for iterating over array key-value pairs.\n*\n* @name entries\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Iterator} iterator\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n*\n* var arr = [\n* new Complex64( 1.0, 1.0 ),\n* new Complex64( 2.0, 2.0 ),\n* new Complex64( 3.0, 3.0 )\n* ];\n* arr = new Complex64Array( arr );\n*\n* // Create an iterator:\n* var it = arr.entries();\n*\n* // Iterate over the key-value pairs...\n* var v = it.next().value;\n* // returns [ 0, ]\n*\n* v = it.next().value;\n* // returns [ 1, ]\n*\n* v = it.next().value;\n* // returns [ 2, ]\n*\n* var bool = it.next().done;\n* // returns true\n*/\nsetReadOnly( Complex64Array.prototype, 'entries', function entries() {\n\tvar buffer;\n\tvar self;\n\tvar iter;\n\tvar len;\n\tvar FLG;\n\tvar i;\n\tvar j;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tself = this;\n\tbuffer = this._buffer;\n\tlen = this._length;\n\n\t// Initialize the iteration indices:\n\ti = -1;\n\tj = -2;\n\n\t// Create an iterator protocol-compliant object:\n\titer = {};\n\tsetReadOnly( iter, 'next', next );\n\tsetReadOnly( iter, 'return', end );\n\n\tif ( ITERATOR_SYMBOL ) {\n\t\tsetReadOnly( iter, ITERATOR_SYMBOL, factory );\n\t}\n\treturn iter;\n\n\t/**\n\t* Returns an iterator protocol-compliant object containing the next iterated value.\n\t*\n\t* @private\n\t* @returns {Object} iterator protocol-compliant object\n\t*/\n\tfunction next() {\n\t\tvar z;\n\t\ti += 1;\n\t\tif ( FLG || i >= len ) {\n\t\t\treturn {\n\t\t\t\t'done': true\n\t\t\t};\n\t\t}\n\t\tj += 2;\n\t\tz = new Complex64( buffer[ j ], buffer[ j+1 ] );\n\t\treturn {\n\t\t\t'value': [ i, z ],\n\t\t\t'done': false\n\t\t};\n\t}\n\n\t/**\n\t* Finishes an iterator.\n\t*\n\t* @private\n\t* @param {*} [value] - value to return\n\t* @returns {Object} iterator protocol-compliant object\n\t*/\n\tfunction end( value ) {\n\t\tFLG = true;\n\t\tif ( arguments.length ) {\n\t\t\treturn {\n\t\t\t\t'value': value,\n\t\t\t\t'done': true\n\t\t\t};\n\t\t}\n\t\treturn {\n\t\t\t'done': true\n\t\t};\n\t}\n\n\t/**\n\t* Returns a new iterator.\n\t*\n\t* @private\n\t* @returns {Iterator} iterator\n\t*/\n\tfunction factory() {\n\t\treturn self.entries();\n\t}\n});\n\n/**\n* Tests whether all elements in an array pass a test implemented by a predicate function.\n*\n* @name every\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {boolean} boolean indicating whether all elements pass a test\n*\n* @example\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* function predicate( v ) {\n* return ( realf( v ) === imagf( v ) );\n* }\n*\n* var arr = new Complex64Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var bool = arr.every( predicate );\n* // returns true\n*/\nsetReadOnly( Complex64Array.prototype, 'every', function every( predicate, thisArg ) {\n\tvar buf;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tif ( !predicate.call( thisArg, getComplex64( buf, i ), i, this ) ) {\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn true;\n});\n\n/**\n* Returns a modified typed array filled with a fill value.\n*\n* @name fill\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {ComplexLike} value - fill value\n* @param {integer} [start=0] - starting index (inclusive)\n* @param {integer} [end] - ending index (exclusive)\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a complex number\n* @throws {TypeError} second argument must be an integer\n* @throws {TypeError} third argument must be an integer\n*\n* @example\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* var arr = new Complex64Array( 3 );\n*\n* arr.fill( new Complex64( 1.0, 1.0 ), 1 );\n*\n* var z = arr.get( 1 );\n* // returns \n*\n* var re = realf( z );\n* // returns 1.0\n*\n* var im = imagf( z );\n* // returns 1.0\n*\n* z = arr.get( 1 );\n* // returns \n*\n* re = realf( z );\n* // returns 1.0\n*\n* im = imagf( z );\n* // returns 1.0\n*/\nsetReadOnly( Complex64Array.prototype, 'fill', function fill( value, start, end ) {\n\tvar buf;\n\tvar len;\n\tvar idx;\n\tvar re;\n\tvar im;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isComplexLike( value ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a complex number. Value: `%s`.', value ) );\n\t}\n\tbuf = this._buffer;\n\tlen = this._length;\n\tif ( arguments.length > 1 ) {\n\t\tif ( !isInteger( start ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be an integer. Value: `%s`.', start ) );\n\t\t}\n\t\tif ( start < 0 ) {\n\t\t\tstart += len;\n\t\t\tif ( start < 0 ) {\n\t\t\t\tstart = 0;\n\t\t\t}\n\t\t}\n\t\tif ( arguments.length > 2 ) {\n\t\t\tif ( !isInteger( end ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Third argument must be an integer. Value: `%s`.', end ) );\n\t\t\t}\n\t\t\tif ( end < 0 ) {\n\t\t\t\tend += len;\n\t\t\t\tif ( end < 0 ) {\n\t\t\t\t\tend = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( end > len ) {\n\t\t\t\tend = len;\n\t\t\t}\n\t\t} else {\n\t\t\tend = len;\n\t\t}\n\t} else {\n\t\tstart = 0;\n\t\tend = len;\n\t}\n\tre = realf( value );\n\tim = imagf( value );\n\tfor ( i = start; i < end; i++ ) {\n\t\tidx = 2*i;\n\t\tbuf[ idx ] = re;\n\t\tbuf[ idx+1 ] = im;\n\t}\n\treturn this;\n});\n\n/**\n* Returns a new array containing the elements of an array which pass a test implemented by a predicate function.\n*\n* @name filter\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {Complex64Array} complex number array\n*\n* @example\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* function predicate( v ) {\n* return ( realf( v ) === imagf( v ) );\n* }\n*\n* var arr = new Complex64Array( 3 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n*\n* var out = arr.filter( predicate );\n* // returns \n*\n* var len = out.length;\n* // returns 1\n*\n* var z = out.get( 0 );\n* // returns \n*\n* var re = realf( z );\n* // returns 2.0\n*\n* var im = imagf( z );\n* // returns 2.0\n*/\nsetReadOnly( Complex64Array.prototype, 'filter', function filter( predicate, thisArg ) {\n\tvar buf;\n\tvar out;\n\tvar i;\n\tvar z;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tout = [];\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tz = getComplex64( buf, i );\n\t\tif ( predicate.call( thisArg, z, i, this ) ) {\n\t\t\tout.push( z );\n\t\t}\n\t}\n\treturn new this.constructor( out );\n});\n\n/**\n* Returns the first element in an array for which a predicate function returns a truthy value.\n*\n* @name find\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {(Complex64|void)} array element or undefined\n*\n* @example\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n* import Complex64 from '@stdlib/complex-float32';\n*\n* function predicate( v ) {\n* return ( realf( v ) === imagf( v ) );\n* }\n*\n* var arr = new Complex64Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var z = arr.find( predicate );\n* // returns \n*\n* var re = realf( z );\n* // returns 1.0\n*\n* var im = imagf( z );\n* // returns 1.0\n*/\nsetReadOnly( Complex64Array.prototype, 'find', function find( predicate, thisArg ) {\n\tvar buf;\n\tvar i;\n\tvar z;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tz = getComplex64( buf, i );\n\t\tif ( predicate.call( thisArg, z, i, this ) ) {\n\t\t\treturn z;\n\t\t}\n\t}\n});\n\n/**\n* Returns the index of the first element in an array for which a predicate function returns a truthy value.\n*\n* @name findIndex\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {integer} index or -1\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* function predicate( v ) {\n* return ( realf( v ) === imagf( v ) );\n* }\n*\n* var arr = new Complex64Array( 3 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var idx = arr.findIndex( predicate );\n* // returns 2\n*/\nsetReadOnly( Complex64Array.prototype, 'findIndex', function findIndex( predicate, thisArg ) {\n\tvar buf;\n\tvar i;\n\tvar z;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tz = getComplex64( buf, i );\n\t\tif ( predicate.call( thisArg, z, i, this ) ) {\n\t\t\treturn i;\n\t\t}\n\t}\n\treturn -1;\n});\n\n/**\n* Returns the last element in an array for which a predicate function returns a truthy value.\n*\n* @name findLast\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {(Complex64|void)} array element or undefined\n*\n* @example\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n* import Complex64 from '@stdlib/complex-float32';\n*\n* function predicate( v ) {\n* return ( realf( v ) === imagf( v ) );\n* }\n*\n* var arr = new Complex64Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var z = arr.findLast( predicate );\n* // returns \n*\n* var re = realf( z );\n* // returns 3.0\n*\n* var im = imagf( z );\n* // returns 3.0\n*/\nsetReadOnly( Complex64Array.prototype, 'findLast', function findLast( predicate, thisArg ) {\n\tvar buf;\n\tvar i;\n\tvar z;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = this._length-1; i >= 0; i-- ) {\n\t\tz = getComplex64( buf, i );\n\t\tif ( predicate.call( thisArg, z, i, this ) ) {\n\t\t\treturn z;\n\t\t}\n\t}\n});\n\n/**\n* Returns the index of the last element in an array for which a predicate function returns a truthy value.\n*\n* @name findLastIndex\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {integer} index or -1\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* function predicate( v ) {\n* return ( realf( v ) === imagf( v ) );\n* }\n*\n* var arr = new Complex64Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n*\n* var idx = arr.findLastIndex( predicate );\n* // returns 1\n*/\nsetReadOnly( Complex64Array.prototype, 'findLastIndex', function findLastIndex( predicate, thisArg ) {\n\tvar buf;\n\tvar i;\n\tvar z;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = this._length-1; i >= 0; i-- ) {\n\t\tz = getComplex64( buf, i );\n\t\tif ( predicate.call( thisArg, z, i, this ) ) {\n\t\t\treturn i;\n\t\t}\n\t}\n\treturn -1;\n});\n\n/**\n* Invokes a function once for each array element.\n*\n* @name forEach\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {Function} fcn - function to invoke\n* @param {*} [thisArg] - function invocation context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n*\n* function log( v, i ) {\n* console.log( '%s: %s', i, v.toString() );\n* }\n*\n* var arr = new Complex64Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* arr.forEach( log );\n*/\nsetReadOnly( Complex64Array.prototype, 'forEach', function forEach( fcn, thisArg ) {\n\tvar buf;\n\tvar i;\n\tvar z;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( fcn ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', fcn ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tz = getComplex64( buf, i );\n\t\tfcn.call( thisArg, z, i, this );\n\t}\n});\n\n/**\n* Returns an array element.\n*\n* @name get\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {NonNegativeInteger} idx - element index\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} must provide a nonnegative integer\n* @returns {(Complex64|void)} array element\n*\n* @example\n* var arr = new Complex64Array( 10 );\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* var z = arr.get( 0 );\n* // returns \n*\n* var re = realf( z );\n* // returns 0.0\n*\n* var im = imagf( z );\n* // returns 0.0\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n*\n* z = arr.get( 0 );\n* // returns \n*\n* re = realf( z );\n* // returns 1.0\n*\n* im = imagf( z );\n* // returns -1.0\n*\n* z = arr.get( 100 );\n* // returns undefined\n*/\nsetReadOnly( Complex64Array.prototype, 'get', function get( idx ) {\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isNonNegativeInteger( idx ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Must provide a nonnegative integer. Value: `%s`.', idx ) );\n\t}\n\tif ( idx >= this._length ) {\n\t\treturn;\n\t}\n\treturn getComplex64( this._buffer, idx );\n});\n\n/**\n* Returns a boolean indicating whether an array includes a provided value.\n*\n* @name includes\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {ComplexLike} searchElement - search element\n* @param {integer} [fromIndex=0] - starting index (inclusive)\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a complex number\n* @throws {TypeError} second argument must be an integer\n* @returns {boolean} boolean indicating whether an array includes a provided value\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n*\n* var arr = new Complex64Array( 5 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n* arr.set( [ 4.0, -4.0 ], 3 );\n* arr.set( [ 5.0, -5.0 ], 4 );\n*\n* var bool = arr.includes( new Complex64( 3.0, -3.0 ) );\n* // returns true\n*\n* bool = arr.includes( new Complex64( 3.0, -3.0 ), 3 );\n* // returns false\n*\n* bool = arr.includes( new Complex64( 4.0, -4.0 ), -3 );\n* // returns true\n*/\nsetReadOnly( Complex64Array.prototype, 'includes', function includes( searchElement, fromIndex ) {\n\tvar buf;\n\tvar idx;\n\tvar re;\n\tvar im;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isComplexLike( searchElement ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a complex number. Value: `%s`.', searchElement ) );\n\t}\n\tif ( arguments.length > 1 ) {\n\t\tif ( !isInteger( fromIndex ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be an integer. Value: `%s`.', fromIndex ) );\n\t\t}\n\t\tif ( fromIndex < 0 ) {\n\t\t\tfromIndex += this._length;\n\t\t\tif ( fromIndex < 0 ) {\n\t\t\t\tfromIndex = 0;\n\t\t\t}\n\t\t}\n\t} else {\n\t\tfromIndex = 0;\n\t}\n\tre = realf( searchElement );\n\tim = imagf( searchElement );\n\tbuf = this._buffer;\n\tfor ( i = fromIndex; i < this._length; i++ ) {\n\t\tidx = 2 * i;\n\t\tif ( re === buf[ idx ] && im === buf[ idx+1 ] ) {\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n});\n\n/**\n* Returns the first index at which a given element can be found.\n*\n* @name indexOf\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {ComplexLike} searchElement - element to find\n* @param {integer} [fromIndex=0] - starting index (inclusive)\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a complex number\n* @throws {TypeError} second argument must be an integer\n* @returns {integer} index or -1\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n*\n* var arr = new Complex64Array( 10 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n* arr.set( [ 4.0, -4.0 ], 3 );\n* arr.set( [ 5.0, -5.0 ], 4 );\n*\n* var idx = arr.indexOf( new Complex64( 3.0, -3.0 ) );\n* // returns 2\n*\n* idx = arr.indexOf( new Complex64( 3.0, -3.0 ), 3 );\n* // returns -1\n*\n* idx = arr.indexOf( new Complex64( 4.0, -4.0 ), -3 );\n* // returns -1\n*/\nsetReadOnly( Complex64Array.prototype, 'indexOf', function indexOf( searchElement, fromIndex ) {\n\tvar buf;\n\tvar idx;\n\tvar re;\n\tvar im;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isComplexLike( searchElement ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a complex number. Value: `%s`.', searchElement ) );\n\t}\n\tif ( arguments.length > 1 ) {\n\t\tif ( !isInteger( fromIndex ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be an integer. Value: `%s`.', fromIndex ) );\n\t\t}\n\t\tif ( fromIndex < 0 ) {\n\t\t\tfromIndex += this._length;\n\t\t\tif ( fromIndex < 0 ) {\n\t\t\t\tfromIndex = 0;\n\t\t\t}\n\t\t}\n\t} else {\n\t\tfromIndex = 0;\n\t}\n\tre = realf( searchElement );\n\tim = imagf( searchElement );\n\tbuf = this._buffer;\n\tfor ( i = fromIndex; i < this._length; i++ ) {\n\t\tidx = 2 * i;\n\t\tif ( re === buf[ idx ] && im === buf[ idx+1 ] ) {\n\t\t\treturn i;\n\t\t}\n\t}\n\treturn -1;\n});\n\n/**\n* Returns a new string by concatenating all array elements.\n*\n* @name join\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {string} [separator=','] - element separator\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a string\n* @returns {string} string representation\n*\n* @example\n* var arr = new Complex64Array( 2 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n*\n* var str = arr.join();\n* // returns '1 + 1i,2 + 2i'\n*\n* str = arr.join( '/' );\n* // returns '1 + 1i/2 + 2i'\n*/\nsetReadOnly( Complex64Array.prototype, 'join', function join( separator ) {\n\tvar out;\n\tvar buf;\n\tvar sep;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( arguments.length === 0 ) {\n\t\tsep = ',';\n\t} else if ( isString( separator ) ) {\n\t\tsep = separator;\n\t} else {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a string. Value: `%s`.', separator ) );\n\t}\n\tout = [];\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tout.push( getComplex64( buf, i ).toString() );\n\t}\n\treturn out.join( sep );\n});\n\n/**\n* Returns the last index at which a given element can be found.\n*\n* @name lastIndexOf\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {ComplexLike} searchElement - element to find\n* @param {integer} [fromIndex] - index at which to start searching backward (inclusive)\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a complex number\n* @throws {TypeError} second argument must be an integer\n* @returns {integer} index or -1\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n*\n* var arr = new Complex64Array( 5 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n* arr.set( [ 4.0, -4.0 ], 3 );\n* arr.set( [ 3.0, -3.0 ], 4 );\n*\n* var idx = arr.lastIndexOf( new Complex64( 3.0, -3.0 ) );\n* // returns 4\n*\n* idx = arr.lastIndexOf( new Complex64( 3.0, -3.0 ), 3 );\n* // returns 2\n*\n* idx = arr.lastIndexOf( new Complex64( 5.0, -5.0 ), 3 );\n* // returns -1\n*\n* idx = arr.lastIndexOf( new Complex64( 2.0, -2.0 ), -3 );\n* // returns 1\n*/\nsetReadOnly( Complex64Array.prototype, 'lastIndexOf', function lastIndexOf( searchElement, fromIndex ) {\n\tvar buf;\n\tvar idx;\n\tvar re;\n\tvar im;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isComplexLike( searchElement ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a complex number. Value: `%s`.', searchElement ) );\n\t}\n\tif ( arguments.length > 1 ) {\n\t\tif ( !isInteger( fromIndex ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be an integer. Value: `%s`.', fromIndex ) );\n\t\t}\n\t\tif ( fromIndex >= this._length ) {\n\t\t\tfromIndex = this._length - 1;\n\t\t} else if ( fromIndex < 0 ) {\n\t\t\tfromIndex += this._length;\n\t\t}\n\t} else {\n\t\tfromIndex = this._length - 1;\n\t}\n\tre = realf( searchElement );\n\tim = imagf( searchElement );\n\tbuf = this._buffer;\n\tfor ( i = fromIndex; i >= 0; i-- ) {\n\t\tidx = 2 * i;\n\t\tif ( re === buf[ idx ] && im === buf[ idx+1 ] ) {\n\t\t\treturn i;\n\t\t}\n\t}\n\treturn -1;\n});\n\n/**\n* Number of array elements.\n*\n* @name length\n* @memberof Complex64Array.prototype\n* @readonly\n* @type {NonNegativeInteger}\n*\n* @example\n* var arr = new Complex64Array( 10 );\n*\n* var len = arr.length;\n* // returns 10\n*/\nsetReadOnlyAccessor( Complex64Array.prototype, 'length', function get() {\n\treturn this._length;\n});\n\n/**\n* Returns a new array with each element being the result of a provided callback function.\n*\n* @name map\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {Function} fcn - callback function\n* @param {*} [thisArg] - callback function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {Complex64Array} complex number array\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* function scale( v, i ) {\n* return new Complex64( 2.0*realf( v ), 2.0*imagf( v ) );\n* }\n*\n* var arr = new Complex64Array( 3 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n*\n* var out = arr.map( scale );\n* // returns \n*\n* var z = out.get( 0 );\n* // returns \n*\n* var re = realf( z );\n* // returns 2\n*\n* var im = imagf( z );\n* // returns -2\n*/\nsetReadOnly( Complex64Array.prototype, 'map', function map( fcn, thisArg ) {\n\tvar outbuf;\n\tvar buf;\n\tvar out;\n\tvar i;\n\tvar v;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( fcn ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', fcn ) );\n\t}\n\tbuf = this._buffer;\n\tout = new this.constructor( this._length );\n\toutbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tv = fcn.call( thisArg, getComplex64( buf, i ), i, this );\n\t\tif ( isComplexLike( v ) ) {\n\t\t\toutbuf[ 2*i ] = realf( v );\n\t\t\toutbuf[ (2*i)+1 ] = imagf( v );\n\t\t} else if ( isArrayLikeObject( v ) && v.length === 2 ) {\n\t\t\toutbuf[ 2*i ] = v[ 0 ];\n\t\t\toutbuf[ (2*i)+1 ] = v[ 1 ];\n\t\t} else {\n\t\t\tthrow new TypeError( format( 'invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', v ) );\n\t\t}\n\t}\n\treturn out;\n});\n\n/**\n* Reverses an array in-place.\n*\n* @name reverse\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Complex64Array} reversed array\n*\n* @example\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* var arr = new Complex64Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var out = arr.reverse();\n* // returns \n*\n* var z = out.get( 0 );\n* // returns \n*\n* var re = realf( z );\n* // returns 3.0\n*\n* var im = imagf( z );\n* // returns 3.0\n*\n* z = out.get( 1 );\n* // returns \n*\n* re = realf( z );\n* // returns 2.0\n*\n* im = imagf( z );\n* // returns 2.0\n*\n* z = out.get( 2 );\n* // returns \n*\n* re = realf( z );\n* // returns 1.0\n*\n* im = imagf( z );\n* // returns 1.0\n*/\nsetReadOnly( Complex64Array.prototype, 'reverse', function reverse() {\n\tvar buf;\n\tvar tmp;\n\tvar len;\n\tvar N;\n\tvar i;\n\tvar j;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tlen = this._length;\n\tbuf = this._buffer;\n\tN = floor( len / 2 );\n\tfor ( i = 0; i < N; i++ ) {\n\t\tj = len - i - 1;\n\t\ttmp = buf[ (2*i) ];\n\t\tbuf[ (2*i) ] = buf[ (2*j) ];\n\t\tbuf[ (2*j) ] = tmp;\n\t\ttmp = buf[ (2*i)+1 ];\n\t\tbuf[ (2*i)+1 ] = buf[ (2*j)+1 ];\n\t\tbuf[ (2*j)+1 ] = tmp;\n\t}\n\treturn this;\n});\n\n/**\n* Sets an array element.\n*\n* ## Notes\n*\n* - When provided a typed array, real or complex, we must check whether the source array shares the same buffer as the target array and whether the underlying memory overlaps. In particular, we are concerned with the following scenario:\n*\n* ```text\n* buf: ---------------------\n* src: ---------------------\n* ```\n*\n* In the above, as we copy values from `src`, we will overwrite values in the `src` view, resulting in duplicated values copied into the end of `buf`, which is not intended. Hence, to avoid overwriting source values, we must **copy** source values to a temporary array.\n*\n* In the other overlapping scenario,\n*\n* ```text\n* buf: ---------------------\n* src: ---------------------\n* ```\n*\n* by the time we begin copying into the overlapping region, we are copying from the end of `src`, a non-overlapping region, which means we don't run the risk of copying copied values, rather than the original `src` values, as intended.\n*\n* @name set\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {(Collection|Complex|ComplexArray)} value - value(s)\n* @param {NonNegativeInteger} [i=0] - element index at which to start writing values\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be either a complex number, an array-like object, or a complex number array\n* @throws {TypeError} index argument must be a nonnegative integer\n* @throws {RangeError} array-like objects must have a length which is a multiple of two\n* @throws {RangeError} index argument is out-of-bounds\n* @throws {RangeError} target array lacks sufficient storage to accommodate source values\n* @returns {void}\n*\n* @example\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* var arr = new Complex64Array( 10 );\n*\n* var z = arr.get( 0 );\n* // returns \n*\n* var re = realf( z );\n* // returns 0.0\n*\n* var im = imagf( z );\n* // returns 0.0\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n*\n* z = arr.get( 0 );\n* // returns \n*\n* re = realf( z );\n* // returns 1.0\n*\n* im = imagf( z );\n* // returns -1.0\n*/\nsetReadOnly( Complex64Array.prototype, 'set', function set( value ) {\n\t/* eslint-disable no-underscore-dangle */\n\tvar sbuf;\n\tvar idx;\n\tvar buf;\n\tvar tmp;\n\tvar flg;\n\tvar N;\n\tvar v;\n\tvar i;\n\tvar j;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tbuf = this._buffer;\n\tif ( arguments.length > 1 ) {\n\t\tidx = arguments[ 1 ];\n\t\tif ( !isNonNegativeInteger( idx ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Index argument must be a nonnegative integer. Value: `%s`.', idx ) );\n\t\t}\n\t} else {\n\t\tidx = 0;\n\t}\n\tif ( isComplexLike( value ) ) {\n\t\tif ( idx >= this._length ) {\n\t\t\tthrow new RangeError( format( 'invalid argument. Index argument is out-of-bounds. Value: `%u`.', idx ) );\n\t\t}\n\t\tidx *= 2;\n\t\tbuf[ idx ] = realf( value );\n\t\tbuf[ idx+1 ] = imagf( value );\n\t\treturn;\n\t}\n\tif ( isComplexArray( value ) ) {\n\t\tN = value._length;\n\t\tif ( idx+N > this._length ) {\n\t\t\tthrow new RangeError( 'invalid arguments. Target array lacks sufficient storage to accommodate source values.' );\n\t\t}\n\t\tsbuf = value._buffer;\n\n\t\t// Check for overlapping memory...\n\t\tj = buf.byteOffset + (idx*BYTES_PER_ELEMENT);\n\t\tif (\n\t\t\tsbuf.buffer === buf.buffer &&\n\t\t\t(\n\t\t\t\tsbuf.byteOffset < j &&\n\t\t\t\tsbuf.byteOffset+sbuf.byteLength > j\n\t\t\t)\n\t\t) {\n\t\t\t// We need to copy source values...\n\t\t\ttmp = new Float32Array( sbuf.length );\n\t\t\tfor ( i = 0; i < sbuf.length; i++ ) {\n\t\t\t\ttmp[ i ] = sbuf[ i ];\n\t\t\t}\n\t\t\tsbuf = tmp;\n\t\t}\n\t\tidx *= 2;\n\t\tj = 0;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\tbuf[ idx ] = sbuf[ j ];\n\t\t\tbuf[ idx+1 ] = sbuf[ j+1 ];\n\t\t\tidx += 2; // stride\n\t\t\tj += 2; // stride\n\t\t}\n\t\treturn;\n\t}\n\tif ( isCollection( value ) ) {\n\t\t// Detect whether we've been provided an array of complex numbers...\n\t\tN = value.length;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\tif ( !isComplexLike( value[ i ] ) ) {\n\t\t\t\tflg = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t// If an array does not contain only complex numbers, then we assume interleaved real and imaginary components...\n\t\tif ( flg ) {\n\t\t\tif ( !isEven( N ) ) {\n\t\t\t\tthrow new RangeError( format( 'invalid argument. Array-like object arguments must have a length which is a multiple of two. Length: `%u`.', N ) );\n\t\t\t}\n\t\t\tif ( idx+(N/2) > this._length ) {\n\t\t\t\tthrow new RangeError( 'invalid arguments. Target array lacks sufficient storage to accommodate source values.' );\n\t\t\t}\n\t\t\tsbuf = value;\n\n\t\t\t// Check for overlapping memory...\n\t\t\tj = buf.byteOffset + (idx*BYTES_PER_ELEMENT);\n\t\t\tif (\n\t\t\t\tsbuf.buffer === buf.buffer &&\n\t\t\t\t(\n\t\t\t\t\tsbuf.byteOffset < j &&\n\t\t\t\t\tsbuf.byteOffset+sbuf.byteLength > j\n\t\t\t\t)\n\t\t\t) {\n\t\t\t\t// We need to copy source values...\n\t\t\t\ttmp = new Float32Array( N );\n\t\t\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\t\t\ttmp[ i ] = sbuf[ i ]; // TODO: handle accessor arrays\n\t\t\t\t}\n\t\t\t\tsbuf = tmp;\n\t\t\t}\n\t\t\tidx *= 2;\n\t\t\tN /= 2;\n\t\t\tj = 0;\n\t\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\t\tbuf[ idx ] = sbuf[ j ];\n\t\t\t\tbuf[ idx+1 ] = sbuf[ j+1 ];\n\t\t\t\tidx += 2; // stride\n\t\t\t\tj += 2; // stride\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\t// If an array contains only complex numbers, then we need to extract real and imaginary components...\n\t\tif ( idx+N > this._length ) {\n\t\t\tthrow new RangeError( 'invalid arguments. Target array lacks sufficient storage to accommodate source values.' );\n\t\t}\n\t\tidx *= 2;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\tv = value[ i ];\n\t\t\tbuf[ idx ] = realf( v );\n\t\t\tbuf[ idx+1 ] = imagf( v );\n\t\t\tidx += 2; // stride\n\t\t}\n\t\treturn;\n\t}\n\tthrow new TypeError( format( 'invalid argument. First argument must be either a complex number, an array-like object, or a complex number array. Value: `%s`.', value ) );\n\n\t/* eslint-enable no-underscore-dangle */\n});\n\n/**\n* Copies a portion of a typed array to a new typed array.\n*\n* @name slice\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {integer} [start=0] - starting index (inclusive)\n* @param {integer} [end] - ending index (exclusive)\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be an integer\n* @throws {TypeError} second argument must be an integer\n* @returns {Complex64Array} complex number array\n*\n* @example\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* var arr = new Complex64Array( 5 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n* arr.set( [ 4.0, -4.0 ], 3 );\n* arr.set( [ 5.0, -5.0 ], 4 );\n*\n* var out = arr.slice();\n* // returns \n*\n* var len = out.length;\n* // returns 5\n*\n* var z = out.get( 0 );\n* // returns \n*\n* var re = realf( z );\n* // returns 1.0\n*\n* var im = imagf( z );\n* // returns -1.0\n*\n* z = out.get( len-1 );\n* // returns \n*\n* re = realf( z );\n* // returns 5.0\n*\n* im = imagf( z );\n* // returns -5.0\n*\n* out = arr.slice( 1, -2 );\n* // returns \n*\n* len = out.length;\n* // returns 2\n*\n* z = out.get( 0 );\n* // returns \n*\n* re = realf( z );\n* // returns 2.0\n*\n* im = imagf( z );\n* // returns -2.0\n*\n* z = out.get( len-1 );\n* // returns \n*\n* re = realf( z );\n* // returns 3.0\n*\n* im = imagf( z );\n* // returns -3.0\n*/\nsetReadOnly( Complex64Array.prototype, 'slice', function slice( start, end ) {\n\tvar outlen;\n\tvar outbuf;\n\tvar out;\n\tvar idx;\n\tvar buf;\n\tvar len;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tbuf = this._buffer;\n\tlen = this._length;\n\tif ( arguments.length === 0 ) {\n\t\tstart = 0;\n\t\tend = len;\n\t} else {\n\t\tif ( !isInteger( start ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. First argument must be an integer. Value: `%s`.', start ) );\n\t\t}\n\t\tif ( start < 0 ) {\n\t\t\tstart += len;\n\t\t\tif ( start < 0 ) {\n\t\t\t\tstart = 0;\n\t\t\t}\n\t\t}\n\t\tif ( arguments.length === 1 ) {\n\t\t\tend = len;\n\t\t} else {\n\t\t\tif ( !isInteger( end ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be an integer. Value: `%s`.', end ) );\n\t\t\t}\n\t\t\tif ( end < 0 ) {\n\t\t\t\tend += len;\n\t\t\t\tif ( end < 0 ) {\n\t\t\t\t\tend = 0;\n\t\t\t\t}\n\t\t\t} else if ( end > len ) {\n\t\t\t\tend = len;\n\t\t\t}\n\t\t}\n\t}\n\tif ( start < end ) {\n\t\toutlen = end - start;\n\t} else {\n\t\toutlen = 0;\n\t}\n\tout = new this.constructor( outlen );\n\toutbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\tfor ( i = 0; i < outlen; i++ ) {\n\t\tidx = 2*(i+start);\n\t\toutbuf[ 2*i ] = buf[ idx ];\n\t\toutbuf[ (2*i)+1 ] = buf[ idx+1 ];\n\t}\n\treturn out;\n});\n\n/**\n* Tests whether at least one element in an array passes a test implemented by a predicate function.\n*\n* @name some\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {boolean} boolean indicating whether at least one element passes a test\n*\n* @example\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* function predicate( v ) {\n* return ( realf( v ) === imagf( v ) );\n* }\n*\n* var arr = new Complex64Array( 3 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n*\n* var bool = arr.some( predicate );\n* // returns true\n*/\nsetReadOnly( Complex64Array.prototype, 'some', function some( predicate, thisArg ) {\n\tvar buf;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tif ( predicate.call( thisArg, getComplex64( buf, i ), i, this ) ) {\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n});\n\n/**\n* Creates a new typed array view over the same underlying `ArrayBuffer` and with the same underlying data type as the host array.\n*\n* @name subarray\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {integer} [begin=0] - starting index (inclusive)\n* @param {integer} [end] - ending index (exclusive)\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be an integer\n* @throws {TypeError} second argument must be an integer\n* @returns {Complex64Array} subarray\n*\n* @example\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* var arr = new Complex64Array( 5 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n* arr.set( [ 4.0, -4.0 ], 3 );\n* arr.set( [ 5.0, -5.0 ], 4 );\n*\n* var subarr = arr.subarray();\n* // returns \n*\n* var len = subarr.length;\n* // returns 5\n*\n* var z = subarr.get( 0 );\n* // returns \n*\n* var re = realf( z );\n* // returns 1.0\n*\n* var im = imagf( z );\n* // returns -1.0\n*\n* z = subarr.get( len-1 );\n* // returns \n*\n* re = realf( z );\n* // returns 5.0\n*\n* im = imagf( z );\n* // returns -5.0\n*\n* subarr = arr.subarray( 1, -2 );\n* // returns \n*\n* len = subarr.length;\n* // returns 2\n*\n* z = subarr.get( 0 );\n* // returns \n*\n* re = realf( z );\n* // returns 2.0\n*\n* im = imagf( z );\n* // returns -2.0\n*\n* z = subarr.get( len-1 );\n* // returns \n*\n* re = realf( z );\n* // returns 3.0\n*\n* im = imagf( z );\n* // returns -3.0\n*/\nsetReadOnly( Complex64Array.prototype, 'subarray', function subarray( begin, end ) {\n\tvar offset;\n\tvar buf;\n\tvar len;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tbuf = this._buffer;\n\tlen = this._length;\n\tif ( arguments.length === 0 ) {\n\t\tbegin = 0;\n\t\tend = len;\n\t} else {\n\t\tif ( !isInteger( begin ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. First argument must be an integer. Value: `%s`.', begin ) );\n\t\t}\n\t\tif ( begin < 0 ) {\n\t\t\tbegin += len;\n\t\t\tif ( begin < 0 ) {\n\t\t\t\tbegin = 0;\n\t\t\t}\n\t\t}\n\t\tif ( arguments.length === 1 ) {\n\t\t\tend = len;\n\t\t} else {\n\t\t\tif ( !isInteger( end ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be an integer. Value: `%s`.', end ) );\n\t\t\t}\n\t\t\tif ( end < 0 ) {\n\t\t\t\tend += len;\n\t\t\t\tif ( end < 0 ) {\n\t\t\t\t\tend = 0;\n\t\t\t\t}\n\t\t\t} else if ( end > len ) {\n\t\t\t\tend = len;\n\t\t\t}\n\t\t}\n\t}\n\tif ( begin >= len ) {\n\t\tlen = 0;\n\t\toffset = buf.byteLength;\n\t} else if ( begin >= end ) {\n\t\tlen = 0;\n\t\toffset = buf.byteOffset + (begin*BYTES_PER_ELEMENT);\n\t} else {\n\t\tlen = end - begin;\n\t\toffset = buf.byteOffset + ( begin*BYTES_PER_ELEMENT );\n\t}\n\treturn new this.constructor( buf.buffer, offset, ( len < 0 ) ? 0 : len );\n});\n\n/**\n* Returns a new typed array containing the elements in reversed order.\n*\n* @name toReversed\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Complex64Array} reversed array\n*\n* @example\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* var arr = new Complex64Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var out = arr.toReversed();\n* // returns \n*\n* var z = out.get( 0 );\n* // returns \n*\n* var re = realf( z );\n* // returns 3.0\n*\n* var im = imagf( z );\n* // returns 3.0\n*\n* z = out.get( 1 );\n* // returns \n*\n* re = realf( z );\n* // returns 2.0\n*\n* im = imagf( z );\n* // returns 2.0\n*\n* z = out.get( 2 );\n* // returns \n*\n* re = realf( z );\n* // returns 1.0\n*\n* im = imagf( z );\n* // returns 1.0\n*/\nsetReadOnly( Complex64Array.prototype, 'toReversed', function toReversed() {\n\tvar outbuf;\n\tvar out;\n\tvar len;\n\tvar buf;\n\tvar i;\n\tvar j;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tlen = this._length;\n\tout = new this.constructor( len );\n\tbuf = this._buffer;\n\toutbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\tfor ( i = 0; i < len; i++ ) {\n\t\tj = len - i - 1;\n\t\toutbuf[ (2*i) ] = buf[ (2*j) ];\n\t\toutbuf[ (2*i)+1 ] = buf[ (2*j)+1 ];\n\t}\n\treturn out;\n});\n\n/**\n* Serializes an array as a string.\n*\n* @name toString\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @throws {TypeError} `this` must be a complex number array\n* @returns {string} string representation\n*\n* @example\n* var arr = new Complex64Array( 2 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n*\n* var str = arr.toString();\n* // returns '1 + 1i,2 + 2i'\n*/\nsetReadOnly( Complex64Array.prototype, 'toString', function toString() {\n\tvar out;\n\tvar buf;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tout = [];\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tout.push( getComplex64( buf, i ).toString() );\n\t}\n\treturn out.join( ',' );\n});\n\n/**\n* Returns a new typed array with the element at a provided index replaced with a provided value.\n*\n* @name with\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {integer} index - element index\n* @param {ComplexLike} value - new value\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be an integer\n* @throws {RangeError} index argument is out-of-bounds\n* @throws {TypeError} second argument must be a complex number\n* @returns {Complex64Array} new typed array\n*\n* @example\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n* import Complex64 from '@stdlib/complex-float32';\n*\n* var arr = new Complex64Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var out = arr.with( 0, new Complex64( 4.0, 4.0 ) );\n* // returns \n*\n* var z = out.get( 0 );\n* // returns \n*\n* var re = realf( z );\n* // returns 4.0\n*\n* var im = imagf( z );\n* // returns 4.0\n*/\nsetReadOnly( Complex64Array.prototype, 'with', function copyWith( index, value ) {\n\tvar buf;\n\tvar out;\n\tvar len;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isInteger( index ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be an integer. Value: `%s`.', index ) );\n\t}\n\tlen = this._length;\n\tif ( index < 0 ) {\n\t\tindex += len;\n\t}\n\tif ( index < 0 || index >= len ) {\n\t\tthrow new RangeError( format( 'invalid argument. Index argument is out-of-bounds. Value: `%s`.', index ) );\n\t}\n\tif ( !isComplexLike( value ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Second argument must be a complex number. Value: `%s`.', value ) );\n\t}\n\tout = new this.constructor( this._buffer );\n\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\tbuf[ 2*index ] = realf( value );\n\tbuf[ (2*index)+1 ] = imagf( value );\n\treturn out;\n});\n\n\n// EXPORTS //\n\nexport default Complex64Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Returns the real component of a double-precision complex floating-point number.\n*\n* @param {Complex} z - complex number\n* @returns {number} real component\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n*\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var re = real( z );\n* // returns 5.0\n*/\nfunction real( z ) {\n\treturn z.re;\n}\n\n\n// EXPORTS //\n\nexport default real;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Returns the imaginary component of a double-precision complex floating-point number.\n*\n* @param {Complex} z - complex number\n* @returns {number} imaginary component\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n*\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var im = imag( z );\n* // returns 3.0\n*/\nfunction imag( z ) {\n\treturn z.im;\n}\n\n\n// EXPORTS //\n\nexport default imag;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isArrayLikeObject from '@stdlib/assert-is-array-like-object';\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport format from '@stdlib/string-format';\nimport real from '@stdlib/complex-real';\nimport imag from '@stdlib/complex-imag';\n\n\n// MAIN //\n\n/**\n* Returns an array of iterated values.\n*\n* @private\n* @param {Object} it - iterator\n* @returns {(Array|TypeError)} array or an error\n*/\nfunction fromIterator( it ) {\n\tvar out;\n\tvar v;\n\tvar z;\n\n\tout = [];\n\twhile ( true ) {\n\t\tv = it.next();\n\t\tif ( v.done ) {\n\t\t\tbreak;\n\t\t}\n\t\tz = v.value;\n\t\tif ( isArrayLikeObject( z ) && z.length >= 2 ) {\n\t\t\tout.push( z[ 0 ], z[ 1 ] );\n\t\t} else if ( isComplexLike( z ) ) {\n\t\t\tout.push( real( z ), imag( z ) );\n\t\t} else {\n\t\t\treturn new TypeError( format( 'invalid argument. An iterator must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', z ) );\n\t\t}\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default fromIterator;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isArrayLikeObject from '@stdlib/assert-is-array-like-object';\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport format from '@stdlib/string-format';\nimport real from '@stdlib/complex-real';\nimport imag from '@stdlib/complex-imag';\n\n\n// MAIN //\n\n/**\n* Returns an array of iterated values.\n*\n* @private\n* @param {Object} it - iterator\n* @param {Function} clbk - callback to invoke for each iterated value\n* @param {*} thisArg - invocation context\n* @returns {(Array|TypeError)} array or an error\n*/\nfunction fromIteratorMap( it, clbk, thisArg ) {\n\tvar out;\n\tvar v;\n\tvar z;\n\tvar i;\n\n\tout = [];\n\ti = -1;\n\twhile ( true ) {\n\t\tv = it.next();\n\t\tif ( v.done ) {\n\t\t\tbreak;\n\t\t}\n\t\ti += 1;\n\t\tz = clbk.call( thisArg, v.value, i );\n\t\tif ( isArrayLikeObject( z ) && z.length >= 2 ) {\n\t\t\tout.push( z[ 0 ], z[ 1 ] );\n\t\t} else if ( isComplexLike( z ) ) {\n\t\t\tout.push( real( z ), imag( z ) );\n\t\t} else {\n\t\t\treturn new TypeError( format( 'invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', z ) );\n\t\t}\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default fromIteratorMap;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport real from '@stdlib/complex-real';\nimport imag from '@stdlib/complex-imag';\n\n\n// MAIN //\n\n/**\n* Returns a strided array of real and imaginary components.\n*\n* @private\n* @param {Float64Array} buf - output array\n* @param {Array} arr - array containing complex numbers\n* @returns {(Float64Array|null)} output array or null\n*/\nfunction fromArray( buf, arr ) {\n\tvar len;\n\tvar v;\n\tvar i;\n\tvar j;\n\n\tlen = arr.length;\n\tj = 0;\n\tfor ( i = 0; i < len; i++ ) {\n\t\tv = arr[ i ];\n\t\tif ( !isComplexLike( v ) ) {\n\t\t\treturn null;\n\t\t}\n\t\tbuf[ j ] = real( v );\n\t\tbuf[ j+1 ] = imag( v );\n\t\tj += 2; // stride\n\t}\n\treturn buf;\n}\n\n\n// EXPORTS //\n\nexport default fromArray;\n","/* eslint-disable no-restricted-syntax, max-lines, no-invalid-this */\n\n/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isNonNegativeInteger } from '@stdlib/assert-is-nonnegative-integer';\nimport isArrayLikeObject from '@stdlib/assert-is-array-like-object';\nimport isCollection from '@stdlib/assert-is-collection';\nimport isArrayBuffer from '@stdlib/assert-is-arraybuffer';\nimport isObject from '@stdlib/assert-is-object';\nimport isArray from '@stdlib/assert-is-array';\nimport isString from '@stdlib/assert-is-string';\nimport isFunction from '@stdlib/assert-is-function';\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport isEven from '@stdlib/math-base-assert-is-even';\nimport isInteger from '@stdlib/math-base-assert-is-integer';\nimport isComplex64Array from '@stdlib/array-base-assert-is-complex64array';\nimport isComplex128Array from '@stdlib/array-base-assert-is-complex128array';\nimport hasIteratorSymbolSupport from '@stdlib/assert-has-iterator-symbol-support';\nimport ITERATOR_SYMBOL from '@stdlib/symbol-iterator';\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport setReadOnlyAccessor from '@stdlib/utils-define-nonenumerable-read-only-accessor';\nimport Float64Array from '@stdlib/array-float64';\nimport Complex128 from '@stdlib/complex-float64';\nimport real from '@stdlib/complex-real';\nimport imag from '@stdlib/complex-imag';\nimport floor from '@stdlib/math-base-special-floor';\nimport reinterpret64 from '@stdlib/strided-base-reinterpret-complex64';\nimport reinterpret128 from '@stdlib/strided-base-reinterpret-complex128';\nimport getter from '@stdlib/array-base-getter';\nimport accessorGetter from '@stdlib/array-base-accessor-getter';\nimport format from '@stdlib/string-format';\nimport fromIterator from './from_iterator.js';\nimport fromIteratorMap from './from_iterator_map.js';\nimport fromArray from './from_array.js';\n\n\n// VARIABLES //\n\nvar BYTES_PER_ELEMENT = Float64Array.BYTES_PER_ELEMENT * 2;\nvar HAS_ITERATOR_SYMBOL = hasIteratorSymbolSupport();\n\n\n// FUNCTIONS //\n\n/**\n* Returns a boolean indicating if a value is a complex typed array.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a complex typed array\n*/\nfunction isComplexArray( value ) {\n\treturn (\n\t\tvalue instanceof Complex128Array ||\n\t\t(\n\t\t\ttypeof value === 'object' &&\n\t\t\tvalue !== null &&\n\t\t\t(\n\t\t\t\tvalue.constructor.name === 'Complex64Array' ||\n\t\t\t\tvalue.constructor.name === 'Complex128Array'\n\t\t\t) &&\n\t\t\ttypeof value._length === 'number' && // eslint-disable-line no-underscore-dangle\n\n\t\t\t// NOTE: we don't perform a more rigorous test here for a typed array for performance reasons, as robustly checking for a typed array instance could require walking the prototype tree and performing relatively expensive constructor checks...\n\t\t\ttypeof value._buffer === 'object' // eslint-disable-line no-underscore-dangle\n\t\t)\n\t);\n}\n\n/**\n* Returns a boolean indicating if a value is a complex typed array constructor.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a complex typed array constructor\n*/\nfunction isComplexArrayConstructor( value ) {\n\treturn (\n\t\tvalue === Complex128Array ||\n\n\t\t// NOTE: weaker test in order to avoid a circular dependency with Complex64Array...\n\t\tvalue.name === 'Complex64Array'\n\t);\n}\n\n/**\n* Retrieves a complex number from a complex number array buffer.\n*\n* @private\n* @param {Float64Array} buf - array buffer\n* @param {NonNegativeInteger} idx - element index\n* @returns {Complex128} complex number\n*/\nfunction getComplex128( buf, idx ) {\n\tidx *= 2;\n\treturn new Complex128( buf[ idx ], buf[ idx+1 ] );\n}\n\n\n// MAIN //\n\n/**\n* 128-bit complex number array constructor.\n*\n* @constructor\n* @param {(NonNegativeInteger|Collection|ArrayBuffer|Iterable)} [arg] - length, typed array, array-like object, buffer, or iterable\n* @param {NonNegativeInteger} [byteOffset=0] - byte offset\n* @param {NonNegativeInteger} [length] - view length\n* @throws {RangeError} ArrayBuffer byte length must be a multiple of `16`\n* @throws {RangeError} array-like object and typed array input arguments must have a length which is a multiple of two\n* @throws {TypeError} if provided only a single argument, must provide a valid argument\n* @throws {TypeError} byte offset must be a nonnegative integer\n* @throws {RangeError} byte offset must be a multiple of `16`\n* @throws {TypeError} view length must be a positive multiple of `16`\n* @throws {RangeError} must provide sufficient memory to accommodate byte offset and view length requirements\n* @throws {TypeError} an iterator must return either a two element array containing real and imaginary components or a complex number\n* @returns {Complex128Array} complex number array\n*\n* @example\n* var arr = new Complex128Array();\n* // returns \n*\n* var len = arr.length;\n* // returns 0\n*\n* @example\n* var arr = new Complex128Array( 2 );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*\n* @example\n* var arr = new Complex128Array( [ 1.0, -1.0 ] );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* import ArrayBuffer from '@stdlib/array-buffer';\n*\n* var buf = new ArrayBuffer( 32 );\n* var arr = new Complex128Array( buf );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*\n* @example\n* import ArrayBuffer from '@stdlib/array-buffer';\n*\n* var buf = new ArrayBuffer( 32 );\n* var arr = new Complex128Array( buf, 16 );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* import ArrayBuffer from '@stdlib/array-buffer';\n*\n* var buf = new ArrayBuffer( 64 );\n* var arr = new Complex128Array( buf, 16, 2 );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*/\nfunction Complex128Array() {\n\tvar byteOffset;\n\tvar nargs;\n\tvar buf;\n\tvar len;\n\n\tnargs = arguments.length;\n\tif ( !(this instanceof Complex128Array) ) {\n\t\tif ( nargs === 0 ) {\n\t\t\treturn new Complex128Array();\n\t\t}\n\t\tif ( nargs === 1 ) {\n\t\t\treturn new Complex128Array( arguments[0] );\n\t\t}\n\t\tif ( nargs === 2 ) {\n\t\t\treturn new Complex128Array( arguments[0], arguments[1] );\n\t\t}\n\t\treturn new Complex128Array( arguments[0], arguments[1], arguments[2] );\n\t}\n\t// Create the underlying data buffer...\n\tif ( nargs === 0 ) {\n\t\tbuf = new Float64Array( 0 ); // backward-compatibility\n\t} else if ( nargs === 1 ) {\n\t\tif ( isNonNegativeInteger( arguments[0] ) ) {\n\t\t\tbuf = new Float64Array( arguments[0]*2 );\n\t\t} else if ( isCollection( arguments[0] ) ) {\n\t\t\tbuf = arguments[ 0 ];\n\t\t\tlen = buf.length;\n\n\t\t\t// If provided a \"generic\" array, peak at the first value, and, if the value is a complex number, try to process as an array of complex numbers, falling back to \"normal\" typed array initialization if we fail and ensuring consistency if the first value had not been a complex number...\n\t\t\tif ( len && isArray( buf ) && isComplexLike( buf[0] ) ) {\n\t\t\t\tbuf = fromArray( new Float64Array( len*2 ), buf );\n\t\t\t\tif ( buf === null ) {\n\t\t\t\t\t// We failed and we are now forced to allocate a new array :-(\n\t\t\t\t\tif ( !isEven( len ) ) {\n\t\t\t\t\t\tthrow new RangeError( format( 'invalid argument. Array-like object arguments must have a length which is a multiple of two. Length: `%u`.', len ) );\n\t\t\t\t\t}\n\t\t\t\t\t// We failed, so fall back to directly setting values...\n\t\t\t\t\tbuf = new Float64Array( arguments[0] );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ( isComplex64Array( buf ) ) {\n\t\t\t\t\tbuf = reinterpret64( buf, 0 );\n\t\t\t\t} else if ( isComplex128Array( buf ) ) {\n\t\t\t\t\tbuf = reinterpret128( buf, 0 );\n\t\t\t\t} else if ( !isEven( len ) ) {\n\t\t\t\t\tthrow new RangeError( format( 'invalid argument. Array-like object and typed array arguments must have a length which is a multiple of two. Length: `%u`.', len ) );\n\t\t\t\t}\n\t\t\t\tbuf = new Float64Array( buf );\n\t\t\t}\n\t\t} else if ( isArrayBuffer( arguments[0] ) ) {\n\t\t\tbuf = arguments[ 0 ];\n\t\t\tif ( !isInteger( buf.byteLength/BYTES_PER_ELEMENT ) ) {\n\t\t\t\tthrow new RangeError( format( 'invalid argument. ArrayBuffer byte length must be a multiple of %u. Byte length: `%u`.', BYTES_PER_ELEMENT, buf.byteLength ) );\n\t\t\t}\n\t\t\tbuf = new Float64Array( buf );\n\t\t} else if ( isObject( arguments[0] ) ) {\n\t\t\tbuf = arguments[ 0 ];\n\t\t\tif ( HAS_ITERATOR_SYMBOL === false ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Environment lacks Symbol.iterator support. Must provide a length, ArrayBuffer, typed array, or array-like object. Value: `%s`.', buf ) );\n\t\t\t}\n\t\t\tif ( !isFunction( buf[ ITERATOR_SYMBOL ] ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.', buf ) );\n\t\t\t}\n\t\t\tbuf = buf[ ITERATOR_SYMBOL ]();\n\t\t\tif ( !isFunction( buf.next ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.', buf ) );\n\t\t\t}\n\t\t\tbuf = fromIterator( buf );\n\t\t\tif ( buf instanceof Error ) {\n\t\t\t\tthrow buf;\n\t\t\t}\n\t\t\tbuf = new Float64Array( buf );\n\t\t} else {\n\t\t\tthrow new TypeError( format( 'invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.', arguments[0] ) );\n\t\t}\n\t} else {\n\t\tbuf = arguments[ 0 ];\n\t\tif ( !isArrayBuffer( buf ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. First argument must be an ArrayBuffer. Value: `%s`.', buf ) );\n\t\t}\n\t\tbyteOffset = arguments[ 1 ];\n\t\tif ( !isNonNegativeInteger( byteOffset ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Byte offset must be a nonnegative integer. Value: `%s`.', byteOffset ) );\n\t\t}\n\t\tif ( !isInteger( byteOffset/BYTES_PER_ELEMENT ) ) {\n\t\t\tthrow new RangeError( format( 'invalid argument. Byte offset must be a multiple of %u. Value: `%u`.', BYTES_PER_ELEMENT, byteOffset ) );\n\t\t}\n\t\tif ( nargs === 2 ) {\n\t\t\tlen = buf.byteLength - byteOffset;\n\t\t\tif ( !isInteger( len/BYTES_PER_ELEMENT ) ) {\n\t\t\t\tthrow new RangeError( format( 'invalid arguments. ArrayBuffer view byte length must be a multiple of %u. View byte length: `%u`.', BYTES_PER_ELEMENT, len ) );\n\t\t\t}\n\t\t\tbuf = new Float64Array( buf, byteOffset );\n\t\t} else {\n\t\t\tlen = arguments[ 2 ];\n\t\t\tif ( !isNonNegativeInteger( len ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Length must be a nonnegative integer. Value: `%s`.', len ) );\n\t\t\t}\n\t\t\tif ( (len*BYTES_PER_ELEMENT) > (buf.byteLength-byteOffset) ) {\n\t\t\t\tthrow new RangeError( format( 'invalid arguments. ArrayBuffer has insufficient capacity. Either decrease the array length or provide a bigger buffer. Minimum capacity: `%u`.', len*BYTES_PER_ELEMENT ) );\n\t\t\t}\n\t\t\tbuf = new Float64Array( buf, byteOffset, len*2 );\n\t\t}\n\t}\n\tsetReadOnly( this, '_buffer', buf );\n\tsetReadOnly( this, '_length', buf.length/2 );\n\n\treturn this;\n}\n\n/**\n* Size (in bytes) of each array element.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex128Array\n* @readonly\n* @type {PositiveInteger}\n* @default 16\n*\n* @example\n* var nbytes = Complex128Array.BYTES_PER_ELEMENT;\n* // returns 16\n*/\nsetReadOnly( Complex128Array, 'BYTES_PER_ELEMENT', BYTES_PER_ELEMENT );\n\n/**\n* Constructor name.\n*\n* @name name\n* @memberof Complex128Array\n* @readonly\n* @type {string}\n* @default 'Complex128Array'\n*\n* @example\n* var name = Complex128Array.name;\n* // returns 'Complex128Array'\n*/\nsetReadOnly( Complex128Array, 'name', 'Complex128Array' );\n\n/**\n* Creates a new 128-bit complex number array from an array-like object or an iterable.\n*\n* @name from\n* @memberof Complex128Array\n* @type {Function}\n* @param {(Collection|Object)} src - array-like object or iterable\n* @param {Function} [clbk] - callback to invoke for each source element\n* @param {*} [thisArg] - context\n* @throws {TypeError} `this` context must be a constructor\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be an array-like object or an iterable\n* @throws {TypeError} second argument must be a function\n* @throws {RangeError} array-like objects must have a length which is a multiple of two\n* @throws {TypeError} an iterator must return either a two element array containing real and imaginary components or a complex number\n* @throws {TypeError} when provided an iterator, a callback must return either a two element array containing real and imaginary components or a complex number\n* @returns {Complex128Array} 128-bit complex number array\n*\n* @example\n* var arr = Complex128Array.from( [ 1.0, -1.0 ] );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n*\n* var arr = Complex128Array.from( [ new Complex128( 1.0, 1.0 ) ] );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* function clbk( v ) {\n* return new Complex128( real(v)*2.0, imag(v)*2.0 );\n* }\n*\n* var arr = Complex128Array.from( [ new Complex128( 1.0, 1.0 ) ], clbk );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*/\nsetReadOnly( Complex128Array, 'from', function from( src ) {\n\tvar thisArg;\n\tvar nargs;\n\tvar clbk;\n\tvar out;\n\tvar buf;\n\tvar tmp;\n\tvar get;\n\tvar len;\n\tvar flg;\n\tvar v;\n\tvar i;\n\tvar j;\n\tif ( !isFunction( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` context must be a constructor.' );\n\t}\n\tif ( !isComplexArrayConstructor( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tnargs = arguments.length;\n\tif ( nargs > 1 ) {\n\t\tclbk = arguments[ 1 ];\n\t\tif ( !isFunction( clbk ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be a function. Value: `%s`.', clbk ) );\n\t\t}\n\t\tif ( nargs > 2 ) {\n\t\t\tthisArg = arguments[ 2 ];\n\t\t}\n\t}\n\tif ( isComplexArray( src ) ) {\n\t\tlen = src.length;\n\t\tif ( clbk ) {\n\t\t\tout = new this( len );\n\t\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\t\tj = 0;\n\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\tv = clbk.call( thisArg, src.get( i ), i );\n\t\t\t\tif ( isComplexLike( v ) ) {\n\t\t\t\t\tbuf[ j ] = real( v );\n\t\t\t\t\tbuf[ j+1 ] = imag( v );\n\t\t\t\t} else if ( isArrayLikeObject( v ) && v.length >= 2 ) {\n\t\t\t\t\tbuf[ j ] = v[ 0 ];\n\t\t\t\t\tbuf[ j+1 ] = v[ 1 ];\n\t\t\t\t} else {\n\t\t\t\t\tthrow new TypeError( format( 'invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', v ) );\n\t\t\t\t}\n\t\t\t\tj += 2; // stride\n\t\t\t}\n\t\t\treturn out;\n\t\t}\n\t\treturn new this( src );\n\t}\n\tif ( isCollection( src ) ) {\n\t\tif ( clbk ) {\n\t\t\t// Note: array contents affect how we iterate over a provided data source. If only complex number objects, we can extract real and imaginary components. Otherwise, for non-complex number arrays (e.g., `Float64Array`, etc), we assume a strided array where real and imaginary components are interleaved. In the former case, we expect a callback to return real and imaginary components (possibly as a complex number). In the latter case, we expect a callback to return *either* a real or imaginary component.\n\n\t\t\tlen = src.length;\n\t\t\tif ( src.get && src.set ) {\n\t\t\t\tget = accessorGetter( 'default' );\n\t\t\t} else {\n\t\t\t\tget = getter( 'default' );\n\t\t\t}\n\t\t\t// Detect whether we've been provided an array which returns complex number objects...\n\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\tif ( !isComplexLike( get( src, i ) ) ) {\n\t\t\t\t\tflg = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// If an array does not contain only complex number objects, then we assume interleaved real and imaginary components...\n\t\t\tif ( flg ) {\n\t\t\t\tif ( !isEven( len ) ) {\n\t\t\t\t\tthrow new RangeError( format( 'invalid argument. First argument must have a length which is a multiple of two. Length: `%u`.', len ) );\n\t\t\t\t}\n\t\t\t\tout = new this( len/2 );\n\t\t\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\t\tbuf[ i ] = clbk.call( thisArg, get( src, i ), i );\n\t\t\t\t}\n\t\t\t\treturn out;\n\t\t\t}\n\t\t\t// If an array contains only complex number objects, then we need to extract real and imaginary components...\n\t\t\tout = new this( len );\n\t\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\t\tj = 0;\n\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\tv = clbk.call( thisArg, get( src, i ), i );\n\t\t\t\tif ( isComplexLike( v ) ) {\n\t\t\t\t\tbuf[ j ] = real( v );\n\t\t\t\t\tbuf[ j+1 ] = imag( v );\n\t\t\t\t} else if ( isArrayLikeObject( v ) && v.length >= 2 ) {\n\t\t\t\t\tbuf[ j ] = v[ 0 ];\n\t\t\t\t\tbuf[ j+1 ] = v[ 1 ];\n\t\t\t\t} else {\n\t\t\t\t\tthrow new TypeError( format( 'invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', v ) );\n\t\t\t\t}\n\t\t\t\tj += 2; // stride\n\t\t\t}\n\t\t\treturn out;\n\t\t}\n\t\treturn new this( src );\n\t}\n\tif ( isObject( src ) && HAS_ITERATOR_SYMBOL && isFunction( src[ ITERATOR_SYMBOL ] ) ) { // eslint-disable-line max-len\n\t\tbuf = src[ ITERATOR_SYMBOL ]();\n\t\tif ( !isFunction( buf.next ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.', src ) );\n\t\t}\n\t\tif ( clbk ) {\n\t\t\ttmp = fromIteratorMap( buf, clbk, thisArg );\n\t\t} else {\n\t\t\ttmp = fromIterator( buf );\n\t\t}\n\t\tif ( tmp instanceof Error ) {\n\t\t\tthrow tmp;\n\t\t}\n\t\tlen = tmp.length / 2;\n\t\tout = new this( len );\n\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\tbuf[ i ] = tmp[ i ];\n\t\t}\n\t\treturn out;\n\t}\n\tthrow new TypeError( format( 'invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.', src ) );\n});\n\n/**\n* Creates a new 128-bit complex number array from a variable number of arguments.\n*\n* @name of\n* @memberof Complex128Array\n* @type {Function}\n* @param {...*} element - array elements\n* @throws {TypeError} `this` context must be a constructor\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Complex128Array} 128-bit complex number array\n*\n* @example\n* var arr = Complex128Array.of( 1.0, 1.0, 1.0, 1.0 );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*/\nsetReadOnly( Complex128Array, 'of', function of() {\n\tvar args;\n\tvar i;\n\tif ( !isFunction( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` context must be a constructor.' );\n\t}\n\tif ( !isComplexArrayConstructor( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\targs = [];\n\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\targs.push( arguments[ i ] );\n\t}\n\treturn new this( args );\n});\n\n/**\n* Returns an array element with support for both nonnegative and negative integer indices.\n*\n* @name at\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {integer} idx - element index\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} must provide an integer\n* @returns {(Complex128|void)} array element\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* var arr = new Complex128Array( 10 );\n*\n* var z = arr.at( 0 );\n* // returns \n*\n* var re = real( z );\n* // returns 0.0\n*\n* var im = imag( z );\n* // returns 0.0\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 9.0, -9.0 ], 9 );\n*\n* z = arr.at( 0 );\n* // returns \n*\n* re = real( z );\n* // returns 1.0\n*\n* im = imag( z );\n* // returns -1.0\n*\n* z = arr.at( -1 );\n* // returns \n*\n* re = real( z );\n* // returns 9.0\n*\n* im = imag( z );\n* // returns -9.0\n*\n* z = arr.at( 100 );\n* // returns undefined\n*\n* z = arr.at( -100 );\n* // returns undefined\n*/\nsetReadOnly( Complex128Array.prototype, 'at', function at( idx ) {\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isInteger( idx ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Must provide an integer. Value: `%s`.', idx ) );\n\t}\n\tif ( idx < 0 ) {\n\t\tidx += this._length;\n\t}\n\tif ( idx < 0 || idx >= this._length ) {\n\t\treturn;\n\t}\n\treturn getComplex128( this._buffer, idx );\n});\n\n/**\n* Pointer to the underlying data buffer.\n*\n* @name buffer\n* @memberof Complex128Array.prototype\n* @readonly\n* @type {ArrayBuffer}\n*\n* @example\n* var arr = new Complex128Array( 10 );\n*\n* var buf = arr.buffer;\n* // returns \n*/\nsetReadOnlyAccessor( Complex128Array.prototype, 'buffer', function get() {\n\treturn this._buffer.buffer;\n});\n\n/**\n* Size (in bytes) of the array.\n*\n* @name byteLength\n* @memberof Complex128Array.prototype\n* @readonly\n* @type {NonNegativeInteger}\n*\n* @example\n* var arr = new Complex128Array( 10 );\n*\n* var byteLength = arr.byteLength;\n* // returns 160\n*/\nsetReadOnlyAccessor( Complex128Array.prototype, 'byteLength', function get() {\n\treturn this._buffer.byteLength;\n});\n\n/**\n* Offset (in bytes) of the array from the start of its underlying `ArrayBuffer`.\n*\n* @name byteOffset\n* @memberof Complex128Array.prototype\n* @readonly\n* @type {NonNegativeInteger}\n*\n* @example\n* var arr = new Complex128Array( 10 );\n*\n* var byteOffset = arr.byteOffset;\n* // returns 0\n*/\nsetReadOnlyAccessor( Complex128Array.prototype, 'byteOffset', function get() {\n\treturn this._buffer.byteOffset;\n});\n\n/**\n* Size (in bytes) of each array element.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex128Array.prototype\n* @readonly\n* @type {PositiveInteger}\n* @default 16\n*\n* @example\n* var arr = new Complex128Array( 10 );\n*\n* var nbytes = arr.BYTES_PER_ELEMENT;\n* // returns 16\n*/\nsetReadOnly( Complex128Array.prototype, 'BYTES_PER_ELEMENT', Complex128Array.BYTES_PER_ELEMENT );\n\n/**\n* Copies a sequence of elements within the array to the position starting at `target`.\n*\n* @name copyWithin\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {integer} target - index at which to start copying elements\n* @param {integer} start - source index at which to copy elements from\n* @param {integer} [end] - source index at which to stop copying elements from\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Complex128Array} modified array\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* var arr = new Complex128Array( 4 );\n*\n* // Set the array elements:\n* arr.set( new Complex128( 1.0, 1.0 ), 0 );\n* arr.set( new Complex128( 2.0, 2.0 ), 1 );\n* arr.set( new Complex128( 3.0, 3.0 ), 2 );\n* arr.set( new Complex128( 4.0, 4.0 ), 3 );\n*\n* // Copy the first two elements to the last two elements:\n* arr.copyWithin( 2, 0, 2 );\n*\n* // Get the last array element:\n* var z = arr.get( 3 );\n*\n* var re = real( z );\n* // returns 2.0\n*\n* var im = imag( z );\n* // returns 2.0\n*/\nsetReadOnly( Complex128Array.prototype, 'copyWithin', function copyWithin( target, start ) {\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\t// FIXME: prefer a functional `copyWithin` implementation which addresses lack of universal browser support (e.g., IE11 and Safari) or ensure that typed arrays are polyfilled\n\tif ( arguments.length === 2 ) {\n\t\tthis._buffer.copyWithin( target*2, start*2 );\n\t} else {\n\t\tthis._buffer.copyWithin( target*2, start*2, arguments[2]*2 );\n\t}\n\treturn this;\n});\n\n/**\n* Returns an iterator for iterating over array key-value pairs.\n*\n* @name entries\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Iterator} iterator\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n*\n* var arr = [\n* new Complex128( 1.0, 1.0 ),\n* new Complex128( 2.0, 2.0 ),\n* new Complex128( 3.0, 3.0 )\n* ];\n* arr = new Complex128Array( arr );\n*\n* // Create an iterator:\n* var it = arr.entries();\n*\n* // Iterate over the key-value pairs...\n* var v = it.next().value;\n* // returns [ 0, ]\n*\n* v = it.next().value;\n* // returns [ 1, ]\n*\n* v = it.next().value;\n* // returns [ 2, ]\n*\n* var bool = it.next().done;\n* // returns true\n*/\nsetReadOnly( Complex128Array.prototype, 'entries', function entries() {\n\tvar buffer;\n\tvar self;\n\tvar iter;\n\tvar len;\n\tvar FLG;\n\tvar i;\n\tvar j;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tself = this;\n\tbuffer = this._buffer;\n\tlen = this._length;\n\n\t// Initialize the iteration indices:\n\ti = -1;\n\tj = -2;\n\n\t// Create an iterator protocol-compliant object:\n\titer = {};\n\tsetReadOnly( iter, 'next', next );\n\tsetReadOnly( iter, 'return', end );\n\n\tif ( ITERATOR_SYMBOL ) {\n\t\tsetReadOnly( iter, ITERATOR_SYMBOL, factory );\n\t}\n\treturn iter;\n\n\t/**\n\t* Returns an iterator protocol-compliant object containing the next iterated value.\n\t*\n\t* @private\n\t* @returns {Object} iterator protocol-compliant object\n\t*/\n\tfunction next() {\n\t\tvar z;\n\t\ti += 1;\n\t\tif ( FLG || i >= len ) {\n\t\t\treturn {\n\t\t\t\t'done': true\n\t\t\t};\n\t\t}\n\t\tj += 2;\n\t\tz = new Complex128( buffer[ j ], buffer[ j+1 ] );\n\t\treturn {\n\t\t\t'value': [ i, z ],\n\t\t\t'done': false\n\t\t};\n\t}\n\n\t/**\n\t* Finishes an iterator.\n\t*\n\t* @private\n\t* @param {*} [value] - value to return\n\t* @returns {Object} iterator protocol-compliant object\n\t*/\n\tfunction end( value ) {\n\t\tFLG = true;\n\t\tif ( arguments.length ) {\n\t\t\treturn {\n\t\t\t\t'value': value,\n\t\t\t\t'done': true\n\t\t\t};\n\t\t}\n\t\treturn {\n\t\t\t'done': true\n\t\t};\n\t}\n\n\t/**\n\t* Returns a new iterator.\n\t*\n\t* @private\n\t* @returns {Iterator} iterator\n\t*/\n\tfunction factory() {\n\t\treturn self.entries();\n\t}\n});\n\n/**\n* Tests whether all elements in an array pass a test implemented by a predicate function.\n*\n* @name every\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {boolean} boolean indicating whether all elements pass a test\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* function predicate( v ) {\n* return ( real( v ) === imag( v ) );\n* }\n*\n* var arr = new Complex128Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var bool = arr.every( predicate );\n* // returns true\n*/\nsetReadOnly( Complex128Array.prototype, 'every', function every( predicate, thisArg ) {\n\tvar buf;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tif ( !predicate.call( thisArg, getComplex128( buf, i ), i, this ) ) {\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn true;\n});\n\n/**\n* Returns a modified typed array filled with a fill value.\n*\n* @name fill\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {ComplexLike} value - fill value\n* @param {integer} [start=0] - starting index (inclusive)\n* @param {integer} [end] - ending index (exclusive)\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a complex number\n* @throws {TypeError} second argument must be an integer\n* @throws {TypeError} third argument must be an integer\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* var arr = new Complex128Array( 3 );\n*\n* arr.fill( new Complex128( 1.0, 1.0 ), 1 );\n*\n* var z = arr.get( 1 );\n* // returns \n*\n* var re = real( z );\n* // returns 1.0\n*\n* var im = imag( z );\n* // returns 1.0\n*\n* z = arr.get( 1 );\n* // returns \n*\n* re = real( z );\n* // returns 1.0\n*\n* im = imag( z );\n* // returns 1.0\n*/\nsetReadOnly( Complex128Array.prototype, 'fill', function fill( value, start, end ) {\n\tvar buf;\n\tvar len;\n\tvar idx;\n\tvar re;\n\tvar im;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isComplexLike( value ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a complex number. Value: `%s`.', value ) );\n\t}\n\tbuf = this._buffer;\n\tlen = this._length;\n\tif ( arguments.length > 1 ) {\n\t\tif ( !isInteger( start ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be an integer. Value: `%s`.', start ) );\n\t\t}\n\t\tif ( start < 0 ) {\n\t\t\tstart += len;\n\t\t\tif ( start < 0 ) {\n\t\t\t\tstart = 0;\n\t\t\t}\n\t\t}\n\t\tif ( arguments.length > 2 ) {\n\t\t\tif ( !isInteger( end ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Third argument must be an integer. Value: `%s`.', end ) );\n\t\t\t}\n\t\t\tif ( end < 0 ) {\n\t\t\t\tend += len;\n\t\t\t\tif ( end < 0 ) {\n\t\t\t\t\tend = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( end > len ) {\n\t\t\t\tend = len;\n\t\t\t}\n\t\t} else {\n\t\t\tend = len;\n\t\t}\n\t} else {\n\t\tstart = 0;\n\t\tend = len;\n\t}\n\tre = real( value );\n\tim = imag( value );\n\tfor ( i = start; i < end; i++ ) {\n\t\tidx = 2*i;\n\t\tbuf[ idx ] = re;\n\t\tbuf[ idx+1 ] = im;\n\t}\n\treturn this;\n});\n\n/**\n* Returns a new array containing the elements of an array which pass a test implemented by a predicate function.\n*\n* @name filter\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {Complex128Array} complex number array\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* function predicate( v ) {\n* return ( real( v ) === imag( v ) );\n* }\n*\n* var arr = new Complex128Array( 3 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n*\n* var out = arr.filter( predicate );\n* // returns \n*\n* var len = out.length;\n* // returns 1\n*\n* var z = out.get( 0 );\n* // returns \n*\n* var re = real( z );\n* // returns 2.0\n*\n* var im = imag( z );\n* // returns 2.0\n*/\nsetReadOnly( Complex128Array.prototype, 'filter', function filter( predicate, thisArg ) {\n\tvar buf;\n\tvar out;\n\tvar i;\n\tvar z;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tout = [];\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tz = getComplex128( buf, i );\n\t\tif ( predicate.call( thisArg, z, i, this ) ) {\n\t\t\tout.push( z );\n\t\t}\n\t}\n\treturn new this.constructor( out );\n});\n\n/**\n* Returns the first element in an array for which a predicate function returns a truthy value.\n*\n* @name find\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {(Complex128|void)} array element or undefined\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* function predicate( v ) {\n* return ( real( v ) === imag( v ) );\n* }\n*\n* var arr = new Complex128Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var z = arr.find( predicate );\n* // returns \n*\n* var re = real( z );\n* // returns 1.0\n*\n* var im = imag( z );\n* // returns 1.0\n*/\nsetReadOnly( Complex128Array.prototype, 'find', function find( predicate, thisArg ) {\n\tvar buf;\n\tvar i;\n\tvar z;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tz = getComplex128( buf, i );\n\t\tif ( predicate.call( thisArg, z, i, this ) ) {\n\t\t\treturn z;\n\t\t}\n\t}\n});\n\n/**\n* Returns the index of the first element in an array for which a predicate function returns a truthy value.\n*\n* @name findIndex\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {integer} index or -1\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* function predicate( v ) {\n* return ( real( v ) === imag( v ) );\n* }\n*\n* var arr = new Complex128Array( 3 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var idx = arr.findIndex( predicate );\n* // returns 2\n*/\nsetReadOnly( Complex128Array.prototype, 'findIndex', function findIndex( predicate, thisArg ) {\n\tvar buf;\n\tvar i;\n\tvar z;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tz = getComplex128( buf, i );\n\t\tif ( predicate.call( thisArg, z, i, this ) ) {\n\t\t\treturn i;\n\t\t}\n\t}\n\treturn -1;\n});\n\n/**\n* Returns the last element in an array for which a predicate function returns a truthy value.\n*\n* @name findLast\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {(Complex128|void)} array element or undefined\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* function predicate( v ) {\n* return ( real( v ) === imag( v ) );\n* }\n*\n* var arr = new Complex128Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var z = arr.findLast( predicate );\n* // returns \n*\n* var re = real( z );\n* // returns 3.0\n*\n* var im = imag( z );\n* // returns 3.0\n*/\nsetReadOnly( Complex128Array.prototype, 'findLast', function findLast( predicate, thisArg ) {\n\tvar buf;\n\tvar i;\n\tvar z;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = this._length-1; i >= 0; i-- ) {\n\t\tz = getComplex128( buf, i );\n\t\tif ( predicate.call( thisArg, z, i, this ) ) {\n\t\t\treturn z;\n\t\t}\n\t}\n});\n\n/**\n* Returns the index of the last element in an array for which a predicate function returns a truthy value.\n*\n* @name findLastIndex\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {integer} index or -1\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* function predicate( v ) {\n* return ( real( v ) === imag( v ) );\n* }\n*\n* var arr = new Complex128Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n*\n* var idx = arr.findLastIndex( predicate );\n* // returns 1\n*/\nsetReadOnly( Complex128Array.prototype, 'findLastIndex', function findLastIndex( predicate, thisArg ) {\n\tvar buf;\n\tvar i;\n\tvar z;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = this._length-1; i >= 0; i-- ) {\n\t\tz = getComplex128( buf, i );\n\t\tif ( predicate.call( thisArg, z, i, this ) ) {\n\t\t\treturn i;\n\t\t}\n\t}\n\treturn -1;\n});\n\n/**\n* Invokes a function once for each array element.\n*\n* @name forEach\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {Function} fcn - function to invoke\n* @param {*} [thisArg] - function invocation context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n*\n* function log( v, i ) {\n* console.log( '%s: %s', i, v.toString() );\n* }\n*\n* var arr = new Complex128Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* arr.forEach( log );\n*/\nsetReadOnly( Complex128Array.prototype, 'forEach', function forEach( fcn, thisArg ) {\n\tvar buf;\n\tvar i;\n\tvar z;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( fcn ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', fcn ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tz = getComplex128( buf, i );\n\t\tfcn.call( thisArg, z, i, this );\n\t}\n});\n\n/**\n* Returns an array element.\n*\n* @name get\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {NonNegativeInteger} idx - element index\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} must provide a nonnegative integer\n* @returns {(Complex128|void)} array element\n*\n* @example\n* var arr = new Complex128Array( 10 );\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* var z = arr.get( 0 );\n* // returns \n*\n* var re = real( z );\n* // returns 0.0\n*\n* var im = imag( z );\n* // returns 0.0\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n*\n* z = arr.get( 0 );\n* // returns \n*\n* re = real( z );\n* // returns 1.0\n*\n* im = imag( z );\n* // returns -1.0\n*\n* z = arr.get( 100 );\n* // returns undefined\n*/\nsetReadOnly( Complex128Array.prototype, 'get', function get( idx ) {\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isNonNegativeInteger( idx ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Must provide a nonnegative integer. Value: `%s`.', idx ) );\n\t}\n\tif ( idx >= this._length ) {\n\t\treturn;\n\t}\n\treturn getComplex128( this._buffer, idx );\n});\n\n/**\n* Number of array elements.\n*\n* @name length\n* @memberof Complex128Array.prototype\n* @readonly\n* @type {NonNegativeInteger}\n*\n* @example\n* var arr = new Complex128Array( 10 );\n*\n* var len = arr.length;\n* // returns 10\n*/\nsetReadOnlyAccessor( Complex128Array.prototype, 'length', function get() {\n\treturn this._length;\n});\n\n/**\n* Returns a boolean indicating whether an array includes a provided value.\n*\n* @name includes\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {ComplexLike} searchElement - search element\n* @param {integer} [fromIndex=0] - starting index (inclusive)\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a complex number\n* @throws {TypeError} second argument must be an integer\n* @returns {boolean} boolean indicating whether an array includes a provided value\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n*\n* var arr = new Complex128Array( 5 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n* arr.set( [ 4.0, -4.0 ], 3 );\n* arr.set( [ 5.0, -5.0 ], 4 );\n*\n* var bool = arr.includes( new Complex128( 3.0, -3.0 ) );\n* // returns true\n*\n* bool = arr.includes( new Complex128( 3.0, -3.0 ), 3 );\n* // returns false\n*\n* bool = arr.includes( new Complex128( 4.0, -4.0 ), -3 );\n* // returns true\n*/\nsetReadOnly( Complex128Array.prototype, 'includes', function includes( searchElement, fromIndex ) {\n\tvar buf;\n\tvar idx;\n\tvar re;\n\tvar im;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isComplexLike( searchElement ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a complex number. Value: `%s`.', searchElement ) );\n\t}\n\tif ( arguments.length > 1 ) {\n\t\tif ( !isInteger( fromIndex ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be an integer. Value: `%s`.', fromIndex ) );\n\t\t}\n\t\tif ( fromIndex < 0 ) {\n\t\t\tfromIndex += this._length;\n\t\t\tif ( fromIndex < 0 ) {\n\t\t\t\tfromIndex = 0;\n\t\t\t}\n\t\t}\n\t} else {\n\t\tfromIndex = 0;\n\t}\n\tre = real( searchElement );\n\tim = imag( searchElement );\n\tbuf = this._buffer;\n\tfor ( i = fromIndex; i < this._length; i++ ) {\n\t\tidx = 2 * i;\n\t\tif ( re === buf[ idx ] && im === buf[ idx+1 ] ) {\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n});\n\n/**\n* Returns the first index at which a given element can be found.\n*\n* @name indexOf\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {ComplexLike} searchElement - element to find\n* @param {integer} [fromIndex=0] - starting index (inclusive)\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a complex number\n* @throws {TypeError} second argument must be an integer\n* @returns {integer} index or -1\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n*\n* var arr = new Complex128Array( 5 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n* arr.set( [ 4.0, -4.0 ], 3 );\n* arr.set( [ 5.0, -5.0 ], 4 );\n*\n* var idx = arr.indexOf( new Complex128( 3.0, -3.0 ) );\n* // returns 2\n*\n* idx = arr.indexOf( new Complex128( 3.0, -3.0 ), 3 );\n* // returns -1\n*\n* idx = arr.indexOf( new Complex128( 4.0, -4.0 ), -3 );\n* // returns 3\n*/\nsetReadOnly( Complex128Array.prototype, 'indexOf', function indexOf( searchElement, fromIndex ) {\n\tvar buf;\n\tvar idx;\n\tvar re;\n\tvar im;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isComplexLike( searchElement ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a complex number. Value: `%s`.', searchElement ) );\n\t}\n\tif ( arguments.length > 1 ) {\n\t\tif ( !isInteger( fromIndex ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be an integer. Value: `%s`.', fromIndex ) );\n\t\t}\n\t\tif ( fromIndex < 0 ) {\n\t\t\tfromIndex += this._length;\n\t\t\tif ( fromIndex < 0 ) {\n\t\t\t\tfromIndex = 0;\n\t\t\t}\n\t\t}\n\t} else {\n\t\tfromIndex = 0;\n\t}\n\tre = real( searchElement );\n\tim = imag( searchElement );\n\tbuf = this._buffer;\n\tfor ( i = fromIndex; i < this._length; i++ ) {\n\t\tidx = 2 * i;\n\t\tif ( re === buf[ idx ] && im === buf[ idx+1 ] ) {\n\t\t\treturn i;\n\t\t}\n\t}\n\treturn -1;\n});\n\n/**\n* Returns a new string by concatenating all array elements.\n*\n* @name join\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {string} [separator=','] - element separator\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a string\n* @returns {string} string representation\n*\n* @example\n* var arr = new Complex128Array( 2 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n*\n* var str = arr.join();\n* // returns '1 + 1i,2 + 2i'\n*\n* str = arr.join( '/' );\n* // returns '1 + 1i/2 + 2i'\n*/\nsetReadOnly( Complex128Array.prototype, 'join', function join( separator ) {\n\tvar out;\n\tvar buf;\n\tvar sep;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( arguments.length === 0 ) {\n\t\tsep = ',';\n\t} else if ( isString( separator ) ) {\n\t\tsep = separator;\n\t} else {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a string. Value: `%s`.', separator ) );\n\t}\n\tout = [];\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tout.push( getComplex128( buf, i ).toString() );\n\t}\n\treturn out.join( sep );\n});\n\n/**\n* Returns the last index at which a given element can be found.\n*\n* @name lastIndexOf\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {ComplexLike} searchElement - element to find\n* @param {integer} [fromIndex] - index at which to start searching backward (inclusive)\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a complex number\n* @throws {TypeError} second argument must be an integer\n* @returns {integer} index or -1\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n*\n* var arr = new Complex128Array( 5 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n* arr.set( [ 4.0, -4.0 ], 3 );\n* arr.set( [ 3.0, -3.0 ], 4 );\n*\n* var idx = arr.lastIndexOf( new Complex128( 3.0, -3.0 ) );\n* // returns 4\n*\n* idx = arr.lastIndexOf( new Complex128( 3.0, -3.0 ), 3 );\n* // returns 2\n*\n* idx = arr.lastIndexOf( new Complex128( 5.0, -5.0 ), 3 );\n* // returns -1\n*\n* idx = arr.lastIndexOf( new Complex128( 2.0, -2.0 ), -3 );\n* // returns 1\n*/\nsetReadOnly( Complex128Array.prototype, 'lastIndexOf', function lastIndexOf( searchElement, fromIndex ) {\n\tvar buf;\n\tvar idx;\n\tvar re;\n\tvar im;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isComplexLike( searchElement ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a complex number. Value: `%s`.', searchElement ) );\n\t}\n\tif ( arguments.length > 1 ) {\n\t\tif ( !isInteger( fromIndex ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be an integer. Value: `%s`.', fromIndex ) );\n\t\t}\n\t\tif ( fromIndex >= this._length ) {\n\t\t\tfromIndex = this._length - 1;\n\t\t} else if ( fromIndex < 0 ) {\n\t\t\tfromIndex += this._length;\n\t\t}\n\t} else {\n\t\tfromIndex = this._length - 1;\n\t}\n\tre = real( searchElement );\n\tim = imag( searchElement );\n\tbuf = this._buffer;\n\tfor ( i = fromIndex; i >= 0; i-- ) {\n\t\tidx = 2 * i;\n\t\tif ( re === buf[ idx ] && im === buf[ idx+1 ] ) {\n\t\t\treturn i;\n\t\t}\n\t}\n\treturn -1;\n});\n\n/**\n* Returns a new array with each element being the result of a provided callback function.\n*\n* @name map\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {Function} fcn - callback function\n* @param {*} [thisArg] - callback function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {Complex128Array} complex number array\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* function scale( v, i ) {\n* return new Complex128( 2.0*real( v ), 2.0*imag( v ) );\n* }\n*\n* var arr = new Complex128Array( 3 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n*\n* var out = arr.map( scale );\n* // returns \n*\n* var z = out.get( 0 );\n* // returns \n*\n* var re = real( z );\n* // returns 2.0\n*\n* var im = imag( z );\n* // returns -2.0\n*/\nsetReadOnly( Complex128Array.prototype, 'map', function map( fcn, thisArg ) {\n\tvar outbuf;\n\tvar buf;\n\tvar out;\n\tvar i;\n\tvar v;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( fcn ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', fcn ) );\n\t}\n\tbuf = this._buffer;\n\tout = new this.constructor( this._length );\n\toutbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tv = fcn.call( thisArg, getComplex128( buf, i ), i, this );\n\t\tif ( isComplexLike( v ) ) {\n\t\t\toutbuf[ 2*i ] = real( v );\n\t\t\toutbuf[ (2*i)+1 ] = imag( v );\n\t\t} else if ( isArrayLikeObject( v ) && v.length === 2 ) {\n\t\t\toutbuf[ 2*i ] = v[ 0 ];\n\t\t\toutbuf[ (2*i)+1 ] = v[ 1 ];\n\t\t} else {\n\t\t\tthrow new TypeError( format( 'invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', v ) );\n\t\t}\n\t}\n\treturn out;\n});\n\n/**\n* Reverses an array in-place.\n*\n* @name reverse\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Complex128Array} reversed array\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* var arr = new Complex128Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var out = arr.reverse();\n* // returns \n*\n* var z = out.get( 0 );\n* // returns \n*\n* var re = real( z );\n* // returns 3.0\n*\n* var im = imag( z );\n* // returns 3.0\n*\n* z = out.get( 1 );\n* // returns \n*\n* re = real( z );\n* // returns 2.0\n*\n* im = imag( z );\n* // returns 2.0\n*\n* z = out.get( 2 );\n* // returns \n*\n* re = real( z );\n* // returns 1.0\n*\n* im = imag( z );\n* // returns 1.0\n*/\nsetReadOnly( Complex128Array.prototype, 'reverse', function reverse() {\n\tvar buf;\n\tvar tmp;\n\tvar len;\n\tvar N;\n\tvar i;\n\tvar j;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tlen = this._length;\n\tbuf = this._buffer;\n\tN = floor( len / 2 );\n\tfor ( i = 0; i < N; i++ ) {\n\t\tj = len - i - 1;\n\t\ttmp = buf[ (2*i) ];\n\t\tbuf[ (2*i) ] = buf[ (2*j) ];\n\t\tbuf[ (2*j) ] = tmp;\n\t\ttmp = buf[ (2*i)+1 ];\n\t\tbuf[ (2*i)+1 ] = buf[ (2*j)+1 ];\n\t\tbuf[ (2*j)+1 ] = tmp;\n\t}\n\treturn this;\n});\n\n/**\n* Sets an array element.\n*\n* ## Notes\n*\n* - When provided a typed array, real or complex, we must check whether the source array shares the same buffer as the target array and whether the underlying memory overlaps. In particular, we are concerned with the following scenario:\n*\n* ```text\n* buf: ---------------------\n* src: ---------------------\n* ```\n*\n* In the above, as we copy values from `src`, we will overwrite values in the `src` view, resulting in duplicated values copied into the end of `buf`, which is not intended. Hence, to avoid overwriting source values, we must **copy** source values to a temporary array.\n*\n* In the other overlapping scenario,\n*\n* ```text\n* buf: ---------------------\n* src: ---------------------\n* ```\n*\n* by the time we begin copying into the overlapping region, we are copying from the end of `src`, a non-overlapping region, which means we don't run the risk of copying copied values, rather than the original `src` values as intended.\n*\n* @name set\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {(Collection|Complex|ComplexArray)} value - value(s)\n* @param {NonNegativeInteger} [i=0] - element index at which to start writing values\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be either a complex number, an array-like object, or a complex number array\n* @throws {TypeError} index argument must be a nonnegative integer\n* @throws {RangeError} array-like objects must have a length which is a multiple of two\n* @throws {RangeError} index argument is out-of-bounds\n* @throws {RangeError} target array lacks sufficient storage to accommodate source values\n* @returns {void}\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* var arr = new Complex128Array( 10 );\n*\n* var z = arr.get( 0 );\n* // returns \n*\n* var re = real( z );\n* // returns 0.0\n*\n* var im = imag( z );\n* // returns 0.0\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n*\n* z = arr.get( 0 );\n* // returns \n*\n* re = real( z );\n* // returns 1.0\n*\n* im = imag( z );\n* // returns -1.0\n*/\nsetReadOnly( Complex128Array.prototype, 'set', function set( value ) {\n\t/* eslint-disable no-underscore-dangle */\n\tvar sbuf;\n\tvar idx;\n\tvar buf;\n\tvar tmp;\n\tvar flg;\n\tvar N;\n\tvar v;\n\tvar i;\n\tvar j;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tbuf = this._buffer;\n\tif ( arguments.length > 1 ) {\n\t\tidx = arguments[ 1 ];\n\t\tif ( !isNonNegativeInteger( idx ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Index argument must be a nonnegative integer. Value: `%s`.', idx ) );\n\t\t}\n\t} else {\n\t\tidx = 0;\n\t}\n\tif ( isComplexLike( value ) ) {\n\t\tif ( idx >= this._length ) {\n\t\t\tthrow new RangeError( format( 'invalid argument. Index argument is out-of-bounds. Value: `%u`.', idx ) );\n\t\t}\n\t\tidx *= 2;\n\t\tbuf[ idx ] = real( value );\n\t\tbuf[ idx+1 ] = imag( value );\n\t\treturn;\n\t}\n\tif ( isComplexArray( value ) ) {\n\t\tN = value._length;\n\t\tif ( idx+N > this._length ) {\n\t\t\tthrow new RangeError( 'invalid arguments. Target array lacks sufficient storage to accommodate source values.' );\n\t\t}\n\t\tsbuf = value._buffer;\n\n\t\t// Check for overlapping memory...\n\t\tj = buf.byteOffset + (idx*BYTES_PER_ELEMENT);\n\t\tif (\n\t\t\tsbuf.buffer === buf.buffer &&\n\t\t\t(\n\t\t\t\tsbuf.byteOffset < j &&\n\t\t\t\tsbuf.byteOffset+sbuf.byteLength > j\n\t\t\t)\n\t\t) {\n\t\t\t// We need to copy source values...\n\t\t\ttmp = new Float64Array( sbuf.length );\n\t\t\tfor ( i = 0; i < sbuf.length; i++ ) {\n\t\t\t\ttmp[ i ] = sbuf[ i ];\n\t\t\t}\n\t\t\tsbuf = tmp;\n\t\t}\n\t\tidx *= 2;\n\t\tj = 0;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\tbuf[ idx ] = sbuf[ j ];\n\t\t\tbuf[ idx+1 ] = sbuf[ j+1 ];\n\t\t\tidx += 2; // stride\n\t\t\tj += 2; // stride\n\t\t}\n\t\treturn;\n\t}\n\tif ( isCollection( value ) ) {\n\t\t// Detect whether we've been provided an array of complex numbers...\n\t\tN = value.length;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\tif ( !isComplexLike( value[ i ] ) ) {\n\t\t\t\tflg = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t// If an array does not contain only complex numbers, then we assume interleaved real and imaginary components...\n\t\tif ( flg ) {\n\t\t\tif ( !isEven( N ) ) {\n\t\t\t\tthrow new RangeError( format( 'invalid argument. Array-like object arguments must have a length which is a multiple of two. Length: `%u`.', N ) );\n\t\t\t}\n\t\t\tif ( idx+(N/2) > this._length ) {\n\t\t\t\tthrow new RangeError( 'invalid arguments. Target array lacks sufficient storage to accommodate source values.' );\n\t\t\t}\n\t\t\tsbuf = value;\n\n\t\t\t// Check for overlapping memory...\n\t\t\tj = buf.byteOffset + (idx*BYTES_PER_ELEMENT);\n\t\t\tif (\n\t\t\t\tsbuf.buffer === buf.buffer &&\n\t\t\t\t(\n\t\t\t\t\tsbuf.byteOffset < j &&\n\t\t\t\t\tsbuf.byteOffset+sbuf.byteLength > j\n\t\t\t\t)\n\t\t\t) {\n\t\t\t\t// We need to copy source values...\n\t\t\t\ttmp = new Float64Array( N );\n\t\t\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\t\t\ttmp[ i ] = sbuf[ i ];\n\t\t\t\t}\n\t\t\t\tsbuf = tmp;\n\t\t\t}\n\t\t\tidx *= 2;\n\t\t\tN /= 2;\n\t\t\tj = 0;\n\t\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\t\tbuf[ idx ] = sbuf[ j ];\n\t\t\t\tbuf[ idx+1 ] = sbuf[ j+1 ];\n\t\t\t\tidx += 2; // stride\n\t\t\t\tj += 2; // stride\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\t// If an array contains only complex numbers, then we need to extract real and imaginary components...\n\t\tif ( idx+N > this._length ) {\n\t\t\tthrow new RangeError( 'invalid arguments. Target array lacks sufficient storage to accommodate source values.' );\n\t\t}\n\t\tidx *= 2;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\tv = value[ i ];\n\t\t\tbuf[ idx ] = real( v );\n\t\t\tbuf[ idx+1 ] = imag( v );\n\t\t\tidx += 2; // stride\n\t\t}\n\t\treturn;\n\t}\n\tthrow new TypeError( format( 'invalid argument. First argument must be either a complex number, an array-like object, or a complex number array. Value: `%s`.', value ) );\n\n\t/* eslint-enable no-underscore-dangle */\n});\n\n/**\n* Tests whether at least one element in an array passes a test implemented by a predicate function.\n*\n* @name some\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {boolean} boolean indicating whether at least one element passes a test\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* function predicate( v ) {\n* return ( real( v ) === imag( v ) );\n* }\n*\n* var arr = new Complex128Array( 3 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n*\n* var bool = arr.some( predicate );\n* // returns true\n*/\nsetReadOnly( Complex128Array.prototype, 'some', function some( predicate, thisArg ) {\n\tvar buf;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tif ( predicate.call( thisArg, getComplex128( buf, i ), i, this ) ) {\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n});\n\n/**\n* Creates a new typed array view over the same underlying `ArrayBuffer` and with the same underlying data type as the host array.\n*\n* @name subarray\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {integer} [begin=0] - starting index (inclusive)\n* @param {integer} [end] - ending index (exclusive)\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be an integer\n* @throws {TypeError} second argument must be an integer\n* @returns {Complex64Array} subarray\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* var arr = new Complex128Array( 5 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n* arr.set( [ 4.0, -4.0 ], 3 );\n* arr.set( [ 5.0, -5.0 ], 4 );\n*\n* var subarr = arr.subarray();\n* // returns \n*\n* var len = subarr.length;\n* // returns 5\n*\n* var z = subarr.get( 0 );\n* // returns \n*\n* var re = real( z );\n* // returns 1.0\n*\n* var im = imag( z );\n* // returns -1.0\n*\n* z = subarr.get( len-1 );\n* // returns \n*\n* re = real( z );\n* // returns 5.0\n*\n* im = imag( z );\n* // returns -5.0\n*\n* subarr = arr.subarray( 1, -2 );\n* // returns \n*\n* len = subarr.length;\n* // returns 2\n*\n* z = subarr.get( 0 );\n* // returns \n*\n* re = real( z );\n* // returns 2.0\n*\n* im = imag( z );\n* // returns -2.0\n*\n* z = subarr.get( len-1 );\n* // returns \n*\n* re = real( z );\n* // returns 3.0\n*\n* im = imag( z );\n* // returns -3.0\n*/\nsetReadOnly( Complex128Array.prototype, 'subarray', function subarray( begin, end ) {\n\tvar offset;\n\tvar buf;\n\tvar len;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tbuf = this._buffer;\n\tlen = this._length;\n\tif ( arguments.length === 0 ) {\n\t\tbegin = 0;\n\t\tend = len;\n\t} else {\n\t\tif ( !isInteger( begin ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. First argument must be an integer. Value: `%s`.', begin ) );\n\t\t}\n\t\tif ( begin < 0 ) {\n\t\t\tbegin += len;\n\t\t\tif ( begin < 0 ) {\n\t\t\t\tbegin = 0;\n\t\t\t}\n\t\t}\n\t\tif ( arguments.length === 1 ) {\n\t\t\tend = len;\n\t\t} else {\n\t\t\tif ( !isInteger( end ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be an integer. Value: `%s`.', end ) );\n\t\t\t}\n\t\t\tif ( end < 0 ) {\n\t\t\t\tend += len;\n\t\t\t\tif ( end < 0 ) {\n\t\t\t\t\tend = 0;\n\t\t\t\t}\n\t\t\t} else if ( end > len ) {\n\t\t\t\tend = len;\n\t\t\t}\n\t\t}\n\t}\n\tif ( begin >= len ) {\n\t\tlen = 0;\n\t\toffset = buf.byteLength;\n\t} else if ( begin >= end ) {\n\t\tlen = 0;\n\t\toffset = buf.byteOffset + ( begin*BYTES_PER_ELEMENT );\n\t} else {\n\t\tlen = end - begin;\n\t\toffset = buf.byteOffset + ( begin*BYTES_PER_ELEMENT );\n\t}\n\treturn new this.constructor( buf.buffer, offset, ( len < 0 ) ? 0 : len );\n});\n\n/**\n* Returns a new typed array containing the elements in reversed order.\n*\n* @name toReversed\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Complex128Array} reversed array\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* var arr = new Complex128Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var out = arr.toReversed();\n* // returns \n*\n* var z = out.get( 0 );\n* // returns \n*\n* var re = real( z );\n* // returns 3.0\n*\n* var im = imag( z );\n* // returns 3.0\n*\n* z = out.get( 1 );\n* // returns \n*\n* re = real( z );\n* // returns 2.0\n*\n* im = imag( z );\n* // returns 2.0\n*\n* z = out.get( 2 );\n* // returns \n*\n* re = real( z );\n* // returns 1.0\n*\n* im = imag( z );\n* // returns 1.0\n*/\nsetReadOnly( Complex128Array.prototype, 'toReversed', function toReversed() {\n\tvar outbuf;\n\tvar out;\n\tvar len;\n\tvar buf;\n\tvar i;\n\tvar j;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tlen = this._length;\n\tout = new this.constructor( len );\n\tbuf = this._buffer;\n\toutbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\tfor ( i = 0; i < len; i++ ) {\n\t\tj = len - i - 1;\n\t\toutbuf[ (2*i) ] = buf[ (2*j) ];\n\t\toutbuf[ (2*i)+1 ] = buf[ (2*j)+1 ];\n\t}\n\treturn out;\n});\n\n/**\n* Serializes an array as a string.\n*\n* @name toString\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @throws {TypeError} `this` must be a complex number array\n* @returns {string} string representation\n*\n* @example\n* var arr = new Complex128Array( 2 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n*\n* var str = arr.toString();\n* // returns '1 + 1i,2 + 2i'\n*/\nsetReadOnly( Complex128Array.prototype, 'toString', function toString() {\n\tvar out;\n\tvar buf;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tout = [];\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tout.push( getComplex128( buf, i ).toString() );\n\t}\n\treturn out.join( ',' );\n});\n\n/**\n* Returns a new typed array with the element at a provided index replaced with a provided value.\n*\n* @name with\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {integer} index - element index\n* @param {ComplexLike} value - new value\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be an integer\n* @throws {RangeError} index argument is out-of-bounds\n* @throws {TypeError} second argument must be a complex number\n* @returns {Complex128Array} new typed array\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n* import Complex128 from '@stdlib/complex-float64';\n*\n* var arr = new Complex128Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var out = arr.with( 0, new Complex128( 4.0, 4.0 ) );\n* // returns \n*\n* var z = out.get( 0 );\n* // returns \n*\n* var re = real( z );\n* // returns 4.0\n*\n* var im = imag( z );\n* // returns 4.0\n*/\nsetReadOnly( Complex128Array.prototype, 'with', function copyWith( index, value ) {\n\tvar buf;\n\tvar out;\n\tvar len;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isInteger( index ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be an integer. Value: `%s`.', index ) );\n\t}\n\tlen = this._length;\n\tif ( index < 0 ) {\n\t\tindex += len;\n\t}\n\tif ( index < 0 || index >= len ) {\n\t\tthrow new RangeError( format( 'invalid argument. Index argument is out-of-bounds. Value: `%s`.', index ) );\n\t}\n\tif ( !isComplexLike( value ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Second argument must be a complex number. Value: `%s`.', value ) );\n\t}\n\tout = new this.constructor( this._buffer );\n\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\tbuf[ 2*index ] = real( value );\n\tbuf[ (2*index)+1 ] = imag( value );\n\treturn out;\n});\n\n\n// EXPORTS //\n\nexport default Complex128Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport Float64Array from '@stdlib/array-float64';\nimport Float32Array from '@stdlib/array-float32';\nimport Int16Array from '@stdlib/array-int16';\nimport Int32Array from '@stdlib/array-int32';\nimport Int8Array from '@stdlib/array-int8';\nimport Uint16Array from '@stdlib/array-uint16';\nimport Uint32Array from '@stdlib/array-uint32';\nimport Uint8Array from '@stdlib/array-uint8';\nimport Uint8ClampedArray from '@stdlib/array-uint8c';\nimport Complex64Array from '@stdlib/array-complex64';\nimport Complex128Array from '@stdlib/array-complex128';\n\n\n// MAIN //\n\n// Mapping from data types to constructors...\nvar ctors = {\n\t'float64': Float64Array,\n\t'float32': Float32Array,\n\t'generic': Array, // TODO: replace with `stdlib` pkg\n\t'int16': Int16Array,\n\t'int32': Int32Array,\n\t'int8': Int8Array,\n\t'uint16': Uint16Array,\n\t'uint32': Uint32Array,\n\t'uint8': Uint8Array,\n\t'uint8c': Uint8ClampedArray,\n\t'complex64': Complex64Array,\n\t'complex128': Complex128Array\n};\n\n\n// EXPORTS //\n\nexport default ctors;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport table from './ctors.js';\n\n\n// MAIN //\n\n/**\n* Returns an array constructor.\n*\n* @param {string} dtype - data type\n* @returns {(Function|null)} constructor or null\n*\n* @example\n* var ctor = ctors( 'float64' );\n* // returns \n*\n* @example\n* var ctor = ctors( 'float' );\n* // returns null\n*/\nfunction ctors( dtype ) {\n\treturn table[ dtype ] || null;\n}\n\n\n// EXPORTS //\n\nexport default ctors;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport filled from '@stdlib/array-base-filled';\n\n\n// MAIN //\n\n/**\n* Returns a zero-filled \"generic\" array.\n*\n* @param {NonNegativeInteger} len - array length\n* @returns {Array} output array\n*\n* @example\n* var out = zeros( 3 );\n* // returns [ 0.0, 0.0, 0.0 ]\n*/\nfunction zeros( len ) {\n\treturn filled( 0.0, len );\n}\n\n\n// EXPORTS //\n\nexport default zeros;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Returns a filled \"generic\" array.\n*\n* @param {*} value - fill value\n* @param {NonNegativeInteger} len - array length\n* @returns {Array} filled array\n*\n* @example\n* var out = filled( 0.0, 3 );\n* // returns [ 0.0, 0.0, 0.0 ]\n*\n* @example\n* var out = filled( 'beep', 3 );\n* // returns [ 'beep', 'beep', 'beep' ]\n*/\nfunction filled( value, len ) {\n\tvar arr;\n\tvar i;\n\n\t// Manually push elements in order to ensure \"fast\" elements...\n\tarr = [];\n\tfor ( i = 0; i < len; i++ ) {\n\t\tarr.push( value );\n\t}\n\treturn arr;\n}\n\n\n// EXPORTS //\n\nexport default filled;\n","/**\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// MAIN //\n\n/**\n* Returns default array settings.\n*\n* @returns {Object} defaults\n*\n* @example\n* var o = defaults();\n* // returns {...}\n*/\nfunction defaults() {\n\treturn {\n\t\t// Data types:\n\t\t'dtypes': {\n\t\t\t'default': 'float64',\n\t\t\t'numeric': 'float64',\n\t\t\t'real': 'float64',\n\t\t\t'floating_point': 'float64',\n\t\t\t'real_floating_point': 'float64',\n\t\t\t'complex_floating_point': 'complex128',\n\t\t\t'integer': 'int32',\n\t\t\t'signed_integer': 'int32',\n\t\t\t'unsigned_integer': 'uint32'\n\t\t}\n\t};\n}\n\n\n// EXPORTS //\n\nexport default defaults;\n","/**\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// MODULES //\n\nimport defaults from './main.js';\n\n\n// VARIABLES //\n\nvar DEFAULTS = defaults();\nvar HASH = {\n\t'dtypes.default': DEFAULTS.dtypes.default,\n\t'dtypes.numeric': DEFAULTS.dtypes.numeric,\n\t'dtypes.real': DEFAULTS.dtypes.real,\n\t'dtypes.floating_point': DEFAULTS.dtypes.floating_point,\n\t'dtypes.real_floating_point': DEFAULTS.dtypes.real_floating_point,\n\t'dtypes.complex_floating_point': DEFAULTS.dtypes.complex_floating_point,\n\t'dtypes.integer': DEFAULTS.dtypes.integer,\n\t'dtypes.signed_integer': DEFAULTS.dtypes.signed_integer,\n\t'dtypes.unsigned_integer': DEFAULTS.dtypes.unsigned_integer\n};\n\n\n// MAIN //\n\n/**\n* Returns a default array setting.\n*\n* @param {string} name - setting name\n* @returns {*} default setting or null\n*\n* @example\n* var v = get( 'dtypes.default' );\n* // returns \n*/\nfunction get( name ) {\n\tvar v = HASH[ name ];\n\treturn ( v === void 0 ) ? null : v;\n}\n\n\n// EXPORTS //\n\nexport default get;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Tests if a value is a number primitive.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number primitive\n*\n* @example\n* var bool = isNumber( 3.14 );\n* // returns true\n*\n* @example\n* var bool = isNumber( NaN );\n* // returns true\n*\n* @example\n* var bool = isNumber( new Number( 3.14 ) );\n* // returns false\n*/\nfunction isNumber( value ) {\n\treturn ( typeof value === 'number' ); // NOTE: we inline the `isNumber.isPrimitive` function from `@stdlib/assert/is-number` in order to avoid circular dependencies.\n}\n\n\n// EXPORTS //\n\nexport default isNumber;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// FUNCTIONS //\n\n/**\n* Tests if a string starts with a minus sign (`-`).\n*\n* @private\n* @param {string} str - input string\n* @returns {boolean} boolean indicating if a string starts with a minus sign (`-`)\n*/\nfunction startsWithMinus( str ) {\n\treturn str[ 0 ] === '-';\n}\n\n/**\n* Returns a string of `n` zeros.\n*\n* @private\n* @param {number} n - number of zeros\n* @returns {string} string of zeros\n*/\nfunction zeros( n ) {\n\tvar out = '';\n\tvar i;\n\tfor ( i = 0; i < n; i++ ) {\n\t\tout += '0';\n\t}\n\treturn out;\n}\n\n\n// MAIN //\n\n/**\n* Pads a token with zeros to the specified width.\n*\n* @private\n* @param {string} str - token argument\n* @param {number} width - token width\n* @param {boolean} [right=false] - boolean indicating whether to pad to the right\n* @returns {string} padded token argument\n*/\nfunction zeroPad( str, width, right ) {\n\tvar negative = false;\n\tvar pad = width - str.length;\n\tif ( pad < 0 ) {\n\t\treturn str;\n\t}\n\tif ( startsWithMinus( str ) ) {\n\t\tnegative = true;\n\t\tstr = str.substr( 1 );\n\t}\n\tstr = ( right ) ?\n\t\tstr + zeros( pad ) :\n\t\tzeros( pad ) + str;\n\tif ( negative ) {\n\t\tstr = '-' + str;\n\t}\n\treturn str;\n}\n\n\n// EXPORTS //\n\nexport default zeroPad;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport defineProperty from '@stdlib/utils-define-property';\n\n\n// MAIN //\n\n/**\n* Defines a non-enumerable read-only property.\n*\n* @param {Object} obj - object on which to define the property\n* @param {(string|symbol)} prop - property name\n* @param {*} value - value to set\n*\n* @example\n* var obj = {};\n*\n* setNonEnumerableReadOnly( obj, 'foo', 'bar' );\n*\n* try {\n* obj.foo = 'boop';\n* } catch ( err ) {\n* console.error( err.message );\n* }\n*/\nfunction setNonEnumerableReadOnly( obj, prop, value ) {\n\tdefineProperty( obj, prop, {\n\t\t'configurable': false,\n\t\t'enumerable': false,\n\t\t'writable': false,\n\t\t'value': value\n\t});\n}\n\n\n// EXPORTS //\n\nexport default setNonEnumerableReadOnly;\n","/**\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* Return default array settings.\n*\n* @module @stdlib/array-defaults\n*\n* @example\n* import defaults from '@stdlib/array-defaults';\n*\n* var o = defaults();\n* // returns {...}\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport get from './get.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'get', get );\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isNumber from './is_number.js';\nimport zeroPad from './zero_pad.js';\n\n// NOTE: for the following, we explicitly avoid using stdlib packages in this particular package in order to avoid circular dependencies.\nvar lowercase = String.prototype.toLowerCase;\nvar uppercase = String.prototype.toUpperCase;\n\n\n// MAIN //\n\n/**\n* Formats a token object argument as an integer.\n*\n* @private\n* @param {Object} token - token object\n* @throws {Error} must provide a valid integer\n* @returns {string} formatted token argument\n*/\nfunction formatInteger( token ) {\n\tvar base;\n\tvar out;\n\tvar i;\n\n\tswitch ( token.specifier ) {\n\tcase 'b':\n\t\t// Case: %b (binary)\n\t\tbase = 2;\n\t\tbreak;\n\tcase 'o':\n\t\t// Case: %o (octal)\n\t\tbase = 8;\n\t\tbreak;\n\tcase 'x':\n\tcase 'X':\n\t\t// Case: %x, %X (hexadecimal)\n\t\tbase = 16;\n\t\tbreak;\n\tcase 'd':\n\tcase 'i':\n\tcase 'u':\n\tdefault:\n\t\t// Case: %d, %i, %u (decimal)\n\t\tbase = 10;\n\t\tbreak;\n\t}\n\tout = token.arg;\n\ti = parseInt( out, 10 );\n\tif ( !isFinite( i ) ) { // NOTE: We use the global `isFinite` function here instead of `@stdlib/math/base/assert/is-finite` in order to avoid circular dependencies.\n\t\tif ( !isNumber( out ) ) {\n\t\t\tthrow new Error( 'invalid integer. Value: ' + out );\n\t\t}\n\t\ti = 0;\n\t}\n\tif ( i < 0 && ( token.specifier === 'u' || base !== 10 ) ) {\n\t\ti = 0xffffffff + i + 1;\n\t}\n\tif ( i < 0 ) {\n\t\tout = ( -i ).toString( base );\n\t\tif ( token.precision ) {\n\t\t\tout = zeroPad( out, token.precision, token.padRight );\n\t\t}\n\t\tout = '-' + out;\n\t} else {\n\t\tout = i.toString( base );\n\t\tif ( !i && !token.precision ) {\n\t\t\tout = '';\n\t\t} else if ( token.precision ) {\n\t\t\tout = zeroPad( out, token.precision, token.padRight );\n\t\t}\n\t\tif ( token.sign ) {\n\t\t\tout = token.sign + out;\n\t\t}\n\t}\n\tif ( base === 16 ) {\n\t\tif ( token.alternate ) {\n\t\t\tout = '0x' + out;\n\t\t}\n\t\tout = ( token.specifier === uppercase.call( token.specifier ) ) ?\n\t\t\tuppercase.call( out ) :\n\t\t\tlowercase.call( out );\n\t}\n\tif ( base === 8 ) {\n\t\tif ( token.alternate && out.charAt( 0 ) !== '0' ) {\n\t\t\tout = '0' + out;\n\t\t}\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default formatInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Tests if a value is a string primitive.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a string primitive\n*\n* @example\n* var bool = isString( 'beep' );\n* // returns true\n*\n* @example\n* var bool = isString( new String( 'beep' ) );\n* // returns false\n*/\nfunction isString( value ) {\n\treturn ( typeof value === 'string' ); // NOTE: we inline the `isString.isPrimitive` function from `@stdlib/assert/is-string` in order to avoid circular dependencies.\n}\n\n\n// EXPORTS //\n\nexport default isString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isNumber from './is_number.js';\n\n// NOTE: for the following, we explicitly avoid using stdlib packages in this particular package in order to avoid circular dependencies.\nvar abs = Math.abs; // eslint-disable-line stdlib/no-builtin-math\nvar lowercase = String.prototype.toLowerCase;\nvar uppercase = String.prototype.toUpperCase;\nvar replace = String.prototype.replace;\n\n\n// VARIABLES //\n\nvar RE_EXP_POS_DIGITS = /e\\+(\\d)$/;\nvar RE_EXP_NEG_DIGITS = /e-(\\d)$/;\nvar RE_ONLY_DIGITS = /^(\\d+)$/;\nvar RE_DIGITS_BEFORE_EXP = /^(\\d+)e/;\nvar RE_TRAILING_PERIOD_ZERO = /\\.0$/;\nvar RE_PERIOD_ZERO_EXP = /\\.0*e/;\nvar RE_ZERO_BEFORE_EXP = /(\\..*[^0])0*e/;\n\n\n// MAIN //\n\n/**\n* Formats a token object argument as a floating-point number.\n*\n* @private\n* @param {Object} token - token object\n* @throws {Error} must provide a valid floating-point number\n* @returns {string} formatted token argument\n*/\nfunction formatDouble( token ) {\n\tvar digits;\n\tvar out;\n\tvar f = parseFloat( token.arg );\n\tif ( !isFinite( f ) ) { // NOTE: We use the global `isFinite` function here instead of `@stdlib/math/base/assert/is-finite` in order to avoid circular dependencies.\n\t\tif ( !isNumber( token.arg ) ) {\n\t\t\tthrow new Error( 'invalid floating-point number. Value: ' + out );\n\t\t}\n\t\t// Case: NaN, Infinity, or -Infinity\n\t\tf = token.arg;\n\t}\n\tswitch ( token.specifier ) {\n\tcase 'e':\n\tcase 'E':\n\t\tout = f.toExponential( token.precision );\n\t\tbreak;\n\tcase 'f':\n\tcase 'F':\n\t\tout = f.toFixed( token.precision );\n\t\tbreak;\n\tcase 'g':\n\tcase 'G':\n\t\tif ( abs( f ) < 0.0001 ) {\n\t\t\tdigits = token.precision;\n\t\t\tif ( digits > 0 ) {\n\t\t\t\tdigits -= 1;\n\t\t\t}\n\t\t\tout = f.toExponential( digits );\n\t\t} else {\n\t\t\tout = f.toPrecision( token.precision );\n\t\t}\n\t\tif ( !token.alternate ) {\n\t\t\tout = replace.call( out, RE_ZERO_BEFORE_EXP, '$1e' );\n\t\t\tout = replace.call( out, RE_PERIOD_ZERO_EXP, 'e');\n\t\t\tout = replace.call( out, RE_TRAILING_PERIOD_ZERO, '' );\n\t\t}\n\t\tbreak;\n\tdefault:\n\t\tthrow new Error( 'invalid double notation. Value: ' + token.specifier );\n\t}\n\tout = replace.call( out, RE_EXP_POS_DIGITS, 'e+0$1' );\n\tout = replace.call( out, RE_EXP_NEG_DIGITS, 'e-0$1' );\n\tif ( token.alternate ) {\n\t\tout = replace.call( out, RE_ONLY_DIGITS, '$1.' );\n\t\tout = replace.call( out, RE_DIGITS_BEFORE_EXP, '$1.e' );\n\t}\n\tif ( f >= 0 && token.sign ) {\n\t\tout = token.sign + out;\n\t}\n\tout = ( token.specifier === uppercase.call( token.specifier ) ) ?\n\t\tuppercase.call( out ) :\n\t\tlowercase.call( out );\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default formatDouble;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// FUNCTIONS //\n\n/**\n* Returns `n` spaces.\n*\n* @private\n* @param {number} n - number of spaces\n* @returns {string} string of spaces\n*/\nfunction spaces( n ) {\n\tvar out = '';\n\tvar i;\n\tfor ( i = 0; i < n; i++ ) {\n\t\tout += ' ';\n\t}\n\treturn out;\n}\n\n\n// MAIN //\n\n/**\n* Pads a token with spaces to the specified width.\n*\n* @private\n* @param {string} str - token argument\n* @param {number} width - token width\n* @param {boolean} [right=false] - boolean indicating whether to pad to the right\n* @returns {string} padded token argument\n*/\nfunction spacePad( str, width, right ) {\n\tvar pad = width - str.length;\n\tif ( pad < 0 ) {\n\t\treturn str;\n\t}\n\tstr = ( right ) ?\n\t\tstr + spaces( pad ) :\n\t\tspaces( pad ) + str;\n\treturn str;\n}\n\n\n// EXPORTS //\n\nexport default spacePad;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport formatInteger from './format_integer.js';\nimport isString from './is_string.js';\nimport formatDouble from './format_double.js';\nimport spacePad from './space_pad.js';\nimport zeroPad from './zero_pad.js';\n\n\n// VARIABLES //\n\nvar fromCharCode = String.fromCharCode;\nvar isnan = isNaN; // NOTE: We use the global `isNaN` function here instead of `@stdlib/math/base/assert/is-nan` to avoid circular dependencies.\nvar isArray = Array.isArray; // NOTE: We use the global `Array.isArray` function here instead of `@stdlib/assert/is-array` to avoid circular dependencies.\n\n\n// FUNCTIONS //\n\n/**\n* Initializes token object with properties of supplied format identifier object or default values if not present.\n*\n* @private\n* @param {Object} token - format identifier object\n* @returns {Object} token object\n*/\nfunction initialize( token ) {\n\tvar out = {};\n\tout.specifier = token.specifier;\n\tout.precision = ( token.precision === void 0 ) ? 1 : token.precision;\n\tout.width = token.width;\n\tout.flags = token.flags || '';\n\tout.mapping = token.mapping;\n\treturn out;\n}\n\n\n// MAIN //\n\n/**\n* Generates string from a token array by interpolating values.\n*\n* @param {Array} tokens - string parts and format identifier objects\n* @param {Array} ...args - variable values\n* @throws {TypeError} first argument must be an array\n* @throws {Error} invalid flags\n* @returns {string} formatted string\n*\n* @example\n* var tokens = [ 'beep ', { 'specifier': 's' } ];\n* var out = formatInterpolate( tokens, 'boop' );\n* // returns 'beep boop'\n*/\nfunction formatInterpolate( tokens ) {\n\tvar hasPeriod;\n\tvar flags;\n\tvar token;\n\tvar flag;\n\tvar num;\n\tvar out;\n\tvar pos;\n\tvar i;\n\tvar j;\n\n\tif ( !isArray( tokens ) ) {\n\t\tthrow new TypeError( 'invalid argument. First argument must be an array. Value: `' + tokens + '`.' );\n\t}\n\tout = '';\n\tpos = 1;\n\tfor ( i = 0; i < tokens.length; i++ ) {\n\t\ttoken = tokens[ i ];\n\t\tif ( isString( token ) ) {\n\t\t\tout += token;\n\t\t} else {\n\t\t\thasPeriod = token.precision !== void 0;\n\t\t\ttoken = initialize( token );\n\t\t\tif ( !token.specifier ) {\n\t\t\t\tthrow new TypeError( 'invalid argument. Token is missing `specifier` property. Index: `'+ i +'`. Value: `' + token + '`.' );\n\t\t\t}\n\t\t\tif ( token.mapping ) {\n\t\t\t\tpos = token.mapping;\n\t\t\t}\n\t\t\tflags = token.flags;\n\t\t\tfor ( j = 0; j < flags.length; j++ ) {\n\t\t\t\tflag = flags.charAt( j );\n\t\t\t\tswitch ( flag ) {\n\t\t\t\tcase ' ':\n\t\t\t\t\ttoken.sign = ' ';\n\t\t\t\t\tbreak;\n\t\t\t\tcase '+':\n\t\t\t\t\ttoken.sign = '+';\n\t\t\t\t\tbreak;\n\t\t\t\tcase '-':\n\t\t\t\t\ttoken.padRight = true;\n\t\t\t\t\ttoken.padZeros = false;\n\t\t\t\t\tbreak;\n\t\t\t\tcase '0':\n\t\t\t\t\ttoken.padZeros = flags.indexOf( '-' ) < 0; // NOTE: We use built-in `Array.prototype.indexOf` here instead of `@stdlib/assert/contains` in order to avoid circular dependencies.\n\t\t\t\t\tbreak;\n\t\t\t\tcase '#':\n\t\t\t\t\ttoken.alternate = true;\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tthrow new Error( 'invalid flag: ' + flag );\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( token.width === '*' ) {\n\t\t\t\ttoken.width = parseInt( arguments[ pos ], 10 );\n\t\t\t\tpos += 1;\n\t\t\t\tif ( isnan( token.width ) ) {\n\t\t\t\t\tthrow new TypeError( 'the argument for * width at position ' + pos + ' is not a number. Value: `' + token.width + '`.' );\n\t\t\t\t}\n\t\t\t\tif ( token.width < 0 ) {\n\t\t\t\t\ttoken.padRight = true;\n\t\t\t\t\ttoken.width = -token.width;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( hasPeriod ) {\n\t\t\t\tif ( token.precision === '*' ) {\n\t\t\t\t\ttoken.precision = parseInt( arguments[ pos ], 10 );\n\t\t\t\t\tpos += 1;\n\t\t\t\t\tif ( isnan( token.precision ) ) {\n\t\t\t\t\t\tthrow new TypeError( 'the argument for * precision at position ' + pos + ' is not a number. Value: `' + token.precision + '`.' );\n\t\t\t\t\t}\n\t\t\t\t\tif ( token.precision < 0 ) {\n\t\t\t\t\t\ttoken.precision = 1;\n\t\t\t\t\t\thasPeriod = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\ttoken.arg = arguments[ pos ];\n\t\t\tswitch ( token.specifier ) {\n\t\t\tcase 'b':\n\t\t\tcase 'o':\n\t\t\tcase 'x':\n\t\t\tcase 'X':\n\t\t\tcase 'd':\n\t\t\tcase 'i':\n\t\t\tcase 'u':\n\t\t\t\t// Case: %b (binary), %o (octal), %x, %X (hexadecimal), %d, %i (decimal), %u (unsigned decimal)\n\t\t\t\tif ( hasPeriod ) {\n\t\t\t\t\ttoken.padZeros = false;\n\t\t\t\t}\n\t\t\t\ttoken.arg = formatInteger( token );\n\t\t\t\tbreak;\n\t\t\tcase 's':\n\t\t\t\t// Case: %s (string)\n\t\t\t\ttoken.maxWidth = ( hasPeriod ) ? token.precision : -1;\n\t\t\t\tbreak;\n\t\t\tcase 'c':\n\t\t\t\t// Case: %c (character)\n\t\t\t\tif ( !isnan( token.arg ) ) {\n\t\t\t\t\tnum = parseInt( token.arg, 10 );\n\t\t\t\t\tif ( num < 0 || num > 127 ) {\n\t\t\t\t\t\tthrow new Error( 'invalid character code. Value: ' + token.arg );\n\t\t\t\t\t}\n\t\t\t\t\ttoken.arg = ( isnan( num ) ) ?\n\t\t\t\t\t\tString( token.arg ) :\n\t\t\t\t\t\tfromCharCode( num );\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'e':\n\t\t\tcase 'E':\n\t\t\tcase 'f':\n\t\t\tcase 'F':\n\t\t\tcase 'g':\n\t\t\tcase 'G':\n\t\t\t\t// Case: %e, %E (scientific notation), %f, %F (decimal floating point), %g, %G (uses the shorter of %e/E or %f/F)\n\t\t\t\tif ( !hasPeriod ) {\n\t\t\t\t\ttoken.precision = 6;\n\t\t\t\t}\n\t\t\t\ttoken.arg = formatDouble( token );\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tthrow new Error( 'invalid specifier: ' + token.specifier );\n\t\t\t}\n\t\t\t// Fit argument into field width...\n\t\t\tif ( token.maxWidth >= 0 && token.arg.length > token.maxWidth ) {\n\t\t\t\ttoken.arg = token.arg.substring( 0, token.maxWidth );\n\t\t\t}\n\t\t\tif ( token.padZeros ) {\n\t\t\t\ttoken.arg = zeroPad( token.arg, token.width || token.precision, token.padRight ); // eslint-disable-line max-len\n\t\t\t} else if ( token.width ) {\n\t\t\t\ttoken.arg = spacePad( token.arg, token.width, token.padRight );\n\t\t\t}\n\t\t\tout += token.arg || '';\n\t\t\tpos += 1;\n\t\t}\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default formatInterpolate;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// VARIABLES //\n\nvar RE = /%(?:([1-9]\\d*)\\$)?([0 +\\-#]*)(\\*|\\d+)?(?:(\\.)(\\*|\\d+)?)?[hlL]?([%A-Za-z])/g;\n\n\n// FUNCTIONS //\n\n/**\n* Parses a delimiter.\n*\n* @private\n* @param {Array} match - regular expression match\n* @returns {Object} delimiter token object\n*/\nfunction parse( match ) {\n\tvar token = {\n\t\t'mapping': ( match[ 1 ] ) ? parseInt( match[ 1 ], 10 ) : void 0,\n\t\t'flags': match[ 2 ],\n\t\t'width': match[ 3 ],\n\t\t'precision': match[ 5 ],\n\t\t'specifier': match[ 6 ]\n\t};\n\tif ( match[ 4 ] === '.' && match[ 5 ] === void 0 ) {\n\t\ttoken.precision = '1';\n\t}\n\treturn token;\n}\n\n\n// MAIN //\n\n/**\n* Tokenizes a string into an array of string parts and format identifier objects.\n*\n* @param {string} str - input string\n* @returns {Array} tokens\n*\n* @example\n* var tokens = formatTokenize( 'Hello %s!' );\n* // returns [ 'Hello ', {...}, '!' ]\n*/\nfunction formatTokenize( str ) {\n\tvar content;\n\tvar tokens;\n\tvar match;\n\tvar prev;\n\n\ttokens = [];\n\tprev = 0;\n\tmatch = RE.exec( str );\n\twhile ( match ) {\n\t\tcontent = str.slice( prev, RE.lastIndex - match[ 0 ].length );\n\t\tif ( content.length ) {\n\t\t\ttokens.push( content );\n\t\t}\n\t\ttokens.push( parse( match ) );\n\t\tprev = RE.lastIndex;\n\t\tmatch = RE.exec( str );\n\t}\n\tcontent = str.slice( prev );\n\tif ( content.length ) {\n\t\ttokens.push( content );\n\t}\n\treturn tokens;\n}\n\n\n// EXPORTS //\n\nexport default formatTokenize;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Tests if a value is a string primitive.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a string primitive\n*\n* @example\n* var bool = isString( 'beep' );\n* // returns true\n*\n* @example\n* var bool = isString( new String( 'beep' ) );\n* // returns false\n*/\nfunction isString( value ) {\n\treturn ( typeof value === 'string' ); // NOTE: we inline the `isString.isPrimitive` function from `@stdlib/assert/is-string` in order to avoid circular dependencies.\n}\n\n\n// EXPORTS //\n\nexport default isString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport interpolate from '@stdlib/string-base-format-interpolate';\nimport tokenize from '@stdlib/string-base-format-tokenize';\nimport isString from './is_string.js';\n\n\n// MAIN //\n\n/**\n* Inserts supplied variable values into a format string.\n*\n* @param {string} str - input string\n* @param {Array} ...args - variable values\n* @throws {TypeError} first argument must be a string\n* @throws {Error} invalid flags\n* @returns {string} formatted string\n*\n* @example\n* var str = format( 'Hello %s!', 'world' );\n* // returns 'Hello world!'\n*\n* @example\n* var str = format( 'Pi: ~%.2f', 3.141592653589793 );\n* // returns 'Pi: ~3.14'\n*/\nfunction format( str ) {\n\tvar args;\n\tvar i;\n\n\tif ( !isString( str ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a string. Value: `%s`.', str ) );\n\t}\n\targs = [ tokenize( str ) ];\n\tfor ( i = 1; i < arguments.length; i++ ) {\n\t\targs.push( arguments[ i ] );\n\t}\n\treturn interpolate.apply( null, args );\n}\n\n\n// EXPORTS //\n\nexport default format;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isNonNegativeInteger } from '@stdlib/assert-is-nonnegative-integer';\nimport ctors from '@stdlib/array-ctors';\nimport gzeros from '@stdlib/array-base-zeros';\nimport defaults from '@stdlib/array-defaults';\nimport format from '@stdlib/string-format';\n\n\n// VARIABLES //\n\nvar DEFAULT_DTYPE = defaults.get( 'dtypes.default' );\n\n\n// MAIN //\n\n/**\n* Creates a zero-filled array having a specified length.\n*\n* @param {NonNegativeInteger} length - array length\n* @param {string} [dtype=\"float64\"] - data type\n* @throws {TypeError} first argument must be a nonnegative integer\n* @throws {TypeError} second argument must be a recognized data type\n* @returns {(TypedArray|Array|ComplexArray)} array or typed array\n*\n* @example\n* var arr = zeros( 2 );\n* // returns [ 0.0, 0.0 ]\n*\n* @example\n* var arr = zeros( 2, 'float32' );\n* // returns [ 0.0, 0.0 ]\n*/\nfunction zeros( length ) {\n\tvar dtype;\n\tvar ctor;\n\tif ( !isNonNegativeInteger( length ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a nonnegative integer. Value: `%s`.', length ) );\n\t}\n\tif ( arguments.length > 1 ) {\n\t\tdtype = arguments[ 1 ];\n\t} else {\n\t\tdtype = DEFAULT_DTYPE;\n\t}\n\tif ( dtype === 'generic' ) {\n\t\treturn gzeros( length );\n\t}\n\tctor = ctors( dtype );\n\tif ( ctor === null ) {\n\t\tthrow new TypeError( format( 'invalid argument. Second argument must be a recognized data type. Value: `%s`.', dtype ) );\n\t}\n\treturn new ctor( length ); // WARNING: we assume that, apart from 'generic', the constructors for supported array data types are zero-filled by default\n}\n\n\n// EXPORTS //\n\nexport default zeros;\n","/**\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// MODULES //\n\nimport zeros from '@stdlib/array-zeros';\n\n\n// MAIN //\n\n/**\n* Creates an uninitialized array having a specified length.\n*\n* @private\n* @param {NonNegativeInteger} length - array length\n* @param {string} [dtype=\"float64\"] - data type\n* @throws {TypeError} first argument must be a nonnegative integer\n* @throws {TypeError} second argument must be a recognized data type\n* @returns {(TypedArray|Array|ComplexArray)} array or typed array\n*\n* @example\n* var arr = empty( 2 );\n* // returns \n*\n* @example\n* var arr = empty( 2, 'float32' );\n* // returns \n*/\nfunction empty( length ) {\n\tif ( arguments.length > 1 ) {\n\t\treturn zeros( length, arguments[ 1 ] );\n\t}\n\treturn zeros( length );\n}\n\n\n// EXPORTS //\n\nexport default empty;\n"],"names":["main","Object","defineProperty","isNumber","value","zeros","n","i","out","zeroPad","str","width","right","negative","pad","length","startsWithMinus","substr","lowercase","String","prototype","toLowerCase","uppercase","toUpperCase","formatInteger","token","base","specifier","arg","parseInt","isFinite","Error","toString","precision","padRight","sign","alternate","call","charAt","isString","abs","Math","replace","RE_EXP_POS_DIGITS","RE_EXP_NEG_DIGITS","RE_ONLY_DIGITS","RE_DIGITS_BEFORE_EXP","RE_TRAILING_PERIOD_ZERO","RE_PERIOD_ZERO_EXP","RE_ZERO_BEFORE_EXP","formatDouble","digits","f","parseFloat","toExponential","toFixed","toPrecision","spaces","spacePad","fromCharCode","isnan","isNaN","isArray","Array","initialize","flags","mapping","formatInterpolate","tokens","hasPeriod","flag","num","pos","j","TypeError","padZeros","indexOf","arguments","maxWidth","substring","RE","parse","match","formatTokenize","content","prev","exec","slice","lastIndex","push","format","args","tokenize","interpolate","apply","objectProtoype","toStr","defineGetter","__defineGetter__","defineSetter","__defineSetter__","lookupGetter","__lookupGetter__","lookupSetter","__lookupSetter__","err","hasDefinePropertySupport","builtin","obj","prop","descriptor","hasValue","hasGet","hasSet","__proto__","get","set","defineProperty$1","setNonEnumerableReadOnly","configurable","enumerable","writable","hasSymbolSupport","Symbol","FLG","hasSymbols","hasToStringTagSupport","toStringTag","has","hasOwnProperty","hasOwnProp","property","Sym","toStrTag","nativeClass$3","hasToStringTag","v","isOwn","tag","main$c","Number","test","nativeClass","isPrimitive","isObject","setReadOnly","FLOAT64_PINF","POSITIVE_INFINITY","FLOAT64_NINF","NEGATIVE_INFINITY","floor","isInteger","PINF","NINF","x","isInt","valueOf","isNonNegativeInteger","hasFloat64Array","Float64Array","ctor","Float64Array$1","bool","arr","GlobalFloat64Array","NaN","hasFloat64ArraySupport","hasFloat32Array","Float32Array","Float32Array$1","GlobalFloat32Array","hasFloat32ArraySupport","hasInt16Array","Int16Array","Int16Array$1","GlobalInt16Array","INT16_MAX","hasInt16ArraySupport","hasInt32Array","Int32Array","Int32Array$1","GlobalInt32Array","INT32_MAX","hasInt32ArraySupport","hasInt8Array","Int8Array","Int8Array$1","GlobalInt8Array","INT8_MAX","hasInt8ArraySupport","hasUint16Array","Uint16Array","Uint16Array$1","GlobalUint16Array","UINT16_MAX","hasUint16ArraySupport","hasUint32Array","Uint32Array","Uint32Array$1","GlobalUint32Array","UINT32_MAX","hasUint32ArraySupport","hasUint8Array","Uint8Array","Uint8Array$1","GlobalUint8Array","UINT8_MAX","hasUint8ArraySupport","hasUint8ClampedArray","Uint8ClampedArray","Uint8ClampedArray$1","GlobalUint8ClampedArray","hasUint8ClampedArraySupport","isArrayLikeObject","isCollection","hasArrayBuffer","ArrayBuffer","isArrayBuffer","main$1","isBoolean","Bool","Boolean","getGlobal","Function","self","window","global","globalThis","root","codegen","getThis","GlobalThis","Self","Win","Global","nodeList","document","childNodes","typedarray","reFunctionName","RE_FUNCTION_NAME","REGEXP","isObjectLike","constructorName","name","constructor","_isBuffer","isBuffer","predicate","len","arrayfun","ctorName","type","isFunction","typeOf","Complex128","real","imag","this","re","im","fround","FLOAT32_VIEW","float64ToFloat32$1","Complex64","float64ToFloat32","isComplexLike","isEven","isComplex64Array","BYTES_PER_ELEMENT","isComplex128Array","hasIteratorSymbolSupport","iterator","IteratorSymbol","setNonEnumerableReadOnlyAccessor","getter","realf","z","imagf","reinterpret","offset","buffer","byteOffset","GETTERS","float64","idx","float32","int32","int16","int8","uint32","uint16","uint8","uint8c","generic","default","dtype","complex128","complex64","fromIterator","it","next","done","fromIteratorMap","clbk","thisArg","fromArray","buf","HAS_ITERATOR_SYMBOL","isComplexArray","Complex64Array","_length","_buffer","isComplexArrayConstructor","getComplex64","nargs","RangeError","reinterpret64","reinterpret128","byteLength","ITERATOR_SYMBOL","src","tmp","flg","accessorGetter","setReadOnlyAccessor","target","start","copyWithin","iter","entries","end","fcn","searchElement","fromIndex","separator","sep","join","outbuf","N","sbuf","outlen","begin","index","Complex128Array","getComplex128","ctors","table","filled","defaults","dtypes","numeric","floating_point","real_floating_point","complex_floating_point","integer","signed_integer","unsigned_integer","DEFAULTS","HASH","DEFAULT_DTYPE","gzeros","empty"],"mappings":";;AAsBA,IAAIA,EAA0C,mBAA1BC,OAAOC,eAAkCD,OAAOC,eAAiB,KCiCrF,IAAIA,EAAiBD,OAAOC,eCjB5B,SAASC,EAAUC,GAClB,MAA0B,iBAAVA,CACjB,CCAA,SAASC,EAAOC,GACf,IACIC,EADAC,EAAM,GAEV,IAAMD,EAAI,EAAGA,EAAID,EAAGC,IACnBC,GAAO,IAER,OAAOA,CACR,CAcA,SAASC,EAASC,EAAKC,EAAOC,GAC7B,IAAIC,GAAW,EACXC,EAAMH,EAAQD,EAAIK,OACtB,OAAKD,EAAM,IAnCZ,SAA0BJ,GACzB,MAAoB,MAAbA,EAAK,EACb,CAoCMM,CAAiBN,KACrBG,GAAW,EACXH,EAAMA,EAAIO,OAAQ,IAEnBP,EAAM,EACLA,EAAML,EAAOS,GACbT,EAAOS,GAAQJ,EACXG,IACJH,EAAM,IAAMA,IAVLA,CAaT,CCpDA,IAAIQ,EAAYC,OAAOC,UAAUC,YAC7BC,EAAYH,OAAOC,UAAUG,YAajC,SAASC,EAAeC,GACvB,IAAIC,EACAlB,EACAD,EAEJ,OAASkB,EAAME,WACf,IAAK,IAEJD,EAAO,EACP,MACD,IAAK,IAEJA,EAA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AMZ,UAAWtE,IAEvB,OAAOsF,GAAYC,MAAO,KAAMH,EACjC,CC3BA,IAAI6Q,GAAgBX,GAAS1O,IAAK,kBAsBlC,SAAS9G,GAAOU,GACf,IAAIyR,EACAxI,EACJ,IAAMH,GAAsB9I,GAC3B,MAAM,IAAI2D,UAAWgB,GAAQ,+EAAgF3E,IAO9G,GAAe,aAJdyR,EADI3N,UAAU9D,OAAS,EACf8D,UAAW,GAEX2R,IAGR,OAAOC,GAAQ1V,GAGhB,GAAc,QADdiJ,EAAO0L,GAAOlD,IAEb,MAAM,IAAI9N,UAAWgB,GAAQ,iFAAkF8M,IAEhH,OAAO,IAAIxI,EAAMjJ,EAClB,CC3BA,SAAS2V,GAAO3V,GACf,OAAK8D,UAAU9D,OAAS,EAChBV,GAAOU,EAAQ8D,UAAW,IAE3BxE,GAAOU,EACf"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index 97f4793..0000000 --- a/stats.html +++ /dev/null @@ -1,6177 +0,0 @@ - - - - - - - - Rollup Visualizer - - - -
- - - - - From 65ffacba974e017633018bf01f9796966e34bf8d Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Thu, 22 Feb 2024 22:48:13 +0000 Subject: [PATCH 47/75] 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 | 36 +- SECURITY.md | 5 - benchmark/benchmark.js | 264 -- benchmark/benchmark.length.complex128.js | 93 - benchmark/benchmark.length.complex64.js | 93 - benchmark/benchmark.length.float32.js | 93 - benchmark/benchmark.length.float64.js | 93 - benchmark/benchmark.length.generic.js | 93 - benchmark/benchmark.length.int16.js | 93 - benchmark/benchmark.length.int32.js | 93 - benchmark/benchmark.length.int8.js | 93 - benchmark/benchmark.length.uint16.js | 93 - benchmark/benchmark.length.uint32.js | 93 - benchmark/benchmark.length.uint8.js | 93 - benchmark/benchmark.length.uint8c.js | 93 - branches.md | 56 - dist/index.d.ts | 3 - dist/index.js | 9 - dist/index.js.map | 7 - docs/repl.txt | 52 - docs/types/test.ts | 77 - examples/index.js | 33 - lib/index.js | 58 - lib/is_buffer_uint8array.js | 47 - lib/main.js | 107 - lib/polyfill.js | 56 - docs/types/index.d.ts => mod.d.ts | 2 +- mod.js | 4 + mod.js.map | 1 + package.json | 81 +- stats.html | 4842 +++++++++++++++++++++ test/dist/test.js | 33 - test/test.js | 60 - test/test.main.js | 274 -- test/test.polyfill.js | 324 -- 58 files changed, 4859 insertions(+), 5849 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 benchmark/benchmark.js delete mode 100644 benchmark/benchmark.length.complex128.js delete mode 100644 benchmark/benchmark.length.complex64.js delete mode 100644 benchmark/benchmark.length.float32.js delete mode 100644 benchmark/benchmark.length.float64.js delete mode 100644 benchmark/benchmark.length.generic.js delete mode 100644 benchmark/benchmark.length.int16.js delete mode 100644 benchmark/benchmark.length.int32.js delete mode 100644 benchmark/benchmark.length.int8.js delete mode 100644 benchmark/benchmark.length.uint16.js delete mode 100644 benchmark/benchmark.length.uint32.js delete mode 100644 benchmark/benchmark.length.uint8.js delete mode 100644 benchmark/benchmark.length.uint8c.js 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/repl.txt delete mode 100644 docs/types/test.ts delete mode 100644 examples/index.js delete mode 100644 lib/index.js delete mode 100644 lib/is_buffer_uint8array.js delete mode 100644 lib/main.js delete mode 100644 lib/polyfill.js rename docs/types/index.d.ts => mod.d.ts (96%) create mode 100644 mod.js create mode 100644 mod.js.map create mode 100644 stats.html delete mode 100644 test/dist/test.js delete mode 100644 test/test.js delete mode 100644 test/test.main.js delete mode 100644 test/test.polyfill.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 96f81a8..0000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,7 +0,0 @@ - - -We are excited about your pull request, but unfortunately we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/empty) 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 ddb353e..0000000 --- a/.github/workflows/close_pull_requests.yml +++ /dev/null @@ -1,54 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: close_pull_requests - -# Workflow triggers: -on: - pull_request_target: - types: [opened] - -# Workflow jobs: -jobs: - - # Define job to close all pull requests: - run: - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Close pull request - - name: 'Close pull request' - # Pin action to full length commit SHA corresponding to v3.1.2 - uses: superbrothers/close-pull-request@9c18513d320d7b2c7185fb93396d0c664d5d8448 - with: - comment: | - Thank you for submitting a pull request. :raised_hands: - - We greatly appreciate your willingness to submit a contribution. However, we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). - - We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/empty) 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 8376c30..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: '49 1 * * 5' - - # 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 + + + + 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 8e62cb8..0000000 --- a/test/test.js +++ /dev/null @@ -1,60 +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 proxyquire = require( 'proxyquire' ); -var main = require( './../lib/main.js' ); -var polyfill = require( './../lib/polyfill.js' ); -var empty = require( './../lib' ); - - -// TESTS // - -tape( 'main export is a function', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof empty, 'function', 'main export is a function' ); - t.end(); -}); - -tape( 'if an environment supports Node.js buffer instances inheriting from Uint8Array, the main export supports returning arrays having uninitialized memory', function test( t ) { - var empty = proxyquire( './../lib', { - './is_buffer_uint8array.js': mock - }); - t.strictEqual( empty, main, 'returns expected value' ); - t.end(); - - function mock() { - return true; - } -}); - -tape( 'if an environment does not support Node.js buffer instances inheriting from Uint8Array, the main export supports returning zero-filled arrays', function test( t ) { - var empty = proxyquire( './../lib', { - './is_buffer_uint8array.js': mock - }); - t.strictEqual( empty, polyfill, 'returns expected value' ); - t.end(); - - function mock() { - return false; - } -}); diff --git a/test/test.main.js b/test/test.main.js deleted file mode 100644 index 3ceb26e..0000000 --- a/test/test.main.js +++ /dev/null @@ -1,274 +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 Float64Array = require( '@stdlib/array-float64' ); -var Float32Array = require( '@stdlib/array-float32' ); -var Int32Array = require( '@stdlib/array-int32' ); -var Uint32Array = require( '@stdlib/array-uint32' ); -var Int16Array = require( '@stdlib/array-int16' ); -var Uint16Array = require( '@stdlib/array-uint16' ); -var Int8Array = require( '@stdlib/array-int8' ); -var Uint8Array = require( '@stdlib/array-uint8' ); -var Uint8ClampedArray = require( '@stdlib/array-uint8c' ); -var Complex64Array = require( '@stdlib/array-complex64' ); -var Complex128Array = require( '@stdlib/array-complex128' ); -var instanceOf = require( '@stdlib/assert-instance-of' ); -var empty = require( './../lib/main.js' ); - - -// TESTS // - -tape( 'main export is a function', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof empty, 'function', 'main export is a function' ); - t.end(); -}); - -tape( 'the function throws an error if provided a value other than a nonnegative integer for the first argument', function test( t ) { - var values; - var i; - - values = [ - '5', - -3, - 3.14, - NaN, - true, - false, - null, - void 0, - [], - {}, - function noop() {} - ]; - - for ( i = 0; i < values.length; i++ ) { - t.throws( badValue( values[i] ), TypeError, 'throws an error when provided '+values[i] ); - } - t.end(); - - function badValue( value ) { - return function badValue() { - empty( value ); - }; - } -}); - -tape( 'the function throws an error if provided a value other than a nonnegative integer for the first argument (dtype)', function test( t ) { - var values; - var i; - - values = [ - '5', - -3, - 3.14, - NaN, - true, - false, - null, - void 0, - [], - {}, - function noop() {} - ]; - - for ( i = 0; i < values.length; i++ ) { - t.throws( badValue( values[i] ), TypeError, 'throws an error when provided '+values[i] ); - } - t.end(); - - function badValue( value ) { - return function badValue() { - empty( value, 'float32' ); - }; - } -}); - -tape( 'the function throws an error if provided an unrecognized data type', function test( t ) { - var values; - var i; - - values = [ - '5', - 'beep', - 'empty', - 'Int32', - 'Uint32', - 'Int16', - 'Uint16', - 'Int8', - 'Uint8', - 'Uint8c', - 'uint8_clamped', - 'Float64', - 'Float32', - 'FLOAT64', - 'FLOAT32', - 'GENERIC' - ]; - - for ( i = 0; i < values.length; i++ ) { - t.throws( badValue( values[i] ), TypeError, 'throws an error when provided '+values[i] ); - } - t.end(); - - function badValue( value ) { - return function badValue() { - empty( 10, value ); - }; - } -}); - -tape( 'the function returns an empty array (default)', function test( t ) { - var arr; - - arr = empty( 5 ); - t.strictEqual( instanceOf( arr, Float64Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=float64)', function test( t ) { - var arr; - - arr = empty( 5, 'float64' ); - t.strictEqual( instanceOf( arr, Float64Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=float32)', function test( t ) { - var arr; - - arr = empty( 5, 'float32' ); - t.strictEqual( instanceOf( arr, Float32Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=complex128)', function test( t ) { - var arr; - - arr = empty( 5, 'complex128' ); - t.strictEqual( instanceOf( arr, Complex128Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=complex64)', function test( t ) { - var arr; - - arr = empty( 5, 'complex64' ); - t.strictEqual( instanceOf( arr, Complex64Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=int32)', function test( t ) { - var arr; - - arr = empty( 5, 'int32' ); - t.strictEqual( instanceOf( arr, Int32Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=uint32)', function test( t ) { - var arr; - - arr = empty( 5, 'uint32' ); - t.strictEqual( instanceOf( arr, Uint32Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=int16)', function test( t ) { - var arr; - - arr = empty( 5, 'int16' ); - t.strictEqual( instanceOf( arr, Int16Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=uint16)', function test( t ) { - var arr; - - arr = empty( 5, 'uint16' ); - t.strictEqual( instanceOf( arr, Uint16Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=int8)', function test( t ) { - var arr; - - arr = empty( 5, 'int8' ); - t.strictEqual( instanceOf( arr, Int8Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=uint8)', function test( t ) { - var arr; - - arr = empty( 5, 'uint8' ); - t.strictEqual( instanceOf( arr, Uint8Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=uint8c)', function test( t ) { - var arr; - - arr = empty( 5, 'uint8c' ); - t.strictEqual( instanceOf( arr, Uint8ClampedArray ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=generic)', function test( t ) { - var expected; - var arr; - - expected = [ 0, 0, 0, 0, 0 ]; - - arr = empty( 5, 'generic' ); - t.strictEqual( instanceOf( arr, Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); diff --git a/test/test.polyfill.js b/test/test.polyfill.js deleted file mode 100644 index 17b99f3..0000000 --- a/test/test.polyfill.js +++ /dev/null @@ -1,324 +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 Float64Array = require( '@stdlib/array-float64' ); -var Float32Array = require( '@stdlib/array-float32' ); -var Int32Array = require( '@stdlib/array-int32' ); -var Uint32Array = require( '@stdlib/array-uint32' ); -var Int16Array = require( '@stdlib/array-int16' ); -var Uint16Array = require( '@stdlib/array-uint16' ); -var Int8Array = require( '@stdlib/array-int8' ); -var Uint8Array = require( '@stdlib/array-uint8' ); -var Uint8ClampedArray = require( '@stdlib/array-uint8c' ); -var Complex64Array = require( '@stdlib/array-complex64' ); -var Complex128Array = require( '@stdlib/array-complex128' ); -var reinterpret64 = require( '@stdlib/strided-base-reinterpret-complex64' ); -var reinterpret128 = require( '@stdlib/strided-base-reinterpret-complex128' ); -var instanceOf = require( '@stdlib/assert-instance-of' ); -var empty = require( './../lib/polyfill.js' ); - - -// TESTS // - -tape( 'main export is a function', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof empty, 'function', 'main export is a function' ); - t.end(); -}); - -tape( 'the function throws an error if provided a value other than a nonnegative integer for the first argument', function test( t ) { - var values; - var i; - - values = [ - '5', - -3, - 3.14, - NaN, - true, - false, - null, - void 0, - [], - {}, - function noop() {} - ]; - - for ( i = 0; i < values.length; i++ ) { - t.throws( badValue( values[i] ), TypeError, 'throws an error when provided '+values[i] ); - } - t.end(); - - function badValue( value ) { - return function badValue() { - empty( value ); - }; - } -}); - -tape( 'the function throws an error if provided a value other than a nonnegative integer for the first argument (dtype)', function test( t ) { - var values; - var i; - - values = [ - '5', - -3, - 3.14, - NaN, - true, - false, - null, - void 0, - [], - {}, - function noop() {} - ]; - - for ( i = 0; i < values.length; i++ ) { - t.throws( badValue( values[i] ), TypeError, 'throws an error when provided '+values[i] ); - } - t.end(); - - function badValue( value ) { - return function badValue() { - empty( value, 'float32' ); - }; - } -}); - -tape( 'the function throws an error if provided an unrecognized data type', function test( t ) { - var values; - var i; - - values = [ - '5', - 'beep', - 'empty', - 'Int32', - 'Uint32', - 'Int16', - 'Uint16', - 'Int8', - 'Uint8', - 'Uint8c', - 'uint8_clamped', - 'Float64', - 'Float32', - 'FLOAT64', - 'FLOAT32', - 'GENERIC' - ]; - - for ( i = 0; i < values.length; i++ ) { - t.throws( badValue( values[i] ), TypeError, 'throws an error when provided '+values[i] ); - } - t.end(); - - function badValue( value ) { - return function badValue() { - empty( 10, value ); - }; - } -}); - -tape( 'the function returns a zero-filled array (default)', function test( t ) { - var expected; - var arr; - - expected = new Float64Array( [ 0.0, 0.0, 0.0, 0.0, 0.0 ] ); - - arr = empty( 5 ); - t.strictEqual( instanceOf( arr, Float64Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=float64)', function test( t ) { - var expected; - var arr; - - expected = new Float64Array( [ 0.0, 0.0, 0.0, 0.0, 0.0 ] ); - - arr = empty( 5, 'float64' ); - t.strictEqual( instanceOf( arr, Float64Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=float32)', function test( t ) { - var expected; - var arr; - - expected = new Float32Array( [ 0.0, 0.0, 0.0, 0.0, 0.0 ] ); - - arr = empty( 5, 'float32' ); - t.strictEqual( instanceOf( arr, Float32Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=complex128)', function test( t ) { - var expected; - var arr; - - expected = new Float64Array( [ 0.0, 0.0, 0.0, 0.0 ] ); - - arr = empty( 2, 'complex128' ); - t.strictEqual( instanceOf( arr, Complex128Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length/2, 'returns expected value' ); - t.deepEqual( reinterpret128( arr, 0 ), expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=complex64)', function test( t ) { - var expected; - var arr; - - expected = new Float32Array( [ 0.0, 0.0, 0.0, 0.0 ] ); - - arr = empty( 2, 'complex64' ); - t.strictEqual( instanceOf( arr, Complex64Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length/2, 'returns expected value' ); - t.deepEqual( reinterpret64( arr, 0 ), expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=int32)', function test( t ) { - var expected; - var arr; - - expected = new Int32Array( [ 0, 0, 0, 0, 0 ] ); - - arr = empty( 5, 'int32' ); - t.strictEqual( instanceOf( arr, Int32Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=uint32)', function test( t ) { - var expected; - var arr; - - expected = new Uint32Array( [ 0, 0, 0, 0, 0 ] ); - - arr = empty( 5, 'uint32' ); - t.strictEqual( instanceOf( arr, Uint32Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=int16)', function test( t ) { - var expected; - var arr; - - expected = new Int16Array( [ 0, 0, 0, 0, 0 ] ); - - arr = empty( 5, 'int16' ); - t.strictEqual( instanceOf( arr, Int16Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=uint16)', function test( t ) { - var expected; - var arr; - - expected = new Uint16Array( [ 0, 0, 0, 0, 0 ] ); - - arr = empty( 5, 'uint16' ); - t.strictEqual( instanceOf( arr, Uint16Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=int8)', function test( t ) { - var expected; - var arr; - - expected = new Int8Array( [ 0, 0, 0, 0, 0 ] ); - - arr = empty( 5, 'int8' ); - t.strictEqual( instanceOf( arr, Int8Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=uint8)', function test( t ) { - var expected; - var arr; - - expected = new Uint8Array( [ 0, 0, 0, 0, 0 ] ); - - arr = empty( 5, 'uint8' ); - t.strictEqual( instanceOf( arr, Uint8Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=uint8c)', function test( t ) { - var expected; - var arr; - - expected = new Uint8ClampedArray( [ 0, 0, 0, 0, 0 ] ); - - arr = empty( 5, 'uint8c' ); - t.strictEqual( instanceOf( arr, Uint8ClampedArray ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=generic)', function test( t ) { - var expected; - var arr; - - expected = [ 0, 0, 0, 0, 0 ]; - - arr = empty( 5, 'generic' ); - t.strictEqual( instanceOf( arr, Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); From 3bfade0eea9213f0ceb47ccfd69b6a9afe1d36bc Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sun, 25 Feb 2024 19:42:05 +0000 Subject: [PATCH 48/75] Transform error messages --- lib/main.js | 6 +++--- package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/main.js b/lib/main.js index 33d8392..44eb4a4 100644 --- a/lib/main.js +++ b/lib/main.js @@ -26,7 +26,7 @@ var ctors = require( '@stdlib/array-typed-ctors' ); var zeros = require( '@stdlib/array-base-zeros' ); var bytesPerElement = require( '@stdlib/ndarray-base-bytes-per-element' ); var defaults = require( '@stdlib/array-defaults' ); -var format = require( '@stdlib/string-format' ); +var format = require( '@stdlib/error-tools-fmtprodmsg' ); // VARIABLES // @@ -63,7 +63,7 @@ function empty( length ) { var nb; if ( !isNonNegativeInteger( length ) ) { - throw new TypeError( format( 'invalid argument. First argument must be a nonnegative integer. Value: `%s`.', length ) ); + throw new TypeError( format( '1Zj2d', length ) ); } if ( arguments.length > 1 ) { dtype = arguments[ 1 ]; @@ -75,7 +75,7 @@ function empty( length ) { } nbytes = bytesPerElement( dtype ); if ( nbytes === null ) { - throw new TypeError( format( 'invalid argument. Second argument must be a supported data type. Value: `%s`.', dtype ) ); + throw new TypeError( format( '1ZjEC', dtype ) ); } // Resolve typed array constructor: ctor = ctors( dtype ); diff --git a/package.json b/package.json index adcc086..07b93f2 100644 --- a/package.json +++ b/package.json @@ -46,7 +46,7 @@ "@stdlib/assert-is-uint8array": "^0.2.1", "@stdlib/buffer-alloc-unsafe": "^0.2.1", "@stdlib/ndarray-base-bytes-per-element": "^0.2.1", - "@stdlib/string-format": "^0.2.1", + "@stdlib/error-tools-fmtprodmsg": "^0.2.1", "@stdlib/types": "^0.3.2", "@stdlib/error-tools-fmtprodmsg": "^0.2.1" }, From 33d6b27525d127446c337a563b006cbbaa4e81fa Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sun, 25 Feb 2024 20:57:14 +0000 Subject: [PATCH 49/75] Remove files --- mod.d.ts | 66 - mod.js | 4 - mod.js.map | 1 - stats.html | 4842 ---------------------------------------------------- 4 files changed, 4913 deletions(-) delete mode 100644 mod.d.ts delete mode 100644 mod.js delete mode 100644 mod.js.map delete mode 100644 stats.html diff --git a/mod.d.ts b/mod.d.ts deleted file mode 100644 index 863116c..0000000 --- a/mod.d.ts +++ /dev/null @@ -1,66 +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 - -/// - -import { DataTypeMap } from '@stdlib/types/array'; - -/** -* Creates an uninitialized array having a specified length. -* -* The function recognizes the following data types: -* -* - `float64`: double-precision floating-point numbers (IEEE 754) -* - `float32`: single-precision floating-point numbers (IEEE 754) -* - `complex128`: double-precision complex floating-point numbers -* - `complex64`: single-precision complex floating-point numbers -* - `int32`: 32-bit two's complement signed integers -* - `uint32`: 32-bit unsigned integers -* - `int16`: 16-bit two's complement signed integers -* - `uint16`: 16-bit unsigned integers -* - `int8`: 8-bit two's complement signed integers -* - `uint8`: 8-bit unsigned integers -* - `uint8c`: 8-bit unsigned integers clamped to `0-255` -* - `generic`: generic JavaScript values -* -* ## Notes -* -* - In browser environments, the function always returns zero-filled arrays. -* - If `dtype` is `'generic'`, the function always returns a zero-filled array. -* - In Node.js versions `>=3.0.0`, the underlying memory of returned typed arrays is **not** initialized. Memory contents are unknown and may contain **sensitive** data. -* -* @param length - array length -* @param dtype - data type (default: 'float64') -* @returns empty array -* -* @example -* var arr = empty( 2 ); -* // returns -* -* @example -* var arr = empty( 2, 'float32' ); -* // returns -*/ -declare function empty = 'float64'>( length: number, dtype?: T ): DataTypeMap[T]; - - -// EXPORTS // - -export = empty; diff --git a/mod.js b/mod.js deleted file mode 100644 index 5ec176b..0000000 --- a/mod.js +++ /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 -/// -var r="function"==typeof Object.defineProperty?Object.defineProperty:null;var e=Object.defineProperty;function t(r){return"number"==typeof r}function n(r){var e,t="";for(e=0;e0&&(e-=1),n=i.toExponential(e)):n=i.toPrecision(r.precision),r.alternate||(n=c.call(n,v,"$1e"),n=c.call(n,w,"e"),n=c.call(n,g,""));break;default:throw new Error("invalid double notation. Value: "+r.specifier)}return n=c.call(n,h,"e+0$1"),n=c.call(n,p,"e-0$1"),r.alternate&&(n=c.call(n,y,"$1."),n=c.call(n,m,"$1.e")),i>=0&&r.sign&&(n=r.sign+n),n=r.specifier===s.call(r.specifier)?s.call(n):l.call(n)}function d(r){var e,t="";for(e=0;e127)throw new Error("invalid character code. Value: "+n.arg);n.arg=_(a)?String(n.arg):E(a)}break;case"e":case"E":case"f":case"F":case"g":case"G":e||(n.precision=6),n.arg=b(n);break;default:throw new Error("invalid specifier: "+n.specifier)}n.maxWidth>=0&&n.arg.length>n.maxWidth&&(n.arg=n.arg.substring(0,n.maxWidth)),n.padZeros?n.arg=i(n.arg,n.width||n.precision,n.padRight):n.width&&(n.arg=(h=n.arg,p=n.width,y=n.padRight,m=void 0,(m=p-h.length)<0?h:h=y?h+d(m):d(m)+h)),f+=n.arg||"",l+=1}return f}var V=/%(?:([1-9]\d*)\$)?([0 +\-#]*)(\*|\d+)?(?:(\.)(\*|\d+)?)?[hlL]?([%A-Za-z])/g;function j(r){var e={mapping:r[1]?parseInt(r[1],10):void 0,flags:r[2],width:r[3],precision:r[5],specifier:r[6]};return"."===r[4]&&void 0===r[5]&&(e.precision="1"),e}function S(r){var e,t,n,i;for(t=[],i=0,n=V.exec(r);n;)(e=r.slice(i,V.lastIndex-n[0].length)).length&&t.push(e),t.push(j(n)),i=V.lastIndex,n=V.exec(r);return(e=r.slice(i)).length&&t.push(e),t}function F(r){var e,t;if("string"!=typeof r)throw new TypeError(F("invalid argument. First argument must be a string. Value: `%s`.",r));for(e=[S(r)],t=1;trr&&tr(r)}function ir(r){return U(r)&&nr(r)}function or(r){return H(r)&&nr(r.valueOf())}function ar(r){return ir(r)||or(r)}function ur(r){return ir(r)&&r>=0}function fr(r){return or(r)&&r.valueOf()>=0}function lr(r){return ur(r)||fr(r)}N(ar,"isPrimitive",ir),N(ar,"isObject",or),N(lr,"isPrimitive",ur),N(lr,"isObject",fr);var sr="function"==typeof Float64Array;var cr="function"==typeof Float64Array?Float64Array:null;var hr="function"==typeof Float64Array?Float64Array:void 0;var pr=function(){var r,e,t;if("function"!=typeof cr)return!1;try{e=new cr([1,3.14,-3.14,NaN]),t=e,r=(sr&&t instanceof Float64Array||"[object Float64Array]"===z(t))&&1===e[0]&&3.14===e[1]&&-3.14===e[2]&&e[3]!=e[3]}catch(e){r=!1}return r}()?hr:function(){throw new Error("not implemented")},yr="function"==typeof Float32Array;var mr="function"==typeof Float32Array?Float32Array:null;var gr="function"==typeof Float32Array?Float32Array:void 0;var wr=function(){var r,e,t;if("function"!=typeof mr)return!1;try{e=new mr([1,3.14,-3.14,5e40]),t=e,r=(yr&&t instanceof Float32Array||"[object Float32Array]"===z(t))&&1===e[0]&&3.140000104904175===e[1]&&-3.140000104904175===e[2]&&e[3]===Q}catch(e){r=!1}return r}()?gr:function(){throw new Error("not implemented")},vr="function"==typeof Int16Array;var br="function"==typeof Int16Array?Int16Array:null;var dr="function"==typeof Int16Array?Int16Array:void 0;var Er=function(){var r,e,t;if("function"!=typeof br)return!1;try{e=new br([1,3.14,-3.14,32768]),t=e,r=(vr&&t instanceof Int16Array||"[object Int16Array]"===z(t))&&1===e[0]&&3===e[1]&&-3===e[2]&&-32768===e[3]}catch(e){r=!1}return r}()?dr:function(){throw new Error("not implemented")},_r="function"==typeof Int32Array;var Tr="function"==typeof Int32Array?Int32Array:null;var xr="function"==typeof Int32Array?Int32Array:void 0;var Ar=function(){var r,e,t;if("function"!=typeof Tr)return!1;try{e=new Tr([1,3.14,-3.14,2147483648]),t=e,r=(_r&&t instanceof Int32Array||"[object Int32Array]"===z(t))&&1===e[0]&&3===e[1]&&-3===e[2]&&-2147483648===e[3]}catch(e){r=!1}return r}()?xr:function(){throw new Error("not implemented")},Vr="function"==typeof Int8Array;var jr="function"==typeof Int8Array?Int8Array:null;var Sr="function"==typeof Int8Array?Int8Array:void 0;var Fr=function(){var r,e,t;if("function"!=typeof jr)return!1;try{e=new jr([1,3.14,-3.14,128]),t=e,r=(Vr&&t instanceof Int8Array||"[object Int8Array]"===z(t))&&1===e[0]&&3===e[1]&&-3===e[2]&&-128===e[3]}catch(e){r=!1}return r}()?Sr:function(){throw new Error("not implemented")},kr="function"==typeof Uint16Array;var Lr="function"==typeof Uint16Array?Uint16Array:null;var Ir="function"==typeof Uint16Array?Uint16Array:void 0;var Rr=function(){var r,e,t;if("function"!=typeof Lr)return!1;try{e=new Lr(e=[1,3.14,-3.14,65536,65537]),t=e,r=(kr&&t instanceof Uint16Array||"[object Uint16Array]"===z(t))&&1===e[0]&&3===e[1]&&65533===e[2]&&0===e[3]&&1===e[4]}catch(e){r=!1}return r}()?Ir:function(){throw new Error("not implemented")},Br="function"==typeof Uint32Array;var Or="function"==typeof Uint32Array?Uint32Array:null;var Cr="function"==typeof Uint32Array?Uint32Array:void 0;var Mr=function(){var r,e,t;if("function"!=typeof Or)return!1;try{e=new Or(e=[1,3.14,-3.14,4294967296,4294967297]),t=e,r=(Br&&t instanceof Uint32Array||"[object Uint32Array]"===z(t))&&1===e[0]&&3===e[1]&&4294967293===e[2]&&0===e[3]&&1===e[4]}catch(e){r=!1}return r}()?Cr:function(){throw new Error("not implemented")},Nr="function"==typeof Uint8Array;var Ur="function"==typeof Uint8Array?Uint8Array:null;var Pr="function"==typeof Uint8Array?Uint8Array:void 0;var Yr=function(){var r,e,t;if("function"!=typeof Ur)return!1;try{e=new Ur(e=[1,3.14,-3.14,256,257]),t=e,r=(Nr&&t instanceof Uint8Array||"[object Uint8Array]"===z(t))&&1===e[0]&&3===e[1]&&253===e[2]&&0===e[3]&&1===e[4]}catch(e){r=!1}return r}()?Pr:function(){throw new Error("not implemented")},Wr="function"==typeof Uint8ClampedArray;var $r="function"==typeof Uint8ClampedArray?Uint8ClampedArray:null;var Gr="function"==typeof Uint8ClampedArray?Uint8ClampedArray:void 0;var Zr=function(){var r,e,t;if("function"!=typeof $r)return!1;try{e=new $r([-1,0,1,3.14,4.99,255,256]),t=e,r=(Wr&&t instanceof Uint8ClampedArray||"[object Uint8ClampedArray]"===z(t))&&0===e[0]&&0===e[1]&&1===e[2]&&3===e[3]&&5===e[4]&&255===e[5]&&255===e[6]}catch(e){r=!1}return r}()?Gr:function(){throw new Error("not implemented")},Xr=4294967295;function zr(r){return"object"==typeof r&&null!==r&&"number"==typeof r.length&&tr(r.length)&&r.length>=0&&r.length<=Xr}var Jr=9007199254740991;function qr(r){return"object"==typeof r&&null!==r&&"number"==typeof r.length&&tr(r.length)&&r.length>=0&&r.length<=Jr}var Dr="function"==typeof ArrayBuffer;function Hr(r){return Dr&&r instanceof ArrayBuffer||"[object ArrayBuffer]"===z(r)}var Kr=Array.isArray?Array.isArray:function(r){return"[object Array]"===z(r)};function Qr(r){return"object"==typeof r&&null!==r&&!Kr(r)}function re(r){return"string"==typeof r}var ee=String.prototype.valueOf;var te=Y();function ne(r){return"object"==typeof r&&(r instanceof String||(te?function(r){try{return ee.call(r),!0}catch(r){return!1}}(r):"[object String]"===z(r)))}function ie(r){return re(r)||ne(r)}N(ie,"isPrimitive",re),N(ie,"isObject",ne);var oe=/./;function ae(r){return"boolean"==typeof r}var ue=Boolean,fe=Boolean.prototype.toString;var le=Y();function se(r){return"object"==typeof r&&(r instanceof ue||(le?function(r){try{return fe.call(r),!0}catch(r){return!1}}(r):"[object Boolean]"===z(r)))}function ce(r){return ae(r)||se(r)}N(ce,"isPrimitive",ae),N(ce,"isObject",se);var he="object"==typeof self?self:null,pe="object"==typeof window?window:null,ye="undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},me="object"==typeof ye?ye:null,ge="object"==typeof globalThis?globalThis:null;var we=function(r){if(arguments.length){if(!ae(r))throw new TypeError(F("invalid argument. Must provide a boolean. Value: `%s`.",r));if(r)return new Function("return this;")()}if(ge)return ge;if(he)return he;if(pe)return pe;if(me)return me;throw new Error("unexpected error. Unable to resolve global object.")}(),ve=we.document&&we.document.childNodes,be=Int8Array;function de(){return/^\s*function\s*([^(]*)/i}var Ee=/^\s*function\s*([^(]*)/i;function _e(r){return null!==r&&"object"==typeof r}function Te(r){var e,t,n,i;if(("Object"===(t=z(r).slice(8,-1))||"Error"===t)&&r.constructor){if("string"==typeof(n=r.constructor).name)return n.name;if(e=Ee.exec(n.toString()))return e[1]}return _e(i=r)&&(i._isBuffer||i.constructor&&"function"==typeof i.constructor.isBuffer&&i.constructor.isBuffer(i))?"Buffer":t}N(de,"REGEXP",Ee),N(_e,"isObjectLikeArray",function(r){if("function"!=typeof r)throw new TypeError(F("invalid argument. Must provide a function. Value: `%s`.",r));return function(e){var t,n;if(!Kr(e))return!1;if(0===(t=e.length))return!1;for(n=0;n=2)e.push(n[0],n[1]);else{if(!Le(n))return new TypeError(F("invalid argument. An iterator must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",n));e.push(Pe(n),Ye(n))}return e}var qe=2*wr.BYTES_PER_ELEMENT,De=Me();function He(r){return r instanceof rt||"object"==typeof r&&null!==r&&("Complex64Array"===r.constructor.name||"Complex128Array"===r.constructor.name)&&"number"==typeof r._length&&"object"==typeof r._buffer}function Ke(r){return r===rt||"Complex128Array"===r.name}function Qe(r,e){return new ke(r[e*=2],r[e+1])}function rt(){var r,e,t,n;if(e=arguments.length,!(this instanceof rt))return 0===e?new rt:1===e?new rt(arguments[0]):2===e?new rt(arguments[0],arguments[1]):new rt(arguments[0],arguments[1],arguments[2]);if(0===e)t=new wr(0);else if(1===e)if(ur(arguments[0]))t=new wr(2*arguments[0]);else if(qr(arguments[0]))if((n=(t=arguments[0]).length)&&Kr(t)&&Le(t[0])){if(t=function(r,e){var t,n,i,o;for(t=e.length,o=0,i=0;it.byteLength-r)throw new RangeError(F("invalid arguments. ArrayBuffer has insufficient capacity. Either decrease the array length or provide a bigger buffer. Minimum capacity: `%u`.",n*qe));t=new wr(t,r,2*n)}}return N(this,"_buffer",t),N(this,"_length",t.length/2),this}function et(r){return r.re}function tt(r){return r.im}function nt(r){var e,t,n;for(e=[];!(t=r.next()).done;)if(zr(n=t.value)&&n.length>=2)e.push(n[0],n[1]);else{if(!Le(n))return new TypeError(F("invalid argument. An iterator must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",n));e.push(et(n),tt(n))}return e}N(rt,"BYTES_PER_ELEMENT",qe),N(rt,"name","Complex64Array"),N(rt,"from",(function(r){var e,t,n,i,o,a,u,f,l,s,c,h;if(!Ae(this))throw new TypeError("invalid invocation. `this` context must be a constructor.");if(!Ke(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if((t=arguments.length)>1){if(!Ae(n=arguments[1]))throw new TypeError(F("invalid argument. Second argument must be a function. Value: `%s`.",n));t>2&&(e=arguments[2])}if(He(r)){if(f=r.length,n){for(o=(i=new this(f))._buffer,h=0,c=0;c=2))throw new TypeError(F("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",s));o[h]=s[0],o[h+1]=s[1]}h+=2}return i}return new this(r)}if(qr(r)){if(n){for(f=r.length,u=r.get&&r.set?ze("default"):Ze("default"),c=0;c=2))throw new TypeError(F("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",s));o[h]=s[0],o[h+1]=s[1]}h+=2}return i}return new this(r)}if(Qr(r)&&De&&Ae(r[Ne])){if(!Ae((o=r[Ne]()).next))throw new TypeError(F("invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.",r));if(a=n?function(r,e,t){var n,i,o,a;for(n=[],a=-1;!(i=r.next()).done;)if(a+=1,zr(o=e.call(t,i.value,a))&&o.length>=2)n.push(o[0],o[1]);else{if(!Le(o))return new TypeError(F("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",o));n.push(Pe(o),Ye(o))}return n}(o,n,e):Je(o),a instanceof Error)throw a;for(o=(i=new this(f=a.length/2))._buffer,c=0;c=this._length))return Qe(this._buffer,r)})),Ue(rt.prototype,"buffer",(function(){return this._buffer.buffer})),Ue(rt.prototype,"byteLength",(function(){return this._buffer.byteLength})),Ue(rt.prototype,"byteOffset",(function(){return this._buffer.byteOffset})),N(rt.prototype,"BYTES_PER_ELEMENT",rt.BYTES_PER_ELEMENT),N(rt.prototype,"copyWithin",(function(r,e){if(!He(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");return 2===arguments.length?this._buffer.copyWithin(2*r,2*e):this._buffer.copyWithin(2*r,2*e,2*arguments[2]),this})),N(rt.prototype,"entries",(function(){var r,e,t,n,i,o,a;if(!He(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");return e=this,r=this._buffer,n=this._length,o=-1,a=-2,N(t={},"next",(function(){var e;if(o+=1,i||o>=n)return{done:!0};return e=new ke(r[a+=2],r[a+1]),{value:[o,e],done:!1}})),N(t,"return",(function(r){if(i=!0,arguments.length)return{value:r,done:!0};return{done:!0}})),Ne&&N(t,Ne,(function(){return e.entries()})),t})),N(rt.prototype,"every",(function(r,e){var t,n;if(!He(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Ae(r))throw new TypeError(F("invalid argument. First argument must be a function. Value: `%s`.",r));for(t=this._buffer,n=0;n1){if(!tr(e))throw new TypeError(F("invalid argument. Second argument must be an integer. Value: `%s`.",e));if(e<0&&(e+=i)<0&&(e=0),arguments.length>2){if(!tr(t))throw new TypeError(F("invalid argument. Third argument must be an integer. Value: `%s`.",t));t<0&&(t+=i)<0&&(t=0),t>i&&(t=i)}else t=i}else e=0,t=i;for(a=Pe(r),u=Ye(r),f=e;f=0;n--)if(i=Qe(t,n),r.call(e,i,n,this))return i})),N(rt.prototype,"findLastIndex",(function(r,e){var t,n,i;if(!He(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Ae(r))throw new TypeError(F("invalid argument. First argument must be a function. Value: `%s`.",r));for(t=this._buffer,n=this._length-1;n>=0;n--)if(i=Qe(t,n),r.call(e,i,n,this))return n;return-1})),N(rt.prototype,"forEach",(function(r,e){var t,n,i;if(!He(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Ae(r))throw new TypeError(F("invalid argument. First argument must be a function. Value: `%s`.",r));for(t=this._buffer,n=0;n=this._length))return Qe(this._buffer,r)})),N(rt.prototype,"includes",(function(r,e){var t,n,i,o,a;if(!He(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Le(r))throw new TypeError(F("invalid argument. First argument must be a complex number. Value: `%s`.",r));if(arguments.length>1){if(!tr(e))throw new TypeError(F("invalid argument. Second argument must be an integer. Value: `%s`.",e));e<0&&(e+=this._length)<0&&(e=0)}else e=0;for(i=Pe(r),o=Ye(r),t=this._buffer,a=e;a1){if(!tr(e))throw new TypeError(F("invalid argument. Second argument must be an integer. Value: `%s`.",e));e<0&&(e+=this._length)<0&&(e=0)}else e=0;for(i=Pe(r),o=Ye(r),t=this._buffer,a=e;a1){if(!tr(e))throw new TypeError(F("invalid argument. Second argument must be an integer. Value: `%s`.",e));e>=this._length?e=this._length-1:e<0&&(e+=this._length)}else e=this._length-1;for(i=Pe(r),o=Ye(r),t=this._buffer,a=e;a>=0;a--)if(i===t[n=2*a]&&o===t[n+1])return a;return-1})),Ue(rt.prototype,"length",(function(){return this._length})),N(rt.prototype,"map",(function(r,e){var t,n,i,o,a;if(!He(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Ae(r))throw new TypeError(F("invalid argument. First argument must be a function. Value: `%s`.",r));for(n=this._buffer,t=(i=new this.constructor(this._length))._buffer,o=0;o1){if(!ur(t=arguments[1]))throw new TypeError(F("invalid argument. Index argument must be a nonnegative integer. Value: `%s`.",t))}else t=0;if(Le(r)){if(t>=this._length)throw new RangeError(F("invalid argument. Index argument is out-of-bounds. Value: `%u`.",t));return n[t*=2]=Pe(r),void(n[t+1]=Ye(r))}if(He(r)){if(t+(a=r._length)>this._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");if(e=r._buffer,l=n.byteOffset+t*qe,e.buffer===n.buffer&&e.byteOffsetl){for(i=new wr(e.length),f=0;fthis._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");if(e=r,l=n.byteOffset+t*qe,e.buffer===n.buffer&&e.byteOffsetl){for(i=new wr(a),f=0;fthis._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");for(t*=2,f=0;fu&&(e=u)}}for(t=ri&&(e=i)}}return r>=i?(i=0,t=n.byteLength):r>=e?(i=0,t=n.byteOffset+r*qe):(i=e-r,t=n.byteOffset+r*qe),new this.constructor(n.buffer,t,i<0?0:i)})),N(rt.prototype,"toReversed",(function(){var r,e,t,n,i,o;if(!He(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");for(t=this._length,e=new this.constructor(t),n=this._buffer,r=e._buffer,i=0;i=i)throw new RangeError(F("invalid argument. Index argument is out-of-bounds. Value: `%s`.",r));if(!Le(e))throw new TypeError(F("invalid argument. Second argument must be a complex number. Value: `%s`.",e));return(t=(n=new this.constructor(this._buffer))._buffer)[2*r]=Pe(e),t[2*r+1]=Ye(e),n}));var it=2*pr.BYTES_PER_ELEMENT,ot=Me();function at(r){return r instanceof lt||"object"==typeof r&&null!==r&&("Complex64Array"===r.constructor.name||"Complex128Array"===r.constructor.name)&&"number"==typeof r._length&&"object"==typeof r._buffer}function ut(r){return r===lt||"Complex64Array"===r.name}function ft(r,e){return new Ve(r[e*=2],r[e+1])}function lt(){var r,e,t,n;if(e=arguments.length,!(this instanceof lt))return 0===e?new lt:1===e?new lt(arguments[0]):2===e?new lt(arguments[0],arguments[1]):new lt(arguments[0],arguments[1],arguments[2]);if(0===e)t=new pr(0);else if(1===e)if(ur(arguments[0]))t=new pr(2*arguments[0]);else if(qr(arguments[0]))if((n=(t=arguments[0]).length)&&Kr(t)&&Le(t[0])){if(t=function(r,e){var t,n,i,o;for(t=e.length,o=0,i=0;it.byteLength-r)throw new RangeError(F("invalid arguments. ArrayBuffer has insufficient capacity. Either decrease the array length or provide a bigger buffer. Minimum capacity: `%u`.",n*it));t=new pr(t,r,2*n)}}return N(this,"_buffer",t),N(this,"_length",t.length/2),this}N(lt,"BYTES_PER_ELEMENT",it),N(lt,"name","Complex128Array"),N(lt,"from",(function(r){var e,t,n,i,o,a,u,f,l,s,c,h;if(!Ae(this))throw new TypeError("invalid invocation. `this` context must be a constructor.");if(!ut(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if((t=arguments.length)>1){if(!Ae(n=arguments[1]))throw new TypeError(F("invalid argument. Second argument must be a function. Value: `%s`.",n));t>2&&(e=arguments[2])}if(at(r)){if(f=r.length,n){for(o=(i=new this(f))._buffer,h=0,c=0;c=2))throw new TypeError(F("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",s));o[h]=s[0],o[h+1]=s[1]}h+=2}return i}return new this(r)}if(qr(r)){if(n){for(f=r.length,u=r.get&&r.set?ze("default"):Ze("default"),c=0;c=2))throw new TypeError(F("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",s));o[h]=s[0],o[h+1]=s[1]}h+=2}return i}return new this(r)}if(Qr(r)&&ot&&Ae(r[Ne])){if(!Ae((o=r[Ne]()).next))throw new TypeError(F("invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.",r));if(a=n?function(r,e,t){var n,i,o,a;for(n=[],a=-1;!(i=r.next()).done;)if(a+=1,zr(o=e.call(t,i.value,a))&&o.length>=2)n.push(o[0],o[1]);else{if(!Le(o))return new TypeError(F("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",o));n.push(et(o),tt(o))}return n}(o,n,e):nt(o),a instanceof Error)throw a;for(o=(i=new this(f=a.length/2))._buffer,c=0;c=this._length))return ft(this._buffer,r)})),Ue(lt.prototype,"buffer",(function(){return this._buffer.buffer})),Ue(lt.prototype,"byteLength",(function(){return this._buffer.byteLength})),Ue(lt.prototype,"byteOffset",(function(){return this._buffer.byteOffset})),N(lt.prototype,"BYTES_PER_ELEMENT",lt.BYTES_PER_ELEMENT),N(lt.prototype,"copyWithin",(function(r,e){if(!at(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");return 2===arguments.length?this._buffer.copyWithin(2*r,2*e):this._buffer.copyWithin(2*r,2*e,2*arguments[2]),this})),N(lt.prototype,"entries",(function(){var r,e,t,n,i,o,a;if(!at(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");return e=this,r=this._buffer,n=this._length,o=-1,a=-2,N(t={},"next",(function(){var e;if(o+=1,i||o>=n)return{done:!0};return e=new Ve(r[a+=2],r[a+1]),{value:[o,e],done:!1}})),N(t,"return",(function(r){if(i=!0,arguments.length)return{value:r,done:!0};return{done:!0}})),Ne&&N(t,Ne,(function(){return e.entries()})),t})),N(lt.prototype,"every",(function(r,e){var t,n;if(!at(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Ae(r))throw new TypeError(F("invalid argument. First argument must be a function. Value: `%s`.",r));for(t=this._buffer,n=0;n1){if(!tr(e))throw new TypeError(F("invalid argument. Second argument must be an integer. Value: `%s`.",e));if(e<0&&(e+=i)<0&&(e=0),arguments.length>2){if(!tr(t))throw new TypeError(F("invalid argument. Third argument must be an integer. Value: `%s`.",t));t<0&&(t+=i)<0&&(t=0),t>i&&(t=i)}else t=i}else e=0,t=i;for(a=et(r),u=tt(r),f=e;f=0;n--)if(i=ft(t,n),r.call(e,i,n,this))return i})),N(lt.prototype,"findLastIndex",(function(r,e){var t,n,i;if(!at(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Ae(r))throw new TypeError(F("invalid argument. First argument must be a function. Value: `%s`.",r));for(t=this._buffer,n=this._length-1;n>=0;n--)if(i=ft(t,n),r.call(e,i,n,this))return n;return-1})),N(lt.prototype,"forEach",(function(r,e){var t,n,i;if(!at(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Ae(r))throw new TypeError(F("invalid argument. First argument must be a function. Value: `%s`.",r));for(t=this._buffer,n=0;n=this._length))return ft(this._buffer,r)})),Ue(lt.prototype,"length",(function(){return this._length})),N(lt.prototype,"includes",(function(r,e){var t,n,i,o,a;if(!at(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Le(r))throw new TypeError(F("invalid argument. First argument must be a complex number. Value: `%s`.",r));if(arguments.length>1){if(!tr(e))throw new TypeError(F("invalid argument. Second argument must be an integer. Value: `%s`.",e));e<0&&(e+=this._length)<0&&(e=0)}else e=0;for(i=et(r),o=tt(r),t=this._buffer,a=e;a1){if(!tr(e))throw new TypeError(F("invalid argument. Second argument must be an integer. Value: `%s`.",e));e<0&&(e+=this._length)<0&&(e=0)}else e=0;for(i=et(r),o=tt(r),t=this._buffer,a=e;a1){if(!tr(e))throw new TypeError(F("invalid argument. Second argument must be an integer. Value: `%s`.",e));e>=this._length?e=this._length-1:e<0&&(e+=this._length)}else e=this._length-1;for(i=et(r),o=tt(r),t=this._buffer,a=e;a>=0;a--)if(i===t[n=2*a]&&o===t[n+1])return a;return-1})),N(lt.prototype,"map",(function(r,e){var t,n,i,o,a;if(!at(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Ae(r))throw new TypeError(F("invalid argument. First argument must be a function. Value: `%s`.",r));for(n=this._buffer,t=(i=new this.constructor(this._length))._buffer,o=0;o1){if(!ur(t=arguments[1]))throw new TypeError(F("invalid argument. Index argument must be a nonnegative integer. Value: `%s`.",t))}else t=0;if(Le(r)){if(t>=this._length)throw new RangeError(F("invalid argument. Index argument is out-of-bounds. Value: `%u`.",t));return n[t*=2]=et(r),void(n[t+1]=tt(r))}if(at(r)){if(t+(a=r._length)>this._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");if(e=r._buffer,l=n.byteOffset+t*it,e.buffer===n.buffer&&e.byteOffsetl){for(i=new pr(e.length),f=0;fthis._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");if(e=r,l=n.byteOffset+t*it,e.buffer===n.buffer&&e.byteOffsetl){for(i=new pr(a),f=0;fthis._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");for(t*=2,f=0;fi&&(e=i)}}return r>=i?(i=0,t=n.byteLength):r>=e?(i=0,t=n.byteOffset+r*it):(i=e-r,t=n.byteOffset+r*it),new this.constructor(n.buffer,t,i<0?0:i)})),N(lt.prototype,"toReversed",(function(){var r,e,t,n,i,o;if(!at(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");for(t=this._length,e=new this.constructor(t),n=this._buffer,r=e._buffer,i=0;i=i)throw new RangeError(F("invalid argument. Index argument is out-of-bounds. Value: `%s`.",r));if(!Le(e))throw new TypeError(F("invalid argument. Second argument must be a complex number. Value: `%s`.",e));return(t=(n=new this.constructor(this._buffer))._buffer)[2*r]=et(e),t[2*r+1]=tt(e),n}));var st={float64:pr,float32:wr,generic:Array,int16:Er,int32:Ar,int8:Fr,uint16:Rr,uint32:Mr,uint8:Yr,uint8c:Zr,complex64:rt,complex128:lt};function ct(){return{dtypes:{default:"float64",numeric:"float64",real:"float64",floating_point:"float64",real_floating_point:"float64",complex_floating_point:"complex128",integer:"int32",signed_integer:"int32",unsigned_integer:"uint32"}}}var ht={dtypes:{default:"float64",numeric:"float64",real:"float64",floating_point:"float64",real_floating_point:"float64",complex_floating_point:"complex128",integer:"int32",signed_integer:"int32",unsigned_integer:"uint32"}},pt={"dtypes.default":ht.dtypes.default,"dtypes.numeric":ht.dtypes.numeric,"dtypes.real":ht.dtypes.real,"dtypes.floating_point":ht.dtypes.floating_point,"dtypes.real_floating_point":ht.dtypes.real_floating_point,"dtypes.complex_floating_point":ht.dtypes.complex_floating_point,"dtypes.integer":ht.dtypes.integer,"dtypes.signed_integer":ht.dtypes.signed_integer,"dtypes.unsigned_integer":ht.dtypes.unsigned_integer};N(ct,"get",(function(r){var e=pt[r];return void 0===e?null:e}));var yt=ct.get("dtypes.default");function mt(r){var e,t;if(!ur(r))throw new TypeError(F("invalid argument. First argument must be a nonnegative integer. Value: `%s`.",r));if("generic"===(e=arguments.length>1?arguments[1]:yt))return function(r,e){var t,n;for(t=[],n=0;n1?mt(r,arguments[1]):mt(r)}export{gt as default}; -//# sourceMappingURL=mod.js.map diff --git a/mod.js.map b/mod.js.map deleted file mode 100644 index c3c1e66..0000000 --- a/mod.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"mod.js","sources":["../node_modules/@stdlib/utils-define-property/lib/define_property.js","../node_modules/@stdlib/utils-define-property/lib/builtin.js","../node_modules/@stdlib/string-base-format-interpolate/lib/is_number.js","../node_modules/@stdlib/string-base-format-interpolate/lib/zero_pad.js","../node_modules/@stdlib/string-base-format-interpolate/lib/format_integer.js","../node_modules/@stdlib/string-base-format-interpolate/lib/format_double.js","../node_modules/@stdlib/string-base-format-interpolate/lib/space_pad.js","../node_modules/@stdlib/string-base-format-interpolate/lib/main.js","../node_modules/@stdlib/string-base-format-interpolate/lib/is_string.js","../node_modules/@stdlib/string-base-format-tokenize/lib/main.js","../node_modules/@stdlib/string-format/lib/main.js","../node_modules/@stdlib/string-format/lib/is_string.js","../node_modules/@stdlib/utils-define-property/lib/polyfill.js","../node_modules/@stdlib/utils-define-property/lib/index.js","../node_modules/@stdlib/utils-define-property/lib/has_define_property_support.js","../node_modules/@stdlib/utils-define-nonenumerable-read-only-property/lib/main.js","../node_modules/@stdlib/assert-is-number/lib/primitive.js","../node_modules/@stdlib/assert-has-tostringtag-support/lib/main.js","../node_modules/@stdlib/assert-has-symbol-support/lib/main.js","../node_modules/@stdlib/utils-native-class/lib/tostring.js","../node_modules/@stdlib/assert-has-own-property/lib/main.js","../node_modules/@stdlib/symbol-ctor/lib/main.js","../node_modules/@stdlib/utils-native-class/lib/tostringtag.js","../node_modules/@stdlib/utils-native-class/lib/index.js","../node_modules/@stdlib/utils-native-class/lib/polyfill.js","../node_modules/@stdlib/utils-native-class/lib/main.js","../node_modules/@stdlib/number-ctor/lib/main.js","../node_modules/@stdlib/assert-is-number/lib/tostring.js","../node_modules/@stdlib/assert-is-number/lib/object.js","../node_modules/@stdlib/assert-is-number/lib/try2serialize.js","../node_modules/@stdlib/assert-is-number/lib/main.js","../node_modules/@stdlib/assert-is-number/lib/index.js","../node_modules/@stdlib/constants-float64-pinf/lib/index.js","../node_modules/@stdlib/constants-float64-ninf/lib/index.js","../node_modules/@stdlib/math-base-special-floor/lib/main.js","../node_modules/@stdlib/math-base-assert-is-integer/lib/main.js","../node_modules/@stdlib/assert-is-integer/lib/integer.js","../node_modules/@stdlib/assert-is-integer/lib/primitive.js","../node_modules/@stdlib/assert-is-integer/lib/object.js","../node_modules/@stdlib/assert-is-integer/lib/main.js","../node_modules/@stdlib/assert-is-nonnegative-integer/lib/primitive.js","../node_modules/@stdlib/assert-is-nonnegative-integer/lib/object.js","../node_modules/@stdlib/assert-is-nonnegative-integer/lib/main.js","../node_modules/@stdlib/assert-is-integer/lib/index.js","../node_modules/@stdlib/assert-is-nonnegative-integer/lib/index.js","../node_modules/@stdlib/assert-is-float64array/lib/main.js","../node_modules/@stdlib/assert-has-float64array-support/lib/float64array.js","../node_modules/@stdlib/array-float64/lib/main.js","../node_modules/@stdlib/array-float64/lib/index.js","../node_modules/@stdlib/assert-has-float64array-support/lib/main.js","../node_modules/@stdlib/array-float64/lib/polyfill.js","../node_modules/@stdlib/assert-is-float32array/lib/main.js","../node_modules/@stdlib/assert-has-float32array-support/lib/float32array.js","../node_modules/@stdlib/array-float32/lib/main.js","../node_modules/@stdlib/array-float32/lib/index.js","../node_modules/@stdlib/assert-has-float32array-support/lib/main.js","../node_modules/@stdlib/array-float32/lib/polyfill.js","../node_modules/@stdlib/assert-is-int16array/lib/main.js","../node_modules/@stdlib/constants-int16-max/lib/index.js","../node_modules/@stdlib/assert-has-int16array-support/lib/int16array.js","../node_modules/@stdlib/array-int16/lib/main.js","../node_modules/@stdlib/array-int16/lib/index.js","../node_modules/@stdlib/assert-has-int16array-support/lib/main.js","../node_modules/@stdlib/constants-int16-min/lib/index.js","../node_modules/@stdlib/array-int16/lib/polyfill.js","../node_modules/@stdlib/assert-is-int32array/lib/main.js","../node_modules/@stdlib/constants-int32-max/lib/index.js","../node_modules/@stdlib/assert-has-int32array-support/lib/int32array.js","../node_modules/@stdlib/array-int32/lib/main.js","../node_modules/@stdlib/array-int32/lib/index.js","../node_modules/@stdlib/assert-has-int32array-support/lib/main.js","../node_modules/@stdlib/constants-int32-min/lib/index.js","../node_modules/@stdlib/array-int32/lib/polyfill.js","../node_modules/@stdlib/assert-is-int8array/lib/main.js","../node_modules/@stdlib/constants-int8-max/lib/index.js","../node_modules/@stdlib/assert-has-int8array-support/lib/int8array.js","../node_modules/@stdlib/array-int8/lib/main.js","../node_modules/@stdlib/array-int8/lib/index.js","../node_modules/@stdlib/assert-has-int8array-support/lib/main.js","../node_modules/@stdlib/constants-int8-min/lib/index.js","../node_modules/@stdlib/array-int8/lib/polyfill.js","../node_modules/@stdlib/assert-is-uint16array/lib/main.js","../node_modules/@stdlib/constants-uint16-max/lib/index.js","../node_modules/@stdlib/assert-has-uint16array-support/lib/uint16array.js","../node_modules/@stdlib/array-uint16/lib/main.js","../node_modules/@stdlib/array-uint16/lib/index.js","../node_modules/@stdlib/assert-has-uint16array-support/lib/main.js","../node_modules/@stdlib/array-uint16/lib/polyfill.js","../node_modules/@stdlib/assert-is-uint32array/lib/main.js","../node_modules/@stdlib/constants-uint32-max/lib/index.js","../node_modules/@stdlib/assert-has-uint32array-support/lib/uint32array.js","../node_modules/@stdlib/array-uint32/lib/main.js","../node_modules/@stdlib/array-uint32/lib/index.js","../node_modules/@stdlib/assert-has-uint32array-support/lib/main.js","../node_modules/@stdlib/array-uint32/lib/polyfill.js","../node_modules/@stdlib/assert-is-uint8array/lib/main.js","../node_modules/@stdlib/constants-uint8-max/lib/index.js","../node_modules/@stdlib/assert-has-uint8array-support/lib/uint8array.js","../node_modules/@stdlib/array-uint8/lib/main.js","../node_modules/@stdlib/array-uint8/lib/index.js","../node_modules/@stdlib/assert-has-uint8array-support/lib/main.js","../node_modules/@stdlib/array-uint8/lib/polyfill.js","../node_modules/@stdlib/assert-is-uint8clampedarray/lib/main.js","../node_modules/@stdlib/assert-has-uint8clampedarray-support/lib/uint8clampedarray.js","../node_modules/@stdlib/array-uint8c/lib/main.js","../node_modules/@stdlib/array-uint8c/lib/index.js","../node_modules/@stdlib/assert-has-uint8clampedarray-support/lib/main.js","../node_modules/@stdlib/array-uint8c/lib/polyfill.js","../node_modules/@stdlib/constants-array-max-array-length/lib/index.js","../node_modules/@stdlib/assert-is-array-like-object/lib/main.js","../node_modules/@stdlib/constants-array-max-typed-array-length/lib/index.js","../node_modules/@stdlib/assert-is-collection/lib/main.js","../node_modules/@stdlib/assert-is-arraybuffer/lib/main.js","../node_modules/@stdlib/assert-is-array/lib/main.js","../node_modules/@stdlib/assert-is-object/lib/main.js","../node_modules/@stdlib/assert-is-string/lib/primitive.js","../node_modules/@stdlib/assert-is-string/lib/valueof.js","../node_modules/@stdlib/assert-is-string/lib/object.js","../node_modules/@stdlib/assert-is-string/lib/try2valueof.js","../node_modules/@stdlib/assert-is-string/lib/main.js","../node_modules/@stdlib/assert-is-string/lib/index.js","../node_modules/@stdlib/utils-type-of/lib/fixtures/re.js","../node_modules/@stdlib/assert-is-boolean/lib/primitive.js","../node_modules/@stdlib/boolean-ctor/lib/main.js","../node_modules/@stdlib/assert-is-boolean/lib/tostring.js","../node_modules/@stdlib/assert-is-boolean/lib/object.js","../node_modules/@stdlib/assert-is-boolean/lib/try2serialize.js","../node_modules/@stdlib/assert-is-boolean/lib/main.js","../node_modules/@stdlib/assert-is-boolean/lib/index.js","../node_modules/@stdlib/utils-global/lib/self.js","../node_modules/@stdlib/utils-global/lib/window.js","../node_modules/@stdlib/utils-global/lib/global.js","../node_modules/@stdlib/utils-global/lib/global_this.js","../node_modules/@stdlib/utils-type-of/lib/fixtures/nodelist.js","../node_modules/@stdlib/utils-global/lib/main.js","../node_modules/@stdlib/utils-global/lib/codegen.js","../node_modules/@stdlib/utils-type-of/lib/fixtures/typedarray.js","../node_modules/@stdlib/regexp-function-name/lib/main.js","../node_modules/@stdlib/regexp-function-name/lib/regexp.js","../node_modules/@stdlib/assert-is-object-like/lib/main.js","../node_modules/@stdlib/utils-constructor-name/lib/main.js","../node_modules/@stdlib/assert-is-buffer/lib/main.js","../node_modules/@stdlib/regexp-function-name/lib/index.js","../node_modules/@stdlib/assert-is-object-like/lib/index.js","../node_modules/@stdlib/assert-tools-array-function/lib/main.js","../node_modules/@stdlib/utils-type-of/lib/index.js","../node_modules/@stdlib/utils-type-of/lib/check.js","../node_modules/@stdlib/utils-type-of/lib/polyfill.js","../node_modules/@stdlib/utils-type-of/lib/main.js","../node_modules/@stdlib/assert-is-function/lib/main.js","../node_modules/@stdlib/complex-float64/lib/main.js","../node_modules/@stdlib/complex-float64/lib/tostring.js","../node_modules/@stdlib/complex-float64/lib/tojson.js","../node_modules/@stdlib/number-float64-base-to-float32/lib/main.js","../node_modules/@stdlib/number-float64-base-to-float32/lib/polyfill.js","../node_modules/@stdlib/number-float64-base-to-float32/lib/index.js","../node_modules/@stdlib/complex-float32/lib/main.js","../node_modules/@stdlib/assert-is-complex-like/lib/main.js","../node_modules/@stdlib/math-base-assert-is-even/lib/main.js","../node_modules/@stdlib/complex-float32/lib/tostring.js","../node_modules/@stdlib/complex-float32/lib/tojson.js","../node_modules/@stdlib/array-base-assert-is-complex64array/lib/main.js","../node_modules/@stdlib/array-base-assert-is-complex128array/lib/main.js","../node_modules/@stdlib/assert-has-iterator-symbol-support/lib/main.js","../node_modules/@stdlib/symbol-iterator/lib/main.js","../node_modules/@stdlib/utils-define-nonenumerable-read-only-accessor/lib/main.js","../node_modules/@stdlib/complex-realf/lib/main.js","../node_modules/@stdlib/complex-imagf/lib/main.js","../node_modules/@stdlib/strided-base-reinterpret-complex64/lib/main.js","../node_modules/@stdlib/strided-base-reinterpret-complex128/lib/main.js","../node_modules/@stdlib/array-base-getter/lib/main.js","../node_modules/@stdlib/array-base-accessor-getter/lib/main.js","../node_modules/@stdlib/array-complex64/lib/from_iterator.js","../node_modules/@stdlib/array-complex64/lib/main.js","../node_modules/@stdlib/array-complex64/lib/from_array.js","../node_modules/@stdlib/complex-real/lib/main.js","../node_modules/@stdlib/complex-imag/lib/main.js","../node_modules/@stdlib/array-complex128/lib/from_iterator.js","../node_modules/@stdlib/array-complex64/lib/from_iterator_map.js","../node_modules/@stdlib/array-complex128/lib/main.js","../node_modules/@stdlib/array-complex128/lib/from_array.js","../node_modules/@stdlib/array-complex128/lib/from_iterator_map.js","../node_modules/@stdlib/array-ctors/lib/ctors.js","../node_modules/@stdlib/array-defaults/lib/main.js","../node_modules/@stdlib/array-defaults/lib/get.js","../node_modules/@stdlib/array-defaults/lib/index.js","../node_modules/@stdlib/array-zeros/lib/main.js","../node_modules/@stdlib/array-base-filled/lib/main.js","../node_modules/@stdlib/array-base-zeros/lib/main.js","../node_modules/@stdlib/array-ctors/lib/main.js","../lib/polyfill.js"],"sourcesContent":["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Object.defineProperty === 'function' ) ? Object.defineProperty : null;\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Defines (or modifies) an object property.\n*\n* ## Notes\n*\n* - Property descriptors come in two flavors: **data descriptors** and **accessor descriptors**. A data descriptor is a property that has a value, which may or may not be writable. An accessor descriptor is a property described by a getter-setter function pair. A descriptor must be one of these two flavors and cannot be both.\n*\n* @name defineProperty\n* @type {Function}\n* @param {Object} obj - object on which to define the property\n* @param {(string|symbol)} prop - property name\n* @param {Object} descriptor - property descriptor\n* @param {boolean} [descriptor.configurable=false] - boolean indicating if property descriptor can be changed and if the property can be deleted from the provided object\n* @param {boolean} [descriptor.enumerable=false] - boolean indicating if the property shows up when enumerating object properties\n* @param {boolean} [descriptor.writable=false] - boolean indicating if the value associated with the property can be changed with an assignment operator\n* @param {*} [descriptor.value] - property value\n* @param {(Function|void)} [descriptor.get=undefined] - function which serves as a getter for the property, or, if no getter, undefined. When the property is accessed, a getter function is called without arguments and with the `this` context set to the object through which the property is accessed (which may not be the object on which the property is defined due to inheritance). The return value will be used as the property value.\n* @param {(Function|void)} [descriptor.set=undefined] - function which serves as a setter for the property, or, if no setter, undefined. When assigning a property value, a setter function is called with one argument (the value being assigned to the property) and with the `this` context set to the object through which the property is assigned.\n* @throws {TypeError} first argument must be an object\n* @throws {TypeError} third argument must be an object\n* @throws {Error} property descriptor cannot have both a value and a setter and/or getter\n* @returns {Object} object with added property\n*\n* @example\n* var obj = {};\n*\n* defineProperty( obj, 'foo', {\n* 'value': 'bar'\n* });\n*\n* var str = obj.foo;\n* // returns 'bar'\n*/\nvar defineProperty = Object.defineProperty;\n\n\n// EXPORTS //\n\nexport default defineProperty;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Tests if a value is a number primitive.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number primitive\n*\n* @example\n* var bool = isNumber( 3.14 );\n* // returns true\n*\n* @example\n* var bool = isNumber( NaN );\n* // returns true\n*\n* @example\n* var bool = isNumber( new Number( 3.14 ) );\n* // returns false\n*/\nfunction isNumber( value ) {\n\treturn ( typeof value === 'number' ); // NOTE: we inline the `isNumber.isPrimitive` function from `@stdlib/assert/is-number` in order to avoid circular dependencies.\n}\n\n\n// EXPORTS //\n\nexport default isNumber;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// FUNCTIONS //\n\n/**\n* Tests if a string starts with a minus sign (`-`).\n*\n* @private\n* @param {string} str - input string\n* @returns {boolean} boolean indicating if a string starts with a minus sign (`-`)\n*/\nfunction startsWithMinus( str ) {\n\treturn str[ 0 ] === '-';\n}\n\n/**\n* Returns a string of `n` zeros.\n*\n* @private\n* @param {number} n - number of zeros\n* @returns {string} string of zeros\n*/\nfunction zeros( n ) {\n\tvar out = '';\n\tvar i;\n\tfor ( i = 0; i < n; i++ ) {\n\t\tout += '0';\n\t}\n\treturn out;\n}\n\n\n// MAIN //\n\n/**\n* Pads a token with zeros to the specified width.\n*\n* @private\n* @param {string} str - token argument\n* @param {number} width - token width\n* @param {boolean} [right=false] - boolean indicating whether to pad to the right\n* @returns {string} padded token argument\n*/\nfunction zeroPad( str, width, right ) {\n\tvar negative = false;\n\tvar pad = width - str.length;\n\tif ( pad < 0 ) {\n\t\treturn str;\n\t}\n\tif ( startsWithMinus( str ) ) {\n\t\tnegative = true;\n\t\tstr = str.substr( 1 );\n\t}\n\tstr = ( right ) ?\n\t\tstr + zeros( pad ) :\n\t\tzeros( pad ) + str;\n\tif ( negative ) {\n\t\tstr = '-' + str;\n\t}\n\treturn str;\n}\n\n\n// EXPORTS //\n\nexport default zeroPad;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isNumber from './is_number.js';\nimport zeroPad from './zero_pad.js';\n\n// NOTE: for the following, we explicitly avoid using stdlib packages in this particular package in order to avoid circular dependencies.\nvar lowercase = String.prototype.toLowerCase;\nvar uppercase = String.prototype.toUpperCase;\n\n\n// MAIN //\n\n/**\n* Formats a token object argument as an integer.\n*\n* @private\n* @param {Object} token - token object\n* @throws {Error} must provide a valid integer\n* @returns {string} formatted token argument\n*/\nfunction formatInteger( token ) {\n\tvar base;\n\tvar out;\n\tvar i;\n\n\tswitch ( token.specifier ) {\n\tcase 'b':\n\t\t// Case: %b (binary)\n\t\tbase = 2;\n\t\tbreak;\n\tcase 'o':\n\t\t// Case: %o (octal)\n\t\tbase = 8;\n\t\tbreak;\n\tcase 'x':\n\tcase 'X':\n\t\t// Case: %x, %X (hexadecimal)\n\t\tbase = 16;\n\t\tbreak;\n\tcase 'd':\n\tcase 'i':\n\tcase 'u':\n\tdefault:\n\t\t// Case: %d, %i, %u (decimal)\n\t\tbase = 10;\n\t\tbreak;\n\t}\n\tout = token.arg;\n\ti = parseInt( out, 10 );\n\tif ( !isFinite( i ) ) { // NOTE: We use the global `isFinite` function here instead of `@stdlib/math/base/assert/is-finite` in order to avoid circular dependencies.\n\t\tif ( !isNumber( out ) ) {\n\t\t\tthrow new Error( 'invalid integer. Value: ' + out );\n\t\t}\n\t\ti = 0;\n\t}\n\tif ( i < 0 && ( token.specifier === 'u' || base !== 10 ) ) {\n\t\ti = 0xffffffff + i + 1;\n\t}\n\tif ( i < 0 ) {\n\t\tout = ( -i ).toString( base );\n\t\tif ( token.precision ) {\n\t\t\tout = zeroPad( out, token.precision, token.padRight );\n\t\t}\n\t\tout = '-' + out;\n\t} else {\n\t\tout = i.toString( base );\n\t\tif ( !i && !token.precision ) {\n\t\t\tout = '';\n\t\t} else if ( token.precision ) {\n\t\t\tout = zeroPad( out, token.precision, token.padRight );\n\t\t}\n\t\tif ( token.sign ) {\n\t\t\tout = token.sign + out;\n\t\t}\n\t}\n\tif ( base === 16 ) {\n\t\tif ( token.alternate ) {\n\t\t\tout = '0x' + out;\n\t\t}\n\t\tout = ( token.specifier === uppercase.call( token.specifier ) ) ?\n\t\t\tuppercase.call( out ) :\n\t\t\tlowercase.call( out );\n\t}\n\tif ( base === 8 ) {\n\t\tif ( token.alternate && out.charAt( 0 ) !== '0' ) {\n\t\t\tout = '0' + out;\n\t\t}\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default formatInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isNumber from './is_number.js';\n\n// NOTE: for the following, we explicitly avoid using stdlib packages in this particular package in order to avoid circular dependencies.\nvar abs = Math.abs; // eslint-disable-line stdlib/no-builtin-math\nvar lowercase = String.prototype.toLowerCase;\nvar uppercase = String.prototype.toUpperCase;\nvar replace = String.prototype.replace;\n\n\n// VARIABLES //\n\nvar RE_EXP_POS_DIGITS = /e\\+(\\d)$/;\nvar RE_EXP_NEG_DIGITS = /e-(\\d)$/;\nvar RE_ONLY_DIGITS = /^(\\d+)$/;\nvar RE_DIGITS_BEFORE_EXP = /^(\\d+)e/;\nvar RE_TRAILING_PERIOD_ZERO = /\\.0$/;\nvar RE_PERIOD_ZERO_EXP = /\\.0*e/;\nvar RE_ZERO_BEFORE_EXP = /(\\..*[^0])0*e/;\n\n\n// MAIN //\n\n/**\n* Formats a token object argument as a floating-point number.\n*\n* @private\n* @param {Object} token - token object\n* @throws {Error} must provide a valid floating-point number\n* @returns {string} formatted token argument\n*/\nfunction formatDouble( token ) {\n\tvar digits;\n\tvar out;\n\tvar f = parseFloat( token.arg );\n\tif ( !isFinite( f ) ) { // NOTE: We use the global `isFinite` function here instead of `@stdlib/math/base/assert/is-finite` in order to avoid circular dependencies.\n\t\tif ( !isNumber( token.arg ) ) {\n\t\t\tthrow new Error( 'invalid floating-point number. Value: ' + out );\n\t\t}\n\t\t// Case: NaN, Infinity, or -Infinity\n\t\tf = token.arg;\n\t}\n\tswitch ( token.specifier ) {\n\tcase 'e':\n\tcase 'E':\n\t\tout = f.toExponential( token.precision );\n\t\tbreak;\n\tcase 'f':\n\tcase 'F':\n\t\tout = f.toFixed( token.precision );\n\t\tbreak;\n\tcase 'g':\n\tcase 'G':\n\t\tif ( abs( f ) < 0.0001 ) {\n\t\t\tdigits = token.precision;\n\t\t\tif ( digits > 0 ) {\n\t\t\t\tdigits -= 1;\n\t\t\t}\n\t\t\tout = f.toExponential( digits );\n\t\t} else {\n\t\t\tout = f.toPrecision( token.precision );\n\t\t}\n\t\tif ( !token.alternate ) {\n\t\t\tout = replace.call( out, RE_ZERO_BEFORE_EXP, '$1e' );\n\t\t\tout = replace.call( out, RE_PERIOD_ZERO_EXP, 'e');\n\t\t\tout = replace.call( out, RE_TRAILING_PERIOD_ZERO, '' );\n\t\t}\n\t\tbreak;\n\tdefault:\n\t\tthrow new Error( 'invalid double notation. Value: ' + token.specifier );\n\t}\n\tout = replace.call( out, RE_EXP_POS_DIGITS, 'e+0$1' );\n\tout = replace.call( out, RE_EXP_NEG_DIGITS, 'e-0$1' );\n\tif ( token.alternate ) {\n\t\tout = replace.call( out, RE_ONLY_DIGITS, '$1.' );\n\t\tout = replace.call( out, RE_DIGITS_BEFORE_EXP, '$1.e' );\n\t}\n\tif ( f >= 0 && token.sign ) {\n\t\tout = token.sign + out;\n\t}\n\tout = ( token.specifier === uppercase.call( token.specifier ) ) ?\n\t\tuppercase.call( out ) :\n\t\tlowercase.call( out );\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default formatDouble;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// FUNCTIONS //\n\n/**\n* Returns `n` spaces.\n*\n* @private\n* @param {number} n - number of spaces\n* @returns {string} string of spaces\n*/\nfunction spaces( n ) {\n\tvar out = '';\n\tvar i;\n\tfor ( i = 0; i < n; i++ ) {\n\t\tout += ' ';\n\t}\n\treturn out;\n}\n\n\n// MAIN //\n\n/**\n* Pads a token with spaces to the specified width.\n*\n* @private\n* @param {string} str - token argument\n* @param {number} width - token width\n* @param {boolean} [right=false] - boolean indicating whether to pad to the right\n* @returns {string} padded token argument\n*/\nfunction spacePad( str, width, right ) {\n\tvar pad = width - str.length;\n\tif ( pad < 0 ) {\n\t\treturn str;\n\t}\n\tstr = ( right ) ?\n\t\tstr + spaces( pad ) :\n\t\tspaces( pad ) + str;\n\treturn str;\n}\n\n\n// EXPORTS //\n\nexport default spacePad;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport formatInteger from './format_integer.js';\nimport isString from './is_string.js';\nimport formatDouble from './format_double.js';\nimport spacePad from './space_pad.js';\nimport zeroPad from './zero_pad.js';\n\n\n// VARIABLES //\n\nvar fromCharCode = String.fromCharCode;\nvar isnan = isNaN; // NOTE: We use the global `isNaN` function here instead of `@stdlib/math/base/assert/is-nan` to avoid circular dependencies.\nvar isArray = Array.isArray; // NOTE: We use the global `Array.isArray` function here instead of `@stdlib/assert/is-array` to avoid circular dependencies.\n\n\n// FUNCTIONS //\n\n/**\n* Initializes token object with properties of supplied format identifier object or default values if not present.\n*\n* @private\n* @param {Object} token - format identifier object\n* @returns {Object} token object\n*/\nfunction initialize( token ) {\n\tvar out = {};\n\tout.specifier = token.specifier;\n\tout.precision = ( token.precision === void 0 ) ? 1 : token.precision;\n\tout.width = token.width;\n\tout.flags = token.flags || '';\n\tout.mapping = token.mapping;\n\treturn out;\n}\n\n\n// MAIN //\n\n/**\n* Generates string from a token array by interpolating values.\n*\n* @param {Array} tokens - string parts and format identifier objects\n* @param {Array} ...args - variable values\n* @throws {TypeError} first argument must be an array\n* @throws {Error} invalid flags\n* @returns {string} formatted string\n*\n* @example\n* var tokens = [ 'beep ', { 'specifier': 's' } ];\n* var out = formatInterpolate( tokens, 'boop' );\n* // returns 'beep boop'\n*/\nfunction formatInterpolate( tokens ) {\n\tvar hasPeriod;\n\tvar flags;\n\tvar token;\n\tvar flag;\n\tvar num;\n\tvar out;\n\tvar pos;\n\tvar i;\n\tvar j;\n\n\tif ( !isArray( tokens ) ) {\n\t\tthrow new TypeError( 'invalid argument. First argument must be an array. Value: `' + tokens + '`.' );\n\t}\n\tout = '';\n\tpos = 1;\n\tfor ( i = 0; i < tokens.length; i++ ) {\n\t\ttoken = tokens[ i ];\n\t\tif ( isString( token ) ) {\n\t\t\tout += token;\n\t\t} else {\n\t\t\thasPeriod = token.precision !== void 0;\n\t\t\ttoken = initialize( token );\n\t\t\tif ( !token.specifier ) {\n\t\t\t\tthrow new TypeError( 'invalid argument. Token is missing `specifier` property. Index: `'+ i +'`. Value: `' + token + '`.' );\n\t\t\t}\n\t\t\tif ( token.mapping ) {\n\t\t\t\tpos = token.mapping;\n\t\t\t}\n\t\t\tflags = token.flags;\n\t\t\tfor ( j = 0; j < flags.length; j++ ) {\n\t\t\t\tflag = flags.charAt( j );\n\t\t\t\tswitch ( flag ) {\n\t\t\t\tcase ' ':\n\t\t\t\t\ttoken.sign = ' ';\n\t\t\t\t\tbreak;\n\t\t\t\tcase '+':\n\t\t\t\t\ttoken.sign = '+';\n\t\t\t\t\tbreak;\n\t\t\t\tcase '-':\n\t\t\t\t\ttoken.padRight = true;\n\t\t\t\t\ttoken.padZeros = false;\n\t\t\t\t\tbreak;\n\t\t\t\tcase '0':\n\t\t\t\t\ttoken.padZeros = flags.indexOf( '-' ) < 0; // NOTE: We use built-in `Array.prototype.indexOf` here instead of `@stdlib/assert/contains` in order to avoid circular dependencies.\n\t\t\t\t\tbreak;\n\t\t\t\tcase '#':\n\t\t\t\t\ttoken.alternate = true;\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tthrow new Error( 'invalid flag: ' + flag );\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( token.width === '*' ) {\n\t\t\t\ttoken.width = parseInt( arguments[ pos ], 10 );\n\t\t\t\tpos += 1;\n\t\t\t\tif ( isnan( token.width ) ) {\n\t\t\t\t\tthrow new TypeError( 'the argument for * width at position ' + pos + ' is not a number. Value: `' + token.width + '`.' );\n\t\t\t\t}\n\t\t\t\tif ( token.width < 0 ) {\n\t\t\t\t\ttoken.padRight = true;\n\t\t\t\t\ttoken.width = -token.width;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( hasPeriod ) {\n\t\t\t\tif ( token.precision === '*' ) {\n\t\t\t\t\ttoken.precision = parseInt( arguments[ pos ], 10 );\n\t\t\t\t\tpos += 1;\n\t\t\t\t\tif ( isnan( token.precision ) ) {\n\t\t\t\t\t\tthrow new TypeError( 'the argument for * precision at position ' + pos + ' is not a number. Value: `' + token.precision + '`.' );\n\t\t\t\t\t}\n\t\t\t\t\tif ( token.precision < 0 ) {\n\t\t\t\t\t\ttoken.precision = 1;\n\t\t\t\t\t\thasPeriod = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\ttoken.arg = arguments[ pos ];\n\t\t\tswitch ( token.specifier ) {\n\t\t\tcase 'b':\n\t\t\tcase 'o':\n\t\t\tcase 'x':\n\t\t\tcase 'X':\n\t\t\tcase 'd':\n\t\t\tcase 'i':\n\t\t\tcase 'u':\n\t\t\t\t// Case: %b (binary), %o (octal), %x, %X (hexadecimal), %d, %i (decimal), %u (unsigned decimal)\n\t\t\t\tif ( hasPeriod ) {\n\t\t\t\t\ttoken.padZeros = false;\n\t\t\t\t}\n\t\t\t\ttoken.arg = formatInteger( token );\n\t\t\t\tbreak;\n\t\t\tcase 's':\n\t\t\t\t// Case: %s (string)\n\t\t\t\ttoken.maxWidth = ( hasPeriod ) ? token.precision : -1;\n\t\t\t\tbreak;\n\t\t\tcase 'c':\n\t\t\t\t// Case: %c (character)\n\t\t\t\tif ( !isnan( token.arg ) ) {\n\t\t\t\t\tnum = parseInt( token.arg, 10 );\n\t\t\t\t\tif ( num < 0 || num > 127 ) {\n\t\t\t\t\t\tthrow new Error( 'invalid character code. Value: ' + token.arg );\n\t\t\t\t\t}\n\t\t\t\t\ttoken.arg = ( isnan( num ) ) ?\n\t\t\t\t\t\tString( token.arg ) :\n\t\t\t\t\t\tfromCharCode( num );\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'e':\n\t\t\tcase 'E':\n\t\t\tcase 'f':\n\t\t\tcase 'F':\n\t\t\tcase 'g':\n\t\t\tcase 'G':\n\t\t\t\t// Case: %e, %E (scientific notation), %f, %F (decimal floating point), %g, %G (uses the shorter of %e/E or %f/F)\n\t\t\t\tif ( !hasPeriod ) {\n\t\t\t\t\ttoken.precision = 6;\n\t\t\t\t}\n\t\t\t\ttoken.arg = formatDouble( token );\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tthrow new Error( 'invalid specifier: ' + token.specifier );\n\t\t\t}\n\t\t\t// Fit argument into field width...\n\t\t\tif ( token.maxWidth >= 0 && token.arg.length > token.maxWidth ) {\n\t\t\t\ttoken.arg = token.arg.substring( 0, token.maxWidth );\n\t\t\t}\n\t\t\tif ( token.padZeros ) {\n\t\t\t\ttoken.arg = zeroPad( token.arg, token.width || token.precision, token.padRight ); // eslint-disable-line max-len\n\t\t\t} else if ( token.width ) {\n\t\t\t\ttoken.arg = spacePad( token.arg, token.width, token.padRight );\n\t\t\t}\n\t\t\tout += token.arg || '';\n\t\t\tpos += 1;\n\t\t}\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default formatInterpolate;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Tests if a value is a string primitive.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a string primitive\n*\n* @example\n* var bool = isString( 'beep' );\n* // returns true\n*\n* @example\n* var bool = isString( new String( 'beep' ) );\n* // returns false\n*/\nfunction isString( value ) {\n\treturn ( typeof value === 'string' ); // NOTE: we inline the `isString.isPrimitive` function from `@stdlib/assert/is-string` in order to avoid circular dependencies.\n}\n\n\n// EXPORTS //\n\nexport default isString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// VARIABLES //\n\nvar RE = /%(?:([1-9]\\d*)\\$)?([0 +\\-#]*)(\\*|\\d+)?(?:(\\.)(\\*|\\d+)?)?[hlL]?([%A-Za-z])/g;\n\n\n// FUNCTIONS //\n\n/**\n* Parses a delimiter.\n*\n* @private\n* @param {Array} match - regular expression match\n* @returns {Object} delimiter token object\n*/\nfunction parse( match ) {\n\tvar token = {\n\t\t'mapping': ( match[ 1 ] ) ? parseInt( match[ 1 ], 10 ) : void 0,\n\t\t'flags': match[ 2 ],\n\t\t'width': match[ 3 ],\n\t\t'precision': match[ 5 ],\n\t\t'specifier': match[ 6 ]\n\t};\n\tif ( match[ 4 ] === '.' && match[ 5 ] === void 0 ) {\n\t\ttoken.precision = '1';\n\t}\n\treturn token;\n}\n\n\n// MAIN //\n\n/**\n* Tokenizes a string into an array of string parts and format identifier objects.\n*\n* @param {string} str - input string\n* @returns {Array} tokens\n*\n* @example\n* var tokens = formatTokenize( 'Hello %s!' );\n* // returns [ 'Hello ', {...}, '!' ]\n*/\nfunction formatTokenize( str ) {\n\tvar content;\n\tvar tokens;\n\tvar match;\n\tvar prev;\n\n\ttokens = [];\n\tprev = 0;\n\tmatch = RE.exec( str );\n\twhile ( match ) {\n\t\tcontent = str.slice( prev, RE.lastIndex - match[ 0 ].length );\n\t\tif ( content.length ) {\n\t\t\ttokens.push( content );\n\t\t}\n\t\ttokens.push( parse( match ) );\n\t\tprev = RE.lastIndex;\n\t\tmatch = RE.exec( str );\n\t}\n\tcontent = str.slice( prev );\n\tif ( content.length ) {\n\t\ttokens.push( content );\n\t}\n\treturn tokens;\n}\n\n\n// EXPORTS //\n\nexport default formatTokenize;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport interpolate from '@stdlib/string-base-format-interpolate';\nimport tokenize from '@stdlib/string-base-format-tokenize';\nimport isString from './is_string.js';\n\n\n// MAIN //\n\n/**\n* Inserts supplied variable values into a format string.\n*\n* @param {string} str - input string\n* @param {Array} ...args - variable values\n* @throws {TypeError} first argument must be a string\n* @throws {Error} invalid flags\n* @returns {string} formatted string\n*\n* @example\n* var str = format( 'Hello %s!', 'world' );\n* // returns 'Hello world!'\n*\n* @example\n* var str = format( 'Pi: ~%.2f', 3.141592653589793 );\n* // returns 'Pi: ~3.14'\n*/\nfunction format( str ) {\n\tvar args;\n\tvar i;\n\n\tif ( !isString( str ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a string. Value: `%s`.', str ) );\n\t}\n\targs = [ tokenize( str ) ];\n\tfor ( i = 1; i < arguments.length; i++ ) {\n\t\targs.push( arguments[ i ] );\n\t}\n\treturn interpolate.apply( null, args );\n}\n\n\n// EXPORTS //\n\nexport default format;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Tests if a value is a string primitive.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a string primitive\n*\n* @example\n* var bool = isString( 'beep' );\n* // returns true\n*\n* @example\n* var bool = isString( new String( 'beep' ) );\n* // returns false\n*/\nfunction isString( value ) {\n\treturn ( typeof value === 'string' ); // NOTE: we inline the `isString.isPrimitive` function from `@stdlib/assert/is-string` in order to avoid circular dependencies.\n}\n\n\n// EXPORTS //\n\nexport default isString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable no-underscore-dangle, no-proto */\n\n'use strict';\n\n// MODULES //\n\nimport format from '@stdlib/string-format';\n\n\n// VARIABLES //\n\nvar objectProtoype = Object.prototype;\nvar toStr = objectProtoype.toString;\nvar defineGetter = objectProtoype.__defineGetter__;\nvar defineSetter = objectProtoype.__defineSetter__;\nvar lookupGetter = objectProtoype.__lookupGetter__;\nvar lookupSetter = objectProtoype.__lookupSetter__;\n\n\n// MAIN //\n\n/**\n* Defines (or modifies) an object property.\n*\n* ## Notes\n*\n* - Property descriptors come in two flavors: **data descriptors** and **accessor descriptors**. A data descriptor is a property that has a value, which may or may not be writable. An accessor descriptor is a property described by a getter-setter function pair. A descriptor must be one of these two flavors and cannot be both.\n*\n* @param {Object} obj - object on which to define the property\n* @param {string} prop - property name\n* @param {Object} descriptor - property descriptor\n* @param {boolean} [descriptor.configurable=false] - boolean indicating if property descriptor can be changed and if the property can be deleted from the provided object\n* @param {boolean} [descriptor.enumerable=false] - boolean indicating if the property shows up when enumerating object properties\n* @param {boolean} [descriptor.writable=false] - boolean indicating if the value associated with the property can be changed with an assignment operator\n* @param {*} [descriptor.value] - property value\n* @param {(Function|void)} [descriptor.get=undefined] - function which serves as a getter for the property, or, if no getter, undefined. When the property is accessed, a getter function is called without arguments and with the `this` context set to the object through which the property is accessed (which may not be the object on which the property is defined due to inheritance). The return value will be used as the property value.\n* @param {(Function|void)} [descriptor.set=undefined] - function which serves as a setter for the property, or, if no setter, undefined. When assigning a property value, a setter function is called with one argument (the value being assigned to the property) and with the `this` context set to the object through which the property is assigned.\n* @throws {TypeError} first argument must be an object\n* @throws {TypeError} third argument must be an object\n* @throws {Error} property descriptor cannot have both a value and a setter and/or getter\n* @returns {Object} object with added property\n*\n* @example\n* var obj = {};\n*\n* defineProperty( obj, 'foo', {\n* 'value': 'bar'\n* });\n*\n* var str = obj.foo;\n* // returns 'bar'\n*/\nfunction defineProperty( obj, prop, descriptor ) {\n\tvar prototype;\n\tvar hasValue;\n\tvar hasGet;\n\tvar hasSet;\n\n\tif ( typeof obj !== 'object' || obj === null || toStr.call( obj ) === '[object Array]' ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be an object. Value: `%s`.', obj ) );\n\t}\n\tif ( typeof descriptor !== 'object' || descriptor === null || toStr.call( descriptor ) === '[object Array]' ) {\n\t\tthrow new TypeError( format( 'invalid argument. Property descriptor must be an object. Value: `%s`.', descriptor ) );\n\t}\n\thasValue = ( 'value' in descriptor );\n\tif ( hasValue ) {\n\t\tif (\n\t\t\tlookupGetter.call( obj, prop ) ||\n\t\t\tlookupSetter.call( obj, prop )\n\t\t) {\n\t\t\t// Override `__proto__` to avoid touching inherited accessors:\n\t\t\tprototype = obj.__proto__;\n\t\t\tobj.__proto__ = objectProtoype;\n\n\t\t\t// Delete property as existing getters/setters prevent assigning value to specified property:\n\t\t\tdelete obj[ prop ];\n\t\t\tobj[ prop ] = descriptor.value;\n\n\t\t\t// Restore original prototype:\n\t\t\tobj.__proto__ = prototype;\n\t\t} else {\n\t\t\tobj[ prop ] = descriptor.value;\n\t\t}\n\t}\n\thasGet = ( 'get' in descriptor );\n\thasSet = ( 'set' in descriptor );\n\n\tif ( hasValue && ( hasGet || hasSet ) ) {\n\t\tthrow new Error( 'invalid argument. Cannot specify one or more accessors and a value or writable attribute in the property descriptor.' );\n\t}\n\n\tif ( hasGet && defineGetter ) {\n\t\tdefineGetter.call( obj, prop, descriptor.get );\n\t}\n\tif ( hasSet && defineSetter ) {\n\t\tdefineSetter.call( obj, prop, descriptor.set );\n\t}\n\treturn obj;\n}\n\n\n// EXPORTS //\n\nexport default defineProperty;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Define (or modify) an object property.\n*\n* @module @stdlib/utils-define-property\n*\n* @example\n* import defineProperty from '@stdlib/utils-define-property';\n*\n* var obj = {};\n* defineProperty( obj, 'foo', {\n* 'value': 'bar',\n* 'writable': false,\n* 'configurable': false,\n* 'enumerable': false\n* });\n* obj.foo = 'boop'; // => throws\n*/\n\n// MODULES //\n\nimport hasDefinePropertySupport from './has_define_property_support.js';\nimport builtin from './builtin.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar defineProperty;\nif ( hasDefinePropertySupport() ) {\n\tdefineProperty = builtin;\n} else {\n\tdefineProperty = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default defineProperty;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport defineProperty from './define_property.js';\n\n\n// MAIN //\n\n/**\n* Tests for `Object.defineProperty` support.\n*\n* @private\n* @returns {boolean} boolean indicating if an environment has `Object.defineProperty` support\n*\n* @example\n* var bool = hasDefinePropertySupport();\n* // returns \n*/\nfunction hasDefinePropertySupport() {\n\t// Test basic support...\n\ttry {\n\t\tdefineProperty( {}, 'x', {} );\n\t\treturn true;\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\treturn false;\n\t}\n}\n\n\n// EXPORTS //\n\nexport default hasDefinePropertySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport defineProperty from '@stdlib/utils-define-property';\n\n\n// MAIN //\n\n/**\n* Defines a non-enumerable read-only property.\n*\n* @param {Object} obj - object on which to define the property\n* @param {(string|symbol)} prop - property name\n* @param {*} value - value to set\n*\n* @example\n* var obj = {};\n*\n* setNonEnumerableReadOnly( obj, 'foo', 'bar' );\n*\n* try {\n* obj.foo = 'boop';\n* } catch ( err ) {\n* console.error( err.message );\n* }\n*/\nfunction setNonEnumerableReadOnly( obj, prop, value ) {\n\tdefineProperty( obj, prop, {\n\t\t'configurable': false,\n\t\t'enumerable': false,\n\t\t'writable': false,\n\t\t'value': value\n\t});\n}\n\n\n// EXPORTS //\n\nexport default setNonEnumerableReadOnly;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Tests if a value is a number primitive.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number primitive\n*\n* @example\n* var bool = isNumber( 3.14 );\n* // returns true\n*\n* @example\n* var bool = isNumber( NaN );\n* // returns true\n*\n* @example\n* var bool = isNumber( new Number( 3.14 ) );\n* // returns false\n*/\nfunction isNumber( value ) {\n\treturn ( typeof value === 'number' );\n}\n\n\n// EXPORTS //\n\nexport default isNumber;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport hasSymbols from '@stdlib/assert-has-symbol-support';\n\n\n// VARIABLES //\n\nvar FLG = hasSymbols();\n\n\n// MAIN //\n\n/**\n* Tests for native `toStringTag` support.\n*\n* @returns {boolean} boolean indicating if an environment has `toStringTag` support\n*\n* @example\n* var bool = hasToStringTagSupport();\n* // returns \n*/\nfunction hasToStringTagSupport() {\n\treturn ( FLG && typeof Symbol.toStringTag === 'symbol' );\n}\n\n\n// EXPORTS //\n\nexport default hasToStringTagSupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Tests for native `Symbol` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Symbol` support\n*\n* @example\n* var bool = hasSymbolSupport();\n* // returns \n*/\nfunction hasSymbolSupport() {\n\treturn (\n\t\ttypeof Symbol === 'function' &&\n\t\ttypeof Symbol( 'foo' ) === 'symbol'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default hasSymbolSupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar toStr = Object.prototype.toString;\n\n\n// EXPORTS //\n\nexport default toStr;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// FUNCTIONS //\n\nvar has = Object.prototype.hasOwnProperty;\n\n\n// MAIN //\n\n/**\n* Tests if an object has a specified property.\n*\n* @param {*} value - value to test\n* @param {*} property - property to test\n* @returns {boolean} boolean indicating if an object has a specified property\n*\n* @example\n* var beep = {\n* 'boop': true\n* };\n*\n* var bool = hasOwnProp( beep, 'boop' );\n* // returns true\n*\n* @example\n* var beep = {\n* 'boop': true\n* };\n*\n* var bool = hasOwnProp( beep, 'bap' );\n* // returns false\n*/\nfunction hasOwnProp( value, property ) {\n\tif (\n\t\tvalue === void 0 ||\n\t\tvalue === null\n\t) {\n\t\treturn false;\n\t}\n\treturn has.call( value, property );\n}\n\n\n// EXPORTS //\n\nexport default hasOwnProp;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar Sym = ( typeof Symbol === 'function' ) ? Symbol : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default Sym;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport Symbol from '@stdlib/symbol-ctor';\n\n\n// MAIN //\n\nvar toStrTag = ( typeof Symbol === 'function' ) ? Symbol.toStringTag : '';\n\n\n// EXPORTS //\n\nexport default toStrTag;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Return a string value indicating a specification defined classification of an object.\n*\n* @module @stdlib/utils-native-class\n*\n* @example\n* import nativeClass from '@stdlib/utils-native-class';\n*\n* var str = nativeClass( 'a' );\n* // returns '[object String]'\n*\n* str = nativeClass( 5 );\n* // returns '[object Number]'\n*\n* function Beep() {\n* return this;\n* }\n* str = nativeClass( new Beep() );\n* // returns '[object Object]'\n*/\n\n// MODULES //\n\nimport hasToStringTag from '@stdlib/assert-has-tostringtag-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar main;\nif ( hasToStringTag() ) {\n\tmain = polyfill;\n} else {\n\tmain = builtin;\n}\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport hasOwnProp from '@stdlib/assert-has-own-property';\nimport toStringTag from './tostringtag.js';\nimport toStr from './tostring.js';\n\n\n// MAIN //\n\n/**\n* Returns a string value indicating a specification defined classification of an object in environments supporting `Symbol.toStringTag`.\n*\n* @param {*} v - input value\n* @returns {string} string value indicating a specification defined classification of the input value\n*\n* @example\n* var str = nativeClass( 'a' );\n* // returns '[object String]'\n*\n* @example\n* var str = nativeClass( 5 );\n* // returns '[object Number]'\n*\n* @example\n* function Beep() {\n* return this;\n* }\n* var str = nativeClass( new Beep() );\n* // returns '[object Object]'\n*/\nfunction nativeClass( v ) {\n\tvar isOwn;\n\tvar tag;\n\tvar out;\n\n\tif ( v === null || v === void 0 ) {\n\t\treturn toStr.call( v );\n\t}\n\ttag = v[ toStringTag ];\n\tisOwn = hasOwnProp( v, toStringTag );\n\n\t// Attempt to override the `toStringTag` property. For built-ins having a `Symbol.toStringTag` property (e.g., `JSON`, `Math`, etc), the `Symbol.toStringTag` property is read-only (e.g., , so we need to wrap in a `try/catch`.\n\ttry {\n\t\tv[ toStringTag ] = void 0;\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\treturn toStr.call( v );\n\t}\n\tout = toStr.call( v );\n\n\tif ( isOwn ) {\n\t\tv[ toStringTag ] = tag;\n\t} else {\n\t\tdelete v[ toStringTag ];\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default nativeClass;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport toStr from './tostring.js';\n\n\n// MAIN //\n\n/**\n* Returns a string value indicating a specification defined classification (via the internal property `[[Class]]`) of an object.\n*\n* @param {*} v - input value\n* @returns {string} string value indicating a specification defined classification of the input value\n*\n* @example\n* var str = nativeClass( 'a' );\n* // returns '[object String]'\n*\n* @example\n* var str = nativeClass( 5 );\n* // returns '[object Number]'\n*\n* @example\n* function Beep() {\n* return this;\n* }\n* var str = nativeClass( new Beep() );\n* // returns '[object Object]'\n*/\nfunction nativeClass( v ) {\n\treturn toStr.call( v );\n}\n\n\n// EXPORTS //\n\nexport default nativeClass;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// EXPORTS //\n\nexport default Number; // eslint-disable-line stdlib/require-globals\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport Number from '@stdlib/number-ctor';\n\n\n// MAIN //\n\n// eslint-disable-next-line stdlib/no-redeclare\nvar toString = Number.prototype.toString; // non-generic\n\n\n// EXPORTS //\n\nexport default toString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport hasToStringTag from '@stdlib/assert-has-tostringtag-support';\nimport nativeClass from '@stdlib/utils-native-class';\nimport Number from '@stdlib/number-ctor';\nimport test from './try2serialize.js';\n\n\n// VARIABLES //\n\nvar FLG = hasToStringTag();\n\n\n// MAIN //\n\n/**\n* Tests if a value is a number object.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number object\n*\n* @example\n* var bool = isNumber( 3.14 );\n* // returns false\n*\n* @example\n* var bool = isNumber( new Number( 3.14 ) );\n* // returns true\n*/\nfunction isNumber( value ) {\n\tif ( typeof value === 'object' ) {\n\t\tif ( value instanceof Number ) {\n\t\t\treturn true;\n\t\t}\n\t\tif ( FLG ) {\n\t\t\treturn test( value );\n\t\t}\n\t\treturn ( nativeClass( value ) === '[object Number]' );\n\t}\n\treturn false;\n}\n\n\n// EXPORTS //\n\nexport default isNumber;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport toString from './tostring.js'; // eslint-disable-line stdlib/no-redeclare\n\n\n// MAIN //\n\n/**\n* Attempts to serialize a value to a string.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value can be serialized\n*/\nfunction test( value ) {\n\ttry {\n\t\ttoString.call( value );\n\t\treturn true;\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\treturn false;\n\t}\n}\n\n\n// EXPORTS //\n\nexport default test;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a number.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a number\n*\n* @example\n* var bool = isNumber( 3.14 );\n* // returns true\n*\n* @example\n* var bool = isNumber( new Number( 3.14 ) );\n* // returns true\n*\n* @example\n* var bool = isNumber( NaN );\n* // returns true\n*\n* @example\n* var bool = isNumber( null );\n* // returns false\n*/\nfunction isNumber( value ) {\n\treturn ( isPrimitive( value ) || isObject( value ) );\n}\n\n\n// EXPORTS //\n\nexport default isNumber;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test if a value is a number.\n*\n* @module @stdlib/assert-is-number\n*\n* @example\n* import isNumber from '@stdlib/assert-is-number';\n*\n* var bool = isNumber( 3.14 );\n* // returns true\n*\n* bool = isNumber( new Number( 3.14 ) );\n* // returns true\n*\n* bool = isNumber( NaN );\n* // returns true\n*\n* bool = isNumber( null );\n* // returns false\n*\n* @example\n* import { isPrimitive as isNumber } from '@stdlib/assert-is-number';\n*\n* var bool = isNumber( 3.14 );\n* // returns true\n*\n* bool = isNumber( NaN );\n* // returns true\n*\n* bool = isNumber( new Number( 3.14 ) );\n* // returns false\n*\n* @example\n* import { isObject as isNumber } from '@stdlib/assert-is-number';\n*\n* var bool = isNumber( 3.14 );\n* // returns false\n*\n* bool = isNumber( new Number( 3.14 ) );\n* // returns true\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'isPrimitive', isPrimitive );\nsetReadOnly( main, 'isObject', isObject );\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Double-precision floating-point positive infinity.\n*\n* @module @stdlib/constants-float64-pinf\n* @type {number}\n*\n* @example\n* import FLOAT64_PINF from '@stdlib/constants-float64-pinf';\n* // returns Infinity\n*/\n\n\n// MAIN //\n\n/**\n* Double-precision floating-point positive infinity.\n*\n* ## Notes\n*\n* Double-precision floating-point positive infinity has the bit sequence\n*\n* ```binarystring\n* 0 11111111111 00000000000000000000 00000000000000000000000000000000\n* ```\n*\n* @constant\n* @type {number}\n* @default Number.POSITIVE_INFINITY\n* @see [IEEE 754]{@link https://en.wikipedia.org/wiki/IEEE_754-1985}\n*/\nvar FLOAT64_PINF = Number.POSITIVE_INFINITY; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default FLOAT64_PINF;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Double-precision floating-point negative infinity.\n*\n* @module @stdlib/constants-float64-ninf\n* @type {number}\n*\n* @example\n* import FLOAT64_NINF from '@stdlib/constants-float64-ninf';\n* // returns -Infinity\n*/\n\n// MODULES //\n\nimport Number from '@stdlib/number-ctor';\n\n\n// MAIN //\n\n/**\n* Double-precision floating-point negative infinity.\n*\n* ## Notes\n*\n* Double-precision floating-point negative infinity has the bit sequence\n*\n* ```binarystring\n* 1 11111111111 00000000000000000000 00000000000000000000000000000000\n* ```\n*\n* @constant\n* @type {number}\n* @default Number.NEGATIVE_INFINITY\n* @see [IEEE 754]{@link https://en.wikipedia.org/wiki/IEEE_754-1985}\n*/\nvar FLOAT64_NINF = Number.NEGATIVE_INFINITY;\n\n\n// EXPORTS //\n\nexport default FLOAT64_NINF;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: implementation (?)\n\n/**\n* Rounds a double-precision floating-point number toward negative infinity.\n*\n* @param {number} x - input value\n* @returns {number} rounded value\n*\n* @example\n* var v = floor( -4.2 );\n* // returns -5.0\n*\n* @example\n* var v = floor( 9.99999 );\n* // returns 9.0\n*\n* @example\n* var v = floor( 0.0 );\n* // returns 0.0\n*\n* @example\n* var v = floor( NaN );\n* // returns NaN\n*/\nvar floor = Math.floor; // eslint-disable-line stdlib/no-builtin-math\n\n\n// EXPORTS //\n\nexport default floor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport floor from '@stdlib/math-base-special-floor';\n\n\n// MAIN //\n\n/**\n* Tests if a finite double-precision floating-point number is an integer.\n*\n* @param {number} x - value to test\n* @returns {boolean} boolean indicating whether the value is an integer\n*\n* @example\n* var bool = isInteger( 1.0 );\n* // returns true\n*\n* @example\n* var bool = isInteger( 3.14 );\n* // returns false\n*/\nfunction isInteger( x ) {\n\treturn (floor(x) === x);\n}\n\n\n// EXPORTS //\n\nexport default isInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport PINF from '@stdlib/constants-float64-pinf';\nimport NINF from '@stdlib/constants-float64-ninf';\nimport isInt from '@stdlib/math-base-assert-is-integer';\n\n\n// MAIN //\n\n/**\n* Tests if a number primitive is an integer value.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a number primitive is an integer value\n*/\nfunction isInteger( value ) {\n\treturn (\n\t\tvalue < PINF &&\n\t\tvalue > NINF &&\n\t\tisInt( value )\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isNumber } from '@stdlib/assert-is-number';\nimport isInt from './integer.js';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a number primitive having an integer value.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number primitive having an integer value\n*\n* @example\n* var bool = isInteger( -3.0 );\n* // returns true\n*\n* @example\n* var bool = isInteger( new Number( -3.0 ) );\n* // returns false\n*/\nfunction isInteger( value ) {\n\treturn (\n\t\tisNumber( value ) &&\n\t\tisInt( value )\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isObject as isNumber } from '@stdlib/assert-is-number';\nimport isInt from './integer.js';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a number object having an integer value.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number object having an integer value\n*\n* @example\n* var bool = isInteger( 3.0 );\n* // returns false\n*\n* @example\n* var bool = isInteger( new Number( 3.0 ) );\n* // returns true\n*/\nfunction isInteger( value ) {\n\treturn (\n\t\tisNumber( value ) &&\n\t\tisInt( value.valueOf() )\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\n/**\n* Tests if a value is an integer.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an integer\n*\n* @example\n* var bool = isInteger( 5.0 );\n* // returns true\n*\n* @example\n* var bool = isInteger( new Number( 5.0 ) );\n* // returns true\n*\n* @example\n* var bool = isInteger( -3.14 );\n* // returns false\n*\n* @example\n* var bool = isInteger( null );\n* // returns false\n*/\nfunction isInteger( value ) {\n\treturn ( isPrimitive( value ) || isObject( value ) );\n}\n\n\n// EXPORTS //\n\nexport default isInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isInteger } from '@stdlib/assert-is-integer';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a number primitive having a nonnegative integer value.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number primitive having a nonnegative integer value\n*\n* @example\n* var bool = isNonNegativeInteger( 3.0 );\n* // returns true\n*\n* @example\n* var bool = isNonNegativeInteger( new Number( 3.0 ) );\n* // returns false\n*/\nfunction isNonNegativeInteger( value ) {\n\treturn (\n\t\tisInteger( value ) &&\n\t\tvalue >= 0\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isNonNegativeInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isObject as isInteger } from '@stdlib/assert-is-integer';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a number object having a nonnegative integer value.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number object having a nonnegative integer value\n*\n* @example\n* var bool = isNonNegativeInteger( 3.0 );\n* // returns false\n*\n* @example\n* var bool = isNonNegativeInteger( new Number( 3.0 ) );\n* // returns true\n*/\nfunction isNonNegativeInteger( value ) {\n\treturn (\n\t\tisInteger( value ) &&\n\t\tvalue.valueOf() >= 0\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isNonNegativeInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a nonnegative integer.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a nonnegative integer\n*\n* @example\n* var bool = isNonNegativeInteger( 5.0 );\n* // returns true\n*\n* @example\n* var bool = isNonNegativeInteger( new Number( 5.0 ) );\n* // returns true\n*\n* @example\n* var bool = isNonNegativeInteger( -5.0 );\n* // returns false\n*\n* @example\n* var bool = isNonNegativeInteger( 3.14 );\n* // returns false\n*\n* @example\n* var bool = isNonNegativeInteger( null );\n* // returns false\n*/\nfunction isNonNegativeInteger( value ) {\n\treturn ( isPrimitive( value ) || isObject( value ) );\n}\n\n\n// EXPORTS //\n\nexport default isNonNegativeInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test if a value is an integer.\n*\n* @module @stdlib/assert-is-integer\n*\n* @example\n* import isInteger from '@stdlib/assert-is-integer';\n*\n* var bool = isInteger( 5.0 );\n* // returns true\n*\n* bool = isInteger( new Number( 5.0 ) );\n* // returns true\n*\n* bool = isInteger( -3.14 );\n* // returns false\n*\n* bool = isInteger( null );\n* // returns false\n*\n* @example\n* // Use interface to check for integer primitives...\n* import { isPrimitive as isInteger } from '@stdlib/assert-is-integer';\n*\n* var bool = isInteger( -3.0 );\n* // returns true\n*\n* bool = isInteger( new Number( -3.0 ) );\n* // returns false\n*\n* @example\n* // Use interface to check for integer objects...\n* import { isObject as isInteger } from '@stdlib/assert-is-integer';\n*\n* var bool = isInteger( 3.0 );\n* // returns false\n*\n* bool = isInteger( new Number( 3.0 ) );\n* // returns true\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'isPrimitive', isPrimitive );\nsetReadOnly( main, 'isObject', isObject );\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test if a value is a nonnegative integer.\n*\n* @module @stdlib/assert-is-nonnegative-integer\n*\n* @example\n* import isNonNegativeInteger from '@stdlib/assert-is-nonnegative-integer';\n*\n* var bool = isNonNegativeInteger( 5.0 );\n* // returns true\n*\n* bool = isNonNegativeInteger( new Number( 5.0 ) );\n* // returns true\n*\n* bool = isNonNegativeInteger( -5.0 );\n* // returns false\n*\n* bool = isNonNegativeInteger( 3.14 );\n* // returns false\n*\n* bool = isNonNegativeInteger( null );\n* // returns false\n*\n* @example\n* import { isPrimitive as isNonNegativeInteger } from '@stdlib/assert-is-nonnegative-integer';\n*\n* var bool = isNonNegativeInteger( 3.0 );\n* // returns true\n*\n* bool = isNonNegativeInteger( new Number( 3.0 ) );\n* // returns false\n*\n* @example\n* import { isObject as isNonNegativeInteger } from '@stdlib/assert-is-nonnegative-integer';\n*\n* var bool = isNonNegativeInteger( 3.0 );\n* // returns false\n*\n* bool = isNonNegativeInteger( new Number( 3.0 ) );\n* // returns true\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'isPrimitive', isPrimitive );\nsetReadOnly( main, 'isObject', isObject );\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasFloat64Array = ( typeof Float64Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Float64Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a Float64Array\n*\n* @example\n* var bool = isFloat64Array( new Float64Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isFloat64Array( [] );\n* // returns false\n*/\nfunction isFloat64Array( value ) {\n\treturn (\n\t\t( hasFloat64Array && value instanceof Float64Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Float64Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isFloat64Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Float64Array === 'function' ) ? Float64Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Float64Array === 'function' ) ? Float64Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of double-precision floating-point numbers in the platform byte order.\n*\n* @module @stdlib/array-float64\n*\n* @example\n* import ctor from '@stdlib/array-float64';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasFloat64ArraySupport from '@stdlib/assert-has-float64array-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasFloat64ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isFloat64Array from '@stdlib/assert-is-float64array';\nimport GlobalFloat64Array from './float64array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Float64Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Float64Array` support\n*\n* @example\n* var bool = hasFloat64ArraySupport();\n* // returns \n*/\nfunction hasFloat64ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalFloat64Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = new GlobalFloat64Array( [ 1.0, 3.14, -3.14, NaN ] );\n\t\tbool = (\n\t\t\tisFloat64Array( arr ) &&\n\t\t\tarr[ 0 ] === 1.0 &&\n\t\t\tarr[ 1 ] === 3.14 &&\n\t\t\tarr[ 2 ] === -3.14 &&\n\t\t\tarr[ 3 ] !== arr[ 3 ]\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasFloat64ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of double-precision floating-point numbers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasFloat32Array = ( typeof Float32Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Float32Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a Float32Array\n*\n* @example\n* var bool = isFloat32Array( new Float32Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isFloat32Array( [] );\n* // returns false\n*/\nfunction isFloat32Array( value ) {\n\treturn (\n\t\t( hasFloat32Array && value instanceof Float32Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Float32Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isFloat32Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Float32Array === 'function' ) ? Float32Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Float32Array === 'function' ) ? Float32Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of single-precision floating-point numbers in the platform byte order.\n*\n* @module @stdlib/array-float32\n*\n* @example\n* import ctor from '@stdlib/array-float32';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasFloat32ArraySupport from '@stdlib/assert-has-float32array-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasFloat32ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isFloat32Array from '@stdlib/assert-is-float32array';\nimport PINF from '@stdlib/constants-float64-pinf';\nimport GlobalFloat32Array from './float32array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Float32Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Float32Array` support\n*\n* @example\n* var bool = hasFloat32ArraySupport();\n* // returns \n*/\nfunction hasFloat32ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalFloat32Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = new GlobalFloat32Array( [ 1.0, 3.14, -3.14, 5.0e40 ] );\n\t\tbool = (\n\t\t\tisFloat32Array( arr ) &&\n\t\t\tarr[ 0 ] === 1.0 &&\n\t\t\tarr[ 1 ] === 3.140000104904175 &&\n\t\t\tarr[ 2 ] === -3.140000104904175 &&\n\t\t\tarr[ 3 ] === PINF\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasFloat32ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of single-precision floating-point numbers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasInt16Array = ( typeof Int16Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is an Int16Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an Int16Array\n*\n* @example\n* var bool = isInt16Array( new Int16Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isInt16Array( [] );\n* // returns false\n*/\nfunction isInt16Array( value ) {\n\treturn (\n\t\t( hasInt16Array && value instanceof Int16Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Int16Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isInt16Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum signed 16-bit integer.\n*\n* @module @stdlib/constants-int16-max\n* @type {integer32}\n*\n* @example\n* import INT16_MAX from '@stdlib/constants-int16-max';\n* // returns 32767\n*/\n\n\n// MAIN //\n\n/**\n* Maximum signed 16-bit integer.\n*\n* ## Notes\n*\n* The number has the value\n*\n* ```tex\n* 2^{15} - 1\n* ```\n*\n* which corresponds to the bit sequence\n*\n* ```binarystring\n* 0111111111111111\n* ```\n*\n* @constant\n* @type {integer32}\n* @default 32767\n*/\nvar INT16_MAX = 32767|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default INT16_MAX;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Int16Array === 'function' ) ? Int16Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Int16Array === 'function' ) ? Int16Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of twos-complement 16-bit signed integers in the platform byte order.\n*\n* @module @stdlib/array-int16\n*\n* @example\n* import ctor from '@stdlib/array-int16';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasInt16ArraySupport from '@stdlib/assert-has-int16array-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasInt16ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isInt16Array from '@stdlib/assert-is-int16array';\nimport INT16_MAX from '@stdlib/constants-int16-max';\nimport INT16_MIN from '@stdlib/constants-int16-min';\nimport GlobalInt16Array from './int16array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Int16Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Int16Array` support\n*\n* @example\n* var bool = hasInt16ArraySupport();\n* // returns \n*/\nfunction hasInt16ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalInt16Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = new GlobalInt16Array( [ 1, 3.14, -3.14, INT16_MAX+1 ] );\n\t\tbool = (\n\t\t\tisInt16Array( arr ) &&\n\t\t\tarr[ 0 ] === 1 &&\n\t\t\tarr[ 1 ] === 3 && // truncation\n\t\t\tarr[ 2 ] === -3 && // truncation\n\t\t\tarr[ 3 ] === INT16_MIN // wrap around\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasInt16ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Minimum signed 16-bit integer.\n*\n* @module @stdlib/constants-int16-min\n* @type {integer32}\n*\n* @example\n* import INT16_MIN from '@stdlib/constants-int16-min';\n* // returns -32768\n*/\n\n\n// MAIN //\n\n/**\n* Minimum signed 16-bit integer.\n*\n* ## Notes\n*\n* The number has the value\n*\n* ```tex\n* -(2^{15})\n* ```\n*\n* which corresponds to the two's complement bit sequence\n*\n* ```binarystring\n* 1000000000000000\n* ```\n*\n* @constant\n* @type {integer32}\n* @default -32768\n*/\nvar INT16_MIN = -32768|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default INT16_MIN;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of twos-complement 16-bit signed integers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasInt32Array = ( typeof Int32Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is an Int32Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an Int32Array\n*\n* @example\n* var bool = isInt32Array( new Int32Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isInt32Array( [] );\n* // returns false\n*/\nfunction isInt32Array( value ) {\n\treturn (\n\t\t( hasInt32Array && value instanceof Int32Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Int32Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isInt32Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum signed 32-bit integer.\n*\n* @module @stdlib/constants-int32-max\n* @type {integer32}\n*\n* @example\n* import INT32_MAX from '@stdlib/constants-int32-max';\n* // returns 2147483647\n*/\n\n\n// MAIN //\n\n/**\n* Maximum signed 32-bit integer.\n*\n* ## Notes\n*\n* The number has the value\n*\n* ```tex\n* 2^{31} - 1\n* ```\n*\n* which corresponds to the bit sequence\n*\n* ```binarystring\n* 01111111111111111111111111111111\n* ```\n*\n* @constant\n* @type {integer32}\n* @default 2147483647\n*/\nvar INT32_MAX = 2147483647|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default INT32_MAX;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Int32Array === 'function' ) ? Int32Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Int32Array === 'function' ) ? Int32Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of twos-complement 32-bit signed integers in the platform byte order.\n*\n* @module @stdlib/array-int32\n*\n* @example\n* import ctor from '@stdlib/array-int32';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasInt32ArraySupport from '@stdlib/assert-has-int32array-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasInt32ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isInt32Array from '@stdlib/assert-is-int32array';\nimport INT32_MAX from '@stdlib/constants-int32-max';\nimport INT32_MIN from '@stdlib/constants-int32-min';\nimport GlobalInt32Array from './int32array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Int32Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Int32Array` support\n*\n* @example\n* var bool = hasInt32ArraySupport();\n* // returns \n*/\nfunction hasInt32ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalInt32Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = new GlobalInt32Array( [ 1, 3.14, -3.14, INT32_MAX+1 ] );\n\t\tbool = (\n\t\t\tisInt32Array( arr ) &&\n\t\t\tarr[ 0 ] === 1 &&\n\t\t\tarr[ 1 ] === 3 && // truncation\n\t\t\tarr[ 2 ] === -3 && // truncation\n\t\t\tarr[ 3 ] === INT32_MIN // wrap around\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasInt32ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Minimum signed 32-bit integer.\n*\n* @module @stdlib/constants-int32-min\n* @type {integer32}\n*\n* @example\n* import INT32_MIN from '@stdlib/constants-int32-min';\n* // returns -2147483648\n*/\n\n\n// MAIN //\n\n/**\n* Minimum signed 32-bit integer.\n*\n* ## Notes\n*\n* The number has the value\n*\n* ```tex\n* -(2^{31})\n* ```\n*\n* which corresponds to the two's complement bit sequence\n*\n* ```binarystring\n* 10000000000000000000000000000000\n* ```\n*\n* @constant\n* @type {integer32}\n* @default -2147483648\n*/\nvar INT32_MIN = -2147483648|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default INT32_MIN;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of twos-complement 32-bit signed integers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasInt8Array = ( typeof Int8Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is an Int8Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an Int8Array\n*\n* @example\n* var bool = isInt8Array( new Int8Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isInt8Array( [] );\n* // returns false\n*/\nfunction isInt8Array( value ) {\n\treturn (\n\t\t( hasInt8Array && value instanceof Int8Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Int8Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isInt8Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum signed 8-bit integer.\n*\n* @module @stdlib/constants-int8-max\n* @type {integer32}\n*\n* @example\n* import INT8_MAX from '@stdlib/constants-int8-max';\n* // returns 127\n*/\n\n\n// MAIN //\n\n/**\n* Maximum signed 8-bit integer.\n*\n* ## Notes\n*\n* The number is given by\n*\n* ```tex\n* 2^{7} - 1\n* ```\n*\n* which corresponds to the bit sequence\n*\n* ```binarystring\n* 01111111\n* ```\n*\n* @constant\n* @type {integer32}\n* @default 127\n*/\nvar INT8_MAX = 127|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default INT8_MAX;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Int8Array === 'function' ) ? Int8Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Int8Array === 'function' ) ? Int8Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of twos-complement 8-bit signed integers in the platform byte order.\n*\n* @module @stdlib/array-int8\n*\n* @example\n* import ctor from '@stdlib/array-int8';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasInt8ArraySupport from '@stdlib/assert-has-int8array-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasInt8ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isInt8Array from '@stdlib/assert-is-int8array';\nimport INT8_MAX from '@stdlib/constants-int8-max';\nimport INT8_MIN from '@stdlib/constants-int8-min';\nimport GlobalInt8Array from './int8array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Int8Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Int8Array` support\n*\n* @example\n* var bool = hasInt8ArraySupport();\n* // returns \n*/\nfunction hasInt8ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalInt8Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = new GlobalInt8Array( [ 1, 3.14, -3.14, INT8_MAX+1 ] );\n\t\tbool = (\n\t\t\tisInt8Array( arr ) &&\n\t\t\tarr[ 0 ] === 1 &&\n\t\t\tarr[ 1 ] === 3 && // truncation\n\t\t\tarr[ 2 ] === -3 && // truncation\n\t\t\tarr[ 3 ] === INT8_MIN // wrap around\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasInt8ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Minimum signed 8-bit integer.\n*\n* @module @stdlib/constants-int8-min\n* @type {integer32}\n*\n* @example\n* import INT8_MIN from '@stdlib/constants-int8-min';\n* // returns -128\n*/\n\n\n// MAIN //\n\n/**\n* Minimum signed 8-bit integer.\n*\n* ## Notes\n*\n* The number is given by\n*\n* ```tex\n* -(2^{7})\n* ```\n*\n* which corresponds to the two's complement bit sequence\n*\n* ```binarystring\n* 10000000\n* ```\n*\n* @constant\n* @type {integer32}\n* @default -128\n*/\nvar INT8_MIN = -128|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default INT8_MIN;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of twos-complement 8-bit signed integers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasUint16Array = ( typeof Uint16Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Uint16Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a Uint16Array\n*\n* @example\n* var bool = isUint16Array( new Uint16Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isUint16Array( [] );\n* // returns false\n*/\nfunction isUint16Array( value ) {\n\treturn (\n\t\t( hasUint16Array && value instanceof Uint16Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Uint16Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isUint16Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum unsigned 16-bit integer.\n*\n* @module @stdlib/constants-uint16-max\n* @type {integer32}\n*\n* @example\n* import UINT16_MAX from '@stdlib/constants-uint16-max';\n* // returns 65535\n*/\n\n\n// MAIN //\n\n/**\n* Maximum unsigned 16-bit integer.\n*\n* ## Notes\n*\n* The number has the value\n*\n* ```tex\n* 2^{16} - 1\n* ```\n*\n* which corresponds to the bit sequence\n*\n* ```binarystring\n* 1111111111111111\n* ```\n*\n* @constant\n* @type {integer32}\n* @default 65535\n*/\nvar UINT16_MAX = 65535|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default UINT16_MAX;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Uint16Array === 'function' ) ? Uint16Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Uint16Array === 'function' ) ? Uint16Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of 16-bit unsigned integers in the platform byte order.\n*\n* @module @stdlib/array-uint16\n*\n* @example\n* import ctor from '@stdlib/array-uint16';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasUint16ArraySupport from '@stdlib/assert-has-uint16array-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasUint16ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isUint16Array from '@stdlib/assert-is-uint16array';\nimport UINT16_MAX from '@stdlib/constants-uint16-max';\nimport GlobalUint16Array from './uint16array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Uint16Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Uint16Array` support\n*\n* @example\n* var bool = hasUint16ArraySupport();\n* // returns \n*/\nfunction hasUint16ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalUint16Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = [ 1, 3.14, -3.14, UINT16_MAX+1, UINT16_MAX+2 ];\n\t\tarr = new GlobalUint16Array( arr );\n\t\tbool = (\n\t\t\tisUint16Array( arr ) &&\n\t\t\tarr[ 0 ] === 1 &&\n\t\t\tarr[ 1 ] === 3 && // truncation\n\t\t\tarr[ 2 ] === UINT16_MAX-2 && // truncation and wrap around\n\t\t\tarr[ 3 ] === 0 && // wrap around\n\t\t\tarr[ 4 ] === 1 // wrap around\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasUint16ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of 16-bit unsigned integers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasUint32Array = ( typeof Uint32Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Uint32Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a Uint32Array\n*\n* @example\n* var bool = isUint32Array( new Uint32Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isUint32Array( [] );\n* // returns false\n*/\nfunction isUint32Array( value ) {\n\treturn (\n\t\t( hasUint32Array && value instanceof Uint32Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Uint32Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isUint32Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum unsigned 32-bit integer.\n*\n* @module @stdlib/constants-uint32-max\n* @type {uinteger32}\n*\n* @example\n* import UINT32_MAX from '@stdlib/constants-uint32-max';\n* // returns 4294967295\n*/\n\n\n// MAIN //\n\n/**\n* Maximum unsigned 32-bit integer.\n*\n* ## Notes\n*\n* The number has the value\n*\n* ```tex\n* 2^{32} - 1\n* ```\n*\n* which corresponds to the bit sequence\n*\n* ```binarystring\n* 11111111111111111111111111111111\n* ```\n*\n* @constant\n* @type {uinteger32}\n* @default 4294967295\n*/\nvar UINT32_MAX = 4294967295;\n\n\n// EXPORTS //\n\nexport default UINT32_MAX;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Uint32Array === 'function' ) ? Uint32Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Uint32Array === 'function' ) ? Uint32Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of 32-bit unsigned integers in the platform byte order.\n*\n* @module @stdlib/array-uint32\n*\n* @example\n* import ctor from '@stdlib/array-uint32';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasUint32ArraySupport from '@stdlib/assert-has-uint32array-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasUint32ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isUint32Array from '@stdlib/assert-is-uint32array';\nimport UINT32_MAX from '@stdlib/constants-uint32-max';\nimport GlobalUint32Array from './uint32array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Uint32Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Uint32Array` support\n*\n* @example\n* var bool = hasUint32ArraySupport();\n* // returns \n*/\nfunction hasUint32ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalUint32Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = [ 1, 3.14, -3.14, UINT32_MAX+1, UINT32_MAX+2 ];\n\t\tarr = new GlobalUint32Array( arr );\n\t\tbool = (\n\t\t\tisUint32Array( arr ) &&\n\t\t\tarr[ 0 ] === 1 &&\n\t\t\tarr[ 1 ] === 3 && // truncation\n\t\t\tarr[ 2 ] === UINT32_MAX-2 && // truncation and wrap around\n\t\t\tarr[ 3 ] === 0 && // wrap around\n\t\t\tarr[ 4 ] === 1 // wrap around\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasUint32ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of 32-bit unsigned integers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasUint8Array = ( typeof Uint8Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Uint8Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a Uint8Array\n*\n* @example\n* var bool = isUint8Array( new Uint8Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isUint8Array( [] );\n* // returns false\n*/\nfunction isUint8Array( value ) {\n\treturn (\n\t\t( hasUint8Array && value instanceof Uint8Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Uint8Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isUint8Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum unsigned 8-bit integer.\n*\n* @module @stdlib/constants-uint8-max\n* @type {integer32}\n*\n* @example\n* import UINT8_MAX from '@stdlib/constants-uint8-max';\n* // returns 255\n*/\n\n\n// MAIN //\n\n/**\n* Maximum unsigned 8-bit integer.\n*\n* ## Notes\n*\n* The number has the value\n*\n* ```tex\n* 2^{8} - 1\n* ```\n*\n* which corresponds to the bit sequence\n*\n* ```binarystring\n* 11111111\n* ```\n*\n* @constant\n* @type {integer32}\n* @default 255\n*/\nvar UINT8_MAX = 255|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default UINT8_MAX;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Uint8Array === 'function' ) ? Uint8Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Uint8Array === 'function' ) ? Uint8Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of 8-bit unsigned integers in the platform byte order.\n*\n* @module @stdlib/array-uint8\n*\n* @example\n* import ctor from '@stdlib/array-uint8';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasUint8ArraySupport from '@stdlib/assert-has-uint8array-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasUint8ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isUint8Array from '@stdlib/assert-is-uint8array';\nimport UINT8_MAX from '@stdlib/constants-uint8-max';\nimport GlobalUint8Array from './uint8array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Uint8Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Uint8Array` support\n*\n* @example\n* var bool = hasUint8ArraySupport();\n* // returns \n*/\nfunction hasUint8ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalUint8Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = [ 1, 3.14, -3.14, UINT8_MAX+1, UINT8_MAX+2 ];\n\t\tarr = new GlobalUint8Array( arr );\n\t\tbool = (\n\t\t\tisUint8Array( arr ) &&\n\t\t\tarr[ 0 ] === 1 &&\n\t\t\tarr[ 1 ] === 3 && // truncation\n\t\t\tarr[ 2 ] === UINT8_MAX-2 && // truncation and wrap around\n\t\t\tarr[ 3 ] === 0 && // wrap around\n\t\t\tarr[ 4 ] === 1 // wrap around\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasUint8ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of 8-bit unsigned integers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasUint8ClampedArray = ( typeof Uint8ClampedArray === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Uint8ClampedArray.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a Uint8ClampedArray\n*\n* @example\n* var bool = isUint8ClampedArray( new Uint8ClampedArray( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isUint8ClampedArray( [] );\n* // returns false\n*/\nfunction isUint8ClampedArray( value ) {\n\treturn (\n\t\t( hasUint8ClampedArray && value instanceof Uint8ClampedArray ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Uint8ClampedArray]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isUint8ClampedArray;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Uint8ClampedArray === 'function' ) ? Uint8ClampedArray : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Uint8ClampedArray === 'function' ) ? Uint8ClampedArray : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of 8-bit unsigned integers in the platform byte order clamped to 0-255.\n*\n* @module @stdlib/array-uint8c\n*\n* @example\n* import ctor from '@stdlib/array-uint8c';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasUint8ClampedArraySupport from '@stdlib/assert-has-uint8clampedarray-support'; // eslint-disable-line id-length\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasUint8ClampedArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isUint8ClampedArray from '@stdlib/assert-is-uint8clampedarray';\nimport GlobalUint8ClampedArray from './uint8clampedarray.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Uint8ClampedArray` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Uint8ClampedArray` support\n*\n* @example\n* var bool = hasUint8ClampedArraySupport();\n* // returns \n*/\nfunction hasUint8ClampedArraySupport() { // eslint-disable-line id-length\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalUint8ClampedArray !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = new GlobalUint8ClampedArray( [ -1, 0, 1, 3.14, 4.99, 255, 256 ] );\n\t\tbool = (\n\t\t\tisUint8ClampedArray( arr ) &&\n\t\t\tarr[ 0 ] === 0 && // clamped\n\t\t\tarr[ 1 ] === 0 &&\n\t\t\tarr[ 2 ] === 1 &&\n\t\t\tarr[ 3 ] === 3 && // round to nearest\n\t\t\tarr[ 4 ] === 5 && // round to nearest\n\t\t\tarr[ 5 ] === 255 &&\n\t\t\tarr[ 6 ] === 255 // clamped\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasUint8ClampedArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of 8-bit unsigned integers in the platform byte order clamped to 0-255.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum length of a generic array.\n*\n* @module @stdlib/constants-array-max-array-length\n*\n* @example\n* import MAX_ARRAY_LENGTH from '@stdlib/constants-array-max-array-length';\n* // returns 4294967295\n*/\n\n// MAIN //\n\n/**\n* Maximum length of a generic array.\n*\n* ```tex\n* 2^{32} - 1\n* ```\n*\n* @constant\n* @type {uinteger32}\n* @default 4294967295\n*/\nvar MAX_ARRAY_LENGTH = 4294967295>>>0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default MAX_ARRAY_LENGTH;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isInteger from '@stdlib/math-base-assert-is-integer';\nimport MAX_LENGTH from '@stdlib/constants-array-max-array-length';\n\n\n// MAIN //\n\n/**\n* Tests if a value is an array-like object.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is an array-like object\n*\n* @example\n* var bool = isArrayLikeObject( [] );\n* // returns true\n*\n* @example\n* var bool = isArrayLikeObject( { 'length':10 } );\n* // returns true\n*\n* @example\n* var bool = isArrayLikeObject( 'beep' );\n* // returns false\n*/\nfunction isArrayLikeObject( value ) {\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\ttypeof value.length === 'number' &&\n\t\tisInteger( value.length ) &&\n\t\tvalue.length >= 0 &&\n\t\tvalue.length <= MAX_LENGTH\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isArrayLikeObject;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum length of a typed array.\n*\n* @module @stdlib/constants-array-max-typed-array-length\n*\n* @example\n* import MAX_TYPED_ARRAY_LENGTH from '@stdlib/constants-array-max-typed-array-length';\n* // returns 9007199254740991\n*/\n\n// MAIN //\n\n/**\n* Maximum length of a typed array.\n*\n* ```tex\n* 2^{53} - 1\n* ```\n*\n* @constant\n* @type {number}\n* @default 9007199254740991\n*/\nvar MAX_TYPED_ARRAY_LENGTH = 9007199254740991;\n\n\n// EXPORTS //\n\nexport default MAX_TYPED_ARRAY_LENGTH;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isInteger from '@stdlib/math-base-assert-is-integer';\nimport MAX_LENGTH from '@stdlib/constants-array-max-typed-array-length';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a collection.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether a value is a collection\n*\n* @example\n* var bool = isCollection( [] );\n* // returns true\n*\n* @example\n* var bool = isCollection( {} );\n* // returns false\n*/\nfunction isCollection( value ) {\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\ttypeof value.length === 'number' &&\n\t\tisInteger( value.length ) &&\n\t\tvalue.length >= 0 &&\n\t\tvalue.length <= MAX_LENGTH\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isCollection;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasArrayBuffer = ( typeof ArrayBuffer === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is an ArrayBuffer.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an ArrayBuffer\n*\n* @example\n* import ArrayBuffer from '@stdlib/array-buffer';\n*\n* var bool = isArrayBuffer( new ArrayBuffer( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isArrayBuffer( [] );\n* // returns false\n*/\nfunction isArrayBuffer( value ) {\n\treturn (\n\t\t( hasArrayBuffer && value instanceof ArrayBuffer ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object ArrayBuffer]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isArrayBuffer;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar f;\n\n\n// FUNCTIONS //\n\n/**\n* Tests if a value is an array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an array\n*\n* @example\n* var bool = isArray( [] );\n* // returns true\n*\n* @example\n* var bool = isArray( {} );\n* // returns false\n*/\nfunction isArray( value ) {\n\treturn ( nativeClass( value ) === '[object Array]' );\n}\n\n\n// MAIN //\n\nif ( Array.isArray ) {\n\tf = Array.isArray;\n} else {\n\tf = isArray;\n}\n\n\n// EXPORTS //\n\nexport default f;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isArray from '@stdlib/assert-is-array';\n\n\n// MAIN //\n\n/**\n* Tests if a value is an object; e.g., `{}`.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an object\n*\n* @example\n* var bool = isObject( {} );\n* // returns true\n*\n* @example\n* var bool = isObject( null );\n* // returns false\n*/\nfunction isObject( value ) {\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\t!isArray( value )\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isObject;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Tests if a value is a string primitive.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a string primitive\n*\n* @example\n* var bool = isString( 'beep' );\n* // returns true\n*\n* @example\n* var bool = isString( new String( 'beep' ) );\n* // returns false\n*/\nfunction isString( value ) {\n\treturn ( typeof value === 'string' );\n}\n\n\n// EXPORTS //\n\nexport default isString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// eslint-disable-next-line stdlib/no-redeclare\nvar valueOf = String.prototype.valueOf; // non-generic\n\n\n// EXPORTS //\n\nexport default valueOf;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport hasToStringTag from '@stdlib/assert-has-tostringtag-support';\nimport nativeClass from '@stdlib/utils-native-class';\nimport test from './try2valueof.js';\n\n\n// VARIABLES //\n\nvar FLG = hasToStringTag();\n\n\n// MAIN //\n\n/**\n* Tests if a value is a string object.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a string object\n*\n* @example\n* var bool = isString( new String( 'beep' ) );\n* // returns true\n*\n* @example\n* var bool = isString( 'beep' );\n* // returns false\n*/\nfunction isString( value ) {\n\tif ( typeof value === 'object' ) {\n\t\tif ( value instanceof String ) {\n\t\t\treturn true;\n\t\t}\n\t\tif ( FLG ) {\n\t\t\treturn test( value );\n\t\t}\n\t\treturn ( nativeClass( value ) === '[object String]' );\n\t}\n\treturn false;\n}\n\n\n// EXPORTS //\n\nexport default isString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport valueOf from './valueof.js'; // eslint-disable-line stdlib/no-redeclare\n\n\n// MAIN //\n\n/**\n* Attempts to extract a string value.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a string can be extracted\n*/\nfunction test( value ) {\n\ttry {\n\t\tvalueOf.call( value );\n\t\treturn true;\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\treturn false;\n\t}\n}\n\n\n// EXPORTS //\n\nexport default test;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a string.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a string\n*\n* @example\n* var bool = isString( new String( 'beep' ) );\n* // returns true\n*\n* @example\n* var bool = isString( 'beep' );\n* // returns true\n*/\nfunction isString( value ) {\n\treturn ( isPrimitive( value ) || isObject( value ) );\n}\n\n\n// EXPORTS //\n\nexport default isString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test if a value is a string.\n*\n* @module @stdlib/assert-is-string\n*\n* @example\n* import isString from '@stdlib/assert-is-string';\n*\n* var bool = isString( 'beep' );\n* // returns true\n*\n* bool = isString( new String( 'beep' ) );\n* // returns true\n*\n* bool = isString( 5 );\n* // returns false\n*\n* @example\n* import { isObject as isString } from '@stdlib/assert-is-string';\n*\n* var bool = isString( new String( 'beep' ) );\n* // returns true\n*\n* bool = isString( 'beep' );\n* // returns false\n*\n* @example\n* import { isPrimitive as isString } from '@stdlib/assert-is-string';\n*\n* var bool = isString( 'beep' );\n* // returns true\n*\n* bool = isString( new String( 'beep' ) );\n* // returns false\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'isPrimitive', isPrimitive );\nsetReadOnly( main, 'isObject', isObject );\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\nvar RE = /./;\n\n\n// EXPORTS //\n\nexport default RE;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Tests if a value is a boolean primitive.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a boolean primitive\n*\n* @example\n* var bool = isBoolean( true );\n* // returns true\n*\n* @example\n* var bool = isBoolean( false );\n* // returns true\n*\n* @example\n* import Boolean from '@stdlib/boolean-ctor';\n*\n* var bool = isBoolean( new Boolean( true ) );\n* // returns false\n*/\nfunction isBoolean( value ) {\n\treturn ( typeof value === 'boolean' );\n}\n\n\n// EXPORTS //\n\nexport default isBoolean;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Returns a boolean.\n*\n* @name Boolean\n* @constructor\n* @type {Function}\n* @param {*} value - input value\n* @returns {(boolean|Boolean)} boolean\n*\n* @example\n* var b = Boolean( null );\n* // returns false\n*\n* b = Boolean( [] );\n* // returns true\n*\n* b = Boolean( {} );\n* // returns true\n*\n* @example\n* var b = new Boolean( false );\n* // returns \n*/\nvar Bool = Boolean; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default Bool;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// eslint-disable-next-line stdlib/no-redeclare\nvar toString = Boolean.prototype.toString; // non-generic\n\n\n// EXPORTS //\n\nexport default toString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport hasToStringTag from '@stdlib/assert-has-tostringtag-support';\nimport nativeClass from '@stdlib/utils-native-class';\nimport Boolean from '@stdlib/boolean-ctor';\nimport test from './try2serialize.js';\n\n\n// VARIABLES //\n\nvar FLG = hasToStringTag();\n\n\n// MAIN //\n\n/**\n* Tests if a value is a boolean object.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a boolean object\n*\n* @example\n* var bool = isBoolean( true );\n* // returns false\n*\n* @example\n* import Boolean from '@stdlib/boolean-ctor';\n*\n* var bool = isBoolean( new Boolean( false ) );\n* // returns true\n*/\nfunction isBoolean( value ) {\n\tif ( typeof value === 'object' ) {\n\t\tif ( value instanceof Boolean ) {\n\t\t\treturn true;\n\t\t}\n\t\tif ( FLG ) {\n\t\t\treturn test( value );\n\t\t}\n\t\treturn ( nativeClass( value ) === '[object Boolean]' );\n\t}\n\treturn false;\n}\n\n\n// EXPORTS //\n\nexport default isBoolean;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport toString from './tostring.js'; // eslint-disable-line stdlib/no-redeclare\n\n\n// MAIN //\n\n/**\n* Attempts to serialize a value to a string.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value can be serialized\n*/\nfunction test( value ) {\n\ttry {\n\t\ttoString.call( value );\n\t\treturn true;\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\treturn false;\n\t}\n}\n\n\n// EXPORTS //\n\nexport default test;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a boolean.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a boolean\n*\n* @example\n* var bool = isBoolean( false );\n* // returns true\n*\n* @example\n* var bool = isBoolean( true );\n* // returns true\n*\n* @example\n* import Boolean from '@stdlib/boolean-ctor';\n*\n* var bool = isBoolean( new Boolean( false ) );\n* // returns true\n*\n* @example\n* import Boolean from '@stdlib/boolean-ctor';\n*\n* var bool = isBoolean( new Boolean( true ) );\n* // returns true\n*/\nfunction isBoolean( value ) {\n\treturn ( isPrimitive( value ) || isObject( value ) );\n}\n\n\n// EXPORTS //\n\nexport default isBoolean;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test if a value is a boolean.\n*\n* @module @stdlib/assert-is-boolean\n*\n* @example\n* import Boolean from '@stdlib/boolean-ctor';\n* import isBoolean from '@stdlib/assert-is-boolean';\n*\n* var bool = isBoolean( false );\n* // returns true\n*\n* bool = isBoolean( new Boolean( false ) );\n* // returns true\n*\n* @example\n* import Boolean from '@stdlib/boolean-ctor';\n* import { isPrimitive as isBoolean } from '@stdlib/assert-is-boolean';\n*\n* var bool = isBoolean( false );\n* // returns true\n*\n* bool = isBoolean( new Boolean( true ) );\n* // returns false\n*\n* @example\n* import Boolean from '@stdlib/boolean-ctor';\n* import { isObject as isBoolean } from '@stdlib/assert-is-boolean';\n*\n* var bool = isBoolean( true );\n* // returns false\n*\n* bool = isBoolean( new Boolean( false ) );\n* // returns true\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'isPrimitive', isPrimitive );\nsetReadOnly( main, 'isObject', isObject );\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar obj = ( typeof self === 'object' ) ? self : null;\n\n\n// EXPORTS //\n\nexport default obj;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar obj = ( typeof window === 'object' ) ? window : null;\n\n\n// EXPORTS //\n\nexport default obj;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar obj = ( typeof global === 'object' ) ? global : null;\n\n\n// EXPORTS //\n\nexport default obj;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar obj = ( typeof globalThis === 'object' ) ? globalThis : null; // eslint-disable-line no-undef\n\n\n// EXPORTS //\n\nexport default obj;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport getGlobal from '@stdlib/utils-global';\n\n\n// MAIN //\n\nvar root = getGlobal();\nvar nodeList = root.document && root.document.childNodes;\n\n\n// EXPORTS //\n\nexport default nodeList;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isBoolean } from '@stdlib/assert-is-boolean';\nimport format from '@stdlib/string-format';\nimport getThis from './codegen.js';\nimport Self from './self.js';\nimport Win from './window.js';\nimport Global from './global.js';\nimport GlobalThis from './global_this.js';\n\n\n// MAIN //\n\n/**\n* Returns the global object.\n*\n* ## Notes\n*\n* - Using code generation is the **most** reliable way to resolve the global object; however, doing so is likely to violate content security policies (CSPs) in, e.g., Chrome Apps and elsewhere.\n*\n* @param {boolean} [codegen=false] - boolean indicating whether to use code generation to resolve the global object\n* @throws {TypeError} must provide a boolean\n* @throws {Error} unable to resolve global object\n* @returns {Object} global object\n*\n* @example\n* var g = getGlobal();\n* // returns {...}\n*/\nfunction getGlobal( codegen ) {\n\tif ( arguments.length ) {\n\t\tif ( !isBoolean( codegen ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Must provide a boolean. Value: `%s`.', codegen ) );\n\t\t}\n\t\tif ( codegen ) {\n\t\t\treturn getThis();\n\t\t}\n\t\t// Fall through...\n\t}\n\t// Case: 2020 revision of ECMAScript standard\n\tif ( GlobalThis ) {\n\t\treturn GlobalThis;\n\t}\n\t// Case: browsers and web workers\n\tif ( Self ) {\n\t\treturn Self;\n\t}\n\t// Case: browsers\n\tif ( Win ) {\n\t\treturn Win;\n\t}\n\t// Case: Node.js\n\tif ( Global ) {\n\t\treturn Global;\n\t}\n\t// Case: unknown\n\tthrow new Error( 'unexpected error. Unable to resolve global object.' );\n}\n\n\n// EXPORTS //\n\nexport default getGlobal;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Returns the global object using code generation.\n*\n* @private\n* @returns {Object} global object\n*/\nfunction getGlobal() {\n\treturn new Function( 'return this;' )(); // eslint-disable-line no-new-func, stdlib/require-globals\n}\n\n\n// EXPORTS //\n\nexport default getGlobal;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\nvar typedarray = Int8Array; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default typedarray;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Returns a regular expression to capture everything that is not a space immediately after the `function` keyword and before the first left parenthesis.\n*\n* @returns {RegExp} regular expression\n*\n* @example\n* var RE_FUNCTION_NAME = reFunctionName();\n*\n* function fname( fcn ) {\n* return RE_FUNCTION_NAME.exec( fcn.toString() )[ 1 ];\n* }\n*\n* var fn = fname( Math.sqrt );\n* // returns 'sqrt'\n*\n* fn = fname( Int8Array );\n* // returns 'Int8Array'\n*\n* fn = fname( Object.prototype.toString );\n* // returns 'toString'\n*\n* fn = fname( function(){} );\n* // returns ''\n*/\nfunction reFunctionName() {\n\treturn /^\\s*function\\s*([^(]*)/i;\n}\n\n\n// EXPORTS //\n\nexport default reFunctionName;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport reFunctionName from './main.js';\n\n\n// MAIN //\n\n/**\n* Captures everything that is not a space immediately after the `function` keyword and before the first left parenthesis.\n*\n* Regular expression: `/^\\s*function\\s*([^(]*)/i`\n*\n* - `/^\\s*`\n* - Match zero or more spaces at beginning\n*\n* - `function`\n* - Match the word `function`\n*\n* - `\\s*`\n* - Match zero or more spaces after the word `function`\n*\n* - `()`\n* - Capture\n*\n* - `[^(]*`\n* - Match anything except a left parenthesis `(` zero or more times\n*\n* - `/i`\n* - ignore case\n*\n* @constant\n* @type {RegExp}\n* @default /^\\s*function\\s*([^(]*)/i\n*/\nvar RE_FUNCTION_NAME = reFunctionName();\n\n\n// EXPORTS //\n\nexport default RE_FUNCTION_NAME;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Tests if a value is object-like.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether a value is object-like\n*\n* @example\n* var bool = isObjectLike( {} );\n* // returns true\n*\n* @example\n* var bool = isObjectLike( [] );\n* // returns true\n*\n* @example\n* var bool = isObjectLike( null );\n* // returns false\n*/\nfunction isObjectLike( value ) {\n\treturn (\n\t\tvalue !== null &&\n\t\ttypeof value === 'object'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isObjectLike;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\nimport { REGEXP as RE } from '@stdlib/regexp-function-name';\nimport isBuffer from '@stdlib/assert-is-buffer';\n\n\n// MAIN //\n\n/**\n* Determines the name of a value's constructor.\n*\n* @param {*} v - input value\n* @returns {string} name of a value's constructor\n*\n* @example\n* var v = constructorName( 'a' );\n* // returns 'String'\n*\n* @example\n* var v = constructorName( 5 );\n* // returns 'Number'\n*\n* @example\n* var v = constructorName( null );\n* // returns 'Null'\n*\n* @example\n* var v = constructorName( undefined );\n* // returns 'Undefined'\n*\n* @example\n* var v = constructorName( function noop() {} );\n* // returns 'Function'\n*/\nfunction constructorName( v ) {\n\tvar match;\n\tvar name;\n\tvar ctor;\n\tname = nativeClass( v ).slice( 8, -1 );\n\tif ( (name === 'Object' || name === 'Error') && v.constructor ) {\n\t\tctor = v.constructor;\n\t\tif ( typeof ctor.name === 'string' ) {\n\t\t\treturn ctor.name;\n\t\t}\n\t\tmatch = RE.exec( ctor.toString() );\n\t\tif ( match ) {\n\t\t\treturn match[ 1 ];\n\t\t}\n\t}\n\tif ( isBuffer( v ) ) {\n\t\treturn 'Buffer';\n\t}\n\treturn name;\n}\n\n\n// EXPORTS //\n\nexport default constructorName;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isObjectLike from '@stdlib/assert-is-object-like';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Buffer instance.\n*\n* @param {*} value - value to validate\n* @returns {boolean} boolean indicating if a value is a Buffer instance\n*\n* @example\n* var v = isBuffer( new Buffer( 'beep' ) );\n* // returns true\n*\n* @example\n* var v = isBuffer( new Buffer( [1,2,3,4] ) );\n* // returns true\n*\n* @example\n* var v = isBuffer( {} );\n* // returns false\n*\n* @example\n* var v = isBuffer( [] );\n* // returns false\n*/\nfunction isBuffer( value ) {\n\treturn (\n\t\tisObjectLike( value ) &&\n\t\t(\n\t\t\t// eslint-disable-next-line no-underscore-dangle\n\t\t\tvalue._isBuffer || // for envs missing Object.prototype.constructor (e.g., Safari 5-7)\n\t\t\t(\n\t\t\t\tvalue.constructor &&\n\n\t\t\t\t// WARNING: `typeof` is not a foolproof check, as certain envs consider RegExp and NodeList instances to be functions\n\t\t\t\ttypeof value.constructor.isBuffer === 'function' &&\n\t\t\t\tvalue.constructor.isBuffer( value )\n\t\t\t)\n\t\t)\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isBuffer;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Regular expression to capture everything that is not a space immediately after the `function` keyword and before the first left parenthesis.\n*\n* @module @stdlib/regexp-function-name\n*\n* @example\n* import reFunctionName from '@stdlib/regexp-function-name';\n* var RE_FUNCTION_NAME = reFunctionName();\n*\n* function fname( fcn ) {\n* return RE_FUNCTION_NAME.exec( fcn.toString() )[ 1 ];\n* }\n*\n* var fn = fname( Math.sqrt );\n* // returns 'sqrt'\n*\n* fn = fname( Int8Array );\n* // returns 'Int8Array'\n*\n* fn = fname( Object.prototype.toString );\n* // returns 'toString'\n*\n* fn = fname( function(){} );\n* // returns ''\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport REGEXP from './regexp.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'REGEXP', REGEXP );\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test if a value is object-like.\n*\n* @module @stdlib/assert-is-object-like\n*\n* @example\n* import isObjectLike from '@stdlib/assert-is-object-like';\n*\n* var bool = isObjectLike( {} );\n* // returns true\n*\n* bool = isObjectLike( [] );\n* // returns true\n*\n* bool = isObjectLike( null );\n* // returns false\n*\n* @example\n* import { isObjectLikeArray as isObjectLike } from '@stdlib/assert-is-object-like';\n*\n* var bool = isObjectLike( [ {}, [] ] );\n* // returns true\n*\n* bool = isObjectLike( [ {}, '3.0' ] );\n* // returns false\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport arrayfun from '@stdlib/assert-tools-array-function';\nimport main from './main.js';\n\n\n// VARIABLES //\n\nvar isObjectLikeArray = arrayfun( main );\n\n\n// MAIN //\n\nsetReadOnly( main, 'isObjectLikeArray', isObjectLikeArray );\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isArray from '@stdlib/assert-is-array';\nimport format from '@stdlib/string-format';\n\n\n// MAIN //\n\n/**\n* Returns a function which tests if every element in an array passes a test condition.\n*\n* @param {Function} predicate - function to apply\n* @throws {TypeError} must provide a function\n* @returns {Function} an array function\n*\n* @example\n* import isOdd from '@stdlib/assert-is-odd';\n*\n* var arr1 = [ 1, 3, 5, 7 ];\n* var arr2 = [ 3, 5, 8 ];\n*\n* var validate = arrayfcn( isOdd );\n*\n* var bool = validate( arr1 );\n* // returns true\n*\n* bool = validate( arr2 );\n* // returns false\n*/\nfunction arrayfcn( predicate ) {\n\tif ( typeof predicate !== 'function' ) {\n\t\tthrow new TypeError( format( 'invalid argument. Must provide a function. Value: `%s`.', predicate ) );\n\t}\n\treturn every;\n\n\t/**\n\t* Tests if every element in an array passes a test condition.\n\t*\n\t* @private\n\t* @param {*} value - value to test\n\t* @returns {boolean} boolean indicating whether a value is an array for which all elements pass a test condition\n\t*/\n\tfunction every( value ) {\n\t\tvar len;\n\t\tvar i;\n\t\tif ( !isArray( value ) ) {\n\t\t\treturn false;\n\t\t}\n\t\tlen = value.length;\n\t\tif ( len === 0 ) {\n\t\t\treturn false;\n\t\t}\n\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\tif ( predicate( value[ i ] ) === false ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}\n}\n\n\n// EXPORTS //\n\nexport default arrayfcn;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Determine a value's type.\n*\n* @module @stdlib/utils-type-of\n*\n* @example\n* import typeOf from '@stdlib/utils-type-of';\n*\n* var str = typeOf( 'a' );\n* // returns 'string'\n*\n* str = typeOf( 5 );\n* // returns 'number'\n*/\n\n// MODULES //\n\nimport usePolyfill from './check.js';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar main = ( usePolyfill() ) ? polyfill : builtin;\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport RE from './fixtures/re.js';\nimport nodeList from './fixtures/nodelist.js';\nimport typedarray from './fixtures/typedarray.js';\n\n\n// MAIN //\n\n/**\n* Checks whether a polyfill is needed when using the `typeof` operator.\n*\n* @private\n* @returns {boolean} boolean indicating whether a polyfill is needed\n*/\nfunction check() {\n\tif (\n\t\t// Chrome 1-12 returns 'function' for regular expression instances (see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/typeof):\n\t\ttypeof RE === 'function' ||\n\n\t\t// Safari 8 returns 'object' for typed array and weak map constructors (underscore #1929):\n\t\ttypeof typedarray === 'object' ||\n\n\t\t// PhantomJS 1.9 returns 'function' for `NodeList` instances (underscore #2236):\n\t\ttypeof nodeList === 'function'\n\t) {\n\t\treturn true;\n\t}\n\treturn false;\n}\n\n\n// EXPORTS //\n\nexport default check;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport ctorName from '@stdlib/utils-constructor-name';\n\n\n// MAIN //\n\n/**\n* Determines a value's type.\n*\n* @param {*} v - input value\n* @returns {string} string indicating the value's type\n*/\nfunction typeOf( v ) {\n\treturn ctorName( v ).toLowerCase();\n}\n\n\n// EXPORTS //\n\nexport default typeOf;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport ctorName from '@stdlib/utils-constructor-name';\n\n\n// NOTES //\n\n/*\n* Built-in `typeof` operator behavior:\n*\n* ```text\n* typeof null => 'object'\n* typeof undefined => 'undefined'\n* typeof 'a' => 'string'\n* typeof 5 => 'number'\n* typeof NaN => 'number'\n* typeof true => 'boolean'\n* typeof false => 'boolean'\n* typeof {} => 'object'\n* typeof [] => 'object'\n* typeof function foo(){} => 'function'\n* typeof function* foo(){} => 'object'\n* typeof Symbol() => 'symbol'\n* ```\n*\n*/\n\n\n// MAIN //\n\n/**\n* Determines a value's type.\n*\n* @param {*} v - input value\n* @returns {string} string indicating the value's type\n*/\nfunction typeOf( v ) {\n\tvar type;\n\n\t// Address `typeof null` => `object` (see http://wiki.ecmascript.org/doku.php?id=harmony:typeof_null):\n\tif ( v === null ) {\n\t\treturn 'null';\n\t}\n\ttype = typeof v;\n\n\t// If the `typeof` operator returned something other than `object`, we are done. Otherwise, we need to check for an internal class name or search for a constructor.\n\tif ( type === 'object' ) {\n\t\treturn ctorName( v ).toLowerCase();\n\t}\n\treturn type;\n}\n\n\n// EXPORTS //\n\nexport default typeOf;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport typeOf from '@stdlib/utils-type-of';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a function.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a function\n*\n* @example\n* function beep() {\n* return 'beep';\n* }\n*\n* var bool = isFunction( beep );\n* // returns true\n*/\nfunction isFunction( value ) {\n\t// Note: cannot use `typeof` directly, as various browser engines incorrectly return `'function'` when operating on non-function objects, such as regular expressions and NodeLists.\n\treturn ( typeOf( value ) === 'function' );\n}\n\n\n// EXPORTS //\n\nexport default isFunction;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isNumber } from '@stdlib/assert-is-number';\nimport defineProperty from '@stdlib/utils-define-property';\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport format from '@stdlib/string-format';\nimport toStr from './tostring.js';\nimport toJSON from './tojson.js';\n\n\n// MAIN //\n\n/**\n* 128-bit complex number constructor.\n*\n* @constructor\n* @param {number} real - real component\n* @param {number} imag - imaginary component\n* @throws {TypeError} must invoke using the `new` keyword\n* @throws {TypeError} real component must be a number\n* @throws {TypeError} imaginary component must be a number\n* @returns {Complex128} 128-bit complex number\n*\n* @example\n* var z = new Complex128( 5.0, 3.0 );\n* // returns \n*/\nfunction Complex128( real, imag ) {\n\tif ( !( this instanceof Complex128 ) ) {\n\t\tthrow new TypeError( 'invalid invocation. Constructor must be called with the `new` keyword.' );\n\t}\n\tif ( !isNumber( real ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Real component must be a number. Value: `%s`.', real ) );\n\t}\n\tif ( !isNumber( imag ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Imaginary component must be a number. Value: `%s`.', imag ) );\n\t}\n\tdefineProperty( this, 're', {\n\t\t'configurable': false,\n\t\t'enumerable': true,\n\t\t'writable': false,\n\t\t'value': real\n\t});\n\tdefineProperty( this, 'im', {\n\t\t'configurable': false,\n\t\t'enumerable': true,\n\t\t'writable': false,\n\t\t'value': imag\n\t});\n\treturn this;\n}\n\n/**\n* Size (in bytes) of each component.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex128\n* @type {integer}\n* @returns {integer} size of each component\n*\n* @example\n* var nbytes = Complex128.BYTES_PER_ELEMENT;\n* // returns 8\n*/\nsetReadOnly( Complex128, 'BYTES_PER_ELEMENT', 8 );\n\n/**\n* Size (in bytes) of each component.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex128.prototype\n* @type {integer}\n* @returns {integer} size of each component\n*\n* @example\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var nbytes = z.BYTES_PER_ELEMENT;\n* // returns 8\n*/\nsetReadOnly( Complex128.prototype, 'BYTES_PER_ELEMENT', 8 );\n\n/**\n* Length (in bytes) of a complex number.\n*\n* @name byteLength\n* @memberof Complex128.prototype\n* @type {integer}\n* @returns {integer} byte length\n*\n* @example\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var nbytes = z.byteLength;\n* // returns 16\n*/\nsetReadOnly( Complex128.prototype, 'byteLength', 16 );\n\n/**\n* Serializes a complex number as a string.\n*\n* @name toString\n* @memberof Complex128.prototype\n* @type {Function}\n* @returns {string} serialized complex number\n*\n* @example\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var str = z.toString();\n* // returns '5 + 3i'\n*/\nsetReadOnly( Complex128.prototype, 'toString', toStr );\n\n/**\n* Serializes a complex number as a JSON object.\n*\n* ## Notes\n*\n* - `JSON.stringify()` implicitly calls this method when stringifying a `Complex128` instance.\n*\n* @name toJSON\n* @memberof Complex128.prototype\n* @type {Function}\n* @returns {Object} serialized complex number\n*\n* @example\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var obj = z.toJSON();\n* // returns { 'type': 'Complex128', 're': 5.0, 'im': 3.0 }\n*/\nsetReadOnly( Complex128.prototype, 'toJSON', toJSON );\n\n\n// EXPORTS //\n\nexport default Complex128;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Serializes a complex number as a string.\n*\n* @private\n* @returns {string} serialized complex number\n*/\nfunction toString() { // eslint-disable-line stdlib/no-redeclare\n\t/* eslint-disable no-invalid-this */\n\tvar str = '' + this.re;\n\tif ( this.im < 0 ) {\n\t\tstr += ' - ' + (-this.im);\n\t} else {\n\t\tstr += ' + ' + this.im;\n\t}\n\tstr += 'i';\n\treturn str;\n}\n\n\n// EXPORTS //\n\nexport default toString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Serializes a complex number as a JSON object.\n*\n* @private\n* @returns {Object} JSON representation\n*/\nfunction toJSON() {\n\t/* eslint-disable no-invalid-this */\n\tvar out = {};\n\tout.type = 'Complex128';\n\tout.re = this.re;\n\tout.im = this.im;\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default toJSON;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar fround = ( typeof Math.fround === 'function' ) ? Math.fround : null; // eslint-disable-line stdlib/no-builtin-math\n\n\n// EXPORTS //\n\nexport default fround;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport Float32Array from '@stdlib/array-float32';\n\n\n// VARIABLES //\n\nvar FLOAT32_VIEW = new Float32Array( 1 );\n\n\n// MAIN //\n\n/**\n* Converts a double-precision floating-point number to the nearest single-precision floating-point number.\n*\n* @param {number} x - double-precision floating-point number\n* @returns {number} nearest single-precision floating-point number\n*\n* @example\n* var y = float64ToFloat32( 1.337 );\n* // returns 1.3370000123977661\n*/\nfunction float64ToFloat32( x ) {\n\tFLOAT32_VIEW[ 0 ] = x;\n\treturn FLOAT32_VIEW[ 0 ];\n}\n\n\n// EXPORTS //\n\nexport default float64ToFloat32;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Convert a double-precision floating-point number to the nearest single-precision floating-point number.\n*\n* @module @stdlib/number-float64-base-to-float32\n*\n* @example\n* import float64ToFloat32 from '@stdlib/number-float64-base-to-float32';\n*\n* var y = float64ToFloat32( 1.337 );\n* // returns 1.3370000123977661\n*/\n\n// MODULES //\n\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar float64ToFloat32;\nif ( typeof builtin === 'function' ) {\n\tfloat64ToFloat32 = builtin;\n} else {\n\tfloat64ToFloat32 = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default float64ToFloat32;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isNumber } from '@stdlib/assert-is-number';\nimport defineProperty from '@stdlib/utils-define-property';\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport float64ToFloat32 from '@stdlib/number-float64-base-to-float32';\nimport format from '@stdlib/string-format';\nimport toStr from './tostring.js';\nimport toJSON from './tojson.js';\n\n\n// MAIN //\n\n/**\n* 64-bit complex number constructor.\n*\n* @constructor\n* @param {number} real - real component\n* @param {number} imag - imaginary component\n* @throws {TypeError} must invoke using the `new` keyword\n* @throws {TypeError} real component must be a number\n* @throws {TypeError} imaginary component must be a number\n* @returns {Complex64} 64-bit complex number\n*\n* @example\n* var z = new Complex64( 5.0, 3.0 );\n* // returns \n*/\nfunction Complex64( real, imag ) {\n\tif ( !( this instanceof Complex64 ) ) {\n\t\tthrow new TypeError( 'invalid invocation. Constructor must be called with the `new` keyword.' );\n\t}\n\tif ( !isNumber( real ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Real component must be a number. Value: `%s`.', real ) );\n\t}\n\tif ( !isNumber( imag ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Imaginary component must be a number. Value: `%s`.', imag ) );\n\t}\n\tdefineProperty( this, 're', {\n\t\t'configurable': false,\n\t\t'enumerable': true,\n\t\t'writable': false,\n\t\t'value': float64ToFloat32( real )\n\t});\n\tdefineProperty( this, 'im', {\n\t\t'configurable': false,\n\t\t'enumerable': true,\n\t\t'writable': false,\n\t\t'value': float64ToFloat32( imag )\n\t});\n\treturn this;\n}\n\n/**\n* Size (in bytes) of each component.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex64\n* @type {integer}\n* @returns {integer} size of each component\n*\n* @example\n* var nbytes = Complex64.BYTES_PER_ELEMENT;\n* // returns 4\n*/\nsetReadOnly( Complex64, 'BYTES_PER_ELEMENT', 4 );\n\n/**\n* Size (in bytes) of each component.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex64.prototype\n* @type {integer}\n* @returns {integer} size of each component\n*\n* @example\n* var z = new Complex64( 5.0, 3.0 );\n*\n* var nbytes = z.BYTES_PER_ELEMENT;\n* // returns 4\n*/\nsetReadOnly( Complex64.prototype, 'BYTES_PER_ELEMENT', 4 );\n\n/**\n* Length (in bytes) of a complex number.\n*\n* @name byteLength\n* @memberof Complex64.prototype\n* @type {integer}\n* @returns {integer} byte length\n*\n* @example\n* var z = new Complex64( 5.0, 3.0 );\n*\n* var nbytes = z.byteLength;\n* // returns 8\n*/\nsetReadOnly( Complex64.prototype, 'byteLength', 8 );\n\n/**\n* Serializes a complex number as a string.\n*\n* @name toString\n* @memberof Complex64.prototype\n* @type {Function}\n* @returns {string} serialized complex number\n*\n* @example\n* var z = new Complex64( 5.0, 3.0 );\n*\n* var str = z.toString();\n* // returns '5 + 3i'\n*/\nsetReadOnly( Complex64.prototype, 'toString', toStr );\n\n/**\n* Serializes a complex number as a JSON object.\n*\n* ## Notes\n*\n* - `JSON.stringify()` implicitly calls this method when stringifying a `Complex64` instance.\n*\n* @name toJSON\n* @memberof Complex64.prototype\n* @type {Function}\n* @returns {Object} serialized complex number\n*\n* @example\n* var z = new Complex64( 5.0, 3.0 );\n*\n* var obj = z.toJSON();\n* // returns { 'type': 'Complex64', 're': 5.0, 'im': 3.0 }\n*/\nsetReadOnly( Complex64.prototype, 'toJSON', toJSON );\n\n\n// EXPORTS //\n\nexport default Complex64;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport Complex128 from '@stdlib/complex-float64';\nimport Complex64 from '@stdlib/complex-float32';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a complex number-like object.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a complex number-like object.\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n* import Complex64 from '@stdlib/complex-float32';\n*\n* var x = new Complex128( 4.0, 2.0 );\n* var bool = isComplexLike( x );\n* // returns true\n*\n* x = new Complex64( 4.0, 2.0 );\n* bool = isComplexLike( x );\n* // returns true\n*/\nfunction isComplexLike( value ) {\n\tif ( value instanceof Complex128 || value instanceof Complex64 ) {\n\t\treturn true;\n\t}\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\ttypeof value.re === 'number' &&\n\t\ttypeof value.im === 'number'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isComplexLike;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isInteger from '@stdlib/math-base-assert-is-integer';\n\n\n// MAIN //\n\n/**\n* Tests if a finite numeric value is an even number.\n*\n* @param {number} x - value to test\n* @returns {boolean} boolean indicating whether the value is an even number\n*\n* @example\n* var bool = isEven( 5.0 );\n* // returns false\n*\n* @example\n* var bool = isEven( -2.0 );\n* // returns true\n*\n* @example\n* var bool = isEven( 0.0 );\n* // returns true\n*\n* @example\n* var bool = isEven( NaN );\n* // returns false\n*/\nfunction isEven( x ) {\n\treturn isInteger( x/2.0 );\n}\n\n\n// EXPORTS //\n\nexport default isEven;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Serializes a complex number as a string.\n*\n* @private\n* @returns {string} serialized complex number\n*/\nfunction toString() { // eslint-disable-line stdlib/no-redeclare\n\t/* eslint-disable no-invalid-this */\n\tvar str = '' + this.re;\n\tif ( this.im < 0 ) {\n\t\tstr += ' - ' + (-this.im);\n\t} else {\n\t\tstr += ' + ' + this.im;\n\t}\n\tstr += 'i';\n\treturn str;\n}\n\n\n// EXPORTS //\n\nexport default toString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Serializes a complex number as a JSON object.\n*\n* @private\n* @returns {Object} JSON representation\n*/\nfunction toJSON() {\n\t/* eslint-disable no-invalid-this */\n\tvar out = {};\n\tout.type = 'Complex64';\n\tout.re = this.re;\n\tout.im = this.im;\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default toJSON;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// VARIABLES //\n\nvar BYTES_PER_ELEMENT = 8; // 4 bytes per float32 x (1 real + 1 imag component)\n\n\n// MAIN //\n\n/**\n* Returns a boolean indicating if a value is a `Complex64Array`.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a `Complex64Array`\n*\n* @example\n* import Complex64Array from '@stdlib/array-complex64';\n*\n* var bool = isComplex64Array( new Complex64Array( 10 ) );\n* // returns true\n*\n* bool = isComplex64Array( [] );\n* // returns false\n*/\nfunction isComplex64Array( value ) {\n\t// Note: the following is not robust and that is intentional. In this case, we are seeking a lower cost way to reasonably determine whether an input value is a `Complex64Array` in order to avoid walking the prototype chain and resolving constructors, which is necessary for robust identification of cross-realm instances. For more robust validation, see `@stdlib/assert/is-complex64array`.\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\tvalue.constructor.name === 'Complex64Array' &&\n\t\tvalue.BYTES_PER_ELEMENT === BYTES_PER_ELEMENT\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isComplex64Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// VARIABLES //\n\nvar BYTES_PER_ELEMENT = 16; // 8 bytes per float64 x (1 real + 1 imag component)\n\n\n// MAIN //\n\n/**\n* Returns a boolean indicating if a value is a `Complex128Array`.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a `Complex128Array`\n*\n* @example\n* import Complex128Array from '@stdlib/array-complex128';\n*\n* var bool = isComplex128Array( new Complex128Array( 10 ) );\n* // returns true\n*\n* bool = isComplex128Array( [] );\n* // returns false\n*/\nfunction isComplex128Array( value ) {\n\t// Note: the following is not robust and that is intentional. In this case, we are seeking a lower cost way to reasonably determine whether an input value is a `Complex128Array` in order to avoid walking the prototype chain and resolving constructors, which is necessary for robust identification of cross-realm instances. For more robust validation, see `@stdlib/assert/is-complex128array`.\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\tvalue.constructor.name === 'Complex128Array' &&\n\t\tvalue.BYTES_PER_ELEMENT === BYTES_PER_ELEMENT\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isComplex128Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport hasOwnProp from '@stdlib/assert-has-own-property';\nimport Symbol from '@stdlib/symbol-ctor';\n\n\n// MAIN //\n\n/**\n* Tests for native `Symbol.iterator` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Symbol.iterator` support\n*\n* @example\n* var bool = hasIteratorSymbolSupport();\n* // returns \n*/\nfunction hasIteratorSymbolSupport() {\n\treturn (\n\t\ttypeof Symbol === 'function' &&\n\t\ttypeof Symbol( 'foo' ) === 'symbol' &&\n\t\thasOwnProp( Symbol, 'iterator' ) &&\n\t\ttypeof Symbol.iterator === 'symbol'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default hasIteratorSymbolSupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport hasIteratorSymbolSupport from '@stdlib/assert-has-iterator-symbol-support';\n\n\n// MAIN //\n\n/**\n* Iterator symbol.\n*\n* @name IteratorSymbol\n* @constant\n* @type {(symbol|null)}\n*\n* @example\n* function iterator() {\n* var it;\n* var i;\n*\n* i = -1;\n*\n* it = {};\n* it.next = next;\n* it.return = done;\n*\n* if ( IteratorSymbol ) {\n* it[ IteratorSymbol ] = iterator;\n* }\n* return it;\n*\n* function next() {\n* i += 1;\n* return {\n* 'value': i,\n* 'done': false\n* };\n* }\n*\n* function done( value ) {\n* if ( arguments.length === 0 ) {\n* return {\n* 'done': true\n* };\n* }\n* return {\n* 'value': value,\n* 'done': true\n* };\n* }\n* }\n*\n* var obj = iterator();\n*/\nvar IteratorSymbol = ( hasIteratorSymbolSupport() ) ? Symbol.iterator : null;\n\n\n// EXPORTS //\n\nexport default IteratorSymbol;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport defineProperty from '@stdlib/utils-define-property';\n\n\n// MAIN //\n\n/**\n* Defines a non-enumerable read-only accessor.\n*\n* @param {Object} obj - object on which to define the property\n* @param {(string|symbol)} prop - property name\n* @param {Function} getter - accessor\n*\n* @example\n* function getter() {\n* return 'bar';\n* }\n*\n* var obj = {};\n*\n* setNonEnumerableReadOnlyAccessor( obj, 'foo', getter );\n*\n* try {\n* obj.foo = 'boop';\n* } catch ( err ) {\n* console.error( err.message );\n* }\n*/\nfunction setNonEnumerableReadOnlyAccessor( obj, prop, getter ) { // eslint-disable-line id-length\n\tdefineProperty( obj, prop, {\n\t\t'configurable': false,\n\t\t'enumerable': false,\n\t\t'get': getter\n\t});\n}\n\n\n// EXPORTS //\n\nexport default setNonEnumerableReadOnlyAccessor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Returns the real component of a single-precision complex floating-point number.\n*\n* @param {Complex} z - complex number\n* @returns {number} real component\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n*\n* var z = new Complex64( 5.0, 3.0 );\n*\n* var re = realf( z );\n* // returns 5.0\n*/\nfunction realf( z ) {\n\treturn z.re;\n}\n\n\n// EXPORTS //\n\nexport default realf;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Returns the imaginary component of a single-precision complex floating-point number.\n*\n* @param {Complex} z - complex number\n* @returns {number} imaginary component\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n*\n* var z = new Complex64( 5.0, 3.0 );\n*\n* var im = imagf( z );\n* // returns 3.0\n*/\nfunction imagf( z ) {\n\treturn z.im;\n}\n\n\n// EXPORTS //\n\nexport default imagf;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport Float32Array from '@stdlib/array-float32';\n\n\n// MAIN //\n\n/**\n* Reinterprets a `Complex64Array` as a `Float32Array`.\n*\n* @param {Complex64Array} x - input array\n* @param {NonNegativeInteger} offset - starting index\n* @returns {Float32Array} `Float32Array` view\n*\n* @example\n* import Complex64Array from '@stdlib/array-complex64';\n*\n* var x = new Complex64Array( 10 );\n*\n* var out = reinterpret( x, 0 );\n* // returns \n*\n* var bool = ( out.buffer === x.buffer );\n* // returns true\n*/\nfunction reinterpret( x, offset ) {\n\treturn new Float32Array( x.buffer, x.byteOffset+(x.BYTES_PER_ELEMENT*offset), 2*(x.length-offset) ); // eslint-disable-line max-len\n}\n\n\n// EXPORTS //\n\nexport default reinterpret;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport Float64Array from '@stdlib/array-float64';\n\n\n// MAIN //\n\n/**\n* Reinterprets a `Complex128Array` as a `Float64Array`.\n*\n* @param {Complex128Array} x - input array\n* @param {NonNegativeInteger} offset - starting index\n* @returns {Float64Array} `Float64Array` view\n*\n* @example\n* import Complex128Array from '@stdlib/array-complex128';\n*\n* var x = new Complex128Array( 10 );\n*\n* var out = reinterpret( x, 0 );\n* // returns \n*\n* var bool = ( out.buffer === x.buffer );\n* // returns true\n*/\nfunction reinterpret( x, offset ) {\n\treturn new Float64Array( x.buffer, x.byteOffset+(x.BYTES_PER_ELEMENT*offset), 2*(x.length-offset) ); // eslint-disable-line max-len\n}\n\n\n// EXPORTS //\n\nexport default reinterpret;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// VARIABLES //\n\nvar GETTERS = {\n\t'float64': getFloat64,\n\t'float32': getFloat32,\n\t'int32': getInt32,\n\t'int16': getInt16,\n\t'int8': getInt8,\n\t'uint32': getUint32,\n\t'uint16': getUint16,\n\t'uint8': getUint8,\n\t'uint8c': getUint8c,\n\t'generic': getGeneric,\n\t'default': getArrayLike\n};\n\n\n// FUNCTIONS //\n\n/**\n* Returns an element from a `Float64Array`.\n*\n* @private\n* @param {Float64Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n*\n* var arr = new Float64Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getFloat64( arr, 2 );\n* // returns 3.0\n*/\nfunction getFloat64( arr, idx ) {\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from a `Float32Array`.\n*\n* @private\n* @param {Float32Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Float32Array from '@stdlib/array-float32';\n*\n* var arr = new Float32Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getFloat32( arr, 2 );\n* // returns 3.0\n*/\nfunction getFloat32( arr, idx ) {\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from an `Int32Array`.\n*\n* @private\n* @param {Int32Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Int32Array from '@stdlib/array-int32';\n*\n* var arr = new Int32Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getInt32( arr, 2 );\n* // returns 3\n*/\nfunction getInt32( arr, idx ) { // eslint-disable-line stdlib/jsdoc-doctest-decimal-point\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from an `Int16Array`.\n*\n* @private\n* @param {Int16Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Int16Array from '@stdlib/array-int16';\n*\n* var arr = new Int16Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getInt16( arr, 2 );\n* // returns 3\n*/\nfunction getInt16( arr, idx ) { // eslint-disable-line stdlib/jsdoc-doctest-decimal-point\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from an `Int8Array`.\n*\n* @private\n* @param {Int8Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Int8Array from '@stdlib/array-int8';\n*\n* var arr = new Int8Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getInt8( arr, 2 );\n* // returns 3\n*/\nfunction getInt8( arr, idx ) { // eslint-disable-line stdlib/jsdoc-doctest-decimal-point\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from a `Uint32Array`.\n*\n* @private\n* @param {Uint32Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Uint32Array from '@stdlib/array-uint32';\n*\n* var arr = new Uint32Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getUint32( arr, 2 );\n* // returns 3\n*/\nfunction getUint32( arr, idx ) { // eslint-disable-line stdlib/jsdoc-doctest-decimal-point\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from a `Uint16Array`.\n*\n* @private\n* @param {Uint16Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Uint16Array from '@stdlib/array-uint16';\n*\n* var arr = new Uint16Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getUint16( arr, 2 );\n* // returns 3\n*/\nfunction getUint16( arr, idx ) { // eslint-disable-line stdlib/jsdoc-doctest-decimal-point\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from a `Uint8Array`.\n*\n* @private\n* @param {Uint8Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Uint8Array from '@stdlib/array-uint8';\n*\n* var arr = new Uint8Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getUint8( arr, 2 );\n* // returns 3\n*/\nfunction getUint8( arr, idx ) { // eslint-disable-line stdlib/jsdoc-doctest-decimal-point\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from a `Uint8ClampedArray`.\n*\n* @private\n* @param {Uint8ClampedArray} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Uint8ClampedArray from '@stdlib/array-uint8c';\n*\n* var arr = new Uint8ClampedArray( [ 1, 2, 3, 4 ] );\n*\n* var v = getUint8c( arr, 2 );\n* // returns 3\n*/\nfunction getUint8c( arr, idx ) { // eslint-disable-line stdlib/jsdoc-doctest-decimal-point\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from a generic `Array`.\n*\n* @private\n* @param {Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {*} element value\n*\n* @example\n* var arr = [ 1, 2, 3, 4 ];\n*\n* var v = getGeneric( arr, 2 );\n* // returns 3\n*/\nfunction getGeneric( arr, idx ) {\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from an indexed array-like object.\n*\n* @private\n* @param {Collection} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {*} element value\n*\n* @example\n* var arr = [ 1, 2, 3, 4 ];\n*\n* var v = getArrayLike( arr, 2 );\n* // returns 3\n*/\nfunction getArrayLike( arr, idx ) {\n\treturn arr[ idx ];\n}\n\n\n// MAIN //\n\n/**\n* Returns an accessor function for retrieving an element from an indexed array-like object.\n*\n* @param {string} dtype - array dtype\n* @returns {Function} accessor\n*\n* @example\n* import dtype from '@stdlib/array-dtype';\n*\n* var arr = [ 1, 2, 3, 4 ];\n*\n* var get = getter( dtype( arr ) );\n* var v = get( arr, 2 );\n* // returns 3\n*/\nfunction getter( dtype ) {\n\tvar f = GETTERS[ dtype ];\n\tif ( typeof f === 'function' ) {\n\t\treturn f;\n\t}\n\treturn GETTERS.default;\n}\n\n\n// EXPORTS //\n\nexport default getter;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// VARIABLES //\n\nvar GETTERS = {\n\t'complex128': getComplex128,\n\t'complex64': getComplex64,\n\t'default': getArrayLike\n};\n\n\n// FUNCTIONS //\n\n/**\n* Returns an element from a `Complex128Array`.\n*\n* @private\n* @param {Complex128Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Complex128Array from '@stdlib/array-complex128';\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* var arr = new Complex128Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getComplex128( arr, 1 );\n* // returns \n*\n* var re = real( v );\n* // returns 3.0\n*\n* var im = imag( v );\n* // returns 4.0\n*/\nfunction getComplex128( arr, idx ) {\n\treturn arr.get( idx );\n}\n\n/**\n* Returns an element from a `Complex64Array`.\n*\n* @private\n* @param {Complex64Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Complex64Array from '@stdlib/array-complex64';\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* var arr = new Complex64Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getComplex64( arr, 1 );\n* // returns \n*\n* var re = realf( v );\n* // returns 3.0\n*\n* var im = imagf( v );\n* // returns 4.0\n*/\nfunction getComplex64( arr, idx ) {\n\treturn arr.get( idx );\n}\n\n/**\n* Returns an element from an array-like object supporting the get/set protocol.\n*\n* @private\n* @param {Collection} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {*} element value\n*\n* @example\n* var arr = [ 1, 2, 3, 4 ];\n*\n* function get( idx ) {\n* return arr[ idx ];\n* }\n*\n* function set( value, idx ) {\n* arr[ idx ] = value;\n* }\n*\n* arr.get = get;\n* arr.set = set;\n*\n* var v = getArrayLike( arr, 2 );\n* // returns 3\n*/\nfunction getArrayLike( arr, idx ) {\n\treturn arr.get( idx );\n}\n\n\n// MAIN //\n\n/**\n* Returns an accessor function for retrieving an element from an array-like object supporting the get/set protocol.\n*\n* @param {string} dtype - array dtype\n* @returns {Function} accessor\n*\n* @example\n* import Complex64Array from '@stdlib/array-complex64';\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n* import dtype from '@stdlib/array-dtype';\n*\n* var arr = new Complex64Array( [ 1, 2, 3, 4 ] );\n*\n* var get = getter( dtype( arr ) );\n* var v = get( arr, 1 );\n* // returns \n*\n* var re = realf( v );\n* // returns 3.0\n*\n* var im = imagf( v );\n* // returns 4.0\n*/\nfunction getter( dtype ) {\n\tvar f = GETTERS[ dtype ];\n\tif ( typeof f === 'function' ) {\n\t\treturn f;\n\t}\n\treturn GETTERS.default;\n}\n\n\n// EXPORTS //\n\nexport default getter;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isArrayLikeObject from '@stdlib/assert-is-array-like-object';\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport realf from '@stdlib/complex-realf';\nimport imagf from '@stdlib/complex-imagf';\nimport format from '@stdlib/string-format';\n\n\n// MAIN //\n\n/**\n* Returns an array of iterated values.\n*\n* @private\n* @param {Object} it - iterator\n* @returns {(Array|TypeError)} array or an error\n*/\nfunction fromIterator( it ) {\n\tvar out;\n\tvar v;\n\tvar z;\n\n\tout = [];\n\twhile ( true ) {\n\t\tv = it.next();\n\t\tif ( v.done ) {\n\t\t\tbreak;\n\t\t}\n\t\tz = v.value;\n\t\tif ( isArrayLikeObject( z ) && z.length >= 2 ) {\n\t\t\tout.push( z[ 0 ], z[ 1 ] );\n\t\t} else if ( isComplexLike( z ) ) {\n\t\t\tout.push( realf( z ), imagf( z ) );\n\t\t} else {\n\t\t\treturn new TypeError( format( 'invalid argument. An iterator must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', z ) );\n\t\t}\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default fromIterator;\n","/* eslint-disable no-restricted-syntax, max-lines, no-invalid-this */\n\n/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isNonNegativeInteger } from '@stdlib/assert-is-nonnegative-integer';\nimport isArrayLikeObject from '@stdlib/assert-is-array-like-object';\nimport isCollection from '@stdlib/assert-is-collection';\nimport isArrayBuffer from '@stdlib/assert-is-arraybuffer';\nimport isObject from '@stdlib/assert-is-object';\nimport isArray from '@stdlib/assert-is-array';\nimport { isPrimitive as isString } from '@stdlib/assert-is-string';\nimport isFunction from '@stdlib/assert-is-function';\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport isEven from '@stdlib/math-base-assert-is-even';\nimport isInteger from '@stdlib/math-base-assert-is-integer';\nimport isComplex64Array from '@stdlib/array-base-assert-is-complex64array';\nimport isComplex128Array from '@stdlib/array-base-assert-is-complex128array';\nimport hasIteratorSymbolSupport from '@stdlib/assert-has-iterator-symbol-support';\nimport ITERATOR_SYMBOL from '@stdlib/symbol-iterator';\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport setReadOnlyAccessor from '@stdlib/utils-define-nonenumerable-read-only-accessor';\nimport Float32Array from '@stdlib/array-float32';\nimport Complex64 from '@stdlib/complex-float32';\nimport format from '@stdlib/string-format';\nimport realf from '@stdlib/complex-realf';\nimport imagf from '@stdlib/complex-imagf';\nimport floor from '@stdlib/math-base-special-floor';\nimport reinterpret64 from '@stdlib/strided-base-reinterpret-complex64';\nimport reinterpret128 from '@stdlib/strided-base-reinterpret-complex128';\nimport getter from '@stdlib/array-base-getter';\nimport accessorGetter from '@stdlib/array-base-accessor-getter';\nimport fromIterator from './from_iterator.js';\nimport fromIteratorMap from './from_iterator_map.js';\nimport fromArray from './from_array.js';\n\n\n// VARIABLES //\n\nvar BYTES_PER_ELEMENT = Float32Array.BYTES_PER_ELEMENT * 2;\nvar HAS_ITERATOR_SYMBOL = hasIteratorSymbolSupport();\n\n\n// FUNCTIONS //\n\n/**\n* Returns a boolean indicating if a value is a complex typed array.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a complex typed array\n*/\nfunction isComplexArray( value ) {\n\treturn (\n\t\tvalue instanceof Complex64Array ||\n\t\t(\n\t\t\ttypeof value === 'object' &&\n\t\t\tvalue !== null &&\n\t\t\t(\n\t\t\t\tvalue.constructor.name === 'Complex64Array' ||\n\t\t\t\tvalue.constructor.name === 'Complex128Array'\n\t\t\t) &&\n\t\t\ttypeof value._length === 'number' && // eslint-disable-line no-underscore-dangle\n\n\t\t\t// NOTE: we don't perform a more rigorous test here for a typed array for performance reasons, as robustly checking for a typed array instance could require walking the prototype tree and performing relatively expensive constructor checks...\n\t\t\ttypeof value._buffer === 'object' // eslint-disable-line no-underscore-dangle\n\t\t)\n\t);\n}\n\n/**\n* Returns a boolean indicating if a value is a complex typed array constructor.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a complex typed array constructor\n*/\nfunction isComplexArrayConstructor( value ) {\n\treturn (\n\t\tvalue === Complex64Array ||\n\n\t\t// NOTE: weaker test in order to avoid a circular dependency with Complex128Array...\n\t\tvalue.name === 'Complex128Array'\n\t);\n}\n\n/**\n* Retrieves a complex number from a complex number array buffer.\n*\n* @private\n* @param {Float32Array} buf - array buffer\n* @param {NonNegativeInteger} idx - element index\n* @returns {Complex64} complex number\n*/\nfunction getComplex64( buf, idx ) {\n\tidx *= 2;\n\treturn new Complex64( buf[ idx ], buf[ idx+1 ] );\n}\n\n\n// MAIN //\n\n/**\n* 64-bit complex number array constructor.\n*\n* @constructor\n* @param {(NonNegativeInteger|Collection|ArrayBuffer|Iterable)} [arg] - length, typed array, array-like object, buffer, or an iterable\n* @param {NonNegativeInteger} [byteOffset=0] - byte offset\n* @param {NonNegativeInteger} [length] - view length\n* @throws {RangeError} ArrayBuffer byte length must be a multiple of `8`\n* @throws {RangeError} array-like object and typed array input arguments must have a length which is a multiple of two\n* @throws {TypeError} if provided only a single argument, must provide a valid argument\n* @throws {TypeError} byte offset must be a nonnegative integer\n* @throws {RangeError} byte offset must be a multiple of `8`\n* @throws {TypeError} view length must be a positive multiple of `8`\n* @throws {RangeError} must provide sufficient memory to accommodate byte offset and view length requirements\n* @throws {TypeError} an iterator must return either a two element array containing real and imaginary components or a complex number\n* @returns {Complex64Array} complex number array\n*\n* @example\n* var arr = new Complex64Array();\n* // returns \n*\n* var len = arr.length;\n* // returns 0\n*\n* @example\n* var arr = new Complex64Array( 2 );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*\n* @example\n* var arr = new Complex64Array( [ 1.0, -1.0 ] );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* import ArrayBuffer from '@stdlib/array-buffer';\n*\n* var buf = new ArrayBuffer( 16 );\n* var arr = new Complex64Array( buf );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*\n* @example\n* import ArrayBuffer from '@stdlib/array-buffer';\n*\n* var buf = new ArrayBuffer( 16 );\n* var arr = new Complex64Array( buf, 8 );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* import ArrayBuffer from '@stdlib/array-buffer';\n*\n* var buf = new ArrayBuffer( 32 );\n* var arr = new Complex64Array( buf, 8, 2 );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*/\nfunction Complex64Array() {\n\tvar byteOffset;\n\tvar nargs;\n\tvar buf;\n\tvar len;\n\n\tnargs = arguments.length;\n\tif ( !(this instanceof Complex64Array) ) {\n\t\tif ( nargs === 0 ) {\n\t\t\treturn new Complex64Array();\n\t\t}\n\t\tif ( nargs === 1 ) {\n\t\t\treturn new Complex64Array( arguments[0] );\n\t\t}\n\t\tif ( nargs === 2 ) {\n\t\t\treturn new Complex64Array( arguments[0], arguments[1] );\n\t\t}\n\t\treturn new Complex64Array( arguments[0], arguments[1], arguments[2] );\n\t}\n\t// Create the underlying data buffer...\n\tif ( nargs === 0 ) {\n\t\tbuf = new Float32Array( 0 ); // backward-compatibility\n\t} else if ( nargs === 1 ) {\n\t\tif ( isNonNegativeInteger( arguments[0] ) ) {\n\t\t\tbuf = new Float32Array( arguments[0]*2 );\n\t\t} else if ( isCollection( arguments[0] ) ) {\n\t\t\tbuf = arguments[ 0 ];\n\t\t\tlen = buf.length;\n\n\t\t\t// If provided a \"generic\" array, peak at the first value, and, if the value is a complex number, try to process as an array of complex numbers, falling back to \"normal\" typed array initialization if we fail and ensuring consistency if the first value had not been a complex number...\n\t\t\tif ( len && isArray( buf ) && isComplexLike( buf[0] ) ) {\n\t\t\t\tbuf = fromArray( new Float32Array( len*2 ), buf );\n\t\t\t\tif ( buf === null ) {\n\t\t\t\t\t// We failed and we are now forced to allocate a new array :-(\n\t\t\t\t\tif ( !isEven( len ) ) {\n\t\t\t\t\t\tthrow new RangeError( format( 'invalid argument. Array-like object arguments must have a length which is a multiple of two. Length: `%u`.', len ) );\n\t\t\t\t\t}\n\t\t\t\t\t// We failed, so fall back to directly setting values...\n\t\t\t\t\tbuf = new Float32Array( arguments[0] );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ( isComplex64Array( buf ) ) {\n\t\t\t\t\tbuf = reinterpret64( buf, 0 );\n\t\t\t\t} else if ( isComplex128Array( buf ) ) {\n\t\t\t\t\tbuf = reinterpret128( buf, 0 );\n\t\t\t\t} else if ( !isEven( len ) ) {\n\t\t\t\t\tthrow new RangeError( format( 'invalid argument. Array-like object and typed array arguments must have a length which is a multiple of two. Length: `%u`.', len ) );\n\t\t\t\t}\n\t\t\t\tbuf = new Float32Array( buf );\n\t\t\t}\n\t\t} else if ( isArrayBuffer( arguments[0] ) ) {\n\t\t\tbuf = arguments[ 0 ];\n\t\t\tif ( !isInteger( buf.byteLength/BYTES_PER_ELEMENT ) ) {\n\t\t\t\tthrow new RangeError( format( 'invalid argument. ArrayBuffer byte length must be a multiple of %u. Byte length: `%u`.', BYTES_PER_ELEMENT, buf.byteLength ) );\n\t\t\t}\n\t\t\tbuf = new Float32Array( buf );\n\t\t} else if ( isObject( arguments[0] ) ) {\n\t\t\tbuf = arguments[ 0 ];\n\t\t\tif ( HAS_ITERATOR_SYMBOL === false ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Environment lacks Symbol.iterator support. Must provide a length, ArrayBuffer, typed array, or array-like object. Value: `%s`.', buf ) );\n\t\t\t}\n\t\t\tif ( !isFunction( buf[ ITERATOR_SYMBOL ] ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.', buf ) );\n\t\t\t}\n\t\t\tbuf = buf[ ITERATOR_SYMBOL ]();\n\t\t\tif ( !isFunction( buf.next ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.', buf ) ); // FIXME: `buf` is what is returned from above, NOT the original value\n\t\t\t}\n\t\t\tbuf = fromIterator( buf );\n\t\t\tif ( buf instanceof Error ) {\n\t\t\t\tthrow buf;\n\t\t\t}\n\t\t\tbuf = new Float32Array( buf );\n\t\t} else {\n\t\t\tthrow new TypeError( format( 'invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.', arguments[0] ) );\n\t\t}\n\t} else {\n\t\tbuf = arguments[ 0 ];\n\t\tif ( !isArrayBuffer( buf ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. First argument must be an ArrayBuffer. Value: `%s`.', buf ) );\n\t\t}\n\t\tbyteOffset = arguments[ 1 ];\n\t\tif ( !isNonNegativeInteger( byteOffset ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Byte offset must be a nonnegative integer. Value: `%s`.', byteOffset ) );\n\t\t}\n\t\tif ( !isInteger( byteOffset/BYTES_PER_ELEMENT ) ) {\n\t\t\tthrow new RangeError( format( 'invalid argument. Byte offset must be a multiple of %u. Value: `%u`.', BYTES_PER_ELEMENT, byteOffset ) );\n\t\t}\n\t\tif ( nargs === 2 ) {\n\t\t\tlen = buf.byteLength - byteOffset;\n\t\t\tif ( !isInteger( len/BYTES_PER_ELEMENT ) ) {\n\t\t\t\tthrow new RangeError( format( 'invalid arguments. ArrayBuffer view byte length must be a multiple of %u. View byte length: `%u`.', BYTES_PER_ELEMENT, len ) );\n\t\t\t}\n\t\t\tbuf = new Float32Array( buf, byteOffset );\n\t\t} else {\n\t\t\tlen = arguments[ 2 ];\n\t\t\tif ( !isNonNegativeInteger( len ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Length must be a nonnegative integer. Value: `%s`.', len ) );\n\t\t\t}\n\t\t\tif ( (len*BYTES_PER_ELEMENT) > (buf.byteLength-byteOffset) ) {\n\t\t\t\tthrow new RangeError( format( 'invalid arguments. ArrayBuffer has insufficient capacity. Either decrease the array length or provide a bigger buffer. Minimum capacity: `%u`.', len*BYTES_PER_ELEMENT ) );\n\t\t\t}\n\t\t\tbuf = new Float32Array( buf, byteOffset, len*2 );\n\t\t}\n\t}\n\tsetReadOnly( this, '_buffer', buf );\n\tsetReadOnly( this, '_length', buf.length/2 );\n\n\treturn this;\n}\n\n/**\n* Size (in bytes) of each array element.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex64Array\n* @readonly\n* @type {PositiveInteger}\n* @default 8\n*\n* @example\n* var nbytes = Complex64Array.BYTES_PER_ELEMENT;\n* // returns 8\n*/\nsetReadOnly( Complex64Array, 'BYTES_PER_ELEMENT', BYTES_PER_ELEMENT );\n\n/**\n* Constructor name.\n*\n* @name name\n* @memberof Complex64Array\n* @readonly\n* @type {string}\n* @default 'Complex64Array'\n*\n* @example\n* var str = Complex64Array.name;\n* // returns 'Complex64Array'\n*/\nsetReadOnly( Complex64Array, 'name', 'Complex64Array' );\n\n/**\n* Creates a new 64-bit complex number array from an array-like object or an iterable.\n*\n* @name from\n* @memberof Complex64Array\n* @type {Function}\n* @param {(Collection|Iterable)} src - array-like object or iterable\n* @param {Function} [clbk] - callback to invoke for each source element\n* @param {*} [thisArg] - context\n* @throws {TypeError} `this` context must be a constructor\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be an array-like object or an iterable\n* @throws {TypeError} second argument must be a function\n* @throws {RangeError} array-like objects must have a length which is a multiple of two\n* @throws {TypeError} an iterator must return either a two element array containing real and imaginary components or a complex number\n* @throws {TypeError} when provided an iterator, a callback must return either a two element array containing real and imaginary components or a complex number\n* @returns {Complex64Array} 64-bit complex number array\n*\n* @example\n* var arr = Complex64Array.from( [ 1.0, -1.0 ] );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n*\n* var arr = Complex64Array.from( [ new Complex64( 1.0, 1.0 ) ] );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* function clbk( v ) {\n* return new Complex64( realf(v)*2.0, imagf(v)*2.0 );\n* }\n*\n* var arr = Complex64Array.from( [ new Complex64( 1.0, 1.0 ) ], clbk );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*/\nsetReadOnly( Complex64Array, 'from', function from( src ) {\n\tvar thisArg;\n\tvar nargs;\n\tvar clbk;\n\tvar out;\n\tvar buf;\n\tvar tmp;\n\tvar get;\n\tvar len;\n\tvar flg;\n\tvar v;\n\tvar i;\n\tvar j;\n\tif ( !isFunction( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` context must be a constructor.' );\n\t}\n\tif ( !isComplexArrayConstructor( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tnargs = arguments.length;\n\tif ( nargs > 1 ) {\n\t\tclbk = arguments[ 1 ];\n\t\tif ( !isFunction( clbk ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be a function. Value: `%s`.', clbk ) );\n\t\t}\n\t\tif ( nargs > 2 ) {\n\t\t\tthisArg = arguments[ 2 ];\n\t\t}\n\t}\n\tif ( isComplexArray( src ) ) {\n\t\tlen = src.length;\n\t\tif ( clbk ) {\n\t\t\tout = new this( len );\n\t\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\t\tj = 0;\n\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\tv = clbk.call( thisArg, src.get( i ), i );\n\t\t\t\tif ( isComplexLike( v ) ) {\n\t\t\t\t\tbuf[ j ] = realf( v );\n\t\t\t\t\tbuf[ j+1 ] = imagf( v );\n\t\t\t\t} else if ( isArrayLikeObject( v ) && v.length >= 2 ) {\n\t\t\t\t\tbuf[ j ] = v[ 0 ];\n\t\t\t\t\tbuf[ j+1 ] = v[ 1 ];\n\t\t\t\t} else {\n\t\t\t\t\tthrow new TypeError( format( 'invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', v ) );\n\t\t\t\t}\n\t\t\t\tj += 2; // stride\n\t\t\t}\n\t\t\treturn out;\n\t\t}\n\t\treturn new this( src );\n\t}\n\tif ( isCollection( src ) ) {\n\t\tif ( clbk ) {\n\t\t\t// Note: array contents affect how we iterate over a provided data source. If only complex number objects, we can extract real and imaginary components. Otherwise, for non-complex number arrays (e.g., `Float64Array`, etc), we assume a strided array where real and imaginary components are interleaved. In the former case, we expect a callback to return real and imaginary components (possibly as a complex number). In the latter case, we expect a callback to return *either* a real or imaginary component.\n\n\t\t\tlen = src.length;\n\t\t\tif ( src.get && src.set ) {\n\t\t\t\tget = accessorGetter( 'default' );\n\t\t\t} else {\n\t\t\t\tget = getter( 'default' );\n\t\t\t}\n\t\t\t// Detect whether we've been provided an array which returns complex number objects...\n\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\tif ( !isComplexLike( get( src, i ) ) ) {\n\t\t\t\t\tflg = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// If an array does not contain only complex number objects, then we assume interleaved real and imaginary components...\n\t\t\tif ( flg ) {\n\t\t\t\tif ( !isEven( len ) ) {\n\t\t\t\t\tthrow new RangeError( format( 'invalid argument. First argument must have a length which is a multiple of %u. Length: `%u`.', 2, len ) );\n\t\t\t\t}\n\t\t\t\tout = new this( len/2 );\n\t\t\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\t\tbuf[ i ] = clbk.call( thisArg, get( src, i ), i );\n\t\t\t\t}\n\t\t\t\treturn out;\n\t\t\t}\n\t\t\t// If an array contains only complex number objects, then we need to extract real and imaginary components...\n\t\t\tout = new this( len );\n\t\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\t\tj = 0;\n\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\tv = clbk.call( thisArg, get( src, i ), i );\n\t\t\t\tif ( isComplexLike( v ) ) {\n\t\t\t\t\tbuf[ j ] = realf( v );\n\t\t\t\t\tbuf[ j+1 ] = imagf( v );\n\t\t\t\t} else if ( isArrayLikeObject( v ) && v.length >= 2 ) {\n\t\t\t\t\tbuf[ j ] = v[ 0 ];\n\t\t\t\t\tbuf[ j+1 ] = v[ 1 ];\n\t\t\t\t} else {\n\t\t\t\t\tthrow new TypeError( format( 'invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', v ) );\n\t\t\t\t}\n\t\t\t\tj += 2; // stride\n\t\t\t}\n\t\t\treturn out;\n\t\t}\n\t\treturn new this( src );\n\t}\n\tif ( isObject( src ) && HAS_ITERATOR_SYMBOL && isFunction( src[ ITERATOR_SYMBOL ] ) ) { // eslint-disable-line max-len\n\t\tbuf = src[ ITERATOR_SYMBOL ]();\n\t\tif ( !isFunction( buf.next ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.', src ) );\n\t\t}\n\t\tif ( clbk ) {\n\t\t\ttmp = fromIteratorMap( buf, clbk, thisArg );\n\t\t} else {\n\t\t\ttmp = fromIterator( buf );\n\t\t}\n\t\tif ( tmp instanceof Error ) {\n\t\t\tthrow tmp;\n\t\t}\n\t\tlen = tmp.length / 2;\n\t\tout = new this( len );\n\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\tbuf[ i ] = tmp[ i ];\n\t\t}\n\t\treturn out;\n\t}\n\tthrow new TypeError( format( 'invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.', src ) );\n});\n\n/**\n* Creates a new 64-bit complex number array from a variable number of arguments.\n*\n* @name of\n* @memberof Complex64Array\n* @type {Function}\n* @param {...*} element - array elements\n* @throws {TypeError} `this` context must be a constructor\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Complex64Array} 64-bit complex number array\n*\n* @example\n* var arr = Complex64Array.of( 1.0, 1.0, 1.0, 1.0 );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*/\nsetReadOnly( Complex64Array, 'of', function of() {\n\tvar args;\n\tvar i;\n\tif ( !isFunction( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` context must be a constructor.' );\n\t}\n\tif ( !isComplexArrayConstructor( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\targs = [];\n\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\targs.push( arguments[ i ] );\n\t}\n\treturn new this( args );\n});\n\n/**\n* Returns an array element with support for both nonnegative and negative integer indices.\n*\n* @name at\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {integer} idx - element index\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} must provide an integer\n* @returns {(Complex64|void)} array element\n*\n* @example\n* var arr = new Complex64Array( 10 );\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* var z = arr.at( 0 );\n* // returns \n*\n* var re = realf( z );\n* // returns 0.0\n*\n* var im = imagf( z );\n* // returns 0.0\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 9.0, -9.0 ], 9 );\n*\n* z = arr.at( 0 );\n* // returns \n*\n* re = realf( z );\n* // returns 1.0\n*\n* im = imagf( z );\n* // returns -1.0\n*\n* z = arr.at( -1 );\n* // returns \n*\n* re = realf( z );\n* // returns 9.0\n*\n* im = imagf( z );\n* // returns -9.0\n*\n* z = arr.at( 100 );\n* // returns undefined\n*\n* z = arr.at( -100 );\n* // returns undefined\n*/\nsetReadOnly( Complex64Array.prototype, 'at', function at( idx ) {\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isInteger( idx ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Must provide an integer. Value: `%s`.', idx ) );\n\t}\n\tif ( idx < 0 ) {\n\t\tidx += this._length;\n\t}\n\tif ( idx < 0 || idx >= this._length ) {\n\t\treturn;\n\t}\n\treturn getComplex64( this._buffer, idx );\n});\n\n/**\n* Pointer to the underlying data buffer.\n*\n* @name buffer\n* @memberof Complex64Array.prototype\n* @readonly\n* @type {ArrayBuffer}\n*\n* @example\n* var arr = new Complex64Array( 10 );\n*\n* var buf = arr.buffer;\n* // returns \n*/\nsetReadOnlyAccessor( Complex64Array.prototype, 'buffer', function get() {\n\treturn this._buffer.buffer;\n});\n\n/**\n* Size (in bytes) of the array.\n*\n* @name byteLength\n* @memberof Complex64Array.prototype\n* @readonly\n* @type {NonNegativeInteger}\n*\n* @example\n* var arr = new Complex64Array( 10 );\n*\n* var byteLength = arr.byteLength;\n* // returns 80\n*/\nsetReadOnlyAccessor( Complex64Array.prototype, 'byteLength', function get() {\n\treturn this._buffer.byteLength;\n});\n\n/**\n* Offset (in bytes) of the array from the start of its underlying `ArrayBuffer`.\n*\n* @name byteOffset\n* @memberof Complex64Array.prototype\n* @readonly\n* @type {NonNegativeInteger}\n*\n* @example\n* var arr = new Complex64Array( 10 );\n*\n* var byteOffset = arr.byteOffset;\n* // returns 0\n*/\nsetReadOnlyAccessor( Complex64Array.prototype, 'byteOffset', function get() {\n\treturn this._buffer.byteOffset;\n});\n\n/**\n* Size (in bytes) of each array element.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex64Array.prototype\n* @readonly\n* @type {PositiveInteger}\n* @default 8\n*\n* @example\n* var arr = new Complex64Array( 10 );\n*\n* var nbytes = arr.BYTES_PER_ELEMENT;\n* // returns 8\n*/\nsetReadOnly( Complex64Array.prototype, 'BYTES_PER_ELEMENT', Complex64Array.BYTES_PER_ELEMENT );\n\n/**\n* Copies a sequence of elements within the array to the position starting at `target`.\n*\n* @name copyWithin\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {integer} target - index at which to start copying elements\n* @param {integer} start - source index at which to copy elements from\n* @param {integer} [end] - source index at which to stop copying elements from\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Complex64Array} modified array\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* var arr = new Complex64Array( 4 );\n*\n* // Set the array elements:\n* arr.set( new Complex64( 1.0, 1.0 ), 0 );\n* arr.set( new Complex64( 2.0, 2.0 ), 1 );\n* arr.set( new Complex64( 3.0, 3.0 ), 2 );\n* arr.set( new Complex64( 4.0, 4.0 ), 3 );\n*\n* // Copy the first two elements to the last two elements:\n* arr.copyWithin( 2, 0, 2 );\n*\n* // Get the last array element:\n* var z = arr.get( 3 );\n*\n* var re = realf( z );\n* // returns 2.0\n*\n* var im = imagf( z );\n* // returns 2.0\n*/\nsetReadOnly( Complex64Array.prototype, 'copyWithin', function copyWithin( target, start ) {\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\t// FIXME: prefer a functional `copyWithin` implementation which addresses lack of universal browser support (e.g., IE11 and Safari) or ensure that typed arrays are polyfilled\n\tif ( arguments.length === 2 ) {\n\t\tthis._buffer.copyWithin( target*2, start*2 );\n\t} else {\n\t\tthis._buffer.copyWithin( target*2, start*2, arguments[2]*2 );\n\t}\n\treturn this;\n});\n\n/**\n* Returns an iterator for iterating over array key-value pairs.\n*\n* @name entries\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Iterator} iterator\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n*\n* var arr = [\n* new Complex64( 1.0, 1.0 ),\n* new Complex64( 2.0, 2.0 ),\n* new Complex64( 3.0, 3.0 )\n* ];\n* arr = new Complex64Array( arr );\n*\n* // Create an iterator:\n* var it = arr.entries();\n*\n* // Iterate over the key-value pairs...\n* var v = it.next().value;\n* // returns [ 0, ]\n*\n* v = it.next().value;\n* // returns [ 1, ]\n*\n* v = it.next().value;\n* // returns [ 2, ]\n*\n* var bool = it.next().done;\n* // returns true\n*/\nsetReadOnly( Complex64Array.prototype, 'entries', function entries() {\n\tvar buffer;\n\tvar self;\n\tvar iter;\n\tvar len;\n\tvar FLG;\n\tvar i;\n\tvar j;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tself = this;\n\tbuffer = this._buffer;\n\tlen = this._length;\n\n\t// Initialize the iteration indices:\n\ti = -1;\n\tj = -2;\n\n\t// Create an iterator protocol-compliant object:\n\titer = {};\n\tsetReadOnly( iter, 'next', next );\n\tsetReadOnly( iter, 'return', end );\n\n\tif ( ITERATOR_SYMBOL ) {\n\t\tsetReadOnly( iter, ITERATOR_SYMBOL, factory );\n\t}\n\treturn iter;\n\n\t/**\n\t* Returns an iterator protocol-compliant object containing the next iterated value.\n\t*\n\t* @private\n\t* @returns {Object} iterator protocol-compliant object\n\t*/\n\tfunction next() {\n\t\tvar z;\n\t\ti += 1;\n\t\tif ( FLG || i >= len ) {\n\t\t\treturn {\n\t\t\t\t'done': true\n\t\t\t};\n\t\t}\n\t\tj += 2;\n\t\tz = new Complex64( buffer[ j ], buffer[ j+1 ] );\n\t\treturn {\n\t\t\t'value': [ i, z ],\n\t\t\t'done': false\n\t\t};\n\t}\n\n\t/**\n\t* Finishes an iterator.\n\t*\n\t* @private\n\t* @param {*} [value] - value to return\n\t* @returns {Object} iterator protocol-compliant object\n\t*/\n\tfunction end( value ) {\n\t\tFLG = true;\n\t\tif ( arguments.length ) {\n\t\t\treturn {\n\t\t\t\t'value': value,\n\t\t\t\t'done': true\n\t\t\t};\n\t\t}\n\t\treturn {\n\t\t\t'done': true\n\t\t};\n\t}\n\n\t/**\n\t* Returns a new iterator.\n\t*\n\t* @private\n\t* @returns {Iterator} iterator\n\t*/\n\tfunction factory() {\n\t\treturn self.entries();\n\t}\n});\n\n/**\n* Tests whether all elements in an array pass a test implemented by a predicate function.\n*\n* @name every\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {boolean} boolean indicating whether all elements pass a test\n*\n* @example\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* function predicate( v ) {\n* return ( realf( v ) === imagf( v ) );\n* }\n*\n* var arr = new Complex64Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var bool = arr.every( predicate );\n* // returns true\n*/\nsetReadOnly( Complex64Array.prototype, 'every', function every( predicate, thisArg ) {\n\tvar buf;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tif ( !predicate.call( thisArg, getComplex64( buf, i ), i, this ) ) {\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn true;\n});\n\n/**\n* Returns a modified typed array filled with a fill value.\n*\n* @name fill\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {ComplexLike} value - fill value\n* @param {integer} [start=0] - starting index (inclusive)\n* @param {integer} [end] - ending index (exclusive)\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a complex number\n* @throws {TypeError} second argument must be an integer\n* @throws {TypeError} third argument must be an integer\n*\n* @example\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* var arr = new Complex64Array( 3 );\n*\n* arr.fill( new Complex64( 1.0, 1.0 ), 1 );\n*\n* var z = arr.get( 1 );\n* // returns \n*\n* var re = realf( z );\n* // returns 1.0\n*\n* var im = imagf( z );\n* // returns 1.0\n*\n* z = arr.get( 1 );\n* // returns \n*\n* re = realf( z );\n* // returns 1.0\n*\n* im = imagf( z );\n* // returns 1.0\n*/\nsetReadOnly( Complex64Array.prototype, 'fill', function fill( value, start, end ) {\n\tvar buf;\n\tvar len;\n\tvar idx;\n\tvar re;\n\tvar im;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isComplexLike( value ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a complex number. Value: `%s`.', value ) );\n\t}\n\tbuf = this._buffer;\n\tlen = this._length;\n\tif ( arguments.length > 1 ) {\n\t\tif ( !isInteger( start ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be an integer. Value: `%s`.', start ) );\n\t\t}\n\t\tif ( start < 0 ) {\n\t\t\tstart += len;\n\t\t\tif ( start < 0 ) {\n\t\t\t\tstart = 0;\n\t\t\t}\n\t\t}\n\t\tif ( arguments.length > 2 ) {\n\t\t\tif ( !isInteger( end ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Third argument must be an integer. Value: `%s`.', end ) );\n\t\t\t}\n\t\t\tif ( end < 0 ) {\n\t\t\t\tend += len;\n\t\t\t\tif ( end < 0 ) {\n\t\t\t\t\tend = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( end > len ) {\n\t\t\t\tend = len;\n\t\t\t}\n\t\t} else {\n\t\t\tend = len;\n\t\t}\n\t} else {\n\t\tstart = 0;\n\t\tend = len;\n\t}\n\tre = realf( value );\n\tim = imagf( value );\n\tfor ( i = start; i < end; i++ ) {\n\t\tidx = 2*i;\n\t\tbuf[ idx ] = re;\n\t\tbuf[ idx+1 ] = im;\n\t}\n\treturn this;\n});\n\n/**\n* Returns a new array containing the elements of an array which pass a test implemented by a predicate function.\n*\n* @name filter\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {Complex64Array} complex number array\n*\n* @example\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* function predicate( v ) {\n* return ( realf( v ) === imagf( v ) );\n* }\n*\n* var arr = new Complex64Array( 3 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n*\n* var out = arr.filter( predicate );\n* // returns \n*\n* var len = out.length;\n* // returns 1\n*\n* var z = out.get( 0 );\n* // returns \n*\n* var re = realf( z );\n* // returns 2.0\n*\n* var im = imagf( z );\n* // returns 2.0\n*/\nsetReadOnly( Complex64Array.prototype, 'filter', function filter( predicate, thisArg ) {\n\tvar buf;\n\tvar out;\n\tvar i;\n\tvar z;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tout = [];\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tz = getComplex64( buf, i );\n\t\tif ( predicate.call( thisArg, z, i, this ) ) {\n\t\t\tout.push( z );\n\t\t}\n\t}\n\treturn new this.constructor( out );\n});\n\n/**\n* Returns the first element in an array for which a predicate function returns a truthy value.\n*\n* @name find\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {(Complex64|void)} array element or undefined\n*\n* @example\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n* import Complex64 from '@stdlib/complex-float32';\n*\n* function predicate( v ) {\n* return ( realf( v ) === imagf( v ) );\n* }\n*\n* var arr = new Complex64Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var z = arr.find( predicate );\n* // returns \n*\n* var re = realf( z );\n* // returns 1.0\n*\n* var im = imagf( z );\n* // returns 1.0\n*/\nsetReadOnly( Complex64Array.prototype, 'find', function find( predicate, thisArg ) {\n\tvar buf;\n\tvar i;\n\tvar z;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tz = getComplex64( buf, i );\n\t\tif ( predicate.call( thisArg, z, i, this ) ) {\n\t\t\treturn z;\n\t\t}\n\t}\n});\n\n/**\n* Returns the index of the first element in an array for which a predicate function returns a truthy value.\n*\n* @name findIndex\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {integer} index or -1\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* function predicate( v ) {\n* return ( realf( v ) === imagf( v ) );\n* }\n*\n* var arr = new Complex64Array( 3 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var idx = arr.findIndex( predicate );\n* // returns 2\n*/\nsetReadOnly( Complex64Array.prototype, 'findIndex', function findIndex( predicate, thisArg ) {\n\tvar buf;\n\tvar i;\n\tvar z;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tz = getComplex64( buf, i );\n\t\tif ( predicate.call( thisArg, z, i, this ) ) {\n\t\t\treturn i;\n\t\t}\n\t}\n\treturn -1;\n});\n\n/**\n* Returns the last element in an array for which a predicate function returns a truthy value.\n*\n* @name findLast\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {(Complex64|void)} array element or undefined\n*\n* @example\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n* import Complex64 from '@stdlib/complex-float32';\n*\n* function predicate( v ) {\n* return ( realf( v ) === imagf( v ) );\n* }\n*\n* var arr = new Complex64Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var z = arr.findLast( predicate );\n* // returns \n*\n* var re = realf( z );\n* // returns 3.0\n*\n* var im = imagf( z );\n* // returns 3.0\n*/\nsetReadOnly( Complex64Array.prototype, 'findLast', function findLast( predicate, thisArg ) {\n\tvar buf;\n\tvar i;\n\tvar z;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = this._length-1; i >= 0; i-- ) {\n\t\tz = getComplex64( buf, i );\n\t\tif ( predicate.call( thisArg, z, i, this ) ) {\n\t\t\treturn z;\n\t\t}\n\t}\n});\n\n/**\n* Returns the index of the last element in an array for which a predicate function returns a truthy value.\n*\n* @name findLastIndex\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {integer} index or -1\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* function predicate( v ) {\n* return ( realf( v ) === imagf( v ) );\n* }\n*\n* var arr = new Complex64Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n*\n* var idx = arr.findLastIndex( predicate );\n* // returns 1\n*/\nsetReadOnly( Complex64Array.prototype, 'findLastIndex', function findLastIndex( predicate, thisArg ) {\n\tvar buf;\n\tvar i;\n\tvar z;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = this._length-1; i >= 0; i-- ) {\n\t\tz = getComplex64( buf, i );\n\t\tif ( predicate.call( thisArg, z, i, this ) ) {\n\t\t\treturn i;\n\t\t}\n\t}\n\treturn -1;\n});\n\n/**\n* Invokes a function once for each array element.\n*\n* @name forEach\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {Function} fcn - function to invoke\n* @param {*} [thisArg] - function invocation context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n*\n* function log( v, i ) {\n* console.log( '%s: %s', i, v.toString() );\n* }\n*\n* var arr = new Complex64Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* arr.forEach( log );\n*/\nsetReadOnly( Complex64Array.prototype, 'forEach', function forEach( fcn, thisArg ) {\n\tvar buf;\n\tvar i;\n\tvar z;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( fcn ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', fcn ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tz = getComplex64( buf, i );\n\t\tfcn.call( thisArg, z, i, this );\n\t}\n});\n\n/**\n* Returns an array element.\n*\n* @name get\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {NonNegativeInteger} idx - element index\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} must provide a nonnegative integer\n* @returns {(Complex64|void)} array element\n*\n* @example\n* var arr = new Complex64Array( 10 );\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* var z = arr.get( 0 );\n* // returns \n*\n* var re = realf( z );\n* // returns 0.0\n*\n* var im = imagf( z );\n* // returns 0.0\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n*\n* z = arr.get( 0 );\n* // returns \n*\n* re = realf( z );\n* // returns 1.0\n*\n* im = imagf( z );\n* // returns -1.0\n*\n* z = arr.get( 100 );\n* // returns undefined\n*/\nsetReadOnly( Complex64Array.prototype, 'get', function get( idx ) {\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isNonNegativeInteger( idx ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Must provide a nonnegative integer. Value: `%s`.', idx ) );\n\t}\n\tif ( idx >= this._length ) {\n\t\treturn;\n\t}\n\treturn getComplex64( this._buffer, idx );\n});\n\n/**\n* Returns a boolean indicating whether an array includes a provided value.\n*\n* @name includes\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {ComplexLike} searchElement - search element\n* @param {integer} [fromIndex=0] - starting index (inclusive)\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a complex number\n* @throws {TypeError} second argument must be an integer\n* @returns {boolean} boolean indicating whether an array includes a provided value\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n*\n* var arr = new Complex64Array( 5 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n* arr.set( [ 4.0, -4.0 ], 3 );\n* arr.set( [ 5.0, -5.0 ], 4 );\n*\n* var bool = arr.includes( new Complex64( 3.0, -3.0 ) );\n* // returns true\n*\n* bool = arr.includes( new Complex64( 3.0, -3.0 ), 3 );\n* // returns false\n*\n* bool = arr.includes( new Complex64( 4.0, -4.0 ), -3 );\n* // returns true\n*/\nsetReadOnly( Complex64Array.prototype, 'includes', function includes( searchElement, fromIndex ) {\n\tvar buf;\n\tvar idx;\n\tvar re;\n\tvar im;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isComplexLike( searchElement ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a complex number. Value: `%s`.', searchElement ) );\n\t}\n\tif ( arguments.length > 1 ) {\n\t\tif ( !isInteger( fromIndex ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be an integer. Value: `%s`.', fromIndex ) );\n\t\t}\n\t\tif ( fromIndex < 0 ) {\n\t\t\tfromIndex += this._length;\n\t\t\tif ( fromIndex < 0 ) {\n\t\t\t\tfromIndex = 0;\n\t\t\t}\n\t\t}\n\t} else {\n\t\tfromIndex = 0;\n\t}\n\tre = realf( searchElement );\n\tim = imagf( searchElement );\n\tbuf = this._buffer;\n\tfor ( i = fromIndex; i < this._length; i++ ) {\n\t\tidx = 2 * i;\n\t\tif ( re === buf[ idx ] && im === buf[ idx+1 ] ) {\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n});\n\n/**\n* Returns the first index at which a given element can be found.\n*\n* @name indexOf\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {ComplexLike} searchElement - element to find\n* @param {integer} [fromIndex=0] - starting index (inclusive)\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a complex number\n* @throws {TypeError} second argument must be an integer\n* @returns {integer} index or -1\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n*\n* var arr = new Complex64Array( 10 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n* arr.set( [ 4.0, -4.0 ], 3 );\n* arr.set( [ 5.0, -5.0 ], 4 );\n*\n* var idx = arr.indexOf( new Complex64( 3.0, -3.0 ) );\n* // returns 2\n*\n* idx = arr.indexOf( new Complex64( 3.0, -3.0 ), 3 );\n* // returns -1\n*\n* idx = arr.indexOf( new Complex64( 4.0, -4.0 ), -3 );\n* // returns -1\n*/\nsetReadOnly( Complex64Array.prototype, 'indexOf', function indexOf( searchElement, fromIndex ) {\n\tvar buf;\n\tvar idx;\n\tvar re;\n\tvar im;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isComplexLike( searchElement ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a complex number. Value: `%s`.', searchElement ) );\n\t}\n\tif ( arguments.length > 1 ) {\n\t\tif ( !isInteger( fromIndex ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be an integer. Value: `%s`.', fromIndex ) );\n\t\t}\n\t\tif ( fromIndex < 0 ) {\n\t\t\tfromIndex += this._length;\n\t\t\tif ( fromIndex < 0 ) {\n\t\t\t\tfromIndex = 0;\n\t\t\t}\n\t\t}\n\t} else {\n\t\tfromIndex = 0;\n\t}\n\tre = realf( searchElement );\n\tim = imagf( searchElement );\n\tbuf = this._buffer;\n\tfor ( i = fromIndex; i < this._length; i++ ) {\n\t\tidx = 2 * i;\n\t\tif ( re === buf[ idx ] && im === buf[ idx+1 ] ) {\n\t\t\treturn i;\n\t\t}\n\t}\n\treturn -1;\n});\n\n/**\n* Returns a new string by concatenating all array elements.\n*\n* @name join\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {string} [separator=','] - element separator\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a string\n* @returns {string} string representation\n*\n* @example\n* var arr = new Complex64Array( 2 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n*\n* var str = arr.join();\n* // returns '1 + 1i,2 + 2i'\n*\n* str = arr.join( '/' );\n* // returns '1 + 1i/2 + 2i'\n*/\nsetReadOnly( Complex64Array.prototype, 'join', function join( separator ) {\n\tvar out;\n\tvar buf;\n\tvar sep;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( arguments.length === 0 ) {\n\t\tsep = ',';\n\t} else if ( isString( separator ) ) {\n\t\tsep = separator;\n\t} else {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a string. Value: `%s`.', separator ) );\n\t}\n\tout = [];\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tout.push( getComplex64( buf, i ).toString() );\n\t}\n\treturn out.join( sep );\n});\n\n/**\n* Returns the last index at which a given element can be found.\n*\n* @name lastIndexOf\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {ComplexLike} searchElement - element to find\n* @param {integer} [fromIndex] - index at which to start searching backward (inclusive)\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a complex number\n* @throws {TypeError} second argument must be an integer\n* @returns {integer} index or -1\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n*\n* var arr = new Complex64Array( 5 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n* arr.set( [ 4.0, -4.0 ], 3 );\n* arr.set( [ 3.0, -3.0 ], 4 );\n*\n* var idx = arr.lastIndexOf( new Complex64( 3.0, -3.0 ) );\n* // returns 4\n*\n* idx = arr.lastIndexOf( new Complex64( 3.0, -3.0 ), 3 );\n* // returns 2\n*\n* idx = arr.lastIndexOf( new Complex64( 5.0, -5.0 ), 3 );\n* // returns -1\n*\n* idx = arr.lastIndexOf( new Complex64( 2.0, -2.0 ), -3 );\n* // returns 1\n*/\nsetReadOnly( Complex64Array.prototype, 'lastIndexOf', function lastIndexOf( searchElement, fromIndex ) {\n\tvar buf;\n\tvar idx;\n\tvar re;\n\tvar im;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isComplexLike( searchElement ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a complex number. Value: `%s`.', searchElement ) );\n\t}\n\tif ( arguments.length > 1 ) {\n\t\tif ( !isInteger( fromIndex ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be an integer. Value: `%s`.', fromIndex ) );\n\t\t}\n\t\tif ( fromIndex >= this._length ) {\n\t\t\tfromIndex = this._length - 1;\n\t\t} else if ( fromIndex < 0 ) {\n\t\t\tfromIndex += this._length;\n\t\t}\n\t} else {\n\t\tfromIndex = this._length - 1;\n\t}\n\tre = realf( searchElement );\n\tim = imagf( searchElement );\n\tbuf = this._buffer;\n\tfor ( i = fromIndex; i >= 0; i-- ) {\n\t\tidx = 2 * i;\n\t\tif ( re === buf[ idx ] && im === buf[ idx+1 ] ) {\n\t\t\treturn i;\n\t\t}\n\t}\n\treturn -1;\n});\n\n/**\n* Number of array elements.\n*\n* @name length\n* @memberof Complex64Array.prototype\n* @readonly\n* @type {NonNegativeInteger}\n*\n* @example\n* var arr = new Complex64Array( 10 );\n*\n* var len = arr.length;\n* // returns 10\n*/\nsetReadOnlyAccessor( Complex64Array.prototype, 'length', function get() {\n\treturn this._length;\n});\n\n/**\n* Returns a new array with each element being the result of a provided callback function.\n*\n* @name map\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {Function} fcn - callback function\n* @param {*} [thisArg] - callback function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {Complex64Array} complex number array\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* function scale( v, i ) {\n* return new Complex64( 2.0*realf( v ), 2.0*imagf( v ) );\n* }\n*\n* var arr = new Complex64Array( 3 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n*\n* var out = arr.map( scale );\n* // returns \n*\n* var z = out.get( 0 );\n* // returns \n*\n* var re = realf( z );\n* // returns 2\n*\n* var im = imagf( z );\n* // returns -2\n*/\nsetReadOnly( Complex64Array.prototype, 'map', function map( fcn, thisArg ) {\n\tvar outbuf;\n\tvar buf;\n\tvar out;\n\tvar i;\n\tvar v;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( fcn ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', fcn ) );\n\t}\n\tbuf = this._buffer;\n\tout = new this.constructor( this._length );\n\toutbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tv = fcn.call( thisArg, getComplex64( buf, i ), i, this );\n\t\tif ( isComplexLike( v ) ) {\n\t\t\toutbuf[ 2*i ] = realf( v );\n\t\t\toutbuf[ (2*i)+1 ] = imagf( v );\n\t\t} else if ( isArrayLikeObject( v ) && v.length === 2 ) {\n\t\t\toutbuf[ 2*i ] = v[ 0 ];\n\t\t\toutbuf[ (2*i)+1 ] = v[ 1 ];\n\t\t} else {\n\t\t\tthrow new TypeError( format( 'invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', v ) );\n\t\t}\n\t}\n\treturn out;\n});\n\n/**\n* Reverses an array in-place.\n*\n* @name reverse\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Complex64Array} reversed array\n*\n* @example\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* var arr = new Complex64Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var out = arr.reverse();\n* // returns \n*\n* var z = out.get( 0 );\n* // returns \n*\n* var re = realf( z );\n* // returns 3.0\n*\n* var im = imagf( z );\n* // returns 3.0\n*\n* z = out.get( 1 );\n* // returns \n*\n* re = realf( z );\n* // returns 2.0\n*\n* im = imagf( z );\n* // returns 2.0\n*\n* z = out.get( 2 );\n* // returns \n*\n* re = realf( z );\n* // returns 1.0\n*\n* im = imagf( z );\n* // returns 1.0\n*/\nsetReadOnly( Complex64Array.prototype, 'reverse', function reverse() {\n\tvar buf;\n\tvar tmp;\n\tvar len;\n\tvar N;\n\tvar i;\n\tvar j;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tlen = this._length;\n\tbuf = this._buffer;\n\tN = floor( len / 2 );\n\tfor ( i = 0; i < N; i++ ) {\n\t\tj = len - i - 1;\n\t\ttmp = buf[ (2*i) ];\n\t\tbuf[ (2*i) ] = buf[ (2*j) ];\n\t\tbuf[ (2*j) ] = tmp;\n\t\ttmp = buf[ (2*i)+1 ];\n\t\tbuf[ (2*i)+1 ] = buf[ (2*j)+1 ];\n\t\tbuf[ (2*j)+1 ] = tmp;\n\t}\n\treturn this;\n});\n\n/**\n* Sets an array element.\n*\n* ## Notes\n*\n* - When provided a typed array, real or complex, we must check whether the source array shares the same buffer as the target array and whether the underlying memory overlaps. In particular, we are concerned with the following scenario:\n*\n* ```text\n* buf: ---------------------\n* src: ---------------------\n* ```\n*\n* In the above, as we copy values from `src`, we will overwrite values in the `src` view, resulting in duplicated values copied into the end of `buf`, which is not intended. Hence, to avoid overwriting source values, we must **copy** source values to a temporary array.\n*\n* In the other overlapping scenario,\n*\n* ```text\n* buf: ---------------------\n* src: ---------------------\n* ```\n*\n* by the time we begin copying into the overlapping region, we are copying from the end of `src`, a non-overlapping region, which means we don't run the risk of copying copied values, rather than the original `src` values, as intended.\n*\n* @name set\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {(Collection|Complex|ComplexArray)} value - value(s)\n* @param {NonNegativeInteger} [i=0] - element index at which to start writing values\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be either a complex number, an array-like object, or a complex number array\n* @throws {TypeError} index argument must be a nonnegative integer\n* @throws {RangeError} array-like objects must have a length which is a multiple of two\n* @throws {RangeError} index argument is out-of-bounds\n* @throws {RangeError} target array lacks sufficient storage to accommodate source values\n* @returns {void}\n*\n* @example\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* var arr = new Complex64Array( 10 );\n*\n* var z = arr.get( 0 );\n* // returns \n*\n* var re = realf( z );\n* // returns 0.0\n*\n* var im = imagf( z );\n* // returns 0.0\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n*\n* z = arr.get( 0 );\n* // returns \n*\n* re = realf( z );\n* // returns 1.0\n*\n* im = imagf( z );\n* // returns -1.0\n*/\nsetReadOnly( Complex64Array.prototype, 'set', function set( value ) {\n\t/* eslint-disable no-underscore-dangle */\n\tvar sbuf;\n\tvar idx;\n\tvar buf;\n\tvar tmp;\n\tvar flg;\n\tvar N;\n\tvar v;\n\tvar i;\n\tvar j;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tbuf = this._buffer;\n\tif ( arguments.length > 1 ) {\n\t\tidx = arguments[ 1 ];\n\t\tif ( !isNonNegativeInteger( idx ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Index argument must be a nonnegative integer. Value: `%s`.', idx ) );\n\t\t}\n\t} else {\n\t\tidx = 0;\n\t}\n\tif ( isComplexLike( value ) ) {\n\t\tif ( idx >= this._length ) {\n\t\t\tthrow new RangeError( format( 'invalid argument. Index argument is out-of-bounds. Value: `%u`.', idx ) );\n\t\t}\n\t\tidx *= 2;\n\t\tbuf[ idx ] = realf( value );\n\t\tbuf[ idx+1 ] = imagf( value );\n\t\treturn;\n\t}\n\tif ( isComplexArray( value ) ) {\n\t\tN = value._length;\n\t\tif ( idx+N > this._length ) {\n\t\t\tthrow new RangeError( 'invalid arguments. Target array lacks sufficient storage to accommodate source values.' );\n\t\t}\n\t\tsbuf = value._buffer;\n\n\t\t// Check for overlapping memory...\n\t\tj = buf.byteOffset + (idx*BYTES_PER_ELEMENT);\n\t\tif (\n\t\t\tsbuf.buffer === buf.buffer &&\n\t\t\t(\n\t\t\t\tsbuf.byteOffset < j &&\n\t\t\t\tsbuf.byteOffset+sbuf.byteLength > j\n\t\t\t)\n\t\t) {\n\t\t\t// We need to copy source values...\n\t\t\ttmp = new Float32Array( sbuf.length );\n\t\t\tfor ( i = 0; i < sbuf.length; i++ ) {\n\t\t\t\ttmp[ i ] = sbuf[ i ];\n\t\t\t}\n\t\t\tsbuf = tmp;\n\t\t}\n\t\tidx *= 2;\n\t\tj = 0;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\tbuf[ idx ] = sbuf[ j ];\n\t\t\tbuf[ idx+1 ] = sbuf[ j+1 ];\n\t\t\tidx += 2; // stride\n\t\t\tj += 2; // stride\n\t\t}\n\t\treturn;\n\t}\n\tif ( isCollection( value ) ) {\n\t\t// Detect whether we've been provided an array of complex numbers...\n\t\tN = value.length;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\tif ( !isComplexLike( value[ i ] ) ) {\n\t\t\t\tflg = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t// If an array does not contain only complex numbers, then we assume interleaved real and imaginary components...\n\t\tif ( flg ) {\n\t\t\tif ( !isEven( N ) ) {\n\t\t\t\tthrow new RangeError( format( 'invalid argument. Array-like object arguments must have a length which is a multiple of two. Length: `%u`.', N ) );\n\t\t\t}\n\t\t\tif ( idx+(N/2) > this._length ) {\n\t\t\t\tthrow new RangeError( 'invalid arguments. Target array lacks sufficient storage to accommodate source values.' );\n\t\t\t}\n\t\t\tsbuf = value;\n\n\t\t\t// Check for overlapping memory...\n\t\t\tj = buf.byteOffset + (idx*BYTES_PER_ELEMENT);\n\t\t\tif (\n\t\t\t\tsbuf.buffer === buf.buffer &&\n\t\t\t\t(\n\t\t\t\t\tsbuf.byteOffset < j &&\n\t\t\t\t\tsbuf.byteOffset+sbuf.byteLength > j\n\t\t\t\t)\n\t\t\t) {\n\t\t\t\t// We need to copy source values...\n\t\t\t\ttmp = new Float32Array( N );\n\t\t\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\t\t\ttmp[ i ] = sbuf[ i ]; // TODO: handle accessor arrays\n\t\t\t\t}\n\t\t\t\tsbuf = tmp;\n\t\t\t}\n\t\t\tidx *= 2;\n\t\t\tN /= 2;\n\t\t\tj = 0;\n\t\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\t\tbuf[ idx ] = sbuf[ j ];\n\t\t\t\tbuf[ idx+1 ] = sbuf[ j+1 ];\n\t\t\t\tidx += 2; // stride\n\t\t\t\tj += 2; // stride\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\t// If an array contains only complex numbers, then we need to extract real and imaginary components...\n\t\tif ( idx+N > this._length ) {\n\t\t\tthrow new RangeError( 'invalid arguments. Target array lacks sufficient storage to accommodate source values.' );\n\t\t}\n\t\tidx *= 2;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\tv = value[ i ];\n\t\t\tbuf[ idx ] = realf( v );\n\t\t\tbuf[ idx+1 ] = imagf( v );\n\t\t\tidx += 2; // stride\n\t\t}\n\t\treturn;\n\t}\n\tthrow new TypeError( format( 'invalid argument. First argument must be either a complex number, an array-like object, or a complex number array. Value: `%s`.', value ) );\n\n\t/* eslint-enable no-underscore-dangle */\n});\n\n/**\n* Copies a portion of a typed array to a new typed array.\n*\n* @name slice\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {integer} [start=0] - starting index (inclusive)\n* @param {integer} [end] - ending index (exclusive)\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be an integer\n* @throws {TypeError} second argument must be an integer\n* @returns {Complex64Array} complex number array\n*\n* @example\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* var arr = new Complex64Array( 5 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n* arr.set( [ 4.0, -4.0 ], 3 );\n* arr.set( [ 5.0, -5.0 ], 4 );\n*\n* var out = arr.slice();\n* // returns \n*\n* var len = out.length;\n* // returns 5\n*\n* var z = out.get( 0 );\n* // returns \n*\n* var re = realf( z );\n* // returns 1.0\n*\n* var im = imagf( z );\n* // returns -1.0\n*\n* z = out.get( len-1 );\n* // returns \n*\n* re = realf( z );\n* // returns 5.0\n*\n* im = imagf( z );\n* // returns -5.0\n*\n* out = arr.slice( 1, -2 );\n* // returns \n*\n* len = out.length;\n* // returns 2\n*\n* z = out.get( 0 );\n* // returns \n*\n* re = realf( z );\n* // returns 2.0\n*\n* im = imagf( z );\n* // returns -2.0\n*\n* z = out.get( len-1 );\n* // returns \n*\n* re = realf( z );\n* // returns 3.0\n*\n* im = imagf( z );\n* // returns -3.0\n*/\nsetReadOnly( Complex64Array.prototype, 'slice', function slice( start, end ) {\n\tvar outlen;\n\tvar outbuf;\n\tvar out;\n\tvar idx;\n\tvar buf;\n\tvar len;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tbuf = this._buffer;\n\tlen = this._length;\n\tif ( arguments.length === 0 ) {\n\t\tstart = 0;\n\t\tend = len;\n\t} else {\n\t\tif ( !isInteger( start ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. First argument must be an integer. Value: `%s`.', start ) );\n\t\t}\n\t\tif ( start < 0 ) {\n\t\t\tstart += len;\n\t\t\tif ( start < 0 ) {\n\t\t\t\tstart = 0;\n\t\t\t}\n\t\t}\n\t\tif ( arguments.length === 1 ) {\n\t\t\tend = len;\n\t\t} else {\n\t\t\tif ( !isInteger( end ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be an integer. Value: `%s`.', end ) );\n\t\t\t}\n\t\t\tif ( end < 0 ) {\n\t\t\t\tend += len;\n\t\t\t\tif ( end < 0 ) {\n\t\t\t\t\tend = 0;\n\t\t\t\t}\n\t\t\t} else if ( end > len ) {\n\t\t\t\tend = len;\n\t\t\t}\n\t\t}\n\t}\n\tif ( start < end ) {\n\t\toutlen = end - start;\n\t} else {\n\t\toutlen = 0;\n\t}\n\tout = new this.constructor( outlen );\n\toutbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\tfor ( i = 0; i < outlen; i++ ) {\n\t\tidx = 2*(i+start);\n\t\toutbuf[ 2*i ] = buf[ idx ];\n\t\toutbuf[ (2*i)+1 ] = buf[ idx+1 ];\n\t}\n\treturn out;\n});\n\n/**\n* Tests whether at least one element in an array passes a test implemented by a predicate function.\n*\n* @name some\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {boolean} boolean indicating whether at least one element passes a test\n*\n* @example\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* function predicate( v ) {\n* return ( realf( v ) === imagf( v ) );\n* }\n*\n* var arr = new Complex64Array( 3 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n*\n* var bool = arr.some( predicate );\n* // returns true\n*/\nsetReadOnly( Complex64Array.prototype, 'some', function some( predicate, thisArg ) {\n\tvar buf;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tif ( predicate.call( thisArg, getComplex64( buf, i ), i, this ) ) {\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n});\n\n/**\n* Creates a new typed array view over the same underlying `ArrayBuffer` and with the same underlying data type as the host array.\n*\n* @name subarray\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {integer} [begin=0] - starting index (inclusive)\n* @param {integer} [end] - ending index (exclusive)\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be an integer\n* @throws {TypeError} second argument must be an integer\n* @returns {Complex64Array} subarray\n*\n* @example\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* var arr = new Complex64Array( 5 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n* arr.set( [ 4.0, -4.0 ], 3 );\n* arr.set( [ 5.0, -5.0 ], 4 );\n*\n* var subarr = arr.subarray();\n* // returns \n*\n* var len = subarr.length;\n* // returns 5\n*\n* var z = subarr.get( 0 );\n* // returns \n*\n* var re = realf( z );\n* // returns 1.0\n*\n* var im = imagf( z );\n* // returns -1.0\n*\n* z = subarr.get( len-1 );\n* // returns \n*\n* re = realf( z );\n* // returns 5.0\n*\n* im = imagf( z );\n* // returns -5.0\n*\n* subarr = arr.subarray( 1, -2 );\n* // returns \n*\n* len = subarr.length;\n* // returns 2\n*\n* z = subarr.get( 0 );\n* // returns \n*\n* re = realf( z );\n* // returns 2.0\n*\n* im = imagf( z );\n* // returns -2.0\n*\n* z = subarr.get( len-1 );\n* // returns \n*\n* re = realf( z );\n* // returns 3.0\n*\n* im = imagf( z );\n* // returns -3.0\n*/\nsetReadOnly( Complex64Array.prototype, 'subarray', function subarray( begin, end ) {\n\tvar offset;\n\tvar buf;\n\tvar len;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tbuf = this._buffer;\n\tlen = this._length;\n\tif ( arguments.length === 0 ) {\n\t\tbegin = 0;\n\t\tend = len;\n\t} else {\n\t\tif ( !isInteger( begin ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. First argument must be an integer. Value: `%s`.', begin ) );\n\t\t}\n\t\tif ( begin < 0 ) {\n\t\t\tbegin += len;\n\t\t\tif ( begin < 0 ) {\n\t\t\t\tbegin = 0;\n\t\t\t}\n\t\t}\n\t\tif ( arguments.length === 1 ) {\n\t\t\tend = len;\n\t\t} else {\n\t\t\tif ( !isInteger( end ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be an integer. Value: `%s`.', end ) );\n\t\t\t}\n\t\t\tif ( end < 0 ) {\n\t\t\t\tend += len;\n\t\t\t\tif ( end < 0 ) {\n\t\t\t\t\tend = 0;\n\t\t\t\t}\n\t\t\t} else if ( end > len ) {\n\t\t\t\tend = len;\n\t\t\t}\n\t\t}\n\t}\n\tif ( begin >= len ) {\n\t\tlen = 0;\n\t\toffset = buf.byteLength;\n\t} else if ( begin >= end ) {\n\t\tlen = 0;\n\t\toffset = buf.byteOffset + (begin*BYTES_PER_ELEMENT);\n\t} else {\n\t\tlen = end - begin;\n\t\toffset = buf.byteOffset + ( begin*BYTES_PER_ELEMENT );\n\t}\n\treturn new this.constructor( buf.buffer, offset, ( len < 0 ) ? 0 : len );\n});\n\n/**\n* Returns a new typed array containing the elements in reversed order.\n*\n* @name toReversed\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Complex64Array} reversed array\n*\n* @example\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* var arr = new Complex64Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var out = arr.toReversed();\n* // returns \n*\n* var z = out.get( 0 );\n* // returns \n*\n* var re = realf( z );\n* // returns 3.0\n*\n* var im = imagf( z );\n* // returns 3.0\n*\n* z = out.get( 1 );\n* // returns \n*\n* re = realf( z );\n* // returns 2.0\n*\n* im = imagf( z );\n* // returns 2.0\n*\n* z = out.get( 2 );\n* // returns \n*\n* re = realf( z );\n* // returns 1.0\n*\n* im = imagf( z );\n* // returns 1.0\n*/\nsetReadOnly( Complex64Array.prototype, 'toReversed', function toReversed() {\n\tvar outbuf;\n\tvar out;\n\tvar len;\n\tvar buf;\n\tvar i;\n\tvar j;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tlen = this._length;\n\tout = new this.constructor( len );\n\tbuf = this._buffer;\n\toutbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\tfor ( i = 0; i < len; i++ ) {\n\t\tj = len - i - 1;\n\t\toutbuf[ (2*i) ] = buf[ (2*j) ];\n\t\toutbuf[ (2*i)+1 ] = buf[ (2*j)+1 ];\n\t}\n\treturn out;\n});\n\n/**\n* Serializes an array as a string.\n*\n* @name toString\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @throws {TypeError} `this` must be a complex number array\n* @returns {string} string representation\n*\n* @example\n* var arr = new Complex64Array( 2 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n*\n* var str = arr.toString();\n* // returns '1 + 1i,2 + 2i'\n*/\nsetReadOnly( Complex64Array.prototype, 'toString', function toString() {\n\tvar out;\n\tvar buf;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tout = [];\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tout.push( getComplex64( buf, i ).toString() );\n\t}\n\treturn out.join( ',' );\n});\n\n/**\n* Returns a new typed array with the element at a provided index replaced with a provided value.\n*\n* @name with\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {integer} index - element index\n* @param {ComplexLike} value - new value\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be an integer\n* @throws {RangeError} index argument is out-of-bounds\n* @throws {TypeError} second argument must be a complex number\n* @returns {Complex64Array} new typed array\n*\n* @example\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n* import Complex64 from '@stdlib/complex-float32';\n*\n* var arr = new Complex64Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var out = arr.with( 0, new Complex64( 4.0, 4.0 ) );\n* // returns \n*\n* var z = out.get( 0 );\n* // returns \n*\n* var re = realf( z );\n* // returns 4.0\n*\n* var im = imagf( z );\n* // returns 4.0\n*/\nsetReadOnly( Complex64Array.prototype, 'with', function copyWith( index, value ) {\n\tvar buf;\n\tvar out;\n\tvar len;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isInteger( index ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be an integer. Value: `%s`.', index ) );\n\t}\n\tlen = this._length;\n\tif ( index < 0 ) {\n\t\tindex += len;\n\t}\n\tif ( index < 0 || index >= len ) {\n\t\tthrow new RangeError( format( 'invalid argument. Index argument is out-of-bounds. Value: `%s`.', index ) );\n\t}\n\tif ( !isComplexLike( value ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Second argument must be a complex number. Value: `%s`.', value ) );\n\t}\n\tout = new this.constructor( this._buffer );\n\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\tbuf[ 2*index ] = realf( value );\n\tbuf[ (2*index)+1 ] = imagf( value );\n\treturn out;\n});\n\n\n// EXPORTS //\n\nexport default Complex64Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport realf from '@stdlib/complex-realf';\nimport imagf from '@stdlib/complex-imagf';\n\n\n// MAIN //\n\n/**\n* Returns a strided array of real and imaginary components.\n*\n* @private\n* @param {Float32Array} buf - output array\n* @param {Array} arr - array containing complex numbers\n* @returns {(Float32Array|null)} output array or null\n*/\nfunction fromArray( buf, arr ) {\n\tvar len;\n\tvar v;\n\tvar i;\n\tvar j;\n\n\tlen = arr.length;\n\tj = 0;\n\tfor ( i = 0; i < len; i++ ) {\n\t\tv = arr[ i ];\n\t\tif ( !isComplexLike( v ) ) {\n\t\t\treturn null;\n\t\t}\n\t\tbuf[ j ] = realf( v );\n\t\tbuf[ j+1 ] = imagf( v );\n\t\tj += 2; // stride\n\t}\n\treturn buf;\n}\n\n\n// EXPORTS //\n\nexport default fromArray;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Returns the real component of a double-precision complex floating-point number.\n*\n* @param {Complex} z - complex number\n* @returns {number} real component\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n*\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var re = real( z );\n* // returns 5.0\n*/\nfunction real( z ) {\n\treturn z.re;\n}\n\n\n// EXPORTS //\n\nexport default real;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Returns the imaginary component of a double-precision complex floating-point number.\n*\n* @param {Complex} z - complex number\n* @returns {number} imaginary component\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n*\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var im = imag( z );\n* // returns 3.0\n*/\nfunction imag( z ) {\n\treturn z.im;\n}\n\n\n// EXPORTS //\n\nexport default imag;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isArrayLikeObject from '@stdlib/assert-is-array-like-object';\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport format from '@stdlib/string-format';\nimport real from '@stdlib/complex-real';\nimport imag from '@stdlib/complex-imag';\n\n\n// MAIN //\n\n/**\n* Returns an array of iterated values.\n*\n* @private\n* @param {Object} it - iterator\n* @returns {(Array|TypeError)} array or an error\n*/\nfunction fromIterator( it ) {\n\tvar out;\n\tvar v;\n\tvar z;\n\n\tout = [];\n\twhile ( true ) {\n\t\tv = it.next();\n\t\tif ( v.done ) {\n\t\t\tbreak;\n\t\t}\n\t\tz = v.value;\n\t\tif ( isArrayLikeObject( z ) && z.length >= 2 ) {\n\t\t\tout.push( z[ 0 ], z[ 1 ] );\n\t\t} else if ( isComplexLike( z ) ) {\n\t\t\tout.push( real( z ), imag( z ) );\n\t\t} else {\n\t\t\treturn new TypeError( format( 'invalid argument. An iterator must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', z ) );\n\t\t}\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default fromIterator;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isArrayLikeObject from '@stdlib/assert-is-array-like-object';\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport realf from '@stdlib/complex-realf';\nimport imagf from '@stdlib/complex-imagf';\nimport format from '@stdlib/string-format';\n\n\n// MAIN //\n\n/**\n* Returns an array of iterated values.\n*\n* @private\n* @param {Object} it - iterator\n* @param {Function} clbk - callback to invoke for each iterated value\n* @param {*} thisArg - invocation context\n* @returns {(Array|TypeError)} array or an error\n*/\nfunction fromIteratorMap( it, clbk, thisArg ) {\n\tvar out;\n\tvar v;\n\tvar z;\n\tvar i;\n\n\tout = [];\n\ti = -1;\n\twhile ( true ) {\n\t\tv = it.next();\n\t\tif ( v.done ) {\n\t\t\tbreak;\n\t\t}\n\t\ti += 1;\n\t\tz = clbk.call( thisArg, v.value, i );\n\t\tif ( isArrayLikeObject( z ) && z.length >= 2 ) {\n\t\t\tout.push( z[ 0 ], z[ 1 ] );\n\t\t} else if ( isComplexLike( z ) ) {\n\t\t\tout.push( realf( z ), imagf( z ) );\n\t\t} else {\n\t\t\treturn new TypeError( format( 'invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', z ) );\n\t\t}\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default fromIteratorMap;\n","/* eslint-disable no-restricted-syntax, max-lines, no-invalid-this */\n\n/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isNonNegativeInteger } from '@stdlib/assert-is-nonnegative-integer';\nimport isArrayLikeObject from '@stdlib/assert-is-array-like-object';\nimport isCollection from '@stdlib/assert-is-collection';\nimport isArrayBuffer from '@stdlib/assert-is-arraybuffer';\nimport isObject from '@stdlib/assert-is-object';\nimport isArray from '@stdlib/assert-is-array';\nimport isString from '@stdlib/assert-is-string';\nimport isFunction from '@stdlib/assert-is-function';\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport isEven from '@stdlib/math-base-assert-is-even';\nimport isInteger from '@stdlib/math-base-assert-is-integer';\nimport isComplex64Array from '@stdlib/array-base-assert-is-complex64array';\nimport isComplex128Array from '@stdlib/array-base-assert-is-complex128array';\nimport hasIteratorSymbolSupport from '@stdlib/assert-has-iterator-symbol-support';\nimport ITERATOR_SYMBOL from '@stdlib/symbol-iterator';\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport setReadOnlyAccessor from '@stdlib/utils-define-nonenumerable-read-only-accessor';\nimport Float64Array from '@stdlib/array-float64';\nimport Complex128 from '@stdlib/complex-float64';\nimport real from '@stdlib/complex-real';\nimport imag from '@stdlib/complex-imag';\nimport floor from '@stdlib/math-base-special-floor';\nimport reinterpret64 from '@stdlib/strided-base-reinterpret-complex64';\nimport reinterpret128 from '@stdlib/strided-base-reinterpret-complex128';\nimport getter from '@stdlib/array-base-getter';\nimport accessorGetter from '@stdlib/array-base-accessor-getter';\nimport format from '@stdlib/string-format';\nimport fromIterator from './from_iterator.js';\nimport fromIteratorMap from './from_iterator_map.js';\nimport fromArray from './from_array.js';\n\n\n// VARIABLES //\n\nvar BYTES_PER_ELEMENT = Float64Array.BYTES_PER_ELEMENT * 2;\nvar HAS_ITERATOR_SYMBOL = hasIteratorSymbolSupport();\n\n\n// FUNCTIONS //\n\n/**\n* Returns a boolean indicating if a value is a complex typed array.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a complex typed array\n*/\nfunction isComplexArray( value ) {\n\treturn (\n\t\tvalue instanceof Complex128Array ||\n\t\t(\n\t\t\ttypeof value === 'object' &&\n\t\t\tvalue !== null &&\n\t\t\t(\n\t\t\t\tvalue.constructor.name === 'Complex64Array' ||\n\t\t\t\tvalue.constructor.name === 'Complex128Array'\n\t\t\t) &&\n\t\t\ttypeof value._length === 'number' && // eslint-disable-line no-underscore-dangle\n\n\t\t\t// NOTE: we don't perform a more rigorous test here for a typed array for performance reasons, as robustly checking for a typed array instance could require walking the prototype tree and performing relatively expensive constructor checks...\n\t\t\ttypeof value._buffer === 'object' // eslint-disable-line no-underscore-dangle\n\t\t)\n\t);\n}\n\n/**\n* Returns a boolean indicating if a value is a complex typed array constructor.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a complex typed array constructor\n*/\nfunction isComplexArrayConstructor( value ) {\n\treturn (\n\t\tvalue === Complex128Array ||\n\n\t\t// NOTE: weaker test in order to avoid a circular dependency with Complex64Array...\n\t\tvalue.name === 'Complex64Array'\n\t);\n}\n\n/**\n* Retrieves a complex number from a complex number array buffer.\n*\n* @private\n* @param {Float64Array} buf - array buffer\n* @param {NonNegativeInteger} idx - element index\n* @returns {Complex128} complex number\n*/\nfunction getComplex128( buf, idx ) {\n\tidx *= 2;\n\treturn new Complex128( buf[ idx ], buf[ idx+1 ] );\n}\n\n\n// MAIN //\n\n/**\n* 128-bit complex number array constructor.\n*\n* @constructor\n* @param {(NonNegativeInteger|Collection|ArrayBuffer|Iterable)} [arg] - length, typed array, array-like object, buffer, or iterable\n* @param {NonNegativeInteger} [byteOffset=0] - byte offset\n* @param {NonNegativeInteger} [length] - view length\n* @throws {RangeError} ArrayBuffer byte length must be a multiple of `16`\n* @throws {RangeError} array-like object and typed array input arguments must have a length which is a multiple of two\n* @throws {TypeError} if provided only a single argument, must provide a valid argument\n* @throws {TypeError} byte offset must be a nonnegative integer\n* @throws {RangeError} byte offset must be a multiple of `16`\n* @throws {TypeError} view length must be a positive multiple of `16`\n* @throws {RangeError} must provide sufficient memory to accommodate byte offset and view length requirements\n* @throws {TypeError} an iterator must return either a two element array containing real and imaginary components or a complex number\n* @returns {Complex128Array} complex number array\n*\n* @example\n* var arr = new Complex128Array();\n* // returns \n*\n* var len = arr.length;\n* // returns 0\n*\n* @example\n* var arr = new Complex128Array( 2 );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*\n* @example\n* var arr = new Complex128Array( [ 1.0, -1.0 ] );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* import ArrayBuffer from '@stdlib/array-buffer';\n*\n* var buf = new ArrayBuffer( 32 );\n* var arr = new Complex128Array( buf );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*\n* @example\n* import ArrayBuffer from '@stdlib/array-buffer';\n*\n* var buf = new ArrayBuffer( 32 );\n* var arr = new Complex128Array( buf, 16 );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* import ArrayBuffer from '@stdlib/array-buffer';\n*\n* var buf = new ArrayBuffer( 64 );\n* var arr = new Complex128Array( buf, 16, 2 );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*/\nfunction Complex128Array() {\n\tvar byteOffset;\n\tvar nargs;\n\tvar buf;\n\tvar len;\n\n\tnargs = arguments.length;\n\tif ( !(this instanceof Complex128Array) ) {\n\t\tif ( nargs === 0 ) {\n\t\t\treturn new Complex128Array();\n\t\t}\n\t\tif ( nargs === 1 ) {\n\t\t\treturn new Complex128Array( arguments[0] );\n\t\t}\n\t\tif ( nargs === 2 ) {\n\t\t\treturn new Complex128Array( arguments[0], arguments[1] );\n\t\t}\n\t\treturn new Complex128Array( arguments[0], arguments[1], arguments[2] );\n\t}\n\t// Create the underlying data buffer...\n\tif ( nargs === 0 ) {\n\t\tbuf = new Float64Array( 0 ); // backward-compatibility\n\t} else if ( nargs === 1 ) {\n\t\tif ( isNonNegativeInteger( arguments[0] ) ) {\n\t\t\tbuf = new Float64Array( arguments[0]*2 );\n\t\t} else if ( isCollection( arguments[0] ) ) {\n\t\t\tbuf = arguments[ 0 ];\n\t\t\tlen = buf.length;\n\n\t\t\t// If provided a \"generic\" array, peak at the first value, and, if the value is a complex number, try to process as an array of complex numbers, falling back to \"normal\" typed array initialization if we fail and ensuring consistency if the first value had not been a complex number...\n\t\t\tif ( len && isArray( buf ) && isComplexLike( buf[0] ) ) {\n\t\t\t\tbuf = fromArray( new Float64Array( len*2 ), buf );\n\t\t\t\tif ( buf === null ) {\n\t\t\t\t\t// We failed and we are now forced to allocate a new array :-(\n\t\t\t\t\tif ( !isEven( len ) ) {\n\t\t\t\t\t\tthrow new RangeError( format( 'invalid argument. Array-like object arguments must have a length which is a multiple of two. Length: `%u`.', len ) );\n\t\t\t\t\t}\n\t\t\t\t\t// We failed, so fall back to directly setting values...\n\t\t\t\t\tbuf = new Float64Array( arguments[0] );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ( isComplex64Array( buf ) ) {\n\t\t\t\t\tbuf = reinterpret64( buf, 0 );\n\t\t\t\t} else if ( isComplex128Array( buf ) ) {\n\t\t\t\t\tbuf = reinterpret128( buf, 0 );\n\t\t\t\t} else if ( !isEven( len ) ) {\n\t\t\t\t\tthrow new RangeError( format( 'invalid argument. Array-like object and typed array arguments must have a length which is a multiple of two. Length: `%u`.', len ) );\n\t\t\t\t}\n\t\t\t\tbuf = new Float64Array( buf );\n\t\t\t}\n\t\t} else if ( isArrayBuffer( arguments[0] ) ) {\n\t\t\tbuf = arguments[ 0 ];\n\t\t\tif ( !isInteger( buf.byteLength/BYTES_PER_ELEMENT ) ) {\n\t\t\t\tthrow new RangeError( format( 'invalid argument. ArrayBuffer byte length must be a multiple of %u. Byte length: `%u`.', BYTES_PER_ELEMENT, buf.byteLength ) );\n\t\t\t}\n\t\t\tbuf = new Float64Array( buf );\n\t\t} else if ( isObject( arguments[0] ) ) {\n\t\t\tbuf = arguments[ 0 ];\n\t\t\tif ( HAS_ITERATOR_SYMBOL === false ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Environment lacks Symbol.iterator support. Must provide a length, ArrayBuffer, typed array, or array-like object. Value: `%s`.', buf ) );\n\t\t\t}\n\t\t\tif ( !isFunction( buf[ ITERATOR_SYMBOL ] ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.', buf ) );\n\t\t\t}\n\t\t\tbuf = buf[ ITERATOR_SYMBOL ]();\n\t\t\tif ( !isFunction( buf.next ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.', buf ) );\n\t\t\t}\n\t\t\tbuf = fromIterator( buf );\n\t\t\tif ( buf instanceof Error ) {\n\t\t\t\tthrow buf;\n\t\t\t}\n\t\t\tbuf = new Float64Array( buf );\n\t\t} else {\n\t\t\tthrow new TypeError( format( 'invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.', arguments[0] ) );\n\t\t}\n\t} else {\n\t\tbuf = arguments[ 0 ];\n\t\tif ( !isArrayBuffer( buf ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. First argument must be an ArrayBuffer. Value: `%s`.', buf ) );\n\t\t}\n\t\tbyteOffset = arguments[ 1 ];\n\t\tif ( !isNonNegativeInteger( byteOffset ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Byte offset must be a nonnegative integer. Value: `%s`.', byteOffset ) );\n\t\t}\n\t\tif ( !isInteger( byteOffset/BYTES_PER_ELEMENT ) ) {\n\t\t\tthrow new RangeError( format( 'invalid argument. Byte offset must be a multiple of %u. Value: `%u`.', BYTES_PER_ELEMENT, byteOffset ) );\n\t\t}\n\t\tif ( nargs === 2 ) {\n\t\t\tlen = buf.byteLength - byteOffset;\n\t\t\tif ( !isInteger( len/BYTES_PER_ELEMENT ) ) {\n\t\t\t\tthrow new RangeError( format( 'invalid arguments. ArrayBuffer view byte length must be a multiple of %u. View byte length: `%u`.', BYTES_PER_ELEMENT, len ) );\n\t\t\t}\n\t\t\tbuf = new Float64Array( buf, byteOffset );\n\t\t} else {\n\t\t\tlen = arguments[ 2 ];\n\t\t\tif ( !isNonNegativeInteger( len ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Length must be a nonnegative integer. Value: `%s`.', len ) );\n\t\t\t}\n\t\t\tif ( (len*BYTES_PER_ELEMENT) > (buf.byteLength-byteOffset) ) {\n\t\t\t\tthrow new RangeError( format( 'invalid arguments. ArrayBuffer has insufficient capacity. Either decrease the array length or provide a bigger buffer. Minimum capacity: `%u`.', len*BYTES_PER_ELEMENT ) );\n\t\t\t}\n\t\t\tbuf = new Float64Array( buf, byteOffset, len*2 );\n\t\t}\n\t}\n\tsetReadOnly( this, '_buffer', buf );\n\tsetReadOnly( this, '_length', buf.length/2 );\n\n\treturn this;\n}\n\n/**\n* Size (in bytes) of each array element.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex128Array\n* @readonly\n* @type {PositiveInteger}\n* @default 16\n*\n* @example\n* var nbytes = Complex128Array.BYTES_PER_ELEMENT;\n* // returns 16\n*/\nsetReadOnly( Complex128Array, 'BYTES_PER_ELEMENT', BYTES_PER_ELEMENT );\n\n/**\n* Constructor name.\n*\n* @name name\n* @memberof Complex128Array\n* @readonly\n* @type {string}\n* @default 'Complex128Array'\n*\n* @example\n* var name = Complex128Array.name;\n* // returns 'Complex128Array'\n*/\nsetReadOnly( Complex128Array, 'name', 'Complex128Array' );\n\n/**\n* Creates a new 128-bit complex number array from an array-like object or an iterable.\n*\n* @name from\n* @memberof Complex128Array\n* @type {Function}\n* @param {(Collection|Object)} src - array-like object or iterable\n* @param {Function} [clbk] - callback to invoke for each source element\n* @param {*} [thisArg] - context\n* @throws {TypeError} `this` context must be a constructor\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be an array-like object or an iterable\n* @throws {TypeError} second argument must be a function\n* @throws {RangeError} array-like objects must have a length which is a multiple of two\n* @throws {TypeError} an iterator must return either a two element array containing real and imaginary components or a complex number\n* @throws {TypeError} when provided an iterator, a callback must return either a two element array containing real and imaginary components or a complex number\n* @returns {Complex128Array} 128-bit complex number array\n*\n* @example\n* var arr = Complex128Array.from( [ 1.0, -1.0 ] );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n*\n* var arr = Complex128Array.from( [ new Complex128( 1.0, 1.0 ) ] );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* function clbk( v ) {\n* return new Complex128( real(v)*2.0, imag(v)*2.0 );\n* }\n*\n* var arr = Complex128Array.from( [ new Complex128( 1.0, 1.0 ) ], clbk );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*/\nsetReadOnly( Complex128Array, 'from', function from( src ) {\n\tvar thisArg;\n\tvar nargs;\n\tvar clbk;\n\tvar out;\n\tvar buf;\n\tvar tmp;\n\tvar get;\n\tvar len;\n\tvar flg;\n\tvar v;\n\tvar i;\n\tvar j;\n\tif ( !isFunction( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` context must be a constructor.' );\n\t}\n\tif ( !isComplexArrayConstructor( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tnargs = arguments.length;\n\tif ( nargs > 1 ) {\n\t\tclbk = arguments[ 1 ];\n\t\tif ( !isFunction( clbk ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be a function. Value: `%s`.', clbk ) );\n\t\t}\n\t\tif ( nargs > 2 ) {\n\t\t\tthisArg = arguments[ 2 ];\n\t\t}\n\t}\n\tif ( isComplexArray( src ) ) {\n\t\tlen = src.length;\n\t\tif ( clbk ) {\n\t\t\tout = new this( len );\n\t\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\t\tj = 0;\n\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\tv = clbk.call( thisArg, src.get( i ), i );\n\t\t\t\tif ( isComplexLike( v ) ) {\n\t\t\t\t\tbuf[ j ] = real( v );\n\t\t\t\t\tbuf[ j+1 ] = imag( v );\n\t\t\t\t} else if ( isArrayLikeObject( v ) && v.length >= 2 ) {\n\t\t\t\t\tbuf[ j ] = v[ 0 ];\n\t\t\t\t\tbuf[ j+1 ] = v[ 1 ];\n\t\t\t\t} else {\n\t\t\t\t\tthrow new TypeError( format( 'invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', v ) );\n\t\t\t\t}\n\t\t\t\tj += 2; // stride\n\t\t\t}\n\t\t\treturn out;\n\t\t}\n\t\treturn new this( src );\n\t}\n\tif ( isCollection( src ) ) {\n\t\tif ( clbk ) {\n\t\t\t// Note: array contents affect how we iterate over a provided data source. If only complex number objects, we can extract real and imaginary components. Otherwise, for non-complex number arrays (e.g., `Float64Array`, etc), we assume a strided array where real and imaginary components are interleaved. In the former case, we expect a callback to return real and imaginary components (possibly as a complex number). In the latter case, we expect a callback to return *either* a real or imaginary component.\n\n\t\t\tlen = src.length;\n\t\t\tif ( src.get && src.set ) {\n\t\t\t\tget = accessorGetter( 'default' );\n\t\t\t} else {\n\t\t\t\tget = getter( 'default' );\n\t\t\t}\n\t\t\t// Detect whether we've been provided an array which returns complex number objects...\n\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\tif ( !isComplexLike( get( src, i ) ) ) {\n\t\t\t\t\tflg = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// If an array does not contain only complex number objects, then we assume interleaved real and imaginary components...\n\t\t\tif ( flg ) {\n\t\t\t\tif ( !isEven( len ) ) {\n\t\t\t\t\tthrow new RangeError( format( 'invalid argument. First argument must have a length which is a multiple of two. Length: `%u`.', len ) );\n\t\t\t\t}\n\t\t\t\tout = new this( len/2 );\n\t\t\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\t\tbuf[ i ] = clbk.call( thisArg, get( src, i ), i );\n\t\t\t\t}\n\t\t\t\treturn out;\n\t\t\t}\n\t\t\t// If an array contains only complex number objects, then we need to extract real and imaginary components...\n\t\t\tout = new this( len );\n\t\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\t\tj = 0;\n\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\tv = clbk.call( thisArg, get( src, i ), i );\n\t\t\t\tif ( isComplexLike( v ) ) {\n\t\t\t\t\tbuf[ j ] = real( v );\n\t\t\t\t\tbuf[ j+1 ] = imag( v );\n\t\t\t\t} else if ( isArrayLikeObject( v ) && v.length >= 2 ) {\n\t\t\t\t\tbuf[ j ] = v[ 0 ];\n\t\t\t\t\tbuf[ j+1 ] = v[ 1 ];\n\t\t\t\t} else {\n\t\t\t\t\tthrow new TypeError( format( 'invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', v ) );\n\t\t\t\t}\n\t\t\t\tj += 2; // stride\n\t\t\t}\n\t\t\treturn out;\n\t\t}\n\t\treturn new this( src );\n\t}\n\tif ( isObject( src ) && HAS_ITERATOR_SYMBOL && isFunction( src[ ITERATOR_SYMBOL ] ) ) { // eslint-disable-line max-len\n\t\tbuf = src[ ITERATOR_SYMBOL ]();\n\t\tif ( !isFunction( buf.next ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.', src ) );\n\t\t}\n\t\tif ( clbk ) {\n\t\t\ttmp = fromIteratorMap( buf, clbk, thisArg );\n\t\t} else {\n\t\t\ttmp = fromIterator( buf );\n\t\t}\n\t\tif ( tmp instanceof Error ) {\n\t\t\tthrow tmp;\n\t\t}\n\t\tlen = tmp.length / 2;\n\t\tout = new this( len );\n\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\tbuf[ i ] = tmp[ i ];\n\t\t}\n\t\treturn out;\n\t}\n\tthrow new TypeError( format( 'invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.', src ) );\n});\n\n/**\n* Creates a new 128-bit complex number array from a variable number of arguments.\n*\n* @name of\n* @memberof Complex128Array\n* @type {Function}\n* @param {...*} element - array elements\n* @throws {TypeError} `this` context must be a constructor\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Complex128Array} 128-bit complex number array\n*\n* @example\n* var arr = Complex128Array.of( 1.0, 1.0, 1.0, 1.0 );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*/\nsetReadOnly( Complex128Array, 'of', function of() {\n\tvar args;\n\tvar i;\n\tif ( !isFunction( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` context must be a constructor.' );\n\t}\n\tif ( !isComplexArrayConstructor( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\targs = [];\n\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\targs.push( arguments[ i ] );\n\t}\n\treturn new this( args );\n});\n\n/**\n* Returns an array element with support for both nonnegative and negative integer indices.\n*\n* @name at\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {integer} idx - element index\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} must provide an integer\n* @returns {(Complex128|void)} array element\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* var arr = new Complex128Array( 10 );\n*\n* var z = arr.at( 0 );\n* // returns \n*\n* var re = real( z );\n* // returns 0.0\n*\n* var im = imag( z );\n* // returns 0.0\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 9.0, -9.0 ], 9 );\n*\n* z = arr.at( 0 );\n* // returns \n*\n* re = real( z );\n* // returns 1.0\n*\n* im = imag( z );\n* // returns -1.0\n*\n* z = arr.at( -1 );\n* // returns \n*\n* re = real( z );\n* // returns 9.0\n*\n* im = imag( z );\n* // returns -9.0\n*\n* z = arr.at( 100 );\n* // returns undefined\n*\n* z = arr.at( -100 );\n* // returns undefined\n*/\nsetReadOnly( Complex128Array.prototype, 'at', function at( idx ) {\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isInteger( idx ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Must provide an integer. Value: `%s`.', idx ) );\n\t}\n\tif ( idx < 0 ) {\n\t\tidx += this._length;\n\t}\n\tif ( idx < 0 || idx >= this._length ) {\n\t\treturn;\n\t}\n\treturn getComplex128( this._buffer, idx );\n});\n\n/**\n* Pointer to the underlying data buffer.\n*\n* @name buffer\n* @memberof Complex128Array.prototype\n* @readonly\n* @type {ArrayBuffer}\n*\n* @example\n* var arr = new Complex128Array( 10 );\n*\n* var buf = arr.buffer;\n* // returns \n*/\nsetReadOnlyAccessor( Complex128Array.prototype, 'buffer', function get() {\n\treturn this._buffer.buffer;\n});\n\n/**\n* Size (in bytes) of the array.\n*\n* @name byteLength\n* @memberof Complex128Array.prototype\n* @readonly\n* @type {NonNegativeInteger}\n*\n* @example\n* var arr = new Complex128Array( 10 );\n*\n* var byteLength = arr.byteLength;\n* // returns 160\n*/\nsetReadOnlyAccessor( Complex128Array.prototype, 'byteLength', function get() {\n\treturn this._buffer.byteLength;\n});\n\n/**\n* Offset (in bytes) of the array from the start of its underlying `ArrayBuffer`.\n*\n* @name byteOffset\n* @memberof Complex128Array.prototype\n* @readonly\n* @type {NonNegativeInteger}\n*\n* @example\n* var arr = new Complex128Array( 10 );\n*\n* var byteOffset = arr.byteOffset;\n* // returns 0\n*/\nsetReadOnlyAccessor( Complex128Array.prototype, 'byteOffset', function get() {\n\treturn this._buffer.byteOffset;\n});\n\n/**\n* Size (in bytes) of each array element.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex128Array.prototype\n* @readonly\n* @type {PositiveInteger}\n* @default 16\n*\n* @example\n* var arr = new Complex128Array( 10 );\n*\n* var nbytes = arr.BYTES_PER_ELEMENT;\n* // returns 16\n*/\nsetReadOnly( Complex128Array.prototype, 'BYTES_PER_ELEMENT', Complex128Array.BYTES_PER_ELEMENT );\n\n/**\n* Copies a sequence of elements within the array to the position starting at `target`.\n*\n* @name copyWithin\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {integer} target - index at which to start copying elements\n* @param {integer} start - source index at which to copy elements from\n* @param {integer} [end] - source index at which to stop copying elements from\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Complex128Array} modified array\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* var arr = new Complex128Array( 4 );\n*\n* // Set the array elements:\n* arr.set( new Complex128( 1.0, 1.0 ), 0 );\n* arr.set( new Complex128( 2.0, 2.0 ), 1 );\n* arr.set( new Complex128( 3.0, 3.0 ), 2 );\n* arr.set( new Complex128( 4.0, 4.0 ), 3 );\n*\n* // Copy the first two elements to the last two elements:\n* arr.copyWithin( 2, 0, 2 );\n*\n* // Get the last array element:\n* var z = arr.get( 3 );\n*\n* var re = real( z );\n* // returns 2.0\n*\n* var im = imag( z );\n* // returns 2.0\n*/\nsetReadOnly( Complex128Array.prototype, 'copyWithin', function copyWithin( target, start ) {\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\t// FIXME: prefer a functional `copyWithin` implementation which addresses lack of universal browser support (e.g., IE11 and Safari) or ensure that typed arrays are polyfilled\n\tif ( arguments.length === 2 ) {\n\t\tthis._buffer.copyWithin( target*2, start*2 );\n\t} else {\n\t\tthis._buffer.copyWithin( target*2, start*2, arguments[2]*2 );\n\t}\n\treturn this;\n});\n\n/**\n* Returns an iterator for iterating over array key-value pairs.\n*\n* @name entries\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Iterator} iterator\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n*\n* var arr = [\n* new Complex128( 1.0, 1.0 ),\n* new Complex128( 2.0, 2.0 ),\n* new Complex128( 3.0, 3.0 )\n* ];\n* arr = new Complex128Array( arr );\n*\n* // Create an iterator:\n* var it = arr.entries();\n*\n* // Iterate over the key-value pairs...\n* var v = it.next().value;\n* // returns [ 0, ]\n*\n* v = it.next().value;\n* // returns [ 1, ]\n*\n* v = it.next().value;\n* // returns [ 2, ]\n*\n* var bool = it.next().done;\n* // returns true\n*/\nsetReadOnly( Complex128Array.prototype, 'entries', function entries() {\n\tvar buffer;\n\tvar self;\n\tvar iter;\n\tvar len;\n\tvar FLG;\n\tvar i;\n\tvar j;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tself = this;\n\tbuffer = this._buffer;\n\tlen = this._length;\n\n\t// Initialize the iteration indices:\n\ti = -1;\n\tj = -2;\n\n\t// Create an iterator protocol-compliant object:\n\titer = {};\n\tsetReadOnly( iter, 'next', next );\n\tsetReadOnly( iter, 'return', end );\n\n\tif ( ITERATOR_SYMBOL ) {\n\t\tsetReadOnly( iter, ITERATOR_SYMBOL, factory );\n\t}\n\treturn iter;\n\n\t/**\n\t* Returns an iterator protocol-compliant object containing the next iterated value.\n\t*\n\t* @private\n\t* @returns {Object} iterator protocol-compliant object\n\t*/\n\tfunction next() {\n\t\tvar z;\n\t\ti += 1;\n\t\tif ( FLG || i >= len ) {\n\t\t\treturn {\n\t\t\t\t'done': true\n\t\t\t};\n\t\t}\n\t\tj += 2;\n\t\tz = new Complex128( buffer[ j ], buffer[ j+1 ] );\n\t\treturn {\n\t\t\t'value': [ i, z ],\n\t\t\t'done': false\n\t\t};\n\t}\n\n\t/**\n\t* Finishes an iterator.\n\t*\n\t* @private\n\t* @param {*} [value] - value to return\n\t* @returns {Object} iterator protocol-compliant object\n\t*/\n\tfunction end( value ) {\n\t\tFLG = true;\n\t\tif ( arguments.length ) {\n\t\t\treturn {\n\t\t\t\t'value': value,\n\t\t\t\t'done': true\n\t\t\t};\n\t\t}\n\t\treturn {\n\t\t\t'done': true\n\t\t};\n\t}\n\n\t/**\n\t* Returns a new iterator.\n\t*\n\t* @private\n\t* @returns {Iterator} iterator\n\t*/\n\tfunction factory() {\n\t\treturn self.entries();\n\t}\n});\n\n/**\n* Tests whether all elements in an array pass a test implemented by a predicate function.\n*\n* @name every\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {boolean} boolean indicating whether all elements pass a test\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* function predicate( v ) {\n* return ( real( v ) === imag( v ) );\n* }\n*\n* var arr = new Complex128Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var bool = arr.every( predicate );\n* // returns true\n*/\nsetReadOnly( Complex128Array.prototype, 'every', function every( predicate, thisArg ) {\n\tvar buf;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tif ( !predicate.call( thisArg, getComplex128( buf, i ), i, this ) ) {\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn true;\n});\n\n/**\n* Returns a modified typed array filled with a fill value.\n*\n* @name fill\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {ComplexLike} value - fill value\n* @param {integer} [start=0] - starting index (inclusive)\n* @param {integer} [end] - ending index (exclusive)\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a complex number\n* @throws {TypeError} second argument must be an integer\n* @throws {TypeError} third argument must be an integer\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* var arr = new Complex128Array( 3 );\n*\n* arr.fill( new Complex128( 1.0, 1.0 ), 1 );\n*\n* var z = arr.get( 1 );\n* // returns \n*\n* var re = real( z );\n* // returns 1.0\n*\n* var im = imag( z );\n* // returns 1.0\n*\n* z = arr.get( 1 );\n* // returns \n*\n* re = real( z );\n* // returns 1.0\n*\n* im = imag( z );\n* // returns 1.0\n*/\nsetReadOnly( Complex128Array.prototype, 'fill', function fill( value, start, end ) {\n\tvar buf;\n\tvar len;\n\tvar idx;\n\tvar re;\n\tvar im;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isComplexLike( value ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a complex number. Value: `%s`.', value ) );\n\t}\n\tbuf = this._buffer;\n\tlen = this._length;\n\tif ( arguments.length > 1 ) {\n\t\tif ( !isInteger( start ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be an integer. Value: `%s`.', start ) );\n\t\t}\n\t\tif ( start < 0 ) {\n\t\t\tstart += len;\n\t\t\tif ( start < 0 ) {\n\t\t\t\tstart = 0;\n\t\t\t}\n\t\t}\n\t\tif ( arguments.length > 2 ) {\n\t\t\tif ( !isInteger( end ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Third argument must be an integer. Value: `%s`.', end ) );\n\t\t\t}\n\t\t\tif ( end < 0 ) {\n\t\t\t\tend += len;\n\t\t\t\tif ( end < 0 ) {\n\t\t\t\t\tend = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( end > len ) {\n\t\t\t\tend = len;\n\t\t\t}\n\t\t} else {\n\t\t\tend = len;\n\t\t}\n\t} else {\n\t\tstart = 0;\n\t\tend = len;\n\t}\n\tre = real( value );\n\tim = imag( value );\n\tfor ( i = start; i < end; i++ ) {\n\t\tidx = 2*i;\n\t\tbuf[ idx ] = re;\n\t\tbuf[ idx+1 ] = im;\n\t}\n\treturn this;\n});\n\n/**\n* Returns a new array containing the elements of an array which pass a test implemented by a predicate function.\n*\n* @name filter\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {Complex128Array} complex number array\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* function predicate( v ) {\n* return ( real( v ) === imag( v ) );\n* }\n*\n* var arr = new Complex128Array( 3 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n*\n* var out = arr.filter( predicate );\n* // returns \n*\n* var len = out.length;\n* // returns 1\n*\n* var z = out.get( 0 );\n* // returns \n*\n* var re = real( z );\n* // returns 2.0\n*\n* var im = imag( z );\n* // returns 2.0\n*/\nsetReadOnly( Complex128Array.prototype, 'filter', function filter( predicate, thisArg ) {\n\tvar buf;\n\tvar out;\n\tvar i;\n\tvar z;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tout = [];\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tz = getComplex128( buf, i );\n\t\tif ( predicate.call( thisArg, z, i, this ) ) {\n\t\t\tout.push( z );\n\t\t}\n\t}\n\treturn new this.constructor( out );\n});\n\n/**\n* Returns the first element in an array for which a predicate function returns a truthy value.\n*\n* @name find\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {(Complex128|void)} array element or undefined\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* function predicate( v ) {\n* return ( real( v ) === imag( v ) );\n* }\n*\n* var arr = new Complex128Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var z = arr.find( predicate );\n* // returns \n*\n* var re = real( z );\n* // returns 1.0\n*\n* var im = imag( z );\n* // returns 1.0\n*/\nsetReadOnly( Complex128Array.prototype, 'find', function find( predicate, thisArg ) {\n\tvar buf;\n\tvar i;\n\tvar z;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tz = getComplex128( buf, i );\n\t\tif ( predicate.call( thisArg, z, i, this ) ) {\n\t\t\treturn z;\n\t\t}\n\t}\n});\n\n/**\n* Returns the index of the first element in an array for which a predicate function returns a truthy value.\n*\n* @name findIndex\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {integer} index or -1\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* function predicate( v ) {\n* return ( real( v ) === imag( v ) );\n* }\n*\n* var arr = new Complex128Array( 3 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var idx = arr.findIndex( predicate );\n* // returns 2\n*/\nsetReadOnly( Complex128Array.prototype, 'findIndex', function findIndex( predicate, thisArg ) {\n\tvar buf;\n\tvar i;\n\tvar z;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tz = getComplex128( buf, i );\n\t\tif ( predicate.call( thisArg, z, i, this ) ) {\n\t\t\treturn i;\n\t\t}\n\t}\n\treturn -1;\n});\n\n/**\n* Returns the last element in an array for which a predicate function returns a truthy value.\n*\n* @name findLast\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {(Complex128|void)} array element or undefined\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* function predicate( v ) {\n* return ( real( v ) === imag( v ) );\n* }\n*\n* var arr = new Complex128Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var z = arr.findLast( predicate );\n* // returns \n*\n* var re = real( z );\n* // returns 3.0\n*\n* var im = imag( z );\n* // returns 3.0\n*/\nsetReadOnly( Complex128Array.prototype, 'findLast', function findLast( predicate, thisArg ) {\n\tvar buf;\n\tvar i;\n\tvar z;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = this._length-1; i >= 0; i-- ) {\n\t\tz = getComplex128( buf, i );\n\t\tif ( predicate.call( thisArg, z, i, this ) ) {\n\t\t\treturn z;\n\t\t}\n\t}\n});\n\n/**\n* Returns the index of the last element in an array for which a predicate function returns a truthy value.\n*\n* @name findLastIndex\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {integer} index or -1\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* function predicate( v ) {\n* return ( real( v ) === imag( v ) );\n* }\n*\n* var arr = new Complex128Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n*\n* var idx = arr.findLastIndex( predicate );\n* // returns 1\n*/\nsetReadOnly( Complex128Array.prototype, 'findLastIndex', function findLastIndex( predicate, thisArg ) {\n\tvar buf;\n\tvar i;\n\tvar z;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = this._length-1; i >= 0; i-- ) {\n\t\tz = getComplex128( buf, i );\n\t\tif ( predicate.call( thisArg, z, i, this ) ) {\n\t\t\treturn i;\n\t\t}\n\t}\n\treturn -1;\n});\n\n/**\n* Invokes a function once for each array element.\n*\n* @name forEach\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {Function} fcn - function to invoke\n* @param {*} [thisArg] - function invocation context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n*\n* function log( v, i ) {\n* console.log( '%s: %s', i, v.toString() );\n* }\n*\n* var arr = new Complex128Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* arr.forEach( log );\n*/\nsetReadOnly( Complex128Array.prototype, 'forEach', function forEach( fcn, thisArg ) {\n\tvar buf;\n\tvar i;\n\tvar z;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( fcn ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', fcn ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tz = getComplex128( buf, i );\n\t\tfcn.call( thisArg, z, i, this );\n\t}\n});\n\n/**\n* Returns an array element.\n*\n* @name get\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {NonNegativeInteger} idx - element index\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} must provide a nonnegative integer\n* @returns {(Complex128|void)} array element\n*\n* @example\n* var arr = new Complex128Array( 10 );\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* var z = arr.get( 0 );\n* // returns \n*\n* var re = real( z );\n* // returns 0.0\n*\n* var im = imag( z );\n* // returns 0.0\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n*\n* z = arr.get( 0 );\n* // returns \n*\n* re = real( z );\n* // returns 1.0\n*\n* im = imag( z );\n* // returns -1.0\n*\n* z = arr.get( 100 );\n* // returns undefined\n*/\nsetReadOnly( Complex128Array.prototype, 'get', function get( idx ) {\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isNonNegativeInteger( idx ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Must provide a nonnegative integer. Value: `%s`.', idx ) );\n\t}\n\tif ( idx >= this._length ) {\n\t\treturn;\n\t}\n\treturn getComplex128( this._buffer, idx );\n});\n\n/**\n* Number of array elements.\n*\n* @name length\n* @memberof Complex128Array.prototype\n* @readonly\n* @type {NonNegativeInteger}\n*\n* @example\n* var arr = new Complex128Array( 10 );\n*\n* var len = arr.length;\n* // returns 10\n*/\nsetReadOnlyAccessor( Complex128Array.prototype, 'length', function get() {\n\treturn this._length;\n});\n\n/**\n* Returns a boolean indicating whether an array includes a provided value.\n*\n* @name includes\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {ComplexLike} searchElement - search element\n* @param {integer} [fromIndex=0] - starting index (inclusive)\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a complex number\n* @throws {TypeError} second argument must be an integer\n* @returns {boolean} boolean indicating whether an array includes a provided value\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n*\n* var arr = new Complex128Array( 5 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n* arr.set( [ 4.0, -4.0 ], 3 );\n* arr.set( [ 5.0, -5.0 ], 4 );\n*\n* var bool = arr.includes( new Complex128( 3.0, -3.0 ) );\n* // returns true\n*\n* bool = arr.includes( new Complex128( 3.0, -3.0 ), 3 );\n* // returns false\n*\n* bool = arr.includes( new Complex128( 4.0, -4.0 ), -3 );\n* // returns true\n*/\nsetReadOnly( Complex128Array.prototype, 'includes', function includes( searchElement, fromIndex ) {\n\tvar buf;\n\tvar idx;\n\tvar re;\n\tvar im;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isComplexLike( searchElement ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a complex number. Value: `%s`.', searchElement ) );\n\t}\n\tif ( arguments.length > 1 ) {\n\t\tif ( !isInteger( fromIndex ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be an integer. Value: `%s`.', fromIndex ) );\n\t\t}\n\t\tif ( fromIndex < 0 ) {\n\t\t\tfromIndex += this._length;\n\t\t\tif ( fromIndex < 0 ) {\n\t\t\t\tfromIndex = 0;\n\t\t\t}\n\t\t}\n\t} else {\n\t\tfromIndex = 0;\n\t}\n\tre = real( searchElement );\n\tim = imag( searchElement );\n\tbuf = this._buffer;\n\tfor ( i = fromIndex; i < this._length; i++ ) {\n\t\tidx = 2 * i;\n\t\tif ( re === buf[ idx ] && im === buf[ idx+1 ] ) {\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n});\n\n/**\n* Returns the first index at which a given element can be found.\n*\n* @name indexOf\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {ComplexLike} searchElement - element to find\n* @param {integer} [fromIndex=0] - starting index (inclusive)\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a complex number\n* @throws {TypeError} second argument must be an integer\n* @returns {integer} index or -1\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n*\n* var arr = new Complex128Array( 5 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n* arr.set( [ 4.0, -4.0 ], 3 );\n* arr.set( [ 5.0, -5.0 ], 4 );\n*\n* var idx = arr.indexOf( new Complex128( 3.0, -3.0 ) );\n* // returns 2\n*\n* idx = arr.indexOf( new Complex128( 3.0, -3.0 ), 3 );\n* // returns -1\n*\n* idx = arr.indexOf( new Complex128( 4.0, -4.0 ), -3 );\n* // returns 3\n*/\nsetReadOnly( Complex128Array.prototype, 'indexOf', function indexOf( searchElement, fromIndex ) {\n\tvar buf;\n\tvar idx;\n\tvar re;\n\tvar im;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isComplexLike( searchElement ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a complex number. Value: `%s`.', searchElement ) );\n\t}\n\tif ( arguments.length > 1 ) {\n\t\tif ( !isInteger( fromIndex ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be an integer. Value: `%s`.', fromIndex ) );\n\t\t}\n\t\tif ( fromIndex < 0 ) {\n\t\t\tfromIndex += this._length;\n\t\t\tif ( fromIndex < 0 ) {\n\t\t\t\tfromIndex = 0;\n\t\t\t}\n\t\t}\n\t} else {\n\t\tfromIndex = 0;\n\t}\n\tre = real( searchElement );\n\tim = imag( searchElement );\n\tbuf = this._buffer;\n\tfor ( i = fromIndex; i < this._length; i++ ) {\n\t\tidx = 2 * i;\n\t\tif ( re === buf[ idx ] && im === buf[ idx+1 ] ) {\n\t\t\treturn i;\n\t\t}\n\t}\n\treturn -1;\n});\n\n/**\n* Returns a new string by concatenating all array elements.\n*\n* @name join\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {string} [separator=','] - element separator\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a string\n* @returns {string} string representation\n*\n* @example\n* var arr = new Complex128Array( 2 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n*\n* var str = arr.join();\n* // returns '1 + 1i,2 + 2i'\n*\n* str = arr.join( '/' );\n* // returns '1 + 1i/2 + 2i'\n*/\nsetReadOnly( Complex128Array.prototype, 'join', function join( separator ) {\n\tvar out;\n\tvar buf;\n\tvar sep;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( arguments.length === 0 ) {\n\t\tsep = ',';\n\t} else if ( isString( separator ) ) {\n\t\tsep = separator;\n\t} else {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a string. Value: `%s`.', separator ) );\n\t}\n\tout = [];\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tout.push( getComplex128( buf, i ).toString() );\n\t}\n\treturn out.join( sep );\n});\n\n/**\n* Returns the last index at which a given element can be found.\n*\n* @name lastIndexOf\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {ComplexLike} searchElement - element to find\n* @param {integer} [fromIndex] - index at which to start searching backward (inclusive)\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a complex number\n* @throws {TypeError} second argument must be an integer\n* @returns {integer} index or -1\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n*\n* var arr = new Complex128Array( 5 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n* arr.set( [ 4.0, -4.0 ], 3 );\n* arr.set( [ 3.0, -3.0 ], 4 );\n*\n* var idx = arr.lastIndexOf( new Complex128( 3.0, -3.0 ) );\n* // returns 4\n*\n* idx = arr.lastIndexOf( new Complex128( 3.0, -3.0 ), 3 );\n* // returns 2\n*\n* idx = arr.lastIndexOf( new Complex128( 5.0, -5.0 ), 3 );\n* // returns -1\n*\n* idx = arr.lastIndexOf( new Complex128( 2.0, -2.0 ), -3 );\n* // returns 1\n*/\nsetReadOnly( Complex128Array.prototype, 'lastIndexOf', function lastIndexOf( searchElement, fromIndex ) {\n\tvar buf;\n\tvar idx;\n\tvar re;\n\tvar im;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isComplexLike( searchElement ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a complex number. Value: `%s`.', searchElement ) );\n\t}\n\tif ( arguments.length > 1 ) {\n\t\tif ( !isInteger( fromIndex ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be an integer. Value: `%s`.', fromIndex ) );\n\t\t}\n\t\tif ( fromIndex >= this._length ) {\n\t\t\tfromIndex = this._length - 1;\n\t\t} else if ( fromIndex < 0 ) {\n\t\t\tfromIndex += this._length;\n\t\t}\n\t} else {\n\t\tfromIndex = this._length - 1;\n\t}\n\tre = real( searchElement );\n\tim = imag( searchElement );\n\tbuf = this._buffer;\n\tfor ( i = fromIndex; i >= 0; i-- ) {\n\t\tidx = 2 * i;\n\t\tif ( re === buf[ idx ] && im === buf[ idx+1 ] ) {\n\t\t\treturn i;\n\t\t}\n\t}\n\treturn -1;\n});\n\n/**\n* Returns a new array with each element being the result of a provided callback function.\n*\n* @name map\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {Function} fcn - callback function\n* @param {*} [thisArg] - callback function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {Complex128Array} complex number array\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* function scale( v, i ) {\n* return new Complex128( 2.0*real( v ), 2.0*imag( v ) );\n* }\n*\n* var arr = new Complex128Array( 3 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n*\n* var out = arr.map( scale );\n* // returns \n*\n* var z = out.get( 0 );\n* // returns \n*\n* var re = real( z );\n* // returns 2.0\n*\n* var im = imag( z );\n* // returns -2.0\n*/\nsetReadOnly( Complex128Array.prototype, 'map', function map( fcn, thisArg ) {\n\tvar outbuf;\n\tvar buf;\n\tvar out;\n\tvar i;\n\tvar v;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( fcn ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', fcn ) );\n\t}\n\tbuf = this._buffer;\n\tout = new this.constructor( this._length );\n\toutbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tv = fcn.call( thisArg, getComplex128( buf, i ), i, this );\n\t\tif ( isComplexLike( v ) ) {\n\t\t\toutbuf[ 2*i ] = real( v );\n\t\t\toutbuf[ (2*i)+1 ] = imag( v );\n\t\t} else if ( isArrayLikeObject( v ) && v.length === 2 ) {\n\t\t\toutbuf[ 2*i ] = v[ 0 ];\n\t\t\toutbuf[ (2*i)+1 ] = v[ 1 ];\n\t\t} else {\n\t\t\tthrow new TypeError( format( 'invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', v ) );\n\t\t}\n\t}\n\treturn out;\n});\n\n/**\n* Reverses an array in-place.\n*\n* @name reverse\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Complex128Array} reversed array\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* var arr = new Complex128Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var out = arr.reverse();\n* // returns \n*\n* var z = out.get( 0 );\n* // returns \n*\n* var re = real( z );\n* // returns 3.0\n*\n* var im = imag( z );\n* // returns 3.0\n*\n* z = out.get( 1 );\n* // returns \n*\n* re = real( z );\n* // returns 2.0\n*\n* im = imag( z );\n* // returns 2.0\n*\n* z = out.get( 2 );\n* // returns \n*\n* re = real( z );\n* // returns 1.0\n*\n* im = imag( z );\n* // returns 1.0\n*/\nsetReadOnly( Complex128Array.prototype, 'reverse', function reverse() {\n\tvar buf;\n\tvar tmp;\n\tvar len;\n\tvar N;\n\tvar i;\n\tvar j;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tlen = this._length;\n\tbuf = this._buffer;\n\tN = floor( len / 2 );\n\tfor ( i = 0; i < N; i++ ) {\n\t\tj = len - i - 1;\n\t\ttmp = buf[ (2*i) ];\n\t\tbuf[ (2*i) ] = buf[ (2*j) ];\n\t\tbuf[ (2*j) ] = tmp;\n\t\ttmp = buf[ (2*i)+1 ];\n\t\tbuf[ (2*i)+1 ] = buf[ (2*j)+1 ];\n\t\tbuf[ (2*j)+1 ] = tmp;\n\t}\n\treturn this;\n});\n\n/**\n* Sets an array element.\n*\n* ## Notes\n*\n* - When provided a typed array, real or complex, we must check whether the source array shares the same buffer as the target array and whether the underlying memory overlaps. In particular, we are concerned with the following scenario:\n*\n* ```text\n* buf: ---------------------\n* src: ---------------------\n* ```\n*\n* In the above, as we copy values from `src`, we will overwrite values in the `src` view, resulting in duplicated values copied into the end of `buf`, which is not intended. Hence, to avoid overwriting source values, we must **copy** source values to a temporary array.\n*\n* In the other overlapping scenario,\n*\n* ```text\n* buf: ---------------------\n* src: ---------------------\n* ```\n*\n* by the time we begin copying into the overlapping region, we are copying from the end of `src`, a non-overlapping region, which means we don't run the risk of copying copied values, rather than the original `src` values as intended.\n*\n* @name set\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {(Collection|Complex|ComplexArray)} value - value(s)\n* @param {NonNegativeInteger} [i=0] - element index at which to start writing values\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be either a complex number, an array-like object, or a complex number array\n* @throws {TypeError} index argument must be a nonnegative integer\n* @throws {RangeError} array-like objects must have a length which is a multiple of two\n* @throws {RangeError} index argument is out-of-bounds\n* @throws {RangeError} target array lacks sufficient storage to accommodate source values\n* @returns {void}\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* var arr = new Complex128Array( 10 );\n*\n* var z = arr.get( 0 );\n* // returns \n*\n* var re = real( z );\n* // returns 0.0\n*\n* var im = imag( z );\n* // returns 0.0\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n*\n* z = arr.get( 0 );\n* // returns \n*\n* re = real( z );\n* // returns 1.0\n*\n* im = imag( z );\n* // returns -1.0\n*/\nsetReadOnly( Complex128Array.prototype, 'set', function set( value ) {\n\t/* eslint-disable no-underscore-dangle */\n\tvar sbuf;\n\tvar idx;\n\tvar buf;\n\tvar tmp;\n\tvar flg;\n\tvar N;\n\tvar v;\n\tvar i;\n\tvar j;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tbuf = this._buffer;\n\tif ( arguments.length > 1 ) {\n\t\tidx = arguments[ 1 ];\n\t\tif ( !isNonNegativeInteger( idx ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Index argument must be a nonnegative integer. Value: `%s`.', idx ) );\n\t\t}\n\t} else {\n\t\tidx = 0;\n\t}\n\tif ( isComplexLike( value ) ) {\n\t\tif ( idx >= this._length ) {\n\t\t\tthrow new RangeError( format( 'invalid argument. Index argument is out-of-bounds. Value: `%u`.', idx ) );\n\t\t}\n\t\tidx *= 2;\n\t\tbuf[ idx ] = real( value );\n\t\tbuf[ idx+1 ] = imag( value );\n\t\treturn;\n\t}\n\tif ( isComplexArray( value ) ) {\n\t\tN = value._length;\n\t\tif ( idx+N > this._length ) {\n\t\t\tthrow new RangeError( 'invalid arguments. Target array lacks sufficient storage to accommodate source values.' );\n\t\t}\n\t\tsbuf = value._buffer;\n\n\t\t// Check for overlapping memory...\n\t\tj = buf.byteOffset + (idx*BYTES_PER_ELEMENT);\n\t\tif (\n\t\t\tsbuf.buffer === buf.buffer &&\n\t\t\t(\n\t\t\t\tsbuf.byteOffset < j &&\n\t\t\t\tsbuf.byteOffset+sbuf.byteLength > j\n\t\t\t)\n\t\t) {\n\t\t\t// We need to copy source values...\n\t\t\ttmp = new Float64Array( sbuf.length );\n\t\t\tfor ( i = 0; i < sbuf.length; i++ ) {\n\t\t\t\ttmp[ i ] = sbuf[ i ];\n\t\t\t}\n\t\t\tsbuf = tmp;\n\t\t}\n\t\tidx *= 2;\n\t\tj = 0;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\tbuf[ idx ] = sbuf[ j ];\n\t\t\tbuf[ idx+1 ] = sbuf[ j+1 ];\n\t\t\tidx += 2; // stride\n\t\t\tj += 2; // stride\n\t\t}\n\t\treturn;\n\t}\n\tif ( isCollection( value ) ) {\n\t\t// Detect whether we've been provided an array of complex numbers...\n\t\tN = value.length;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\tif ( !isComplexLike( value[ i ] ) ) {\n\t\t\t\tflg = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t// If an array does not contain only complex numbers, then we assume interleaved real and imaginary components...\n\t\tif ( flg ) {\n\t\t\tif ( !isEven( N ) ) {\n\t\t\t\tthrow new RangeError( format( 'invalid argument. Array-like object arguments must have a length which is a multiple of two. Length: `%u`.', N ) );\n\t\t\t}\n\t\t\tif ( idx+(N/2) > this._length ) {\n\t\t\t\tthrow new RangeError( 'invalid arguments. Target array lacks sufficient storage to accommodate source values.' );\n\t\t\t}\n\t\t\tsbuf = value;\n\n\t\t\t// Check for overlapping memory...\n\t\t\tj = buf.byteOffset + (idx*BYTES_PER_ELEMENT);\n\t\t\tif (\n\t\t\t\tsbuf.buffer === buf.buffer &&\n\t\t\t\t(\n\t\t\t\t\tsbuf.byteOffset < j &&\n\t\t\t\t\tsbuf.byteOffset+sbuf.byteLength > j\n\t\t\t\t)\n\t\t\t) {\n\t\t\t\t// We need to copy source values...\n\t\t\t\ttmp = new Float64Array( N );\n\t\t\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\t\t\ttmp[ i ] = sbuf[ i ];\n\t\t\t\t}\n\t\t\t\tsbuf = tmp;\n\t\t\t}\n\t\t\tidx *= 2;\n\t\t\tN /= 2;\n\t\t\tj = 0;\n\t\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\t\tbuf[ idx ] = sbuf[ j ];\n\t\t\t\tbuf[ idx+1 ] = sbuf[ j+1 ];\n\t\t\t\tidx += 2; // stride\n\t\t\t\tj += 2; // stride\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\t// If an array contains only complex numbers, then we need to extract real and imaginary components...\n\t\tif ( idx+N > this._length ) {\n\t\t\tthrow new RangeError( 'invalid arguments. Target array lacks sufficient storage to accommodate source values.' );\n\t\t}\n\t\tidx *= 2;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\tv = value[ i ];\n\t\t\tbuf[ idx ] = real( v );\n\t\t\tbuf[ idx+1 ] = imag( v );\n\t\t\tidx += 2; // stride\n\t\t}\n\t\treturn;\n\t}\n\tthrow new TypeError( format( 'invalid argument. First argument must be either a complex number, an array-like object, or a complex number array. Value: `%s`.', value ) );\n\n\t/* eslint-enable no-underscore-dangle */\n});\n\n/**\n* Tests whether at least one element in an array passes a test implemented by a predicate function.\n*\n* @name some\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {boolean} boolean indicating whether at least one element passes a test\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* function predicate( v ) {\n* return ( real( v ) === imag( v ) );\n* }\n*\n* var arr = new Complex128Array( 3 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n*\n* var bool = arr.some( predicate );\n* // returns true\n*/\nsetReadOnly( Complex128Array.prototype, 'some', function some( predicate, thisArg ) {\n\tvar buf;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tif ( predicate.call( thisArg, getComplex128( buf, i ), i, this ) ) {\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n});\n\n/**\n* Creates a new typed array view over the same underlying `ArrayBuffer` and with the same underlying data type as the host array.\n*\n* @name subarray\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {integer} [begin=0] - starting index (inclusive)\n* @param {integer} [end] - ending index (exclusive)\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be an integer\n* @throws {TypeError} second argument must be an integer\n* @returns {Complex64Array} subarray\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* var arr = new Complex128Array( 5 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n* arr.set( [ 4.0, -4.0 ], 3 );\n* arr.set( [ 5.0, -5.0 ], 4 );\n*\n* var subarr = arr.subarray();\n* // returns \n*\n* var len = subarr.length;\n* // returns 5\n*\n* var z = subarr.get( 0 );\n* // returns \n*\n* var re = real( z );\n* // returns 1.0\n*\n* var im = imag( z );\n* // returns -1.0\n*\n* z = subarr.get( len-1 );\n* // returns \n*\n* re = real( z );\n* // returns 5.0\n*\n* im = imag( z );\n* // returns -5.0\n*\n* subarr = arr.subarray( 1, -2 );\n* // returns \n*\n* len = subarr.length;\n* // returns 2\n*\n* z = subarr.get( 0 );\n* // returns \n*\n* re = real( z );\n* // returns 2.0\n*\n* im = imag( z );\n* // returns -2.0\n*\n* z = subarr.get( len-1 );\n* // returns \n*\n* re = real( z );\n* // returns 3.0\n*\n* im = imag( z );\n* // returns -3.0\n*/\nsetReadOnly( Complex128Array.prototype, 'subarray', function subarray( begin, end ) {\n\tvar offset;\n\tvar buf;\n\tvar len;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tbuf = this._buffer;\n\tlen = this._length;\n\tif ( arguments.length === 0 ) {\n\t\tbegin = 0;\n\t\tend = len;\n\t} else {\n\t\tif ( !isInteger( begin ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. First argument must be an integer. Value: `%s`.', begin ) );\n\t\t}\n\t\tif ( begin < 0 ) {\n\t\t\tbegin += len;\n\t\t\tif ( begin < 0 ) {\n\t\t\t\tbegin = 0;\n\t\t\t}\n\t\t}\n\t\tif ( arguments.length === 1 ) {\n\t\t\tend = len;\n\t\t} else {\n\t\t\tif ( !isInteger( end ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be an integer. Value: `%s`.', end ) );\n\t\t\t}\n\t\t\tif ( end < 0 ) {\n\t\t\t\tend += len;\n\t\t\t\tif ( end < 0 ) {\n\t\t\t\t\tend = 0;\n\t\t\t\t}\n\t\t\t} else if ( end > len ) {\n\t\t\t\tend = len;\n\t\t\t}\n\t\t}\n\t}\n\tif ( begin >= len ) {\n\t\tlen = 0;\n\t\toffset = buf.byteLength;\n\t} else if ( begin >= end ) {\n\t\tlen = 0;\n\t\toffset = buf.byteOffset + ( begin*BYTES_PER_ELEMENT );\n\t} else {\n\t\tlen = end - begin;\n\t\toffset = buf.byteOffset + ( begin*BYTES_PER_ELEMENT );\n\t}\n\treturn new this.constructor( buf.buffer, offset, ( len < 0 ) ? 0 : len );\n});\n\n/**\n* Returns a new typed array containing the elements in reversed order.\n*\n* @name toReversed\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Complex128Array} reversed array\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* var arr = new Complex128Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var out = arr.toReversed();\n* // returns \n*\n* var z = out.get( 0 );\n* // returns \n*\n* var re = real( z );\n* // returns 3.0\n*\n* var im = imag( z );\n* // returns 3.0\n*\n* z = out.get( 1 );\n* // returns \n*\n* re = real( z );\n* // returns 2.0\n*\n* im = imag( z );\n* // returns 2.0\n*\n* z = out.get( 2 );\n* // returns \n*\n* re = real( z );\n* // returns 1.0\n*\n* im = imag( z );\n* // returns 1.0\n*/\nsetReadOnly( Complex128Array.prototype, 'toReversed', function toReversed() {\n\tvar outbuf;\n\tvar out;\n\tvar len;\n\tvar buf;\n\tvar i;\n\tvar j;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tlen = this._length;\n\tout = new this.constructor( len );\n\tbuf = this._buffer;\n\toutbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\tfor ( i = 0; i < len; i++ ) {\n\t\tj = len - i - 1;\n\t\toutbuf[ (2*i) ] = buf[ (2*j) ];\n\t\toutbuf[ (2*i)+1 ] = buf[ (2*j)+1 ];\n\t}\n\treturn out;\n});\n\n/**\n* Serializes an array as a string.\n*\n* @name toString\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @throws {TypeError} `this` must be a complex number array\n* @returns {string} string representation\n*\n* @example\n* var arr = new Complex128Array( 2 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n*\n* var str = arr.toString();\n* // returns '1 + 1i,2 + 2i'\n*/\nsetReadOnly( Complex128Array.prototype, 'toString', function toString() {\n\tvar out;\n\tvar buf;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tout = [];\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tout.push( getComplex128( buf, i ).toString() );\n\t}\n\treturn out.join( ',' );\n});\n\n/**\n* Returns a new typed array with the element at a provided index replaced with a provided value.\n*\n* @name with\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {integer} index - element index\n* @param {ComplexLike} value - new value\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be an integer\n* @throws {RangeError} index argument is out-of-bounds\n* @throws {TypeError} second argument must be a complex number\n* @returns {Complex128Array} new typed array\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n* import Complex128 from '@stdlib/complex-float64';\n*\n* var arr = new Complex128Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var out = arr.with( 0, new Complex128( 4.0, 4.0 ) );\n* // returns \n*\n* var z = out.get( 0 );\n* // returns \n*\n* var re = real( z );\n* // returns 4.0\n*\n* var im = imag( z );\n* // returns 4.0\n*/\nsetReadOnly( Complex128Array.prototype, 'with', function copyWith( index, value ) {\n\tvar buf;\n\tvar out;\n\tvar len;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isInteger( index ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be an integer. Value: `%s`.', index ) );\n\t}\n\tlen = this._length;\n\tif ( index < 0 ) {\n\t\tindex += len;\n\t}\n\tif ( index < 0 || index >= len ) {\n\t\tthrow new RangeError( format( 'invalid argument. Index argument is out-of-bounds. Value: `%s`.', index ) );\n\t}\n\tif ( !isComplexLike( value ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Second argument must be a complex number. Value: `%s`.', value ) );\n\t}\n\tout = new this.constructor( this._buffer );\n\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\tbuf[ 2*index ] = real( value );\n\tbuf[ (2*index)+1 ] = imag( value );\n\treturn out;\n});\n\n\n// EXPORTS //\n\nexport default Complex128Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport real from '@stdlib/complex-real';\nimport imag from '@stdlib/complex-imag';\n\n\n// MAIN //\n\n/**\n* Returns a strided array of real and imaginary components.\n*\n* @private\n* @param {Float64Array} buf - output array\n* @param {Array} arr - array containing complex numbers\n* @returns {(Float64Array|null)} output array or null\n*/\nfunction fromArray( buf, arr ) {\n\tvar len;\n\tvar v;\n\tvar i;\n\tvar j;\n\n\tlen = arr.length;\n\tj = 0;\n\tfor ( i = 0; i < len; i++ ) {\n\t\tv = arr[ i ];\n\t\tif ( !isComplexLike( v ) ) {\n\t\t\treturn null;\n\t\t}\n\t\tbuf[ j ] = real( v );\n\t\tbuf[ j+1 ] = imag( v );\n\t\tj += 2; // stride\n\t}\n\treturn buf;\n}\n\n\n// EXPORTS //\n\nexport default fromArray;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isArrayLikeObject from '@stdlib/assert-is-array-like-object';\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport format from '@stdlib/string-format';\nimport real from '@stdlib/complex-real';\nimport imag from '@stdlib/complex-imag';\n\n\n// MAIN //\n\n/**\n* Returns an array of iterated values.\n*\n* @private\n* @param {Object} it - iterator\n* @param {Function} clbk - callback to invoke for each iterated value\n* @param {*} thisArg - invocation context\n* @returns {(Array|TypeError)} array or an error\n*/\nfunction fromIteratorMap( it, clbk, thisArg ) {\n\tvar out;\n\tvar v;\n\tvar z;\n\tvar i;\n\n\tout = [];\n\ti = -1;\n\twhile ( true ) {\n\t\tv = it.next();\n\t\tif ( v.done ) {\n\t\t\tbreak;\n\t\t}\n\t\ti += 1;\n\t\tz = clbk.call( thisArg, v.value, i );\n\t\tif ( isArrayLikeObject( z ) && z.length >= 2 ) {\n\t\t\tout.push( z[ 0 ], z[ 1 ] );\n\t\t} else if ( isComplexLike( z ) ) {\n\t\t\tout.push( real( z ), imag( z ) );\n\t\t} else {\n\t\t\treturn new TypeError( format( 'invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', z ) );\n\t\t}\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default fromIteratorMap;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport Float64Array from '@stdlib/array-float64';\nimport Float32Array from '@stdlib/array-float32';\nimport Int16Array from '@stdlib/array-int16';\nimport Int32Array from '@stdlib/array-int32';\nimport Int8Array from '@stdlib/array-int8';\nimport Uint16Array from '@stdlib/array-uint16';\nimport Uint32Array from '@stdlib/array-uint32';\nimport Uint8Array from '@stdlib/array-uint8';\nimport Uint8ClampedArray from '@stdlib/array-uint8c';\nimport Complex64Array from '@stdlib/array-complex64';\nimport Complex128Array from '@stdlib/array-complex128';\n\n\n// MAIN //\n\n// Mapping from data types to constructors...\nvar ctors = {\n\t'float64': Float64Array,\n\t'float32': Float32Array,\n\t'generic': Array, // TODO: replace with `stdlib` pkg\n\t'int16': Int16Array,\n\t'int32': Int32Array,\n\t'int8': Int8Array,\n\t'uint16': Uint16Array,\n\t'uint32': Uint32Array,\n\t'uint8': Uint8Array,\n\t'uint8c': Uint8ClampedArray,\n\t'complex64': Complex64Array,\n\t'complex128': Complex128Array\n};\n\n\n// EXPORTS //\n\nexport default ctors;\n","/**\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// MAIN //\n\n/**\n* Returns default array settings.\n*\n* @returns {Object} defaults\n*\n* @example\n* var o = defaults();\n* // returns {...}\n*/\nfunction defaults() {\n\treturn {\n\t\t// Data types:\n\t\t'dtypes': {\n\t\t\t'default': 'float64',\n\t\t\t'numeric': 'float64',\n\t\t\t'real': 'float64',\n\t\t\t'floating_point': 'float64',\n\t\t\t'real_floating_point': 'float64',\n\t\t\t'complex_floating_point': 'complex128',\n\t\t\t'integer': 'int32',\n\t\t\t'signed_integer': 'int32',\n\t\t\t'unsigned_integer': 'uint32'\n\t\t}\n\t};\n}\n\n\n// EXPORTS //\n\nexport default defaults;\n","/**\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// MODULES //\n\nimport defaults from './main.js';\n\n\n// VARIABLES //\n\nvar DEFAULTS = defaults();\nvar HASH = {\n\t'dtypes.default': DEFAULTS.dtypes.default,\n\t'dtypes.numeric': DEFAULTS.dtypes.numeric,\n\t'dtypes.real': DEFAULTS.dtypes.real,\n\t'dtypes.floating_point': DEFAULTS.dtypes.floating_point,\n\t'dtypes.real_floating_point': DEFAULTS.dtypes.real_floating_point,\n\t'dtypes.complex_floating_point': DEFAULTS.dtypes.complex_floating_point,\n\t'dtypes.integer': DEFAULTS.dtypes.integer,\n\t'dtypes.signed_integer': DEFAULTS.dtypes.signed_integer,\n\t'dtypes.unsigned_integer': DEFAULTS.dtypes.unsigned_integer\n};\n\n\n// MAIN //\n\n/**\n* Returns a default array setting.\n*\n* @param {string} name - setting name\n* @returns {*} default setting or null\n*\n* @example\n* var v = get( 'dtypes.default' );\n* // returns \n*/\nfunction get( name ) {\n\tvar v = HASH[ name ];\n\treturn ( v === void 0 ) ? null : v;\n}\n\n\n// EXPORTS //\n\nexport default get;\n","/**\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* Return default array settings.\n*\n* @module @stdlib/array-defaults\n*\n* @example\n* import defaults from '@stdlib/array-defaults';\n*\n* var o = defaults();\n* // returns {...}\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport get from './get.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'get', get );\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isNonNegativeInteger } from '@stdlib/assert-is-nonnegative-integer';\nimport ctors from '@stdlib/array-ctors';\nimport gzeros from '@stdlib/array-base-zeros';\nimport defaults from '@stdlib/array-defaults';\nimport format from '@stdlib/string-format';\n\n\n// VARIABLES //\n\nvar DEFAULT_DTYPE = defaults.get( 'dtypes.default' );\n\n\n// MAIN //\n\n/**\n* Creates a zero-filled array having a specified length.\n*\n* @param {NonNegativeInteger} length - array length\n* @param {string} [dtype=\"float64\"] - data type\n* @throws {TypeError} first argument must be a nonnegative integer\n* @throws {TypeError} second argument must be a recognized data type\n* @returns {(TypedArray|Array|ComplexArray)} array or typed array\n*\n* @example\n* var arr = zeros( 2 );\n* // returns [ 0.0, 0.0 ]\n*\n* @example\n* var arr = zeros( 2, 'float32' );\n* // returns [ 0.0, 0.0 ]\n*/\nfunction zeros( length ) {\n\tvar dtype;\n\tvar ctor;\n\tif ( !isNonNegativeInteger( length ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a nonnegative integer. Value: `%s`.', length ) );\n\t}\n\tif ( arguments.length > 1 ) {\n\t\tdtype = arguments[ 1 ];\n\t} else {\n\t\tdtype = DEFAULT_DTYPE;\n\t}\n\tif ( dtype === 'generic' ) {\n\t\treturn gzeros( length );\n\t}\n\tctor = ctors( dtype );\n\tif ( ctor === null ) {\n\t\tthrow new TypeError( format( 'invalid argument. Second argument must be a recognized data type. Value: `%s`.', dtype ) );\n\t}\n\treturn new ctor( length ); // WARNING: we assume that, apart from 'generic', the constructors for supported array data types are zero-filled by default\n}\n\n\n// EXPORTS //\n\nexport default zeros;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Returns a filled \"generic\" array.\n*\n* @param {*} value - fill value\n* @param {NonNegativeInteger} len - array length\n* @returns {Array} filled array\n*\n* @example\n* var out = filled( 0.0, 3 );\n* // returns [ 0.0, 0.0, 0.0 ]\n*\n* @example\n* var out = filled( 'beep', 3 );\n* // returns [ 'beep', 'beep', 'beep' ]\n*/\nfunction filled( value, len ) {\n\tvar arr;\n\tvar i;\n\n\t// Manually push elements in order to ensure \"fast\" elements...\n\tarr = [];\n\tfor ( i = 0; i < len; i++ ) {\n\t\tarr.push( value );\n\t}\n\treturn arr;\n}\n\n\n// EXPORTS //\n\nexport default filled;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport filled from '@stdlib/array-base-filled';\n\n\n// MAIN //\n\n/**\n* Returns a zero-filled \"generic\" array.\n*\n* @param {NonNegativeInteger} len - array length\n* @returns {Array} output array\n*\n* @example\n* var out = zeros( 3 );\n* // returns [ 0.0, 0.0, 0.0 ]\n*/\nfunction zeros( len ) {\n\treturn filled( 0.0, len );\n}\n\n\n// EXPORTS //\n\nexport default zeros;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport table from './ctors.js';\n\n\n// MAIN //\n\n/**\n* Returns an array constructor.\n*\n* @param {string} dtype - data type\n* @returns {(Function|null)} constructor or null\n*\n* @example\n* var ctor = ctors( 'float64' );\n* // returns \n*\n* @example\n* var ctor = ctors( 'float' );\n* // returns null\n*/\nfunction ctors( dtype ) {\n\treturn table[ dtype ] || null;\n}\n\n\n// EXPORTS //\n\nexport default ctors;\n","/**\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// MODULES //\n\nimport zeros from '@stdlib/array-zeros';\n\n\n// MAIN //\n\n/**\n* Creates an uninitialized array having a specified length.\n*\n* @private\n* @param {NonNegativeInteger} length - array length\n* @param {string} [dtype=\"float64\"] - data type\n* @throws {TypeError} first argument must be a nonnegative integer\n* @throws {TypeError} second argument must be a recognized data type\n* @returns {(TypedArray|Array|ComplexArray)} array or typed array\n*\n* @example\n* var arr = empty( 2 );\n* // returns \n*\n* @example\n* var arr = empty( 2, 'float32' );\n* // returns \n*/\nfunction empty( length ) {\n\tif ( arguments.length > 1 ) {\n\t\treturn zeros( length, arguments[ 1 ] );\n\t}\n\treturn zeros( length );\n}\n\n\n// EXPORTS //\n\nexport default empty;\n"],"names":["main","Object","defineProperty","isNumber","value","zeros","n","i","out","zeroPad","str","width","right","negative","pad","length","startsWithMinus","substr","lowercase","String","prototype","toLowerCase","uppercase","toUpperCase","formatInteger","token","base","specifier","arg","parseInt","isFinite","Error","toString","precision","padRight","sign","alternate","call","charAt","abs","Math","replace","RE_EXP_POS_DIGITS","RE_EXP_NEG_DIGITS","RE_ONLY_DIGITS","RE_DIGITS_BEFORE_EXP","RE_TRAILING_PERIOD_ZERO","RE_PERIOD_ZERO_EXP","RE_ZERO_BEFORE_EXP","formatDouble","digits","f","parseFloat","toExponential","toFixed","toPrecision","spaces","fromCharCode","isnan","isNaN","isArray","Array","initialize","flags","mapping","formatInterpolate","tokens","hasPeriod","flag","num","pos","j","TypeError","padZeros","indexOf","arguments","maxWidth","substring","RE","parse","match","formatTokenize","content","prev","exec","slice","lastIndex","push","format","args","tokenize","interpolate","apply","objectProtoype","toStr","defineGetter","__defineGetter__","defineSetter","__defineSetter__","lookupGetter","__lookupGetter__","lookupSetter","__lookupSetter__","err","hasDefinePropertySupport","builtin","obj","prop","descriptor","hasValue","hasGet","hasSet","__proto__","get","set","defineProperty$1","setNonEnumerableReadOnly","configurable","enumerable","writable","FLG","Symbol","hasToStringTagSupport","toStringTag","has","hasOwnProperty","hasOwnProp","property","Sym","toStrTag","nativeClass","hasToStringTag","v","isOwn","tag","main$b","Number","test","isPrimitive","isObject","setReadOnly","FLOAT64_PINF","POSITIVE_INFINITY","FLOAT64_NINF","NEGATIVE_INFINITY","floor","isInteger","x","PINF","NINF","isInt","valueOf","isNonNegativeInteger","hasFloat64Array","Float64Array","ctor","Float64Array$1","bool","arr","GlobalFloat64Array","NaN","hasFloat64ArraySupport","hasFloat32Array","Float32Array","Float32Array$1","GlobalFloat32Array","hasFloat32ArraySupport","hasInt16Array","Int16Array","Int16Array$1","GlobalInt16Array","INT16_MAX","hasInt16ArraySupport","hasInt32Array","Int32Array","Int32Array$1","GlobalInt32Array","INT32_MAX","hasInt32ArraySupport","hasInt8Array","Int8Array","Int8Array$1","GlobalInt8Array","INT8_MAX","hasInt8ArraySupport","hasUint16Array","Uint16Array","Uint16Array$1","GlobalUint16Array","UINT16_MAX","hasUint16ArraySupport","hasUint32Array","Uint32Array","Uint32Array$1","GlobalUint32Array","UINT32_MAX","hasUint32ArraySupport","hasUint8Array","Uint8Array","Uint8Array$1","GlobalUint8Array","UINT8_MAX","hasUint8ArraySupport","hasUint8ClampedArray","Uint8ClampedArray","Uint8ClampedArray$1","GlobalUint8ClampedArray","hasUint8ClampedArraySupport","MAX_ARRAY_LENGTH","isArrayLikeObject","MAX_LENGTH","MAX_TYPED_ARRAY_LENGTH","isCollection","hasArrayBuffer","ArrayBuffer","isArrayBuffer","main$1","isString","isBoolean","Bool","Boolean","self","window","global","globalThis","root","codegen","Function","GlobalThis","Self","Win","Global","getGlobal","nodeList","document","childNodes","typedarray","reFunctionName","RE_FUNCTION_NAME","isObjectLike","constructorName","name","constructor","_isBuffer","isBuffer","REGEXP","predicate","len","arrayfun","ctorName","type","isFunction","typeOf","Complex128","real","imag","this","re","im","fround","FLOAT32_VIEW","float64ToFloat32$1","Complex64","float64ToFloat32","isComplexLike","isEven","BYTES_PER_ELEMENT","isComplex64Array","isComplex128Array","hasIteratorSymbolSupport","iterator","IteratorSymbol","setNonEnumerableReadOnlyAccessor","getter","realf","z","imagf","reinterpret","offset","buffer","byteOffset","GETTERS","float64","idx","float32","int32","int16","int8","uint32","uint16","uint8","uint8c","generic","default","dtype","complex128","complex64","fromIterator","it","next","done","HAS_ITERATOR_SYMBOL","isComplexArray","Complex64Array","_length","_buffer","isComplexArrayConstructor","getComplex64","buf","nargs","fromArray","RangeError","reinterpret64","reinterpret128","byteLength","ITERATOR_SYMBOL","src","thisArg","clbk","tmp","flg","accessorGetter","fromIteratorMap","setReadOnlyAccessor","target","start","copyWithin","iter","entries","end","fcn","searchElement","fromIndex","separator","sep","join","outbuf","N","sbuf","outlen","begin","index","Complex128Array","getComplex128","ctors","defaults","dtypes","numeric","floating_point","real_floating_point","complex_floating_point","integer","signed_integer","unsigned_integer","DEFAULTS","HASH","DEFAULT_DTYPE","filled","table","empty"],"mappings":";;AAsBA,IAAIA,EAA0C,mBAA1BC,OAAOC,eAAkCD,OAAOC,eAAiB,KCiCrF,IAAIA,EAAiBD,OAAOC,eCjB5B,SAASC,EAAUC,GAClB,MAA0B,iBAAVA,CACjB,CCAA,SAASC,EAAOC,GACf,IACIC,EADAC,EAAM,GAEV,IAAMD,EAAI,EAAGA,EAAID,EAAGC,IACnBC,GAAO,IAER,OAAOA,CACR,CAcA,SAASC,EAASC,EAAKC,EAAOC,GAC7B,IAAIC,GAAW,EACXC,EAAMH,EAAQD,EAAIK,OACtB,OAAKD,EAAM,IAnCZ,SAA0BJ,GACzB,MAAoB,MAAbA,EAAK,EACb,CAoCMM,CAAiBN,KACrBG,GAAW,EACXH,EAAMA,EAAIO,OAAQ,IAEnBP,EAAM,EACLA,EAAML,EAAOS,GACbT,EAAOS,GAAQJ,EACXG,IACJH,EAAM,IAAMA,IAVLA,CAaT,CCpDA,IAAIQ,EAAYC,OAAOC,UAAUC,YAC7BC,EAAYH,OAAOC,UAAUG,YAajC,SAASC,EAAeC,GACvB,IAAIC,EACAlB,EACAD,EAEJ,OAASkB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WgB,EAAQ,+EAAgFzE,IAO9G,GAAe,aAJduR,EADI3N,UAAU5D,OAAS,EACf4D,UAAW,GAEXyR,IAGR,OC5BF,SAAiBhW,EAAOmP,GACvB,IAAIzF,EACAvJ,EAIJ,IADAuJ,EAAM,GACAvJ,EAAI,EAAGA,EAAIgP,EAAKhP,IACrBuJ,EAAIvE,KAAMnF,GAEX,OAAO0J,CACR,CCTQuM,CAAQ,EF2BCtV,GAGhB,GADA4I,EG1BD,SAAgB2I,GACf,OAAOgE,GAAOhE,IAAW,IAC1B,CHwBQkD,CAAOlD,GACA,OAAT3I,EACJ,MAAM,IAAInF,UAAWgB,EAAQ,iFAAkF8M,IAEhH,OAAO,IAAI3I,EAAM5I,EAClB,CI3BA,SAASwV,GAAOxV,GACf,OAAK4D,UAAU5D,OAAS,EAChBV,GAAOU,EAAQ4D,UAAW,IAE3BtE,GAAOU,EACf","x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189]} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index d9aaeb3..0000000 --- a/stats.html +++ /dev/null @@ -1,4842 +0,0 @@ - - - - - - - - Rollup Visualizer - - - -
- - - - - From 7acc58f20329ce0c84d9efe7e5c67ca973f74ce8 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sun, 25 Feb 2024 20:57:37 +0000 Subject: [PATCH 50/75] 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 | 36 +- SECURITY.md | 5 - benchmark/benchmark.js | 264 -- benchmark/benchmark.length.complex128.js | 93 - benchmark/benchmark.length.complex64.js | 93 - benchmark/benchmark.length.float32.js | 93 - benchmark/benchmark.length.float64.js | 93 - benchmark/benchmark.length.generic.js | 93 - benchmark/benchmark.length.int16.js | 93 - benchmark/benchmark.length.int32.js | 93 - benchmark/benchmark.length.int8.js | 93 - benchmark/benchmark.length.uint16.js | 93 - benchmark/benchmark.length.uint32.js | 93 - benchmark/benchmark.length.uint8.js | 93 - benchmark/benchmark.length.uint8c.js | 93 - branches.md | 56 - dist/index.d.ts | 3 - dist/index.js | 9 - dist/index.js.map | 7 - docs/repl.txt | 52 - docs/types/test.ts | 77 - examples/index.js | 33 - lib/index.js | 58 - lib/is_buffer_uint8array.js | 47 - lib/main.js | 107 - lib/polyfill.js | 56 - docs/types/index.d.ts => mod.d.ts | 2 +- mod.js | 4 + mod.js.map | 1 + package.json | 82 +- stats.html | 4842 +++++++++++++++++++++ test/dist/test.js | 33 - test/test.js | 60 - test/test.main.js | 274 -- test/test.polyfill.js | 324 -- 58 files changed, 4859 insertions(+), 5850 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 benchmark/benchmark.js delete mode 100644 benchmark/benchmark.length.complex128.js delete mode 100644 benchmark/benchmark.length.complex64.js delete mode 100644 benchmark/benchmark.length.float32.js delete mode 100644 benchmark/benchmark.length.float64.js delete mode 100644 benchmark/benchmark.length.generic.js delete mode 100644 benchmark/benchmark.length.int16.js delete mode 100644 benchmark/benchmark.length.int32.js delete mode 100644 benchmark/benchmark.length.int8.js delete mode 100644 benchmark/benchmark.length.uint16.js delete mode 100644 benchmark/benchmark.length.uint32.js delete mode 100644 benchmark/benchmark.length.uint8.js delete mode 100644 benchmark/benchmark.length.uint8c.js 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/repl.txt delete mode 100644 docs/types/test.ts delete mode 100644 examples/index.js delete mode 100644 lib/index.js delete mode 100644 lib/is_buffer_uint8array.js delete mode 100644 lib/main.js delete mode 100644 lib/polyfill.js rename docs/types/index.d.ts => mod.d.ts (96%) create mode 100644 mod.js create mode 100644 mod.js.map create mode 100644 stats.html delete mode 100644 test/dist/test.js delete mode 100644 test/test.js delete mode 100644 test/test.main.js delete mode 100644 test/test.polyfill.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 96f81a8..0000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,7 +0,0 @@ - - -We are excited about your pull request, but unfortunately we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/empty) 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 ddb353e..0000000 --- a/.github/workflows/close_pull_requests.yml +++ /dev/null @@ -1,54 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: close_pull_requests - -# Workflow triggers: -on: - pull_request_target: - types: [opened] - -# Workflow jobs: -jobs: - - # Define job to close all pull requests: - run: - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Close pull request - - name: 'Close pull request' - # Pin action to full length commit SHA corresponding to v3.1.2 - uses: superbrothers/close-pull-request@9c18513d320d7b2c7185fb93396d0c664d5d8448 - with: - comment: | - Thank you for submitting a pull request. :raised_hands: - - We greatly appreciate your willingness to submit a contribution. However, we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). - - We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/empty) 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 8376c30..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: '49 1 * * 5' - - # 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 + + + + 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 8e62cb8..0000000 --- a/test/test.js +++ /dev/null @@ -1,60 +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 proxyquire = require( 'proxyquire' ); -var main = require( './../lib/main.js' ); -var polyfill = require( './../lib/polyfill.js' ); -var empty = require( './../lib' ); - - -// TESTS // - -tape( 'main export is a function', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof empty, 'function', 'main export is a function' ); - t.end(); -}); - -tape( 'if an environment supports Node.js buffer instances inheriting from Uint8Array, the main export supports returning arrays having uninitialized memory', function test( t ) { - var empty = proxyquire( './../lib', { - './is_buffer_uint8array.js': mock - }); - t.strictEqual( empty, main, 'returns expected value' ); - t.end(); - - function mock() { - return true; - } -}); - -tape( 'if an environment does not support Node.js buffer instances inheriting from Uint8Array, the main export supports returning zero-filled arrays', function test( t ) { - var empty = proxyquire( './../lib', { - './is_buffer_uint8array.js': mock - }); - t.strictEqual( empty, polyfill, 'returns expected value' ); - t.end(); - - function mock() { - return false; - } -}); diff --git a/test/test.main.js b/test/test.main.js deleted file mode 100644 index 3ceb26e..0000000 --- a/test/test.main.js +++ /dev/null @@ -1,274 +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 Float64Array = require( '@stdlib/array-float64' ); -var Float32Array = require( '@stdlib/array-float32' ); -var Int32Array = require( '@stdlib/array-int32' ); -var Uint32Array = require( '@stdlib/array-uint32' ); -var Int16Array = require( '@stdlib/array-int16' ); -var Uint16Array = require( '@stdlib/array-uint16' ); -var Int8Array = require( '@stdlib/array-int8' ); -var Uint8Array = require( '@stdlib/array-uint8' ); -var Uint8ClampedArray = require( '@stdlib/array-uint8c' ); -var Complex64Array = require( '@stdlib/array-complex64' ); -var Complex128Array = require( '@stdlib/array-complex128' ); -var instanceOf = require( '@stdlib/assert-instance-of' ); -var empty = require( './../lib/main.js' ); - - -// TESTS // - -tape( 'main export is a function', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof empty, 'function', 'main export is a function' ); - t.end(); -}); - -tape( 'the function throws an error if provided a value other than a nonnegative integer for the first argument', function test( t ) { - var values; - var i; - - values = [ - '5', - -3, - 3.14, - NaN, - true, - false, - null, - void 0, - [], - {}, - function noop() {} - ]; - - for ( i = 0; i < values.length; i++ ) { - t.throws( badValue( values[i] ), TypeError, 'throws an error when provided '+values[i] ); - } - t.end(); - - function badValue( value ) { - return function badValue() { - empty( value ); - }; - } -}); - -tape( 'the function throws an error if provided a value other than a nonnegative integer for the first argument (dtype)', function test( t ) { - var values; - var i; - - values = [ - '5', - -3, - 3.14, - NaN, - true, - false, - null, - void 0, - [], - {}, - function noop() {} - ]; - - for ( i = 0; i < values.length; i++ ) { - t.throws( badValue( values[i] ), TypeError, 'throws an error when provided '+values[i] ); - } - t.end(); - - function badValue( value ) { - return function badValue() { - empty( value, 'float32' ); - }; - } -}); - -tape( 'the function throws an error if provided an unrecognized data type', function test( t ) { - var values; - var i; - - values = [ - '5', - 'beep', - 'empty', - 'Int32', - 'Uint32', - 'Int16', - 'Uint16', - 'Int8', - 'Uint8', - 'Uint8c', - 'uint8_clamped', - 'Float64', - 'Float32', - 'FLOAT64', - 'FLOAT32', - 'GENERIC' - ]; - - for ( i = 0; i < values.length; i++ ) { - t.throws( badValue( values[i] ), TypeError, 'throws an error when provided '+values[i] ); - } - t.end(); - - function badValue( value ) { - return function badValue() { - empty( 10, value ); - }; - } -}); - -tape( 'the function returns an empty array (default)', function test( t ) { - var arr; - - arr = empty( 5 ); - t.strictEqual( instanceOf( arr, Float64Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=float64)', function test( t ) { - var arr; - - arr = empty( 5, 'float64' ); - t.strictEqual( instanceOf( arr, Float64Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=float32)', function test( t ) { - var arr; - - arr = empty( 5, 'float32' ); - t.strictEqual( instanceOf( arr, Float32Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=complex128)', function test( t ) { - var arr; - - arr = empty( 5, 'complex128' ); - t.strictEqual( instanceOf( arr, Complex128Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=complex64)', function test( t ) { - var arr; - - arr = empty( 5, 'complex64' ); - t.strictEqual( instanceOf( arr, Complex64Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=int32)', function test( t ) { - var arr; - - arr = empty( 5, 'int32' ); - t.strictEqual( instanceOf( arr, Int32Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=uint32)', function test( t ) { - var arr; - - arr = empty( 5, 'uint32' ); - t.strictEqual( instanceOf( arr, Uint32Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=int16)', function test( t ) { - var arr; - - arr = empty( 5, 'int16' ); - t.strictEqual( instanceOf( arr, Int16Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=uint16)', function test( t ) { - var arr; - - arr = empty( 5, 'uint16' ); - t.strictEqual( instanceOf( arr, Uint16Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=int8)', function test( t ) { - var arr; - - arr = empty( 5, 'int8' ); - t.strictEqual( instanceOf( arr, Int8Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=uint8)', function test( t ) { - var arr; - - arr = empty( 5, 'uint8' ); - t.strictEqual( instanceOf( arr, Uint8Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=uint8c)', function test( t ) { - var arr; - - arr = empty( 5, 'uint8c' ); - t.strictEqual( instanceOf( arr, Uint8ClampedArray ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=generic)', function test( t ) { - var expected; - var arr; - - expected = [ 0, 0, 0, 0, 0 ]; - - arr = empty( 5, 'generic' ); - t.strictEqual( instanceOf( arr, Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); diff --git a/test/test.polyfill.js b/test/test.polyfill.js deleted file mode 100644 index 17b99f3..0000000 --- a/test/test.polyfill.js +++ /dev/null @@ -1,324 +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 Float64Array = require( '@stdlib/array-float64' ); -var Float32Array = require( '@stdlib/array-float32' ); -var Int32Array = require( '@stdlib/array-int32' ); -var Uint32Array = require( '@stdlib/array-uint32' ); -var Int16Array = require( '@stdlib/array-int16' ); -var Uint16Array = require( '@stdlib/array-uint16' ); -var Int8Array = require( '@stdlib/array-int8' ); -var Uint8Array = require( '@stdlib/array-uint8' ); -var Uint8ClampedArray = require( '@stdlib/array-uint8c' ); -var Complex64Array = require( '@stdlib/array-complex64' ); -var Complex128Array = require( '@stdlib/array-complex128' ); -var reinterpret64 = require( '@stdlib/strided-base-reinterpret-complex64' ); -var reinterpret128 = require( '@stdlib/strided-base-reinterpret-complex128' ); -var instanceOf = require( '@stdlib/assert-instance-of' ); -var empty = require( './../lib/polyfill.js' ); - - -// TESTS // - -tape( 'main export is a function', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof empty, 'function', 'main export is a function' ); - t.end(); -}); - -tape( 'the function throws an error if provided a value other than a nonnegative integer for the first argument', function test( t ) { - var values; - var i; - - values = [ - '5', - -3, - 3.14, - NaN, - true, - false, - null, - void 0, - [], - {}, - function noop() {} - ]; - - for ( i = 0; i < values.length; i++ ) { - t.throws( badValue( values[i] ), TypeError, 'throws an error when provided '+values[i] ); - } - t.end(); - - function badValue( value ) { - return function badValue() { - empty( value ); - }; - } -}); - -tape( 'the function throws an error if provided a value other than a nonnegative integer for the first argument (dtype)', function test( t ) { - var values; - var i; - - values = [ - '5', - -3, - 3.14, - NaN, - true, - false, - null, - void 0, - [], - {}, - function noop() {} - ]; - - for ( i = 0; i < values.length; i++ ) { - t.throws( badValue( values[i] ), TypeError, 'throws an error when provided '+values[i] ); - } - t.end(); - - function badValue( value ) { - return function badValue() { - empty( value, 'float32' ); - }; - } -}); - -tape( 'the function throws an error if provided an unrecognized data type', function test( t ) { - var values; - var i; - - values = [ - '5', - 'beep', - 'empty', - 'Int32', - 'Uint32', - 'Int16', - 'Uint16', - 'Int8', - 'Uint8', - 'Uint8c', - 'uint8_clamped', - 'Float64', - 'Float32', - 'FLOAT64', - 'FLOAT32', - 'GENERIC' - ]; - - for ( i = 0; i < values.length; i++ ) { - t.throws( badValue( values[i] ), TypeError, 'throws an error when provided '+values[i] ); - } - t.end(); - - function badValue( value ) { - return function badValue() { - empty( 10, value ); - }; - } -}); - -tape( 'the function returns a zero-filled array (default)', function test( t ) { - var expected; - var arr; - - expected = new Float64Array( [ 0.0, 0.0, 0.0, 0.0, 0.0 ] ); - - arr = empty( 5 ); - t.strictEqual( instanceOf( arr, Float64Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=float64)', function test( t ) { - var expected; - var arr; - - expected = new Float64Array( [ 0.0, 0.0, 0.0, 0.0, 0.0 ] ); - - arr = empty( 5, 'float64' ); - t.strictEqual( instanceOf( arr, Float64Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=float32)', function test( t ) { - var expected; - var arr; - - expected = new Float32Array( [ 0.0, 0.0, 0.0, 0.0, 0.0 ] ); - - arr = empty( 5, 'float32' ); - t.strictEqual( instanceOf( arr, Float32Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=complex128)', function test( t ) { - var expected; - var arr; - - expected = new Float64Array( [ 0.0, 0.0, 0.0, 0.0 ] ); - - arr = empty( 2, 'complex128' ); - t.strictEqual( instanceOf( arr, Complex128Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length/2, 'returns expected value' ); - t.deepEqual( reinterpret128( arr, 0 ), expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=complex64)', function test( t ) { - var expected; - var arr; - - expected = new Float32Array( [ 0.0, 0.0, 0.0, 0.0 ] ); - - arr = empty( 2, 'complex64' ); - t.strictEqual( instanceOf( arr, Complex64Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length/2, 'returns expected value' ); - t.deepEqual( reinterpret64( arr, 0 ), expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=int32)', function test( t ) { - var expected; - var arr; - - expected = new Int32Array( [ 0, 0, 0, 0, 0 ] ); - - arr = empty( 5, 'int32' ); - t.strictEqual( instanceOf( arr, Int32Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=uint32)', function test( t ) { - var expected; - var arr; - - expected = new Uint32Array( [ 0, 0, 0, 0, 0 ] ); - - arr = empty( 5, 'uint32' ); - t.strictEqual( instanceOf( arr, Uint32Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=int16)', function test( t ) { - var expected; - var arr; - - expected = new Int16Array( [ 0, 0, 0, 0, 0 ] ); - - arr = empty( 5, 'int16' ); - t.strictEqual( instanceOf( arr, Int16Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=uint16)', function test( t ) { - var expected; - var arr; - - expected = new Uint16Array( [ 0, 0, 0, 0, 0 ] ); - - arr = empty( 5, 'uint16' ); - t.strictEqual( instanceOf( arr, Uint16Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=int8)', function test( t ) { - var expected; - var arr; - - expected = new Int8Array( [ 0, 0, 0, 0, 0 ] ); - - arr = empty( 5, 'int8' ); - t.strictEqual( instanceOf( arr, Int8Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=uint8)', function test( t ) { - var expected; - var arr; - - expected = new Uint8Array( [ 0, 0, 0, 0, 0 ] ); - - arr = empty( 5, 'uint8' ); - t.strictEqual( instanceOf( arr, Uint8Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=uint8c)', function test( t ) { - var expected; - var arr; - - expected = new Uint8ClampedArray( [ 0, 0, 0, 0, 0 ] ); - - arr = empty( 5, 'uint8c' ); - t.strictEqual( instanceOf( arr, Uint8ClampedArray ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=generic)', function test( t ) { - var expected; - var arr; - - expected = [ 0, 0, 0, 0, 0 ]; - - arr = empty( 5, 'generic' ); - t.strictEqual( instanceOf( arr, Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); From c821b7d70b9ac5efd3df315f7eba6bed64d1568b Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sun, 25 Feb 2024 21:38:43 +0000 Subject: [PATCH 51/75] Update README.md for Deno bundle v0.2.1 --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 4a241a1..4f048de 100644 --- a/README.md +++ b/README.md @@ -52,7 +52,7 @@ limitations under the License. ## Usage ```javascript -import empty from 'https://cdn.jsdelivr.net/gh/stdlib-js/array-empty@deno/mod.js'; +import empty from 'https://cdn.jsdelivr.net/gh/stdlib-js/array-empty@v0.2.1-deno/mod.js'; ``` #### empty( length\[, dtype] ) @@ -114,7 +114,7 @@ var arr = empty( 2, 'int32' ); ```javascript import dtypes from 'https://cdn.jsdelivr.net/gh/stdlib-js/array-dtypes@deno/mod.js'; -import empty from 'https://cdn.jsdelivr.net/gh/stdlib-js/array-empty@deno/mod.js'; +import empty from 'https://cdn.jsdelivr.net/gh/stdlib-js/array-empty@v0.2.1-deno/mod.js'; // Get a list of array data types: var dt = dtypes(); From 587911192e604fe4b136756ce2396be6efe62c12 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sun, 25 Feb 2024 21:38:43 +0000 Subject: [PATCH 52/75] Auto-generated commit --- README.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 4f048de..78c70af 100644 --- a/README.md +++ b/README.md @@ -51,6 +51,11 @@ limitations under the License. ## Usage +```javascript +import empty from 'https://cdn.jsdelivr.net/gh/stdlib-js/array-empty@deno/mod.js'; +``` +The previous example will load the latest bundled code from the deno branch. Alternatively, you may load a specific version by loading the file from one of the [tagged bundles](https://github.com/stdlib-js/array-empty/tags). For example, + ```javascript import empty from 'https://cdn.jsdelivr.net/gh/stdlib-js/array-empty@v0.2.1-deno/mod.js'; ``` @@ -114,7 +119,7 @@ var arr = empty( 2, 'int32' ); ```javascript import dtypes from 'https://cdn.jsdelivr.net/gh/stdlib-js/array-dtypes@deno/mod.js'; -import empty from 'https://cdn.jsdelivr.net/gh/stdlib-js/array-empty@v0.2.1-deno/mod.js'; +import empty from 'https://cdn.jsdelivr.net/gh/stdlib-js/array-empty@deno/mod.js'; // Get a list of array data types: var dt = dtypes(); From 7d5a083f2f8d0e85de2bf3f2c8a432bd9253e7b1 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Fri, 1 Mar 2024 08:10:29 +0000 Subject: [PATCH 53/75] Transform error messages --- lib/main.js | 6 +++--- package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/main.js b/lib/main.js index 33d8392..44eb4a4 100644 --- a/lib/main.js +++ b/lib/main.js @@ -26,7 +26,7 @@ var ctors = require( '@stdlib/array-typed-ctors' ); var zeros = require( '@stdlib/array-base-zeros' ); var bytesPerElement = require( '@stdlib/ndarray-base-bytes-per-element' ); var defaults = require( '@stdlib/array-defaults' ); -var format = require( '@stdlib/string-format' ); +var format = require( '@stdlib/error-tools-fmtprodmsg' ); // VARIABLES // @@ -63,7 +63,7 @@ function empty( length ) { var nb; if ( !isNonNegativeInteger( length ) ) { - throw new TypeError( format( 'invalid argument. First argument must be a nonnegative integer. Value: `%s`.', length ) ); + throw new TypeError( format( '1Zj2d', length ) ); } if ( arguments.length > 1 ) { dtype = arguments[ 1 ]; @@ -75,7 +75,7 @@ function empty( length ) { } nbytes = bytesPerElement( dtype ); if ( nbytes === null ) { - throw new TypeError( format( 'invalid argument. Second argument must be a supported data type. Value: `%s`.', dtype ) ); + throw new TypeError( format( '1ZjEC', dtype ) ); } // Resolve typed array constructor: ctor = ctors( dtype ); diff --git a/package.json b/package.json index 824d634..9aca4da 100644 --- a/package.json +++ b/package.json @@ -46,7 +46,7 @@ "@stdlib/assert-is-uint8array": "^0.2.1", "@stdlib/buffer-alloc-unsafe": "^0.2.1", "@stdlib/ndarray-base-bytes-per-element": "^0.2.1", - "@stdlib/string-format": "^0.2.1", + "@stdlib/error-tools-fmtprodmsg": "^0.2.1", "@stdlib/types": "^0.3.2", "@stdlib/error-tools-fmtprodmsg": "^0.2.1" }, From 2715fc34cafa9c594c945a356c5861f2f165eb1b Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Fri, 1 Mar 2024 13:50:30 +0000 Subject: [PATCH 54/75] Remove files --- mod.d.ts | 66 - mod.js | 4 - mod.js.map | 1 - stats.html | 4842 ---------------------------------------------------- 4 files changed, 4913 deletions(-) delete mode 100644 mod.d.ts delete mode 100644 mod.js delete mode 100644 mod.js.map delete mode 100644 stats.html diff --git a/mod.d.ts b/mod.d.ts deleted file mode 100644 index 863116c..0000000 --- a/mod.d.ts +++ /dev/null @@ -1,66 +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 - -/// - -import { DataTypeMap } from '@stdlib/types/array'; - -/** -* Creates an uninitialized array having a specified length. -* -* The function recognizes the following data types: -* -* - `float64`: double-precision floating-point numbers (IEEE 754) -* - `float32`: single-precision floating-point numbers (IEEE 754) -* - `complex128`: double-precision complex floating-point numbers -* - `complex64`: single-precision complex floating-point numbers -* - `int32`: 32-bit two's complement signed integers -* - `uint32`: 32-bit unsigned integers -* - `int16`: 16-bit two's complement signed integers -* - `uint16`: 16-bit unsigned integers -* - `int8`: 8-bit two's complement signed integers -* - `uint8`: 8-bit unsigned integers -* - `uint8c`: 8-bit unsigned integers clamped to `0-255` -* - `generic`: generic JavaScript values -* -* ## Notes -* -* - In browser environments, the function always returns zero-filled arrays. -* - If `dtype` is `'generic'`, the function always returns a zero-filled array. -* - In Node.js versions `>=3.0.0`, the underlying memory of returned typed arrays is **not** initialized. Memory contents are unknown and may contain **sensitive** data. -* -* @param length - array length -* @param dtype - data type (default: 'float64') -* @returns empty array -* -* @example -* var arr = empty( 2 ); -* // returns -* -* @example -* var arr = empty( 2, 'float32' ); -* // returns -*/ -declare function empty = 'float64'>( length: number, dtype?: T ): DataTypeMap[T]; - - -// EXPORTS // - -export = empty; diff --git a/mod.js b/mod.js deleted file mode 100644 index 8ffb56d..0000000 --- a/mod.js +++ /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 -/// -var r="function"==typeof Object.defineProperty?Object.defineProperty:null;var e=Object.defineProperty;function t(r){return"number"==typeof r}function n(r){var e,t="";for(e=0;e0&&(e-=1),n=i.toExponential(e)):n=i.toPrecision(r.precision),r.alternate||(n=h.call(n,v,"$1e"),n=h.call(n,w,"e"),n=h.call(n,g,""));break;default:throw new Error("invalid double notation. Value: "+r.specifier)}return n=h.call(n,c,"e+0$1"),n=h.call(n,p,"e-0$1"),r.alternate&&(n=h.call(n,y,"$1."),n=h.call(n,m,"$1.e")),i>=0&&r.sign&&(n=r.sign+n),n=r.specifier===s.call(r.specifier)?s.call(n):l.call(n)}function d(r){var e,t="";for(e=0;e127)throw new Error("invalid character code. Value: "+n.arg);n.arg=_(a)?String(n.arg):E(a)}break;case"e":case"E":case"f":case"F":case"g":case"G":e||(n.precision=6),n.arg=b(n);break;default:throw new Error("invalid specifier: "+n.specifier)}n.maxWidth>=0&&n.arg.length>n.maxWidth&&(n.arg=n.arg.substring(0,n.maxWidth)),n.padZeros?n.arg=i(n.arg,n.width||n.precision,n.padRight):n.width&&(n.arg=(c=n.arg,p=n.width,y=n.padRight,m=void 0,(m=p-c.length)<0?c:c=y?c+d(m):d(m)+c)),f+=n.arg||"",l+=1}return f}var A=/%(?:([1-9]\d*)\$)?([0 +\-#]*)(\*|\d+)?(?:(\.)(\*|\d+)?)?[hlL]?([%A-Za-z])/g;function j(r){var e={mapping:r[1]?parseInt(r[1],10):void 0,flags:r[2],width:r[3],precision:r[5],specifier:r[6]};return"."===r[4]&&void 0===r[5]&&(e.precision="1"),e}function F(r){var e,t,n,i;for(t=[],i=0,n=A.exec(r);n;)(e=r.slice(i,A.lastIndex-n[0].length)).length&&t.push(e),t.push(j(n)),i=A.lastIndex,n=A.exec(r);return(e=r.slice(i)).length&&t.push(e),t}function S(r){var e,t;if("string"!=typeof r)throw new TypeError(S("invalid argument. First argument must be a string. Value: `%s`.",r));for(e=[F(r)],t=1;trr&&tr(r)}function ir(r){return U(r)&&nr(r)}function or(r){return H(r)&&nr(r.valueOf())}function ar(r){return ir(r)||or(r)}function ur(r){return ir(r)&&r>=0}function fr(r){return or(r)&&r.valueOf()>=0}function lr(r){return ur(r)||fr(r)}N(ar,"isPrimitive",ir),N(ar,"isObject",or),N(lr,"isPrimitive",ur),N(lr,"isObject",fr);var sr="function"==typeof Float64Array;var hr="function"==typeof Float64Array?Float64Array:null;var cr="function"==typeof Float64Array?Float64Array:void 0;var pr=function(){var r,e,t;if("function"!=typeof hr)return!1;try{e=new hr([1,3.14,-3.14,NaN]),t=e,r=(sr&&t instanceof Float64Array||"[object Float64Array]"===z(t))&&1===e[0]&&3.14===e[1]&&-3.14===e[2]&&e[3]!=e[3]}catch(e){r=!1}return r}()?cr:function(){throw new Error("not implemented")},yr="function"==typeof Float32Array;var mr="function"==typeof Float32Array?Float32Array:null;var gr="function"==typeof Float32Array?Float32Array:void 0;var wr=function(){var r,e,t;if("function"!=typeof mr)return!1;try{e=new mr([1,3.14,-3.14,5e40]),t=e,r=(yr&&t instanceof Float32Array||"[object Float32Array]"===z(t))&&1===e[0]&&3.140000104904175===e[1]&&-3.140000104904175===e[2]&&e[3]===Q}catch(e){r=!1}return r}()?gr:function(){throw new Error("not implemented")},vr="function"==typeof Int16Array;var br="function"==typeof Int16Array?Int16Array:null;var dr="function"==typeof Int16Array?Int16Array:void 0;var Er=function(){var r,e,t;if("function"!=typeof br)return!1;try{e=new br([1,3.14,-3.14,32768]),t=e,r=(vr&&t instanceof Int16Array||"[object Int16Array]"===z(t))&&1===e[0]&&3===e[1]&&-3===e[2]&&-32768===e[3]}catch(e){r=!1}return r}()?dr:function(){throw new Error("not implemented")},_r="function"==typeof Int32Array;var Tr="function"==typeof Int32Array?Int32Array:null;var xr="function"==typeof Int32Array?Int32Array:void 0;var Vr=function(){var r,e,t;if("function"!=typeof Tr)return!1;try{e=new Tr([1,3.14,-3.14,2147483648]),t=e,r=(_r&&t instanceof Int32Array||"[object Int32Array]"===z(t))&&1===e[0]&&3===e[1]&&-3===e[2]&&-2147483648===e[3]}catch(e){r=!1}return r}()?xr:function(){throw new Error("not implemented")},Ar="function"==typeof Int8Array;var jr="function"==typeof Int8Array?Int8Array:null;var Fr="function"==typeof Int8Array?Int8Array:void 0;var Sr=function(){var r,e,t;if("function"!=typeof jr)return!1;try{e=new jr([1,3.14,-3.14,128]),t=e,r=(Ar&&t instanceof Int8Array||"[object Int8Array]"===z(t))&&1===e[0]&&3===e[1]&&-3===e[2]&&-128===e[3]}catch(e){r=!1}return r}()?Fr:function(){throw new Error("not implemented")},kr="function"==typeof Uint16Array;var Lr="function"==typeof Uint16Array?Uint16Array:null;var Ir="function"==typeof Uint16Array?Uint16Array:void 0;var Rr=function(){var r,e,t;if("function"!=typeof Lr)return!1;try{e=new Lr(e=[1,3.14,-3.14,65536,65537]),t=e,r=(kr&&t instanceof Uint16Array||"[object Uint16Array]"===z(t))&&1===e[0]&&3===e[1]&&65533===e[2]&&0===e[3]&&1===e[4]}catch(e){r=!1}return r}()?Ir:function(){throw new Error("not implemented")},Br="function"==typeof Uint32Array;var Or="function"==typeof Uint32Array?Uint32Array:null;var Cr="function"==typeof Uint32Array?Uint32Array:void 0;var Mr=function(){var r,e,t;if("function"!=typeof Or)return!1;try{e=new Or(e=[1,3.14,-3.14,4294967296,4294967297]),t=e,r=(Br&&t instanceof Uint32Array||"[object Uint32Array]"===z(t))&&1===e[0]&&3===e[1]&&4294967293===e[2]&&0===e[3]&&1===e[4]}catch(e){r=!1}return r}()?Cr:function(){throw new Error("not implemented")},Nr="function"==typeof Uint8Array;var Ur="function"==typeof Uint8Array?Uint8Array:null;var Pr="function"==typeof Uint8Array?Uint8Array:void 0;var Yr=function(){var r,e,t;if("function"!=typeof Ur)return!1;try{e=new Ur(e=[1,3.14,-3.14,256,257]),t=e,r=(Nr&&t instanceof Uint8Array||"[object Uint8Array]"===z(t))&&1===e[0]&&3===e[1]&&253===e[2]&&0===e[3]&&1===e[4]}catch(e){r=!1}return r}()?Pr:function(){throw new Error("not implemented")},Wr="function"==typeof Uint8ClampedArray;var $r="function"==typeof Uint8ClampedArray?Uint8ClampedArray:null;var Gr="function"==typeof Uint8ClampedArray?Uint8ClampedArray:void 0;var Zr=function(){var r,e,t;if("function"!=typeof $r)return!1;try{e=new $r([-1,0,1,3.14,4.99,255,256]),t=e,r=(Wr&&t instanceof Uint8ClampedArray||"[object Uint8ClampedArray]"===z(t))&&0===e[0]&&0===e[1]&&1===e[2]&&3===e[3]&&5===e[4]&&255===e[5]&&255===e[6]}catch(e){r=!1}return r}()?Gr:function(){throw new Error("not implemented")},Xr=4294967295;function zr(r){return"object"==typeof r&&null!==r&&"number"==typeof r.length&&tr(r.length)&&r.length>=0&&r.length<=Xr}var Jr=9007199254740991;function qr(r){return"object"==typeof r&&null!==r&&"number"==typeof r.length&&tr(r.length)&&r.length>=0&&r.length<=Jr}var Dr="function"==typeof ArrayBuffer;function Hr(r){return Dr&&r instanceof ArrayBuffer||"[object ArrayBuffer]"===z(r)}var Kr=Array.isArray?Array.isArray:function(r){return"[object Array]"===z(r)};function Qr(r){return"object"==typeof r&&null!==r&&!Kr(r)}function re(r){return"string"==typeof r}var ee=String.prototype.valueOf;var te=Y();function ne(r){return"object"==typeof r&&(r instanceof String||(te?function(r){try{return ee.call(r),!0}catch(r){return!1}}(r):"[object String]"===z(r)))}function ie(r){return re(r)||ne(r)}N(ie,"isPrimitive",re),N(ie,"isObject",ne);var oe=/./;function ae(r){return"boolean"==typeof r}var ue=Boolean,fe=Boolean.prototype.toString;var le=Y();function se(r){return"object"==typeof r&&(r instanceof ue||(le?function(r){try{return fe.call(r),!0}catch(r){return!1}}(r):"[object Boolean]"===z(r)))}function he(r){return ae(r)||se(r)}N(he,"isPrimitive",ae),N(he,"isObject",se);var ce="object"==typeof self?self:null,pe="object"==typeof window?window:null,ye="undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},me="object"==typeof ye?ye:null,ge="object"==typeof globalThis?globalThis:null;var we=function(r){if(arguments.length){if(!ae(r))throw new TypeError(S("invalid argument. Must provide a boolean. Value: `%s`.",r));if(r)return new Function("return this;")()}if(ge)return ge;if(ce)return ce;if(pe)return pe;if(me)return me;throw new Error("unexpected error. Unable to resolve global object.")}(),ve=we.document&&we.document.childNodes,be=Int8Array;function de(){return/^\s*function\s*([^(]*)/i}var Ee=/^\s*function\s*([^(]*)/i;function _e(r){return null!==r&&"object"==typeof r}function Te(r){var e,t,n,i;if(("Object"===(t=z(r).slice(8,-1))||"Error"===t)&&r.constructor){if("string"==typeof(n=r.constructor).name)return n.name;if(e=Ee.exec(n.toString()))return e[1]}return _e(i=r)&&(i._isBuffer||i.constructor&&"function"==typeof i.constructor.isBuffer&&i.constructor.isBuffer(i))?"Buffer":t}N(de,"REGEXP",Ee),N(_e,"isObjectLikeArray",function(r){if("function"!=typeof r)throw new TypeError(S("invalid argument. Must provide a function. Value: `%s`.",r));return function(e){var t,n;if(!Kr(e))return!1;if(0===(t=e.length))return!1;for(n=0;n=2)e.push(n[0],n[1]);else{if(!Le(n))return new TypeError(S("invalid argument. An iterator must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",n));e.push(Pe(n),Ye(n))}return e}var qe=2*wr.BYTES_PER_ELEMENT,De=Me();function He(r){return r instanceof rt||"object"==typeof r&&null!==r&&("Complex64Array"===r.constructor.name||"Complex128Array"===r.constructor.name)&&"number"==typeof r._length&&"object"==typeof r._buffer}function Ke(r){return r===rt||"Complex128Array"===r.name}function Qe(r,e){return new ke(r[e*=2],r[e+1])}function rt(){var r,e,t,n;if(e=arguments.length,!(this instanceof rt))return 0===e?new rt:1===e?new rt(arguments[0]):2===e?new rt(arguments[0],arguments[1]):new rt(arguments[0],arguments[1],arguments[2]);if(0===e)t=new wr(0);else if(1===e)if(ur(arguments[0]))t=new wr(2*arguments[0]);else if(qr(arguments[0]))if((n=(t=arguments[0]).length)&&Kr(t)&&Le(t[0])){if(t=function(r,e){var t,n,i,o;for(t=e.length,o=0,i=0;it.byteLength-r)throw new RangeError(S("invalid arguments. ArrayBuffer has insufficient capacity. Either decrease the array length or provide a bigger buffer. Minimum capacity: `%u`.",n*qe));t=new wr(t,r,2*n)}}return N(this,"_buffer",t),N(this,"_length",t.length/2),this}function et(r){return r.re}function tt(r){return r.im}function nt(r){var e,t,n;for(e=[];!(t=r.next()).done;)if(zr(n=t.value)&&n.length>=2)e.push(n[0],n[1]);else{if(!Le(n))return new TypeError(S("invalid argument. An iterator must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",n));e.push(et(n),tt(n))}return e}N(rt,"BYTES_PER_ELEMENT",qe),N(rt,"name","Complex64Array"),N(rt,"from",(function(r){var e,t,n,i,o,a,u,f,l,s,h,c;if(!Ve(this))throw new TypeError("invalid invocation. `this` context must be a constructor.");if(!Ke(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if((t=arguments.length)>1){if(!Ve(n=arguments[1]))throw new TypeError(S("invalid argument. Second argument must be a function. Value: `%s`.",n));t>2&&(e=arguments[2])}if(He(r)){if(f=r.length,n){for(o=(i=new this(f))._buffer,c=0,h=0;h=2))throw new TypeError(S("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",s));o[c]=s[0],o[c+1]=s[1]}c+=2}return i}return new this(r)}if(qr(r)){if(n){for(f=r.length,u=r.get&&r.set?ze("default"):Ze("default"),h=0;h=2))throw new TypeError(S("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",s));o[c]=s[0],o[c+1]=s[1]}c+=2}return i}return new this(r)}if(Qr(r)&&De&&Ve(r[Ne])){if(!Ve((o=r[Ne]()).next))throw new TypeError(S("invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.",r));if(a=n?function(r,e,t){var n,i,o,a;for(n=[],a=-1;!(i=r.next()).done;)if(a+=1,zr(o=e.call(t,i.value,a))&&o.length>=2)n.push(o[0],o[1]);else{if(!Le(o))return new TypeError(S("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",o));n.push(Pe(o),Ye(o))}return n}(o,n,e):Je(o),a instanceof Error)throw a;for(o=(i=new this(f=a.length/2))._buffer,h=0;h=this._length))return Qe(this._buffer,r)})),Ue(rt.prototype,"buffer",(function(){return this._buffer.buffer})),Ue(rt.prototype,"byteLength",(function(){return this._buffer.byteLength})),Ue(rt.prototype,"byteOffset",(function(){return this._buffer.byteOffset})),N(rt.prototype,"BYTES_PER_ELEMENT",rt.BYTES_PER_ELEMENT),N(rt.prototype,"copyWithin",(function(r,e){if(!He(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");return 2===arguments.length?this._buffer.copyWithin(2*r,2*e):this._buffer.copyWithin(2*r,2*e,2*arguments[2]),this})),N(rt.prototype,"entries",(function(){var r,e,t,n,i,o,a;if(!He(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");return e=this,r=this._buffer,n=this._length,o=-1,a=-2,N(t={},"next",(function(){var e;if(o+=1,i||o>=n)return{done:!0};return e=new ke(r[a+=2],r[a+1]),{value:[o,e],done:!1}})),N(t,"return",(function(r){if(i=!0,arguments.length)return{value:r,done:!0};return{done:!0}})),Ne&&N(t,Ne,(function(){return e.entries()})),t})),N(rt.prototype,"every",(function(r,e){var t,n;if(!He(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Ve(r))throw new TypeError(S("invalid argument. First argument must be a function. Value: `%s`.",r));for(t=this._buffer,n=0;n1){if(!tr(e))throw new TypeError(S("invalid argument. Second argument must be an integer. Value: `%s`.",e));if(e<0&&(e+=i)<0&&(e=0),arguments.length>2){if(!tr(t))throw new TypeError(S("invalid argument. Third argument must be an integer. Value: `%s`.",t));t<0&&(t+=i)<0&&(t=0),t>i&&(t=i)}else t=i}else e=0,t=i;for(a=Pe(r),u=Ye(r),f=e;f=0;n--)if(i=Qe(t,n),r.call(e,i,n,this))return i})),N(rt.prototype,"findLastIndex",(function(r,e){var t,n,i;if(!He(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Ve(r))throw new TypeError(S("invalid argument. First argument must be a function. Value: `%s`.",r));for(t=this._buffer,n=this._length-1;n>=0;n--)if(i=Qe(t,n),r.call(e,i,n,this))return n;return-1})),N(rt.prototype,"forEach",(function(r,e){var t,n,i;if(!He(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Ve(r))throw new TypeError(S("invalid argument. First argument must be a function. Value: `%s`.",r));for(t=this._buffer,n=0;n=this._length))return Qe(this._buffer,r)})),N(rt.prototype,"includes",(function(r,e){var t,n,i,o,a;if(!He(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Le(r))throw new TypeError(S("invalid argument. First argument must be a complex number. Value: `%s`.",r));if(arguments.length>1){if(!tr(e))throw new TypeError(S("invalid argument. Second argument must be an integer. Value: `%s`.",e));e<0&&(e+=this._length)<0&&(e=0)}else e=0;for(i=Pe(r),o=Ye(r),t=this._buffer,a=e;a1){if(!tr(e))throw new TypeError(S("invalid argument. Second argument must be an integer. Value: `%s`.",e));e<0&&(e+=this._length)<0&&(e=0)}else e=0;for(i=Pe(r),o=Ye(r),t=this._buffer,a=e;a1){if(!tr(e))throw new TypeError(S("invalid argument. Second argument must be an integer. Value: `%s`.",e));e>=this._length?e=this._length-1:e<0&&(e+=this._length)}else e=this._length-1;for(i=Pe(r),o=Ye(r),t=this._buffer,a=e;a>=0;a--)if(i===t[n=2*a]&&o===t[n+1])return a;return-1})),Ue(rt.prototype,"length",(function(){return this._length})),N(rt.prototype,"map",(function(r,e){var t,n,i,o,a;if(!He(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Ve(r))throw new TypeError(S("invalid argument. First argument must be a function. Value: `%s`.",r));for(n=this._buffer,t=(i=new this.constructor(this._length))._buffer,o=0;o1)n=e,o=0;else{if(0===i)throw new Error("invalid operation. If not provided an initial value, an array must contain at least one element.");n=Qe(t,0),o=1}for(;o1){if(!ur(t=arguments[1]))throw new TypeError(S("invalid argument. Index argument must be a nonnegative integer. Value: `%s`.",t))}else t=0;if(Le(r)){if(t>=this._length)throw new RangeError(S("invalid argument. Index argument is out-of-bounds. Value: `%u`.",t));return n[t*=2]=Pe(r),void(n[t+1]=Ye(r))}if(He(r)){if(t+(a=r._length)>this._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");if(e=r._buffer,l=n.byteOffset+t*qe,e.buffer===n.buffer&&e.byteOffsetl){for(i=new wr(e.length),f=0;fthis._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");if(e=r,l=n.byteOffset+t*qe,e.buffer===n.buffer&&e.byteOffsetl){for(i=new wr(a),f=0;fthis._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");for(t*=2,f=0;fu&&(e=u)}}for(t=ri&&(e=i)}}return r>=i?(i=0,t=n.byteLength):r>=e?(i=0,t=n.byteOffset+r*qe):(i=e-r,t=n.byteOffset+r*qe),new this.constructor(n.buffer,t,i<0?0:i)})),N(rt.prototype,"toReversed",(function(){var r,e,t,n,i,o;if(!He(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");for(t=this._length,e=new this.constructor(t),n=this._buffer,r=e._buffer,i=0;i=i)throw new RangeError(S("invalid argument. Index argument is out-of-bounds. Value: `%s`.",r));if(!Le(e))throw new TypeError(S("invalid argument. Second argument must be a complex number. Value: `%s`.",e));return(t=(n=new this.constructor(this._buffer))._buffer)[2*r]=Pe(e),t[2*r+1]=Ye(e),n}));var it=2*pr.BYTES_PER_ELEMENT,ot=Me();function at(r){return r instanceof lt||"object"==typeof r&&null!==r&&("Complex64Array"===r.constructor.name||"Complex128Array"===r.constructor.name)&&"number"==typeof r._length&&"object"==typeof r._buffer}function ut(r){return r===lt||"Complex64Array"===r.name}function ft(r,e){return new Ae(r[e*=2],r[e+1])}function lt(){var r,e,t,n;if(e=arguments.length,!(this instanceof lt))return 0===e?new lt:1===e?new lt(arguments[0]):2===e?new lt(arguments[0],arguments[1]):new lt(arguments[0],arguments[1],arguments[2]);if(0===e)t=new pr(0);else if(1===e)if(ur(arguments[0]))t=new pr(2*arguments[0]);else if(qr(arguments[0]))if((n=(t=arguments[0]).length)&&Kr(t)&&Le(t[0])){if(t=function(r,e){var t,n,i,o;for(t=e.length,o=0,i=0;it.byteLength-r)throw new RangeError(S("invalid arguments. ArrayBuffer has insufficient capacity. Either decrease the array length or provide a bigger buffer. Minimum capacity: `%u`.",n*it));t=new pr(t,r,2*n)}}return N(this,"_buffer",t),N(this,"_length",t.length/2),this}N(lt,"BYTES_PER_ELEMENT",it),N(lt,"name","Complex128Array"),N(lt,"from",(function(r){var e,t,n,i,o,a,u,f,l,s,h,c;if(!Ve(this))throw new TypeError("invalid invocation. `this` context must be a constructor.");if(!ut(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if((t=arguments.length)>1){if(!Ve(n=arguments[1]))throw new TypeError(S("invalid argument. Second argument must be a function. Value: `%s`.",n));t>2&&(e=arguments[2])}if(at(r)){if(f=r.length,n){for(o=(i=new this(f))._buffer,c=0,h=0;h=2))throw new TypeError(S("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",s));o[c]=s[0],o[c+1]=s[1]}c+=2}return i}return new this(r)}if(qr(r)){if(n){for(f=r.length,u=r.get&&r.set?ze("default"):Ze("default"),h=0;h=2))throw new TypeError(S("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",s));o[c]=s[0],o[c+1]=s[1]}c+=2}return i}return new this(r)}if(Qr(r)&&ot&&Ve(r[Ne])){if(!Ve((o=r[Ne]()).next))throw new TypeError(S("invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.",r));if(a=n?function(r,e,t){var n,i,o,a;for(n=[],a=-1;!(i=r.next()).done;)if(a+=1,zr(o=e.call(t,i.value,a))&&o.length>=2)n.push(o[0],o[1]);else{if(!Le(o))return new TypeError(S("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",o));n.push(et(o),tt(o))}return n}(o,n,e):nt(o),a instanceof Error)throw a;for(o=(i=new this(f=a.length/2))._buffer,h=0;h=this._length))return ft(this._buffer,r)})),Ue(lt.prototype,"buffer",(function(){return this._buffer.buffer})),Ue(lt.prototype,"byteLength",(function(){return this._buffer.byteLength})),Ue(lt.prototype,"byteOffset",(function(){return this._buffer.byteOffset})),N(lt.prototype,"BYTES_PER_ELEMENT",lt.BYTES_PER_ELEMENT),N(lt.prototype,"copyWithin",(function(r,e){if(!at(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");return 2===arguments.length?this._buffer.copyWithin(2*r,2*e):this._buffer.copyWithin(2*r,2*e,2*arguments[2]),this})),N(lt.prototype,"entries",(function(){var r,e,t,n,i,o,a;if(!at(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");return e=this,r=this._buffer,n=this._length,o=-1,a=-2,N(t={},"next",(function(){var e;if(o+=1,i||o>=n)return{done:!0};return e=new Ae(r[a+=2],r[a+1]),{value:[o,e],done:!1}})),N(t,"return",(function(r){if(i=!0,arguments.length)return{value:r,done:!0};return{done:!0}})),Ne&&N(t,Ne,(function(){return e.entries()})),t})),N(lt.prototype,"every",(function(r,e){var t,n;if(!at(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Ve(r))throw new TypeError(S("invalid argument. First argument must be a function. Value: `%s`.",r));for(t=this._buffer,n=0;n1){if(!tr(e))throw new TypeError(S("invalid argument. Second argument must be an integer. Value: `%s`.",e));if(e<0&&(e+=i)<0&&(e=0),arguments.length>2){if(!tr(t))throw new TypeError(S("invalid argument. Third argument must be an integer. Value: `%s`.",t));t<0&&(t+=i)<0&&(t=0),t>i&&(t=i)}else t=i}else e=0,t=i;for(a=et(r),u=tt(r),f=e;f=0;n--)if(i=ft(t,n),r.call(e,i,n,this))return i})),N(lt.prototype,"findLastIndex",(function(r,e){var t,n,i;if(!at(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Ve(r))throw new TypeError(S("invalid argument. First argument must be a function. Value: `%s`.",r));for(t=this._buffer,n=this._length-1;n>=0;n--)if(i=ft(t,n),r.call(e,i,n,this))return n;return-1})),N(lt.prototype,"forEach",(function(r,e){var t,n,i;if(!at(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Ve(r))throw new TypeError(S("invalid argument. First argument must be a function. Value: `%s`.",r));for(t=this._buffer,n=0;n=this._length))return ft(this._buffer,r)})),Ue(lt.prototype,"length",(function(){return this._length})),N(lt.prototype,"includes",(function(r,e){var t,n,i,o,a;if(!at(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Le(r))throw new TypeError(S("invalid argument. First argument must be a complex number. Value: `%s`.",r));if(arguments.length>1){if(!tr(e))throw new TypeError(S("invalid argument. Second argument must be an integer. Value: `%s`.",e));e<0&&(e+=this._length)<0&&(e=0)}else e=0;for(i=et(r),o=tt(r),t=this._buffer,a=e;a1){if(!tr(e))throw new TypeError(S("invalid argument. Second argument must be an integer. Value: `%s`.",e));e<0&&(e+=this._length)<0&&(e=0)}else e=0;for(i=et(r),o=tt(r),t=this._buffer,a=e;a1){if(!tr(e))throw new TypeError(S("invalid argument. Second argument must be an integer. Value: `%s`.",e));e>=this._length?e=this._length-1:e<0&&(e+=this._length)}else e=this._length-1;for(i=et(r),o=tt(r),t=this._buffer,a=e;a>=0;a--)if(i===t[n=2*a]&&o===t[n+1])return a;return-1})),N(lt.prototype,"map",(function(r,e){var t,n,i,o,a;if(!at(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Ve(r))throw new TypeError(S("invalid argument. First argument must be a function. Value: `%s`.",r));for(n=this._buffer,t=(i=new this.constructor(this._length))._buffer,o=0;o1)n=e,o=0;else{if(0===i)throw new Error("invalid operation. If not provided an initial value, an array must contain at least one element.");n=ft(t,0),o=1}for(;o1){if(!ur(t=arguments[1]))throw new TypeError(S("invalid argument. Index argument must be a nonnegative integer. Value: `%s`.",t))}else t=0;if(Le(r)){if(t>=this._length)throw new RangeError(S("invalid argument. Index argument is out-of-bounds. Value: `%u`.",t));return n[t*=2]=et(r),void(n[t+1]=tt(r))}if(at(r)){if(t+(a=r._length)>this._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");if(e=r._buffer,l=n.byteOffset+t*it,e.buffer===n.buffer&&e.byteOffsetl){for(i=new pr(e.length),f=0;fthis._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");if(e=r,l=n.byteOffset+t*it,e.buffer===n.buffer&&e.byteOffsetl){for(i=new pr(a),f=0;fthis._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");for(t*=2,f=0;fu&&(e=u)}}for(t=ri&&(e=i)}}return r>=i?(i=0,t=n.byteLength):r>=e?(i=0,t=n.byteOffset+r*it):(i=e-r,t=n.byteOffset+r*it),new this.constructor(n.buffer,t,i<0?0:i)})),N(lt.prototype,"toReversed",(function(){var r,e,t,n,i,o;if(!at(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");for(t=this._length,e=new this.constructor(t),n=this._buffer,r=e._buffer,i=0;i=i)throw new RangeError(S("invalid argument. Index argument is out-of-bounds. Value: `%s`.",r));if(!Le(e))throw new TypeError(S("invalid argument. Second argument must be a complex number. Value: `%s`.",e));return(t=(n=new this.constructor(this._buffer))._buffer)[2*r]=et(e),t[2*r+1]=tt(e),n}));var st={float64:pr,float32:wr,generic:Array,int16:Er,int32:Vr,int8:Sr,uint16:Rr,uint32:Mr,uint8:Yr,uint8c:Zr,complex64:rt,complex128:lt};function ht(){return{dtypes:{default:"float64",numeric:"float64",real:"float64",floating_point:"float64",real_floating_point:"float64",complex_floating_point:"complex128",integer:"int32",signed_integer:"int32",unsigned_integer:"uint32"}}}var ct={dtypes:{default:"float64",numeric:"float64",real:"float64",floating_point:"float64",real_floating_point:"float64",complex_floating_point:"complex128",integer:"int32",signed_integer:"int32",unsigned_integer:"uint32"}},pt={"dtypes.default":ct.dtypes.default,"dtypes.numeric":ct.dtypes.numeric,"dtypes.real":ct.dtypes.real,"dtypes.floating_point":ct.dtypes.floating_point,"dtypes.real_floating_point":ct.dtypes.real_floating_point,"dtypes.complex_floating_point":ct.dtypes.complex_floating_point,"dtypes.integer":ct.dtypes.integer,"dtypes.signed_integer":ct.dtypes.signed_integer,"dtypes.unsigned_integer":ct.dtypes.unsigned_integer};N(ht,"get",(function(r){var e=pt[r];return void 0===e?null:e}));var yt=ht.get("dtypes.default");function mt(r){var e,t;if(!ur(r))throw new TypeError(S("invalid argument. First argument must be a nonnegative integer. Value: `%s`.",r));if("generic"===(e=arguments.length>1?arguments[1]:yt))return function(r,e){var t,n;for(t=[],n=0;n1?mt(r,arguments[1]):mt(r)}export{gt as default}; -//# sourceMappingURL=mod.js.map diff --git a/mod.js.map b/mod.js.map deleted file mode 100644 index 7b2fd54..0000000 --- a/mod.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"mod.js","sources":["../node_modules/@stdlib/utils-define-property/lib/define_property.js","../node_modules/@stdlib/utils-define-property/lib/builtin.js","../node_modules/@stdlib/string-base-format-interpolate/lib/is_number.js","../node_modules/@stdlib/string-base-format-interpolate/lib/zero_pad.js","../node_modules/@stdlib/string-base-format-interpolate/lib/format_integer.js","../node_modules/@stdlib/string-base-format-interpolate/lib/format_double.js","../node_modules/@stdlib/string-base-format-interpolate/lib/space_pad.js","../node_modules/@stdlib/string-base-format-interpolate/lib/main.js","../node_modules/@stdlib/string-base-format-interpolate/lib/is_string.js","../node_modules/@stdlib/string-base-format-tokenize/lib/main.js","../node_modules/@stdlib/string-format/lib/main.js","../node_modules/@stdlib/string-format/lib/is_string.js","../node_modules/@stdlib/utils-define-property/lib/polyfill.js","../node_modules/@stdlib/utils-define-property/lib/index.js","../node_modules/@stdlib/utils-define-property/lib/has_define_property_support.js","../node_modules/@stdlib/utils-define-nonenumerable-read-only-property/lib/main.js","../node_modules/@stdlib/assert-is-number/lib/primitive.js","../node_modules/@stdlib/assert-has-tostringtag-support/lib/main.js","../node_modules/@stdlib/assert-has-symbol-support/lib/main.js","../node_modules/@stdlib/utils-native-class/lib/tostring.js","../node_modules/@stdlib/assert-has-own-property/lib/main.js","../node_modules/@stdlib/symbol-ctor/lib/main.js","../node_modules/@stdlib/utils-native-class/lib/tostringtag.js","../node_modules/@stdlib/utils-native-class/lib/index.js","../node_modules/@stdlib/utils-native-class/lib/polyfill.js","../node_modules/@stdlib/utils-native-class/lib/main.js","../node_modules/@stdlib/number-ctor/lib/main.js","../node_modules/@stdlib/assert-is-number/lib/tostring.js","../node_modules/@stdlib/assert-is-number/lib/object.js","../node_modules/@stdlib/assert-is-number/lib/try2serialize.js","../node_modules/@stdlib/assert-is-number/lib/main.js","../node_modules/@stdlib/assert-is-number/lib/index.js","../node_modules/@stdlib/constants-float64-pinf/lib/index.js","../node_modules/@stdlib/constants-float64-ninf/lib/index.js","../node_modules/@stdlib/math-base-special-floor/lib/main.js","../node_modules/@stdlib/math-base-assert-is-integer/lib/main.js","../node_modules/@stdlib/assert-is-integer/lib/integer.js","../node_modules/@stdlib/assert-is-integer/lib/primitive.js","../node_modules/@stdlib/assert-is-integer/lib/object.js","../node_modules/@stdlib/assert-is-integer/lib/main.js","../node_modules/@stdlib/assert-is-nonnegative-integer/lib/primitive.js","../node_modules/@stdlib/assert-is-nonnegative-integer/lib/object.js","../node_modules/@stdlib/assert-is-nonnegative-integer/lib/main.js","../node_modules/@stdlib/assert-is-integer/lib/index.js","../node_modules/@stdlib/assert-is-nonnegative-integer/lib/index.js","../node_modules/@stdlib/assert-is-float64array/lib/main.js","../node_modules/@stdlib/assert-has-float64array-support/lib/float64array.js","../node_modules/@stdlib/array-float64/lib/main.js","../node_modules/@stdlib/array-float64/lib/index.js","../node_modules/@stdlib/assert-has-float64array-support/lib/main.js","../node_modules/@stdlib/array-float64/lib/polyfill.js","../node_modules/@stdlib/assert-is-float32array/lib/main.js","../node_modules/@stdlib/assert-has-float32array-support/lib/float32array.js","../node_modules/@stdlib/array-float32/lib/main.js","../node_modules/@stdlib/array-float32/lib/index.js","../node_modules/@stdlib/assert-has-float32array-support/lib/main.js","../node_modules/@stdlib/array-float32/lib/polyfill.js","../node_modules/@stdlib/assert-is-int16array/lib/main.js","../node_modules/@stdlib/constants-int16-max/lib/index.js","../node_modules/@stdlib/assert-has-int16array-support/lib/int16array.js","../node_modules/@stdlib/array-int16/lib/main.js","../node_modules/@stdlib/array-int16/lib/index.js","../node_modules/@stdlib/assert-has-int16array-support/lib/main.js","../node_modules/@stdlib/constants-int16-min/lib/index.js","../node_modules/@stdlib/array-int16/lib/polyfill.js","../node_modules/@stdlib/assert-is-int32array/lib/main.js","../node_modules/@stdlib/constants-int32-max/lib/index.js","../node_modules/@stdlib/assert-has-int32array-support/lib/int32array.js","../node_modules/@stdlib/array-int32/lib/main.js","../node_modules/@stdlib/array-int32/lib/index.js","../node_modules/@stdlib/assert-has-int32array-support/lib/main.js","../node_modules/@stdlib/constants-int32-min/lib/index.js","../node_modules/@stdlib/array-int32/lib/polyfill.js","../node_modules/@stdlib/assert-is-int8array/lib/main.js","../node_modules/@stdlib/constants-int8-max/lib/index.js","../node_modules/@stdlib/assert-has-int8array-support/lib/int8array.js","../node_modules/@stdlib/array-int8/lib/main.js","../node_modules/@stdlib/array-int8/lib/index.js","../node_modules/@stdlib/assert-has-int8array-support/lib/main.js","../node_modules/@stdlib/constants-int8-min/lib/index.js","../node_modules/@stdlib/array-int8/lib/polyfill.js","../node_modules/@stdlib/assert-is-uint16array/lib/main.js","../node_modules/@stdlib/constants-uint16-max/lib/index.js","../node_modules/@stdlib/assert-has-uint16array-support/lib/uint16array.js","../node_modules/@stdlib/array-uint16/lib/main.js","../node_modules/@stdlib/array-uint16/lib/index.js","../node_modules/@stdlib/assert-has-uint16array-support/lib/main.js","../node_modules/@stdlib/array-uint16/lib/polyfill.js","../node_modules/@stdlib/assert-is-uint32array/lib/main.js","../node_modules/@stdlib/constants-uint32-max/lib/index.js","../node_modules/@stdlib/assert-has-uint32array-support/lib/uint32array.js","../node_modules/@stdlib/array-uint32/lib/main.js","../node_modules/@stdlib/array-uint32/lib/index.js","../node_modules/@stdlib/assert-has-uint32array-support/lib/main.js","../node_modules/@stdlib/array-uint32/lib/polyfill.js","../node_modules/@stdlib/assert-is-uint8array/lib/main.js","../node_modules/@stdlib/constants-uint8-max/lib/index.js","../node_modules/@stdlib/assert-has-uint8array-support/lib/uint8array.js","../node_modules/@stdlib/array-uint8/lib/main.js","../node_modules/@stdlib/array-uint8/lib/index.js","../node_modules/@stdlib/assert-has-uint8array-support/lib/main.js","../node_modules/@stdlib/array-uint8/lib/polyfill.js","../node_modules/@stdlib/assert-is-uint8clampedarray/lib/main.js","../node_modules/@stdlib/assert-has-uint8clampedarray-support/lib/uint8clampedarray.js","../node_modules/@stdlib/array-uint8c/lib/main.js","../node_modules/@stdlib/array-uint8c/lib/index.js","../node_modules/@stdlib/assert-has-uint8clampedarray-support/lib/main.js","../node_modules/@stdlib/array-uint8c/lib/polyfill.js","../node_modules/@stdlib/constants-array-max-array-length/lib/index.js","../node_modules/@stdlib/assert-is-array-like-object/lib/main.js","../node_modules/@stdlib/constants-array-max-typed-array-length/lib/index.js","../node_modules/@stdlib/assert-is-collection/lib/main.js","../node_modules/@stdlib/assert-is-arraybuffer/lib/main.js","../node_modules/@stdlib/assert-is-array/lib/main.js","../node_modules/@stdlib/assert-is-object/lib/main.js","../node_modules/@stdlib/assert-is-string/lib/primitive.js","../node_modules/@stdlib/assert-is-string/lib/valueof.js","../node_modules/@stdlib/assert-is-string/lib/object.js","../node_modules/@stdlib/assert-is-string/lib/try2valueof.js","../node_modules/@stdlib/assert-is-string/lib/main.js","../node_modules/@stdlib/assert-is-string/lib/index.js","../node_modules/@stdlib/utils-type-of/lib/fixtures/re.js","../node_modules/@stdlib/assert-is-boolean/lib/primitive.js","../node_modules/@stdlib/boolean-ctor/lib/main.js","../node_modules/@stdlib/assert-is-boolean/lib/tostring.js","../node_modules/@stdlib/assert-is-boolean/lib/object.js","../node_modules/@stdlib/assert-is-boolean/lib/try2serialize.js","../node_modules/@stdlib/assert-is-boolean/lib/main.js","../node_modules/@stdlib/assert-is-boolean/lib/index.js","../node_modules/@stdlib/utils-global/lib/self.js","../node_modules/@stdlib/utils-global/lib/window.js","../node_modules/@stdlib/utils-global/lib/global.js","../node_modules/@stdlib/utils-global/lib/global_this.js","../node_modules/@stdlib/utils-type-of/lib/fixtures/nodelist.js","../node_modules/@stdlib/utils-global/lib/main.js","../node_modules/@stdlib/utils-global/lib/codegen.js","../node_modules/@stdlib/utils-type-of/lib/fixtures/typedarray.js","../node_modules/@stdlib/regexp-function-name/lib/main.js","../node_modules/@stdlib/regexp-function-name/lib/regexp.js","../node_modules/@stdlib/assert-is-object-like/lib/main.js","../node_modules/@stdlib/utils-constructor-name/lib/main.js","../node_modules/@stdlib/assert-is-buffer/lib/main.js","../node_modules/@stdlib/regexp-function-name/lib/index.js","../node_modules/@stdlib/assert-is-object-like/lib/index.js","../node_modules/@stdlib/assert-tools-array-function/lib/main.js","../node_modules/@stdlib/utils-type-of/lib/index.js","../node_modules/@stdlib/utils-type-of/lib/check.js","../node_modules/@stdlib/utils-type-of/lib/polyfill.js","../node_modules/@stdlib/utils-type-of/lib/main.js","../node_modules/@stdlib/assert-is-function/lib/main.js","../node_modules/@stdlib/complex-float64/lib/main.js","../node_modules/@stdlib/complex-float64/lib/tostring.js","../node_modules/@stdlib/complex-float64/lib/tojson.js","../node_modules/@stdlib/number-float64-base-to-float32/lib/main.js","../node_modules/@stdlib/number-float64-base-to-float32/lib/polyfill.js","../node_modules/@stdlib/number-float64-base-to-float32/lib/index.js","../node_modules/@stdlib/complex-float32/lib/main.js","../node_modules/@stdlib/assert-is-complex-like/lib/main.js","../node_modules/@stdlib/math-base-assert-is-even/lib/main.js","../node_modules/@stdlib/complex-float32/lib/tostring.js","../node_modules/@stdlib/complex-float32/lib/tojson.js","../node_modules/@stdlib/array-base-assert-is-complex64array/lib/main.js","../node_modules/@stdlib/array-base-assert-is-complex128array/lib/main.js","../node_modules/@stdlib/assert-has-iterator-symbol-support/lib/main.js","../node_modules/@stdlib/symbol-iterator/lib/main.js","../node_modules/@stdlib/utils-define-nonenumerable-read-only-accessor/lib/main.js","../node_modules/@stdlib/complex-realf/lib/main.js","../node_modules/@stdlib/complex-imagf/lib/main.js","../node_modules/@stdlib/strided-base-reinterpret-complex64/lib/main.js","../node_modules/@stdlib/strided-base-reinterpret-complex128/lib/main.js","../node_modules/@stdlib/array-base-getter/lib/main.js","../node_modules/@stdlib/array-base-accessor-getter/lib/main.js","../node_modules/@stdlib/array-complex64/lib/from_iterator.js","../node_modules/@stdlib/array-complex64/lib/main.js","../node_modules/@stdlib/array-complex64/lib/from_array.js","../node_modules/@stdlib/complex-real/lib/main.js","../node_modules/@stdlib/complex-imag/lib/main.js","../node_modules/@stdlib/array-complex128/lib/from_iterator.js","../node_modules/@stdlib/array-complex64/lib/from_iterator_map.js","../node_modules/@stdlib/array-complex128/lib/main.js","../node_modules/@stdlib/array-complex128/lib/from_array.js","../node_modules/@stdlib/array-complex128/lib/from_iterator_map.js","../node_modules/@stdlib/array-ctors/lib/ctors.js","../node_modules/@stdlib/array-defaults/lib/main.js","../node_modules/@stdlib/array-defaults/lib/get.js","../node_modules/@stdlib/array-defaults/lib/index.js","../node_modules/@stdlib/array-zeros/lib/main.js","../node_modules/@stdlib/array-base-filled/lib/main.js","../node_modules/@stdlib/array-base-zeros/lib/main.js","../node_modules/@stdlib/array-ctors/lib/main.js","../lib/polyfill.js"],"sourcesContent":["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Object.defineProperty === 'function' ) ? Object.defineProperty : null;\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Defines (or modifies) an object property.\n*\n* ## Notes\n*\n* - Property descriptors come in two flavors: **data descriptors** and **accessor descriptors**. A data descriptor is a property that has a value, which may or may not be writable. An accessor descriptor is a property described by a getter-setter function pair. A descriptor must be one of these two flavors and cannot be both.\n*\n* @name defineProperty\n* @type {Function}\n* @param {Object} obj - object on which to define the property\n* @param {(string|symbol)} prop - property name\n* @param {Object} descriptor - property descriptor\n* @param {boolean} [descriptor.configurable=false] - boolean indicating if property descriptor can be changed and if the property can be deleted from the provided object\n* @param {boolean} [descriptor.enumerable=false] - boolean indicating if the property shows up when enumerating object properties\n* @param {boolean} [descriptor.writable=false] - boolean indicating if the value associated with the property can be changed with an assignment operator\n* @param {*} [descriptor.value] - property value\n* @param {(Function|void)} [descriptor.get=undefined] - function which serves as a getter for the property, or, if no getter, undefined. When the property is accessed, a getter function is called without arguments and with the `this` context set to the object through which the property is accessed (which may not be the object on which the property is defined due to inheritance). The return value will be used as the property value.\n* @param {(Function|void)} [descriptor.set=undefined] - function which serves as a setter for the property, or, if no setter, undefined. When assigning a property value, a setter function is called with one argument (the value being assigned to the property) and with the `this` context set to the object through which the property is assigned.\n* @throws {TypeError} first argument must be an object\n* @throws {TypeError} third argument must be an object\n* @throws {Error} property descriptor cannot have both a value and a setter and/or getter\n* @returns {Object} object with added property\n*\n* @example\n* var obj = {};\n*\n* defineProperty( obj, 'foo', {\n* 'value': 'bar'\n* });\n*\n* var str = obj.foo;\n* // returns 'bar'\n*/\nvar defineProperty = Object.defineProperty;\n\n\n// EXPORTS //\n\nexport default defineProperty;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Tests if a value is a number primitive.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number primitive\n*\n* @example\n* var bool = isNumber( 3.14 );\n* // returns true\n*\n* @example\n* var bool = isNumber( NaN );\n* // returns true\n*\n* @example\n* var bool = isNumber( new Number( 3.14 ) );\n* // returns false\n*/\nfunction isNumber( value ) {\n\treturn ( typeof value === 'number' ); // NOTE: we inline the `isNumber.isPrimitive` function from `@stdlib/assert/is-number` in order to avoid circular dependencies.\n}\n\n\n// EXPORTS //\n\nexport default isNumber;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// FUNCTIONS //\n\n/**\n* Tests if a string starts with a minus sign (`-`).\n*\n* @private\n* @param {string} str - input string\n* @returns {boolean} boolean indicating if a string starts with a minus sign (`-`)\n*/\nfunction startsWithMinus( str ) {\n\treturn str[ 0 ] === '-';\n}\n\n/**\n* Returns a string of `n` zeros.\n*\n* @private\n* @param {number} n - number of zeros\n* @returns {string} string of zeros\n*/\nfunction zeros( n ) {\n\tvar out = '';\n\tvar i;\n\tfor ( i = 0; i < n; i++ ) {\n\t\tout += '0';\n\t}\n\treturn out;\n}\n\n\n// MAIN //\n\n/**\n* Pads a token with zeros to the specified width.\n*\n* @private\n* @param {string} str - token argument\n* @param {number} width - token width\n* @param {boolean} [right=false] - boolean indicating whether to pad to the right\n* @returns {string} padded token argument\n*/\nfunction zeroPad( str, width, right ) {\n\tvar negative = false;\n\tvar pad = width - str.length;\n\tif ( pad < 0 ) {\n\t\treturn str;\n\t}\n\tif ( startsWithMinus( str ) ) {\n\t\tnegative = true;\n\t\tstr = str.substr( 1 );\n\t}\n\tstr = ( right ) ?\n\t\tstr + zeros( pad ) :\n\t\tzeros( pad ) + str;\n\tif ( negative ) {\n\t\tstr = '-' + str;\n\t}\n\treturn str;\n}\n\n\n// EXPORTS //\n\nexport default zeroPad;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isNumber from './is_number.js';\nimport zeroPad from './zero_pad.js';\n\n// NOTE: for the following, we explicitly avoid using stdlib packages in this particular package in order to avoid circular dependencies.\nvar lowercase = String.prototype.toLowerCase;\nvar uppercase = String.prototype.toUpperCase;\n\n\n// MAIN //\n\n/**\n* Formats a token object argument as an integer.\n*\n* @private\n* @param {Object} token - token object\n* @throws {Error} must provide a valid integer\n* @returns {string} formatted token argument\n*/\nfunction formatInteger( token ) {\n\tvar base;\n\tvar out;\n\tvar i;\n\n\tswitch ( token.specifier ) {\n\tcase 'b':\n\t\t// Case: %b (binary)\n\t\tbase = 2;\n\t\tbreak;\n\tcase 'o':\n\t\t// Case: %o (octal)\n\t\tbase = 8;\n\t\tbreak;\n\tcase 'x':\n\tcase 'X':\n\t\t// Case: %x, %X (hexadecimal)\n\t\tbase = 16;\n\t\tbreak;\n\tcase 'd':\n\tcase 'i':\n\tcase 'u':\n\tdefault:\n\t\t// Case: %d, %i, %u (decimal)\n\t\tbase = 10;\n\t\tbreak;\n\t}\n\tout = token.arg;\n\ti = parseInt( out, 10 );\n\tif ( !isFinite( i ) ) { // NOTE: We use the global `isFinite` function here instead of `@stdlib/math/base/assert/is-finite` in order to avoid circular dependencies.\n\t\tif ( !isNumber( out ) ) {\n\t\t\tthrow new Error( 'invalid integer. Value: ' + out );\n\t\t}\n\t\ti = 0;\n\t}\n\tif ( i < 0 && ( token.specifier === 'u' || base !== 10 ) ) {\n\t\ti = 0xffffffff + i + 1;\n\t}\n\tif ( i < 0 ) {\n\t\tout = ( -i ).toString( base );\n\t\tif ( token.precision ) {\n\t\t\tout = zeroPad( out, token.precision, token.padRight );\n\t\t}\n\t\tout = '-' + out;\n\t} else {\n\t\tout = i.toString( base );\n\t\tif ( !i && !token.precision ) {\n\t\t\tout = '';\n\t\t} else if ( token.precision ) {\n\t\t\tout = zeroPad( out, token.precision, token.padRight );\n\t\t}\n\t\tif ( token.sign ) {\n\t\t\tout = token.sign + out;\n\t\t}\n\t}\n\tif ( base === 16 ) {\n\t\tif ( token.alternate ) {\n\t\t\tout = '0x' + out;\n\t\t}\n\t\tout = ( token.specifier === uppercase.call( token.specifier ) ) ?\n\t\t\tuppercase.call( out ) :\n\t\t\tlowercase.call( out );\n\t}\n\tif ( base === 8 ) {\n\t\tif ( token.alternate && out.charAt( 0 ) !== '0' ) {\n\t\t\tout = '0' + out;\n\t\t}\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default formatInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isNumber from './is_number.js';\n\n// NOTE: for the following, we explicitly avoid using stdlib packages in this particular package in order to avoid circular dependencies.\nvar abs = Math.abs; // eslint-disable-line stdlib/no-builtin-math\nvar lowercase = String.prototype.toLowerCase;\nvar uppercase = String.prototype.toUpperCase;\nvar replace = String.prototype.replace;\n\n\n// VARIABLES //\n\nvar RE_EXP_POS_DIGITS = /e\\+(\\d)$/;\nvar RE_EXP_NEG_DIGITS = /e-(\\d)$/;\nvar RE_ONLY_DIGITS = /^(\\d+)$/;\nvar RE_DIGITS_BEFORE_EXP = /^(\\d+)e/;\nvar RE_TRAILING_PERIOD_ZERO = /\\.0$/;\nvar RE_PERIOD_ZERO_EXP = /\\.0*e/;\nvar RE_ZERO_BEFORE_EXP = /(\\..*[^0])0*e/;\n\n\n// MAIN //\n\n/**\n* Formats a token object argument as a floating-point number.\n*\n* @private\n* @param {Object} token - token object\n* @throws {Error} must provide a valid floating-point number\n* @returns {string} formatted token argument\n*/\nfunction formatDouble( token ) {\n\tvar digits;\n\tvar out;\n\tvar f = parseFloat( token.arg );\n\tif ( !isFinite( f ) ) { // NOTE: We use the global `isFinite` function here instead of `@stdlib/math/base/assert/is-finite` in order to avoid circular dependencies.\n\t\tif ( !isNumber( token.arg ) ) {\n\t\t\tthrow new Error( 'invalid floating-point number. Value: ' + out );\n\t\t}\n\t\t// Case: NaN, Infinity, or -Infinity\n\t\tf = token.arg;\n\t}\n\tswitch ( token.specifier ) {\n\tcase 'e':\n\tcase 'E':\n\t\tout = f.toExponential( token.precision );\n\t\tbreak;\n\tcase 'f':\n\tcase 'F':\n\t\tout = f.toFixed( token.precision );\n\t\tbreak;\n\tcase 'g':\n\tcase 'G':\n\t\tif ( abs( f ) < 0.0001 ) {\n\t\t\tdigits = token.precision;\n\t\t\tif ( digits > 0 ) {\n\t\t\t\tdigits -= 1;\n\t\t\t}\n\t\t\tout = f.toExponential( digits );\n\t\t} else {\n\t\t\tout = f.toPrecision( token.precision );\n\t\t}\n\t\tif ( !token.alternate ) {\n\t\t\tout = replace.call( out, RE_ZERO_BEFORE_EXP, '$1e' );\n\t\t\tout = replace.call( out, RE_PERIOD_ZERO_EXP, 'e');\n\t\t\tout = replace.call( out, RE_TRAILING_PERIOD_ZERO, '' );\n\t\t}\n\t\tbreak;\n\tdefault:\n\t\tthrow new Error( 'invalid double notation. Value: ' + token.specifier );\n\t}\n\tout = replace.call( out, RE_EXP_POS_DIGITS, 'e+0$1' );\n\tout = replace.call( out, RE_EXP_NEG_DIGITS, 'e-0$1' );\n\tif ( token.alternate ) {\n\t\tout = replace.call( out, RE_ONLY_DIGITS, '$1.' );\n\t\tout = replace.call( out, RE_DIGITS_BEFORE_EXP, '$1.e' );\n\t}\n\tif ( f >= 0 && token.sign ) {\n\t\tout = token.sign + out;\n\t}\n\tout = ( token.specifier === uppercase.call( token.specifier ) ) ?\n\t\tuppercase.call( out ) :\n\t\tlowercase.call( out );\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default formatDouble;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// FUNCTIONS //\n\n/**\n* Returns `n` spaces.\n*\n* @private\n* @param {number} n - number of spaces\n* @returns {string} string of spaces\n*/\nfunction spaces( n ) {\n\tvar out = '';\n\tvar i;\n\tfor ( i = 0; i < n; i++ ) {\n\t\tout += ' ';\n\t}\n\treturn out;\n}\n\n\n// MAIN //\n\n/**\n* Pads a token with spaces to the specified width.\n*\n* @private\n* @param {string} str - token argument\n* @param {number} width - token width\n* @param {boolean} [right=false] - boolean indicating whether to pad to the right\n* @returns {string} padded token argument\n*/\nfunction spacePad( str, width, right ) {\n\tvar pad = width - str.length;\n\tif ( pad < 0 ) {\n\t\treturn str;\n\t}\n\tstr = ( right ) ?\n\t\tstr + spaces( pad ) :\n\t\tspaces( pad ) + str;\n\treturn str;\n}\n\n\n// EXPORTS //\n\nexport default spacePad;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport formatInteger from './format_integer.js';\nimport isString from './is_string.js';\nimport formatDouble from './format_double.js';\nimport spacePad from './space_pad.js';\nimport zeroPad from './zero_pad.js';\n\n\n// VARIABLES //\n\nvar fromCharCode = String.fromCharCode;\nvar isnan = isNaN; // NOTE: We use the global `isNaN` function here instead of `@stdlib/math/base/assert/is-nan` to avoid circular dependencies.\nvar isArray = Array.isArray; // NOTE: We use the global `Array.isArray` function here instead of `@stdlib/assert/is-array` to avoid circular dependencies.\n\n\n// FUNCTIONS //\n\n/**\n* Initializes token object with properties of supplied format identifier object or default values if not present.\n*\n* @private\n* @param {Object} token - format identifier object\n* @returns {Object} token object\n*/\nfunction initialize( token ) {\n\tvar out = {};\n\tout.specifier = token.specifier;\n\tout.precision = ( token.precision === void 0 ) ? 1 : token.precision;\n\tout.width = token.width;\n\tout.flags = token.flags || '';\n\tout.mapping = token.mapping;\n\treturn out;\n}\n\n\n// MAIN //\n\n/**\n* Generates string from a token array by interpolating values.\n*\n* @param {Array} tokens - string parts and format identifier objects\n* @param {Array} ...args - variable values\n* @throws {TypeError} first argument must be an array\n* @throws {Error} invalid flags\n* @returns {string} formatted string\n*\n* @example\n* var tokens = [ 'beep ', { 'specifier': 's' } ];\n* var out = formatInterpolate( tokens, 'boop' );\n* // returns 'beep boop'\n*/\nfunction formatInterpolate( tokens ) {\n\tvar hasPeriod;\n\tvar flags;\n\tvar token;\n\tvar flag;\n\tvar num;\n\tvar out;\n\tvar pos;\n\tvar i;\n\tvar j;\n\n\tif ( !isArray( tokens ) ) {\n\t\tthrow new TypeError( 'invalid argument. First argument must be an array. Value: `' + tokens + '`.' );\n\t}\n\tout = '';\n\tpos = 1;\n\tfor ( i = 0; i < tokens.length; i++ ) {\n\t\ttoken = tokens[ i ];\n\t\tif ( isString( token ) ) {\n\t\t\tout += token;\n\t\t} else {\n\t\t\thasPeriod = token.precision !== void 0;\n\t\t\ttoken = initialize( token );\n\t\t\tif ( !token.specifier ) {\n\t\t\t\tthrow new TypeError( 'invalid argument. Token is missing `specifier` property. Index: `'+ i +'`. Value: `' + token + '`.' );\n\t\t\t}\n\t\t\tif ( token.mapping ) {\n\t\t\t\tpos = token.mapping;\n\t\t\t}\n\t\t\tflags = token.flags;\n\t\t\tfor ( j = 0; j < flags.length; j++ ) {\n\t\t\t\tflag = flags.charAt( j );\n\t\t\t\tswitch ( flag ) {\n\t\t\t\tcase ' ':\n\t\t\t\t\ttoken.sign = ' ';\n\t\t\t\t\tbreak;\n\t\t\t\tcase '+':\n\t\t\t\t\ttoken.sign = '+';\n\t\t\t\t\tbreak;\n\t\t\t\tcase '-':\n\t\t\t\t\ttoken.padRight = true;\n\t\t\t\t\ttoken.padZeros = false;\n\t\t\t\t\tbreak;\n\t\t\t\tcase '0':\n\t\t\t\t\ttoken.padZeros = flags.indexOf( '-' ) < 0; // NOTE: We use built-in `Array.prototype.indexOf` here instead of `@stdlib/assert/contains` in order to avoid circular dependencies.\n\t\t\t\t\tbreak;\n\t\t\t\tcase '#':\n\t\t\t\t\ttoken.alternate = true;\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tthrow new Error( 'invalid flag: ' + flag );\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( token.width === '*' ) {\n\t\t\t\ttoken.width = parseInt( arguments[ pos ], 10 );\n\t\t\t\tpos += 1;\n\t\t\t\tif ( isnan( token.width ) ) {\n\t\t\t\t\tthrow new TypeError( 'the argument for * width at position ' + pos + ' is not a number. Value: `' + token.width + '`.' );\n\t\t\t\t}\n\t\t\t\tif ( token.width < 0 ) {\n\t\t\t\t\ttoken.padRight = true;\n\t\t\t\t\ttoken.width = -token.width;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( hasPeriod ) {\n\t\t\t\tif ( token.precision === '*' ) {\n\t\t\t\t\ttoken.precision = parseInt( arguments[ pos ], 10 );\n\t\t\t\t\tpos += 1;\n\t\t\t\t\tif ( isnan( token.precision ) ) {\n\t\t\t\t\t\tthrow new TypeError( 'the argument for * precision at position ' + pos + ' is not a number. Value: `' + token.precision + '`.' );\n\t\t\t\t\t}\n\t\t\t\t\tif ( token.precision < 0 ) {\n\t\t\t\t\t\ttoken.precision = 1;\n\t\t\t\t\t\thasPeriod = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\ttoken.arg = arguments[ pos ];\n\t\t\tswitch ( token.specifier ) {\n\t\t\tcase 'b':\n\t\t\tcase 'o':\n\t\t\tcase 'x':\n\t\t\tcase 'X':\n\t\t\tcase 'd':\n\t\t\tcase 'i':\n\t\t\tcase 'u':\n\t\t\t\t// Case: %b (binary), %o (octal), %x, %X (hexadecimal), %d, %i (decimal), %u (unsigned decimal)\n\t\t\t\tif ( hasPeriod ) {\n\t\t\t\t\ttoken.padZeros = false;\n\t\t\t\t}\n\t\t\t\ttoken.arg = formatInteger( token );\n\t\t\t\tbreak;\n\t\t\tcase 's':\n\t\t\t\t// Case: %s (string)\n\t\t\t\ttoken.maxWidth = ( hasPeriod ) ? token.precision : -1;\n\t\t\t\tbreak;\n\t\t\tcase 'c':\n\t\t\t\t// Case: %c (character)\n\t\t\t\tif ( !isnan( token.arg ) ) {\n\t\t\t\t\tnum = parseInt( token.arg, 10 );\n\t\t\t\t\tif ( num < 0 || num > 127 ) {\n\t\t\t\t\t\tthrow new Error( 'invalid character code. Value: ' + token.arg );\n\t\t\t\t\t}\n\t\t\t\t\ttoken.arg = ( isnan( num ) ) ?\n\t\t\t\t\t\tString( token.arg ) :\n\t\t\t\t\t\tfromCharCode( num );\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'e':\n\t\t\tcase 'E':\n\t\t\tcase 'f':\n\t\t\tcase 'F':\n\t\t\tcase 'g':\n\t\t\tcase 'G':\n\t\t\t\t// Case: %e, %E (scientific notation), %f, %F (decimal floating point), %g, %G (uses the shorter of %e/E or %f/F)\n\t\t\t\tif ( !hasPeriod ) {\n\t\t\t\t\ttoken.precision = 6;\n\t\t\t\t}\n\t\t\t\ttoken.arg = formatDouble( token );\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tthrow new Error( 'invalid specifier: ' + token.specifier );\n\t\t\t}\n\t\t\t// Fit argument into field width...\n\t\t\tif ( token.maxWidth >= 0 && token.arg.length > token.maxWidth ) {\n\t\t\t\ttoken.arg = token.arg.substring( 0, token.maxWidth );\n\t\t\t}\n\t\t\tif ( token.padZeros ) {\n\t\t\t\ttoken.arg = zeroPad( token.arg, token.width || token.precision, token.padRight ); // eslint-disable-line max-len\n\t\t\t} else if ( token.width ) {\n\t\t\t\ttoken.arg = spacePad( token.arg, token.width, token.padRight );\n\t\t\t}\n\t\t\tout += token.arg || '';\n\t\t\tpos += 1;\n\t\t}\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default formatInterpolate;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Tests if a value is a string primitive.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a string primitive\n*\n* @example\n* var bool = isString( 'beep' );\n* // returns true\n*\n* @example\n* var bool = isString( new String( 'beep' ) );\n* // returns false\n*/\nfunction isString( value ) {\n\treturn ( typeof value === 'string' ); // NOTE: we inline the `isString.isPrimitive` function from `@stdlib/assert/is-string` in order to avoid circular dependencies.\n}\n\n\n// EXPORTS //\n\nexport default isString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// VARIABLES //\n\nvar RE = /%(?:([1-9]\\d*)\\$)?([0 +\\-#]*)(\\*|\\d+)?(?:(\\.)(\\*|\\d+)?)?[hlL]?([%A-Za-z])/g;\n\n\n// FUNCTIONS //\n\n/**\n* Parses a delimiter.\n*\n* @private\n* @param {Array} match - regular expression match\n* @returns {Object} delimiter token object\n*/\nfunction parse( match ) {\n\tvar token = {\n\t\t'mapping': ( match[ 1 ] ) ? parseInt( match[ 1 ], 10 ) : void 0,\n\t\t'flags': match[ 2 ],\n\t\t'width': match[ 3 ],\n\t\t'precision': match[ 5 ],\n\t\t'specifier': match[ 6 ]\n\t};\n\tif ( match[ 4 ] === '.' && match[ 5 ] === void 0 ) {\n\t\ttoken.precision = '1';\n\t}\n\treturn token;\n}\n\n\n// MAIN //\n\n/**\n* Tokenizes a string into an array of string parts and format identifier objects.\n*\n* @param {string} str - input string\n* @returns {Array} tokens\n*\n* @example\n* var tokens = formatTokenize( 'Hello %s!' );\n* // returns [ 'Hello ', {...}, '!' ]\n*/\nfunction formatTokenize( str ) {\n\tvar content;\n\tvar tokens;\n\tvar match;\n\tvar prev;\n\n\ttokens = [];\n\tprev = 0;\n\tmatch = RE.exec( str );\n\twhile ( match ) {\n\t\tcontent = str.slice( prev, RE.lastIndex - match[ 0 ].length );\n\t\tif ( content.length ) {\n\t\t\ttokens.push( content );\n\t\t}\n\t\ttokens.push( parse( match ) );\n\t\tprev = RE.lastIndex;\n\t\tmatch = RE.exec( str );\n\t}\n\tcontent = str.slice( prev );\n\tif ( content.length ) {\n\t\ttokens.push( content );\n\t}\n\treturn tokens;\n}\n\n\n// EXPORTS //\n\nexport default formatTokenize;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport interpolate from '@stdlib/string-base-format-interpolate';\nimport tokenize from '@stdlib/string-base-format-tokenize';\nimport isString from './is_string.js';\n\n\n// MAIN //\n\n/**\n* Inserts supplied variable values into a format string.\n*\n* @param {string} str - input string\n* @param {Array} ...args - variable values\n* @throws {TypeError} first argument must be a string\n* @throws {Error} invalid flags\n* @returns {string} formatted string\n*\n* @example\n* var str = format( 'Hello %s!', 'world' );\n* // returns 'Hello world!'\n*\n* @example\n* var str = format( 'Pi: ~%.2f', 3.141592653589793 );\n* // returns 'Pi: ~3.14'\n*/\nfunction format( str ) {\n\tvar args;\n\tvar i;\n\n\tif ( !isString( str ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a string. Value: `%s`.', str ) );\n\t}\n\targs = [ tokenize( str ) ];\n\tfor ( i = 1; i < arguments.length; i++ ) {\n\t\targs.push( arguments[ i ] );\n\t}\n\treturn interpolate.apply( null, args );\n}\n\n\n// EXPORTS //\n\nexport default format;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Tests if a value is a string primitive.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a string primitive\n*\n* @example\n* var bool = isString( 'beep' );\n* // returns true\n*\n* @example\n* var bool = isString( new String( 'beep' ) );\n* // returns false\n*/\nfunction isString( value ) {\n\treturn ( typeof value === 'string' ); // NOTE: we inline the `isString.isPrimitive` function from `@stdlib/assert/is-string` in order to avoid circular dependencies.\n}\n\n\n// EXPORTS //\n\nexport default isString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable no-underscore-dangle, no-proto */\n\n'use strict';\n\n// MODULES //\n\nimport format from '@stdlib/string-format';\n\n\n// VARIABLES //\n\nvar objectProtoype = Object.prototype;\nvar toStr = objectProtoype.toString;\nvar defineGetter = objectProtoype.__defineGetter__;\nvar defineSetter = objectProtoype.__defineSetter__;\nvar lookupGetter = objectProtoype.__lookupGetter__;\nvar lookupSetter = objectProtoype.__lookupSetter__;\n\n\n// MAIN //\n\n/**\n* Defines (or modifies) an object property.\n*\n* ## Notes\n*\n* - Property descriptors come in two flavors: **data descriptors** and **accessor descriptors**. A data descriptor is a property that has a value, which may or may not be writable. An accessor descriptor is a property described by a getter-setter function pair. A descriptor must be one of these two flavors and cannot be both.\n*\n* @param {Object} obj - object on which to define the property\n* @param {string} prop - property name\n* @param {Object} descriptor - property descriptor\n* @param {boolean} [descriptor.configurable=false] - boolean indicating if property descriptor can be changed and if the property can be deleted from the provided object\n* @param {boolean} [descriptor.enumerable=false] - boolean indicating if the property shows up when enumerating object properties\n* @param {boolean} [descriptor.writable=false] - boolean indicating if the value associated with the property can be changed with an assignment operator\n* @param {*} [descriptor.value] - property value\n* @param {(Function|void)} [descriptor.get=undefined] - function which serves as a getter for the property, or, if no getter, undefined. When the property is accessed, a getter function is called without arguments and with the `this` context set to the object through which the property is accessed (which may not be the object on which the property is defined due to inheritance). The return value will be used as the property value.\n* @param {(Function|void)} [descriptor.set=undefined] - function which serves as a setter for the property, or, if no setter, undefined. When assigning a property value, a setter function is called with one argument (the value being assigned to the property) and with the `this` context set to the object through which the property is assigned.\n* @throws {TypeError} first argument must be an object\n* @throws {TypeError} third argument must be an object\n* @throws {Error} property descriptor cannot have both a value and a setter and/or getter\n* @returns {Object} object with added property\n*\n* @example\n* var obj = {};\n*\n* defineProperty( obj, 'foo', {\n* 'value': 'bar'\n* });\n*\n* var str = obj.foo;\n* // returns 'bar'\n*/\nfunction defineProperty( obj, prop, descriptor ) {\n\tvar prototype;\n\tvar hasValue;\n\tvar hasGet;\n\tvar hasSet;\n\n\tif ( typeof obj !== 'object' || obj === null || toStr.call( obj ) === '[object Array]' ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be an object. Value: `%s`.', obj ) );\n\t}\n\tif ( typeof descriptor !== 'object' || descriptor === null || toStr.call( descriptor ) === '[object Array]' ) {\n\t\tthrow new TypeError( format( 'invalid argument. Property descriptor must be an object. Value: `%s`.', descriptor ) );\n\t}\n\thasValue = ( 'value' in descriptor );\n\tif ( hasValue ) {\n\t\tif (\n\t\t\tlookupGetter.call( obj, prop ) ||\n\t\t\tlookupSetter.call( obj, prop )\n\t\t) {\n\t\t\t// Override `__proto__` to avoid touching inherited accessors:\n\t\t\tprototype = obj.__proto__;\n\t\t\tobj.__proto__ = objectProtoype;\n\n\t\t\t// Delete property as existing getters/setters prevent assigning value to specified property:\n\t\t\tdelete obj[ prop ];\n\t\t\tobj[ prop ] = descriptor.value;\n\n\t\t\t// Restore original prototype:\n\t\t\tobj.__proto__ = prototype;\n\t\t} else {\n\t\t\tobj[ prop ] = descriptor.value;\n\t\t}\n\t}\n\thasGet = ( 'get' in descriptor );\n\thasSet = ( 'set' in descriptor );\n\n\tif ( hasValue && ( hasGet || hasSet ) ) {\n\t\tthrow new Error( 'invalid argument. Cannot specify one or more accessors and a value or writable attribute in the property descriptor.' );\n\t}\n\n\tif ( hasGet && defineGetter ) {\n\t\tdefineGetter.call( obj, prop, descriptor.get );\n\t}\n\tif ( hasSet && defineSetter ) {\n\t\tdefineSetter.call( obj, prop, descriptor.set );\n\t}\n\treturn obj;\n}\n\n\n// EXPORTS //\n\nexport default defineProperty;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Define (or modify) an object property.\n*\n* @module @stdlib/utils-define-property\n*\n* @example\n* import defineProperty from '@stdlib/utils-define-property';\n*\n* var obj = {};\n* defineProperty( obj, 'foo', {\n* 'value': 'bar',\n* 'writable': false,\n* 'configurable': false,\n* 'enumerable': false\n* });\n* obj.foo = 'boop'; // => throws\n*/\n\n// MODULES //\n\nimport hasDefinePropertySupport from './has_define_property_support.js';\nimport builtin from './builtin.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar defineProperty;\nif ( hasDefinePropertySupport() ) {\n\tdefineProperty = builtin;\n} else {\n\tdefineProperty = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default defineProperty;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport defineProperty from './define_property.js';\n\n\n// MAIN //\n\n/**\n* Tests for `Object.defineProperty` support.\n*\n* @private\n* @returns {boolean} boolean indicating if an environment has `Object.defineProperty` support\n*\n* @example\n* var bool = hasDefinePropertySupport();\n* // returns \n*/\nfunction hasDefinePropertySupport() {\n\t// Test basic support...\n\ttry {\n\t\tdefineProperty( {}, 'x', {} );\n\t\treturn true;\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\treturn false;\n\t}\n}\n\n\n// EXPORTS //\n\nexport default hasDefinePropertySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport defineProperty from '@stdlib/utils-define-property';\n\n\n// MAIN //\n\n/**\n* Defines a non-enumerable read-only property.\n*\n* @param {Object} obj - object on which to define the property\n* @param {(string|symbol)} prop - property name\n* @param {*} value - value to set\n*\n* @example\n* var obj = {};\n*\n* setNonEnumerableReadOnly( obj, 'foo', 'bar' );\n*\n* try {\n* obj.foo = 'boop';\n* } catch ( err ) {\n* console.error( err.message );\n* }\n*/\nfunction setNonEnumerableReadOnly( obj, prop, value ) {\n\tdefineProperty( obj, prop, {\n\t\t'configurable': false,\n\t\t'enumerable': false,\n\t\t'writable': false,\n\t\t'value': value\n\t});\n}\n\n\n// EXPORTS //\n\nexport default setNonEnumerableReadOnly;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Tests if a value is a number primitive.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number primitive\n*\n* @example\n* var bool = isNumber( 3.14 );\n* // returns true\n*\n* @example\n* var bool = isNumber( NaN );\n* // returns true\n*\n* @example\n* var bool = isNumber( new Number( 3.14 ) );\n* // returns false\n*/\nfunction isNumber( value ) {\n\treturn ( typeof value === 'number' );\n}\n\n\n// EXPORTS //\n\nexport default isNumber;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport hasSymbols from '@stdlib/assert-has-symbol-support';\n\n\n// VARIABLES //\n\nvar FLG = hasSymbols();\n\n\n// MAIN //\n\n/**\n* Tests for native `toStringTag` support.\n*\n* @returns {boolean} boolean indicating if an environment has `toStringTag` support\n*\n* @example\n* var bool = hasToStringTagSupport();\n* // returns \n*/\nfunction hasToStringTagSupport() {\n\treturn ( FLG && typeof Symbol.toStringTag === 'symbol' );\n}\n\n\n// EXPORTS //\n\nexport default hasToStringTagSupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Tests for native `Symbol` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Symbol` support\n*\n* @example\n* var bool = hasSymbolSupport();\n* // returns \n*/\nfunction hasSymbolSupport() {\n\treturn (\n\t\ttypeof Symbol === 'function' &&\n\t\ttypeof Symbol( 'foo' ) === 'symbol'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default hasSymbolSupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar toStr = Object.prototype.toString;\n\n\n// EXPORTS //\n\nexport default toStr;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// FUNCTIONS //\n\nvar has = Object.prototype.hasOwnProperty;\n\n\n// MAIN //\n\n/**\n* Tests if an object has a specified property.\n*\n* @param {*} value - value to test\n* @param {*} property - property to test\n* @returns {boolean} boolean indicating if an object has a specified property\n*\n* @example\n* var beep = {\n* 'boop': true\n* };\n*\n* var bool = hasOwnProp( beep, 'boop' );\n* // returns true\n*\n* @example\n* var beep = {\n* 'boop': true\n* };\n*\n* var bool = hasOwnProp( beep, 'bap' );\n* // returns false\n*/\nfunction hasOwnProp( value, property ) {\n\tif (\n\t\tvalue === void 0 ||\n\t\tvalue === null\n\t) {\n\t\treturn false;\n\t}\n\treturn has.call( value, property );\n}\n\n\n// EXPORTS //\n\nexport default hasOwnProp;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar Sym = ( typeof Symbol === 'function' ) ? Symbol : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default Sym;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport Symbol from '@stdlib/symbol-ctor';\n\n\n// MAIN //\n\nvar toStrTag = ( typeof Symbol === 'function' ) ? Symbol.toStringTag : '';\n\n\n// EXPORTS //\n\nexport default toStrTag;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Return a string value indicating a specification defined classification of an object.\n*\n* @module @stdlib/utils-native-class\n*\n* @example\n* import nativeClass from '@stdlib/utils-native-class';\n*\n* var str = nativeClass( 'a' );\n* // returns '[object String]'\n*\n* str = nativeClass( 5 );\n* // returns '[object Number]'\n*\n* function Beep() {\n* return this;\n* }\n* str = nativeClass( new Beep() );\n* // returns '[object Object]'\n*/\n\n// MODULES //\n\nimport hasToStringTag from '@stdlib/assert-has-tostringtag-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar main;\nif ( hasToStringTag() ) {\n\tmain = polyfill;\n} else {\n\tmain = builtin;\n}\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport hasOwnProp from '@stdlib/assert-has-own-property';\nimport toStringTag from './tostringtag.js';\nimport toStr from './tostring.js';\n\n\n// MAIN //\n\n/**\n* Returns a string value indicating a specification defined classification of an object in environments supporting `Symbol.toStringTag`.\n*\n* @param {*} v - input value\n* @returns {string} string value indicating a specification defined classification of the input value\n*\n* @example\n* var str = nativeClass( 'a' );\n* // returns '[object String]'\n*\n* @example\n* var str = nativeClass( 5 );\n* // returns '[object Number]'\n*\n* @example\n* function Beep() {\n* return this;\n* }\n* var str = nativeClass( new Beep() );\n* // returns '[object Object]'\n*/\nfunction nativeClass( v ) {\n\tvar isOwn;\n\tvar tag;\n\tvar out;\n\n\tif ( v === null || v === void 0 ) {\n\t\treturn toStr.call( v );\n\t}\n\ttag = v[ toStringTag ];\n\tisOwn = hasOwnProp( v, toStringTag );\n\n\t// Attempt to override the `toStringTag` property. For built-ins having a `Symbol.toStringTag` property (e.g., `JSON`, `Math`, etc), the `Symbol.toStringTag` property is read-only (e.g., , so we need to wrap in a `try/catch`.\n\ttry {\n\t\tv[ toStringTag ] = void 0;\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\treturn toStr.call( v );\n\t}\n\tout = toStr.call( v );\n\n\tif ( isOwn ) {\n\t\tv[ toStringTag ] = tag;\n\t} else {\n\t\tdelete v[ toStringTag ];\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default nativeClass;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport toStr from './tostring.js';\n\n\n// MAIN //\n\n/**\n* Returns a string value indicating a specification defined classification (via the internal property `[[Class]]`) of an object.\n*\n* @param {*} v - input value\n* @returns {string} string value indicating a specification defined classification of the input value\n*\n* @example\n* var str = nativeClass( 'a' );\n* // returns '[object String]'\n*\n* @example\n* var str = nativeClass( 5 );\n* // returns '[object Number]'\n*\n* @example\n* function Beep() {\n* return this;\n* }\n* var str = nativeClass( new Beep() );\n* // returns '[object Object]'\n*/\nfunction nativeClass( v ) {\n\treturn toStr.call( v );\n}\n\n\n// EXPORTS //\n\nexport default nativeClass;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// EXPORTS //\n\nexport default Number; // eslint-disable-line stdlib/require-globals\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport Number from '@stdlib/number-ctor';\n\n\n// MAIN //\n\n// eslint-disable-next-line stdlib/no-redeclare\nvar toString = Number.prototype.toString; // non-generic\n\n\n// EXPORTS //\n\nexport default toString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport hasToStringTag from '@stdlib/assert-has-tostringtag-support';\nimport nativeClass from '@stdlib/utils-native-class';\nimport Number from '@stdlib/number-ctor';\nimport test from './try2serialize.js';\n\n\n// VARIABLES //\n\nvar FLG = hasToStringTag();\n\n\n// MAIN //\n\n/**\n* Tests if a value is a number object.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number object\n*\n* @example\n* var bool = isNumber( 3.14 );\n* // returns false\n*\n* @example\n* var bool = isNumber( new Number( 3.14 ) );\n* // returns true\n*/\nfunction isNumber( value ) {\n\tif ( typeof value === 'object' ) {\n\t\tif ( value instanceof Number ) {\n\t\t\treturn true;\n\t\t}\n\t\tif ( FLG ) {\n\t\t\treturn test( value );\n\t\t}\n\t\treturn ( nativeClass( value ) === '[object Number]' );\n\t}\n\treturn false;\n}\n\n\n// EXPORTS //\n\nexport default isNumber;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport toString from './tostring.js'; // eslint-disable-line stdlib/no-redeclare\n\n\n// MAIN //\n\n/**\n* Attempts to serialize a value to a string.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value can be serialized\n*/\nfunction test( value ) {\n\ttry {\n\t\ttoString.call( value );\n\t\treturn true;\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\treturn false;\n\t}\n}\n\n\n// EXPORTS //\n\nexport default test;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a number.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a number\n*\n* @example\n* var bool = isNumber( 3.14 );\n* // returns true\n*\n* @example\n* var bool = isNumber( new Number( 3.14 ) );\n* // returns true\n*\n* @example\n* var bool = isNumber( NaN );\n* // returns true\n*\n* @example\n* var bool = isNumber( null );\n* // returns false\n*/\nfunction isNumber( value ) {\n\treturn ( isPrimitive( value ) || isObject( value ) );\n}\n\n\n// EXPORTS //\n\nexport default isNumber;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test if a value is a number.\n*\n* @module @stdlib/assert-is-number\n*\n* @example\n* import isNumber from '@stdlib/assert-is-number';\n*\n* var bool = isNumber( 3.14 );\n* // returns true\n*\n* bool = isNumber( new Number( 3.14 ) );\n* // returns true\n*\n* bool = isNumber( NaN );\n* // returns true\n*\n* bool = isNumber( null );\n* // returns false\n*\n* @example\n* import { isPrimitive as isNumber } from '@stdlib/assert-is-number';\n*\n* var bool = isNumber( 3.14 );\n* // returns true\n*\n* bool = isNumber( NaN );\n* // returns true\n*\n* bool = isNumber( new Number( 3.14 ) );\n* // returns false\n*\n* @example\n* import { isObject as isNumber } from '@stdlib/assert-is-number';\n*\n* var bool = isNumber( 3.14 );\n* // returns false\n*\n* bool = isNumber( new Number( 3.14 ) );\n* // returns true\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'isPrimitive', isPrimitive );\nsetReadOnly( main, 'isObject', isObject );\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Double-precision floating-point positive infinity.\n*\n* @module @stdlib/constants-float64-pinf\n* @type {number}\n*\n* @example\n* import FLOAT64_PINF from '@stdlib/constants-float64-pinf';\n* // returns Infinity\n*/\n\n\n// MAIN //\n\n/**\n* Double-precision floating-point positive infinity.\n*\n* ## Notes\n*\n* Double-precision floating-point positive infinity has the bit sequence\n*\n* ```binarystring\n* 0 11111111111 00000000000000000000 00000000000000000000000000000000\n* ```\n*\n* @constant\n* @type {number}\n* @default Number.POSITIVE_INFINITY\n* @see [IEEE 754]{@link https://en.wikipedia.org/wiki/IEEE_754-1985}\n*/\nvar FLOAT64_PINF = Number.POSITIVE_INFINITY; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default FLOAT64_PINF;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Double-precision floating-point negative infinity.\n*\n* @module @stdlib/constants-float64-ninf\n* @type {number}\n*\n* @example\n* import FLOAT64_NINF from '@stdlib/constants-float64-ninf';\n* // returns -Infinity\n*/\n\n// MODULES //\n\nimport Number from '@stdlib/number-ctor';\n\n\n// MAIN //\n\n/**\n* Double-precision floating-point negative infinity.\n*\n* ## Notes\n*\n* Double-precision floating-point negative infinity has the bit sequence\n*\n* ```binarystring\n* 1 11111111111 00000000000000000000 00000000000000000000000000000000\n* ```\n*\n* @constant\n* @type {number}\n* @default Number.NEGATIVE_INFINITY\n* @see [IEEE 754]{@link https://en.wikipedia.org/wiki/IEEE_754-1985}\n*/\nvar FLOAT64_NINF = Number.NEGATIVE_INFINITY;\n\n\n// EXPORTS //\n\nexport default FLOAT64_NINF;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: implementation (?)\n\n/**\n* Rounds a double-precision floating-point number toward negative infinity.\n*\n* @param {number} x - input value\n* @returns {number} rounded value\n*\n* @example\n* var v = floor( -4.2 );\n* // returns -5.0\n*\n* @example\n* var v = floor( 9.99999 );\n* // returns 9.0\n*\n* @example\n* var v = floor( 0.0 );\n* // returns 0.0\n*\n* @example\n* var v = floor( NaN );\n* // returns NaN\n*/\nvar floor = Math.floor; // eslint-disable-line stdlib/no-builtin-math\n\n\n// EXPORTS //\n\nexport default floor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport floor from '@stdlib/math-base-special-floor';\n\n\n// MAIN //\n\n/**\n* Tests if a finite double-precision floating-point number is an integer.\n*\n* @param {number} x - value to test\n* @returns {boolean} boolean indicating whether the value is an integer\n*\n* @example\n* var bool = isInteger( 1.0 );\n* // returns true\n*\n* @example\n* var bool = isInteger( 3.14 );\n* // returns false\n*/\nfunction isInteger( x ) {\n\treturn (floor(x) === x);\n}\n\n\n// EXPORTS //\n\nexport default isInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport PINF from '@stdlib/constants-float64-pinf';\nimport NINF from '@stdlib/constants-float64-ninf';\nimport isInt from '@stdlib/math-base-assert-is-integer';\n\n\n// MAIN //\n\n/**\n* Tests if a number primitive is an integer value.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a number primitive is an integer value\n*/\nfunction isInteger( value ) {\n\treturn (\n\t\tvalue < PINF &&\n\t\tvalue > NINF &&\n\t\tisInt( value )\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isNumber } from '@stdlib/assert-is-number';\nimport isInt from './integer.js';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a number primitive having an integer value.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number primitive having an integer value\n*\n* @example\n* var bool = isInteger( -3.0 );\n* // returns true\n*\n* @example\n* var bool = isInteger( new Number( -3.0 ) );\n* // returns false\n*/\nfunction isInteger( value ) {\n\treturn (\n\t\tisNumber( value ) &&\n\t\tisInt( value )\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isObject as isNumber } from '@stdlib/assert-is-number';\nimport isInt from './integer.js';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a number object having an integer value.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number object having an integer value\n*\n* @example\n* var bool = isInteger( 3.0 );\n* // returns false\n*\n* @example\n* var bool = isInteger( new Number( 3.0 ) );\n* // returns true\n*/\nfunction isInteger( value ) {\n\treturn (\n\t\tisNumber( value ) &&\n\t\tisInt( value.valueOf() )\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\n/**\n* Tests if a value is an integer.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an integer\n*\n* @example\n* var bool = isInteger( 5.0 );\n* // returns true\n*\n* @example\n* var bool = isInteger( new Number( 5.0 ) );\n* // returns true\n*\n* @example\n* var bool = isInteger( -3.14 );\n* // returns false\n*\n* @example\n* var bool = isInteger( null );\n* // returns false\n*/\nfunction isInteger( value ) {\n\treturn ( isPrimitive( value ) || isObject( value ) );\n}\n\n\n// EXPORTS //\n\nexport default isInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isInteger } from '@stdlib/assert-is-integer';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a number primitive having a nonnegative integer value.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number primitive having a nonnegative integer value\n*\n* @example\n* var bool = isNonNegativeInteger( 3.0 );\n* // returns true\n*\n* @example\n* var bool = isNonNegativeInteger( new Number( 3.0 ) );\n* // returns false\n*/\nfunction isNonNegativeInteger( value ) {\n\treturn (\n\t\tisInteger( value ) &&\n\t\tvalue >= 0\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isNonNegativeInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isObject as isInteger } from '@stdlib/assert-is-integer';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a number object having a nonnegative integer value.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number object having a nonnegative integer value\n*\n* @example\n* var bool = isNonNegativeInteger( 3.0 );\n* // returns false\n*\n* @example\n* var bool = isNonNegativeInteger( new Number( 3.0 ) );\n* // returns true\n*/\nfunction isNonNegativeInteger( value ) {\n\treturn (\n\t\tisInteger( value ) &&\n\t\tvalue.valueOf() >= 0\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isNonNegativeInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a nonnegative integer.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a nonnegative integer\n*\n* @example\n* var bool = isNonNegativeInteger( 5.0 );\n* // returns true\n*\n* @example\n* var bool = isNonNegativeInteger( new Number( 5.0 ) );\n* // returns true\n*\n* @example\n* var bool = isNonNegativeInteger( -5.0 );\n* // returns false\n*\n* @example\n* var bool = isNonNegativeInteger( 3.14 );\n* // returns false\n*\n* @example\n* var bool = isNonNegativeInteger( null );\n* // returns false\n*/\nfunction isNonNegativeInteger( value ) {\n\treturn ( isPrimitive( value ) || isObject( value ) );\n}\n\n\n// EXPORTS //\n\nexport default isNonNegativeInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test if a value is an integer.\n*\n* @module @stdlib/assert-is-integer\n*\n* @example\n* import isInteger from '@stdlib/assert-is-integer';\n*\n* var bool = isInteger( 5.0 );\n* // returns true\n*\n* bool = isInteger( new Number( 5.0 ) );\n* // returns true\n*\n* bool = isInteger( -3.14 );\n* // returns false\n*\n* bool = isInteger( null );\n* // returns false\n*\n* @example\n* // Use interface to check for integer primitives...\n* import { isPrimitive as isInteger } from '@stdlib/assert-is-integer';\n*\n* var bool = isInteger( -3.0 );\n* // returns true\n*\n* bool = isInteger( new Number( -3.0 ) );\n* // returns false\n*\n* @example\n* // Use interface to check for integer objects...\n* import { isObject as isInteger } from '@stdlib/assert-is-integer';\n*\n* var bool = isInteger( 3.0 );\n* // returns false\n*\n* bool = isInteger( new Number( 3.0 ) );\n* // returns true\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'isPrimitive', isPrimitive );\nsetReadOnly( main, 'isObject', isObject );\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test if a value is a nonnegative integer.\n*\n* @module @stdlib/assert-is-nonnegative-integer\n*\n* @example\n* import isNonNegativeInteger from '@stdlib/assert-is-nonnegative-integer';\n*\n* var bool = isNonNegativeInteger( 5.0 );\n* // returns true\n*\n* bool = isNonNegativeInteger( new Number( 5.0 ) );\n* // returns true\n*\n* bool = isNonNegativeInteger( -5.0 );\n* // returns false\n*\n* bool = isNonNegativeInteger( 3.14 );\n* // returns false\n*\n* bool = isNonNegativeInteger( null );\n* // returns false\n*\n* @example\n* import { isPrimitive as isNonNegativeInteger } from '@stdlib/assert-is-nonnegative-integer';\n*\n* var bool = isNonNegativeInteger( 3.0 );\n* // returns true\n*\n* bool = isNonNegativeInteger( new Number( 3.0 ) );\n* // returns false\n*\n* @example\n* import { isObject as isNonNegativeInteger } from '@stdlib/assert-is-nonnegative-integer';\n*\n* var bool = isNonNegativeInteger( 3.0 );\n* // returns false\n*\n* bool = isNonNegativeInteger( new Number( 3.0 ) );\n* // returns true\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'isPrimitive', isPrimitive );\nsetReadOnly( main, 'isObject', isObject );\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasFloat64Array = ( typeof Float64Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Float64Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a Float64Array\n*\n* @example\n* var bool = isFloat64Array( new Float64Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isFloat64Array( [] );\n* // returns false\n*/\nfunction isFloat64Array( value ) {\n\treturn (\n\t\t( hasFloat64Array && value instanceof Float64Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Float64Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isFloat64Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Float64Array === 'function' ) ? Float64Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Float64Array === 'function' ) ? Float64Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of double-precision floating-point numbers in the platform byte order.\n*\n* @module @stdlib/array-float64\n*\n* @example\n* import ctor from '@stdlib/array-float64';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasFloat64ArraySupport from '@stdlib/assert-has-float64array-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasFloat64ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isFloat64Array from '@stdlib/assert-is-float64array';\nimport GlobalFloat64Array from './float64array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Float64Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Float64Array` support\n*\n* @example\n* var bool = hasFloat64ArraySupport();\n* // returns \n*/\nfunction hasFloat64ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalFloat64Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = new GlobalFloat64Array( [ 1.0, 3.14, -3.14, NaN ] );\n\t\tbool = (\n\t\t\tisFloat64Array( arr ) &&\n\t\t\tarr[ 0 ] === 1.0 &&\n\t\t\tarr[ 1 ] === 3.14 &&\n\t\t\tarr[ 2 ] === -3.14 &&\n\t\t\tarr[ 3 ] !== arr[ 3 ]\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasFloat64ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of double-precision floating-point numbers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasFloat32Array = ( typeof Float32Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Float32Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a Float32Array\n*\n* @example\n* var bool = isFloat32Array( new Float32Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isFloat32Array( [] );\n* // returns false\n*/\nfunction isFloat32Array( value ) {\n\treturn (\n\t\t( hasFloat32Array && value instanceof Float32Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Float32Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isFloat32Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Float32Array === 'function' ) ? Float32Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Float32Array === 'function' ) ? Float32Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of single-precision floating-point numbers in the platform byte order.\n*\n* @module @stdlib/array-float32\n*\n* @example\n* import ctor from '@stdlib/array-float32';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasFloat32ArraySupport from '@stdlib/assert-has-float32array-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasFloat32ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isFloat32Array from '@stdlib/assert-is-float32array';\nimport PINF from '@stdlib/constants-float64-pinf';\nimport GlobalFloat32Array from './float32array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Float32Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Float32Array` support\n*\n* @example\n* var bool = hasFloat32ArraySupport();\n* // returns \n*/\nfunction hasFloat32ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalFloat32Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = new GlobalFloat32Array( [ 1.0, 3.14, -3.14, 5.0e40 ] );\n\t\tbool = (\n\t\t\tisFloat32Array( arr ) &&\n\t\t\tarr[ 0 ] === 1.0 &&\n\t\t\tarr[ 1 ] === 3.140000104904175 &&\n\t\t\tarr[ 2 ] === -3.140000104904175 &&\n\t\t\tarr[ 3 ] === PINF\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasFloat32ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of single-precision floating-point numbers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasInt16Array = ( typeof Int16Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is an Int16Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an Int16Array\n*\n* @example\n* var bool = isInt16Array( new Int16Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isInt16Array( [] );\n* // returns false\n*/\nfunction isInt16Array( value ) {\n\treturn (\n\t\t( hasInt16Array && value instanceof Int16Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Int16Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isInt16Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum signed 16-bit integer.\n*\n* @module @stdlib/constants-int16-max\n* @type {integer32}\n*\n* @example\n* import INT16_MAX from '@stdlib/constants-int16-max';\n* // returns 32767\n*/\n\n\n// MAIN //\n\n/**\n* Maximum signed 16-bit integer.\n*\n* ## Notes\n*\n* The number has the value\n*\n* ```tex\n* 2^{15} - 1\n* ```\n*\n* which corresponds to the bit sequence\n*\n* ```binarystring\n* 0111111111111111\n* ```\n*\n* @constant\n* @type {integer32}\n* @default 32767\n*/\nvar INT16_MAX = 32767|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default INT16_MAX;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Int16Array === 'function' ) ? Int16Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Int16Array === 'function' ) ? Int16Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of twos-complement 16-bit signed integers in the platform byte order.\n*\n* @module @stdlib/array-int16\n*\n* @example\n* import ctor from '@stdlib/array-int16';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasInt16ArraySupport from '@stdlib/assert-has-int16array-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasInt16ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isInt16Array from '@stdlib/assert-is-int16array';\nimport INT16_MAX from '@stdlib/constants-int16-max';\nimport INT16_MIN from '@stdlib/constants-int16-min';\nimport GlobalInt16Array from './int16array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Int16Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Int16Array` support\n*\n* @example\n* var bool = hasInt16ArraySupport();\n* // returns \n*/\nfunction hasInt16ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalInt16Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = new GlobalInt16Array( [ 1, 3.14, -3.14, INT16_MAX+1 ] );\n\t\tbool = (\n\t\t\tisInt16Array( arr ) &&\n\t\t\tarr[ 0 ] === 1 &&\n\t\t\tarr[ 1 ] === 3 && // truncation\n\t\t\tarr[ 2 ] === -3 && // truncation\n\t\t\tarr[ 3 ] === INT16_MIN // wrap around\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasInt16ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Minimum signed 16-bit integer.\n*\n* @module @stdlib/constants-int16-min\n* @type {integer32}\n*\n* @example\n* import INT16_MIN from '@stdlib/constants-int16-min';\n* // returns -32768\n*/\n\n\n// MAIN //\n\n/**\n* Minimum signed 16-bit integer.\n*\n* ## Notes\n*\n* The number has the value\n*\n* ```tex\n* -(2^{15})\n* ```\n*\n* which corresponds to the two's complement bit sequence\n*\n* ```binarystring\n* 1000000000000000\n* ```\n*\n* @constant\n* @type {integer32}\n* @default -32768\n*/\nvar INT16_MIN = -32768|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default INT16_MIN;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of twos-complement 16-bit signed integers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasInt32Array = ( typeof Int32Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is an Int32Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an Int32Array\n*\n* @example\n* var bool = isInt32Array( new Int32Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isInt32Array( [] );\n* // returns false\n*/\nfunction isInt32Array( value ) {\n\treturn (\n\t\t( hasInt32Array && value instanceof Int32Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Int32Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isInt32Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum signed 32-bit integer.\n*\n* @module @stdlib/constants-int32-max\n* @type {integer32}\n*\n* @example\n* import INT32_MAX from '@stdlib/constants-int32-max';\n* // returns 2147483647\n*/\n\n\n// MAIN //\n\n/**\n* Maximum signed 32-bit integer.\n*\n* ## Notes\n*\n* The number has the value\n*\n* ```tex\n* 2^{31} - 1\n* ```\n*\n* which corresponds to the bit sequence\n*\n* ```binarystring\n* 01111111111111111111111111111111\n* ```\n*\n* @constant\n* @type {integer32}\n* @default 2147483647\n*/\nvar INT32_MAX = 2147483647|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default INT32_MAX;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Int32Array === 'function' ) ? Int32Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Int32Array === 'function' ) ? Int32Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of twos-complement 32-bit signed integers in the platform byte order.\n*\n* @module @stdlib/array-int32\n*\n* @example\n* import ctor from '@stdlib/array-int32';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasInt32ArraySupport from '@stdlib/assert-has-int32array-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasInt32ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isInt32Array from '@stdlib/assert-is-int32array';\nimport INT32_MAX from '@stdlib/constants-int32-max';\nimport INT32_MIN from '@stdlib/constants-int32-min';\nimport GlobalInt32Array from './int32array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Int32Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Int32Array` support\n*\n* @example\n* var bool = hasInt32ArraySupport();\n* // returns \n*/\nfunction hasInt32ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalInt32Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = new GlobalInt32Array( [ 1, 3.14, -3.14, INT32_MAX+1 ] );\n\t\tbool = (\n\t\t\tisInt32Array( arr ) &&\n\t\t\tarr[ 0 ] === 1 &&\n\t\t\tarr[ 1 ] === 3 && // truncation\n\t\t\tarr[ 2 ] === -3 && // truncation\n\t\t\tarr[ 3 ] === INT32_MIN // wrap around\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasInt32ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Minimum signed 32-bit integer.\n*\n* @module @stdlib/constants-int32-min\n* @type {integer32}\n*\n* @example\n* import INT32_MIN from '@stdlib/constants-int32-min';\n* // returns -2147483648\n*/\n\n\n// MAIN //\n\n/**\n* Minimum signed 32-bit integer.\n*\n* ## Notes\n*\n* The number has the value\n*\n* ```tex\n* -(2^{31})\n* ```\n*\n* which corresponds to the two's complement bit sequence\n*\n* ```binarystring\n* 10000000000000000000000000000000\n* ```\n*\n* @constant\n* @type {integer32}\n* @default -2147483648\n*/\nvar INT32_MIN = -2147483648|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default INT32_MIN;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of twos-complement 32-bit signed integers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasInt8Array = ( typeof Int8Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is an Int8Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an Int8Array\n*\n* @example\n* var bool = isInt8Array( new Int8Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isInt8Array( [] );\n* // returns false\n*/\nfunction isInt8Array( value ) {\n\treturn (\n\t\t( hasInt8Array && value instanceof Int8Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Int8Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isInt8Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum signed 8-bit integer.\n*\n* @module @stdlib/constants-int8-max\n* @type {integer32}\n*\n* @example\n* import INT8_MAX from '@stdlib/constants-int8-max';\n* // returns 127\n*/\n\n\n// MAIN //\n\n/**\n* Maximum signed 8-bit integer.\n*\n* ## Notes\n*\n* The number is given by\n*\n* ```tex\n* 2^{7} - 1\n* ```\n*\n* which corresponds to the bit sequence\n*\n* ```binarystring\n* 01111111\n* ```\n*\n* @constant\n* @type {integer32}\n* @default 127\n*/\nvar INT8_MAX = 127|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default INT8_MAX;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Int8Array === 'function' ) ? Int8Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Int8Array === 'function' ) ? Int8Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of twos-complement 8-bit signed integers in the platform byte order.\n*\n* @module @stdlib/array-int8\n*\n* @example\n* import ctor from '@stdlib/array-int8';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasInt8ArraySupport from '@stdlib/assert-has-int8array-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasInt8ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isInt8Array from '@stdlib/assert-is-int8array';\nimport INT8_MAX from '@stdlib/constants-int8-max';\nimport INT8_MIN from '@stdlib/constants-int8-min';\nimport GlobalInt8Array from './int8array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Int8Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Int8Array` support\n*\n* @example\n* var bool = hasInt8ArraySupport();\n* // returns \n*/\nfunction hasInt8ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalInt8Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = new GlobalInt8Array( [ 1, 3.14, -3.14, INT8_MAX+1 ] );\n\t\tbool = (\n\t\t\tisInt8Array( arr ) &&\n\t\t\tarr[ 0 ] === 1 &&\n\t\t\tarr[ 1 ] === 3 && // truncation\n\t\t\tarr[ 2 ] === -3 && // truncation\n\t\t\tarr[ 3 ] === INT8_MIN // wrap around\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasInt8ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Minimum signed 8-bit integer.\n*\n* @module @stdlib/constants-int8-min\n* @type {integer32}\n*\n* @example\n* import INT8_MIN from '@stdlib/constants-int8-min';\n* // returns -128\n*/\n\n\n// MAIN //\n\n/**\n* Minimum signed 8-bit integer.\n*\n* ## Notes\n*\n* The number is given by\n*\n* ```tex\n* -(2^{7})\n* ```\n*\n* which corresponds to the two's complement bit sequence\n*\n* ```binarystring\n* 10000000\n* ```\n*\n* @constant\n* @type {integer32}\n* @default -128\n*/\nvar INT8_MIN = -128|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default INT8_MIN;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of twos-complement 8-bit signed integers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasUint16Array = ( typeof Uint16Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Uint16Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a Uint16Array\n*\n* @example\n* var bool = isUint16Array( new Uint16Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isUint16Array( [] );\n* // returns false\n*/\nfunction isUint16Array( value ) {\n\treturn (\n\t\t( hasUint16Array && value instanceof Uint16Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Uint16Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isUint16Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum unsigned 16-bit integer.\n*\n* @module @stdlib/constants-uint16-max\n* @type {integer32}\n*\n* @example\n* import UINT16_MAX from '@stdlib/constants-uint16-max';\n* // returns 65535\n*/\n\n\n// MAIN //\n\n/**\n* Maximum unsigned 16-bit integer.\n*\n* ## Notes\n*\n* The number has the value\n*\n* ```tex\n* 2^{16} - 1\n* ```\n*\n* which corresponds to the bit sequence\n*\n* ```binarystring\n* 1111111111111111\n* ```\n*\n* @constant\n* @type {integer32}\n* @default 65535\n*/\nvar UINT16_MAX = 65535|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default UINT16_MAX;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Uint16Array === 'function' ) ? Uint16Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Uint16Array === 'function' ) ? Uint16Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of 16-bit unsigned integers in the platform byte order.\n*\n* @module @stdlib/array-uint16\n*\n* @example\n* import ctor from '@stdlib/array-uint16';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasUint16ArraySupport from '@stdlib/assert-has-uint16array-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasUint16ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isUint16Array from '@stdlib/assert-is-uint16array';\nimport UINT16_MAX from '@stdlib/constants-uint16-max';\nimport GlobalUint16Array from './uint16array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Uint16Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Uint16Array` support\n*\n* @example\n* var bool = hasUint16ArraySupport();\n* // returns \n*/\nfunction hasUint16ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalUint16Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = [ 1, 3.14, -3.14, UINT16_MAX+1, UINT16_MAX+2 ];\n\t\tarr = new GlobalUint16Array( arr );\n\t\tbool = (\n\t\t\tisUint16Array( arr ) &&\n\t\t\tarr[ 0 ] === 1 &&\n\t\t\tarr[ 1 ] === 3 && // truncation\n\t\t\tarr[ 2 ] === UINT16_MAX-2 && // truncation and wrap around\n\t\t\tarr[ 3 ] === 0 && // wrap around\n\t\t\tarr[ 4 ] === 1 // wrap around\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasUint16ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of 16-bit unsigned integers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasUint32Array = ( typeof Uint32Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Uint32Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a Uint32Array\n*\n* @example\n* var bool = isUint32Array( new Uint32Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isUint32Array( [] );\n* // returns false\n*/\nfunction isUint32Array( value ) {\n\treturn (\n\t\t( hasUint32Array && value instanceof Uint32Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Uint32Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isUint32Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum unsigned 32-bit integer.\n*\n* @module @stdlib/constants-uint32-max\n* @type {uinteger32}\n*\n* @example\n* import UINT32_MAX from '@stdlib/constants-uint32-max';\n* // returns 4294967295\n*/\n\n\n// MAIN //\n\n/**\n* Maximum unsigned 32-bit integer.\n*\n* ## Notes\n*\n* The number has the value\n*\n* ```tex\n* 2^{32} - 1\n* ```\n*\n* which corresponds to the bit sequence\n*\n* ```binarystring\n* 11111111111111111111111111111111\n* ```\n*\n* @constant\n* @type {uinteger32}\n* @default 4294967295\n*/\nvar UINT32_MAX = 4294967295;\n\n\n// EXPORTS //\n\nexport default UINT32_MAX;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Uint32Array === 'function' ) ? Uint32Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Uint32Array === 'function' ) ? Uint32Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of 32-bit unsigned integers in the platform byte order.\n*\n* @module @stdlib/array-uint32\n*\n* @example\n* import ctor from '@stdlib/array-uint32';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasUint32ArraySupport from '@stdlib/assert-has-uint32array-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasUint32ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isUint32Array from '@stdlib/assert-is-uint32array';\nimport UINT32_MAX from '@stdlib/constants-uint32-max';\nimport GlobalUint32Array from './uint32array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Uint32Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Uint32Array` support\n*\n* @example\n* var bool = hasUint32ArraySupport();\n* // returns \n*/\nfunction hasUint32ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalUint32Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = [ 1, 3.14, -3.14, UINT32_MAX+1, UINT32_MAX+2 ];\n\t\tarr = new GlobalUint32Array( arr );\n\t\tbool = (\n\t\t\tisUint32Array( arr ) &&\n\t\t\tarr[ 0 ] === 1 &&\n\t\t\tarr[ 1 ] === 3 && // truncation\n\t\t\tarr[ 2 ] === UINT32_MAX-2 && // truncation and wrap around\n\t\t\tarr[ 3 ] === 0 && // wrap around\n\t\t\tarr[ 4 ] === 1 // wrap around\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasUint32ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of 32-bit unsigned integers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasUint8Array = ( typeof Uint8Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Uint8Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a Uint8Array\n*\n* @example\n* var bool = isUint8Array( new Uint8Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isUint8Array( [] );\n* // returns false\n*/\nfunction isUint8Array( value ) {\n\treturn (\n\t\t( hasUint8Array && value instanceof Uint8Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Uint8Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isUint8Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum unsigned 8-bit integer.\n*\n* @module @stdlib/constants-uint8-max\n* @type {integer32}\n*\n* @example\n* import UINT8_MAX from '@stdlib/constants-uint8-max';\n* // returns 255\n*/\n\n\n// MAIN //\n\n/**\n* Maximum unsigned 8-bit integer.\n*\n* ## Notes\n*\n* The number has the value\n*\n* ```tex\n* 2^{8} - 1\n* ```\n*\n* which corresponds to the bit sequence\n*\n* ```binarystring\n* 11111111\n* ```\n*\n* @constant\n* @type {integer32}\n* @default 255\n*/\nvar UINT8_MAX = 255|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default UINT8_MAX;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Uint8Array === 'function' ) ? Uint8Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Uint8Array === 'function' ) ? Uint8Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of 8-bit unsigned integers in the platform byte order.\n*\n* @module @stdlib/array-uint8\n*\n* @example\n* import ctor from '@stdlib/array-uint8';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasUint8ArraySupport from '@stdlib/assert-has-uint8array-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasUint8ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isUint8Array from '@stdlib/assert-is-uint8array';\nimport UINT8_MAX from '@stdlib/constants-uint8-max';\nimport GlobalUint8Array from './uint8array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Uint8Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Uint8Array` support\n*\n* @example\n* var bool = hasUint8ArraySupport();\n* // returns \n*/\nfunction hasUint8ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalUint8Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = [ 1, 3.14, -3.14, UINT8_MAX+1, UINT8_MAX+2 ];\n\t\tarr = new GlobalUint8Array( arr );\n\t\tbool = (\n\t\t\tisUint8Array( arr ) &&\n\t\t\tarr[ 0 ] === 1 &&\n\t\t\tarr[ 1 ] === 3 && // truncation\n\t\t\tarr[ 2 ] === UINT8_MAX-2 && // truncation and wrap around\n\t\t\tarr[ 3 ] === 0 && // wrap around\n\t\t\tarr[ 4 ] === 1 // wrap around\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasUint8ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of 8-bit unsigned integers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasUint8ClampedArray = ( typeof Uint8ClampedArray === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Uint8ClampedArray.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a Uint8ClampedArray\n*\n* @example\n* var bool = isUint8ClampedArray( new Uint8ClampedArray( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isUint8ClampedArray( [] );\n* // returns false\n*/\nfunction isUint8ClampedArray( value ) {\n\treturn (\n\t\t( hasUint8ClampedArray && value instanceof Uint8ClampedArray ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Uint8ClampedArray]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isUint8ClampedArray;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Uint8ClampedArray === 'function' ) ? Uint8ClampedArray : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Uint8ClampedArray === 'function' ) ? Uint8ClampedArray : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of 8-bit unsigned integers in the platform byte order clamped to 0-255.\n*\n* @module @stdlib/array-uint8c\n*\n* @example\n* import ctor from '@stdlib/array-uint8c';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasUint8ClampedArraySupport from '@stdlib/assert-has-uint8clampedarray-support'; // eslint-disable-line id-length\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasUint8ClampedArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isUint8ClampedArray from '@stdlib/assert-is-uint8clampedarray';\nimport GlobalUint8ClampedArray from './uint8clampedarray.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Uint8ClampedArray` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Uint8ClampedArray` support\n*\n* @example\n* var bool = hasUint8ClampedArraySupport();\n* // returns \n*/\nfunction hasUint8ClampedArraySupport() { // eslint-disable-line id-length\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalUint8ClampedArray !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = new GlobalUint8ClampedArray( [ -1, 0, 1, 3.14, 4.99, 255, 256 ] );\n\t\tbool = (\n\t\t\tisUint8ClampedArray( arr ) &&\n\t\t\tarr[ 0 ] === 0 && // clamped\n\t\t\tarr[ 1 ] === 0 &&\n\t\t\tarr[ 2 ] === 1 &&\n\t\t\tarr[ 3 ] === 3 && // round to nearest\n\t\t\tarr[ 4 ] === 5 && // round to nearest\n\t\t\tarr[ 5 ] === 255 &&\n\t\t\tarr[ 6 ] === 255 // clamped\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasUint8ClampedArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of 8-bit unsigned integers in the platform byte order clamped to 0-255.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum length of a generic array.\n*\n* @module @stdlib/constants-array-max-array-length\n*\n* @example\n* import MAX_ARRAY_LENGTH from '@stdlib/constants-array-max-array-length';\n* // returns 4294967295\n*/\n\n// MAIN //\n\n/**\n* Maximum length of a generic array.\n*\n* ```tex\n* 2^{32} - 1\n* ```\n*\n* @constant\n* @type {uinteger32}\n* @default 4294967295\n*/\nvar MAX_ARRAY_LENGTH = 4294967295>>>0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default MAX_ARRAY_LENGTH;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isInteger from '@stdlib/math-base-assert-is-integer';\nimport MAX_LENGTH from '@stdlib/constants-array-max-array-length';\n\n\n// MAIN //\n\n/**\n* Tests if a value is an array-like object.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is an array-like object\n*\n* @example\n* var bool = isArrayLikeObject( [] );\n* // returns true\n*\n* @example\n* var bool = isArrayLikeObject( { 'length':10 } );\n* // returns true\n*\n* @example\n* var bool = isArrayLikeObject( 'beep' );\n* // returns false\n*/\nfunction isArrayLikeObject( value ) {\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\ttypeof value.length === 'number' &&\n\t\tisInteger( value.length ) &&\n\t\tvalue.length >= 0 &&\n\t\tvalue.length <= MAX_LENGTH\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isArrayLikeObject;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum length of a typed array.\n*\n* @module @stdlib/constants-array-max-typed-array-length\n*\n* @example\n* import MAX_TYPED_ARRAY_LENGTH from '@stdlib/constants-array-max-typed-array-length';\n* // returns 9007199254740991\n*/\n\n// MAIN //\n\n/**\n* Maximum length of a typed array.\n*\n* ```tex\n* 2^{53} - 1\n* ```\n*\n* @constant\n* @type {number}\n* @default 9007199254740991\n*/\nvar MAX_TYPED_ARRAY_LENGTH = 9007199254740991;\n\n\n// EXPORTS //\n\nexport default MAX_TYPED_ARRAY_LENGTH;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isInteger from '@stdlib/math-base-assert-is-integer';\nimport MAX_LENGTH from '@stdlib/constants-array-max-typed-array-length';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a collection.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether a value is a collection\n*\n* @example\n* var bool = isCollection( [] );\n* // returns true\n*\n* @example\n* var bool = isCollection( {} );\n* // returns false\n*/\nfunction isCollection( value ) {\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\ttypeof value.length === 'number' &&\n\t\tisInteger( value.length ) &&\n\t\tvalue.length >= 0 &&\n\t\tvalue.length <= MAX_LENGTH\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isCollection;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasArrayBuffer = ( typeof ArrayBuffer === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is an ArrayBuffer.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an ArrayBuffer\n*\n* @example\n* import ArrayBuffer from '@stdlib/array-buffer';\n*\n* var bool = isArrayBuffer( new ArrayBuffer( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isArrayBuffer( [] );\n* // returns false\n*/\nfunction isArrayBuffer( value ) {\n\treturn (\n\t\t( hasArrayBuffer && value instanceof ArrayBuffer ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object ArrayBuffer]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isArrayBuffer;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar f;\n\n\n// FUNCTIONS //\n\n/**\n* Tests if a value is an array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an array\n*\n* @example\n* var bool = isArray( [] );\n* // returns true\n*\n* @example\n* var bool = isArray( {} );\n* // returns false\n*/\nfunction isArray( value ) {\n\treturn ( nativeClass( value ) === '[object Array]' );\n}\n\n\n// MAIN //\n\nif ( Array.isArray ) {\n\tf = Array.isArray;\n} else {\n\tf = isArray;\n}\n\n\n// EXPORTS //\n\nexport default f;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isArray from '@stdlib/assert-is-array';\n\n\n// MAIN //\n\n/**\n* Tests if a value is an object; e.g., `{}`.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an object\n*\n* @example\n* var bool = isObject( {} );\n* // returns true\n*\n* @example\n* var bool = isObject( null );\n* // returns false\n*/\nfunction isObject( value ) {\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\t!isArray( value )\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isObject;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Tests if a value is a string primitive.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a string primitive\n*\n* @example\n* var bool = isString( 'beep' );\n* // returns true\n*\n* @example\n* var bool = isString( new String( 'beep' ) );\n* // returns false\n*/\nfunction isString( value ) {\n\treturn ( typeof value === 'string' );\n}\n\n\n// EXPORTS //\n\nexport default isString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// eslint-disable-next-line stdlib/no-redeclare\nvar valueOf = String.prototype.valueOf; // non-generic\n\n\n// EXPORTS //\n\nexport default valueOf;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport hasToStringTag from '@stdlib/assert-has-tostringtag-support';\nimport nativeClass from '@stdlib/utils-native-class';\nimport test from './try2valueof.js';\n\n\n// VARIABLES //\n\nvar FLG = hasToStringTag();\n\n\n// MAIN //\n\n/**\n* Tests if a value is a string object.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a string object\n*\n* @example\n* var bool = isString( new String( 'beep' ) );\n* // returns true\n*\n* @example\n* var bool = isString( 'beep' );\n* // returns false\n*/\nfunction isString( value ) {\n\tif ( typeof value === 'object' ) {\n\t\tif ( value instanceof String ) {\n\t\t\treturn true;\n\t\t}\n\t\tif ( FLG ) {\n\t\t\treturn test( value );\n\t\t}\n\t\treturn ( nativeClass( value ) === '[object String]' );\n\t}\n\treturn false;\n}\n\n\n// EXPORTS //\n\nexport default isString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport valueOf from './valueof.js'; // eslint-disable-line stdlib/no-redeclare\n\n\n// MAIN //\n\n/**\n* Attempts to extract a string value.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a string can be extracted\n*/\nfunction test( value ) {\n\ttry {\n\t\tvalueOf.call( value );\n\t\treturn true;\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\treturn false;\n\t}\n}\n\n\n// EXPORTS //\n\nexport default test;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a string.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a string\n*\n* @example\n* var bool = isString( new String( 'beep' ) );\n* // returns true\n*\n* @example\n* var bool = isString( 'beep' );\n* // returns true\n*/\nfunction isString( value ) {\n\treturn ( isPrimitive( value ) || isObject( value ) );\n}\n\n\n// EXPORTS //\n\nexport default isString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test if a value is a string.\n*\n* @module @stdlib/assert-is-string\n*\n* @example\n* import isString from '@stdlib/assert-is-string';\n*\n* var bool = isString( 'beep' );\n* // returns true\n*\n* bool = isString( new String( 'beep' ) );\n* // returns true\n*\n* bool = isString( 5 );\n* // returns false\n*\n* @example\n* import { isObject as isString } from '@stdlib/assert-is-string';\n*\n* var bool = isString( new String( 'beep' ) );\n* // returns true\n*\n* bool = isString( 'beep' );\n* // returns false\n*\n* @example\n* import { isPrimitive as isString } from '@stdlib/assert-is-string';\n*\n* var bool = isString( 'beep' );\n* // returns true\n*\n* bool = isString( new String( 'beep' ) );\n* // returns false\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'isPrimitive', isPrimitive );\nsetReadOnly( main, 'isObject', isObject );\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\nvar RE = /./;\n\n\n// EXPORTS //\n\nexport default RE;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Tests if a value is a boolean primitive.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a boolean primitive\n*\n* @example\n* var bool = isBoolean( true );\n* // returns true\n*\n* @example\n* var bool = isBoolean( false );\n* // returns true\n*\n* @example\n* import Boolean from '@stdlib/boolean-ctor';\n*\n* var bool = isBoolean( new Boolean( true ) );\n* // returns false\n*/\nfunction isBoolean( value ) {\n\treturn ( typeof value === 'boolean' );\n}\n\n\n// EXPORTS //\n\nexport default isBoolean;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Returns a boolean.\n*\n* @name Boolean\n* @constructor\n* @type {Function}\n* @param {*} value - input value\n* @returns {(boolean|Boolean)} boolean\n*\n* @example\n* var b = Boolean( null );\n* // returns false\n*\n* b = Boolean( [] );\n* // returns true\n*\n* b = Boolean( {} );\n* // returns true\n*\n* @example\n* var b = new Boolean( false );\n* // returns \n*/\nvar Bool = Boolean; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default Bool;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// eslint-disable-next-line stdlib/no-redeclare\nvar toString = Boolean.prototype.toString; // non-generic\n\n\n// EXPORTS //\n\nexport default toString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport hasToStringTag from '@stdlib/assert-has-tostringtag-support';\nimport nativeClass from '@stdlib/utils-native-class';\nimport Boolean from '@stdlib/boolean-ctor';\nimport test from './try2serialize.js';\n\n\n// VARIABLES //\n\nvar FLG = hasToStringTag();\n\n\n// MAIN //\n\n/**\n* Tests if a value is a boolean object.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a boolean object\n*\n* @example\n* var bool = isBoolean( true );\n* // returns false\n*\n* @example\n* import Boolean from '@stdlib/boolean-ctor';\n*\n* var bool = isBoolean( new Boolean( false ) );\n* // returns true\n*/\nfunction isBoolean( value ) {\n\tif ( typeof value === 'object' ) {\n\t\tif ( value instanceof Boolean ) {\n\t\t\treturn true;\n\t\t}\n\t\tif ( FLG ) {\n\t\t\treturn test( value );\n\t\t}\n\t\treturn ( nativeClass( value ) === '[object Boolean]' );\n\t}\n\treturn false;\n}\n\n\n// EXPORTS //\n\nexport default isBoolean;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport toString from './tostring.js'; // eslint-disable-line stdlib/no-redeclare\n\n\n// MAIN //\n\n/**\n* Attempts to serialize a value to a string.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value can be serialized\n*/\nfunction test( value ) {\n\ttry {\n\t\ttoString.call( value );\n\t\treturn true;\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\treturn false;\n\t}\n}\n\n\n// EXPORTS //\n\nexport default test;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a boolean.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a boolean\n*\n* @example\n* var bool = isBoolean( false );\n* // returns true\n*\n* @example\n* var bool = isBoolean( true );\n* // returns true\n*\n* @example\n* import Boolean from '@stdlib/boolean-ctor';\n*\n* var bool = isBoolean( new Boolean( false ) );\n* // returns true\n*\n* @example\n* import Boolean from '@stdlib/boolean-ctor';\n*\n* var bool = isBoolean( new Boolean( true ) );\n* // returns true\n*/\nfunction isBoolean( value ) {\n\treturn ( isPrimitive( value ) || isObject( value ) );\n}\n\n\n// EXPORTS //\n\nexport default isBoolean;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test if a value is a boolean.\n*\n* @module @stdlib/assert-is-boolean\n*\n* @example\n* import Boolean from '@stdlib/boolean-ctor';\n* import isBoolean from '@stdlib/assert-is-boolean';\n*\n* var bool = isBoolean( false );\n* // returns true\n*\n* bool = isBoolean( new Boolean( false ) );\n* // returns true\n*\n* @example\n* import Boolean from '@stdlib/boolean-ctor';\n* import { isPrimitive as isBoolean } from '@stdlib/assert-is-boolean';\n*\n* var bool = isBoolean( false );\n* // returns true\n*\n* bool = isBoolean( new Boolean( true ) );\n* // returns false\n*\n* @example\n* import Boolean from '@stdlib/boolean-ctor';\n* import { isObject as isBoolean } from '@stdlib/assert-is-boolean';\n*\n* var bool = isBoolean( true );\n* // returns false\n*\n* bool = isBoolean( new Boolean( false ) );\n* // returns true\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'isPrimitive', isPrimitive );\nsetReadOnly( main, 'isObject', isObject );\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar obj = ( typeof self === 'object' ) ? self : null;\n\n\n// EXPORTS //\n\nexport default obj;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar obj = ( typeof window === 'object' ) ? window : null;\n\n\n// EXPORTS //\n\nexport default obj;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar obj = ( typeof global === 'object' ) ? global : null;\n\n\n// EXPORTS //\n\nexport default obj;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar obj = ( typeof globalThis === 'object' ) ? globalThis : null; // eslint-disable-line no-undef\n\n\n// EXPORTS //\n\nexport default obj;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport getGlobal from '@stdlib/utils-global';\n\n\n// MAIN //\n\nvar root = getGlobal();\nvar nodeList = root.document && root.document.childNodes;\n\n\n// EXPORTS //\n\nexport default nodeList;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isBoolean } from '@stdlib/assert-is-boolean';\nimport format from '@stdlib/string-format';\nimport getThis from './codegen.js';\nimport Self from './self.js';\nimport Win from './window.js';\nimport Global from './global.js';\nimport GlobalThis from './global_this.js';\n\n\n// MAIN //\n\n/**\n* Returns the global object.\n*\n* ## Notes\n*\n* - Using code generation is the **most** reliable way to resolve the global object; however, doing so is likely to violate content security policies (CSPs) in, e.g., Chrome Apps and elsewhere.\n*\n* @param {boolean} [codegen=false] - boolean indicating whether to use code generation to resolve the global object\n* @throws {TypeError} must provide a boolean\n* @throws {Error} unable to resolve global object\n* @returns {Object} global object\n*\n* @example\n* var g = getGlobal();\n* // returns {...}\n*/\nfunction getGlobal( codegen ) {\n\tif ( arguments.length ) {\n\t\tif ( !isBoolean( codegen ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Must provide a boolean. Value: `%s`.', codegen ) );\n\t\t}\n\t\tif ( codegen ) {\n\t\t\treturn getThis();\n\t\t}\n\t\t// Fall through...\n\t}\n\t// Case: 2020 revision of ECMAScript standard\n\tif ( GlobalThis ) {\n\t\treturn GlobalThis;\n\t}\n\t// Case: browsers and web workers\n\tif ( Self ) {\n\t\treturn Self;\n\t}\n\t// Case: browsers\n\tif ( Win ) {\n\t\treturn Win;\n\t}\n\t// Case: Node.js\n\tif ( Global ) {\n\t\treturn Global;\n\t}\n\t// Case: unknown\n\tthrow new Error( 'unexpected error. Unable to resolve global object.' );\n}\n\n\n// EXPORTS //\n\nexport default getGlobal;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Returns the global object using code generation.\n*\n* @private\n* @returns {Object} global object\n*/\nfunction getGlobal() {\n\treturn new Function( 'return this;' )(); // eslint-disable-line no-new-func, stdlib/require-globals\n}\n\n\n// EXPORTS //\n\nexport default getGlobal;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\nvar typedarray = Int8Array; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default typedarray;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Returns a regular expression to capture everything that is not a space immediately after the `function` keyword and before the first left parenthesis.\n*\n* @returns {RegExp} regular expression\n*\n* @example\n* var RE_FUNCTION_NAME = reFunctionName();\n*\n* function fname( fcn ) {\n* return RE_FUNCTION_NAME.exec( fcn.toString() )[ 1 ];\n* }\n*\n* var fn = fname( Math.sqrt );\n* // returns 'sqrt'\n*\n* fn = fname( Int8Array );\n* // returns 'Int8Array'\n*\n* fn = fname( Object.prototype.toString );\n* // returns 'toString'\n*\n* fn = fname( function(){} );\n* // returns ''\n*/\nfunction reFunctionName() {\n\treturn /^\\s*function\\s*([^(]*)/i;\n}\n\n\n// EXPORTS //\n\nexport default reFunctionName;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport reFunctionName from './main.js';\n\n\n// MAIN //\n\n/**\n* Captures everything that is not a space immediately after the `function` keyword and before the first left parenthesis.\n*\n* Regular expression: `/^\\s*function\\s*([^(]*)/i`\n*\n* - `/^\\s*`\n* - Match zero or more spaces at beginning\n*\n* - `function`\n* - Match the word `function`\n*\n* - `\\s*`\n* - Match zero or more spaces after the word `function`\n*\n* - `()`\n* - Capture\n*\n* - `[^(]*`\n* - Match anything except a left parenthesis `(` zero or more times\n*\n* - `/i`\n* - ignore case\n*\n* @constant\n* @type {RegExp}\n* @default /^\\s*function\\s*([^(]*)/i\n*/\nvar RE_FUNCTION_NAME = reFunctionName();\n\n\n// EXPORTS //\n\nexport default RE_FUNCTION_NAME;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Tests if a value is object-like.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether a value is object-like\n*\n* @example\n* var bool = isObjectLike( {} );\n* // returns true\n*\n* @example\n* var bool = isObjectLike( [] );\n* // returns true\n*\n* @example\n* var bool = isObjectLike( null );\n* // returns false\n*/\nfunction isObjectLike( value ) {\n\treturn (\n\t\tvalue !== null &&\n\t\ttypeof value === 'object'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isObjectLike;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\nimport { REGEXP as RE } from '@stdlib/regexp-function-name';\nimport isBuffer from '@stdlib/assert-is-buffer';\n\n\n// MAIN //\n\n/**\n* Determines the name of a value's constructor.\n*\n* @param {*} v - input value\n* @returns {string} name of a value's constructor\n*\n* @example\n* var v = constructorName( 'a' );\n* // returns 'String'\n*\n* @example\n* var v = constructorName( 5 );\n* // returns 'Number'\n*\n* @example\n* var v = constructorName( null );\n* // returns 'Null'\n*\n* @example\n* var v = constructorName( undefined );\n* // returns 'Undefined'\n*\n* @example\n* var v = constructorName( function noop() {} );\n* // returns 'Function'\n*/\nfunction constructorName( v ) {\n\tvar match;\n\tvar name;\n\tvar ctor;\n\tname = nativeClass( v ).slice( 8, -1 );\n\tif ( (name === 'Object' || name === 'Error') && v.constructor ) {\n\t\tctor = v.constructor;\n\t\tif ( typeof ctor.name === 'string' ) {\n\t\t\treturn ctor.name;\n\t\t}\n\t\tmatch = RE.exec( ctor.toString() );\n\t\tif ( match ) {\n\t\t\treturn match[ 1 ];\n\t\t}\n\t}\n\tif ( isBuffer( v ) ) {\n\t\treturn 'Buffer';\n\t}\n\treturn name;\n}\n\n\n// EXPORTS //\n\nexport default constructorName;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isObjectLike from '@stdlib/assert-is-object-like';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Buffer instance.\n*\n* @param {*} value - value to validate\n* @returns {boolean} boolean indicating if a value is a Buffer instance\n*\n* @example\n* var v = isBuffer( new Buffer( 'beep' ) );\n* // returns true\n*\n* @example\n* var v = isBuffer( new Buffer( [1,2,3,4] ) );\n* // returns true\n*\n* @example\n* var v = isBuffer( {} );\n* // returns false\n*\n* @example\n* var v = isBuffer( [] );\n* // returns false\n*/\nfunction isBuffer( value ) {\n\treturn (\n\t\tisObjectLike( value ) &&\n\t\t(\n\t\t\t// eslint-disable-next-line no-underscore-dangle\n\t\t\tvalue._isBuffer || // for envs missing Object.prototype.constructor (e.g., Safari 5-7)\n\t\t\t(\n\t\t\t\tvalue.constructor &&\n\n\t\t\t\t// WARNING: `typeof` is not a foolproof check, as certain envs consider RegExp and NodeList instances to be functions\n\t\t\t\ttypeof value.constructor.isBuffer === 'function' &&\n\t\t\t\tvalue.constructor.isBuffer( value )\n\t\t\t)\n\t\t)\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isBuffer;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Regular expression to capture everything that is not a space immediately after the `function` keyword and before the first left parenthesis.\n*\n* @module @stdlib/regexp-function-name\n*\n* @example\n* import reFunctionName from '@stdlib/regexp-function-name';\n* var RE_FUNCTION_NAME = reFunctionName();\n*\n* function fname( fcn ) {\n* return RE_FUNCTION_NAME.exec( fcn.toString() )[ 1 ];\n* }\n*\n* var fn = fname( Math.sqrt );\n* // returns 'sqrt'\n*\n* fn = fname( Int8Array );\n* // returns 'Int8Array'\n*\n* fn = fname( Object.prototype.toString );\n* // returns 'toString'\n*\n* fn = fname( function(){} );\n* // returns ''\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport REGEXP from './regexp.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'REGEXP', REGEXP );\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test if a value is object-like.\n*\n* @module @stdlib/assert-is-object-like\n*\n* @example\n* import isObjectLike from '@stdlib/assert-is-object-like';\n*\n* var bool = isObjectLike( {} );\n* // returns true\n*\n* bool = isObjectLike( [] );\n* // returns true\n*\n* bool = isObjectLike( null );\n* // returns false\n*\n* @example\n* import { isObjectLikeArray as isObjectLike } from '@stdlib/assert-is-object-like';\n*\n* var bool = isObjectLike( [ {}, [] ] );\n* // returns true\n*\n* bool = isObjectLike( [ {}, '3.0' ] );\n* // returns false\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport arrayfun from '@stdlib/assert-tools-array-function';\nimport main from './main.js';\n\n\n// VARIABLES //\n\nvar isObjectLikeArray = arrayfun( main );\n\n\n// MAIN //\n\nsetReadOnly( main, 'isObjectLikeArray', isObjectLikeArray );\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isArray from '@stdlib/assert-is-array';\nimport format from '@stdlib/string-format';\n\n\n// MAIN //\n\n/**\n* Returns a function which tests if every element in an array passes a test condition.\n*\n* @param {Function} predicate - function to apply\n* @throws {TypeError} must provide a function\n* @returns {Function} an array function\n*\n* @example\n* import isOdd from '@stdlib/assert-is-odd';\n*\n* var arr1 = [ 1, 3, 5, 7 ];\n* var arr2 = [ 3, 5, 8 ];\n*\n* var validate = arrayfcn( isOdd );\n*\n* var bool = validate( arr1 );\n* // returns true\n*\n* bool = validate( arr2 );\n* // returns false\n*/\nfunction arrayfcn( predicate ) {\n\tif ( typeof predicate !== 'function' ) {\n\t\tthrow new TypeError( format( 'invalid argument. Must provide a function. Value: `%s`.', predicate ) );\n\t}\n\treturn every;\n\n\t/**\n\t* Tests if every element in an array passes a test condition.\n\t*\n\t* @private\n\t* @param {*} value - value to test\n\t* @returns {boolean} boolean indicating whether a value is an array for which all elements pass a test condition\n\t*/\n\tfunction every( value ) {\n\t\tvar len;\n\t\tvar i;\n\t\tif ( !isArray( value ) ) {\n\t\t\treturn false;\n\t\t}\n\t\tlen = value.length;\n\t\tif ( len === 0 ) {\n\t\t\treturn false;\n\t\t}\n\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\tif ( predicate( value[ i ] ) === false ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}\n}\n\n\n// EXPORTS //\n\nexport default arrayfcn;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Determine a value's type.\n*\n* @module @stdlib/utils-type-of\n*\n* @example\n* import typeOf from '@stdlib/utils-type-of';\n*\n* var str = typeOf( 'a' );\n* // returns 'string'\n*\n* str = typeOf( 5 );\n* // returns 'number'\n*/\n\n// MODULES //\n\nimport usePolyfill from './check.js';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar main = ( usePolyfill() ) ? polyfill : builtin;\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport RE from './fixtures/re.js';\nimport nodeList from './fixtures/nodelist.js';\nimport typedarray from './fixtures/typedarray.js';\n\n\n// MAIN //\n\n/**\n* Checks whether a polyfill is needed when using the `typeof` operator.\n*\n* @private\n* @returns {boolean} boolean indicating whether a polyfill is needed\n*/\nfunction check() {\n\tif (\n\t\t// Chrome 1-12 returns 'function' for regular expression instances (see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/typeof):\n\t\ttypeof RE === 'function' ||\n\n\t\t// Safari 8 returns 'object' for typed array and weak map constructors (underscore #1929):\n\t\ttypeof typedarray === 'object' ||\n\n\t\t// PhantomJS 1.9 returns 'function' for `NodeList` instances (underscore #2236):\n\t\ttypeof nodeList === 'function'\n\t) {\n\t\treturn true;\n\t}\n\treturn false;\n}\n\n\n// EXPORTS //\n\nexport default check;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport ctorName from '@stdlib/utils-constructor-name';\n\n\n// MAIN //\n\n/**\n* Determines a value's type.\n*\n* @param {*} v - input value\n* @returns {string} string indicating the value's type\n*/\nfunction typeOf( v ) {\n\treturn ctorName( v ).toLowerCase();\n}\n\n\n// EXPORTS //\n\nexport default typeOf;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport ctorName from '@stdlib/utils-constructor-name';\n\n\n// NOTES //\n\n/*\n* Built-in `typeof` operator behavior:\n*\n* ```text\n* typeof null => 'object'\n* typeof undefined => 'undefined'\n* typeof 'a' => 'string'\n* typeof 5 => 'number'\n* typeof NaN => 'number'\n* typeof true => 'boolean'\n* typeof false => 'boolean'\n* typeof {} => 'object'\n* typeof [] => 'object'\n* typeof function foo(){} => 'function'\n* typeof function* foo(){} => 'object'\n* typeof Symbol() => 'symbol'\n* ```\n*\n*/\n\n\n// MAIN //\n\n/**\n* Determines a value's type.\n*\n* @param {*} v - input value\n* @returns {string} string indicating the value's type\n*/\nfunction typeOf( v ) {\n\tvar type;\n\n\t// Address `typeof null` => `object` (see http://wiki.ecmascript.org/doku.php?id=harmony:typeof_null):\n\tif ( v === null ) {\n\t\treturn 'null';\n\t}\n\ttype = typeof v;\n\n\t// If the `typeof` operator returned something other than `object`, we are done. Otherwise, we need to check for an internal class name or search for a constructor.\n\tif ( type === 'object' ) {\n\t\treturn ctorName( v ).toLowerCase();\n\t}\n\treturn type;\n}\n\n\n// EXPORTS //\n\nexport default typeOf;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport typeOf from '@stdlib/utils-type-of';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a function.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a function\n*\n* @example\n* function beep() {\n* return 'beep';\n* }\n*\n* var bool = isFunction( beep );\n* // returns true\n*/\nfunction isFunction( value ) {\n\t// Note: cannot use `typeof` directly, as various browser engines incorrectly return `'function'` when operating on non-function objects, such as regular expressions and NodeLists.\n\treturn ( typeOf( value ) === 'function' );\n}\n\n\n// EXPORTS //\n\nexport default isFunction;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isNumber } from '@stdlib/assert-is-number';\nimport defineProperty from '@stdlib/utils-define-property';\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport format from '@stdlib/string-format';\nimport toStr from './tostring.js';\nimport toJSON from './tojson.js';\n\n\n// MAIN //\n\n/**\n* 128-bit complex number constructor.\n*\n* @constructor\n* @param {number} real - real component\n* @param {number} imag - imaginary component\n* @throws {TypeError} must invoke using the `new` keyword\n* @throws {TypeError} real component must be a number\n* @throws {TypeError} imaginary component must be a number\n* @returns {Complex128} 128-bit complex number\n*\n* @example\n* var z = new Complex128( 5.0, 3.0 );\n* // returns \n*/\nfunction Complex128( real, imag ) {\n\tif ( !( this instanceof Complex128 ) ) {\n\t\tthrow new TypeError( 'invalid invocation. Constructor must be called with the `new` keyword.' );\n\t}\n\tif ( !isNumber( real ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Real component must be a number. Value: `%s`.', real ) );\n\t}\n\tif ( !isNumber( imag ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Imaginary component must be a number. Value: `%s`.', imag ) );\n\t}\n\tdefineProperty( this, 're', {\n\t\t'configurable': false,\n\t\t'enumerable': true,\n\t\t'writable': false,\n\t\t'value': real\n\t});\n\tdefineProperty( this, 'im', {\n\t\t'configurable': false,\n\t\t'enumerable': true,\n\t\t'writable': false,\n\t\t'value': imag\n\t});\n\treturn this;\n}\n\n/**\n* Size (in bytes) of each component.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex128\n* @type {integer}\n* @returns {integer} size of each component\n*\n* @example\n* var nbytes = Complex128.BYTES_PER_ELEMENT;\n* // returns 8\n*/\nsetReadOnly( Complex128, 'BYTES_PER_ELEMENT', 8 );\n\n/**\n* Size (in bytes) of each component.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex128.prototype\n* @type {integer}\n* @returns {integer} size of each component\n*\n* @example\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var nbytes = z.BYTES_PER_ELEMENT;\n* // returns 8\n*/\nsetReadOnly( Complex128.prototype, 'BYTES_PER_ELEMENT', 8 );\n\n/**\n* Length (in bytes) of a complex number.\n*\n* @name byteLength\n* @memberof Complex128.prototype\n* @type {integer}\n* @returns {integer} byte length\n*\n* @example\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var nbytes = z.byteLength;\n* // returns 16\n*/\nsetReadOnly( Complex128.prototype, 'byteLength', 16 );\n\n/**\n* Serializes a complex number as a string.\n*\n* @name toString\n* @memberof Complex128.prototype\n* @type {Function}\n* @returns {string} serialized complex number\n*\n* @example\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var str = z.toString();\n* // returns '5 + 3i'\n*/\nsetReadOnly( Complex128.prototype, 'toString', toStr );\n\n/**\n* Serializes a complex number as a JSON object.\n*\n* ## Notes\n*\n* - `JSON.stringify()` implicitly calls this method when stringifying a `Complex128` instance.\n*\n* @name toJSON\n* @memberof Complex128.prototype\n* @type {Function}\n* @returns {Object} serialized complex number\n*\n* @example\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var obj = z.toJSON();\n* // returns { 'type': 'Complex128', 're': 5.0, 'im': 3.0 }\n*/\nsetReadOnly( Complex128.prototype, 'toJSON', toJSON );\n\n\n// EXPORTS //\n\nexport default Complex128;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Serializes a complex number as a string.\n*\n* @private\n* @returns {string} serialized complex number\n*/\nfunction toString() { // eslint-disable-line stdlib/no-redeclare\n\t/* eslint-disable no-invalid-this */\n\tvar str = '' + this.re;\n\tif ( this.im < 0 ) {\n\t\tstr += ' - ' + (-this.im);\n\t} else {\n\t\tstr += ' + ' + this.im;\n\t}\n\tstr += 'i';\n\treturn str;\n}\n\n\n// EXPORTS //\n\nexport default toString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Serializes a complex number as a JSON object.\n*\n* @private\n* @returns {Object} JSON representation\n*/\nfunction toJSON() {\n\t/* eslint-disable no-invalid-this */\n\tvar out = {};\n\tout.type = 'Complex128';\n\tout.re = this.re;\n\tout.im = this.im;\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default toJSON;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar fround = ( typeof Math.fround === 'function' ) ? Math.fround : null; // eslint-disable-line stdlib/no-builtin-math\n\n\n// EXPORTS //\n\nexport default fround;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport Float32Array from '@stdlib/array-float32';\n\n\n// VARIABLES //\n\nvar FLOAT32_VIEW = new Float32Array( 1 );\n\n\n// MAIN //\n\n/**\n* Converts a double-precision floating-point number to the nearest single-precision floating-point number.\n*\n* @param {number} x - double-precision floating-point number\n* @returns {number} nearest single-precision floating-point number\n*\n* @example\n* var y = float64ToFloat32( 1.337 );\n* // returns 1.3370000123977661\n*/\nfunction float64ToFloat32( x ) {\n\tFLOAT32_VIEW[ 0 ] = x;\n\treturn FLOAT32_VIEW[ 0 ];\n}\n\n\n// EXPORTS //\n\nexport default float64ToFloat32;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Convert a double-precision floating-point number to the nearest single-precision floating-point number.\n*\n* @module @stdlib/number-float64-base-to-float32\n*\n* @example\n* import float64ToFloat32 from '@stdlib/number-float64-base-to-float32';\n*\n* var y = float64ToFloat32( 1.337 );\n* // returns 1.3370000123977661\n*/\n\n// MODULES //\n\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar float64ToFloat32;\nif ( typeof builtin === 'function' ) {\n\tfloat64ToFloat32 = builtin;\n} else {\n\tfloat64ToFloat32 = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default float64ToFloat32;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isNumber } from '@stdlib/assert-is-number';\nimport defineProperty from '@stdlib/utils-define-property';\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport float64ToFloat32 from '@stdlib/number-float64-base-to-float32';\nimport format from '@stdlib/string-format';\nimport toStr from './tostring.js';\nimport toJSON from './tojson.js';\n\n\n// MAIN //\n\n/**\n* 64-bit complex number constructor.\n*\n* @constructor\n* @param {number} real - real component\n* @param {number} imag - imaginary component\n* @throws {TypeError} must invoke using the `new` keyword\n* @throws {TypeError} real component must be a number\n* @throws {TypeError} imaginary component must be a number\n* @returns {Complex64} 64-bit complex number\n*\n* @example\n* var z = new Complex64( 5.0, 3.0 );\n* // returns \n*/\nfunction Complex64( real, imag ) {\n\tif ( !( this instanceof Complex64 ) ) {\n\t\tthrow new TypeError( 'invalid invocation. Constructor must be called with the `new` keyword.' );\n\t}\n\tif ( !isNumber( real ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Real component must be a number. Value: `%s`.', real ) );\n\t}\n\tif ( !isNumber( imag ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Imaginary component must be a number. Value: `%s`.', imag ) );\n\t}\n\tdefineProperty( this, 're', {\n\t\t'configurable': false,\n\t\t'enumerable': true,\n\t\t'writable': false,\n\t\t'value': float64ToFloat32( real )\n\t});\n\tdefineProperty( this, 'im', {\n\t\t'configurable': false,\n\t\t'enumerable': true,\n\t\t'writable': false,\n\t\t'value': float64ToFloat32( imag )\n\t});\n\treturn this;\n}\n\n/**\n* Size (in bytes) of each component.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex64\n* @type {integer}\n* @returns {integer} size of each component\n*\n* @example\n* var nbytes = Complex64.BYTES_PER_ELEMENT;\n* // returns 4\n*/\nsetReadOnly( Complex64, 'BYTES_PER_ELEMENT', 4 );\n\n/**\n* Size (in bytes) of each component.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex64.prototype\n* @type {integer}\n* @returns {integer} size of each component\n*\n* @example\n* var z = new Complex64( 5.0, 3.0 );\n*\n* var nbytes = z.BYTES_PER_ELEMENT;\n* // returns 4\n*/\nsetReadOnly( Complex64.prototype, 'BYTES_PER_ELEMENT', 4 );\n\n/**\n* Length (in bytes) of a complex number.\n*\n* @name byteLength\n* @memberof Complex64.prototype\n* @type {integer}\n* @returns {integer} byte length\n*\n* @example\n* var z = new Complex64( 5.0, 3.0 );\n*\n* var nbytes = z.byteLength;\n* // returns 8\n*/\nsetReadOnly( Complex64.prototype, 'byteLength', 8 );\n\n/**\n* Serializes a complex number as a string.\n*\n* @name toString\n* @memberof Complex64.prototype\n* @type {Function}\n* @returns {string} serialized complex number\n*\n* @example\n* var z = new Complex64( 5.0, 3.0 );\n*\n* var str = z.toString();\n* // returns '5 + 3i'\n*/\nsetReadOnly( Complex64.prototype, 'toString', toStr );\n\n/**\n* Serializes a complex number as a JSON object.\n*\n* ## Notes\n*\n* - `JSON.stringify()` implicitly calls this method when stringifying a `Complex64` instance.\n*\n* @name toJSON\n* @memberof Complex64.prototype\n* @type {Function}\n* @returns {Object} serialized complex number\n*\n* @example\n* var z = new Complex64( 5.0, 3.0 );\n*\n* var obj = z.toJSON();\n* // returns { 'type': 'Complex64', 're': 5.0, 'im': 3.0 }\n*/\nsetReadOnly( Complex64.prototype, 'toJSON', toJSON );\n\n\n// EXPORTS //\n\nexport default Complex64;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport Complex128 from '@stdlib/complex-float64';\nimport Complex64 from '@stdlib/complex-float32';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a complex number-like object.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a complex number-like object.\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n* import Complex64 from '@stdlib/complex-float32';\n*\n* var x = new Complex128( 4.0, 2.0 );\n* var bool = isComplexLike( x );\n* // returns true\n*\n* x = new Complex64( 4.0, 2.0 );\n* bool = isComplexLike( x );\n* // returns true\n*/\nfunction isComplexLike( value ) {\n\tif ( value instanceof Complex128 || value instanceof Complex64 ) {\n\t\treturn true;\n\t}\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\ttypeof value.re === 'number' &&\n\t\ttypeof value.im === 'number'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isComplexLike;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isInteger from '@stdlib/math-base-assert-is-integer';\n\n\n// MAIN //\n\n/**\n* Tests if a finite numeric value is an even number.\n*\n* @param {number} x - value to test\n* @returns {boolean} boolean indicating whether the value is an even number\n*\n* @example\n* var bool = isEven( 5.0 );\n* // returns false\n*\n* @example\n* var bool = isEven( -2.0 );\n* // returns true\n*\n* @example\n* var bool = isEven( 0.0 );\n* // returns true\n*\n* @example\n* var bool = isEven( NaN );\n* // returns false\n*/\nfunction isEven( x ) {\n\treturn isInteger( x/2.0 );\n}\n\n\n// EXPORTS //\n\nexport default isEven;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Serializes a complex number as a string.\n*\n* @private\n* @returns {string} serialized complex number\n*/\nfunction toString() { // eslint-disable-line stdlib/no-redeclare\n\t/* eslint-disable no-invalid-this */\n\tvar str = '' + this.re;\n\tif ( this.im < 0 ) {\n\t\tstr += ' - ' + (-this.im);\n\t} else {\n\t\tstr += ' + ' + this.im;\n\t}\n\tstr += 'i';\n\treturn str;\n}\n\n\n// EXPORTS //\n\nexport default toString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Serializes a complex number as a JSON object.\n*\n* @private\n* @returns {Object} JSON representation\n*/\nfunction toJSON() {\n\t/* eslint-disable no-invalid-this */\n\tvar out = {};\n\tout.type = 'Complex64';\n\tout.re = this.re;\n\tout.im = this.im;\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default toJSON;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// VARIABLES //\n\nvar BYTES_PER_ELEMENT = 8; // 4 bytes per float32 x (1 real + 1 imag component)\n\n\n// MAIN //\n\n/**\n* Returns a boolean indicating if a value is a `Complex64Array`.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a `Complex64Array`\n*\n* @example\n* import Complex64Array from '@stdlib/array-complex64';\n*\n* var bool = isComplex64Array( new Complex64Array( 10 ) );\n* // returns true\n*\n* bool = isComplex64Array( [] );\n* // returns false\n*/\nfunction isComplex64Array( value ) {\n\t// Note: the following is not robust and that is intentional. In this case, we are seeking a lower cost way to reasonably determine whether an input value is a `Complex64Array` in order to avoid walking the prototype chain and resolving constructors, which is necessary for robust identification of cross-realm instances. For more robust validation, see `@stdlib/assert/is-complex64array`.\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\tvalue.constructor.name === 'Complex64Array' &&\n\t\tvalue.BYTES_PER_ELEMENT === BYTES_PER_ELEMENT\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isComplex64Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// VARIABLES //\n\nvar BYTES_PER_ELEMENT = 16; // 8 bytes per float64 x (1 real + 1 imag component)\n\n\n// MAIN //\n\n/**\n* Returns a boolean indicating if a value is a `Complex128Array`.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a `Complex128Array`\n*\n* @example\n* import Complex128Array from '@stdlib/array-complex128';\n*\n* var bool = isComplex128Array( new Complex128Array( 10 ) );\n* // returns true\n*\n* bool = isComplex128Array( [] );\n* // returns false\n*/\nfunction isComplex128Array( value ) {\n\t// Note: the following is not robust and that is intentional. In this case, we are seeking a lower cost way to reasonably determine whether an input value is a `Complex128Array` in order to avoid walking the prototype chain and resolving constructors, which is necessary for robust identification of cross-realm instances. For more robust validation, see `@stdlib/assert/is-complex128array`.\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\tvalue.constructor.name === 'Complex128Array' &&\n\t\tvalue.BYTES_PER_ELEMENT === BYTES_PER_ELEMENT\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isComplex128Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport hasOwnProp from '@stdlib/assert-has-own-property';\nimport Symbol from '@stdlib/symbol-ctor';\n\n\n// MAIN //\n\n/**\n* Tests for native `Symbol.iterator` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Symbol.iterator` support\n*\n* @example\n* var bool = hasIteratorSymbolSupport();\n* // returns \n*/\nfunction hasIteratorSymbolSupport() {\n\treturn (\n\t\ttypeof Symbol === 'function' &&\n\t\ttypeof Symbol( 'foo' ) === 'symbol' &&\n\t\thasOwnProp( Symbol, 'iterator' ) &&\n\t\ttypeof Symbol.iterator === 'symbol'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default hasIteratorSymbolSupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport hasIteratorSymbolSupport from '@stdlib/assert-has-iterator-symbol-support';\n\n\n// MAIN //\n\n/**\n* Iterator symbol.\n*\n* @name IteratorSymbol\n* @constant\n* @type {(symbol|null)}\n*\n* @example\n* function iterator() {\n* var it;\n* var i;\n*\n* i = -1;\n*\n* it = {};\n* it.next = next;\n* it.return = done;\n*\n* if ( IteratorSymbol ) {\n* it[ IteratorSymbol ] = iterator;\n* }\n* return it;\n*\n* function next() {\n* i += 1;\n* return {\n* 'value': i,\n* 'done': false\n* };\n* }\n*\n* function done( value ) {\n* if ( arguments.length === 0 ) {\n* return {\n* 'done': true\n* };\n* }\n* return {\n* 'value': value,\n* 'done': true\n* };\n* }\n* }\n*\n* var obj = iterator();\n*/\nvar IteratorSymbol = ( hasIteratorSymbolSupport() ) ? Symbol.iterator : null;\n\n\n// EXPORTS //\n\nexport default IteratorSymbol;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport defineProperty from '@stdlib/utils-define-property';\n\n\n// MAIN //\n\n/**\n* Defines a non-enumerable read-only accessor.\n*\n* @param {Object} obj - object on which to define the property\n* @param {(string|symbol)} prop - property name\n* @param {Function} getter - accessor\n*\n* @example\n* function getter() {\n* return 'bar';\n* }\n*\n* var obj = {};\n*\n* setNonEnumerableReadOnlyAccessor( obj, 'foo', getter );\n*\n* try {\n* obj.foo = 'boop';\n* } catch ( err ) {\n* console.error( err.message );\n* }\n*/\nfunction setNonEnumerableReadOnlyAccessor( obj, prop, getter ) { // eslint-disable-line id-length\n\tdefineProperty( obj, prop, {\n\t\t'configurable': false,\n\t\t'enumerable': false,\n\t\t'get': getter\n\t});\n}\n\n\n// EXPORTS //\n\nexport default setNonEnumerableReadOnlyAccessor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Returns the real component of a single-precision complex floating-point number.\n*\n* @param {Complex} z - complex number\n* @returns {number} real component\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n*\n* var z = new Complex64( 5.0, 3.0 );\n*\n* var re = realf( z );\n* // returns 5.0\n*/\nfunction realf( z ) {\n\treturn z.re;\n}\n\n\n// EXPORTS //\n\nexport default realf;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Returns the imaginary component of a single-precision complex floating-point number.\n*\n* @param {Complex} z - complex number\n* @returns {number} imaginary component\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n*\n* var z = new Complex64( 5.0, 3.0 );\n*\n* var im = imagf( z );\n* // returns 3.0\n*/\nfunction imagf( z ) {\n\treturn z.im;\n}\n\n\n// EXPORTS //\n\nexport default imagf;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport Float32Array from '@stdlib/array-float32';\n\n\n// MAIN //\n\n/**\n* Reinterprets a `Complex64Array` as a `Float32Array`.\n*\n* @param {Complex64Array} x - input array\n* @param {NonNegativeInteger} offset - starting index\n* @returns {Float32Array} `Float32Array` view\n*\n* @example\n* import Complex64Array from '@stdlib/array-complex64';\n*\n* var x = new Complex64Array( 10 );\n*\n* var out = reinterpret( x, 0 );\n* // returns \n*\n* var bool = ( out.buffer === x.buffer );\n* // returns true\n*/\nfunction reinterpret( x, offset ) {\n\treturn new Float32Array( x.buffer, x.byteOffset+(x.BYTES_PER_ELEMENT*offset), 2*(x.length-offset) ); // eslint-disable-line max-len\n}\n\n\n// EXPORTS //\n\nexport default reinterpret;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport Float64Array from '@stdlib/array-float64';\n\n\n// MAIN //\n\n/**\n* Reinterprets a `Complex128Array` as a `Float64Array`.\n*\n* @param {Complex128Array} x - input array\n* @param {NonNegativeInteger} offset - starting index\n* @returns {Float64Array} `Float64Array` view\n*\n* @example\n* import Complex128Array from '@stdlib/array-complex128';\n*\n* var x = new Complex128Array( 10 );\n*\n* var out = reinterpret( x, 0 );\n* // returns \n*\n* var bool = ( out.buffer === x.buffer );\n* // returns true\n*/\nfunction reinterpret( x, offset ) {\n\treturn new Float64Array( x.buffer, x.byteOffset+(x.BYTES_PER_ELEMENT*offset), 2*(x.length-offset) ); // eslint-disable-line max-len\n}\n\n\n// EXPORTS //\n\nexport default reinterpret;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// VARIABLES //\n\nvar GETTERS = {\n\t'float64': getFloat64,\n\t'float32': getFloat32,\n\t'int32': getInt32,\n\t'int16': getInt16,\n\t'int8': getInt8,\n\t'uint32': getUint32,\n\t'uint16': getUint16,\n\t'uint8': getUint8,\n\t'uint8c': getUint8c,\n\t'generic': getGeneric,\n\t'default': getArrayLike\n};\n\n\n// FUNCTIONS //\n\n/**\n* Returns an element from a `Float64Array`.\n*\n* @private\n* @param {Float64Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n*\n* var arr = new Float64Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getFloat64( arr, 2 );\n* // returns 3.0\n*/\nfunction getFloat64( arr, idx ) {\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from a `Float32Array`.\n*\n* @private\n* @param {Float32Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Float32Array from '@stdlib/array-float32';\n*\n* var arr = new Float32Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getFloat32( arr, 2 );\n* // returns 3.0\n*/\nfunction getFloat32( arr, idx ) {\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from an `Int32Array`.\n*\n* @private\n* @param {Int32Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Int32Array from '@stdlib/array-int32';\n*\n* var arr = new Int32Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getInt32( arr, 2 );\n* // returns 3\n*/\nfunction getInt32( arr, idx ) { // eslint-disable-line stdlib/jsdoc-doctest-decimal-point\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from an `Int16Array`.\n*\n* @private\n* @param {Int16Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Int16Array from '@stdlib/array-int16';\n*\n* var arr = new Int16Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getInt16( arr, 2 );\n* // returns 3\n*/\nfunction getInt16( arr, idx ) { // eslint-disable-line stdlib/jsdoc-doctest-decimal-point\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from an `Int8Array`.\n*\n* @private\n* @param {Int8Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Int8Array from '@stdlib/array-int8';\n*\n* var arr = new Int8Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getInt8( arr, 2 );\n* // returns 3\n*/\nfunction getInt8( arr, idx ) { // eslint-disable-line stdlib/jsdoc-doctest-decimal-point\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from a `Uint32Array`.\n*\n* @private\n* @param {Uint32Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Uint32Array from '@stdlib/array-uint32';\n*\n* var arr = new Uint32Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getUint32( arr, 2 );\n* // returns 3\n*/\nfunction getUint32( arr, idx ) { // eslint-disable-line stdlib/jsdoc-doctest-decimal-point\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from a `Uint16Array`.\n*\n* @private\n* @param {Uint16Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Uint16Array from '@stdlib/array-uint16';\n*\n* var arr = new Uint16Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getUint16( arr, 2 );\n* // returns 3\n*/\nfunction getUint16( arr, idx ) { // eslint-disable-line stdlib/jsdoc-doctest-decimal-point\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from a `Uint8Array`.\n*\n* @private\n* @param {Uint8Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Uint8Array from '@stdlib/array-uint8';\n*\n* var arr = new Uint8Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getUint8( arr, 2 );\n* // returns 3\n*/\nfunction getUint8( arr, idx ) { // eslint-disable-line stdlib/jsdoc-doctest-decimal-point\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from a `Uint8ClampedArray`.\n*\n* @private\n* @param {Uint8ClampedArray} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Uint8ClampedArray from '@stdlib/array-uint8c';\n*\n* var arr = new Uint8ClampedArray( [ 1, 2, 3, 4 ] );\n*\n* var v = getUint8c( arr, 2 );\n* // returns 3\n*/\nfunction getUint8c( arr, idx ) { // eslint-disable-line stdlib/jsdoc-doctest-decimal-point\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from a generic `Array`.\n*\n* @private\n* @param {Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {*} element value\n*\n* @example\n* var arr = [ 1, 2, 3, 4 ];\n*\n* var v = getGeneric( arr, 2 );\n* // returns 3\n*/\nfunction getGeneric( arr, idx ) {\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from an indexed array-like object.\n*\n* @private\n* @param {Collection} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {*} element value\n*\n* @example\n* var arr = [ 1, 2, 3, 4 ];\n*\n* var v = getArrayLike( arr, 2 );\n* // returns 3\n*/\nfunction getArrayLike( arr, idx ) {\n\treturn arr[ idx ];\n}\n\n\n// MAIN //\n\n/**\n* Returns an accessor function for retrieving an element from an indexed array-like object.\n*\n* @param {string} dtype - array dtype\n* @returns {Function} accessor\n*\n* @example\n* import dtype from '@stdlib/array-dtype';\n*\n* var arr = [ 1, 2, 3, 4 ];\n*\n* var get = getter( dtype( arr ) );\n* var v = get( arr, 2 );\n* // returns 3\n*/\nfunction getter( dtype ) {\n\tvar f = GETTERS[ dtype ];\n\tif ( typeof f === 'function' ) {\n\t\treturn f;\n\t}\n\treturn GETTERS.default;\n}\n\n\n// EXPORTS //\n\nexport default getter;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// VARIABLES //\n\nvar GETTERS = {\n\t'complex128': getComplex128,\n\t'complex64': getComplex64,\n\t'default': getArrayLike\n};\n\n\n// FUNCTIONS //\n\n/**\n* Returns an element from a `Complex128Array`.\n*\n* @private\n* @param {Complex128Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Complex128Array from '@stdlib/array-complex128';\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* var arr = new Complex128Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getComplex128( arr, 1 );\n* // returns \n*\n* var re = real( v );\n* // returns 3.0\n*\n* var im = imag( v );\n* // returns 4.0\n*/\nfunction getComplex128( arr, idx ) {\n\treturn arr.get( idx );\n}\n\n/**\n* Returns an element from a `Complex64Array`.\n*\n* @private\n* @param {Complex64Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Complex64Array from '@stdlib/array-complex64';\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* var arr = new Complex64Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getComplex64( arr, 1 );\n* // returns \n*\n* var re = realf( v );\n* // returns 3.0\n*\n* var im = imagf( v );\n* // returns 4.0\n*/\nfunction getComplex64( arr, idx ) {\n\treturn arr.get( idx );\n}\n\n/**\n* Returns an element from an array-like object supporting the get/set protocol.\n*\n* @private\n* @param {Collection} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {*} element value\n*\n* @example\n* var arr = [ 1, 2, 3, 4 ];\n*\n* function get( idx ) {\n* return arr[ idx ];\n* }\n*\n* function set( value, idx ) {\n* arr[ idx ] = value;\n* }\n*\n* arr.get = get;\n* arr.set = set;\n*\n* var v = getArrayLike( arr, 2 );\n* // returns 3\n*/\nfunction getArrayLike( arr, idx ) {\n\treturn arr.get( idx );\n}\n\n\n// MAIN //\n\n/**\n* Returns an accessor function for retrieving an element from an array-like object supporting the get/set protocol.\n*\n* @param {string} dtype - array dtype\n* @returns {Function} accessor\n*\n* @example\n* import Complex64Array from '@stdlib/array-complex64';\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n* import dtype from '@stdlib/array-dtype';\n*\n* var arr = new Complex64Array( [ 1, 2, 3, 4 ] );\n*\n* var get = getter( dtype( arr ) );\n* var v = get( arr, 1 );\n* // returns \n*\n* var re = realf( v );\n* // returns 3.0\n*\n* var im = imagf( v );\n* // returns 4.0\n*/\nfunction getter( dtype ) {\n\tvar f = GETTERS[ dtype ];\n\tif ( typeof f === 'function' ) {\n\t\treturn f;\n\t}\n\treturn GETTERS.default;\n}\n\n\n// EXPORTS //\n\nexport default getter;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isArrayLikeObject from '@stdlib/assert-is-array-like-object';\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport realf from '@stdlib/complex-realf';\nimport imagf from '@stdlib/complex-imagf';\nimport format from '@stdlib/string-format';\n\n\n// MAIN //\n\n/**\n* Returns an array of iterated values.\n*\n* @private\n* @param {Object} it - iterator\n* @returns {(Array|TypeError)} array or an error\n*/\nfunction fromIterator( it ) {\n\tvar out;\n\tvar v;\n\tvar z;\n\n\tout = [];\n\twhile ( true ) {\n\t\tv = it.next();\n\t\tif ( v.done ) {\n\t\t\tbreak;\n\t\t}\n\t\tz = v.value;\n\t\tif ( isArrayLikeObject( z ) && z.length >= 2 ) {\n\t\t\tout.push( z[ 0 ], z[ 1 ] );\n\t\t} else if ( isComplexLike( z ) ) {\n\t\t\tout.push( realf( z ), imagf( z ) );\n\t\t} else {\n\t\t\treturn new TypeError( format( 'invalid argument. An iterator must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', z ) );\n\t\t}\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default fromIterator;\n","/* eslint-disable no-restricted-syntax, max-lines, no-invalid-this */\n\n/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isNonNegativeInteger } from '@stdlib/assert-is-nonnegative-integer';\nimport isArrayLikeObject from '@stdlib/assert-is-array-like-object';\nimport isCollection from '@stdlib/assert-is-collection';\nimport isArrayBuffer from '@stdlib/assert-is-arraybuffer';\nimport isObject from '@stdlib/assert-is-object';\nimport isArray from '@stdlib/assert-is-array';\nimport { isPrimitive as isString } from '@stdlib/assert-is-string';\nimport isFunction from '@stdlib/assert-is-function';\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport isEven from '@stdlib/math-base-assert-is-even';\nimport isInteger from '@stdlib/math-base-assert-is-integer';\nimport isComplex64Array from '@stdlib/array-base-assert-is-complex64array';\nimport isComplex128Array from '@stdlib/array-base-assert-is-complex128array';\nimport hasIteratorSymbolSupport from '@stdlib/assert-has-iterator-symbol-support';\nimport ITERATOR_SYMBOL from '@stdlib/symbol-iterator';\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport setReadOnlyAccessor from '@stdlib/utils-define-nonenumerable-read-only-accessor';\nimport Float32Array from '@stdlib/array-float32';\nimport Complex64 from '@stdlib/complex-float32';\nimport format from '@stdlib/string-format';\nimport realf from '@stdlib/complex-realf';\nimport imagf from '@stdlib/complex-imagf';\nimport floor from '@stdlib/math-base-special-floor';\nimport reinterpret64 from '@stdlib/strided-base-reinterpret-complex64';\nimport reinterpret128 from '@stdlib/strided-base-reinterpret-complex128';\nimport getter from '@stdlib/array-base-getter';\nimport accessorGetter from '@stdlib/array-base-accessor-getter';\nimport fromIterator from './from_iterator.js';\nimport fromIteratorMap from './from_iterator_map.js';\nimport fromArray from './from_array.js';\n\n\n// VARIABLES //\n\nvar BYTES_PER_ELEMENT = Float32Array.BYTES_PER_ELEMENT * 2;\nvar HAS_ITERATOR_SYMBOL = hasIteratorSymbolSupport();\n\n\n// FUNCTIONS //\n\n/**\n* Returns a boolean indicating if a value is a complex typed array.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a complex typed array\n*/\nfunction isComplexArray( value ) {\n\treturn (\n\t\tvalue instanceof Complex64Array ||\n\t\t(\n\t\t\ttypeof value === 'object' &&\n\t\t\tvalue !== null &&\n\t\t\t(\n\t\t\t\tvalue.constructor.name === 'Complex64Array' ||\n\t\t\t\tvalue.constructor.name === 'Complex128Array'\n\t\t\t) &&\n\t\t\ttypeof value._length === 'number' && // eslint-disable-line no-underscore-dangle\n\n\t\t\t// NOTE: we don't perform a more rigorous test here for a typed array for performance reasons, as robustly checking for a typed array instance could require walking the prototype tree and performing relatively expensive constructor checks...\n\t\t\ttypeof value._buffer === 'object' // eslint-disable-line no-underscore-dangle\n\t\t)\n\t);\n}\n\n/**\n* Returns a boolean indicating if a value is a complex typed array constructor.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a complex typed array constructor\n*/\nfunction isComplexArrayConstructor( value ) {\n\treturn (\n\t\tvalue === Complex64Array ||\n\n\t\t// NOTE: weaker test in order to avoid a circular dependency with Complex128Array...\n\t\tvalue.name === 'Complex128Array'\n\t);\n}\n\n/**\n* Retrieves a complex number from a complex number array buffer.\n*\n* @private\n* @param {Float32Array} buf - array buffer\n* @param {NonNegativeInteger} idx - element index\n* @returns {Complex64} complex number\n*/\nfunction getComplex64( buf, idx ) {\n\tidx *= 2;\n\treturn new Complex64( buf[ idx ], buf[ idx+1 ] );\n}\n\n\n// MAIN //\n\n/**\n* 64-bit complex number array constructor.\n*\n* @constructor\n* @param {(NonNegativeInteger|Collection|ArrayBuffer|Iterable)} [arg] - length, typed array, array-like object, buffer, or an iterable\n* @param {NonNegativeInteger} [byteOffset=0] - byte offset\n* @param {NonNegativeInteger} [length] - view length\n* @throws {RangeError} ArrayBuffer byte length must be a multiple of `8`\n* @throws {RangeError} array-like object and typed array input arguments must have a length which is a multiple of two\n* @throws {TypeError} if provided only a single argument, must provide a valid argument\n* @throws {TypeError} byte offset must be a nonnegative integer\n* @throws {RangeError} byte offset must be a multiple of `8`\n* @throws {TypeError} view length must be a positive multiple of `8`\n* @throws {RangeError} must provide sufficient memory to accommodate byte offset and view length requirements\n* @throws {TypeError} an iterator must return either a two element array containing real and imaginary components or a complex number\n* @returns {Complex64Array} complex number array\n*\n* @example\n* var arr = new Complex64Array();\n* // returns \n*\n* var len = arr.length;\n* // returns 0\n*\n* @example\n* var arr = new Complex64Array( 2 );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*\n* @example\n* var arr = new Complex64Array( [ 1.0, -1.0 ] );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* import ArrayBuffer from '@stdlib/array-buffer';\n*\n* var buf = new ArrayBuffer( 16 );\n* var arr = new Complex64Array( buf );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*\n* @example\n* import ArrayBuffer from '@stdlib/array-buffer';\n*\n* var buf = new ArrayBuffer( 16 );\n* var arr = new Complex64Array( buf, 8 );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* import ArrayBuffer from '@stdlib/array-buffer';\n*\n* var buf = new ArrayBuffer( 32 );\n* var arr = new Complex64Array( buf, 8, 2 );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*/\nfunction Complex64Array() {\n\tvar byteOffset;\n\tvar nargs;\n\tvar buf;\n\tvar len;\n\n\tnargs = arguments.length;\n\tif ( !(this instanceof Complex64Array) ) {\n\t\tif ( nargs === 0 ) {\n\t\t\treturn new Complex64Array();\n\t\t}\n\t\tif ( nargs === 1 ) {\n\t\t\treturn new Complex64Array( arguments[0] );\n\t\t}\n\t\tif ( nargs === 2 ) {\n\t\t\treturn new Complex64Array( arguments[0], arguments[1] );\n\t\t}\n\t\treturn new Complex64Array( arguments[0], arguments[1], arguments[2] );\n\t}\n\t// Create the underlying data buffer...\n\tif ( nargs === 0 ) {\n\t\tbuf = new Float32Array( 0 ); // backward-compatibility\n\t} else if ( nargs === 1 ) {\n\t\tif ( isNonNegativeInteger( arguments[0] ) ) {\n\t\t\tbuf = new Float32Array( arguments[0]*2 );\n\t\t} else if ( isCollection( arguments[0] ) ) {\n\t\t\tbuf = arguments[ 0 ];\n\t\t\tlen = buf.length;\n\n\t\t\t// If provided a \"generic\" array, peak at the first value, and, if the value is a complex number, try to process as an array of complex numbers, falling back to \"normal\" typed array initialization if we fail and ensuring consistency if the first value had not been a complex number...\n\t\t\tif ( len && isArray( buf ) && isComplexLike( buf[0] ) ) {\n\t\t\t\tbuf = fromArray( new Float32Array( len*2 ), buf );\n\t\t\t\tif ( buf === null ) {\n\t\t\t\t\t// We failed and we are now forced to allocate a new array :-(\n\t\t\t\t\tif ( !isEven( len ) ) {\n\t\t\t\t\t\tthrow new RangeError( format( 'invalid argument. Array-like object arguments must have a length which is a multiple of two. Length: `%u`.', len ) );\n\t\t\t\t\t}\n\t\t\t\t\t// We failed, so fall back to directly setting values...\n\t\t\t\t\tbuf = new Float32Array( arguments[0] );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ( isComplex64Array( buf ) ) {\n\t\t\t\t\tbuf = reinterpret64( buf, 0 );\n\t\t\t\t} else if ( isComplex128Array( buf ) ) {\n\t\t\t\t\tbuf = reinterpret128( buf, 0 );\n\t\t\t\t} else if ( !isEven( len ) ) {\n\t\t\t\t\tthrow new RangeError( format( 'invalid argument. Array-like object and typed array arguments must have a length which is a multiple of two. Length: `%u`.', len ) );\n\t\t\t\t}\n\t\t\t\tbuf = new Float32Array( buf );\n\t\t\t}\n\t\t} else if ( isArrayBuffer( arguments[0] ) ) {\n\t\t\tbuf = arguments[ 0 ];\n\t\t\tif ( !isInteger( buf.byteLength/BYTES_PER_ELEMENT ) ) {\n\t\t\t\tthrow new RangeError( format( 'invalid argument. ArrayBuffer byte length must be a multiple of %u. Byte length: `%u`.', BYTES_PER_ELEMENT, buf.byteLength ) );\n\t\t\t}\n\t\t\tbuf = new Float32Array( buf );\n\t\t} else if ( isObject( arguments[0] ) ) {\n\t\t\tbuf = arguments[ 0 ];\n\t\t\tif ( HAS_ITERATOR_SYMBOL === false ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Environment lacks Symbol.iterator support. Must provide a length, ArrayBuffer, typed array, or array-like object. Value: `%s`.', buf ) );\n\t\t\t}\n\t\t\tif ( !isFunction( buf[ ITERATOR_SYMBOL ] ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.', buf ) );\n\t\t\t}\n\t\t\tbuf = buf[ ITERATOR_SYMBOL ]();\n\t\t\tif ( !isFunction( buf.next ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.', buf ) ); // FIXME: `buf` is what is returned from above, NOT the original value\n\t\t\t}\n\t\t\tbuf = fromIterator( buf );\n\t\t\tif ( buf instanceof Error ) {\n\t\t\t\tthrow buf;\n\t\t\t}\n\t\t\tbuf = new Float32Array( buf );\n\t\t} else {\n\t\t\tthrow new TypeError( format( 'invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.', arguments[0] ) );\n\t\t}\n\t} else {\n\t\tbuf = arguments[ 0 ];\n\t\tif ( !isArrayBuffer( buf ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. First argument must be an ArrayBuffer. Value: `%s`.', buf ) );\n\t\t}\n\t\tbyteOffset = arguments[ 1 ];\n\t\tif ( !isNonNegativeInteger( byteOffset ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Byte offset must be a nonnegative integer. Value: `%s`.', byteOffset ) );\n\t\t}\n\t\tif ( !isInteger( byteOffset/BYTES_PER_ELEMENT ) ) {\n\t\t\tthrow new RangeError( format( 'invalid argument. Byte offset must be a multiple of %u. Value: `%u`.', BYTES_PER_ELEMENT, byteOffset ) );\n\t\t}\n\t\tif ( nargs === 2 ) {\n\t\t\tlen = buf.byteLength - byteOffset;\n\t\t\tif ( !isInteger( len/BYTES_PER_ELEMENT ) ) {\n\t\t\t\tthrow new RangeError( format( 'invalid arguments. ArrayBuffer view byte length must be a multiple of %u. View byte length: `%u`.', BYTES_PER_ELEMENT, len ) );\n\t\t\t}\n\t\t\tbuf = new Float32Array( buf, byteOffset );\n\t\t} else {\n\t\t\tlen = arguments[ 2 ];\n\t\t\tif ( !isNonNegativeInteger( len ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Length must be a nonnegative integer. Value: `%s`.', len ) );\n\t\t\t}\n\t\t\tif ( (len*BYTES_PER_ELEMENT) > (buf.byteLength-byteOffset) ) {\n\t\t\t\tthrow new RangeError( format( 'invalid arguments. ArrayBuffer has insufficient capacity. Either decrease the array length or provide a bigger buffer. Minimum capacity: `%u`.', len*BYTES_PER_ELEMENT ) );\n\t\t\t}\n\t\t\tbuf = new Float32Array( buf, byteOffset, len*2 );\n\t\t}\n\t}\n\tsetReadOnly( this, '_buffer', buf );\n\tsetReadOnly( this, '_length', buf.length/2 );\n\n\treturn this;\n}\n\n/**\n* Size (in bytes) of each array element.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex64Array\n* @readonly\n* @type {PositiveInteger}\n* @default 8\n*\n* @example\n* var nbytes = Complex64Array.BYTES_PER_ELEMENT;\n* // returns 8\n*/\nsetReadOnly( Complex64Array, 'BYTES_PER_ELEMENT', BYTES_PER_ELEMENT );\n\n/**\n* Constructor name.\n*\n* @name name\n* @memberof Complex64Array\n* @readonly\n* @type {string}\n* @default 'Complex64Array'\n*\n* @example\n* var str = Complex64Array.name;\n* // returns 'Complex64Array'\n*/\nsetReadOnly( Complex64Array, 'name', 'Complex64Array' );\n\n/**\n* Creates a new 64-bit complex number array from an array-like object or an iterable.\n*\n* @name from\n* @memberof Complex64Array\n* @type {Function}\n* @param {(Collection|Iterable)} src - array-like object or iterable\n* @param {Function} [clbk] - callback to invoke for each source element\n* @param {*} [thisArg] - context\n* @throws {TypeError} `this` context must be a constructor\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be an array-like object or an iterable\n* @throws {TypeError} second argument must be a function\n* @throws {RangeError} array-like objects must have a length which is a multiple of two\n* @throws {TypeError} an iterator must return either a two element array containing real and imaginary components or a complex number\n* @throws {TypeError} when provided an iterator, a callback must return either a two element array containing real and imaginary components or a complex number\n* @returns {Complex64Array} 64-bit complex number array\n*\n* @example\n* var arr = Complex64Array.from( [ 1.0, -1.0 ] );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n*\n* var arr = Complex64Array.from( [ new Complex64( 1.0, 1.0 ) ] );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* function clbk( v ) {\n* return new Complex64( realf(v)*2.0, imagf(v)*2.0 );\n* }\n*\n* var arr = Complex64Array.from( [ new Complex64( 1.0, 1.0 ) ], clbk );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*/\nsetReadOnly( Complex64Array, 'from', function from( src ) {\n\tvar thisArg;\n\tvar nargs;\n\tvar clbk;\n\tvar out;\n\tvar buf;\n\tvar tmp;\n\tvar get;\n\tvar len;\n\tvar flg;\n\tvar v;\n\tvar i;\n\tvar j;\n\tif ( !isFunction( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` context must be a constructor.' );\n\t}\n\tif ( !isComplexArrayConstructor( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tnargs = arguments.length;\n\tif ( nargs > 1 ) {\n\t\tclbk = arguments[ 1 ];\n\t\tif ( !isFunction( clbk ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be a function. Value: `%s`.', clbk ) );\n\t\t}\n\t\tif ( nargs > 2 ) {\n\t\t\tthisArg = arguments[ 2 ];\n\t\t}\n\t}\n\tif ( isComplexArray( src ) ) {\n\t\tlen = src.length;\n\t\tif ( clbk ) {\n\t\t\tout = new this( len );\n\t\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\t\tj = 0;\n\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\tv = clbk.call( thisArg, src.get( i ), i );\n\t\t\t\tif ( isComplexLike( v ) ) {\n\t\t\t\t\tbuf[ j ] = realf( v );\n\t\t\t\t\tbuf[ j+1 ] = imagf( v );\n\t\t\t\t} else if ( isArrayLikeObject( v ) && v.length >= 2 ) {\n\t\t\t\t\tbuf[ j ] = v[ 0 ];\n\t\t\t\t\tbuf[ j+1 ] = v[ 1 ];\n\t\t\t\t} else {\n\t\t\t\t\tthrow new TypeError( format( 'invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', v ) );\n\t\t\t\t}\n\t\t\t\tj += 2; // stride\n\t\t\t}\n\t\t\treturn out;\n\t\t}\n\t\treturn new this( src );\n\t}\n\tif ( isCollection( src ) ) {\n\t\tif ( clbk ) {\n\t\t\t// Note: array contents affect how we iterate over a provided data source. If only complex number objects, we can extract real and imaginary components. Otherwise, for non-complex number arrays (e.g., `Float64Array`, etc), we assume a strided array where real and imaginary components are interleaved. In the former case, we expect a callback to return real and imaginary components (possibly as a complex number). In the latter case, we expect a callback to return *either* a real or imaginary component.\n\n\t\t\tlen = src.length;\n\t\t\tif ( src.get && src.set ) {\n\t\t\t\tget = accessorGetter( 'default' );\n\t\t\t} else {\n\t\t\t\tget = getter( 'default' );\n\t\t\t}\n\t\t\t// Detect whether we've been provided an array which returns complex number objects...\n\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\tif ( !isComplexLike( get( src, i ) ) ) {\n\t\t\t\t\tflg = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// If an array does not contain only complex number objects, then we assume interleaved real and imaginary components...\n\t\t\tif ( flg ) {\n\t\t\t\tif ( !isEven( len ) ) {\n\t\t\t\t\tthrow new RangeError( format( 'invalid argument. First argument must have a length which is a multiple of %u. Length: `%u`.', 2, len ) );\n\t\t\t\t}\n\t\t\t\tout = new this( len/2 );\n\t\t\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\t\tbuf[ i ] = clbk.call( thisArg, get( src, i ), i );\n\t\t\t\t}\n\t\t\t\treturn out;\n\t\t\t}\n\t\t\t// If an array contains only complex number objects, then we need to extract real and imaginary components...\n\t\t\tout = new this( len );\n\t\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\t\tj = 0;\n\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\tv = clbk.call( thisArg, get( src, i ), i );\n\t\t\t\tif ( isComplexLike( v ) ) {\n\t\t\t\t\tbuf[ j ] = realf( v );\n\t\t\t\t\tbuf[ j+1 ] = imagf( v );\n\t\t\t\t} else if ( isArrayLikeObject( v ) && v.length >= 2 ) {\n\t\t\t\t\tbuf[ j ] = v[ 0 ];\n\t\t\t\t\tbuf[ j+1 ] = v[ 1 ];\n\t\t\t\t} else {\n\t\t\t\t\tthrow new TypeError( format( 'invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', v ) );\n\t\t\t\t}\n\t\t\t\tj += 2; // stride\n\t\t\t}\n\t\t\treturn out;\n\t\t}\n\t\treturn new this( src );\n\t}\n\tif ( isObject( src ) && HAS_ITERATOR_SYMBOL && isFunction( src[ ITERATOR_SYMBOL ] ) ) { // eslint-disable-line max-len\n\t\tbuf = src[ ITERATOR_SYMBOL ]();\n\t\tif ( !isFunction( buf.next ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.', src ) );\n\t\t}\n\t\tif ( clbk ) {\n\t\t\ttmp = fromIteratorMap( buf, clbk, thisArg );\n\t\t} else {\n\t\t\ttmp = fromIterator( buf );\n\t\t}\n\t\tif ( tmp instanceof Error ) {\n\t\t\tthrow tmp;\n\t\t}\n\t\tlen = tmp.length / 2;\n\t\tout = new this( len );\n\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\tbuf[ i ] = tmp[ i ];\n\t\t}\n\t\treturn out;\n\t}\n\tthrow new TypeError( format( 'invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.', src ) );\n});\n\n/**\n* Creates a new 64-bit complex number array from a variable number of arguments.\n*\n* @name of\n* @memberof Complex64Array\n* @type {Function}\n* @param {...*} element - array elements\n* @throws {TypeError} `this` context must be a constructor\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Complex64Array} 64-bit complex number array\n*\n* @example\n* var arr = Complex64Array.of( 1.0, 1.0, 1.0, 1.0 );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*/\nsetReadOnly( Complex64Array, 'of', function of() {\n\tvar args;\n\tvar i;\n\tif ( !isFunction( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` context must be a constructor.' );\n\t}\n\tif ( !isComplexArrayConstructor( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\targs = [];\n\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\targs.push( arguments[ i ] );\n\t}\n\treturn new this( args );\n});\n\n/**\n* Returns an array element with support for both nonnegative and negative integer indices.\n*\n* @name at\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {integer} idx - element index\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} must provide an integer\n* @returns {(Complex64|void)} array element\n*\n* @example\n* var arr = new Complex64Array( 10 );\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* var z = arr.at( 0 );\n* // returns \n*\n* var re = realf( z );\n* // returns 0.0\n*\n* var im = imagf( z );\n* // returns 0.0\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 9.0, -9.0 ], 9 );\n*\n* z = arr.at( 0 );\n* // returns \n*\n* re = realf( z );\n* // returns 1.0\n*\n* im = imagf( z );\n* // returns -1.0\n*\n* z = arr.at( -1 );\n* // returns \n*\n* re = realf( z );\n* // returns 9.0\n*\n* im = imagf( z );\n* // returns -9.0\n*\n* z = arr.at( 100 );\n* // returns undefined\n*\n* z = arr.at( -100 );\n* // returns undefined\n*/\nsetReadOnly( Complex64Array.prototype, 'at', function at( idx ) {\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isInteger( idx ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Must provide an integer. Value: `%s`.', idx ) );\n\t}\n\tif ( idx < 0 ) {\n\t\tidx += this._length;\n\t}\n\tif ( idx < 0 || idx >= this._length ) {\n\t\treturn;\n\t}\n\treturn getComplex64( this._buffer, idx );\n});\n\n/**\n* Pointer to the underlying data buffer.\n*\n* @name buffer\n* @memberof Complex64Array.prototype\n* @readonly\n* @type {ArrayBuffer}\n*\n* @example\n* var arr = new Complex64Array( 10 );\n*\n* var buf = arr.buffer;\n* // returns \n*/\nsetReadOnlyAccessor( Complex64Array.prototype, 'buffer', function get() {\n\treturn this._buffer.buffer;\n});\n\n/**\n* Size (in bytes) of the array.\n*\n* @name byteLength\n* @memberof Complex64Array.prototype\n* @readonly\n* @type {NonNegativeInteger}\n*\n* @example\n* var arr = new Complex64Array( 10 );\n*\n* var byteLength = arr.byteLength;\n* // returns 80\n*/\nsetReadOnlyAccessor( Complex64Array.prototype, 'byteLength', function get() {\n\treturn this._buffer.byteLength;\n});\n\n/**\n* Offset (in bytes) of the array from the start of its underlying `ArrayBuffer`.\n*\n* @name byteOffset\n* @memberof Complex64Array.prototype\n* @readonly\n* @type {NonNegativeInteger}\n*\n* @example\n* var arr = new Complex64Array( 10 );\n*\n* var byteOffset = arr.byteOffset;\n* // returns 0\n*/\nsetReadOnlyAccessor( Complex64Array.prototype, 'byteOffset', function get() {\n\treturn this._buffer.byteOffset;\n});\n\n/**\n* Size (in bytes) of each array element.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex64Array.prototype\n* @readonly\n* @type {PositiveInteger}\n* @default 8\n*\n* @example\n* var arr = new Complex64Array( 10 );\n*\n* var nbytes = arr.BYTES_PER_ELEMENT;\n* // returns 8\n*/\nsetReadOnly( Complex64Array.prototype, 'BYTES_PER_ELEMENT', Complex64Array.BYTES_PER_ELEMENT );\n\n/**\n* Copies a sequence of elements within the array to the position starting at `target`.\n*\n* @name copyWithin\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {integer} target - index at which to start copying elements\n* @param {integer} start - source index at which to copy elements from\n* @param {integer} [end] - source index at which to stop copying elements from\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Complex64Array} modified array\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* var arr = new Complex64Array( 4 );\n*\n* // Set the array elements:\n* arr.set( new Complex64( 1.0, 1.0 ), 0 );\n* arr.set( new Complex64( 2.0, 2.0 ), 1 );\n* arr.set( new Complex64( 3.0, 3.0 ), 2 );\n* arr.set( new Complex64( 4.0, 4.0 ), 3 );\n*\n* // Copy the first two elements to the last two elements:\n* arr.copyWithin( 2, 0, 2 );\n*\n* // Get the last array element:\n* var z = arr.get( 3 );\n*\n* var re = realf( z );\n* // returns 2.0\n*\n* var im = imagf( z );\n* // returns 2.0\n*/\nsetReadOnly( Complex64Array.prototype, 'copyWithin', function copyWithin( target, start ) {\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\t// FIXME: prefer a functional `copyWithin` implementation which addresses lack of universal browser support (e.g., IE11 and Safari) or ensure that typed arrays are polyfilled\n\tif ( arguments.length === 2 ) {\n\t\tthis._buffer.copyWithin( target*2, start*2 );\n\t} else {\n\t\tthis._buffer.copyWithin( target*2, start*2, arguments[2]*2 );\n\t}\n\treturn this;\n});\n\n/**\n* Returns an iterator for iterating over array key-value pairs.\n*\n* @name entries\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Iterator} iterator\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n*\n* var arr = [\n* new Complex64( 1.0, 1.0 ),\n* new Complex64( 2.0, 2.0 ),\n* new Complex64( 3.0, 3.0 )\n* ];\n* arr = new Complex64Array( arr );\n*\n* // Create an iterator:\n* var it = arr.entries();\n*\n* // Iterate over the key-value pairs...\n* var v = it.next().value;\n* // returns [ 0, ]\n*\n* v = it.next().value;\n* // returns [ 1, ]\n*\n* v = it.next().value;\n* // returns [ 2, ]\n*\n* var bool = it.next().done;\n* // returns true\n*/\nsetReadOnly( Complex64Array.prototype, 'entries', function entries() {\n\tvar buffer;\n\tvar self;\n\tvar iter;\n\tvar len;\n\tvar FLG;\n\tvar i;\n\tvar j;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tself = this;\n\tbuffer = this._buffer;\n\tlen = this._length;\n\n\t// Initialize the iteration indices:\n\ti = -1;\n\tj = -2;\n\n\t// Create an iterator protocol-compliant object:\n\titer = {};\n\tsetReadOnly( iter, 'next', next );\n\tsetReadOnly( iter, 'return', end );\n\n\tif ( ITERATOR_SYMBOL ) {\n\t\tsetReadOnly( iter, ITERATOR_SYMBOL, factory );\n\t}\n\treturn iter;\n\n\t/**\n\t* Returns an iterator protocol-compliant object containing the next iterated value.\n\t*\n\t* @private\n\t* @returns {Object} iterator protocol-compliant object\n\t*/\n\tfunction next() {\n\t\tvar z;\n\t\ti += 1;\n\t\tif ( FLG || i >= len ) {\n\t\t\treturn {\n\t\t\t\t'done': true\n\t\t\t};\n\t\t}\n\t\tj += 2;\n\t\tz = new Complex64( buffer[ j ], buffer[ j+1 ] );\n\t\treturn {\n\t\t\t'value': [ i, z ],\n\t\t\t'done': false\n\t\t};\n\t}\n\n\t/**\n\t* Finishes an iterator.\n\t*\n\t* @private\n\t* @param {*} [value] - value to return\n\t* @returns {Object} iterator protocol-compliant object\n\t*/\n\tfunction end( value ) {\n\t\tFLG = true;\n\t\tif ( arguments.length ) {\n\t\t\treturn {\n\t\t\t\t'value': value,\n\t\t\t\t'done': true\n\t\t\t};\n\t\t}\n\t\treturn {\n\t\t\t'done': true\n\t\t};\n\t}\n\n\t/**\n\t* Returns a new iterator.\n\t*\n\t* @private\n\t* @returns {Iterator} iterator\n\t*/\n\tfunction factory() {\n\t\treturn self.entries();\n\t}\n});\n\n/**\n* Tests whether all elements in an array pass a test implemented by a predicate function.\n*\n* @name every\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {boolean} boolean indicating whether all elements pass a test\n*\n* @example\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* function predicate( v ) {\n* return ( realf( v ) === imagf( v ) );\n* }\n*\n* var arr = new Complex64Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var bool = arr.every( predicate );\n* // returns true\n*/\nsetReadOnly( Complex64Array.prototype, 'every', function every( predicate, thisArg ) {\n\tvar buf;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tif ( !predicate.call( thisArg, getComplex64( buf, i ), i, this ) ) {\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn true;\n});\n\n/**\n* Returns a modified typed array filled with a fill value.\n*\n* @name fill\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {ComplexLike} value - fill value\n* @param {integer} [start=0] - starting index (inclusive)\n* @param {integer} [end] - ending index (exclusive)\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a complex number\n* @throws {TypeError} second argument must be an integer\n* @throws {TypeError} third argument must be an integer\n*\n* @example\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* var arr = new Complex64Array( 3 );\n*\n* arr.fill( new Complex64( 1.0, 1.0 ), 1 );\n*\n* var z = arr.get( 1 );\n* // returns \n*\n* var re = realf( z );\n* // returns 1.0\n*\n* var im = imagf( z );\n* // returns 1.0\n*\n* z = arr.get( 1 );\n* // returns \n*\n* re = realf( z );\n* // returns 1.0\n*\n* im = imagf( z );\n* // returns 1.0\n*/\nsetReadOnly( Complex64Array.prototype, 'fill', function fill( value, start, end ) {\n\tvar buf;\n\tvar len;\n\tvar idx;\n\tvar re;\n\tvar im;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isComplexLike( value ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a complex number. Value: `%s`.', value ) );\n\t}\n\tbuf = this._buffer;\n\tlen = this._length;\n\tif ( arguments.length > 1 ) {\n\t\tif ( !isInteger( start ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be an integer. Value: `%s`.', start ) );\n\t\t}\n\t\tif ( start < 0 ) {\n\t\t\tstart += len;\n\t\t\tif ( start < 0 ) {\n\t\t\t\tstart = 0;\n\t\t\t}\n\t\t}\n\t\tif ( arguments.length > 2 ) {\n\t\t\tif ( !isInteger( end ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Third argument must be an integer. Value: `%s`.', end ) );\n\t\t\t}\n\t\t\tif ( end < 0 ) {\n\t\t\t\tend += len;\n\t\t\t\tif ( end < 0 ) {\n\t\t\t\t\tend = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( end > len ) {\n\t\t\t\tend = len;\n\t\t\t}\n\t\t} else {\n\t\t\tend = len;\n\t\t}\n\t} else {\n\t\tstart = 0;\n\t\tend = len;\n\t}\n\tre = realf( value );\n\tim = imagf( value );\n\tfor ( i = start; i < end; i++ ) {\n\t\tidx = 2*i;\n\t\tbuf[ idx ] = re;\n\t\tbuf[ idx+1 ] = im;\n\t}\n\treturn this;\n});\n\n/**\n* Returns a new array containing the elements of an array which pass a test implemented by a predicate function.\n*\n* @name filter\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {Complex64Array} complex number array\n*\n* @example\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* function predicate( v ) {\n* return ( realf( v ) === imagf( v ) );\n* }\n*\n* var arr = new Complex64Array( 3 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n*\n* var out = arr.filter( predicate );\n* // returns \n*\n* var len = out.length;\n* // returns 1\n*\n* var z = out.get( 0 );\n* // returns \n*\n* var re = realf( z );\n* // returns 2.0\n*\n* var im = imagf( z );\n* // returns 2.0\n*/\nsetReadOnly( Complex64Array.prototype, 'filter', function filter( predicate, thisArg ) {\n\tvar buf;\n\tvar out;\n\tvar i;\n\tvar z;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tout = [];\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tz = getComplex64( buf, i );\n\t\tif ( predicate.call( thisArg, z, i, this ) ) {\n\t\t\tout.push( z );\n\t\t}\n\t}\n\treturn new this.constructor( out );\n});\n\n/**\n* Returns the first element in an array for which a predicate function returns a truthy value.\n*\n* @name find\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {(Complex64|void)} array element or undefined\n*\n* @example\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n* import Complex64 from '@stdlib/complex-float32';\n*\n* function predicate( v ) {\n* return ( realf( v ) === imagf( v ) );\n* }\n*\n* var arr = new Complex64Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var z = arr.find( predicate );\n* // returns \n*\n* var re = realf( z );\n* // returns 1.0\n*\n* var im = imagf( z );\n* // returns 1.0\n*/\nsetReadOnly( Complex64Array.prototype, 'find', function find( predicate, thisArg ) {\n\tvar buf;\n\tvar i;\n\tvar z;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tz = getComplex64( buf, i );\n\t\tif ( predicate.call( thisArg, z, i, this ) ) {\n\t\t\treturn z;\n\t\t}\n\t}\n});\n\n/**\n* Returns the index of the first element in an array for which a predicate function returns a truthy value.\n*\n* @name findIndex\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {integer} index or -1\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* function predicate( v ) {\n* return ( realf( v ) === imagf( v ) );\n* }\n*\n* var arr = new Complex64Array( 3 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var idx = arr.findIndex( predicate );\n* // returns 2\n*/\nsetReadOnly( Complex64Array.prototype, 'findIndex', function findIndex( predicate, thisArg ) {\n\tvar buf;\n\tvar i;\n\tvar z;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tz = getComplex64( buf, i );\n\t\tif ( predicate.call( thisArg, z, i, this ) ) {\n\t\t\treturn i;\n\t\t}\n\t}\n\treturn -1;\n});\n\n/**\n* Returns the last element in an array for which a predicate function returns a truthy value.\n*\n* @name findLast\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {(Complex64|void)} array element or undefined\n*\n* @example\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n* import Complex64 from '@stdlib/complex-float32';\n*\n* function predicate( v ) {\n* return ( realf( v ) === imagf( v ) );\n* }\n*\n* var arr = new Complex64Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var z = arr.findLast( predicate );\n* // returns \n*\n* var re = realf( z );\n* // returns 3.0\n*\n* var im = imagf( z );\n* // returns 3.0\n*/\nsetReadOnly( Complex64Array.prototype, 'findLast', function findLast( predicate, thisArg ) {\n\tvar buf;\n\tvar i;\n\tvar z;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = this._length-1; i >= 0; i-- ) {\n\t\tz = getComplex64( buf, i );\n\t\tif ( predicate.call( thisArg, z, i, this ) ) {\n\t\t\treturn z;\n\t\t}\n\t}\n});\n\n/**\n* Returns the index of the last element in an array for which a predicate function returns a truthy value.\n*\n* @name findLastIndex\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {integer} index or -1\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* function predicate( v ) {\n* return ( realf( v ) === imagf( v ) );\n* }\n*\n* var arr = new Complex64Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n*\n* var idx = arr.findLastIndex( predicate );\n* // returns 1\n*/\nsetReadOnly( Complex64Array.prototype, 'findLastIndex', function findLastIndex( predicate, thisArg ) {\n\tvar buf;\n\tvar i;\n\tvar z;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = this._length-1; i >= 0; i-- ) {\n\t\tz = getComplex64( buf, i );\n\t\tif ( predicate.call( thisArg, z, i, this ) ) {\n\t\t\treturn i;\n\t\t}\n\t}\n\treturn -1;\n});\n\n/**\n* Invokes a function once for each array element.\n*\n* @name forEach\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {Function} fcn - function to invoke\n* @param {*} [thisArg] - function invocation context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n*\n* function log( v, i ) {\n* console.log( '%s: %s', i, v.toString() );\n* }\n*\n* var arr = new Complex64Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* arr.forEach( log );\n*/\nsetReadOnly( Complex64Array.prototype, 'forEach', function forEach( fcn, thisArg ) {\n\tvar buf;\n\tvar i;\n\tvar z;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( fcn ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', fcn ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tz = getComplex64( buf, i );\n\t\tfcn.call( thisArg, z, i, this );\n\t}\n});\n\n/**\n* Returns an array element.\n*\n* @name get\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {NonNegativeInteger} idx - element index\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} must provide a nonnegative integer\n* @returns {(Complex64|void)} array element\n*\n* @example\n* var arr = new Complex64Array( 10 );\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* var z = arr.get( 0 );\n* // returns \n*\n* var re = realf( z );\n* // returns 0.0\n*\n* var im = imagf( z );\n* // returns 0.0\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n*\n* z = arr.get( 0 );\n* // returns \n*\n* re = realf( z );\n* // returns 1.0\n*\n* im = imagf( z );\n* // returns -1.0\n*\n* z = arr.get( 100 );\n* // returns undefined\n*/\nsetReadOnly( Complex64Array.prototype, 'get', function get( idx ) {\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isNonNegativeInteger( idx ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Must provide a nonnegative integer. Value: `%s`.', idx ) );\n\t}\n\tif ( idx >= this._length ) {\n\t\treturn;\n\t}\n\treturn getComplex64( this._buffer, idx );\n});\n\n/**\n* Returns a boolean indicating whether an array includes a provided value.\n*\n* @name includes\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {ComplexLike} searchElement - search element\n* @param {integer} [fromIndex=0] - starting index (inclusive)\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a complex number\n* @throws {TypeError} second argument must be an integer\n* @returns {boolean} boolean indicating whether an array includes a provided value\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n*\n* var arr = new Complex64Array( 5 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n* arr.set( [ 4.0, -4.0 ], 3 );\n* arr.set( [ 5.0, -5.0 ], 4 );\n*\n* var bool = arr.includes( new Complex64( 3.0, -3.0 ) );\n* // returns true\n*\n* bool = arr.includes( new Complex64( 3.0, -3.0 ), 3 );\n* // returns false\n*\n* bool = arr.includes( new Complex64( 4.0, -4.0 ), -3 );\n* // returns true\n*/\nsetReadOnly( Complex64Array.prototype, 'includes', function includes( searchElement, fromIndex ) {\n\tvar buf;\n\tvar idx;\n\tvar re;\n\tvar im;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isComplexLike( searchElement ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a complex number. Value: `%s`.', searchElement ) );\n\t}\n\tif ( arguments.length > 1 ) {\n\t\tif ( !isInteger( fromIndex ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be an integer. Value: `%s`.', fromIndex ) );\n\t\t}\n\t\tif ( fromIndex < 0 ) {\n\t\t\tfromIndex += this._length;\n\t\t\tif ( fromIndex < 0 ) {\n\t\t\t\tfromIndex = 0;\n\t\t\t}\n\t\t}\n\t} else {\n\t\tfromIndex = 0;\n\t}\n\tre = realf( searchElement );\n\tim = imagf( searchElement );\n\tbuf = this._buffer;\n\tfor ( i = fromIndex; i < this._length; i++ ) {\n\t\tidx = 2 * i;\n\t\tif ( re === buf[ idx ] && im === buf[ idx+1 ] ) {\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n});\n\n/**\n* Returns the first index at which a given element can be found.\n*\n* @name indexOf\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {ComplexLike} searchElement - element to find\n* @param {integer} [fromIndex=0] - starting index (inclusive)\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a complex number\n* @throws {TypeError} second argument must be an integer\n* @returns {integer} index or -1\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n*\n* var arr = new Complex64Array( 10 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n* arr.set( [ 4.0, -4.0 ], 3 );\n* arr.set( [ 5.0, -5.0 ], 4 );\n*\n* var idx = arr.indexOf( new Complex64( 3.0, -3.0 ) );\n* // returns 2\n*\n* idx = arr.indexOf( new Complex64( 3.0, -3.0 ), 3 );\n* // returns -1\n*\n* idx = arr.indexOf( new Complex64( 4.0, -4.0 ), -3 );\n* // returns -1\n*/\nsetReadOnly( Complex64Array.prototype, 'indexOf', function indexOf( searchElement, fromIndex ) {\n\tvar buf;\n\tvar idx;\n\tvar re;\n\tvar im;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isComplexLike( searchElement ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a complex number. Value: `%s`.', searchElement ) );\n\t}\n\tif ( arguments.length > 1 ) {\n\t\tif ( !isInteger( fromIndex ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be an integer. Value: `%s`.', fromIndex ) );\n\t\t}\n\t\tif ( fromIndex < 0 ) {\n\t\t\tfromIndex += this._length;\n\t\t\tif ( fromIndex < 0 ) {\n\t\t\t\tfromIndex = 0;\n\t\t\t}\n\t\t}\n\t} else {\n\t\tfromIndex = 0;\n\t}\n\tre = realf( searchElement );\n\tim = imagf( searchElement );\n\tbuf = this._buffer;\n\tfor ( i = fromIndex; i < this._length; i++ ) {\n\t\tidx = 2 * i;\n\t\tif ( re === buf[ idx ] && im === buf[ idx+1 ] ) {\n\t\t\treturn i;\n\t\t}\n\t}\n\treturn -1;\n});\n\n/**\n* Returns a new string by concatenating all array elements.\n*\n* @name join\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {string} [separator=','] - element separator\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a string\n* @returns {string} string representation\n*\n* @example\n* var arr = new Complex64Array( 2 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n*\n* var str = arr.join();\n* // returns '1 + 1i,2 + 2i'\n*\n* str = arr.join( '/' );\n* // returns '1 + 1i/2 + 2i'\n*/\nsetReadOnly( Complex64Array.prototype, 'join', function join( separator ) {\n\tvar out;\n\tvar buf;\n\tvar sep;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( arguments.length === 0 ) {\n\t\tsep = ',';\n\t} else if ( isString( separator ) ) {\n\t\tsep = separator;\n\t} else {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a string. Value: `%s`.', separator ) );\n\t}\n\tout = [];\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tout.push( getComplex64( buf, i ).toString() );\n\t}\n\treturn out.join( sep );\n});\n\n/**\n* Returns the last index at which a given element can be found.\n*\n* @name lastIndexOf\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {ComplexLike} searchElement - element to find\n* @param {integer} [fromIndex] - index at which to start searching backward (inclusive)\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a complex number\n* @throws {TypeError} second argument must be an integer\n* @returns {integer} index or -1\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n*\n* var arr = new Complex64Array( 5 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n* arr.set( [ 4.0, -4.0 ], 3 );\n* arr.set( [ 3.0, -3.0 ], 4 );\n*\n* var idx = arr.lastIndexOf( new Complex64( 3.0, -3.0 ) );\n* // returns 4\n*\n* idx = arr.lastIndexOf( new Complex64( 3.0, -3.0 ), 3 );\n* // returns 2\n*\n* idx = arr.lastIndexOf( new Complex64( 5.0, -5.0 ), 3 );\n* // returns -1\n*\n* idx = arr.lastIndexOf( new Complex64( 2.0, -2.0 ), -3 );\n* // returns 1\n*/\nsetReadOnly( Complex64Array.prototype, 'lastIndexOf', function lastIndexOf( searchElement, fromIndex ) {\n\tvar buf;\n\tvar idx;\n\tvar re;\n\tvar im;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isComplexLike( searchElement ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a complex number. Value: `%s`.', searchElement ) );\n\t}\n\tif ( arguments.length > 1 ) {\n\t\tif ( !isInteger( fromIndex ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be an integer. Value: `%s`.', fromIndex ) );\n\t\t}\n\t\tif ( fromIndex >= this._length ) {\n\t\t\tfromIndex = this._length - 1;\n\t\t} else if ( fromIndex < 0 ) {\n\t\t\tfromIndex += this._length;\n\t\t}\n\t} else {\n\t\tfromIndex = this._length - 1;\n\t}\n\tre = realf( searchElement );\n\tim = imagf( searchElement );\n\tbuf = this._buffer;\n\tfor ( i = fromIndex; i >= 0; i-- ) {\n\t\tidx = 2 * i;\n\t\tif ( re === buf[ idx ] && im === buf[ idx+1 ] ) {\n\t\t\treturn i;\n\t\t}\n\t}\n\treturn -1;\n});\n\n/**\n* Number of array elements.\n*\n* @name length\n* @memberof Complex64Array.prototype\n* @readonly\n* @type {NonNegativeInteger}\n*\n* @example\n* var arr = new Complex64Array( 10 );\n*\n* var len = arr.length;\n* // returns 10\n*/\nsetReadOnlyAccessor( Complex64Array.prototype, 'length', function get() {\n\treturn this._length;\n});\n\n/**\n* Returns a new array with each element being the result of a provided callback function.\n*\n* @name map\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {Function} fcn - callback function\n* @param {*} [thisArg] - callback function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {Complex64Array} complex number array\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* function scale( v, i ) {\n* return new Complex64( 2.0*realf( v ), 2.0*imagf( v ) );\n* }\n*\n* var arr = new Complex64Array( 3 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n*\n* var out = arr.map( scale );\n* // returns \n*\n* var z = out.get( 0 );\n* // returns \n*\n* var re = realf( z );\n* // returns 2\n*\n* var im = imagf( z );\n* // returns -2\n*/\nsetReadOnly( Complex64Array.prototype, 'map', function map( fcn, thisArg ) {\n\tvar outbuf;\n\tvar buf;\n\tvar out;\n\tvar i;\n\tvar v;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( fcn ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', fcn ) );\n\t}\n\tbuf = this._buffer;\n\tout = new this.constructor( this._length );\n\toutbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tv = fcn.call( thisArg, getComplex64( buf, i ), i, this );\n\t\tif ( isComplexLike( v ) ) {\n\t\t\toutbuf[ 2*i ] = realf( v );\n\t\t\toutbuf[ (2*i)+1 ] = imagf( v );\n\t\t} else if ( isArrayLikeObject( v ) && v.length === 2 ) {\n\t\t\toutbuf[ 2*i ] = v[ 0 ];\n\t\t\toutbuf[ (2*i)+1 ] = v[ 1 ];\n\t\t} else {\n\t\t\tthrow new TypeError( format( 'invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', v ) );\n\t\t}\n\t}\n\treturn out;\n});\n\n/**\n* Applies a provided callback function to each element of the array, in order, passing in the return value from the calculation on the preceding element and returning the accumulated result upon completion.\n*\n* @name reduce\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {Function} reducer - callback function\n* @param {*} [initialValue] - initial value\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @throws {Error} if not provided an initial value, the array must have at least one element\n* @returns {*} accumulated result\n*\n* @example\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n* import caddf from '@stdlib/math-base-ops-caddf';\n*\n* var arr = new Complex64Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var z = arr.reduce( caddf );\n* // returns \n*\n* var re = realf( z );\n* // returns 6.0\n*\n* var im = imagf( z );\n* // returns 6.0\n*/\nsetReadOnly( Complex64Array.prototype, 'reduce', function reduce( reducer, initialValue ) {\n\tvar buf;\n\tvar acc;\n\tvar len;\n\tvar v;\n\tvar i;\n\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( reducer ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', reducer ) );\n\t}\n\tbuf = this._buffer;\n\tlen = this._length;\n\tif ( arguments.length > 1 ) {\n\t\tacc = initialValue;\n\t\ti = 0;\n\t} else {\n\t\tif ( len === 0 ) {\n\t\t\tthrow new Error( 'invalid operation. If not provided an initial value, an array must contain at least one element.' );\n\t\t}\n\t\tacc = getComplex64( buf, 0 );\n\t\ti = 1;\n\t}\n\tfor ( ; i < len; i++ ) {\n\t\tv = getComplex64( buf, i );\n\t\tacc = reducer( acc, v, i, this );\n\t}\n\treturn acc;\n});\n\n/**\n* Reverses an array in-place.\n*\n* @name reverse\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Complex64Array} reversed array\n*\n* @example\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* var arr = new Complex64Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var out = arr.reverse();\n* // returns \n*\n* var z = out.get( 0 );\n* // returns \n*\n* var re = realf( z );\n* // returns 3.0\n*\n* var im = imagf( z );\n* // returns 3.0\n*\n* z = out.get( 1 );\n* // returns \n*\n* re = realf( z );\n* // returns 2.0\n*\n* im = imagf( z );\n* // returns 2.0\n*\n* z = out.get( 2 );\n* // returns \n*\n* re = realf( z );\n* // returns 1.0\n*\n* im = imagf( z );\n* // returns 1.0\n*/\nsetReadOnly( Complex64Array.prototype, 'reverse', function reverse() {\n\tvar buf;\n\tvar tmp;\n\tvar len;\n\tvar N;\n\tvar i;\n\tvar j;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tlen = this._length;\n\tbuf = this._buffer;\n\tN = floor( len / 2 );\n\tfor ( i = 0; i < N; i++ ) {\n\t\tj = len - i - 1;\n\t\ttmp = buf[ (2*i) ];\n\t\tbuf[ (2*i) ] = buf[ (2*j) ];\n\t\tbuf[ (2*j) ] = tmp;\n\t\ttmp = buf[ (2*i)+1 ];\n\t\tbuf[ (2*i)+1 ] = buf[ (2*j)+1 ];\n\t\tbuf[ (2*j)+1 ] = tmp;\n\t}\n\treturn this;\n});\n\n/**\n* Sets an array element.\n*\n* ## Notes\n*\n* - When provided a typed array, real or complex, we must check whether the source array shares the same buffer as the target array and whether the underlying memory overlaps. In particular, we are concerned with the following scenario:\n*\n* ```text\n* buf: ---------------------\n* src: ---------------------\n* ```\n*\n* In the above, as we copy values from `src`, we will overwrite values in the `src` view, resulting in duplicated values copied into the end of `buf`, which is not intended. Hence, to avoid overwriting source values, we must **copy** source values to a temporary array.\n*\n* In the other overlapping scenario,\n*\n* ```text\n* buf: ---------------------\n* src: ---------------------\n* ```\n*\n* by the time we begin copying into the overlapping region, we are copying from the end of `src`, a non-overlapping region, which means we don't run the risk of copying copied values, rather than the original `src` values, as intended.\n*\n* @name set\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {(Collection|Complex|ComplexArray)} value - value(s)\n* @param {NonNegativeInteger} [i=0] - element index at which to start writing values\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be either a complex number, an array-like object, or a complex number array\n* @throws {TypeError} index argument must be a nonnegative integer\n* @throws {RangeError} array-like objects must have a length which is a multiple of two\n* @throws {RangeError} index argument is out-of-bounds\n* @throws {RangeError} target array lacks sufficient storage to accommodate source values\n* @returns {void}\n*\n* @example\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* var arr = new Complex64Array( 10 );\n*\n* var z = arr.get( 0 );\n* // returns \n*\n* var re = realf( z );\n* // returns 0.0\n*\n* var im = imagf( z );\n* // returns 0.0\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n*\n* z = arr.get( 0 );\n* // returns \n*\n* re = realf( z );\n* // returns 1.0\n*\n* im = imagf( z );\n* // returns -1.0\n*/\nsetReadOnly( Complex64Array.prototype, 'set', function set( value ) {\n\t/* eslint-disable no-underscore-dangle */\n\tvar sbuf;\n\tvar idx;\n\tvar buf;\n\tvar tmp;\n\tvar flg;\n\tvar N;\n\tvar v;\n\tvar i;\n\tvar j;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tbuf = this._buffer;\n\tif ( arguments.length > 1 ) {\n\t\tidx = arguments[ 1 ];\n\t\tif ( !isNonNegativeInteger( idx ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Index argument must be a nonnegative integer. Value: `%s`.', idx ) );\n\t\t}\n\t} else {\n\t\tidx = 0;\n\t}\n\tif ( isComplexLike( value ) ) {\n\t\tif ( idx >= this._length ) {\n\t\t\tthrow new RangeError( format( 'invalid argument. Index argument is out-of-bounds. Value: `%u`.', idx ) );\n\t\t}\n\t\tidx *= 2;\n\t\tbuf[ idx ] = realf( value );\n\t\tbuf[ idx+1 ] = imagf( value );\n\t\treturn;\n\t}\n\tif ( isComplexArray( value ) ) {\n\t\tN = value._length;\n\t\tif ( idx+N > this._length ) {\n\t\t\tthrow new RangeError( 'invalid arguments. Target array lacks sufficient storage to accommodate source values.' );\n\t\t}\n\t\tsbuf = value._buffer;\n\n\t\t// Check for overlapping memory...\n\t\tj = buf.byteOffset + (idx*BYTES_PER_ELEMENT);\n\t\tif (\n\t\t\tsbuf.buffer === buf.buffer &&\n\t\t\t(\n\t\t\t\tsbuf.byteOffset < j &&\n\t\t\t\tsbuf.byteOffset+sbuf.byteLength > j\n\t\t\t)\n\t\t) {\n\t\t\t// We need to copy source values...\n\t\t\ttmp = new Float32Array( sbuf.length );\n\t\t\tfor ( i = 0; i < sbuf.length; i++ ) {\n\t\t\t\ttmp[ i ] = sbuf[ i ];\n\t\t\t}\n\t\t\tsbuf = tmp;\n\t\t}\n\t\tidx *= 2;\n\t\tj = 0;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\tbuf[ idx ] = sbuf[ j ];\n\t\t\tbuf[ idx+1 ] = sbuf[ j+1 ];\n\t\t\tidx += 2; // stride\n\t\t\tj += 2; // stride\n\t\t}\n\t\treturn;\n\t}\n\tif ( isCollection( value ) ) {\n\t\t// Detect whether we've been provided an array of complex numbers...\n\t\tN = value.length;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\tif ( !isComplexLike( value[ i ] ) ) {\n\t\t\t\tflg = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t// If an array does not contain only complex numbers, then we assume interleaved real and imaginary components...\n\t\tif ( flg ) {\n\t\t\tif ( !isEven( N ) ) {\n\t\t\t\tthrow new RangeError( format( 'invalid argument. Array-like object arguments must have a length which is a multiple of two. Length: `%u`.', N ) );\n\t\t\t}\n\t\t\tif ( idx+(N/2) > this._length ) {\n\t\t\t\tthrow new RangeError( 'invalid arguments. Target array lacks sufficient storage to accommodate source values.' );\n\t\t\t}\n\t\t\tsbuf = value;\n\n\t\t\t// Check for overlapping memory...\n\t\t\tj = buf.byteOffset + (idx*BYTES_PER_ELEMENT);\n\t\t\tif (\n\t\t\t\tsbuf.buffer === buf.buffer &&\n\t\t\t\t(\n\t\t\t\t\tsbuf.byteOffset < j &&\n\t\t\t\t\tsbuf.byteOffset+sbuf.byteLength > j\n\t\t\t\t)\n\t\t\t) {\n\t\t\t\t// We need to copy source values...\n\t\t\t\ttmp = new Float32Array( N );\n\t\t\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\t\t\ttmp[ i ] = sbuf[ i ]; // TODO: handle accessor arrays\n\t\t\t\t}\n\t\t\t\tsbuf = tmp;\n\t\t\t}\n\t\t\tidx *= 2;\n\t\t\tN /= 2;\n\t\t\tj = 0;\n\t\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\t\tbuf[ idx ] = sbuf[ j ];\n\t\t\t\tbuf[ idx+1 ] = sbuf[ j+1 ];\n\t\t\t\tidx += 2; // stride\n\t\t\t\tj += 2; // stride\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\t// If an array contains only complex numbers, then we need to extract real and imaginary components...\n\t\tif ( idx+N > this._length ) {\n\t\t\tthrow new RangeError( 'invalid arguments. Target array lacks sufficient storage to accommodate source values.' );\n\t\t}\n\t\tidx *= 2;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\tv = value[ i ];\n\t\t\tbuf[ idx ] = realf( v );\n\t\t\tbuf[ idx+1 ] = imagf( v );\n\t\t\tidx += 2; // stride\n\t\t}\n\t\treturn;\n\t}\n\tthrow new TypeError( format( 'invalid argument. First argument must be either a complex number, an array-like object, or a complex number array. Value: `%s`.', value ) );\n\n\t/* eslint-enable no-underscore-dangle */\n});\n\n/**\n* Copies a portion of a typed array to a new typed array.\n*\n* @name slice\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {integer} [start=0] - starting index (inclusive)\n* @param {integer} [end] - ending index (exclusive)\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be an integer\n* @throws {TypeError} second argument must be an integer\n* @returns {Complex64Array} complex number array\n*\n* @example\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* var arr = new Complex64Array( 5 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n* arr.set( [ 4.0, -4.0 ], 3 );\n* arr.set( [ 5.0, -5.0 ], 4 );\n*\n* var out = arr.slice();\n* // returns \n*\n* var len = out.length;\n* // returns 5\n*\n* var z = out.get( 0 );\n* // returns \n*\n* var re = realf( z );\n* // returns 1.0\n*\n* var im = imagf( z );\n* // returns -1.0\n*\n* z = out.get( len-1 );\n* // returns \n*\n* re = realf( z );\n* // returns 5.0\n*\n* im = imagf( z );\n* // returns -5.0\n*\n* out = arr.slice( 1, -2 );\n* // returns \n*\n* len = out.length;\n* // returns 2\n*\n* z = out.get( 0 );\n* // returns \n*\n* re = realf( z );\n* // returns 2.0\n*\n* im = imagf( z );\n* // returns -2.0\n*\n* z = out.get( len-1 );\n* // returns \n*\n* re = realf( z );\n* // returns 3.0\n*\n* im = imagf( z );\n* // returns -3.0\n*/\nsetReadOnly( Complex64Array.prototype, 'slice', function slice( start, end ) {\n\tvar outlen;\n\tvar outbuf;\n\tvar out;\n\tvar idx;\n\tvar buf;\n\tvar len;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tbuf = this._buffer;\n\tlen = this._length;\n\tif ( arguments.length === 0 ) {\n\t\tstart = 0;\n\t\tend = len;\n\t} else {\n\t\tif ( !isInteger( start ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. First argument must be an integer. Value: `%s`.', start ) );\n\t\t}\n\t\tif ( start < 0 ) {\n\t\t\tstart += len;\n\t\t\tif ( start < 0 ) {\n\t\t\t\tstart = 0;\n\t\t\t}\n\t\t}\n\t\tif ( arguments.length === 1 ) {\n\t\t\tend = len;\n\t\t} else {\n\t\t\tif ( !isInteger( end ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be an integer. Value: `%s`.', end ) );\n\t\t\t}\n\t\t\tif ( end < 0 ) {\n\t\t\t\tend += len;\n\t\t\t\tif ( end < 0 ) {\n\t\t\t\t\tend = 0;\n\t\t\t\t}\n\t\t\t} else if ( end > len ) {\n\t\t\t\tend = len;\n\t\t\t}\n\t\t}\n\t}\n\tif ( start < end ) {\n\t\toutlen = end - start;\n\t} else {\n\t\toutlen = 0;\n\t}\n\tout = new this.constructor( outlen );\n\toutbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\tfor ( i = 0; i < outlen; i++ ) {\n\t\tidx = 2*(i+start);\n\t\toutbuf[ 2*i ] = buf[ idx ];\n\t\toutbuf[ (2*i)+1 ] = buf[ idx+1 ];\n\t}\n\treturn out;\n});\n\n/**\n* Tests whether at least one element in an array passes a test implemented by a predicate function.\n*\n* @name some\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {boolean} boolean indicating whether at least one element passes a test\n*\n* @example\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* function predicate( v ) {\n* return ( realf( v ) === imagf( v ) );\n* }\n*\n* var arr = new Complex64Array( 3 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n*\n* var bool = arr.some( predicate );\n* // returns true\n*/\nsetReadOnly( Complex64Array.prototype, 'some', function some( predicate, thisArg ) {\n\tvar buf;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tif ( predicate.call( thisArg, getComplex64( buf, i ), i, this ) ) {\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n});\n\n/**\n* Creates a new typed array view over the same underlying `ArrayBuffer` and with the same underlying data type as the host array.\n*\n* @name subarray\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {integer} [begin=0] - starting index (inclusive)\n* @param {integer} [end] - ending index (exclusive)\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be an integer\n* @throws {TypeError} second argument must be an integer\n* @returns {Complex64Array} subarray\n*\n* @example\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* var arr = new Complex64Array( 5 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n* arr.set( [ 4.0, -4.0 ], 3 );\n* arr.set( [ 5.0, -5.0 ], 4 );\n*\n* var subarr = arr.subarray();\n* // returns \n*\n* var len = subarr.length;\n* // returns 5\n*\n* var z = subarr.get( 0 );\n* // returns \n*\n* var re = realf( z );\n* // returns 1.0\n*\n* var im = imagf( z );\n* // returns -1.0\n*\n* z = subarr.get( len-1 );\n* // returns \n*\n* re = realf( z );\n* // returns 5.0\n*\n* im = imagf( z );\n* // returns -5.0\n*\n* subarr = arr.subarray( 1, -2 );\n* // returns \n*\n* len = subarr.length;\n* // returns 2\n*\n* z = subarr.get( 0 );\n* // returns \n*\n* re = realf( z );\n* // returns 2.0\n*\n* im = imagf( z );\n* // returns -2.0\n*\n* z = subarr.get( len-1 );\n* // returns \n*\n* re = realf( z );\n* // returns 3.0\n*\n* im = imagf( z );\n* // returns -3.0\n*/\nsetReadOnly( Complex64Array.prototype, 'subarray', function subarray( begin, end ) {\n\tvar offset;\n\tvar buf;\n\tvar len;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tbuf = this._buffer;\n\tlen = this._length;\n\tif ( arguments.length === 0 ) {\n\t\tbegin = 0;\n\t\tend = len;\n\t} else {\n\t\tif ( !isInteger( begin ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. First argument must be an integer. Value: `%s`.', begin ) );\n\t\t}\n\t\tif ( begin < 0 ) {\n\t\t\tbegin += len;\n\t\t\tif ( begin < 0 ) {\n\t\t\t\tbegin = 0;\n\t\t\t}\n\t\t}\n\t\tif ( arguments.length === 1 ) {\n\t\t\tend = len;\n\t\t} else {\n\t\t\tif ( !isInteger( end ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be an integer. Value: `%s`.', end ) );\n\t\t\t}\n\t\t\tif ( end < 0 ) {\n\t\t\t\tend += len;\n\t\t\t\tif ( end < 0 ) {\n\t\t\t\t\tend = 0;\n\t\t\t\t}\n\t\t\t} else if ( end > len ) {\n\t\t\t\tend = len;\n\t\t\t}\n\t\t}\n\t}\n\tif ( begin >= len ) {\n\t\tlen = 0;\n\t\toffset = buf.byteLength;\n\t} else if ( begin >= end ) {\n\t\tlen = 0;\n\t\toffset = buf.byteOffset + (begin*BYTES_PER_ELEMENT);\n\t} else {\n\t\tlen = end - begin;\n\t\toffset = buf.byteOffset + ( begin*BYTES_PER_ELEMENT );\n\t}\n\treturn new this.constructor( buf.buffer, offset, ( len < 0 ) ? 0 : len );\n});\n\n/**\n* Returns a new typed array containing the elements in reversed order.\n*\n* @name toReversed\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Complex64Array} reversed array\n*\n* @example\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* var arr = new Complex64Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var out = arr.toReversed();\n* // returns \n*\n* var z = out.get( 0 );\n* // returns \n*\n* var re = realf( z );\n* // returns 3.0\n*\n* var im = imagf( z );\n* // returns 3.0\n*\n* z = out.get( 1 );\n* // returns \n*\n* re = realf( z );\n* // returns 2.0\n*\n* im = imagf( z );\n* // returns 2.0\n*\n* z = out.get( 2 );\n* // returns \n*\n* re = realf( z );\n* // returns 1.0\n*\n* im = imagf( z );\n* // returns 1.0\n*/\nsetReadOnly( Complex64Array.prototype, 'toReversed', function toReversed() {\n\tvar outbuf;\n\tvar out;\n\tvar len;\n\tvar buf;\n\tvar i;\n\tvar j;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tlen = this._length;\n\tout = new this.constructor( len );\n\tbuf = this._buffer;\n\toutbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\tfor ( i = 0; i < len; i++ ) {\n\t\tj = len - i - 1;\n\t\toutbuf[ (2*i) ] = buf[ (2*j) ];\n\t\toutbuf[ (2*i)+1 ] = buf[ (2*j)+1 ];\n\t}\n\treturn out;\n});\n\n/**\n* Serializes an array as a string.\n*\n* @name toString\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @throws {TypeError} `this` must be a complex number array\n* @returns {string} string representation\n*\n* @example\n* var arr = new Complex64Array( 2 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n*\n* var str = arr.toString();\n* // returns '1 + 1i,2 + 2i'\n*/\nsetReadOnly( Complex64Array.prototype, 'toString', function toString() {\n\tvar out;\n\tvar buf;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tout = [];\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tout.push( getComplex64( buf, i ).toString() );\n\t}\n\treturn out.join( ',' );\n});\n\n/**\n* Returns a new typed array with the element at a provided index replaced with a provided value.\n*\n* @name with\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {integer} index - element index\n* @param {ComplexLike} value - new value\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be an integer\n* @throws {RangeError} index argument is out-of-bounds\n* @throws {TypeError} second argument must be a complex number\n* @returns {Complex64Array} new typed array\n*\n* @example\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n* import Complex64 from '@stdlib/complex-float32';\n*\n* var arr = new Complex64Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var out = arr.with( 0, new Complex64( 4.0, 4.0 ) );\n* // returns \n*\n* var z = out.get( 0 );\n* // returns \n*\n* var re = realf( z );\n* // returns 4.0\n*\n* var im = imagf( z );\n* // returns 4.0\n*/\nsetReadOnly( Complex64Array.prototype, 'with', function copyWith( index, value ) {\n\tvar buf;\n\tvar out;\n\tvar len;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isInteger( index ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be an integer. Value: `%s`.', index ) );\n\t}\n\tlen = this._length;\n\tif ( index < 0 ) {\n\t\tindex += len;\n\t}\n\tif ( index < 0 || index >= len ) {\n\t\tthrow new RangeError( format( 'invalid argument. Index argument is out-of-bounds. Value: `%s`.', index ) );\n\t}\n\tif ( !isComplexLike( value ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Second argument must be a complex number. Value: `%s`.', value ) );\n\t}\n\tout = new this.constructor( this._buffer );\n\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\tbuf[ 2*index ] = realf( value );\n\tbuf[ (2*index)+1 ] = imagf( value );\n\treturn out;\n});\n\n\n// EXPORTS //\n\nexport default Complex64Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport realf from '@stdlib/complex-realf';\nimport imagf from '@stdlib/complex-imagf';\n\n\n// MAIN //\n\n/**\n* Returns a strided array of real and imaginary components.\n*\n* @private\n* @param {Float32Array} buf - output array\n* @param {Array} arr - array containing complex numbers\n* @returns {(Float32Array|null)} output array or null\n*/\nfunction fromArray( buf, arr ) {\n\tvar len;\n\tvar v;\n\tvar i;\n\tvar j;\n\n\tlen = arr.length;\n\tj = 0;\n\tfor ( i = 0; i < len; i++ ) {\n\t\tv = arr[ i ];\n\t\tif ( !isComplexLike( v ) ) {\n\t\t\treturn null;\n\t\t}\n\t\tbuf[ j ] = realf( v );\n\t\tbuf[ j+1 ] = imagf( v );\n\t\tj += 2; // stride\n\t}\n\treturn buf;\n}\n\n\n// EXPORTS //\n\nexport default fromArray;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Returns the real component of a double-precision complex floating-point number.\n*\n* @param {Complex} z - complex number\n* @returns {number} real component\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n*\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var re = real( z );\n* // returns 5.0\n*/\nfunction real( z ) {\n\treturn z.re;\n}\n\n\n// EXPORTS //\n\nexport default real;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Returns the imaginary component of a double-precision complex floating-point number.\n*\n* @param {Complex} z - complex number\n* @returns {number} imaginary component\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n*\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var im = imag( z );\n* // returns 3.0\n*/\nfunction imag( z ) {\n\treturn z.im;\n}\n\n\n// EXPORTS //\n\nexport default imag;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isArrayLikeObject from '@stdlib/assert-is-array-like-object';\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport format from '@stdlib/string-format';\nimport real from '@stdlib/complex-real';\nimport imag from '@stdlib/complex-imag';\n\n\n// MAIN //\n\n/**\n* Returns an array of iterated values.\n*\n* @private\n* @param {Object} it - iterator\n* @returns {(Array|TypeError)} array or an error\n*/\nfunction fromIterator( it ) {\n\tvar out;\n\tvar v;\n\tvar z;\n\n\tout = [];\n\twhile ( true ) {\n\t\tv = it.next();\n\t\tif ( v.done ) {\n\t\t\tbreak;\n\t\t}\n\t\tz = v.value;\n\t\tif ( isArrayLikeObject( z ) && z.length >= 2 ) {\n\t\t\tout.push( z[ 0 ], z[ 1 ] );\n\t\t} else if ( isComplexLike( z ) ) {\n\t\t\tout.push( real( z ), imag( z ) );\n\t\t} else {\n\t\t\treturn new TypeError( format( 'invalid argument. An iterator must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', z ) );\n\t\t}\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default fromIterator;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isArrayLikeObject from '@stdlib/assert-is-array-like-object';\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport realf from '@stdlib/complex-realf';\nimport imagf from '@stdlib/complex-imagf';\nimport format from '@stdlib/string-format';\n\n\n// MAIN //\n\n/**\n* Returns an array of iterated values.\n*\n* @private\n* @param {Object} it - iterator\n* @param {Function} clbk - callback to invoke for each iterated value\n* @param {*} thisArg - invocation context\n* @returns {(Array|TypeError)} array or an error\n*/\nfunction fromIteratorMap( it, clbk, thisArg ) {\n\tvar out;\n\tvar v;\n\tvar z;\n\tvar i;\n\n\tout = [];\n\ti = -1;\n\twhile ( true ) {\n\t\tv = it.next();\n\t\tif ( v.done ) {\n\t\t\tbreak;\n\t\t}\n\t\ti += 1;\n\t\tz = clbk.call( thisArg, v.value, i );\n\t\tif ( isArrayLikeObject( z ) && z.length >= 2 ) {\n\t\t\tout.push( z[ 0 ], z[ 1 ] );\n\t\t} else if ( isComplexLike( z ) ) {\n\t\t\tout.push( realf( z ), imagf( z ) );\n\t\t} else {\n\t\t\treturn new TypeError( format( 'invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', z ) );\n\t\t}\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default fromIteratorMap;\n","/* eslint-disable no-restricted-syntax, max-lines, no-invalid-this */\n\n/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isNonNegativeInteger } from '@stdlib/assert-is-nonnegative-integer';\nimport isArrayLikeObject from '@stdlib/assert-is-array-like-object';\nimport isCollection from '@stdlib/assert-is-collection';\nimport isArrayBuffer from '@stdlib/assert-is-arraybuffer';\nimport isObject from '@stdlib/assert-is-object';\nimport isArray from '@stdlib/assert-is-array';\nimport isString from '@stdlib/assert-is-string';\nimport isFunction from '@stdlib/assert-is-function';\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport isEven from '@stdlib/math-base-assert-is-even';\nimport isInteger from '@stdlib/math-base-assert-is-integer';\nimport isComplex64Array from '@stdlib/array-base-assert-is-complex64array';\nimport isComplex128Array from '@stdlib/array-base-assert-is-complex128array';\nimport hasIteratorSymbolSupport from '@stdlib/assert-has-iterator-symbol-support';\nimport ITERATOR_SYMBOL from '@stdlib/symbol-iterator';\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport setReadOnlyAccessor from '@stdlib/utils-define-nonenumerable-read-only-accessor';\nimport Float64Array from '@stdlib/array-float64';\nimport Complex128 from '@stdlib/complex-float64';\nimport real from '@stdlib/complex-real';\nimport imag from '@stdlib/complex-imag';\nimport floor from '@stdlib/math-base-special-floor';\nimport reinterpret64 from '@stdlib/strided-base-reinterpret-complex64';\nimport reinterpret128 from '@stdlib/strided-base-reinterpret-complex128';\nimport getter from '@stdlib/array-base-getter';\nimport accessorGetter from '@stdlib/array-base-accessor-getter';\nimport format from '@stdlib/string-format';\nimport fromIterator from './from_iterator.js';\nimport fromIteratorMap from './from_iterator_map.js';\nimport fromArray from './from_array.js';\n\n\n// VARIABLES //\n\nvar BYTES_PER_ELEMENT = Float64Array.BYTES_PER_ELEMENT * 2;\nvar HAS_ITERATOR_SYMBOL = hasIteratorSymbolSupport();\n\n\n// FUNCTIONS //\n\n/**\n* Returns a boolean indicating if a value is a complex typed array.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a complex typed array\n*/\nfunction isComplexArray( value ) {\n\treturn (\n\t\tvalue instanceof Complex128Array ||\n\t\t(\n\t\t\ttypeof value === 'object' &&\n\t\t\tvalue !== null &&\n\t\t\t(\n\t\t\t\tvalue.constructor.name === 'Complex64Array' ||\n\t\t\t\tvalue.constructor.name === 'Complex128Array'\n\t\t\t) &&\n\t\t\ttypeof value._length === 'number' && // eslint-disable-line no-underscore-dangle\n\n\t\t\t// NOTE: we don't perform a more rigorous test here for a typed array for performance reasons, as robustly checking for a typed array instance could require walking the prototype tree and performing relatively expensive constructor checks...\n\t\t\ttypeof value._buffer === 'object' // eslint-disable-line no-underscore-dangle\n\t\t)\n\t);\n}\n\n/**\n* Returns a boolean indicating if a value is a complex typed array constructor.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a complex typed array constructor\n*/\nfunction isComplexArrayConstructor( value ) {\n\treturn (\n\t\tvalue === Complex128Array ||\n\n\t\t// NOTE: weaker test in order to avoid a circular dependency with Complex64Array...\n\t\tvalue.name === 'Complex64Array'\n\t);\n}\n\n/**\n* Retrieves a complex number from a complex number array buffer.\n*\n* @private\n* @param {Float64Array} buf - array buffer\n* @param {NonNegativeInteger} idx - element index\n* @returns {Complex128} complex number\n*/\nfunction getComplex128( buf, idx ) {\n\tidx *= 2;\n\treturn new Complex128( buf[ idx ], buf[ idx+1 ] );\n}\n\n\n// MAIN //\n\n/**\n* 128-bit complex number array constructor.\n*\n* @constructor\n* @param {(NonNegativeInteger|Collection|ArrayBuffer|Iterable)} [arg] - length, typed array, array-like object, buffer, or iterable\n* @param {NonNegativeInteger} [byteOffset=0] - byte offset\n* @param {NonNegativeInteger} [length] - view length\n* @throws {RangeError} ArrayBuffer byte length must be a multiple of `16`\n* @throws {RangeError} array-like object and typed array input arguments must have a length which is a multiple of two\n* @throws {TypeError} if provided only a single argument, must provide a valid argument\n* @throws {TypeError} byte offset must be a nonnegative integer\n* @throws {RangeError} byte offset must be a multiple of `16`\n* @throws {TypeError} view length must be a positive multiple of `16`\n* @throws {RangeError} must provide sufficient memory to accommodate byte offset and view length requirements\n* @throws {TypeError} an iterator must return either a two element array containing real and imaginary components or a complex number\n* @returns {Complex128Array} complex number array\n*\n* @example\n* var arr = new Complex128Array();\n* // returns \n*\n* var len = arr.length;\n* // returns 0\n*\n* @example\n* var arr = new Complex128Array( 2 );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*\n* @example\n* var arr = new Complex128Array( [ 1.0, -1.0 ] );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* import ArrayBuffer from '@stdlib/array-buffer';\n*\n* var buf = new ArrayBuffer( 32 );\n* var arr = new Complex128Array( buf );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*\n* @example\n* import ArrayBuffer from '@stdlib/array-buffer';\n*\n* var buf = new ArrayBuffer( 32 );\n* var arr = new Complex128Array( buf, 16 );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* import ArrayBuffer from '@stdlib/array-buffer';\n*\n* var buf = new ArrayBuffer( 64 );\n* var arr = new Complex128Array( buf, 16, 2 );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*/\nfunction Complex128Array() {\n\tvar byteOffset;\n\tvar nargs;\n\tvar buf;\n\tvar len;\n\n\tnargs = arguments.length;\n\tif ( !(this instanceof Complex128Array) ) {\n\t\tif ( nargs === 0 ) {\n\t\t\treturn new Complex128Array();\n\t\t}\n\t\tif ( nargs === 1 ) {\n\t\t\treturn new Complex128Array( arguments[0] );\n\t\t}\n\t\tif ( nargs === 2 ) {\n\t\t\treturn new Complex128Array( arguments[0], arguments[1] );\n\t\t}\n\t\treturn new Complex128Array( arguments[0], arguments[1], arguments[2] );\n\t}\n\t// Create the underlying data buffer...\n\tif ( nargs === 0 ) {\n\t\tbuf = new Float64Array( 0 ); // backward-compatibility\n\t} else if ( nargs === 1 ) {\n\t\tif ( isNonNegativeInteger( arguments[0] ) ) {\n\t\t\tbuf = new Float64Array( arguments[0]*2 );\n\t\t} else if ( isCollection( arguments[0] ) ) {\n\t\t\tbuf = arguments[ 0 ];\n\t\t\tlen = buf.length;\n\n\t\t\t// If provided a \"generic\" array, peak at the first value, and, if the value is a complex number, try to process as an array of complex numbers, falling back to \"normal\" typed array initialization if we fail and ensuring consistency if the first value had not been a complex number...\n\t\t\tif ( len && isArray( buf ) && isComplexLike( buf[0] ) ) {\n\t\t\t\tbuf = fromArray( new Float64Array( len*2 ), buf );\n\t\t\t\tif ( buf === null ) {\n\t\t\t\t\t// We failed and we are now forced to allocate a new array :-(\n\t\t\t\t\tif ( !isEven( len ) ) {\n\t\t\t\t\t\tthrow new RangeError( format( 'invalid argument. Array-like object arguments must have a length which is a multiple of two. Length: `%u`.', len ) );\n\t\t\t\t\t}\n\t\t\t\t\t// We failed, so fall back to directly setting values...\n\t\t\t\t\tbuf = new Float64Array( arguments[0] );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ( isComplex64Array( buf ) ) {\n\t\t\t\t\tbuf = reinterpret64( buf, 0 );\n\t\t\t\t} else if ( isComplex128Array( buf ) ) {\n\t\t\t\t\tbuf = reinterpret128( buf, 0 );\n\t\t\t\t} else if ( !isEven( len ) ) {\n\t\t\t\t\tthrow new RangeError( format( 'invalid argument. Array-like object and typed array arguments must have a length which is a multiple of two. Length: `%u`.', len ) );\n\t\t\t\t}\n\t\t\t\tbuf = new Float64Array( buf );\n\t\t\t}\n\t\t} else if ( isArrayBuffer( arguments[0] ) ) {\n\t\t\tbuf = arguments[ 0 ];\n\t\t\tif ( !isInteger( buf.byteLength/BYTES_PER_ELEMENT ) ) {\n\t\t\t\tthrow new RangeError( format( 'invalid argument. ArrayBuffer byte length must be a multiple of %u. Byte length: `%u`.', BYTES_PER_ELEMENT, buf.byteLength ) );\n\t\t\t}\n\t\t\tbuf = new Float64Array( buf );\n\t\t} else if ( isObject( arguments[0] ) ) {\n\t\t\tbuf = arguments[ 0 ];\n\t\t\tif ( HAS_ITERATOR_SYMBOL === false ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Environment lacks Symbol.iterator support. Must provide a length, ArrayBuffer, typed array, or array-like object. Value: `%s`.', buf ) );\n\t\t\t}\n\t\t\tif ( !isFunction( buf[ ITERATOR_SYMBOL ] ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.', buf ) );\n\t\t\t}\n\t\t\tbuf = buf[ ITERATOR_SYMBOL ]();\n\t\t\tif ( !isFunction( buf.next ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.', buf ) );\n\t\t\t}\n\t\t\tbuf = fromIterator( buf );\n\t\t\tif ( buf instanceof Error ) {\n\t\t\t\tthrow buf;\n\t\t\t}\n\t\t\tbuf = new Float64Array( buf );\n\t\t} else {\n\t\t\tthrow new TypeError( format( 'invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.', arguments[0] ) );\n\t\t}\n\t} else {\n\t\tbuf = arguments[ 0 ];\n\t\tif ( !isArrayBuffer( buf ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. First argument must be an ArrayBuffer. Value: `%s`.', buf ) );\n\t\t}\n\t\tbyteOffset = arguments[ 1 ];\n\t\tif ( !isNonNegativeInteger( byteOffset ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Byte offset must be a nonnegative integer. Value: `%s`.', byteOffset ) );\n\t\t}\n\t\tif ( !isInteger( byteOffset/BYTES_PER_ELEMENT ) ) {\n\t\t\tthrow new RangeError( format( 'invalid argument. Byte offset must be a multiple of %u. Value: `%u`.', BYTES_PER_ELEMENT, byteOffset ) );\n\t\t}\n\t\tif ( nargs === 2 ) {\n\t\t\tlen = buf.byteLength - byteOffset;\n\t\t\tif ( !isInteger( len/BYTES_PER_ELEMENT ) ) {\n\t\t\t\tthrow new RangeError( format( 'invalid arguments. ArrayBuffer view byte length must be a multiple of %u. View byte length: `%u`.', BYTES_PER_ELEMENT, len ) );\n\t\t\t}\n\t\t\tbuf = new Float64Array( buf, byteOffset );\n\t\t} else {\n\t\t\tlen = arguments[ 2 ];\n\t\t\tif ( !isNonNegativeInteger( len ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Length must be a nonnegative integer. Value: `%s`.', len ) );\n\t\t\t}\n\t\t\tif ( (len*BYTES_PER_ELEMENT) > (buf.byteLength-byteOffset) ) {\n\t\t\t\tthrow new RangeError( format( 'invalid arguments. ArrayBuffer has insufficient capacity. Either decrease the array length or provide a bigger buffer. Minimum capacity: `%u`.', len*BYTES_PER_ELEMENT ) );\n\t\t\t}\n\t\t\tbuf = new Float64Array( buf, byteOffset, len*2 );\n\t\t}\n\t}\n\tsetReadOnly( this, '_buffer', buf );\n\tsetReadOnly( this, '_length', buf.length/2 );\n\n\treturn this;\n}\n\n/**\n* Size (in bytes) of each array element.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex128Array\n* @readonly\n* @type {PositiveInteger}\n* @default 16\n*\n* @example\n* var nbytes = Complex128Array.BYTES_PER_ELEMENT;\n* // returns 16\n*/\nsetReadOnly( Complex128Array, 'BYTES_PER_ELEMENT', BYTES_PER_ELEMENT );\n\n/**\n* Constructor name.\n*\n* @name name\n* @memberof Complex128Array\n* @readonly\n* @type {string}\n* @default 'Complex128Array'\n*\n* @example\n* var name = Complex128Array.name;\n* // returns 'Complex128Array'\n*/\nsetReadOnly( Complex128Array, 'name', 'Complex128Array' );\n\n/**\n* Creates a new 128-bit complex number array from an array-like object or an iterable.\n*\n* @name from\n* @memberof Complex128Array\n* @type {Function}\n* @param {(Collection|Object)} src - array-like object or iterable\n* @param {Function} [clbk] - callback to invoke for each source element\n* @param {*} [thisArg] - context\n* @throws {TypeError} `this` context must be a constructor\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be an array-like object or an iterable\n* @throws {TypeError} second argument must be a function\n* @throws {RangeError} array-like objects must have a length which is a multiple of two\n* @throws {TypeError} an iterator must return either a two element array containing real and imaginary components or a complex number\n* @throws {TypeError} when provided an iterator, a callback must return either a two element array containing real and imaginary components or a complex number\n* @returns {Complex128Array} 128-bit complex number array\n*\n* @example\n* var arr = Complex128Array.from( [ 1.0, -1.0 ] );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n*\n* var arr = Complex128Array.from( [ new Complex128( 1.0, 1.0 ) ] );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* function clbk( v ) {\n* return new Complex128( real(v)*2.0, imag(v)*2.0 );\n* }\n*\n* var arr = Complex128Array.from( [ new Complex128( 1.0, 1.0 ) ], clbk );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*/\nsetReadOnly( Complex128Array, 'from', function from( src ) {\n\tvar thisArg;\n\tvar nargs;\n\tvar clbk;\n\tvar out;\n\tvar buf;\n\tvar tmp;\n\tvar get;\n\tvar len;\n\tvar flg;\n\tvar v;\n\tvar i;\n\tvar j;\n\tif ( !isFunction( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` context must be a constructor.' );\n\t}\n\tif ( !isComplexArrayConstructor( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tnargs = arguments.length;\n\tif ( nargs > 1 ) {\n\t\tclbk = arguments[ 1 ];\n\t\tif ( !isFunction( clbk ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be a function. Value: `%s`.', clbk ) );\n\t\t}\n\t\tif ( nargs > 2 ) {\n\t\t\tthisArg = arguments[ 2 ];\n\t\t}\n\t}\n\tif ( isComplexArray( src ) ) {\n\t\tlen = src.length;\n\t\tif ( clbk ) {\n\t\t\tout = new this( len );\n\t\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\t\tj = 0;\n\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\tv = clbk.call( thisArg, src.get( i ), i );\n\t\t\t\tif ( isComplexLike( v ) ) {\n\t\t\t\t\tbuf[ j ] = real( v );\n\t\t\t\t\tbuf[ j+1 ] = imag( v );\n\t\t\t\t} else if ( isArrayLikeObject( v ) && v.length >= 2 ) {\n\t\t\t\t\tbuf[ j ] = v[ 0 ];\n\t\t\t\t\tbuf[ j+1 ] = v[ 1 ];\n\t\t\t\t} else {\n\t\t\t\t\tthrow new TypeError( format( 'invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', v ) );\n\t\t\t\t}\n\t\t\t\tj += 2; // stride\n\t\t\t}\n\t\t\treturn out;\n\t\t}\n\t\treturn new this( src );\n\t}\n\tif ( isCollection( src ) ) {\n\t\tif ( clbk ) {\n\t\t\t// Note: array contents affect how we iterate over a provided data source. If only complex number objects, we can extract real and imaginary components. Otherwise, for non-complex number arrays (e.g., `Float64Array`, etc), we assume a strided array where real and imaginary components are interleaved. In the former case, we expect a callback to return real and imaginary components (possibly as a complex number). In the latter case, we expect a callback to return *either* a real or imaginary component.\n\n\t\t\tlen = src.length;\n\t\t\tif ( src.get && src.set ) {\n\t\t\t\tget = accessorGetter( 'default' );\n\t\t\t} else {\n\t\t\t\tget = getter( 'default' );\n\t\t\t}\n\t\t\t// Detect whether we've been provided an array which returns complex number objects...\n\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\tif ( !isComplexLike( get( src, i ) ) ) {\n\t\t\t\t\tflg = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// If an array does not contain only complex number objects, then we assume interleaved real and imaginary components...\n\t\t\tif ( flg ) {\n\t\t\t\tif ( !isEven( len ) ) {\n\t\t\t\t\tthrow new RangeError( format( 'invalid argument. First argument must have a length which is a multiple of two. Length: `%u`.', len ) );\n\t\t\t\t}\n\t\t\t\tout = new this( len/2 );\n\t\t\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\t\tbuf[ i ] = clbk.call( thisArg, get( src, i ), i );\n\t\t\t\t}\n\t\t\t\treturn out;\n\t\t\t}\n\t\t\t// If an array contains only complex number objects, then we need to extract real and imaginary components...\n\t\t\tout = new this( len );\n\t\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\t\tj = 0;\n\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\tv = clbk.call( thisArg, get( src, i ), i );\n\t\t\t\tif ( isComplexLike( v ) ) {\n\t\t\t\t\tbuf[ j ] = real( v );\n\t\t\t\t\tbuf[ j+1 ] = imag( v );\n\t\t\t\t} else if ( isArrayLikeObject( v ) && v.length >= 2 ) {\n\t\t\t\t\tbuf[ j ] = v[ 0 ];\n\t\t\t\t\tbuf[ j+1 ] = v[ 1 ];\n\t\t\t\t} else {\n\t\t\t\t\tthrow new TypeError( format( 'invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', v ) );\n\t\t\t\t}\n\t\t\t\tj += 2; // stride\n\t\t\t}\n\t\t\treturn out;\n\t\t}\n\t\treturn new this( src );\n\t}\n\tif ( isObject( src ) && HAS_ITERATOR_SYMBOL && isFunction( src[ ITERATOR_SYMBOL ] ) ) { // eslint-disable-line max-len\n\t\tbuf = src[ ITERATOR_SYMBOL ]();\n\t\tif ( !isFunction( buf.next ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.', src ) );\n\t\t}\n\t\tif ( clbk ) {\n\t\t\ttmp = fromIteratorMap( buf, clbk, thisArg );\n\t\t} else {\n\t\t\ttmp = fromIterator( buf );\n\t\t}\n\t\tif ( tmp instanceof Error ) {\n\t\t\tthrow tmp;\n\t\t}\n\t\tlen = tmp.length / 2;\n\t\tout = new this( len );\n\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\tbuf[ i ] = tmp[ i ];\n\t\t}\n\t\treturn out;\n\t}\n\tthrow new TypeError( format( 'invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.', src ) );\n});\n\n/**\n* Creates a new 128-bit complex number array from a variable number of arguments.\n*\n* @name of\n* @memberof Complex128Array\n* @type {Function}\n* @param {...*} element - array elements\n* @throws {TypeError} `this` context must be a constructor\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Complex128Array} 128-bit complex number array\n*\n* @example\n* var arr = Complex128Array.of( 1.0, 1.0, 1.0, 1.0 );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*/\nsetReadOnly( Complex128Array, 'of', function of() {\n\tvar args;\n\tvar i;\n\tif ( !isFunction( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` context must be a constructor.' );\n\t}\n\tif ( !isComplexArrayConstructor( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\targs = [];\n\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\targs.push( arguments[ i ] );\n\t}\n\treturn new this( args );\n});\n\n/**\n* Returns an array element with support for both nonnegative and negative integer indices.\n*\n* @name at\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {integer} idx - element index\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} must provide an integer\n* @returns {(Complex128|void)} array element\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* var arr = new Complex128Array( 10 );\n*\n* var z = arr.at( 0 );\n* // returns \n*\n* var re = real( z );\n* // returns 0.0\n*\n* var im = imag( z );\n* // returns 0.0\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 9.0, -9.0 ], 9 );\n*\n* z = arr.at( 0 );\n* // returns \n*\n* re = real( z );\n* // returns 1.0\n*\n* im = imag( z );\n* // returns -1.0\n*\n* z = arr.at( -1 );\n* // returns \n*\n* re = real( z );\n* // returns 9.0\n*\n* im = imag( z );\n* // returns -9.0\n*\n* z = arr.at( 100 );\n* // returns undefined\n*\n* z = arr.at( -100 );\n* // returns undefined\n*/\nsetReadOnly( Complex128Array.prototype, 'at', function at( idx ) {\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isInteger( idx ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Must provide an integer. Value: `%s`.', idx ) );\n\t}\n\tif ( idx < 0 ) {\n\t\tidx += this._length;\n\t}\n\tif ( idx < 0 || idx >= this._length ) {\n\t\treturn;\n\t}\n\treturn getComplex128( this._buffer, idx );\n});\n\n/**\n* Pointer to the underlying data buffer.\n*\n* @name buffer\n* @memberof Complex128Array.prototype\n* @readonly\n* @type {ArrayBuffer}\n*\n* @example\n* var arr = new Complex128Array( 10 );\n*\n* var buf = arr.buffer;\n* // returns \n*/\nsetReadOnlyAccessor( Complex128Array.prototype, 'buffer', function get() {\n\treturn this._buffer.buffer;\n});\n\n/**\n* Size (in bytes) of the array.\n*\n* @name byteLength\n* @memberof Complex128Array.prototype\n* @readonly\n* @type {NonNegativeInteger}\n*\n* @example\n* var arr = new Complex128Array( 10 );\n*\n* var byteLength = arr.byteLength;\n* // returns 160\n*/\nsetReadOnlyAccessor( Complex128Array.prototype, 'byteLength', function get() {\n\treturn this._buffer.byteLength;\n});\n\n/**\n* Offset (in bytes) of the array from the start of its underlying `ArrayBuffer`.\n*\n* @name byteOffset\n* @memberof Complex128Array.prototype\n* @readonly\n* @type {NonNegativeInteger}\n*\n* @example\n* var arr = new Complex128Array( 10 );\n*\n* var byteOffset = arr.byteOffset;\n* // returns 0\n*/\nsetReadOnlyAccessor( Complex128Array.prototype, 'byteOffset', function get() {\n\treturn this._buffer.byteOffset;\n});\n\n/**\n* Size (in bytes) of each array element.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex128Array.prototype\n* @readonly\n* @type {PositiveInteger}\n* @default 16\n*\n* @example\n* var arr = new Complex128Array( 10 );\n*\n* var nbytes = arr.BYTES_PER_ELEMENT;\n* // returns 16\n*/\nsetReadOnly( Complex128Array.prototype, 'BYTES_PER_ELEMENT', Complex128Array.BYTES_PER_ELEMENT );\n\n/**\n* Copies a sequence of elements within the array to the position starting at `target`.\n*\n* @name copyWithin\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {integer} target - index at which to start copying elements\n* @param {integer} start - source index at which to copy elements from\n* @param {integer} [end] - source index at which to stop copying elements from\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Complex128Array} modified array\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* var arr = new Complex128Array( 4 );\n*\n* // Set the array elements:\n* arr.set( new Complex128( 1.0, 1.0 ), 0 );\n* arr.set( new Complex128( 2.0, 2.0 ), 1 );\n* arr.set( new Complex128( 3.0, 3.0 ), 2 );\n* arr.set( new Complex128( 4.0, 4.0 ), 3 );\n*\n* // Copy the first two elements to the last two elements:\n* arr.copyWithin( 2, 0, 2 );\n*\n* // Get the last array element:\n* var z = arr.get( 3 );\n*\n* var re = real( z );\n* // returns 2.0\n*\n* var im = imag( z );\n* // returns 2.0\n*/\nsetReadOnly( Complex128Array.prototype, 'copyWithin', function copyWithin( target, start ) {\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\t// FIXME: prefer a functional `copyWithin` implementation which addresses lack of universal browser support (e.g., IE11 and Safari) or ensure that typed arrays are polyfilled\n\tif ( arguments.length === 2 ) {\n\t\tthis._buffer.copyWithin( target*2, start*2 );\n\t} else {\n\t\tthis._buffer.copyWithin( target*2, start*2, arguments[2]*2 );\n\t}\n\treturn this;\n});\n\n/**\n* Returns an iterator for iterating over array key-value pairs.\n*\n* @name entries\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Iterator} iterator\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n*\n* var arr = [\n* new Complex128( 1.0, 1.0 ),\n* new Complex128( 2.0, 2.0 ),\n* new Complex128( 3.0, 3.0 )\n* ];\n* arr = new Complex128Array( arr );\n*\n* // Create an iterator:\n* var it = arr.entries();\n*\n* // Iterate over the key-value pairs...\n* var v = it.next().value;\n* // returns [ 0, ]\n*\n* v = it.next().value;\n* // returns [ 1, ]\n*\n* v = it.next().value;\n* // returns [ 2, ]\n*\n* var bool = it.next().done;\n* // returns true\n*/\nsetReadOnly( Complex128Array.prototype, 'entries', function entries() {\n\tvar buffer;\n\tvar self;\n\tvar iter;\n\tvar len;\n\tvar FLG;\n\tvar i;\n\tvar j;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tself = this;\n\tbuffer = this._buffer;\n\tlen = this._length;\n\n\t// Initialize the iteration indices:\n\ti = -1;\n\tj = -2;\n\n\t// Create an iterator protocol-compliant object:\n\titer = {};\n\tsetReadOnly( iter, 'next', next );\n\tsetReadOnly( iter, 'return', end );\n\n\tif ( ITERATOR_SYMBOL ) {\n\t\tsetReadOnly( iter, ITERATOR_SYMBOL, factory );\n\t}\n\treturn iter;\n\n\t/**\n\t* Returns an iterator protocol-compliant object containing the next iterated value.\n\t*\n\t* @private\n\t* @returns {Object} iterator protocol-compliant object\n\t*/\n\tfunction next() {\n\t\tvar z;\n\t\ti += 1;\n\t\tif ( FLG || i >= len ) {\n\t\t\treturn {\n\t\t\t\t'done': true\n\t\t\t};\n\t\t}\n\t\tj += 2;\n\t\tz = new Complex128( buffer[ j ], buffer[ j+1 ] );\n\t\treturn {\n\t\t\t'value': [ i, z ],\n\t\t\t'done': false\n\t\t};\n\t}\n\n\t/**\n\t* Finishes an iterator.\n\t*\n\t* @private\n\t* @param {*} [value] - value to return\n\t* @returns {Object} iterator protocol-compliant object\n\t*/\n\tfunction end( value ) {\n\t\tFLG = true;\n\t\tif ( arguments.length ) {\n\t\t\treturn {\n\t\t\t\t'value': value,\n\t\t\t\t'done': true\n\t\t\t};\n\t\t}\n\t\treturn {\n\t\t\t'done': true\n\t\t};\n\t}\n\n\t/**\n\t* Returns a new iterator.\n\t*\n\t* @private\n\t* @returns {Iterator} iterator\n\t*/\n\tfunction factory() {\n\t\treturn self.entries();\n\t}\n});\n\n/**\n* Tests whether all elements in an array pass a test implemented by a predicate function.\n*\n* @name every\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {boolean} boolean indicating whether all elements pass a test\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* function predicate( v ) {\n* return ( real( v ) === imag( v ) );\n* }\n*\n* var arr = new Complex128Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var bool = arr.every( predicate );\n* // returns true\n*/\nsetReadOnly( Complex128Array.prototype, 'every', function every( predicate, thisArg ) {\n\tvar buf;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tif ( !predicate.call( thisArg, getComplex128( buf, i ), i, this ) ) {\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn true;\n});\n\n/**\n* Returns a modified typed array filled with a fill value.\n*\n* @name fill\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {ComplexLike} value - fill value\n* @param {integer} [start=0] - starting index (inclusive)\n* @param {integer} [end] - ending index (exclusive)\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a complex number\n* @throws {TypeError} second argument must be an integer\n* @throws {TypeError} third argument must be an integer\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* var arr = new Complex128Array( 3 );\n*\n* arr.fill( new Complex128( 1.0, 1.0 ), 1 );\n*\n* var z = arr.get( 1 );\n* // returns \n*\n* var re = real( z );\n* // returns 1.0\n*\n* var im = imag( z );\n* // returns 1.0\n*\n* z = arr.get( 1 );\n* // returns \n*\n* re = real( z );\n* // returns 1.0\n*\n* im = imag( z );\n* // returns 1.0\n*/\nsetReadOnly( Complex128Array.prototype, 'fill', function fill( value, start, end ) {\n\tvar buf;\n\tvar len;\n\tvar idx;\n\tvar re;\n\tvar im;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isComplexLike( value ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a complex number. Value: `%s`.', value ) );\n\t}\n\tbuf = this._buffer;\n\tlen = this._length;\n\tif ( arguments.length > 1 ) {\n\t\tif ( !isInteger( start ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be an integer. Value: `%s`.', start ) );\n\t\t}\n\t\tif ( start < 0 ) {\n\t\t\tstart += len;\n\t\t\tif ( start < 0 ) {\n\t\t\t\tstart = 0;\n\t\t\t}\n\t\t}\n\t\tif ( arguments.length > 2 ) {\n\t\t\tif ( !isInteger( end ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Third argument must be an integer. Value: `%s`.', end ) );\n\t\t\t}\n\t\t\tif ( end < 0 ) {\n\t\t\t\tend += len;\n\t\t\t\tif ( end < 0 ) {\n\t\t\t\t\tend = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( end > len ) {\n\t\t\t\tend = len;\n\t\t\t}\n\t\t} else {\n\t\t\tend = len;\n\t\t}\n\t} else {\n\t\tstart = 0;\n\t\tend = len;\n\t}\n\tre = real( value );\n\tim = imag( value );\n\tfor ( i = start; i < end; i++ ) {\n\t\tidx = 2*i;\n\t\tbuf[ idx ] = re;\n\t\tbuf[ idx+1 ] = im;\n\t}\n\treturn this;\n});\n\n/**\n* Returns a new array containing the elements of an array which pass a test implemented by a predicate function.\n*\n* @name filter\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {Complex128Array} complex number array\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* function predicate( v ) {\n* return ( real( v ) === imag( v ) );\n* }\n*\n* var arr = new Complex128Array( 3 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n*\n* var out = arr.filter( predicate );\n* // returns \n*\n* var len = out.length;\n* // returns 1\n*\n* var z = out.get( 0 );\n* // returns \n*\n* var re = real( z );\n* // returns 2.0\n*\n* var im = imag( z );\n* // returns 2.0\n*/\nsetReadOnly( Complex128Array.prototype, 'filter', function filter( predicate, thisArg ) {\n\tvar buf;\n\tvar out;\n\tvar i;\n\tvar z;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tout = [];\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tz = getComplex128( buf, i );\n\t\tif ( predicate.call( thisArg, z, i, this ) ) {\n\t\t\tout.push( z );\n\t\t}\n\t}\n\treturn new this.constructor( out );\n});\n\n/**\n* Returns the first element in an array for which a predicate function returns a truthy value.\n*\n* @name find\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {(Complex128|void)} array element or undefined\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* function predicate( v ) {\n* return ( real( v ) === imag( v ) );\n* }\n*\n* var arr = new Complex128Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var z = arr.find( predicate );\n* // returns \n*\n* var re = real( z );\n* // returns 1.0\n*\n* var im = imag( z );\n* // returns 1.0\n*/\nsetReadOnly( Complex128Array.prototype, 'find', function find( predicate, thisArg ) {\n\tvar buf;\n\tvar i;\n\tvar z;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tz = getComplex128( buf, i );\n\t\tif ( predicate.call( thisArg, z, i, this ) ) {\n\t\t\treturn z;\n\t\t}\n\t}\n});\n\n/**\n* Returns the index of the first element in an array for which a predicate function returns a truthy value.\n*\n* @name findIndex\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {integer} index or -1\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* function predicate( v ) {\n* return ( real( v ) === imag( v ) );\n* }\n*\n* var arr = new Complex128Array( 3 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var idx = arr.findIndex( predicate );\n* // returns 2\n*/\nsetReadOnly( Complex128Array.prototype, 'findIndex', function findIndex( predicate, thisArg ) {\n\tvar buf;\n\tvar i;\n\tvar z;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tz = getComplex128( buf, i );\n\t\tif ( predicate.call( thisArg, z, i, this ) ) {\n\t\t\treturn i;\n\t\t}\n\t}\n\treturn -1;\n});\n\n/**\n* Returns the last element in an array for which a predicate function returns a truthy value.\n*\n* @name findLast\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {(Complex128|void)} array element or undefined\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* function predicate( v ) {\n* return ( real( v ) === imag( v ) );\n* }\n*\n* var arr = new Complex128Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var z = arr.findLast( predicate );\n* // returns \n*\n* var re = real( z );\n* // returns 3.0\n*\n* var im = imag( z );\n* // returns 3.0\n*/\nsetReadOnly( Complex128Array.prototype, 'findLast', function findLast( predicate, thisArg ) {\n\tvar buf;\n\tvar i;\n\tvar z;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = this._length-1; i >= 0; i-- ) {\n\t\tz = getComplex128( buf, i );\n\t\tif ( predicate.call( thisArg, z, i, this ) ) {\n\t\t\treturn z;\n\t\t}\n\t}\n});\n\n/**\n* Returns the index of the last element in an array for which a predicate function returns a truthy value.\n*\n* @name findLastIndex\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {integer} index or -1\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* function predicate( v ) {\n* return ( real( v ) === imag( v ) );\n* }\n*\n* var arr = new Complex128Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n*\n* var idx = arr.findLastIndex( predicate );\n* // returns 1\n*/\nsetReadOnly( Complex128Array.prototype, 'findLastIndex', function findLastIndex( predicate, thisArg ) {\n\tvar buf;\n\tvar i;\n\tvar z;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = this._length-1; i >= 0; i-- ) {\n\t\tz = getComplex128( buf, i );\n\t\tif ( predicate.call( thisArg, z, i, this ) ) {\n\t\t\treturn i;\n\t\t}\n\t}\n\treturn -1;\n});\n\n/**\n* Invokes a function once for each array element.\n*\n* @name forEach\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {Function} fcn - function to invoke\n* @param {*} [thisArg] - function invocation context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n*\n* function log( v, i ) {\n* console.log( '%s: %s', i, v.toString() );\n* }\n*\n* var arr = new Complex128Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* arr.forEach( log );\n*/\nsetReadOnly( Complex128Array.prototype, 'forEach', function forEach( fcn, thisArg ) {\n\tvar buf;\n\tvar i;\n\tvar z;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( fcn ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', fcn ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tz = getComplex128( buf, i );\n\t\tfcn.call( thisArg, z, i, this );\n\t}\n});\n\n/**\n* Returns an array element.\n*\n* @name get\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {NonNegativeInteger} idx - element index\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} must provide a nonnegative integer\n* @returns {(Complex128|void)} array element\n*\n* @example\n* var arr = new Complex128Array( 10 );\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* var z = arr.get( 0 );\n* // returns \n*\n* var re = real( z );\n* // returns 0.0\n*\n* var im = imag( z );\n* // returns 0.0\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n*\n* z = arr.get( 0 );\n* // returns \n*\n* re = real( z );\n* // returns 1.0\n*\n* im = imag( z );\n* // returns -1.0\n*\n* z = arr.get( 100 );\n* // returns undefined\n*/\nsetReadOnly( Complex128Array.prototype, 'get', function get( idx ) {\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isNonNegativeInteger( idx ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Must provide a nonnegative integer. Value: `%s`.', idx ) );\n\t}\n\tif ( idx >= this._length ) {\n\t\treturn;\n\t}\n\treturn getComplex128( this._buffer, idx );\n});\n\n/**\n* Number of array elements.\n*\n* @name length\n* @memberof Complex128Array.prototype\n* @readonly\n* @type {NonNegativeInteger}\n*\n* @example\n* var arr = new Complex128Array( 10 );\n*\n* var len = arr.length;\n* // returns 10\n*/\nsetReadOnlyAccessor( Complex128Array.prototype, 'length', function get() {\n\treturn this._length;\n});\n\n/**\n* Returns a boolean indicating whether an array includes a provided value.\n*\n* @name includes\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {ComplexLike} searchElement - search element\n* @param {integer} [fromIndex=0] - starting index (inclusive)\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a complex number\n* @throws {TypeError} second argument must be an integer\n* @returns {boolean} boolean indicating whether an array includes a provided value\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n*\n* var arr = new Complex128Array( 5 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n* arr.set( [ 4.0, -4.0 ], 3 );\n* arr.set( [ 5.0, -5.0 ], 4 );\n*\n* var bool = arr.includes( new Complex128( 3.0, -3.0 ) );\n* // returns true\n*\n* bool = arr.includes( new Complex128( 3.0, -3.0 ), 3 );\n* // returns false\n*\n* bool = arr.includes( new Complex128( 4.0, -4.0 ), -3 );\n* // returns true\n*/\nsetReadOnly( Complex128Array.prototype, 'includes', function includes( searchElement, fromIndex ) {\n\tvar buf;\n\tvar idx;\n\tvar re;\n\tvar im;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isComplexLike( searchElement ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a complex number. Value: `%s`.', searchElement ) );\n\t}\n\tif ( arguments.length > 1 ) {\n\t\tif ( !isInteger( fromIndex ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be an integer. Value: `%s`.', fromIndex ) );\n\t\t}\n\t\tif ( fromIndex < 0 ) {\n\t\t\tfromIndex += this._length;\n\t\t\tif ( fromIndex < 0 ) {\n\t\t\t\tfromIndex = 0;\n\t\t\t}\n\t\t}\n\t} else {\n\t\tfromIndex = 0;\n\t}\n\tre = real( searchElement );\n\tim = imag( searchElement );\n\tbuf = this._buffer;\n\tfor ( i = fromIndex; i < this._length; i++ ) {\n\t\tidx = 2 * i;\n\t\tif ( re === buf[ idx ] && im === buf[ idx+1 ] ) {\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n});\n\n/**\n* Returns the first index at which a given element can be found.\n*\n* @name indexOf\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {ComplexLike} searchElement - element to find\n* @param {integer} [fromIndex=0] - starting index (inclusive)\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a complex number\n* @throws {TypeError} second argument must be an integer\n* @returns {integer} index or -1\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n*\n* var arr = new Complex128Array( 5 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n* arr.set( [ 4.0, -4.0 ], 3 );\n* arr.set( [ 5.0, -5.0 ], 4 );\n*\n* var idx = arr.indexOf( new Complex128( 3.0, -3.0 ) );\n* // returns 2\n*\n* idx = arr.indexOf( new Complex128( 3.0, -3.0 ), 3 );\n* // returns -1\n*\n* idx = arr.indexOf( new Complex128( 4.0, -4.0 ), -3 );\n* // returns 3\n*/\nsetReadOnly( Complex128Array.prototype, 'indexOf', function indexOf( searchElement, fromIndex ) {\n\tvar buf;\n\tvar idx;\n\tvar re;\n\tvar im;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isComplexLike( searchElement ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a complex number. Value: `%s`.', searchElement ) );\n\t}\n\tif ( arguments.length > 1 ) {\n\t\tif ( !isInteger( fromIndex ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be an integer. Value: `%s`.', fromIndex ) );\n\t\t}\n\t\tif ( fromIndex < 0 ) {\n\t\t\tfromIndex += this._length;\n\t\t\tif ( fromIndex < 0 ) {\n\t\t\t\tfromIndex = 0;\n\t\t\t}\n\t\t}\n\t} else {\n\t\tfromIndex = 0;\n\t}\n\tre = real( searchElement );\n\tim = imag( searchElement );\n\tbuf = this._buffer;\n\tfor ( i = fromIndex; i < this._length; i++ ) {\n\t\tidx = 2 * i;\n\t\tif ( re === buf[ idx ] && im === buf[ idx+1 ] ) {\n\t\t\treturn i;\n\t\t}\n\t}\n\treturn -1;\n});\n\n/**\n* Returns a new string by concatenating all array elements.\n*\n* @name join\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {string} [separator=','] - element separator\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a string\n* @returns {string} string representation\n*\n* @example\n* var arr = new Complex128Array( 2 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n*\n* var str = arr.join();\n* // returns '1 + 1i,2 + 2i'\n*\n* str = arr.join( '/' );\n* // returns '1 + 1i/2 + 2i'\n*/\nsetReadOnly( Complex128Array.prototype, 'join', function join( separator ) {\n\tvar out;\n\tvar buf;\n\tvar sep;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( arguments.length === 0 ) {\n\t\tsep = ',';\n\t} else if ( isString( separator ) ) {\n\t\tsep = separator;\n\t} else {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a string. Value: `%s`.', separator ) );\n\t}\n\tout = [];\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tout.push( getComplex128( buf, i ).toString() );\n\t}\n\treturn out.join( sep );\n});\n\n/**\n* Returns the last index at which a given element can be found.\n*\n* @name lastIndexOf\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {ComplexLike} searchElement - element to find\n* @param {integer} [fromIndex] - index at which to start searching backward (inclusive)\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a complex number\n* @throws {TypeError} second argument must be an integer\n* @returns {integer} index or -1\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n*\n* var arr = new Complex128Array( 5 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n* arr.set( [ 4.0, -4.0 ], 3 );\n* arr.set( [ 3.0, -3.0 ], 4 );\n*\n* var idx = arr.lastIndexOf( new Complex128( 3.0, -3.0 ) );\n* // returns 4\n*\n* idx = arr.lastIndexOf( new Complex128( 3.0, -3.0 ), 3 );\n* // returns 2\n*\n* idx = arr.lastIndexOf( new Complex128( 5.0, -5.0 ), 3 );\n* // returns -1\n*\n* idx = arr.lastIndexOf( new Complex128( 2.0, -2.0 ), -3 );\n* // returns 1\n*/\nsetReadOnly( Complex128Array.prototype, 'lastIndexOf', function lastIndexOf( searchElement, fromIndex ) {\n\tvar buf;\n\tvar idx;\n\tvar re;\n\tvar im;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isComplexLike( searchElement ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a complex number. Value: `%s`.', searchElement ) );\n\t}\n\tif ( arguments.length > 1 ) {\n\t\tif ( !isInteger( fromIndex ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be an integer. Value: `%s`.', fromIndex ) );\n\t\t}\n\t\tif ( fromIndex >= this._length ) {\n\t\t\tfromIndex = this._length - 1;\n\t\t} else if ( fromIndex < 0 ) {\n\t\t\tfromIndex += this._length;\n\t\t}\n\t} else {\n\t\tfromIndex = this._length - 1;\n\t}\n\tre = real( searchElement );\n\tim = imag( searchElement );\n\tbuf = this._buffer;\n\tfor ( i = fromIndex; i >= 0; i-- ) {\n\t\tidx = 2 * i;\n\t\tif ( re === buf[ idx ] && im === buf[ idx+1 ] ) {\n\t\t\treturn i;\n\t\t}\n\t}\n\treturn -1;\n});\n\n/**\n* Returns a new array with each element being the result of a provided callback function.\n*\n* @name map\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {Function} fcn - callback function\n* @param {*} [thisArg] - callback function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {Complex128Array} complex number array\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* function scale( v, i ) {\n* return new Complex128( 2.0*real( v ), 2.0*imag( v ) );\n* }\n*\n* var arr = new Complex128Array( 3 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n*\n* var out = arr.map( scale );\n* // returns \n*\n* var z = out.get( 0 );\n* // returns \n*\n* var re = real( z );\n* // returns 2.0\n*\n* var im = imag( z );\n* // returns -2.0\n*/\nsetReadOnly( Complex128Array.prototype, 'map', function map( fcn, thisArg ) {\n\tvar outbuf;\n\tvar buf;\n\tvar out;\n\tvar i;\n\tvar v;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( fcn ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', fcn ) );\n\t}\n\tbuf = this._buffer;\n\tout = new this.constructor( this._length );\n\toutbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tv = fcn.call( thisArg, getComplex128( buf, i ), i, this );\n\t\tif ( isComplexLike( v ) ) {\n\t\t\toutbuf[ 2*i ] = real( v );\n\t\t\toutbuf[ (2*i)+1 ] = imag( v );\n\t\t} else if ( isArrayLikeObject( v ) && v.length === 2 ) {\n\t\t\toutbuf[ 2*i ] = v[ 0 ];\n\t\t\toutbuf[ (2*i)+1 ] = v[ 1 ];\n\t\t} else {\n\t\t\tthrow new TypeError( format( 'invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', v ) );\n\t\t}\n\t}\n\treturn out;\n});\n\n/**\n* Applies a provided callback function to each element of the array, in order, passing in the return value from the calculation on the preceding element and returning the accumulated result upon completion.\n*\n* @name reduce\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {Function} reducer - callback function\n* @param {*} [initialValue] - initial value\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @throws {Error} if not provided an initial value, the array must have at least one element\n* @returns {*} accumulated result\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n* import cadd from '@stdlib/math-base-ops-cadd';\n*\n* var arr = new Complex128Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var z = arr.reduce( cadd );\n* // returns \n*\n* var re = real( z );\n* // returns 6.0\n*\n* var im = imag( z );\n* // returns 6.0\n*/\nsetReadOnly( Complex128Array.prototype, 'reduce', function reduce( reducer, initialValue ) {\n\tvar buf;\n\tvar acc;\n\tvar len;\n\tvar v;\n\tvar i;\n\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( reducer ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', reducer ) );\n\t}\n\tbuf = this._buffer;\n\tlen = this._length;\n\tif ( arguments.length > 1 ) {\n\t\tacc = initialValue;\n\t\ti = 0;\n\t} else {\n\t\tif ( len === 0 ) {\n\t\t\tthrow new Error( 'invalid operation. If not provided an initial value, an array must contain at least one element.' );\n\t\t}\n\t\tacc = getComplex128( buf, 0 );\n\t\ti = 1;\n\t}\n\tfor ( ; i < len; i++ ) {\n\t\tv = getComplex128( buf, i );\n\t\tacc = reducer( acc, v, i, this );\n\t}\n\treturn acc;\n});\n\n/**\n* Reverses an array in-place.\n*\n* @name reverse\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Complex128Array} reversed array\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* var arr = new Complex128Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var out = arr.reverse();\n* // returns \n*\n* var z = out.get( 0 );\n* // returns \n*\n* var re = real( z );\n* // returns 3.0\n*\n* var im = imag( z );\n* // returns 3.0\n*\n* z = out.get( 1 );\n* // returns \n*\n* re = real( z );\n* // returns 2.0\n*\n* im = imag( z );\n* // returns 2.0\n*\n* z = out.get( 2 );\n* // returns \n*\n* re = real( z );\n* // returns 1.0\n*\n* im = imag( z );\n* // returns 1.0\n*/\nsetReadOnly( Complex128Array.prototype, 'reverse', function reverse() {\n\tvar buf;\n\tvar tmp;\n\tvar len;\n\tvar N;\n\tvar i;\n\tvar j;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tlen = this._length;\n\tbuf = this._buffer;\n\tN = floor( len / 2 );\n\tfor ( i = 0; i < N; i++ ) {\n\t\tj = len - i - 1;\n\t\ttmp = buf[ (2*i) ];\n\t\tbuf[ (2*i) ] = buf[ (2*j) ];\n\t\tbuf[ (2*j) ] = tmp;\n\t\ttmp = buf[ (2*i)+1 ];\n\t\tbuf[ (2*i)+1 ] = buf[ (2*j)+1 ];\n\t\tbuf[ (2*j)+1 ] = tmp;\n\t}\n\treturn this;\n});\n\n/**\n* Sets an array element.\n*\n* ## Notes\n*\n* - When provided a typed array, real or complex, we must check whether the source array shares the same buffer as the target array and whether the underlying memory overlaps. In particular, we are concerned with the following scenario:\n*\n* ```text\n* buf: ---------------------\n* src: ---------------------\n* ```\n*\n* In the above, as we copy values from `src`, we will overwrite values in the `src` view, resulting in duplicated values copied into the end of `buf`, which is not intended. Hence, to avoid overwriting source values, we must **copy** source values to a temporary array.\n*\n* In the other overlapping scenario,\n*\n* ```text\n* buf: ---------------------\n* src: ---------------------\n* ```\n*\n* by the time we begin copying into the overlapping region, we are copying from the end of `src`, a non-overlapping region, which means we don't run the risk of copying copied values, rather than the original `src` values as intended.\n*\n* @name set\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {(Collection|Complex|ComplexArray)} value - value(s)\n* @param {NonNegativeInteger} [i=0] - element index at which to start writing values\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be either a complex number, an array-like object, or a complex number array\n* @throws {TypeError} index argument must be a nonnegative integer\n* @throws {RangeError} array-like objects must have a length which is a multiple of two\n* @throws {RangeError} index argument is out-of-bounds\n* @throws {RangeError} target array lacks sufficient storage to accommodate source values\n* @returns {void}\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* var arr = new Complex128Array( 10 );\n*\n* var z = arr.get( 0 );\n* // returns \n*\n* var re = real( z );\n* // returns 0.0\n*\n* var im = imag( z );\n* // returns 0.0\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n*\n* z = arr.get( 0 );\n* // returns \n*\n* re = real( z );\n* // returns 1.0\n*\n* im = imag( z );\n* // returns -1.0\n*/\nsetReadOnly( Complex128Array.prototype, 'set', function set( value ) {\n\t/* eslint-disable no-underscore-dangle */\n\tvar sbuf;\n\tvar idx;\n\tvar buf;\n\tvar tmp;\n\tvar flg;\n\tvar N;\n\tvar v;\n\tvar i;\n\tvar j;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tbuf = this._buffer;\n\tif ( arguments.length > 1 ) {\n\t\tidx = arguments[ 1 ];\n\t\tif ( !isNonNegativeInteger( idx ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Index argument must be a nonnegative integer. Value: `%s`.', idx ) );\n\t\t}\n\t} else {\n\t\tidx = 0;\n\t}\n\tif ( isComplexLike( value ) ) {\n\t\tif ( idx >= this._length ) {\n\t\t\tthrow new RangeError( format( 'invalid argument. Index argument is out-of-bounds. Value: `%u`.', idx ) );\n\t\t}\n\t\tidx *= 2;\n\t\tbuf[ idx ] = real( value );\n\t\tbuf[ idx+1 ] = imag( value );\n\t\treturn;\n\t}\n\tif ( isComplexArray( value ) ) {\n\t\tN = value._length;\n\t\tif ( idx+N > this._length ) {\n\t\t\tthrow new RangeError( 'invalid arguments. Target array lacks sufficient storage to accommodate source values.' );\n\t\t}\n\t\tsbuf = value._buffer;\n\n\t\t// Check for overlapping memory...\n\t\tj = buf.byteOffset + (idx*BYTES_PER_ELEMENT);\n\t\tif (\n\t\t\tsbuf.buffer === buf.buffer &&\n\t\t\t(\n\t\t\t\tsbuf.byteOffset < j &&\n\t\t\t\tsbuf.byteOffset+sbuf.byteLength > j\n\t\t\t)\n\t\t) {\n\t\t\t// We need to copy source values...\n\t\t\ttmp = new Float64Array( sbuf.length );\n\t\t\tfor ( i = 0; i < sbuf.length; i++ ) {\n\t\t\t\ttmp[ i ] = sbuf[ i ];\n\t\t\t}\n\t\t\tsbuf = tmp;\n\t\t}\n\t\tidx *= 2;\n\t\tj = 0;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\tbuf[ idx ] = sbuf[ j ];\n\t\t\tbuf[ idx+1 ] = sbuf[ j+1 ];\n\t\t\tidx += 2; // stride\n\t\t\tj += 2; // stride\n\t\t}\n\t\treturn;\n\t}\n\tif ( isCollection( value ) ) {\n\t\t// Detect whether we've been provided an array of complex numbers...\n\t\tN = value.length;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\tif ( !isComplexLike( value[ i ] ) ) {\n\t\t\t\tflg = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t// If an array does not contain only complex numbers, then we assume interleaved real and imaginary components...\n\t\tif ( flg ) {\n\t\t\tif ( !isEven( N ) ) {\n\t\t\t\tthrow new RangeError( format( 'invalid argument. Array-like object arguments must have a length which is a multiple of two. Length: `%u`.', N ) );\n\t\t\t}\n\t\t\tif ( idx+(N/2) > this._length ) {\n\t\t\t\tthrow new RangeError( 'invalid arguments. Target array lacks sufficient storage to accommodate source values.' );\n\t\t\t}\n\t\t\tsbuf = value;\n\n\t\t\t// Check for overlapping memory...\n\t\t\tj = buf.byteOffset + (idx*BYTES_PER_ELEMENT);\n\t\t\tif (\n\t\t\t\tsbuf.buffer === buf.buffer &&\n\t\t\t\t(\n\t\t\t\t\tsbuf.byteOffset < j &&\n\t\t\t\t\tsbuf.byteOffset+sbuf.byteLength > j\n\t\t\t\t)\n\t\t\t) {\n\t\t\t\t// We need to copy source values...\n\t\t\t\ttmp = new Float64Array( N );\n\t\t\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\t\t\ttmp[ i ] = sbuf[ i ];\n\t\t\t\t}\n\t\t\t\tsbuf = tmp;\n\t\t\t}\n\t\t\tidx *= 2;\n\t\t\tN /= 2;\n\t\t\tj = 0;\n\t\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\t\tbuf[ idx ] = sbuf[ j ];\n\t\t\t\tbuf[ idx+1 ] = sbuf[ j+1 ];\n\t\t\t\tidx += 2; // stride\n\t\t\t\tj += 2; // stride\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\t// If an array contains only complex numbers, then we need to extract real and imaginary components...\n\t\tif ( idx+N > this._length ) {\n\t\t\tthrow new RangeError( 'invalid arguments. Target array lacks sufficient storage to accommodate source values.' );\n\t\t}\n\t\tidx *= 2;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\tv = value[ i ];\n\t\t\tbuf[ idx ] = real( v );\n\t\t\tbuf[ idx+1 ] = imag( v );\n\t\t\tidx += 2; // stride\n\t\t}\n\t\treturn;\n\t}\n\tthrow new TypeError( format( 'invalid argument. First argument must be either a complex number, an array-like object, or a complex number array. Value: `%s`.', value ) );\n\n\t/* eslint-enable no-underscore-dangle */\n});\n\n/**\n* Copies a portion of a typed array to a new typed array.\n*\n* @name slice\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {integer} [start=0] - starting index (inclusive)\n* @param {integer} [end] - ending index (exclusive)\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be an integer\n* @throws {TypeError} second argument must be an integer\n* @returns {Complex128Array} complex number array\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* var arr = new Complex128Array( 5 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n* arr.set( [ 4.0, -4.0 ], 3 );\n* arr.set( [ 5.0, -5.0 ], 4 );\n*\n* var out = arr.slice();\n* // returns \n*\n* var len = out.length;\n* // returns 5\n*\n* var z = out.get( 0 );\n* // returns \n*\n* var re = real( z );\n* // returns 1.0\n*\n* var im = imag( z );\n* // returns -1.0\n*\n* z = out.get( len-1 );\n* // returns \n*\n* re = real( z );\n* // returns 5.0\n*\n* im = imag( z );\n* // returns -5.0\n*\n* out = arr.slice( 1, -2 );\n* // returns \n*\n* len = out.length;\n* // returns 2\n*\n* z = out.get( 0 );\n* // returns \n*\n* re = real( z );\n* // returns 2.0\n*\n* im = imag( z );\n* // returns -2.0\n*\n* z = out.get( len-1 );\n* // returns \n*\n* re = real( z );\n* // returns 3.0\n*\n* im = imag( z );\n* // returns -3.0\n*/\nsetReadOnly( Complex128Array.prototype, 'slice', function slice( start, end ) {\n\tvar outlen;\n\tvar outbuf;\n\tvar out;\n\tvar idx;\n\tvar buf;\n\tvar len;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tbuf = this._buffer;\n\tlen = this._length;\n\tif ( arguments.length === 0 ) {\n\t\tstart = 0;\n\t\tend = len;\n\t} else {\n\t\tif ( !isInteger( start ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. First argument must be an integer. Value: `%s`.', start ) );\n\t\t}\n\t\tif ( start < 0 ) {\n\t\t\tstart += len;\n\t\t\tif ( start < 0 ) {\n\t\t\t\tstart = 0;\n\t\t\t}\n\t\t}\n\t\tif ( arguments.length === 1 ) {\n\t\t\tend = len;\n\t\t} else {\n\t\t\tif ( !isInteger( end ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be an integer. Value: `%s`.', end ) );\n\t\t\t}\n\t\t\tif ( end < 0 ) {\n\t\t\t\tend += len;\n\t\t\t\tif ( end < 0 ) {\n\t\t\t\t\tend = 0;\n\t\t\t\t}\n\t\t\t} else if ( end > len ) {\n\t\t\t\tend = len;\n\t\t\t}\n\t\t}\n\t}\n\tif ( start < end ) {\n\t\toutlen = end - start;\n\t} else {\n\t\toutlen = 0;\n\t}\n\tout = new this.constructor( outlen );\n\toutbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\tfor ( i = 0; i < outlen; i++ ) {\n\t\tidx = 2*(i+start);\n\t\toutbuf[ 2*i ] = buf[ idx ];\n\t\toutbuf[ (2*i)+1 ] = buf[ idx+1 ];\n\t}\n\treturn out;\n});\n\n/**\n* Tests whether at least one element in an array passes a test implemented by a predicate function.\n*\n* @name some\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {boolean} boolean indicating whether at least one element passes a test\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* function predicate( v ) {\n* return ( real( v ) === imag( v ) );\n* }\n*\n* var arr = new Complex128Array( 3 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n*\n* var bool = arr.some( predicate );\n* // returns true\n*/\nsetReadOnly( Complex128Array.prototype, 'some', function some( predicate, thisArg ) {\n\tvar buf;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tif ( predicate.call( thisArg, getComplex128( buf, i ), i, this ) ) {\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n});\n\n/**\n* Creates a new typed array view over the same underlying `ArrayBuffer` and with the same underlying data type as the host array.\n*\n* @name subarray\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {integer} [begin=0] - starting index (inclusive)\n* @param {integer} [end] - ending index (exclusive)\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be an integer\n* @throws {TypeError} second argument must be an integer\n* @returns {Complex64Array} subarray\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* var arr = new Complex128Array( 5 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n* arr.set( [ 4.0, -4.0 ], 3 );\n* arr.set( [ 5.0, -5.0 ], 4 );\n*\n* var subarr = arr.subarray();\n* // returns \n*\n* var len = subarr.length;\n* // returns 5\n*\n* var z = subarr.get( 0 );\n* // returns \n*\n* var re = real( z );\n* // returns 1.0\n*\n* var im = imag( z );\n* // returns -1.0\n*\n* z = subarr.get( len-1 );\n* // returns \n*\n* re = real( z );\n* // returns 5.0\n*\n* im = imag( z );\n* // returns -5.0\n*\n* subarr = arr.subarray( 1, -2 );\n* // returns \n*\n* len = subarr.length;\n* // returns 2\n*\n* z = subarr.get( 0 );\n* // returns \n*\n* re = real( z );\n* // returns 2.0\n*\n* im = imag( z );\n* // returns -2.0\n*\n* z = subarr.get( len-1 );\n* // returns \n*\n* re = real( z );\n* // returns 3.0\n*\n* im = imag( z );\n* // returns -3.0\n*/\nsetReadOnly( Complex128Array.prototype, 'subarray', function subarray( begin, end ) {\n\tvar offset;\n\tvar buf;\n\tvar len;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tbuf = this._buffer;\n\tlen = this._length;\n\tif ( arguments.length === 0 ) {\n\t\tbegin = 0;\n\t\tend = len;\n\t} else {\n\t\tif ( !isInteger( begin ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. First argument must be an integer. Value: `%s`.', begin ) );\n\t\t}\n\t\tif ( begin < 0 ) {\n\t\t\tbegin += len;\n\t\t\tif ( begin < 0 ) {\n\t\t\t\tbegin = 0;\n\t\t\t}\n\t\t}\n\t\tif ( arguments.length === 1 ) {\n\t\t\tend = len;\n\t\t} else {\n\t\t\tif ( !isInteger( end ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be an integer. Value: `%s`.', end ) );\n\t\t\t}\n\t\t\tif ( end < 0 ) {\n\t\t\t\tend += len;\n\t\t\t\tif ( end < 0 ) {\n\t\t\t\t\tend = 0;\n\t\t\t\t}\n\t\t\t} else if ( end > len ) {\n\t\t\t\tend = len;\n\t\t\t}\n\t\t}\n\t}\n\tif ( begin >= len ) {\n\t\tlen = 0;\n\t\toffset = buf.byteLength;\n\t} else if ( begin >= end ) {\n\t\tlen = 0;\n\t\toffset = buf.byteOffset + ( begin*BYTES_PER_ELEMENT );\n\t} else {\n\t\tlen = end - begin;\n\t\toffset = buf.byteOffset + ( begin*BYTES_PER_ELEMENT );\n\t}\n\treturn new this.constructor( buf.buffer, offset, ( len < 0 ) ? 0 : len );\n});\n\n/**\n* Returns a new typed array containing the elements in reversed order.\n*\n* @name toReversed\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Complex128Array} reversed array\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* var arr = new Complex128Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var out = arr.toReversed();\n* // returns \n*\n* var z = out.get( 0 );\n* // returns \n*\n* var re = real( z );\n* // returns 3.0\n*\n* var im = imag( z );\n* // returns 3.0\n*\n* z = out.get( 1 );\n* // returns \n*\n* re = real( z );\n* // returns 2.0\n*\n* im = imag( z );\n* // returns 2.0\n*\n* z = out.get( 2 );\n* // returns \n*\n* re = real( z );\n* // returns 1.0\n*\n* im = imag( z );\n* // returns 1.0\n*/\nsetReadOnly( Complex128Array.prototype, 'toReversed', function toReversed() {\n\tvar outbuf;\n\tvar out;\n\tvar len;\n\tvar buf;\n\tvar i;\n\tvar j;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tlen = this._length;\n\tout = new this.constructor( len );\n\tbuf = this._buffer;\n\toutbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\tfor ( i = 0; i < len; i++ ) {\n\t\tj = len - i - 1;\n\t\toutbuf[ (2*i) ] = buf[ (2*j) ];\n\t\toutbuf[ (2*i)+1 ] = buf[ (2*j)+1 ];\n\t}\n\treturn out;\n});\n\n/**\n* Serializes an array as a string.\n*\n* @name toString\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @throws {TypeError} `this` must be a complex number array\n* @returns {string} string representation\n*\n* @example\n* var arr = new Complex128Array( 2 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n*\n* var str = arr.toString();\n* // returns '1 + 1i,2 + 2i'\n*/\nsetReadOnly( Complex128Array.prototype, 'toString', function toString() {\n\tvar out;\n\tvar buf;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tout = [];\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tout.push( getComplex128( buf, i ).toString() );\n\t}\n\treturn out.join( ',' );\n});\n\n/**\n* Returns a new typed array with the element at a provided index replaced with a provided value.\n*\n* @name with\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {integer} index - element index\n* @param {ComplexLike} value - new value\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be an integer\n* @throws {RangeError} index argument is out-of-bounds\n* @throws {TypeError} second argument must be a complex number\n* @returns {Complex128Array} new typed array\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n* import Complex128 from '@stdlib/complex-float64';\n*\n* var arr = new Complex128Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var out = arr.with( 0, new Complex128( 4.0, 4.0 ) );\n* // returns \n*\n* var z = out.get( 0 );\n* // returns \n*\n* var re = real( z );\n* // returns 4.0\n*\n* var im = imag( z );\n* // returns 4.0\n*/\nsetReadOnly( Complex128Array.prototype, 'with', function copyWith( index, value ) {\n\tvar buf;\n\tvar out;\n\tvar len;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isInteger( index ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be an integer. Value: `%s`.', index ) );\n\t}\n\tlen = this._length;\n\tif ( index < 0 ) {\n\t\tindex += len;\n\t}\n\tif ( index < 0 || index >= len ) {\n\t\tthrow new RangeError( format( 'invalid argument. Index argument is out-of-bounds. Value: `%s`.', index ) );\n\t}\n\tif ( !isComplexLike( value ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Second argument must be a complex number. Value: `%s`.', value ) );\n\t}\n\tout = new this.constructor( this._buffer );\n\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\tbuf[ 2*index ] = real( value );\n\tbuf[ (2*index)+1 ] = imag( value );\n\treturn out;\n});\n\n\n// EXPORTS //\n\nexport default Complex128Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport real from '@stdlib/complex-real';\nimport imag from '@stdlib/complex-imag';\n\n\n// MAIN //\n\n/**\n* Returns a strided array of real and imaginary components.\n*\n* @private\n* @param {Float64Array} buf - output array\n* @param {Array} arr - array containing complex numbers\n* @returns {(Float64Array|null)} output array or null\n*/\nfunction fromArray( buf, arr ) {\n\tvar len;\n\tvar v;\n\tvar i;\n\tvar j;\n\n\tlen = arr.length;\n\tj = 0;\n\tfor ( i = 0; i < len; i++ ) {\n\t\tv = arr[ i ];\n\t\tif ( !isComplexLike( v ) ) {\n\t\t\treturn null;\n\t\t}\n\t\tbuf[ j ] = real( v );\n\t\tbuf[ j+1 ] = imag( v );\n\t\tj += 2; // stride\n\t}\n\treturn buf;\n}\n\n\n// EXPORTS //\n\nexport default fromArray;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isArrayLikeObject from '@stdlib/assert-is-array-like-object';\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport format from '@stdlib/string-format';\nimport real from '@stdlib/complex-real';\nimport imag from '@stdlib/complex-imag';\n\n\n// MAIN //\n\n/**\n* Returns an array of iterated values.\n*\n* @private\n* @param {Object} it - iterator\n* @param {Function} clbk - callback to invoke for each iterated value\n* @param {*} thisArg - invocation context\n* @returns {(Array|TypeError)} array or an error\n*/\nfunction fromIteratorMap( it, clbk, thisArg ) {\n\tvar out;\n\tvar v;\n\tvar z;\n\tvar i;\n\n\tout = [];\n\ti = -1;\n\twhile ( true ) {\n\t\tv = it.next();\n\t\tif ( v.done ) {\n\t\t\tbreak;\n\t\t}\n\t\ti += 1;\n\t\tz = clbk.call( thisArg, v.value, i );\n\t\tif ( isArrayLikeObject( z ) && z.length >= 2 ) {\n\t\t\tout.push( z[ 0 ], z[ 1 ] );\n\t\t} else if ( isComplexLike( z ) ) {\n\t\t\tout.push( real( z ), imag( z ) );\n\t\t} else {\n\t\t\treturn new TypeError( format( 'invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', z ) );\n\t\t}\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default fromIteratorMap;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport Float64Array from '@stdlib/array-float64';\nimport Float32Array from '@stdlib/array-float32';\nimport Int16Array from '@stdlib/array-int16';\nimport Int32Array from '@stdlib/array-int32';\nimport Int8Array from '@stdlib/array-int8';\nimport Uint16Array from '@stdlib/array-uint16';\nimport Uint32Array from '@stdlib/array-uint32';\nimport Uint8Array from '@stdlib/array-uint8';\nimport Uint8ClampedArray from '@stdlib/array-uint8c';\nimport Complex64Array from '@stdlib/array-complex64';\nimport Complex128Array from '@stdlib/array-complex128';\n\n\n// MAIN //\n\n// Mapping from data types to constructors...\nvar ctors = {\n\t'float64': Float64Array,\n\t'float32': Float32Array,\n\t'generic': Array, // TODO: replace with `stdlib` pkg\n\t'int16': Int16Array,\n\t'int32': Int32Array,\n\t'int8': Int8Array,\n\t'uint16': Uint16Array,\n\t'uint32': Uint32Array,\n\t'uint8': Uint8Array,\n\t'uint8c': Uint8ClampedArray,\n\t'complex64': Complex64Array,\n\t'complex128': Complex128Array\n};\n\n\n// EXPORTS //\n\nexport default ctors;\n","/**\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// MAIN //\n\n/**\n* Returns default array settings.\n*\n* @returns {Object} defaults\n*\n* @example\n* var o = defaults();\n* // returns {...}\n*/\nfunction defaults() {\n\treturn {\n\t\t// Data types:\n\t\t'dtypes': {\n\t\t\t'default': 'float64',\n\t\t\t'numeric': 'float64',\n\t\t\t'real': 'float64',\n\t\t\t'floating_point': 'float64',\n\t\t\t'real_floating_point': 'float64',\n\t\t\t'complex_floating_point': 'complex128',\n\t\t\t'integer': 'int32',\n\t\t\t'signed_integer': 'int32',\n\t\t\t'unsigned_integer': 'uint32'\n\t\t}\n\t};\n}\n\n\n// EXPORTS //\n\nexport default defaults;\n","/**\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// MODULES //\n\nimport defaults from './main.js';\n\n\n// VARIABLES //\n\nvar DEFAULTS = defaults();\nvar HASH = {\n\t'dtypes.default': DEFAULTS.dtypes.default,\n\t'dtypes.numeric': DEFAULTS.dtypes.numeric,\n\t'dtypes.real': DEFAULTS.dtypes.real,\n\t'dtypes.floating_point': DEFAULTS.dtypes.floating_point,\n\t'dtypes.real_floating_point': DEFAULTS.dtypes.real_floating_point,\n\t'dtypes.complex_floating_point': DEFAULTS.dtypes.complex_floating_point,\n\t'dtypes.integer': DEFAULTS.dtypes.integer,\n\t'dtypes.signed_integer': DEFAULTS.dtypes.signed_integer,\n\t'dtypes.unsigned_integer': DEFAULTS.dtypes.unsigned_integer\n};\n\n\n// MAIN //\n\n/**\n* Returns a default array setting.\n*\n* @param {string} name - setting name\n* @returns {*} default setting or null\n*\n* @example\n* var v = get( 'dtypes.default' );\n* // returns \n*/\nfunction get( name ) {\n\tvar v = HASH[ name ];\n\treturn ( v === void 0 ) ? null : v;\n}\n\n\n// EXPORTS //\n\nexport default get;\n","/**\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* Return default array settings.\n*\n* @module @stdlib/array-defaults\n*\n* @example\n* import defaults from '@stdlib/array-defaults';\n*\n* var o = defaults();\n* // returns {...}\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport get from './get.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'get', get );\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isNonNegativeInteger } from '@stdlib/assert-is-nonnegative-integer';\nimport ctors from '@stdlib/array-ctors';\nimport gzeros from '@stdlib/array-base-zeros';\nimport defaults from '@stdlib/array-defaults';\nimport format from '@stdlib/string-format';\n\n\n// VARIABLES //\n\nvar DEFAULT_DTYPE = defaults.get( 'dtypes.default' );\n\n\n// MAIN //\n\n/**\n* Creates a zero-filled array having a specified length.\n*\n* @param {NonNegativeInteger} length - array length\n* @param {string} [dtype=\"float64\"] - data type\n* @throws {TypeError} first argument must be a nonnegative integer\n* @throws {TypeError} second argument must be a recognized data type\n* @returns {(TypedArray|Array|ComplexArray)} array or typed array\n*\n* @example\n* var arr = zeros( 2 );\n* // returns [ 0.0, 0.0 ]\n*\n* @example\n* var arr = zeros( 2, 'float32' );\n* // returns [ 0.0, 0.0 ]\n*/\nfunction zeros( length ) {\n\tvar dtype;\n\tvar ctor;\n\tif ( !isNonNegativeInteger( length ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a nonnegative integer. Value: `%s`.', length ) );\n\t}\n\tif ( arguments.length > 1 ) {\n\t\tdtype = arguments[ 1 ];\n\t} else {\n\t\tdtype = DEFAULT_DTYPE;\n\t}\n\tif ( dtype === 'generic' ) {\n\t\treturn gzeros( length );\n\t}\n\tctor = ctors( dtype );\n\tif ( ctor === null ) {\n\t\tthrow new TypeError( format( 'invalid argument. Second argument must be a recognized data type. Value: `%s`.', dtype ) );\n\t}\n\treturn new ctor( length ); // WARNING: we assume that, apart from 'generic', the constructors for supported array data types are zero-filled by default\n}\n\n\n// EXPORTS //\n\nexport default zeros;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Returns a filled \"generic\" array.\n*\n* @param {*} value - fill value\n* @param {NonNegativeInteger} len - array length\n* @returns {Array} filled array\n*\n* @example\n* var out = filled( 0.0, 3 );\n* // returns [ 0.0, 0.0, 0.0 ]\n*\n* @example\n* var out = filled( 'beep', 3 );\n* // returns [ 'beep', 'beep', 'beep' ]\n*/\nfunction filled( value, len ) {\n\tvar arr;\n\tvar i;\n\n\t// Manually push elements in order to ensure \"fast\" elements...\n\tarr = [];\n\tfor ( i = 0; i < len; i++ ) {\n\t\tarr.push( value );\n\t}\n\treturn arr;\n}\n\n\n// EXPORTS //\n\nexport default filled;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport filled from '@stdlib/array-base-filled';\n\n\n// MAIN //\n\n/**\n* Returns a zero-filled \"generic\" array.\n*\n* @param {NonNegativeInteger} len - array length\n* @returns {Array} output array\n*\n* @example\n* var out = zeros( 3 );\n* // returns [ 0.0, 0.0, 0.0 ]\n*/\nfunction zeros( len ) {\n\treturn filled( 0.0, len );\n}\n\n\n// EXPORTS //\n\nexport default zeros;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport table from './ctors.js';\n\n\n// MAIN //\n\n/**\n* Returns an array constructor.\n*\n* @param {string} dtype - data type\n* @returns {(Function|null)} constructor or null\n*\n* @example\n* var ctor = ctors( 'float64' );\n* // returns \n*\n* @example\n* var ctor = ctors( 'float' );\n* // returns null\n*/\nfunction ctors( dtype ) {\n\treturn table[ dtype ] || null;\n}\n\n\n// EXPORTS //\n\nexport default ctors;\n","/**\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// MODULES //\n\nimport zeros from '@stdlib/array-zeros';\n\n\n// MAIN //\n\n/**\n* Creates an uninitialized array having a specified length.\n*\n* @private\n* @param {NonNegativeInteger} length - array length\n* @param {string} [dtype=\"float64\"] - data type\n* @throws {TypeError} first argument must be a nonnegative integer\n* @throws {TypeError} second argument must be a recognized data type\n* @returns {(TypedArray|Array|ComplexArray)} array or typed array\n*\n* @example\n* var arr = empty( 2 );\n* // returns \n*\n* @example\n* var arr = empty( 2, 'float32' );\n* // returns \n*/\nfunction empty( length ) {\n\tif ( arguments.length > 1 ) {\n\t\treturn zeros( length, arguments[ 1 ] );\n\t}\n\treturn zeros( length );\n}\n\n\n// EXPORTS //\n\nexport default empty;\n"],"names":["main","Object","defineProperty","isNumber","value","zeros","n","i","out","zeroPad","str","width","right","negative","pad","length","startsWithMinus","substr","lowercase","String","prototype","toLowerCase","uppercase","toUpperCase","formatInteger","token","base","specifier","arg","parseInt","isFinite","Error","toString","precision","padRight","sign","alternate","call","charAt","abs","Math","replace","RE_EXP_POS_DIGITS","RE_EXP_NEG_DIGITS","RE_ONLY_DIGITS","RE_DIGITS_BEFORE_EXP","RE_TRAILING_PERIOD_ZERO","RE_PERIOD_ZERO_EXP","RE_ZERO_BEFORE_EXP","formatDouble","digits","f","parseFloat","toExponential","toFixed","toPrecision","spaces","fromCharCode","isnan","isNaN","isArray","Array","initialize","flags","mapping","formatInterpolate","tokens","hasPeriod","flag","num","pos","j","TypeError","padZeros","indexOf","arguments","maxWidth","substring","RE","parse","match","formatTokenize","content","prev","exec","slice","lastIndex","push","format","args","tokenize","interpolate","apply","objectProtoype","toStr","defineGetter","__defineGetter__","defineSetter","__defineSetter__","lookupGetter","__lookupGetter__","lookupSetter","__lookupSetter__","err","hasDefinePropertySupport","builtin","obj","prop","descriptor","hasValue","hasGet","hasSet","__proto__","get","set","defineProperty$1","setNonEnumerableReadOnly","configurable","enumerable","writable","FLG","Symbol","hasToStringTagSupport","toStringTag","has","hasOwnProperty","hasOwnProp","property","Sym","toStrTag","nativeClass","hasToStringTag","v","isOwn","tag","main$b","Number","test","isPrimitive","isObject","setReadOnly","FLOAT64_PINF","POSITIVE_INFINITY","FLOAT64_NINF","NEGATIVE_INFINITY","floor","isInteger","x","PINF","NINF","isInt","valueOf","isNonNegativeInteger","hasFloat64Array","Float64Array","ctor","Float64Array$1","bool","arr","GlobalFloat64Array","NaN","hasFloat64ArraySupport","hasFloat32Array","Float32Array","Float32Array$1","GlobalFloat32Array","hasFloat32ArraySupport","hasInt16Array","Int16Array","Int16Array$1","GlobalInt16Array","INT16_MAX","hasInt16ArraySupport","hasInt32Array","Int32Array","Int32Array$1","GlobalInt32Array","INT32_MAX","hasInt32ArraySupport","hasInt8Array","Int8Array","Int8Array$1","GlobalInt8Array","INT8_MAX","hasInt8ArraySupport","hasUint16Array","Uint16Array","Uint16Array$1","GlobalUint16Array","UINT16_MAX","hasUint16ArraySupport","hasUint32Array","Uint32Array","Uint32Array$1","GlobalUint32Array","UINT32_MAX","hasUint32ArraySupport","hasUint8Array","Uint8Array","Uint8Array$1","GlobalUint8Array","UINT8_MAX","hasUint8ArraySupport","hasUint8ClampedArray","Uint8ClampedArray","Uint8ClampedArray$1","GlobalUint8ClampedArray","hasUint8ClampedArraySupport","MAX_ARRAY_LENGTH","isArrayLikeObject","MAX_LENGTH","MAX_TYPED_ARRAY_LENGTH","isCollection","hasArrayBuffer","ArrayBuffer","isArrayBuffer","main$1","isString","isBoolean","Bool","Boolean","self","window","global","globalThis","root","codegen","Function","GlobalThis","Self","Win","Global","getGlobal","nodeList","document","childNodes","typedarray","reFunctionName","RE_FUNCTION_NAME","isObjectLike","constructorName","name","constructor","_isBuffer","isBuffer","REGEXP","predicate","len","arrayfun","ctorName","type","isFunction","typeOf","Complex128","real","imag","this","re","im","fround","FLOAT32_VIEW","float64ToFloat32$1","Complex64","float64ToFloat32","isComplexLike","isEven","BYTES_PER_ELEMENT","isComplex64Array","isComplex128Array","hasIteratorSymbolSupport","iterator","IteratorSymbol","setNonEnumerableReadOnlyAccessor","getter","realf","z","imagf","reinterpret","offset","buffer","byteOffset","GETTERS","float64","idx","float32","int32","int16","int8","uint32","uint16","uint8","uint8c","generic","default","dtype","complex128","complex64","fromIterator","it","next","done","HAS_ITERATOR_SYMBOL","isComplexArray","Complex64Array","_length","_buffer","isComplexArrayConstructor","getComplex64","buf","nargs","fromArray","RangeError","reinterpret64","reinterpret128","byteLength","ITERATOR_SYMBOL","src","thisArg","clbk","tmp","flg","accessorGetter","fromIteratorMap","setReadOnlyAccessor","target","start","copyWithin","iter","entries","end","fcn","searchElement","fromIndex","separator","sep","join","outbuf","reducer","initialValue","acc","N","sbuf","outlen","begin","index","Complex128Array","getComplex128","ctors","defaults","dtypes","numeric","floating_point","real_floating_point","complex_floating_point","integer","signed_integer","unsigned_integer","DEFAULTS","HASH","DEFAULT_DTYPE","filled","table","empty"],"mappings":";;AAsBA,IAAIA,EAA0C,mBAA1BC,OAAOC,eAAkCD,OAAOC,eAAiB,KCiCrF,IAAIA,EAAiBD,OAAOC,eCjB5B,SAASC,EAAUC,GAClB,MAA0B,iBAAVA,CACjB,CCAA,SAASC,EAAOC,GACf,IACIC,EADAC,EAAM,GAEV,IAAMD,EAAI,EAAGA,EAAID,EAAGC,IACnBC,GAAO,IAER,OAAOA,CACR,CAcA,SAASC,EAASC,EAAKC,EAAOC,GAC7B,IAAIC,GAAW,EACXC,EAAMH,EAAQD,EAAIK,OACtB,OAAKD,EAAM,IAnCZ,SAA0BJ,GACzB,MAAoB,MAAbA,EAAK,EACb,CAoCMM,CAAiBN,KACrBG,GAAW,EACXH,EAAMA,EAAIO,OAAQ,IAEnBP,EAAM,EACLA,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EAAM5I,EAClB,CI3BA,SAAS2V,GAAO3V,GACf,OAAK4D,UAAU5D,OAAS,EAChBV,GAAOU,EAAQ4D,UAAW,IAE3BtE,GAAOU,EACf","x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189]} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index ed5a549..0000000 --- a/stats.html +++ /dev/null @@ -1,4842 +0,0 @@ - - - - - - - - Rollup Visualizer - - - -
- - - - - From 80700c4a5092d6556046415446e6dc932f6d52a7 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Fri, 1 Mar 2024 13:51:02 +0000 Subject: [PATCH 55/75] 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 | 36 +- SECURITY.md | 5 - benchmark/benchmark.js | 264 -- benchmark/benchmark.length.complex128.js | 93 - benchmark/benchmark.length.complex64.js | 93 - benchmark/benchmark.length.float32.js | 93 - benchmark/benchmark.length.float64.js | 93 - benchmark/benchmark.length.generic.js | 93 - benchmark/benchmark.length.int16.js | 93 - benchmark/benchmark.length.int32.js | 93 - benchmark/benchmark.length.int8.js | 93 - benchmark/benchmark.length.uint16.js | 93 - benchmark/benchmark.length.uint32.js | 93 - benchmark/benchmark.length.uint8.js | 93 - benchmark/benchmark.length.uint8c.js | 93 - branches.md | 56 - dist/index.d.ts | 3 - dist/index.js | 9 - dist/index.js.map | 7 - docs/repl.txt | 52 - docs/types/test.ts | 77 - examples/index.js | 33 - lib/index.js | 58 - lib/is_buffer_uint8array.js | 47 - lib/main.js | 107 - lib/polyfill.js | 56 - docs/types/index.d.ts => mod.d.ts | 2 +- mod.js | 4 + mod.js.map | 1 + package.json | 82 +- stats.html | 4842 +++++++++++++++++++++ test/dist/test.js | 33 - test/test.js | 60 - test/test.main.js | 274 -- test/test.polyfill.js | 324 -- 59 files changed, 4859 insertions(+), 5852 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 benchmark/benchmark.js delete mode 100644 benchmark/benchmark.length.complex128.js delete mode 100644 benchmark/benchmark.length.complex64.js delete mode 100644 benchmark/benchmark.length.float32.js delete mode 100644 benchmark/benchmark.length.float64.js delete mode 100644 benchmark/benchmark.length.generic.js delete mode 100644 benchmark/benchmark.length.int16.js delete mode 100644 benchmark/benchmark.length.int32.js delete mode 100644 benchmark/benchmark.length.int8.js delete mode 100644 benchmark/benchmark.length.uint16.js delete mode 100644 benchmark/benchmark.length.uint32.js delete mode 100644 benchmark/benchmark.length.uint8.js delete mode 100644 benchmark/benchmark.length.uint8c.js 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/repl.txt delete mode 100644 docs/types/test.ts delete mode 100644 examples/index.js delete mode 100644 lib/index.js delete mode 100644 lib/is_buffer_uint8array.js delete mode 100644 lib/main.js delete mode 100644 lib/polyfill.js rename docs/types/index.d.ts => mod.d.ts (96%) create mode 100644 mod.js create mode 100644 mod.js.map create mode 100644 stats.html delete mode 100644 test/dist/test.js delete mode 100644 test/test.js delete mode 100644 test/test.main.js delete mode 100644 test/test.polyfill.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 574ec4e..0000000 --- a/.github/.keepalive +++ /dev/null @@ -1 +0,0 @@ -2024-03-01T05:54:28.407Z diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index 96f81a8..0000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,7 +0,0 @@ - - -We are excited about your pull request, but unfortunately we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/empty) 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 ddb353e..0000000 --- a/.github/workflows/close_pull_requests.yml +++ /dev/null @@ -1,54 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: close_pull_requests - -# Workflow triggers: -on: - pull_request_target: - types: [opened] - -# Workflow jobs: -jobs: - - # Define job to close all pull requests: - run: - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Close pull request - - name: 'Close pull request' - # Pin action to full length commit SHA corresponding to v3.1.2 - uses: superbrothers/close-pull-request@9c18513d320d7b2c7185fb93396d0c664d5d8448 - with: - comment: | - Thank you for submitting a pull request. :raised_hands: - - We greatly appreciate your willingness to submit a contribution. However, we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). - - We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/empty) 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 8376c30..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: '49 1 * * 5' - - # 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 + + + + 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 8e62cb8..0000000 --- a/test/test.js +++ /dev/null @@ -1,60 +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 proxyquire = require( 'proxyquire' ); -var main = require( './../lib/main.js' ); -var polyfill = require( './../lib/polyfill.js' ); -var empty = require( './../lib' ); - - -// TESTS // - -tape( 'main export is a function', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof empty, 'function', 'main export is a function' ); - t.end(); -}); - -tape( 'if an environment supports Node.js buffer instances inheriting from Uint8Array, the main export supports returning arrays having uninitialized memory', function test( t ) { - var empty = proxyquire( './../lib', { - './is_buffer_uint8array.js': mock - }); - t.strictEqual( empty, main, 'returns expected value' ); - t.end(); - - function mock() { - return true; - } -}); - -tape( 'if an environment does not support Node.js buffer instances inheriting from Uint8Array, the main export supports returning zero-filled arrays', function test( t ) { - var empty = proxyquire( './../lib', { - './is_buffer_uint8array.js': mock - }); - t.strictEqual( empty, polyfill, 'returns expected value' ); - t.end(); - - function mock() { - return false; - } -}); diff --git a/test/test.main.js b/test/test.main.js deleted file mode 100644 index 3ceb26e..0000000 --- a/test/test.main.js +++ /dev/null @@ -1,274 +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 Float64Array = require( '@stdlib/array-float64' ); -var Float32Array = require( '@stdlib/array-float32' ); -var Int32Array = require( '@stdlib/array-int32' ); -var Uint32Array = require( '@stdlib/array-uint32' ); -var Int16Array = require( '@stdlib/array-int16' ); -var Uint16Array = require( '@stdlib/array-uint16' ); -var Int8Array = require( '@stdlib/array-int8' ); -var Uint8Array = require( '@stdlib/array-uint8' ); -var Uint8ClampedArray = require( '@stdlib/array-uint8c' ); -var Complex64Array = require( '@stdlib/array-complex64' ); -var Complex128Array = require( '@stdlib/array-complex128' ); -var instanceOf = require( '@stdlib/assert-instance-of' ); -var empty = require( './../lib/main.js' ); - - -// TESTS // - -tape( 'main export is a function', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof empty, 'function', 'main export is a function' ); - t.end(); -}); - -tape( 'the function throws an error if provided a value other than a nonnegative integer for the first argument', function test( t ) { - var values; - var i; - - values = [ - '5', - -3, - 3.14, - NaN, - true, - false, - null, - void 0, - [], - {}, - function noop() {} - ]; - - for ( i = 0; i < values.length; i++ ) { - t.throws( badValue( values[i] ), TypeError, 'throws an error when provided '+values[i] ); - } - t.end(); - - function badValue( value ) { - return function badValue() { - empty( value ); - }; - } -}); - -tape( 'the function throws an error if provided a value other than a nonnegative integer for the first argument (dtype)', function test( t ) { - var values; - var i; - - values = [ - '5', - -3, - 3.14, - NaN, - true, - false, - null, - void 0, - [], - {}, - function noop() {} - ]; - - for ( i = 0; i < values.length; i++ ) { - t.throws( badValue( values[i] ), TypeError, 'throws an error when provided '+values[i] ); - } - t.end(); - - function badValue( value ) { - return function badValue() { - empty( value, 'float32' ); - }; - } -}); - -tape( 'the function throws an error if provided an unrecognized data type', function test( t ) { - var values; - var i; - - values = [ - '5', - 'beep', - 'empty', - 'Int32', - 'Uint32', - 'Int16', - 'Uint16', - 'Int8', - 'Uint8', - 'Uint8c', - 'uint8_clamped', - 'Float64', - 'Float32', - 'FLOAT64', - 'FLOAT32', - 'GENERIC' - ]; - - for ( i = 0; i < values.length; i++ ) { - t.throws( badValue( values[i] ), TypeError, 'throws an error when provided '+values[i] ); - } - t.end(); - - function badValue( value ) { - return function badValue() { - empty( 10, value ); - }; - } -}); - -tape( 'the function returns an empty array (default)', function test( t ) { - var arr; - - arr = empty( 5 ); - t.strictEqual( instanceOf( arr, Float64Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=float64)', function test( t ) { - var arr; - - arr = empty( 5, 'float64' ); - t.strictEqual( instanceOf( arr, Float64Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=float32)', function test( t ) { - var arr; - - arr = empty( 5, 'float32' ); - t.strictEqual( instanceOf( arr, Float32Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=complex128)', function test( t ) { - var arr; - - arr = empty( 5, 'complex128' ); - t.strictEqual( instanceOf( arr, Complex128Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=complex64)', function test( t ) { - var arr; - - arr = empty( 5, 'complex64' ); - t.strictEqual( instanceOf( arr, Complex64Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=int32)', function test( t ) { - var arr; - - arr = empty( 5, 'int32' ); - t.strictEqual( instanceOf( arr, Int32Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=uint32)', function test( t ) { - var arr; - - arr = empty( 5, 'uint32' ); - t.strictEqual( instanceOf( arr, Uint32Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=int16)', function test( t ) { - var arr; - - arr = empty( 5, 'int16' ); - t.strictEqual( instanceOf( arr, Int16Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=uint16)', function test( t ) { - var arr; - - arr = empty( 5, 'uint16' ); - t.strictEqual( instanceOf( arr, Uint16Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=int8)', function test( t ) { - var arr; - - arr = empty( 5, 'int8' ); - t.strictEqual( instanceOf( arr, Int8Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=uint8)', function test( t ) { - var arr; - - arr = empty( 5, 'uint8' ); - t.strictEqual( instanceOf( arr, Uint8Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=uint8c)', function test( t ) { - var arr; - - arr = empty( 5, 'uint8c' ); - t.strictEqual( instanceOf( arr, Uint8ClampedArray ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=generic)', function test( t ) { - var expected; - var arr; - - expected = [ 0, 0, 0, 0, 0 ]; - - arr = empty( 5, 'generic' ); - t.strictEqual( instanceOf( arr, Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); diff --git a/test/test.polyfill.js b/test/test.polyfill.js deleted file mode 100644 index 17b99f3..0000000 --- a/test/test.polyfill.js +++ /dev/null @@ -1,324 +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 Float64Array = require( '@stdlib/array-float64' ); -var Float32Array = require( '@stdlib/array-float32' ); -var Int32Array = require( '@stdlib/array-int32' ); -var Uint32Array = require( '@stdlib/array-uint32' ); -var Int16Array = require( '@stdlib/array-int16' ); -var Uint16Array = require( '@stdlib/array-uint16' ); -var Int8Array = require( '@stdlib/array-int8' ); -var Uint8Array = require( '@stdlib/array-uint8' ); -var Uint8ClampedArray = require( '@stdlib/array-uint8c' ); -var Complex64Array = require( '@stdlib/array-complex64' ); -var Complex128Array = require( '@stdlib/array-complex128' ); -var reinterpret64 = require( '@stdlib/strided-base-reinterpret-complex64' ); -var reinterpret128 = require( '@stdlib/strided-base-reinterpret-complex128' ); -var instanceOf = require( '@stdlib/assert-instance-of' ); -var empty = require( './../lib/polyfill.js' ); - - -// TESTS // - -tape( 'main export is a function', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof empty, 'function', 'main export is a function' ); - t.end(); -}); - -tape( 'the function throws an error if provided a value other than a nonnegative integer for the first argument', function test( t ) { - var values; - var i; - - values = [ - '5', - -3, - 3.14, - NaN, - true, - false, - null, - void 0, - [], - {}, - function noop() {} - ]; - - for ( i = 0; i < values.length; i++ ) { - t.throws( badValue( values[i] ), TypeError, 'throws an error when provided '+values[i] ); - } - t.end(); - - function badValue( value ) { - return function badValue() { - empty( value ); - }; - } -}); - -tape( 'the function throws an error if provided a value other than a nonnegative integer for the first argument (dtype)', function test( t ) { - var values; - var i; - - values = [ - '5', - -3, - 3.14, - NaN, - true, - false, - null, - void 0, - [], - {}, - function noop() {} - ]; - - for ( i = 0; i < values.length; i++ ) { - t.throws( badValue( values[i] ), TypeError, 'throws an error when provided '+values[i] ); - } - t.end(); - - function badValue( value ) { - return function badValue() { - empty( value, 'float32' ); - }; - } -}); - -tape( 'the function throws an error if provided an unrecognized data type', function test( t ) { - var values; - var i; - - values = [ - '5', - 'beep', - 'empty', - 'Int32', - 'Uint32', - 'Int16', - 'Uint16', - 'Int8', - 'Uint8', - 'Uint8c', - 'uint8_clamped', - 'Float64', - 'Float32', - 'FLOAT64', - 'FLOAT32', - 'GENERIC' - ]; - - for ( i = 0; i < values.length; i++ ) { - t.throws( badValue( values[i] ), TypeError, 'throws an error when provided '+values[i] ); - } - t.end(); - - function badValue( value ) { - return function badValue() { - empty( 10, value ); - }; - } -}); - -tape( 'the function returns a zero-filled array (default)', function test( t ) { - var expected; - var arr; - - expected = new Float64Array( [ 0.0, 0.0, 0.0, 0.0, 0.0 ] ); - - arr = empty( 5 ); - t.strictEqual( instanceOf( arr, Float64Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=float64)', function test( t ) { - var expected; - var arr; - - expected = new Float64Array( [ 0.0, 0.0, 0.0, 0.0, 0.0 ] ); - - arr = empty( 5, 'float64' ); - t.strictEqual( instanceOf( arr, Float64Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=float32)', function test( t ) { - var expected; - var arr; - - expected = new Float32Array( [ 0.0, 0.0, 0.0, 0.0, 0.0 ] ); - - arr = empty( 5, 'float32' ); - t.strictEqual( instanceOf( arr, Float32Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=complex128)', function test( t ) { - var expected; - var arr; - - expected = new Float64Array( [ 0.0, 0.0, 0.0, 0.0 ] ); - - arr = empty( 2, 'complex128' ); - t.strictEqual( instanceOf( arr, Complex128Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length/2, 'returns expected value' ); - t.deepEqual( reinterpret128( arr, 0 ), expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=complex64)', function test( t ) { - var expected; - var arr; - - expected = new Float32Array( [ 0.0, 0.0, 0.0, 0.0 ] ); - - arr = empty( 2, 'complex64' ); - t.strictEqual( instanceOf( arr, Complex64Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length/2, 'returns expected value' ); - t.deepEqual( reinterpret64( arr, 0 ), expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=int32)', function test( t ) { - var expected; - var arr; - - expected = new Int32Array( [ 0, 0, 0, 0, 0 ] ); - - arr = empty( 5, 'int32' ); - t.strictEqual( instanceOf( arr, Int32Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=uint32)', function test( t ) { - var expected; - var arr; - - expected = new Uint32Array( [ 0, 0, 0, 0, 0 ] ); - - arr = empty( 5, 'uint32' ); - t.strictEqual( instanceOf( arr, Uint32Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=int16)', function test( t ) { - var expected; - var arr; - - expected = new Int16Array( [ 0, 0, 0, 0, 0 ] ); - - arr = empty( 5, 'int16' ); - t.strictEqual( instanceOf( arr, Int16Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=uint16)', function test( t ) { - var expected; - var arr; - - expected = new Uint16Array( [ 0, 0, 0, 0, 0 ] ); - - arr = empty( 5, 'uint16' ); - t.strictEqual( instanceOf( arr, Uint16Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=int8)', function test( t ) { - var expected; - var arr; - - expected = new Int8Array( [ 0, 0, 0, 0, 0 ] ); - - arr = empty( 5, 'int8' ); - t.strictEqual( instanceOf( arr, Int8Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=uint8)', function test( t ) { - var expected; - var arr; - - expected = new Uint8Array( [ 0, 0, 0, 0, 0 ] ); - - arr = empty( 5, 'uint8' ); - t.strictEqual( instanceOf( arr, Uint8Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=uint8c)', function test( t ) { - var expected; - var arr; - - expected = new Uint8ClampedArray( [ 0, 0, 0, 0, 0 ] ); - - arr = empty( 5, 'uint8c' ); - t.strictEqual( instanceOf( arr, Uint8ClampedArray ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=generic)', function test( t ) { - var expected; - var arr; - - expected = [ 0, 0, 0, 0, 0 ]; - - arr = empty( 5, 'generic' ); - t.strictEqual( instanceOf( arr, Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); From e12759a561fd8d29ae2eb56bf62f5610f15e9843 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Mon, 1 Apr 2024 07:28:41 +0000 Subject: [PATCH 56/75] Transform error messages --- lib/main.js | 6 +++--- package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/main.js b/lib/main.js index 33d8392..44eb4a4 100644 --- a/lib/main.js +++ b/lib/main.js @@ -26,7 +26,7 @@ var ctors = require( '@stdlib/array-typed-ctors' ); var zeros = require( '@stdlib/array-base-zeros' ); var bytesPerElement = require( '@stdlib/ndarray-base-bytes-per-element' ); var defaults = require( '@stdlib/array-defaults' ); -var format = require( '@stdlib/string-format' ); +var format = require( '@stdlib/error-tools-fmtprodmsg' ); // VARIABLES // @@ -63,7 +63,7 @@ function empty( length ) { var nb; if ( !isNonNegativeInteger( length ) ) { - throw new TypeError( format( 'invalid argument. First argument must be a nonnegative integer. Value: `%s`.', length ) ); + throw new TypeError( format( '1Zj2d', length ) ); } if ( arguments.length > 1 ) { dtype = arguments[ 1 ]; @@ -75,7 +75,7 @@ function empty( length ) { } nbytes = bytesPerElement( dtype ); if ( nbytes === null ) { - throw new TypeError( format( 'invalid argument. Second argument must be a supported data type. Value: `%s`.', dtype ) ); + throw new TypeError( format( '1ZjEC', dtype ) ); } // Resolve typed array constructor: ctor = ctors( dtype ); diff --git a/package.json b/package.json index 824d634..9aca4da 100644 --- a/package.json +++ b/package.json @@ -46,7 +46,7 @@ "@stdlib/assert-is-uint8array": "^0.2.1", "@stdlib/buffer-alloc-unsafe": "^0.2.1", "@stdlib/ndarray-base-bytes-per-element": "^0.2.1", - "@stdlib/string-format": "^0.2.1", + "@stdlib/error-tools-fmtprodmsg": "^0.2.1", "@stdlib/types": "^0.3.2", "@stdlib/error-tools-fmtprodmsg": "^0.2.1" }, From 60cdda9b1e882255b7b943f737d960ab9868275a Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Mon, 1 Apr 2024 12:57:34 +0000 Subject: [PATCH 57/75] Remove files --- mod.d.ts | 66 - mod.js | 4 - mod.js.map | 1 - stats.html | 4842 ---------------------------------------------------- 4 files changed, 4913 deletions(-) delete mode 100644 mod.d.ts delete mode 100644 mod.js delete mode 100644 mod.js.map delete mode 100644 stats.html diff --git a/mod.d.ts b/mod.d.ts deleted file mode 100644 index 863116c..0000000 --- a/mod.d.ts +++ /dev/null @@ -1,66 +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 - -/// - -import { DataTypeMap } from '@stdlib/types/array'; - -/** -* Creates an uninitialized array having a specified length. -* -* The function recognizes the following data types: -* -* - `float64`: double-precision floating-point numbers (IEEE 754) -* - `float32`: single-precision floating-point numbers (IEEE 754) -* - `complex128`: double-precision complex floating-point numbers -* - `complex64`: single-precision complex floating-point numbers -* - `int32`: 32-bit two's complement signed integers -* - `uint32`: 32-bit unsigned integers -* - `int16`: 16-bit two's complement signed integers -* - `uint16`: 16-bit unsigned integers -* - `int8`: 8-bit two's complement signed integers -* - `uint8`: 8-bit unsigned integers -* - `uint8c`: 8-bit unsigned integers clamped to `0-255` -* - `generic`: generic JavaScript values -* -* ## Notes -* -* - In browser environments, the function always returns zero-filled arrays. -* - If `dtype` is `'generic'`, the function always returns a zero-filled array. -* - In Node.js versions `>=3.0.0`, the underlying memory of returned typed arrays is **not** initialized. Memory contents are unknown and may contain **sensitive** data. -* -* @param length - array length -* @param dtype - data type (default: 'float64') -* @returns empty array -* -* @example -* var arr = empty( 2 ); -* // returns -* -* @example -* var arr = empty( 2, 'float32' ); -* // returns -*/ -declare function empty = 'float64'>( length: number, dtype?: T ): DataTypeMap[T]; - - -// EXPORTS // - -export = empty; diff --git a/mod.js b/mod.js deleted file mode 100644 index 8ffb56d..0000000 --- a/mod.js +++ /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 -/// -var r="function"==typeof Object.defineProperty?Object.defineProperty:null;var e=Object.defineProperty;function t(r){return"number"==typeof r}function n(r){var e,t="";for(e=0;e0&&(e-=1),n=i.toExponential(e)):n=i.toPrecision(r.precision),r.alternate||(n=h.call(n,v,"$1e"),n=h.call(n,w,"e"),n=h.call(n,g,""));break;default:throw new Error("invalid double notation. Value: "+r.specifier)}return n=h.call(n,c,"e+0$1"),n=h.call(n,p,"e-0$1"),r.alternate&&(n=h.call(n,y,"$1."),n=h.call(n,m,"$1.e")),i>=0&&r.sign&&(n=r.sign+n),n=r.specifier===s.call(r.specifier)?s.call(n):l.call(n)}function d(r){var e,t="";for(e=0;e127)throw new Error("invalid character code. Value: "+n.arg);n.arg=_(a)?String(n.arg):E(a)}break;case"e":case"E":case"f":case"F":case"g":case"G":e||(n.precision=6),n.arg=b(n);break;default:throw new Error("invalid specifier: "+n.specifier)}n.maxWidth>=0&&n.arg.length>n.maxWidth&&(n.arg=n.arg.substring(0,n.maxWidth)),n.padZeros?n.arg=i(n.arg,n.width||n.precision,n.padRight):n.width&&(n.arg=(c=n.arg,p=n.width,y=n.padRight,m=void 0,(m=p-c.length)<0?c:c=y?c+d(m):d(m)+c)),f+=n.arg||"",l+=1}return f}var A=/%(?:([1-9]\d*)\$)?([0 +\-#]*)(\*|\d+)?(?:(\.)(\*|\d+)?)?[hlL]?([%A-Za-z])/g;function j(r){var e={mapping:r[1]?parseInt(r[1],10):void 0,flags:r[2],width:r[3],precision:r[5],specifier:r[6]};return"."===r[4]&&void 0===r[5]&&(e.precision="1"),e}function F(r){var e,t,n,i;for(t=[],i=0,n=A.exec(r);n;)(e=r.slice(i,A.lastIndex-n[0].length)).length&&t.push(e),t.push(j(n)),i=A.lastIndex,n=A.exec(r);return(e=r.slice(i)).length&&t.push(e),t}function S(r){var e,t;if("string"!=typeof r)throw new TypeError(S("invalid argument. First argument must be a string. Value: `%s`.",r));for(e=[F(r)],t=1;trr&&tr(r)}function ir(r){return U(r)&&nr(r)}function or(r){return H(r)&&nr(r.valueOf())}function ar(r){return ir(r)||or(r)}function ur(r){return ir(r)&&r>=0}function fr(r){return or(r)&&r.valueOf()>=0}function lr(r){return ur(r)||fr(r)}N(ar,"isPrimitive",ir),N(ar,"isObject",or),N(lr,"isPrimitive",ur),N(lr,"isObject",fr);var sr="function"==typeof Float64Array;var hr="function"==typeof Float64Array?Float64Array:null;var cr="function"==typeof Float64Array?Float64Array:void 0;var pr=function(){var r,e,t;if("function"!=typeof hr)return!1;try{e=new hr([1,3.14,-3.14,NaN]),t=e,r=(sr&&t instanceof Float64Array||"[object Float64Array]"===z(t))&&1===e[0]&&3.14===e[1]&&-3.14===e[2]&&e[3]!=e[3]}catch(e){r=!1}return r}()?cr:function(){throw new Error("not implemented")},yr="function"==typeof Float32Array;var mr="function"==typeof Float32Array?Float32Array:null;var gr="function"==typeof Float32Array?Float32Array:void 0;var wr=function(){var r,e,t;if("function"!=typeof mr)return!1;try{e=new mr([1,3.14,-3.14,5e40]),t=e,r=(yr&&t instanceof Float32Array||"[object Float32Array]"===z(t))&&1===e[0]&&3.140000104904175===e[1]&&-3.140000104904175===e[2]&&e[3]===Q}catch(e){r=!1}return r}()?gr:function(){throw new Error("not implemented")},vr="function"==typeof Int16Array;var br="function"==typeof Int16Array?Int16Array:null;var dr="function"==typeof Int16Array?Int16Array:void 0;var Er=function(){var r,e,t;if("function"!=typeof br)return!1;try{e=new br([1,3.14,-3.14,32768]),t=e,r=(vr&&t instanceof Int16Array||"[object Int16Array]"===z(t))&&1===e[0]&&3===e[1]&&-3===e[2]&&-32768===e[3]}catch(e){r=!1}return r}()?dr:function(){throw new Error("not implemented")},_r="function"==typeof Int32Array;var Tr="function"==typeof Int32Array?Int32Array:null;var xr="function"==typeof Int32Array?Int32Array:void 0;var Vr=function(){var r,e,t;if("function"!=typeof Tr)return!1;try{e=new Tr([1,3.14,-3.14,2147483648]),t=e,r=(_r&&t instanceof Int32Array||"[object Int32Array]"===z(t))&&1===e[0]&&3===e[1]&&-3===e[2]&&-2147483648===e[3]}catch(e){r=!1}return r}()?xr:function(){throw new Error("not implemented")},Ar="function"==typeof Int8Array;var jr="function"==typeof Int8Array?Int8Array:null;var Fr="function"==typeof Int8Array?Int8Array:void 0;var Sr=function(){var r,e,t;if("function"!=typeof jr)return!1;try{e=new jr([1,3.14,-3.14,128]),t=e,r=(Ar&&t instanceof Int8Array||"[object Int8Array]"===z(t))&&1===e[0]&&3===e[1]&&-3===e[2]&&-128===e[3]}catch(e){r=!1}return r}()?Fr:function(){throw new Error("not implemented")},kr="function"==typeof Uint16Array;var Lr="function"==typeof Uint16Array?Uint16Array:null;var Ir="function"==typeof Uint16Array?Uint16Array:void 0;var Rr=function(){var r,e,t;if("function"!=typeof Lr)return!1;try{e=new Lr(e=[1,3.14,-3.14,65536,65537]),t=e,r=(kr&&t instanceof Uint16Array||"[object Uint16Array]"===z(t))&&1===e[0]&&3===e[1]&&65533===e[2]&&0===e[3]&&1===e[4]}catch(e){r=!1}return r}()?Ir:function(){throw new Error("not implemented")},Br="function"==typeof Uint32Array;var Or="function"==typeof Uint32Array?Uint32Array:null;var Cr="function"==typeof Uint32Array?Uint32Array:void 0;var Mr=function(){var r,e,t;if("function"!=typeof Or)return!1;try{e=new Or(e=[1,3.14,-3.14,4294967296,4294967297]),t=e,r=(Br&&t instanceof Uint32Array||"[object Uint32Array]"===z(t))&&1===e[0]&&3===e[1]&&4294967293===e[2]&&0===e[3]&&1===e[4]}catch(e){r=!1}return r}()?Cr:function(){throw new Error("not implemented")},Nr="function"==typeof Uint8Array;var Ur="function"==typeof Uint8Array?Uint8Array:null;var Pr="function"==typeof Uint8Array?Uint8Array:void 0;var Yr=function(){var r,e,t;if("function"!=typeof Ur)return!1;try{e=new Ur(e=[1,3.14,-3.14,256,257]),t=e,r=(Nr&&t instanceof Uint8Array||"[object Uint8Array]"===z(t))&&1===e[0]&&3===e[1]&&253===e[2]&&0===e[3]&&1===e[4]}catch(e){r=!1}return r}()?Pr:function(){throw new Error("not implemented")},Wr="function"==typeof Uint8ClampedArray;var $r="function"==typeof Uint8ClampedArray?Uint8ClampedArray:null;var Gr="function"==typeof Uint8ClampedArray?Uint8ClampedArray:void 0;var Zr=function(){var r,e,t;if("function"!=typeof $r)return!1;try{e=new $r([-1,0,1,3.14,4.99,255,256]),t=e,r=(Wr&&t instanceof Uint8ClampedArray||"[object Uint8ClampedArray]"===z(t))&&0===e[0]&&0===e[1]&&1===e[2]&&3===e[3]&&5===e[4]&&255===e[5]&&255===e[6]}catch(e){r=!1}return r}()?Gr:function(){throw new Error("not implemented")},Xr=4294967295;function zr(r){return"object"==typeof r&&null!==r&&"number"==typeof r.length&&tr(r.length)&&r.length>=0&&r.length<=Xr}var Jr=9007199254740991;function qr(r){return"object"==typeof r&&null!==r&&"number"==typeof r.length&&tr(r.length)&&r.length>=0&&r.length<=Jr}var Dr="function"==typeof ArrayBuffer;function Hr(r){return Dr&&r instanceof ArrayBuffer||"[object ArrayBuffer]"===z(r)}var Kr=Array.isArray?Array.isArray:function(r){return"[object Array]"===z(r)};function Qr(r){return"object"==typeof r&&null!==r&&!Kr(r)}function re(r){return"string"==typeof r}var ee=String.prototype.valueOf;var te=Y();function ne(r){return"object"==typeof r&&(r instanceof String||(te?function(r){try{return ee.call(r),!0}catch(r){return!1}}(r):"[object String]"===z(r)))}function ie(r){return re(r)||ne(r)}N(ie,"isPrimitive",re),N(ie,"isObject",ne);var oe=/./;function ae(r){return"boolean"==typeof r}var ue=Boolean,fe=Boolean.prototype.toString;var le=Y();function se(r){return"object"==typeof r&&(r instanceof ue||(le?function(r){try{return fe.call(r),!0}catch(r){return!1}}(r):"[object Boolean]"===z(r)))}function he(r){return ae(r)||se(r)}N(he,"isPrimitive",ae),N(he,"isObject",se);var ce="object"==typeof self?self:null,pe="object"==typeof window?window:null,ye="undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},me="object"==typeof ye?ye:null,ge="object"==typeof globalThis?globalThis:null;var we=function(r){if(arguments.length){if(!ae(r))throw new TypeError(S("invalid argument. Must provide a boolean. Value: `%s`.",r));if(r)return new Function("return this;")()}if(ge)return ge;if(ce)return ce;if(pe)return pe;if(me)return me;throw new Error("unexpected error. Unable to resolve global object.")}(),ve=we.document&&we.document.childNodes,be=Int8Array;function de(){return/^\s*function\s*([^(]*)/i}var Ee=/^\s*function\s*([^(]*)/i;function _e(r){return null!==r&&"object"==typeof r}function Te(r){var e,t,n,i;if(("Object"===(t=z(r).slice(8,-1))||"Error"===t)&&r.constructor){if("string"==typeof(n=r.constructor).name)return n.name;if(e=Ee.exec(n.toString()))return e[1]}return _e(i=r)&&(i._isBuffer||i.constructor&&"function"==typeof i.constructor.isBuffer&&i.constructor.isBuffer(i))?"Buffer":t}N(de,"REGEXP",Ee),N(_e,"isObjectLikeArray",function(r){if("function"!=typeof r)throw new TypeError(S("invalid argument. Must provide a function. Value: `%s`.",r));return function(e){var t,n;if(!Kr(e))return!1;if(0===(t=e.length))return!1;for(n=0;n=2)e.push(n[0],n[1]);else{if(!Le(n))return new TypeError(S("invalid argument. An iterator must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",n));e.push(Pe(n),Ye(n))}return e}var qe=2*wr.BYTES_PER_ELEMENT,De=Me();function He(r){return r instanceof rt||"object"==typeof r&&null!==r&&("Complex64Array"===r.constructor.name||"Complex128Array"===r.constructor.name)&&"number"==typeof r._length&&"object"==typeof r._buffer}function Ke(r){return r===rt||"Complex128Array"===r.name}function Qe(r,e){return new ke(r[e*=2],r[e+1])}function rt(){var r,e,t,n;if(e=arguments.length,!(this instanceof rt))return 0===e?new rt:1===e?new rt(arguments[0]):2===e?new rt(arguments[0],arguments[1]):new rt(arguments[0],arguments[1],arguments[2]);if(0===e)t=new wr(0);else if(1===e)if(ur(arguments[0]))t=new wr(2*arguments[0]);else if(qr(arguments[0]))if((n=(t=arguments[0]).length)&&Kr(t)&&Le(t[0])){if(t=function(r,e){var t,n,i,o;for(t=e.length,o=0,i=0;it.byteLength-r)throw new RangeError(S("invalid arguments. ArrayBuffer has insufficient capacity. Either decrease the array length or provide a bigger buffer. Minimum capacity: `%u`.",n*qe));t=new wr(t,r,2*n)}}return N(this,"_buffer",t),N(this,"_length",t.length/2),this}function et(r){return r.re}function tt(r){return r.im}function nt(r){var e,t,n;for(e=[];!(t=r.next()).done;)if(zr(n=t.value)&&n.length>=2)e.push(n[0],n[1]);else{if(!Le(n))return new TypeError(S("invalid argument. An iterator must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",n));e.push(et(n),tt(n))}return e}N(rt,"BYTES_PER_ELEMENT",qe),N(rt,"name","Complex64Array"),N(rt,"from",(function(r){var e,t,n,i,o,a,u,f,l,s,h,c;if(!Ve(this))throw new TypeError("invalid invocation. `this` context must be a constructor.");if(!Ke(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if((t=arguments.length)>1){if(!Ve(n=arguments[1]))throw new TypeError(S("invalid argument. Second argument must be a function. Value: `%s`.",n));t>2&&(e=arguments[2])}if(He(r)){if(f=r.length,n){for(o=(i=new this(f))._buffer,c=0,h=0;h=2))throw new TypeError(S("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",s));o[c]=s[0],o[c+1]=s[1]}c+=2}return i}return new this(r)}if(qr(r)){if(n){for(f=r.length,u=r.get&&r.set?ze("default"):Ze("default"),h=0;h=2))throw new TypeError(S("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",s));o[c]=s[0],o[c+1]=s[1]}c+=2}return i}return new this(r)}if(Qr(r)&&De&&Ve(r[Ne])){if(!Ve((o=r[Ne]()).next))throw new TypeError(S("invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.",r));if(a=n?function(r,e,t){var n,i,o,a;for(n=[],a=-1;!(i=r.next()).done;)if(a+=1,zr(o=e.call(t,i.value,a))&&o.length>=2)n.push(o[0],o[1]);else{if(!Le(o))return new TypeError(S("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",o));n.push(Pe(o),Ye(o))}return n}(o,n,e):Je(o),a instanceof Error)throw a;for(o=(i=new this(f=a.length/2))._buffer,h=0;h=this._length))return Qe(this._buffer,r)})),Ue(rt.prototype,"buffer",(function(){return this._buffer.buffer})),Ue(rt.prototype,"byteLength",(function(){return this._buffer.byteLength})),Ue(rt.prototype,"byteOffset",(function(){return this._buffer.byteOffset})),N(rt.prototype,"BYTES_PER_ELEMENT",rt.BYTES_PER_ELEMENT),N(rt.prototype,"copyWithin",(function(r,e){if(!He(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");return 2===arguments.length?this._buffer.copyWithin(2*r,2*e):this._buffer.copyWithin(2*r,2*e,2*arguments[2]),this})),N(rt.prototype,"entries",(function(){var r,e,t,n,i,o,a;if(!He(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");return e=this,r=this._buffer,n=this._length,o=-1,a=-2,N(t={},"next",(function(){var e;if(o+=1,i||o>=n)return{done:!0};return e=new ke(r[a+=2],r[a+1]),{value:[o,e],done:!1}})),N(t,"return",(function(r){if(i=!0,arguments.length)return{value:r,done:!0};return{done:!0}})),Ne&&N(t,Ne,(function(){return e.entries()})),t})),N(rt.prototype,"every",(function(r,e){var t,n;if(!He(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Ve(r))throw new TypeError(S("invalid argument. First argument must be a function. Value: `%s`.",r));for(t=this._buffer,n=0;n1){if(!tr(e))throw new TypeError(S("invalid argument. Second argument must be an integer. Value: `%s`.",e));if(e<0&&(e+=i)<0&&(e=0),arguments.length>2){if(!tr(t))throw new TypeError(S("invalid argument. Third argument must be an integer. Value: `%s`.",t));t<0&&(t+=i)<0&&(t=0),t>i&&(t=i)}else t=i}else e=0,t=i;for(a=Pe(r),u=Ye(r),f=e;f=0;n--)if(i=Qe(t,n),r.call(e,i,n,this))return i})),N(rt.prototype,"findLastIndex",(function(r,e){var t,n,i;if(!He(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Ve(r))throw new TypeError(S("invalid argument. First argument must be a function. Value: `%s`.",r));for(t=this._buffer,n=this._length-1;n>=0;n--)if(i=Qe(t,n),r.call(e,i,n,this))return n;return-1})),N(rt.prototype,"forEach",(function(r,e){var t,n,i;if(!He(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Ve(r))throw new TypeError(S("invalid argument. First argument must be a function. Value: `%s`.",r));for(t=this._buffer,n=0;n=this._length))return Qe(this._buffer,r)})),N(rt.prototype,"includes",(function(r,e){var t,n,i,o,a;if(!He(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Le(r))throw new TypeError(S("invalid argument. First argument must be a complex number. Value: `%s`.",r));if(arguments.length>1){if(!tr(e))throw new TypeError(S("invalid argument. Second argument must be an integer. Value: `%s`.",e));e<0&&(e+=this._length)<0&&(e=0)}else e=0;for(i=Pe(r),o=Ye(r),t=this._buffer,a=e;a1){if(!tr(e))throw new TypeError(S("invalid argument. Second argument must be an integer. Value: `%s`.",e));e<0&&(e+=this._length)<0&&(e=0)}else e=0;for(i=Pe(r),o=Ye(r),t=this._buffer,a=e;a1){if(!tr(e))throw new TypeError(S("invalid argument. Second argument must be an integer. Value: `%s`.",e));e>=this._length?e=this._length-1:e<0&&(e+=this._length)}else e=this._length-1;for(i=Pe(r),o=Ye(r),t=this._buffer,a=e;a>=0;a--)if(i===t[n=2*a]&&o===t[n+1])return a;return-1})),Ue(rt.prototype,"length",(function(){return this._length})),N(rt.prototype,"map",(function(r,e){var t,n,i,o,a;if(!He(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Ve(r))throw new TypeError(S("invalid argument. First argument must be a function. Value: `%s`.",r));for(n=this._buffer,t=(i=new this.constructor(this._length))._buffer,o=0;o1)n=e,o=0;else{if(0===i)throw new Error("invalid operation. If not provided an initial value, an array must contain at least one element.");n=Qe(t,0),o=1}for(;o1){if(!ur(t=arguments[1]))throw new TypeError(S("invalid argument. Index argument must be a nonnegative integer. Value: `%s`.",t))}else t=0;if(Le(r)){if(t>=this._length)throw new RangeError(S("invalid argument. Index argument is out-of-bounds. Value: `%u`.",t));return n[t*=2]=Pe(r),void(n[t+1]=Ye(r))}if(He(r)){if(t+(a=r._length)>this._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");if(e=r._buffer,l=n.byteOffset+t*qe,e.buffer===n.buffer&&e.byteOffsetl){for(i=new wr(e.length),f=0;fthis._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");if(e=r,l=n.byteOffset+t*qe,e.buffer===n.buffer&&e.byteOffsetl){for(i=new wr(a),f=0;fthis._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");for(t*=2,f=0;fu&&(e=u)}}for(t=ri&&(e=i)}}return r>=i?(i=0,t=n.byteLength):r>=e?(i=0,t=n.byteOffset+r*qe):(i=e-r,t=n.byteOffset+r*qe),new this.constructor(n.buffer,t,i<0?0:i)})),N(rt.prototype,"toReversed",(function(){var r,e,t,n,i,o;if(!He(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");for(t=this._length,e=new this.constructor(t),n=this._buffer,r=e._buffer,i=0;i=i)throw new RangeError(S("invalid argument. Index argument is out-of-bounds. Value: `%s`.",r));if(!Le(e))throw new TypeError(S("invalid argument. Second argument must be a complex number. Value: `%s`.",e));return(t=(n=new this.constructor(this._buffer))._buffer)[2*r]=Pe(e),t[2*r+1]=Ye(e),n}));var it=2*pr.BYTES_PER_ELEMENT,ot=Me();function at(r){return r instanceof lt||"object"==typeof r&&null!==r&&("Complex64Array"===r.constructor.name||"Complex128Array"===r.constructor.name)&&"number"==typeof r._length&&"object"==typeof r._buffer}function ut(r){return r===lt||"Complex64Array"===r.name}function ft(r,e){return new Ae(r[e*=2],r[e+1])}function lt(){var r,e,t,n;if(e=arguments.length,!(this instanceof lt))return 0===e?new lt:1===e?new lt(arguments[0]):2===e?new lt(arguments[0],arguments[1]):new lt(arguments[0],arguments[1],arguments[2]);if(0===e)t=new pr(0);else if(1===e)if(ur(arguments[0]))t=new pr(2*arguments[0]);else if(qr(arguments[0]))if((n=(t=arguments[0]).length)&&Kr(t)&&Le(t[0])){if(t=function(r,e){var t,n,i,o;for(t=e.length,o=0,i=0;it.byteLength-r)throw new RangeError(S("invalid arguments. ArrayBuffer has insufficient capacity. Either decrease the array length or provide a bigger buffer. Minimum capacity: `%u`.",n*it));t=new pr(t,r,2*n)}}return N(this,"_buffer",t),N(this,"_length",t.length/2),this}N(lt,"BYTES_PER_ELEMENT",it),N(lt,"name","Complex128Array"),N(lt,"from",(function(r){var e,t,n,i,o,a,u,f,l,s,h,c;if(!Ve(this))throw new TypeError("invalid invocation. `this` context must be a constructor.");if(!ut(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if((t=arguments.length)>1){if(!Ve(n=arguments[1]))throw new TypeError(S("invalid argument. Second argument must be a function. Value: `%s`.",n));t>2&&(e=arguments[2])}if(at(r)){if(f=r.length,n){for(o=(i=new this(f))._buffer,c=0,h=0;h=2))throw new TypeError(S("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",s));o[c]=s[0],o[c+1]=s[1]}c+=2}return i}return new this(r)}if(qr(r)){if(n){for(f=r.length,u=r.get&&r.set?ze("default"):Ze("default"),h=0;h=2))throw new TypeError(S("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",s));o[c]=s[0],o[c+1]=s[1]}c+=2}return i}return new this(r)}if(Qr(r)&&ot&&Ve(r[Ne])){if(!Ve((o=r[Ne]()).next))throw new TypeError(S("invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.",r));if(a=n?function(r,e,t){var n,i,o,a;for(n=[],a=-1;!(i=r.next()).done;)if(a+=1,zr(o=e.call(t,i.value,a))&&o.length>=2)n.push(o[0],o[1]);else{if(!Le(o))return new TypeError(S("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",o));n.push(et(o),tt(o))}return n}(o,n,e):nt(o),a instanceof Error)throw a;for(o=(i=new this(f=a.length/2))._buffer,h=0;h=this._length))return ft(this._buffer,r)})),Ue(lt.prototype,"buffer",(function(){return this._buffer.buffer})),Ue(lt.prototype,"byteLength",(function(){return this._buffer.byteLength})),Ue(lt.prototype,"byteOffset",(function(){return this._buffer.byteOffset})),N(lt.prototype,"BYTES_PER_ELEMENT",lt.BYTES_PER_ELEMENT),N(lt.prototype,"copyWithin",(function(r,e){if(!at(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");return 2===arguments.length?this._buffer.copyWithin(2*r,2*e):this._buffer.copyWithin(2*r,2*e,2*arguments[2]),this})),N(lt.prototype,"entries",(function(){var r,e,t,n,i,o,a;if(!at(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");return e=this,r=this._buffer,n=this._length,o=-1,a=-2,N(t={},"next",(function(){var e;if(o+=1,i||o>=n)return{done:!0};return e=new Ae(r[a+=2],r[a+1]),{value:[o,e],done:!1}})),N(t,"return",(function(r){if(i=!0,arguments.length)return{value:r,done:!0};return{done:!0}})),Ne&&N(t,Ne,(function(){return e.entries()})),t})),N(lt.prototype,"every",(function(r,e){var t,n;if(!at(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Ve(r))throw new TypeError(S("invalid argument. First argument must be a function. Value: `%s`.",r));for(t=this._buffer,n=0;n1){if(!tr(e))throw new TypeError(S("invalid argument. Second argument must be an integer. Value: `%s`.",e));if(e<0&&(e+=i)<0&&(e=0),arguments.length>2){if(!tr(t))throw new TypeError(S("invalid argument. Third argument must be an integer. Value: `%s`.",t));t<0&&(t+=i)<0&&(t=0),t>i&&(t=i)}else t=i}else e=0,t=i;for(a=et(r),u=tt(r),f=e;f=0;n--)if(i=ft(t,n),r.call(e,i,n,this))return i})),N(lt.prototype,"findLastIndex",(function(r,e){var t,n,i;if(!at(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Ve(r))throw new TypeError(S("invalid argument. First argument must be a function. Value: `%s`.",r));for(t=this._buffer,n=this._length-1;n>=0;n--)if(i=ft(t,n),r.call(e,i,n,this))return n;return-1})),N(lt.prototype,"forEach",(function(r,e){var t,n,i;if(!at(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Ve(r))throw new TypeError(S("invalid argument. First argument must be a function. Value: `%s`.",r));for(t=this._buffer,n=0;n=this._length))return ft(this._buffer,r)})),Ue(lt.prototype,"length",(function(){return this._length})),N(lt.prototype,"includes",(function(r,e){var t,n,i,o,a;if(!at(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Le(r))throw new TypeError(S("invalid argument. First argument must be a complex number. Value: `%s`.",r));if(arguments.length>1){if(!tr(e))throw new TypeError(S("invalid argument. Second argument must be an integer. Value: `%s`.",e));e<0&&(e+=this._length)<0&&(e=0)}else e=0;for(i=et(r),o=tt(r),t=this._buffer,a=e;a1){if(!tr(e))throw new TypeError(S("invalid argument. Second argument must be an integer. Value: `%s`.",e));e<0&&(e+=this._length)<0&&(e=0)}else e=0;for(i=et(r),o=tt(r),t=this._buffer,a=e;a1){if(!tr(e))throw new TypeError(S("invalid argument. Second argument must be an integer. Value: `%s`.",e));e>=this._length?e=this._length-1:e<0&&(e+=this._length)}else e=this._length-1;for(i=et(r),o=tt(r),t=this._buffer,a=e;a>=0;a--)if(i===t[n=2*a]&&o===t[n+1])return a;return-1})),N(lt.prototype,"map",(function(r,e){var t,n,i,o,a;if(!at(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Ve(r))throw new TypeError(S("invalid argument. First argument must be a function. Value: `%s`.",r));for(n=this._buffer,t=(i=new this.constructor(this._length))._buffer,o=0;o1)n=e,o=0;else{if(0===i)throw new Error("invalid operation. If not provided an initial value, an array must contain at least one element.");n=ft(t,0),o=1}for(;o1){if(!ur(t=arguments[1]))throw new TypeError(S("invalid argument. Index argument must be a nonnegative integer. Value: `%s`.",t))}else t=0;if(Le(r)){if(t>=this._length)throw new RangeError(S("invalid argument. Index argument is out-of-bounds. Value: `%u`.",t));return n[t*=2]=et(r),void(n[t+1]=tt(r))}if(at(r)){if(t+(a=r._length)>this._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");if(e=r._buffer,l=n.byteOffset+t*it,e.buffer===n.buffer&&e.byteOffsetl){for(i=new pr(e.length),f=0;fthis._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");if(e=r,l=n.byteOffset+t*it,e.buffer===n.buffer&&e.byteOffsetl){for(i=new pr(a),f=0;fthis._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");for(t*=2,f=0;fu&&(e=u)}}for(t=ri&&(e=i)}}return r>=i?(i=0,t=n.byteLength):r>=e?(i=0,t=n.byteOffset+r*it):(i=e-r,t=n.byteOffset+r*it),new this.constructor(n.buffer,t,i<0?0:i)})),N(lt.prototype,"toReversed",(function(){var r,e,t,n,i,o;if(!at(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");for(t=this._length,e=new this.constructor(t),n=this._buffer,r=e._buffer,i=0;i=i)throw new RangeError(S("invalid argument. Index argument is out-of-bounds. Value: `%s`.",r));if(!Le(e))throw new TypeError(S("invalid argument. Second argument must be a complex number. Value: `%s`.",e));return(t=(n=new this.constructor(this._buffer))._buffer)[2*r]=et(e),t[2*r+1]=tt(e),n}));var st={float64:pr,float32:wr,generic:Array,int16:Er,int32:Vr,int8:Sr,uint16:Rr,uint32:Mr,uint8:Yr,uint8c:Zr,complex64:rt,complex128:lt};function ht(){return{dtypes:{default:"float64",numeric:"float64",real:"float64",floating_point:"float64",real_floating_point:"float64",complex_floating_point:"complex128",integer:"int32",signed_integer:"int32",unsigned_integer:"uint32"}}}var ct={dtypes:{default:"float64",numeric:"float64",real:"float64",floating_point:"float64",real_floating_point:"float64",complex_floating_point:"complex128",integer:"int32",signed_integer:"int32",unsigned_integer:"uint32"}},pt={"dtypes.default":ct.dtypes.default,"dtypes.numeric":ct.dtypes.numeric,"dtypes.real":ct.dtypes.real,"dtypes.floating_point":ct.dtypes.floating_point,"dtypes.real_floating_point":ct.dtypes.real_floating_point,"dtypes.complex_floating_point":ct.dtypes.complex_floating_point,"dtypes.integer":ct.dtypes.integer,"dtypes.signed_integer":ct.dtypes.signed_integer,"dtypes.unsigned_integer":ct.dtypes.unsigned_integer};N(ht,"get",(function(r){var e=pt[r];return void 0===e?null:e}));var yt=ht.get("dtypes.default");function mt(r){var e,t;if(!ur(r))throw new TypeError(S("invalid argument. First argument must be a nonnegative integer. Value: `%s`.",r));if("generic"===(e=arguments.length>1?arguments[1]:yt))return function(r,e){var t,n;for(t=[],n=0;n1?mt(r,arguments[1]):mt(r)}export{gt as default}; -//# sourceMappingURL=mod.js.map diff --git a/mod.js.map b/mod.js.map deleted file mode 100644 index 7b2fd54..0000000 --- a/mod.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"mod.js","sources":["../node_modules/@stdlib/utils-define-property/lib/define_property.js","../node_modules/@stdlib/utils-define-property/lib/builtin.js","../node_modules/@stdlib/string-base-format-interpolate/lib/is_number.js","../node_modules/@stdlib/string-base-format-interpolate/lib/zero_pad.js","../node_modules/@stdlib/string-base-format-interpolate/lib/format_integer.js","../node_modules/@stdlib/string-base-format-interpolate/lib/format_double.js","../node_modules/@stdlib/string-base-format-interpolate/lib/space_pad.js","../node_modules/@stdlib/string-base-format-interpolate/lib/main.js","../node_modules/@stdlib/string-base-format-interpolate/lib/is_string.js","../node_modules/@stdlib/string-base-format-tokenize/lib/main.js","../node_modules/@stdlib/string-format/lib/main.js","../node_modules/@stdlib/string-format/lib/is_string.js","../node_modules/@stdlib/utils-define-property/lib/polyfill.js","../node_modules/@stdlib/utils-define-property/lib/index.js","../node_modules/@stdlib/utils-define-property/lib/has_define_property_support.js","../node_modules/@stdlib/utils-define-nonenumerable-read-only-property/lib/main.js","../node_modules/@stdlib/assert-is-number/lib/primitive.js","../node_modules/@stdlib/assert-has-tostringtag-support/lib/main.js","../node_modules/@stdlib/assert-has-symbol-support/lib/main.js","../node_modules/@stdlib/utils-native-class/lib/tostring.js","../node_modules/@stdlib/assert-has-own-property/lib/main.js","../node_modules/@stdlib/symbol-ctor/lib/main.js","../node_modules/@stdlib/utils-native-class/lib/tostringtag.js","../node_modules/@stdlib/utils-native-class/lib/index.js","../node_modules/@stdlib/utils-native-class/lib/polyfill.js","../node_modules/@stdlib/utils-native-class/lib/main.js","../node_modules/@stdlib/number-ctor/lib/main.js","../node_modules/@stdlib/assert-is-number/lib/tostring.js","../node_modules/@stdlib/assert-is-number/lib/object.js","../node_modules/@stdlib/assert-is-number/lib/try2serialize.js","../node_modules/@stdlib/assert-is-number/lib/main.js","../node_modules/@stdlib/assert-is-number/lib/index.js","../node_modules/@stdlib/constants-float64-pinf/lib/index.js","../node_modules/@stdlib/constants-float64-ninf/lib/index.js","../node_modules/@stdlib/math-base-special-floor/lib/main.js","../node_modules/@stdlib/math-base-assert-is-integer/lib/main.js","../node_modules/@stdlib/assert-is-integer/lib/integer.js","../node_modules/@stdlib/assert-is-integer/lib/primitive.js","../node_modules/@stdlib/assert-is-integer/lib/object.js","../node_modules/@stdlib/assert-is-integer/lib/main.js","../node_modules/@stdlib/assert-is-nonnegative-integer/lib/primitive.js","../node_modules/@stdlib/assert-is-nonnegative-integer/lib/object.js","../node_modules/@stdlib/assert-is-nonnegative-integer/lib/main.js","../node_modules/@stdlib/assert-is-integer/lib/index.js","../node_modules/@stdlib/assert-is-nonnegative-integer/lib/index.js","../node_modules/@stdlib/assert-is-float64array/lib/main.js","../node_modules/@stdlib/assert-has-float64array-support/lib/float64array.js","../node_modules/@stdlib/array-float64/lib/main.js","../node_modules/@stdlib/array-float64/lib/index.js","../node_modules/@stdlib/assert-has-float64array-support/lib/main.js","../node_modules/@stdlib/array-float64/lib/polyfill.js","../node_modules/@stdlib/assert-is-float32array/lib/main.js","../node_modules/@stdlib/assert-has-float32array-support/lib/float32array.js","../node_modules/@stdlib/array-float32/lib/main.js","../node_modules/@stdlib/array-float32/lib/index.js","../node_modules/@stdlib/assert-has-float32array-support/lib/main.js","../node_modules/@stdlib/array-float32/lib/polyfill.js","../node_modules/@stdlib/assert-is-int16array/lib/main.js","../node_modules/@stdlib/constants-int16-max/lib/index.js","../node_modules/@stdlib/assert-has-int16array-support/lib/int16array.js","../node_modules/@stdlib/array-int16/lib/main.js","../node_modules/@stdlib/array-int16/lib/index.js","../node_modules/@stdlib/assert-has-int16array-support/lib/main.js","../node_modules/@stdlib/constants-int16-min/lib/index.js","../node_modules/@stdlib/array-int16/lib/polyfill.js","../node_modules/@stdlib/assert-is-int32array/lib/main.js","../node_modules/@stdlib/constants-int32-max/lib/index.js","../node_modules/@stdlib/assert-has-int32array-support/lib/int32array.js","../node_modules/@stdlib/array-int32/lib/main.js","../node_modules/@stdlib/array-int32/lib/index.js","../node_modules/@stdlib/assert-has-int32array-support/lib/main.js","../node_modules/@stdlib/constants-int32-min/lib/index.js","../node_modules/@stdlib/array-int32/lib/polyfill.js","../node_modules/@stdlib/assert-is-int8array/lib/main.js","../node_modules/@stdlib/constants-int8-max/lib/index.js","../node_modules/@stdlib/assert-has-int8array-support/lib/int8array.js","../node_modules/@stdlib/array-int8/lib/main.js","../node_modules/@stdlib/array-int8/lib/index.js","../node_modules/@stdlib/assert-has-int8array-support/lib/main.js","../node_modules/@stdlib/constants-int8-min/lib/index.js","../node_modules/@stdlib/array-int8/lib/polyfill.js","../node_modules/@stdlib/assert-is-uint16array/lib/main.js","../node_modules/@stdlib/constants-uint16-max/lib/index.js","../node_modules/@stdlib/assert-has-uint16array-support/lib/uint16array.js","../node_modules/@stdlib/array-uint16/lib/main.js","../node_modules/@stdlib/array-uint16/lib/index.js","../node_modules/@stdlib/assert-has-uint16array-support/lib/main.js","../node_modules/@stdlib/array-uint16/lib/polyfill.js","../node_modules/@stdlib/assert-is-uint32array/lib/main.js","../node_modules/@stdlib/constants-uint32-max/lib/index.js","../node_modules/@stdlib/assert-has-uint32array-support/lib/uint32array.js","../node_modules/@stdlib/array-uint32/lib/main.js","../node_modules/@stdlib/array-uint32/lib/index.js","../node_modules/@stdlib/assert-has-uint32array-support/lib/main.js","../node_modules/@stdlib/array-uint32/lib/polyfill.js","../node_modules/@stdlib/assert-is-uint8array/lib/main.js","../node_modules/@stdlib/constants-uint8-max/lib/index.js","../node_modules/@stdlib/assert-has-uint8array-support/lib/uint8array.js","../node_modules/@stdlib/array-uint8/lib/main.js","../node_modules/@stdlib/array-uint8/lib/index.js","../node_modules/@stdlib/assert-has-uint8array-support/lib/main.js","../node_modules/@stdlib/array-uint8/lib/polyfill.js","../node_modules/@stdlib/assert-is-uint8clampedarray/lib/main.js","../node_modules/@stdlib/assert-has-uint8clampedarray-support/lib/uint8clampedarray.js","../node_modules/@stdlib/array-uint8c/lib/main.js","../node_modules/@stdlib/array-uint8c/lib/index.js","../node_modules/@stdlib/assert-has-uint8clampedarray-support/lib/main.js","../node_modules/@stdlib/array-uint8c/lib/polyfill.js","../node_modules/@stdlib/constants-array-max-array-length/lib/index.js","../node_modules/@stdlib/assert-is-array-like-object/lib/main.js","../node_modules/@stdlib/constants-array-max-typed-array-length/lib/index.js","../node_modules/@stdlib/assert-is-collection/lib/main.js","../node_modules/@stdlib/assert-is-arraybuffer/lib/main.js","../node_modules/@stdlib/assert-is-array/lib/main.js","../node_modules/@stdlib/assert-is-object/lib/main.js","../node_modules/@stdlib/assert-is-string/lib/primitive.js","../node_modules/@stdlib/assert-is-string/lib/valueof.js","../node_modules/@stdlib/assert-is-string/lib/object.js","../node_modules/@stdlib/assert-is-string/lib/try2valueof.js","../node_modules/@stdlib/assert-is-string/lib/main.js","../node_modules/@stdlib/assert-is-string/lib/index.js","../node_modules/@stdlib/utils-type-of/lib/fixtures/re.js","../node_modules/@stdlib/assert-is-boolean/lib/primitive.js","../node_modules/@stdlib/boolean-ctor/lib/main.js","../node_modules/@stdlib/assert-is-boolean/lib/tostring.js","../node_modules/@stdlib/assert-is-boolean/lib/object.js","../node_modules/@stdlib/assert-is-boolean/lib/try2serialize.js","../node_modules/@stdlib/assert-is-boolean/lib/main.js","../node_modules/@stdlib/assert-is-boolean/lib/index.js","../node_modules/@stdlib/utils-global/lib/self.js","../node_modules/@stdlib/utils-global/lib/window.js","../node_modules/@stdlib/utils-global/lib/global.js","../node_modules/@stdlib/utils-global/lib/global_this.js","../node_modules/@stdlib/utils-type-of/lib/fixtures/nodelist.js","../node_modules/@stdlib/utils-global/lib/main.js","../node_modules/@stdlib/utils-global/lib/codegen.js","../node_modules/@stdlib/utils-type-of/lib/fixtures/typedarray.js","../node_modules/@stdlib/regexp-function-name/lib/main.js","../node_modules/@stdlib/regexp-function-name/lib/regexp.js","../node_modules/@stdlib/assert-is-object-like/lib/main.js","../node_modules/@stdlib/utils-constructor-name/lib/main.js","../node_modules/@stdlib/assert-is-buffer/lib/main.js","../node_modules/@stdlib/regexp-function-name/lib/index.js","../node_modules/@stdlib/assert-is-object-like/lib/index.js","../node_modules/@stdlib/assert-tools-array-function/lib/main.js","../node_modules/@stdlib/utils-type-of/lib/index.js","../node_modules/@stdlib/utils-type-of/lib/check.js","../node_modules/@stdlib/utils-type-of/lib/polyfill.js","../node_modules/@stdlib/utils-type-of/lib/main.js","../node_modules/@stdlib/assert-is-function/lib/main.js","../node_modules/@stdlib/complex-float64/lib/main.js","../node_modules/@stdlib/complex-float64/lib/tostring.js","../node_modules/@stdlib/complex-float64/lib/tojson.js","../node_modules/@stdlib/number-float64-base-to-float32/lib/main.js","../node_modules/@stdlib/number-float64-base-to-float32/lib/polyfill.js","../node_modules/@stdlib/number-float64-base-to-float32/lib/index.js","../node_modules/@stdlib/complex-float32/lib/main.js","../node_modules/@stdlib/assert-is-complex-like/lib/main.js","../node_modules/@stdlib/math-base-assert-is-even/lib/main.js","../node_modules/@stdlib/complex-float32/lib/tostring.js","../node_modules/@stdlib/complex-float32/lib/tojson.js","../node_modules/@stdlib/array-base-assert-is-complex64array/lib/main.js","../node_modules/@stdlib/array-base-assert-is-complex128array/lib/main.js","../node_modules/@stdlib/assert-has-iterator-symbol-support/lib/main.js","../node_modules/@stdlib/symbol-iterator/lib/main.js","../node_modules/@stdlib/utils-define-nonenumerable-read-only-accessor/lib/main.js","../node_modules/@stdlib/complex-realf/lib/main.js","../node_modules/@stdlib/complex-imagf/lib/main.js","../node_modules/@stdlib/strided-base-reinterpret-complex64/lib/main.js","../node_modules/@stdlib/strided-base-reinterpret-complex128/lib/main.js","../node_modules/@stdlib/array-base-getter/lib/main.js","../node_modules/@stdlib/array-base-accessor-getter/lib/main.js","../node_modules/@stdlib/array-complex64/lib/from_iterator.js","../node_modules/@stdlib/array-complex64/lib/main.js","../node_modules/@stdlib/array-complex64/lib/from_array.js","../node_modules/@stdlib/complex-real/lib/main.js","../node_modules/@stdlib/complex-imag/lib/main.js","../node_modules/@stdlib/array-complex128/lib/from_iterator.js","../node_modules/@stdlib/array-complex64/lib/from_iterator_map.js","../node_modules/@stdlib/array-complex128/lib/main.js","../node_modules/@stdlib/array-complex128/lib/from_array.js","../node_modules/@stdlib/array-complex128/lib/from_iterator_map.js","../node_modules/@stdlib/array-ctors/lib/ctors.js","../node_modules/@stdlib/array-defaults/lib/main.js","../node_modules/@stdlib/array-defaults/lib/get.js","../node_modules/@stdlib/array-defaults/lib/index.js","../node_modules/@stdlib/array-zeros/lib/main.js","../node_modules/@stdlib/array-base-filled/lib/main.js","../node_modules/@stdlib/array-base-zeros/lib/main.js","../node_modules/@stdlib/array-ctors/lib/main.js","../lib/polyfill.js"],"sourcesContent":["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Object.defineProperty === 'function' ) ? Object.defineProperty : null;\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Defines (or modifies) an object property.\n*\n* ## Notes\n*\n* - Property descriptors come in two flavors: **data descriptors** and **accessor descriptors**. A data descriptor is a property that has a value, which may or may not be writable. An accessor descriptor is a property described by a getter-setter function pair. A descriptor must be one of these two flavors and cannot be both.\n*\n* @name defineProperty\n* @type {Function}\n* @param {Object} obj - object on which to define the property\n* @param {(string|symbol)} prop - property name\n* @param {Object} descriptor - property descriptor\n* @param {boolean} [descriptor.configurable=false] - boolean indicating if property descriptor can be changed and if the property can be deleted from the provided object\n* @param {boolean} [descriptor.enumerable=false] - boolean indicating if the property shows up when enumerating object properties\n* @param {boolean} [descriptor.writable=false] - boolean indicating if the value associated with the property can be changed with an assignment operator\n* @param {*} [descriptor.value] - property value\n* @param {(Function|void)} [descriptor.get=undefined] - function which serves as a getter for the property, or, if no getter, undefined. When the property is accessed, a getter function is called without arguments and with the `this` context set to the object through which the property is accessed (which may not be the object on which the property is defined due to inheritance). The return value will be used as the property value.\n* @param {(Function|void)} [descriptor.set=undefined] - function which serves as a setter for the property, or, if no setter, undefined. When assigning a property value, a setter function is called with one argument (the value being assigned to the property) and with the `this` context set to the object through which the property is assigned.\n* @throws {TypeError} first argument must be an object\n* @throws {TypeError} third argument must be an object\n* @throws {Error} property descriptor cannot have both a value and a setter and/or getter\n* @returns {Object} object with added property\n*\n* @example\n* var obj = {};\n*\n* defineProperty( obj, 'foo', {\n* 'value': 'bar'\n* });\n*\n* var str = obj.foo;\n* // returns 'bar'\n*/\nvar defineProperty = Object.defineProperty;\n\n\n// EXPORTS //\n\nexport default defineProperty;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Tests if a value is a number primitive.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number primitive\n*\n* @example\n* var bool = isNumber( 3.14 );\n* // returns true\n*\n* @example\n* var bool = isNumber( NaN );\n* // returns true\n*\n* @example\n* var bool = isNumber( new Number( 3.14 ) );\n* // returns false\n*/\nfunction isNumber( value ) {\n\treturn ( typeof value === 'number' ); // NOTE: we inline the `isNumber.isPrimitive` function from `@stdlib/assert/is-number` in order to avoid circular dependencies.\n}\n\n\n// EXPORTS //\n\nexport default isNumber;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// FUNCTIONS //\n\n/**\n* Tests if a string starts with a minus sign (`-`).\n*\n* @private\n* @param {string} str - input string\n* @returns {boolean} boolean indicating if a string starts with a minus sign (`-`)\n*/\nfunction startsWithMinus( str ) {\n\treturn str[ 0 ] === '-';\n}\n\n/**\n* Returns a string of `n` zeros.\n*\n* @private\n* @param {number} n - number of zeros\n* @returns {string} string of zeros\n*/\nfunction zeros( n ) {\n\tvar out = '';\n\tvar i;\n\tfor ( i = 0; i < n; i++ ) {\n\t\tout += '0';\n\t}\n\treturn out;\n}\n\n\n// MAIN //\n\n/**\n* Pads a token with zeros to the specified width.\n*\n* @private\n* @param {string} str - token argument\n* @param {number} width - token width\n* @param {boolean} [right=false] - boolean indicating whether to pad to the right\n* @returns {string} padded token argument\n*/\nfunction zeroPad( str, width, right ) {\n\tvar negative = false;\n\tvar pad = width - str.length;\n\tif ( pad < 0 ) {\n\t\treturn str;\n\t}\n\tif ( startsWithMinus( str ) ) {\n\t\tnegative = true;\n\t\tstr = str.substr( 1 );\n\t}\n\tstr = ( right ) ?\n\t\tstr + zeros( pad ) :\n\t\tzeros( pad ) + str;\n\tif ( negative ) {\n\t\tstr = '-' + str;\n\t}\n\treturn str;\n}\n\n\n// EXPORTS //\n\nexport default zeroPad;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isNumber from './is_number.js';\nimport zeroPad from './zero_pad.js';\n\n// NOTE: for the following, we explicitly avoid using stdlib packages in this particular package in order to avoid circular dependencies.\nvar lowercase = String.prototype.toLowerCase;\nvar uppercase = String.prototype.toUpperCase;\n\n\n// MAIN //\n\n/**\n* Formats a token object argument as an integer.\n*\n* @private\n* @param {Object} token - token object\n* @throws {Error} must provide a valid integer\n* @returns {string} formatted token argument\n*/\nfunction formatInteger( token ) {\n\tvar base;\n\tvar out;\n\tvar i;\n\n\tswitch ( token.specifier ) {\n\tcase 'b':\n\t\t// Case: %b (binary)\n\t\tbase = 2;\n\t\tbreak;\n\tcase 'o':\n\t\t// Case: %o (octal)\n\t\tbase = 8;\n\t\tbreak;\n\tcase 'x':\n\tcase 'X':\n\t\t// Case: %x, %X (hexadecimal)\n\t\tbase = 16;\n\t\tbreak;\n\tcase 'd':\n\tcase 'i':\n\tcase 'u':\n\tdefault:\n\t\t// Case: %d, %i, %u (decimal)\n\t\tbase = 10;\n\t\tbreak;\n\t}\n\tout = token.arg;\n\ti = parseInt( out, 10 );\n\tif ( !isFinite( i ) ) { // NOTE: We use the global `isFinite` function here instead of `@stdlib/math/base/assert/is-finite` in order to avoid circular dependencies.\n\t\tif ( !isNumber( out ) ) {\n\t\t\tthrow new Error( 'invalid integer. Value: ' + out );\n\t\t}\n\t\ti = 0;\n\t}\n\tif ( i < 0 && ( token.specifier === 'u' || base !== 10 ) ) {\n\t\ti = 0xffffffff + i + 1;\n\t}\n\tif ( i < 0 ) {\n\t\tout = ( -i ).toString( base );\n\t\tif ( token.precision ) {\n\t\t\tout = zeroPad( out, token.precision, token.padRight );\n\t\t}\n\t\tout = '-' + out;\n\t} else {\n\t\tout = i.toString( base );\n\t\tif ( !i && !token.precision ) {\n\t\t\tout = '';\n\t\t} else if ( token.precision ) {\n\t\t\tout = zeroPad( out, token.precision, token.padRight );\n\t\t}\n\t\tif ( token.sign ) {\n\t\t\tout = token.sign + out;\n\t\t}\n\t}\n\tif ( base === 16 ) {\n\t\tif ( token.alternate ) {\n\t\t\tout = '0x' + out;\n\t\t}\n\t\tout = ( token.specifier === uppercase.call( token.specifier ) ) ?\n\t\t\tuppercase.call( out ) :\n\t\t\tlowercase.call( out );\n\t}\n\tif ( base === 8 ) {\n\t\tif ( token.alternate && out.charAt( 0 ) !== '0' ) {\n\t\t\tout = '0' + out;\n\t\t}\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default formatInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isNumber from './is_number.js';\n\n// NOTE: for the following, we explicitly avoid using stdlib packages in this particular package in order to avoid circular dependencies.\nvar abs = Math.abs; // eslint-disable-line stdlib/no-builtin-math\nvar lowercase = String.prototype.toLowerCase;\nvar uppercase = String.prototype.toUpperCase;\nvar replace = String.prototype.replace;\n\n\n// VARIABLES //\n\nvar RE_EXP_POS_DIGITS = /e\\+(\\d)$/;\nvar RE_EXP_NEG_DIGITS = /e-(\\d)$/;\nvar RE_ONLY_DIGITS = /^(\\d+)$/;\nvar RE_DIGITS_BEFORE_EXP = /^(\\d+)e/;\nvar RE_TRAILING_PERIOD_ZERO = /\\.0$/;\nvar RE_PERIOD_ZERO_EXP = /\\.0*e/;\nvar RE_ZERO_BEFORE_EXP = /(\\..*[^0])0*e/;\n\n\n// MAIN //\n\n/**\n* Formats a token object argument as a floating-point number.\n*\n* @private\n* @param {Object} token - token object\n* @throws {Error} must provide a valid floating-point number\n* @returns {string} formatted token argument\n*/\nfunction formatDouble( token ) {\n\tvar digits;\n\tvar out;\n\tvar f = parseFloat( token.arg );\n\tif ( !isFinite( f ) ) { // NOTE: We use the global `isFinite` function here instead of `@stdlib/math/base/assert/is-finite` in order to avoid circular dependencies.\n\t\tif ( !isNumber( token.arg ) ) {\n\t\t\tthrow new Error( 'invalid floating-point number. Value: ' + out );\n\t\t}\n\t\t// Case: NaN, Infinity, or -Infinity\n\t\tf = token.arg;\n\t}\n\tswitch ( token.specifier ) {\n\tcase 'e':\n\tcase 'E':\n\t\tout = f.toExponential( token.precision );\n\t\tbreak;\n\tcase 'f':\n\tcase 'F':\n\t\tout = f.toFixed( token.precision );\n\t\tbreak;\n\tcase 'g':\n\tcase 'G':\n\t\tif ( abs( f ) < 0.0001 ) {\n\t\t\tdigits = token.precision;\n\t\t\tif ( digits > 0 ) {\n\t\t\t\tdigits -= 1;\n\t\t\t}\n\t\t\tout = f.toExponential( digits );\n\t\t} else {\n\t\t\tout = f.toPrecision( token.precision );\n\t\t}\n\t\tif ( !token.alternate ) {\n\t\t\tout = replace.call( out, RE_ZERO_BEFORE_EXP, '$1e' );\n\t\t\tout = replace.call( out, RE_PERIOD_ZERO_EXP, 'e');\n\t\t\tout = replace.call( out, RE_TRAILING_PERIOD_ZERO, '' );\n\t\t}\n\t\tbreak;\n\tdefault:\n\t\tthrow new Error( 'invalid double notation. Value: ' + token.specifier );\n\t}\n\tout = replace.call( out, RE_EXP_POS_DIGITS, 'e+0$1' );\n\tout = replace.call( out, RE_EXP_NEG_DIGITS, 'e-0$1' );\n\tif ( token.alternate ) {\n\t\tout = replace.call( out, RE_ONLY_DIGITS, '$1.' );\n\t\tout = replace.call( out, RE_DIGITS_BEFORE_EXP, '$1.e' );\n\t}\n\tif ( f >= 0 && token.sign ) {\n\t\tout = token.sign + out;\n\t}\n\tout = ( token.specifier === uppercase.call( token.specifier ) ) ?\n\t\tuppercase.call( out ) :\n\t\tlowercase.call( out );\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default formatDouble;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// FUNCTIONS //\n\n/**\n* Returns `n` spaces.\n*\n* @private\n* @param {number} n - number of spaces\n* @returns {string} string of spaces\n*/\nfunction spaces( n ) {\n\tvar out = '';\n\tvar i;\n\tfor ( i = 0; i < n; i++ ) {\n\t\tout += ' ';\n\t}\n\treturn out;\n}\n\n\n// MAIN //\n\n/**\n* Pads a token with spaces to the specified width.\n*\n* @private\n* @param {string} str - token argument\n* @param {number} width - token width\n* @param {boolean} [right=false] - boolean indicating whether to pad to the right\n* @returns {string} padded token argument\n*/\nfunction spacePad( str, width, right ) {\n\tvar pad = width - str.length;\n\tif ( pad < 0 ) {\n\t\treturn str;\n\t}\n\tstr = ( right ) ?\n\t\tstr + spaces( pad ) :\n\t\tspaces( pad ) + str;\n\treturn str;\n}\n\n\n// EXPORTS //\n\nexport default spacePad;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport formatInteger from './format_integer.js';\nimport isString from './is_string.js';\nimport formatDouble from './format_double.js';\nimport spacePad from './space_pad.js';\nimport zeroPad from './zero_pad.js';\n\n\n// VARIABLES //\n\nvar fromCharCode = String.fromCharCode;\nvar isnan = isNaN; // NOTE: We use the global `isNaN` function here instead of `@stdlib/math/base/assert/is-nan` to avoid circular dependencies.\nvar isArray = Array.isArray; // NOTE: We use the global `Array.isArray` function here instead of `@stdlib/assert/is-array` to avoid circular dependencies.\n\n\n// FUNCTIONS //\n\n/**\n* Initializes token object with properties of supplied format identifier object or default values if not present.\n*\n* @private\n* @param {Object} token - format identifier object\n* @returns {Object} token object\n*/\nfunction initialize( token ) {\n\tvar out = {};\n\tout.specifier = token.specifier;\n\tout.precision = ( token.precision === void 0 ) ? 1 : token.precision;\n\tout.width = token.width;\n\tout.flags = token.flags || '';\n\tout.mapping = token.mapping;\n\treturn out;\n}\n\n\n// MAIN //\n\n/**\n* Generates string from a token array by interpolating values.\n*\n* @param {Array} tokens - string parts and format identifier objects\n* @param {Array} ...args - variable values\n* @throws {TypeError} first argument must be an array\n* @throws {Error} invalid flags\n* @returns {string} formatted string\n*\n* @example\n* var tokens = [ 'beep ', { 'specifier': 's' } ];\n* var out = formatInterpolate( tokens, 'boop' );\n* // returns 'beep boop'\n*/\nfunction formatInterpolate( tokens ) {\n\tvar hasPeriod;\n\tvar flags;\n\tvar token;\n\tvar flag;\n\tvar num;\n\tvar out;\n\tvar pos;\n\tvar i;\n\tvar j;\n\n\tif ( !isArray( tokens ) ) {\n\t\tthrow new TypeError( 'invalid argument. First argument must be an array. Value: `' + tokens + '`.' );\n\t}\n\tout = '';\n\tpos = 1;\n\tfor ( i = 0; i < tokens.length; i++ ) {\n\t\ttoken = tokens[ i ];\n\t\tif ( isString( token ) ) {\n\t\t\tout += token;\n\t\t} else {\n\t\t\thasPeriod = token.precision !== void 0;\n\t\t\ttoken = initialize( token );\n\t\t\tif ( !token.specifier ) {\n\t\t\t\tthrow new TypeError( 'invalid argument. Token is missing `specifier` property. Index: `'+ i +'`. Value: `' + token + '`.' );\n\t\t\t}\n\t\t\tif ( token.mapping ) {\n\t\t\t\tpos = token.mapping;\n\t\t\t}\n\t\t\tflags = token.flags;\n\t\t\tfor ( j = 0; j < flags.length; j++ ) {\n\t\t\t\tflag = flags.charAt( j );\n\t\t\t\tswitch ( flag ) {\n\t\t\t\tcase ' ':\n\t\t\t\t\ttoken.sign = ' ';\n\t\t\t\t\tbreak;\n\t\t\t\tcase '+':\n\t\t\t\t\ttoken.sign = '+';\n\t\t\t\t\tbreak;\n\t\t\t\tcase '-':\n\t\t\t\t\ttoken.padRight = true;\n\t\t\t\t\ttoken.padZeros = false;\n\t\t\t\t\tbreak;\n\t\t\t\tcase '0':\n\t\t\t\t\ttoken.padZeros = flags.indexOf( '-' ) < 0; // NOTE: We use built-in `Array.prototype.indexOf` here instead of `@stdlib/assert/contains` in order to avoid circular dependencies.\n\t\t\t\t\tbreak;\n\t\t\t\tcase '#':\n\t\t\t\t\ttoken.alternate = true;\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tthrow new Error( 'invalid flag: ' + flag );\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( token.width === '*' ) {\n\t\t\t\ttoken.width = parseInt( arguments[ pos ], 10 );\n\t\t\t\tpos += 1;\n\t\t\t\tif ( isnan( token.width ) ) {\n\t\t\t\t\tthrow new TypeError( 'the argument for * width at position ' + pos + ' is not a number. Value: `' + token.width + '`.' );\n\t\t\t\t}\n\t\t\t\tif ( token.width < 0 ) {\n\t\t\t\t\ttoken.padRight = true;\n\t\t\t\t\ttoken.width = -token.width;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( hasPeriod ) {\n\t\t\t\tif ( token.precision === '*' ) {\n\t\t\t\t\ttoken.precision = parseInt( arguments[ pos ], 10 );\n\t\t\t\t\tpos += 1;\n\t\t\t\t\tif ( isnan( token.precision ) ) {\n\t\t\t\t\t\tthrow new TypeError( 'the argument for * precision at position ' + pos + ' is not a number. Value: `' + token.precision + '`.' );\n\t\t\t\t\t}\n\t\t\t\t\tif ( token.precision < 0 ) {\n\t\t\t\t\t\ttoken.precision = 1;\n\t\t\t\t\t\thasPeriod = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\ttoken.arg = arguments[ pos ];\n\t\t\tswitch ( token.specifier ) {\n\t\t\tcase 'b':\n\t\t\tcase 'o':\n\t\t\tcase 'x':\n\t\t\tcase 'X':\n\t\t\tcase 'd':\n\t\t\tcase 'i':\n\t\t\tcase 'u':\n\t\t\t\t// Case: %b (binary), %o (octal), %x, %X (hexadecimal), %d, %i (decimal), %u (unsigned decimal)\n\t\t\t\tif ( hasPeriod ) {\n\t\t\t\t\ttoken.padZeros = false;\n\t\t\t\t}\n\t\t\t\ttoken.arg = formatInteger( token );\n\t\t\t\tbreak;\n\t\t\tcase 's':\n\t\t\t\t// Case: %s (string)\n\t\t\t\ttoken.maxWidth = ( hasPeriod ) ? token.precision : -1;\n\t\t\t\tbreak;\n\t\t\tcase 'c':\n\t\t\t\t// Case: %c (character)\n\t\t\t\tif ( !isnan( token.arg ) ) {\n\t\t\t\t\tnum = parseInt( token.arg, 10 );\n\t\t\t\t\tif ( num < 0 || num > 127 ) {\n\t\t\t\t\t\tthrow new Error( 'invalid character code. Value: ' + token.arg );\n\t\t\t\t\t}\n\t\t\t\t\ttoken.arg = ( isnan( num ) ) ?\n\t\t\t\t\t\tString( token.arg ) :\n\t\t\t\t\t\tfromCharCode( num );\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'e':\n\t\t\tcase 'E':\n\t\t\tcase 'f':\n\t\t\tcase 'F':\n\t\t\tcase 'g':\n\t\t\tcase 'G':\n\t\t\t\t// Case: %e, %E (scientific notation), %f, %F (decimal floating point), %g, %G (uses the shorter of %e/E or %f/F)\n\t\t\t\tif ( !hasPeriod ) {\n\t\t\t\t\ttoken.precision = 6;\n\t\t\t\t}\n\t\t\t\ttoken.arg = formatDouble( token );\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tthrow new Error( 'invalid specifier: ' + token.specifier );\n\t\t\t}\n\t\t\t// Fit argument into field width...\n\t\t\tif ( token.maxWidth >= 0 && token.arg.length > token.maxWidth ) {\n\t\t\t\ttoken.arg = token.arg.substring( 0, token.maxWidth );\n\t\t\t}\n\t\t\tif ( token.padZeros ) {\n\t\t\t\ttoken.arg = zeroPad( token.arg, token.width || token.precision, token.padRight ); // eslint-disable-line max-len\n\t\t\t} else if ( token.width ) {\n\t\t\t\ttoken.arg = spacePad( token.arg, token.width, token.padRight );\n\t\t\t}\n\t\t\tout += token.arg || '';\n\t\t\tpos += 1;\n\t\t}\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default formatInterpolate;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Tests if a value is a string primitive.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a string primitive\n*\n* @example\n* var bool = isString( 'beep' );\n* // returns true\n*\n* @example\n* var bool = isString( new String( 'beep' ) );\n* // returns false\n*/\nfunction isString( value ) {\n\treturn ( typeof value === 'string' ); // NOTE: we inline the `isString.isPrimitive` function from `@stdlib/assert/is-string` in order to avoid circular dependencies.\n}\n\n\n// EXPORTS //\n\nexport default isString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// VARIABLES //\n\nvar RE = /%(?:([1-9]\\d*)\\$)?([0 +\\-#]*)(\\*|\\d+)?(?:(\\.)(\\*|\\d+)?)?[hlL]?([%A-Za-z])/g;\n\n\n// FUNCTIONS //\n\n/**\n* Parses a delimiter.\n*\n* @private\n* @param {Array} match - regular expression match\n* @returns {Object} delimiter token object\n*/\nfunction parse( match ) {\n\tvar token = {\n\t\t'mapping': ( match[ 1 ] ) ? parseInt( match[ 1 ], 10 ) : void 0,\n\t\t'flags': match[ 2 ],\n\t\t'width': match[ 3 ],\n\t\t'precision': match[ 5 ],\n\t\t'specifier': match[ 6 ]\n\t};\n\tif ( match[ 4 ] === '.' && match[ 5 ] === void 0 ) {\n\t\ttoken.precision = '1';\n\t}\n\treturn token;\n}\n\n\n// MAIN //\n\n/**\n* Tokenizes a string into an array of string parts and format identifier objects.\n*\n* @param {string} str - input string\n* @returns {Array} tokens\n*\n* @example\n* var tokens = formatTokenize( 'Hello %s!' );\n* // returns [ 'Hello ', {...}, '!' ]\n*/\nfunction formatTokenize( str ) {\n\tvar content;\n\tvar tokens;\n\tvar match;\n\tvar prev;\n\n\ttokens = [];\n\tprev = 0;\n\tmatch = RE.exec( str );\n\twhile ( match ) {\n\t\tcontent = str.slice( prev, RE.lastIndex - match[ 0 ].length );\n\t\tif ( content.length ) {\n\t\t\ttokens.push( content );\n\t\t}\n\t\ttokens.push( parse( match ) );\n\t\tprev = RE.lastIndex;\n\t\tmatch = RE.exec( str );\n\t}\n\tcontent = str.slice( prev );\n\tif ( content.length ) {\n\t\ttokens.push( content );\n\t}\n\treturn tokens;\n}\n\n\n// EXPORTS //\n\nexport default formatTokenize;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport interpolate from '@stdlib/string-base-format-interpolate';\nimport tokenize from '@stdlib/string-base-format-tokenize';\nimport isString from './is_string.js';\n\n\n// MAIN //\n\n/**\n* Inserts supplied variable values into a format string.\n*\n* @param {string} str - input string\n* @param {Array} ...args - variable values\n* @throws {TypeError} first argument must be a string\n* @throws {Error} invalid flags\n* @returns {string} formatted string\n*\n* @example\n* var str = format( 'Hello %s!', 'world' );\n* // returns 'Hello world!'\n*\n* @example\n* var str = format( 'Pi: ~%.2f', 3.141592653589793 );\n* // returns 'Pi: ~3.14'\n*/\nfunction format( str ) {\n\tvar args;\n\tvar i;\n\n\tif ( !isString( str ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a string. Value: `%s`.', str ) );\n\t}\n\targs = [ tokenize( str ) ];\n\tfor ( i = 1; i < arguments.length; i++ ) {\n\t\targs.push( arguments[ i ] );\n\t}\n\treturn interpolate.apply( null, args );\n}\n\n\n// EXPORTS //\n\nexport default format;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Tests if a value is a string primitive.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a string primitive\n*\n* @example\n* var bool = isString( 'beep' );\n* // returns true\n*\n* @example\n* var bool = isString( new String( 'beep' ) );\n* // returns false\n*/\nfunction isString( value ) {\n\treturn ( typeof value === 'string' ); // NOTE: we inline the `isString.isPrimitive` function from `@stdlib/assert/is-string` in order to avoid circular dependencies.\n}\n\n\n// EXPORTS //\n\nexport default isString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable no-underscore-dangle, no-proto */\n\n'use strict';\n\n// MODULES //\n\nimport format from '@stdlib/string-format';\n\n\n// VARIABLES //\n\nvar objectProtoype = Object.prototype;\nvar toStr = objectProtoype.toString;\nvar defineGetter = objectProtoype.__defineGetter__;\nvar defineSetter = objectProtoype.__defineSetter__;\nvar lookupGetter = objectProtoype.__lookupGetter__;\nvar lookupSetter = objectProtoype.__lookupSetter__;\n\n\n// MAIN //\n\n/**\n* Defines (or modifies) an object property.\n*\n* ## Notes\n*\n* - Property descriptors come in two flavors: **data descriptors** and **accessor descriptors**. A data descriptor is a property that has a value, which may or may not be writable. An accessor descriptor is a property described by a getter-setter function pair. A descriptor must be one of these two flavors and cannot be both.\n*\n* @param {Object} obj - object on which to define the property\n* @param {string} prop - property name\n* @param {Object} descriptor - property descriptor\n* @param {boolean} [descriptor.configurable=false] - boolean indicating if property descriptor can be changed and if the property can be deleted from the provided object\n* @param {boolean} [descriptor.enumerable=false] - boolean indicating if the property shows up when enumerating object properties\n* @param {boolean} [descriptor.writable=false] - boolean indicating if the value associated with the property can be changed with an assignment operator\n* @param {*} [descriptor.value] - property value\n* @param {(Function|void)} [descriptor.get=undefined] - function which serves as a getter for the property, or, if no getter, undefined. When the property is accessed, a getter function is called without arguments and with the `this` context set to the object through which the property is accessed (which may not be the object on which the property is defined due to inheritance). The return value will be used as the property value.\n* @param {(Function|void)} [descriptor.set=undefined] - function which serves as a setter for the property, or, if no setter, undefined. When assigning a property value, a setter function is called with one argument (the value being assigned to the property) and with the `this` context set to the object through which the property is assigned.\n* @throws {TypeError} first argument must be an object\n* @throws {TypeError} third argument must be an object\n* @throws {Error} property descriptor cannot have both a value and a setter and/or getter\n* @returns {Object} object with added property\n*\n* @example\n* var obj = {};\n*\n* defineProperty( obj, 'foo', {\n* 'value': 'bar'\n* });\n*\n* var str = obj.foo;\n* // returns 'bar'\n*/\nfunction defineProperty( obj, prop, descriptor ) {\n\tvar prototype;\n\tvar hasValue;\n\tvar hasGet;\n\tvar hasSet;\n\n\tif ( typeof obj !== 'object' || obj === null || toStr.call( obj ) === '[object Array]' ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be an object. Value: `%s`.', obj ) );\n\t}\n\tif ( typeof descriptor !== 'object' || descriptor === null || toStr.call( descriptor ) === '[object Array]' ) {\n\t\tthrow new TypeError( format( 'invalid argument. Property descriptor must be an object. Value: `%s`.', descriptor ) );\n\t}\n\thasValue = ( 'value' in descriptor );\n\tif ( hasValue ) {\n\t\tif (\n\t\t\tlookupGetter.call( obj, prop ) ||\n\t\t\tlookupSetter.call( obj, prop )\n\t\t) {\n\t\t\t// Override `__proto__` to avoid touching inherited accessors:\n\t\t\tprototype = obj.__proto__;\n\t\t\tobj.__proto__ = objectProtoype;\n\n\t\t\t// Delete property as existing getters/setters prevent assigning value to specified property:\n\t\t\tdelete obj[ prop ];\n\t\t\tobj[ prop ] = descriptor.value;\n\n\t\t\t// Restore original prototype:\n\t\t\tobj.__proto__ = prototype;\n\t\t} else {\n\t\t\tobj[ prop ] = descriptor.value;\n\t\t}\n\t}\n\thasGet = ( 'get' in descriptor );\n\thasSet = ( 'set' in descriptor );\n\n\tif ( hasValue && ( hasGet || hasSet ) ) {\n\t\tthrow new Error( 'invalid argument. Cannot specify one or more accessors and a value or writable attribute in the property descriptor.' );\n\t}\n\n\tif ( hasGet && defineGetter ) {\n\t\tdefineGetter.call( obj, prop, descriptor.get );\n\t}\n\tif ( hasSet && defineSetter ) {\n\t\tdefineSetter.call( obj, prop, descriptor.set );\n\t}\n\treturn obj;\n}\n\n\n// EXPORTS //\n\nexport default defineProperty;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Define (or modify) an object property.\n*\n* @module @stdlib/utils-define-property\n*\n* @example\n* import defineProperty from '@stdlib/utils-define-property';\n*\n* var obj = {};\n* defineProperty( obj, 'foo', {\n* 'value': 'bar',\n* 'writable': false,\n* 'configurable': false,\n* 'enumerable': false\n* });\n* obj.foo = 'boop'; // => throws\n*/\n\n// MODULES //\n\nimport hasDefinePropertySupport from './has_define_property_support.js';\nimport builtin from './builtin.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar defineProperty;\nif ( hasDefinePropertySupport() ) {\n\tdefineProperty = builtin;\n} else {\n\tdefineProperty = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default defineProperty;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport defineProperty from './define_property.js';\n\n\n// MAIN //\n\n/**\n* Tests for `Object.defineProperty` support.\n*\n* @private\n* @returns {boolean} boolean indicating if an environment has `Object.defineProperty` support\n*\n* @example\n* var bool = hasDefinePropertySupport();\n* // returns \n*/\nfunction hasDefinePropertySupport() {\n\t// Test basic support...\n\ttry {\n\t\tdefineProperty( {}, 'x', {} );\n\t\treturn true;\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\treturn false;\n\t}\n}\n\n\n// EXPORTS //\n\nexport default hasDefinePropertySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport defineProperty from '@stdlib/utils-define-property';\n\n\n// MAIN //\n\n/**\n* Defines a non-enumerable read-only property.\n*\n* @param {Object} obj - object on which to define the property\n* @param {(string|symbol)} prop - property name\n* @param {*} value - value to set\n*\n* @example\n* var obj = {};\n*\n* setNonEnumerableReadOnly( obj, 'foo', 'bar' );\n*\n* try {\n* obj.foo = 'boop';\n* } catch ( err ) {\n* console.error( err.message );\n* }\n*/\nfunction setNonEnumerableReadOnly( obj, prop, value ) {\n\tdefineProperty( obj, prop, {\n\t\t'configurable': false,\n\t\t'enumerable': false,\n\t\t'writable': false,\n\t\t'value': value\n\t});\n}\n\n\n// EXPORTS //\n\nexport default setNonEnumerableReadOnly;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Tests if a value is a number primitive.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number primitive\n*\n* @example\n* var bool = isNumber( 3.14 );\n* // returns true\n*\n* @example\n* var bool = isNumber( NaN );\n* // returns true\n*\n* @example\n* var bool = isNumber( new Number( 3.14 ) );\n* // returns false\n*/\nfunction isNumber( value ) {\n\treturn ( typeof value === 'number' );\n}\n\n\n// EXPORTS //\n\nexport default isNumber;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport hasSymbols from '@stdlib/assert-has-symbol-support';\n\n\n// VARIABLES //\n\nvar FLG = hasSymbols();\n\n\n// MAIN //\n\n/**\n* Tests for native `toStringTag` support.\n*\n* @returns {boolean} boolean indicating if an environment has `toStringTag` support\n*\n* @example\n* var bool = hasToStringTagSupport();\n* // returns \n*/\nfunction hasToStringTagSupport() {\n\treturn ( FLG && typeof Symbol.toStringTag === 'symbol' );\n}\n\n\n// EXPORTS //\n\nexport default hasToStringTagSupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Tests for native `Symbol` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Symbol` support\n*\n* @example\n* var bool = hasSymbolSupport();\n* // returns \n*/\nfunction hasSymbolSupport() {\n\treturn (\n\t\ttypeof Symbol === 'function' &&\n\t\ttypeof Symbol( 'foo' ) === 'symbol'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default hasSymbolSupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar toStr = Object.prototype.toString;\n\n\n// EXPORTS //\n\nexport default toStr;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// FUNCTIONS //\n\nvar has = Object.prototype.hasOwnProperty;\n\n\n// MAIN //\n\n/**\n* Tests if an object has a specified property.\n*\n* @param {*} value - value to test\n* @param {*} property - property to test\n* @returns {boolean} boolean indicating if an object has a specified property\n*\n* @example\n* var beep = {\n* 'boop': true\n* };\n*\n* var bool = hasOwnProp( beep, 'boop' );\n* // returns true\n*\n* @example\n* var beep = {\n* 'boop': true\n* };\n*\n* var bool = hasOwnProp( beep, 'bap' );\n* // returns false\n*/\nfunction hasOwnProp( value, property ) {\n\tif (\n\t\tvalue === void 0 ||\n\t\tvalue === null\n\t) {\n\t\treturn false;\n\t}\n\treturn has.call( value, property );\n}\n\n\n// EXPORTS //\n\nexport default hasOwnProp;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar Sym = ( typeof Symbol === 'function' ) ? Symbol : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default Sym;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport Symbol from '@stdlib/symbol-ctor';\n\n\n// MAIN //\n\nvar toStrTag = ( typeof Symbol === 'function' ) ? Symbol.toStringTag : '';\n\n\n// EXPORTS //\n\nexport default toStrTag;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Return a string value indicating a specification defined classification of an object.\n*\n* @module @stdlib/utils-native-class\n*\n* @example\n* import nativeClass from '@stdlib/utils-native-class';\n*\n* var str = nativeClass( 'a' );\n* // returns '[object String]'\n*\n* str = nativeClass( 5 );\n* // returns '[object Number]'\n*\n* function Beep() {\n* return this;\n* }\n* str = nativeClass( new Beep() );\n* // returns '[object Object]'\n*/\n\n// MODULES //\n\nimport hasToStringTag from '@stdlib/assert-has-tostringtag-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar main;\nif ( hasToStringTag() ) {\n\tmain = polyfill;\n} else {\n\tmain = builtin;\n}\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport hasOwnProp from '@stdlib/assert-has-own-property';\nimport toStringTag from './tostringtag.js';\nimport toStr from './tostring.js';\n\n\n// MAIN //\n\n/**\n* Returns a string value indicating a specification defined classification of an object in environments supporting `Symbol.toStringTag`.\n*\n* @param {*} v - input value\n* @returns {string} string value indicating a specification defined classification of the input value\n*\n* @example\n* var str = nativeClass( 'a' );\n* // returns '[object String]'\n*\n* @example\n* var str = nativeClass( 5 );\n* // returns '[object Number]'\n*\n* @example\n* function Beep() {\n* return this;\n* }\n* var str = nativeClass( new Beep() );\n* // returns '[object Object]'\n*/\nfunction nativeClass( v ) {\n\tvar isOwn;\n\tvar tag;\n\tvar out;\n\n\tif ( v === null || v === void 0 ) {\n\t\treturn toStr.call( v );\n\t}\n\ttag = v[ toStringTag ];\n\tisOwn = hasOwnProp( v, toStringTag );\n\n\t// Attempt to override the `toStringTag` property. For built-ins having a `Symbol.toStringTag` property (e.g., `JSON`, `Math`, etc), the `Symbol.toStringTag` property is read-only (e.g., , so we need to wrap in a `try/catch`.\n\ttry {\n\t\tv[ toStringTag ] = void 0;\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\treturn toStr.call( v );\n\t}\n\tout = toStr.call( v );\n\n\tif ( isOwn ) {\n\t\tv[ toStringTag ] = tag;\n\t} else {\n\t\tdelete v[ toStringTag ];\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default nativeClass;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport toStr from './tostring.js';\n\n\n// MAIN //\n\n/**\n* Returns a string value indicating a specification defined classification (via the internal property `[[Class]]`) of an object.\n*\n* @param {*} v - input value\n* @returns {string} string value indicating a specification defined classification of the input value\n*\n* @example\n* var str = nativeClass( 'a' );\n* // returns '[object String]'\n*\n* @example\n* var str = nativeClass( 5 );\n* // returns '[object Number]'\n*\n* @example\n* function Beep() {\n* return this;\n* }\n* var str = nativeClass( new Beep() );\n* // returns '[object Object]'\n*/\nfunction nativeClass( v ) {\n\treturn toStr.call( v );\n}\n\n\n// EXPORTS //\n\nexport default nativeClass;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// EXPORTS //\n\nexport default Number; // eslint-disable-line stdlib/require-globals\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport Number from '@stdlib/number-ctor';\n\n\n// MAIN //\n\n// eslint-disable-next-line stdlib/no-redeclare\nvar toString = Number.prototype.toString; // non-generic\n\n\n// EXPORTS //\n\nexport default toString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport hasToStringTag from '@stdlib/assert-has-tostringtag-support';\nimport nativeClass from '@stdlib/utils-native-class';\nimport Number from '@stdlib/number-ctor';\nimport test from './try2serialize.js';\n\n\n// VARIABLES //\n\nvar FLG = hasToStringTag();\n\n\n// MAIN //\n\n/**\n* Tests if a value is a number object.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number object\n*\n* @example\n* var bool = isNumber( 3.14 );\n* // returns false\n*\n* @example\n* var bool = isNumber( new Number( 3.14 ) );\n* // returns true\n*/\nfunction isNumber( value ) {\n\tif ( typeof value === 'object' ) {\n\t\tif ( value instanceof Number ) {\n\t\t\treturn true;\n\t\t}\n\t\tif ( FLG ) {\n\t\t\treturn test( value );\n\t\t}\n\t\treturn ( nativeClass( value ) === '[object Number]' );\n\t}\n\treturn false;\n}\n\n\n// EXPORTS //\n\nexport default isNumber;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport toString from './tostring.js'; // eslint-disable-line stdlib/no-redeclare\n\n\n// MAIN //\n\n/**\n* Attempts to serialize a value to a string.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value can be serialized\n*/\nfunction test( value ) {\n\ttry {\n\t\ttoString.call( value );\n\t\treturn true;\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\treturn false;\n\t}\n}\n\n\n// EXPORTS //\n\nexport default test;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a number.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a number\n*\n* @example\n* var bool = isNumber( 3.14 );\n* // returns true\n*\n* @example\n* var bool = isNumber( new Number( 3.14 ) );\n* // returns true\n*\n* @example\n* var bool = isNumber( NaN );\n* // returns true\n*\n* @example\n* var bool = isNumber( null );\n* // returns false\n*/\nfunction isNumber( value ) {\n\treturn ( isPrimitive( value ) || isObject( value ) );\n}\n\n\n// EXPORTS //\n\nexport default isNumber;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test if a value is a number.\n*\n* @module @stdlib/assert-is-number\n*\n* @example\n* import isNumber from '@stdlib/assert-is-number';\n*\n* var bool = isNumber( 3.14 );\n* // returns true\n*\n* bool = isNumber( new Number( 3.14 ) );\n* // returns true\n*\n* bool = isNumber( NaN );\n* // returns true\n*\n* bool = isNumber( null );\n* // returns false\n*\n* @example\n* import { isPrimitive as isNumber } from '@stdlib/assert-is-number';\n*\n* var bool = isNumber( 3.14 );\n* // returns true\n*\n* bool = isNumber( NaN );\n* // returns true\n*\n* bool = isNumber( new Number( 3.14 ) );\n* // returns false\n*\n* @example\n* import { isObject as isNumber } from '@stdlib/assert-is-number';\n*\n* var bool = isNumber( 3.14 );\n* // returns false\n*\n* bool = isNumber( new Number( 3.14 ) );\n* // returns true\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'isPrimitive', isPrimitive );\nsetReadOnly( main, 'isObject', isObject );\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Double-precision floating-point positive infinity.\n*\n* @module @stdlib/constants-float64-pinf\n* @type {number}\n*\n* @example\n* import FLOAT64_PINF from '@stdlib/constants-float64-pinf';\n* // returns Infinity\n*/\n\n\n// MAIN //\n\n/**\n* Double-precision floating-point positive infinity.\n*\n* ## Notes\n*\n* Double-precision floating-point positive infinity has the bit sequence\n*\n* ```binarystring\n* 0 11111111111 00000000000000000000 00000000000000000000000000000000\n* ```\n*\n* @constant\n* @type {number}\n* @default Number.POSITIVE_INFINITY\n* @see [IEEE 754]{@link https://en.wikipedia.org/wiki/IEEE_754-1985}\n*/\nvar FLOAT64_PINF = Number.POSITIVE_INFINITY; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default FLOAT64_PINF;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Double-precision floating-point negative infinity.\n*\n* @module @stdlib/constants-float64-ninf\n* @type {number}\n*\n* @example\n* import FLOAT64_NINF from '@stdlib/constants-float64-ninf';\n* // returns -Infinity\n*/\n\n// MODULES //\n\nimport Number from '@stdlib/number-ctor';\n\n\n// MAIN //\n\n/**\n* Double-precision floating-point negative infinity.\n*\n* ## Notes\n*\n* Double-precision floating-point negative infinity has the bit sequence\n*\n* ```binarystring\n* 1 11111111111 00000000000000000000 00000000000000000000000000000000\n* ```\n*\n* @constant\n* @type {number}\n* @default Number.NEGATIVE_INFINITY\n* @see [IEEE 754]{@link https://en.wikipedia.org/wiki/IEEE_754-1985}\n*/\nvar FLOAT64_NINF = Number.NEGATIVE_INFINITY;\n\n\n// EXPORTS //\n\nexport default FLOAT64_NINF;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: implementation (?)\n\n/**\n* Rounds a double-precision floating-point number toward negative infinity.\n*\n* @param {number} x - input value\n* @returns {number} rounded value\n*\n* @example\n* var v = floor( -4.2 );\n* // returns -5.0\n*\n* @example\n* var v = floor( 9.99999 );\n* // returns 9.0\n*\n* @example\n* var v = floor( 0.0 );\n* // returns 0.0\n*\n* @example\n* var v = floor( NaN );\n* // returns NaN\n*/\nvar floor = Math.floor; // eslint-disable-line stdlib/no-builtin-math\n\n\n// EXPORTS //\n\nexport default floor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport floor from '@stdlib/math-base-special-floor';\n\n\n// MAIN //\n\n/**\n* Tests if a finite double-precision floating-point number is an integer.\n*\n* @param {number} x - value to test\n* @returns {boolean} boolean indicating whether the value is an integer\n*\n* @example\n* var bool = isInteger( 1.0 );\n* // returns true\n*\n* @example\n* var bool = isInteger( 3.14 );\n* // returns false\n*/\nfunction isInteger( x ) {\n\treturn (floor(x) === x);\n}\n\n\n// EXPORTS //\n\nexport default isInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport PINF from '@stdlib/constants-float64-pinf';\nimport NINF from '@stdlib/constants-float64-ninf';\nimport isInt from '@stdlib/math-base-assert-is-integer';\n\n\n// MAIN //\n\n/**\n* Tests if a number primitive is an integer value.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a number primitive is an integer value\n*/\nfunction isInteger( value ) {\n\treturn (\n\t\tvalue < PINF &&\n\t\tvalue > NINF &&\n\t\tisInt( value )\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isNumber } from '@stdlib/assert-is-number';\nimport isInt from './integer.js';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a number primitive having an integer value.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number primitive having an integer value\n*\n* @example\n* var bool = isInteger( -3.0 );\n* // returns true\n*\n* @example\n* var bool = isInteger( new Number( -3.0 ) );\n* // returns false\n*/\nfunction isInteger( value ) {\n\treturn (\n\t\tisNumber( value ) &&\n\t\tisInt( value )\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isObject as isNumber } from '@stdlib/assert-is-number';\nimport isInt from './integer.js';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a number object having an integer value.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number object having an integer value\n*\n* @example\n* var bool = isInteger( 3.0 );\n* // returns false\n*\n* @example\n* var bool = isInteger( new Number( 3.0 ) );\n* // returns true\n*/\nfunction isInteger( value ) {\n\treturn (\n\t\tisNumber( value ) &&\n\t\tisInt( value.valueOf() )\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\n/**\n* Tests if a value is an integer.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an integer\n*\n* @example\n* var bool = isInteger( 5.0 );\n* // returns true\n*\n* @example\n* var bool = isInteger( new Number( 5.0 ) );\n* // returns true\n*\n* @example\n* var bool = isInteger( -3.14 );\n* // returns false\n*\n* @example\n* var bool = isInteger( null );\n* // returns false\n*/\nfunction isInteger( value ) {\n\treturn ( isPrimitive( value ) || isObject( value ) );\n}\n\n\n// EXPORTS //\n\nexport default isInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isInteger } from '@stdlib/assert-is-integer';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a number primitive having a nonnegative integer value.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number primitive having a nonnegative integer value\n*\n* @example\n* var bool = isNonNegativeInteger( 3.0 );\n* // returns true\n*\n* @example\n* var bool = isNonNegativeInteger( new Number( 3.0 ) );\n* // returns false\n*/\nfunction isNonNegativeInteger( value ) {\n\treturn (\n\t\tisInteger( value ) &&\n\t\tvalue >= 0\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isNonNegativeInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isObject as isInteger } from '@stdlib/assert-is-integer';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a number object having a nonnegative integer value.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number object having a nonnegative integer value\n*\n* @example\n* var bool = isNonNegativeInteger( 3.0 );\n* // returns false\n*\n* @example\n* var bool = isNonNegativeInteger( new Number( 3.0 ) );\n* // returns true\n*/\nfunction isNonNegativeInteger( value ) {\n\treturn (\n\t\tisInteger( value ) &&\n\t\tvalue.valueOf() >= 0\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isNonNegativeInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a nonnegative integer.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a nonnegative integer\n*\n* @example\n* var bool = isNonNegativeInteger( 5.0 );\n* // returns true\n*\n* @example\n* var bool = isNonNegativeInteger( new Number( 5.0 ) );\n* // returns true\n*\n* @example\n* var bool = isNonNegativeInteger( -5.0 );\n* // returns false\n*\n* @example\n* var bool = isNonNegativeInteger( 3.14 );\n* // returns false\n*\n* @example\n* var bool = isNonNegativeInteger( null );\n* // returns false\n*/\nfunction isNonNegativeInteger( value ) {\n\treturn ( isPrimitive( value ) || isObject( value ) );\n}\n\n\n// EXPORTS //\n\nexport default isNonNegativeInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test if a value is an integer.\n*\n* @module @stdlib/assert-is-integer\n*\n* @example\n* import isInteger from '@stdlib/assert-is-integer';\n*\n* var bool = isInteger( 5.0 );\n* // returns true\n*\n* bool = isInteger( new Number( 5.0 ) );\n* // returns true\n*\n* bool = isInteger( -3.14 );\n* // returns false\n*\n* bool = isInteger( null );\n* // returns false\n*\n* @example\n* // Use interface to check for integer primitives...\n* import { isPrimitive as isInteger } from '@stdlib/assert-is-integer';\n*\n* var bool = isInteger( -3.0 );\n* // returns true\n*\n* bool = isInteger( new Number( -3.0 ) );\n* // returns false\n*\n* @example\n* // Use interface to check for integer objects...\n* import { isObject as isInteger } from '@stdlib/assert-is-integer';\n*\n* var bool = isInteger( 3.0 );\n* // returns false\n*\n* bool = isInteger( new Number( 3.0 ) );\n* // returns true\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'isPrimitive', isPrimitive );\nsetReadOnly( main, 'isObject', isObject );\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test if a value is a nonnegative integer.\n*\n* @module @stdlib/assert-is-nonnegative-integer\n*\n* @example\n* import isNonNegativeInteger from '@stdlib/assert-is-nonnegative-integer';\n*\n* var bool = isNonNegativeInteger( 5.0 );\n* // returns true\n*\n* bool = isNonNegativeInteger( new Number( 5.0 ) );\n* // returns true\n*\n* bool = isNonNegativeInteger( -5.0 );\n* // returns false\n*\n* bool = isNonNegativeInteger( 3.14 );\n* // returns false\n*\n* bool = isNonNegativeInteger( null );\n* // returns false\n*\n* @example\n* import { isPrimitive as isNonNegativeInteger } from '@stdlib/assert-is-nonnegative-integer';\n*\n* var bool = isNonNegativeInteger( 3.0 );\n* // returns true\n*\n* bool = isNonNegativeInteger( new Number( 3.0 ) );\n* // returns false\n*\n* @example\n* import { isObject as isNonNegativeInteger } from '@stdlib/assert-is-nonnegative-integer';\n*\n* var bool = isNonNegativeInteger( 3.0 );\n* // returns false\n*\n* bool = isNonNegativeInteger( new Number( 3.0 ) );\n* // returns true\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'isPrimitive', isPrimitive );\nsetReadOnly( main, 'isObject', isObject );\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasFloat64Array = ( typeof Float64Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Float64Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a Float64Array\n*\n* @example\n* var bool = isFloat64Array( new Float64Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isFloat64Array( [] );\n* // returns false\n*/\nfunction isFloat64Array( value ) {\n\treturn (\n\t\t( hasFloat64Array && value instanceof Float64Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Float64Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isFloat64Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Float64Array === 'function' ) ? Float64Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Float64Array === 'function' ) ? Float64Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of double-precision floating-point numbers in the platform byte order.\n*\n* @module @stdlib/array-float64\n*\n* @example\n* import ctor from '@stdlib/array-float64';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasFloat64ArraySupport from '@stdlib/assert-has-float64array-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasFloat64ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isFloat64Array from '@stdlib/assert-is-float64array';\nimport GlobalFloat64Array from './float64array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Float64Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Float64Array` support\n*\n* @example\n* var bool = hasFloat64ArraySupport();\n* // returns \n*/\nfunction hasFloat64ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalFloat64Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = new GlobalFloat64Array( [ 1.0, 3.14, -3.14, NaN ] );\n\t\tbool = (\n\t\t\tisFloat64Array( arr ) &&\n\t\t\tarr[ 0 ] === 1.0 &&\n\t\t\tarr[ 1 ] === 3.14 &&\n\t\t\tarr[ 2 ] === -3.14 &&\n\t\t\tarr[ 3 ] !== arr[ 3 ]\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasFloat64ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of double-precision floating-point numbers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasFloat32Array = ( typeof Float32Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Float32Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a Float32Array\n*\n* @example\n* var bool = isFloat32Array( new Float32Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isFloat32Array( [] );\n* // returns false\n*/\nfunction isFloat32Array( value ) {\n\treturn (\n\t\t( hasFloat32Array && value instanceof Float32Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Float32Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isFloat32Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Float32Array === 'function' ) ? Float32Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Float32Array === 'function' ) ? Float32Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of single-precision floating-point numbers in the platform byte order.\n*\n* @module @stdlib/array-float32\n*\n* @example\n* import ctor from '@stdlib/array-float32';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasFloat32ArraySupport from '@stdlib/assert-has-float32array-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasFloat32ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isFloat32Array from '@stdlib/assert-is-float32array';\nimport PINF from '@stdlib/constants-float64-pinf';\nimport GlobalFloat32Array from './float32array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Float32Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Float32Array` support\n*\n* @example\n* var bool = hasFloat32ArraySupport();\n* // returns \n*/\nfunction hasFloat32ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalFloat32Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = new GlobalFloat32Array( [ 1.0, 3.14, -3.14, 5.0e40 ] );\n\t\tbool = (\n\t\t\tisFloat32Array( arr ) &&\n\t\t\tarr[ 0 ] === 1.0 &&\n\t\t\tarr[ 1 ] === 3.140000104904175 &&\n\t\t\tarr[ 2 ] === -3.140000104904175 &&\n\t\t\tarr[ 3 ] === PINF\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasFloat32ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of single-precision floating-point numbers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasInt16Array = ( typeof Int16Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is an Int16Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an Int16Array\n*\n* @example\n* var bool = isInt16Array( new Int16Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isInt16Array( [] );\n* // returns false\n*/\nfunction isInt16Array( value ) {\n\treturn (\n\t\t( hasInt16Array && value instanceof Int16Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Int16Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isInt16Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum signed 16-bit integer.\n*\n* @module @stdlib/constants-int16-max\n* @type {integer32}\n*\n* @example\n* import INT16_MAX from '@stdlib/constants-int16-max';\n* // returns 32767\n*/\n\n\n// MAIN //\n\n/**\n* Maximum signed 16-bit integer.\n*\n* ## Notes\n*\n* The number has the value\n*\n* ```tex\n* 2^{15} - 1\n* ```\n*\n* which corresponds to the bit sequence\n*\n* ```binarystring\n* 0111111111111111\n* ```\n*\n* @constant\n* @type {integer32}\n* @default 32767\n*/\nvar INT16_MAX = 32767|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default INT16_MAX;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Int16Array === 'function' ) ? Int16Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Int16Array === 'function' ) ? Int16Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of twos-complement 16-bit signed integers in the platform byte order.\n*\n* @module @stdlib/array-int16\n*\n* @example\n* import ctor from '@stdlib/array-int16';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasInt16ArraySupport from '@stdlib/assert-has-int16array-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasInt16ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isInt16Array from '@stdlib/assert-is-int16array';\nimport INT16_MAX from '@stdlib/constants-int16-max';\nimport INT16_MIN from '@stdlib/constants-int16-min';\nimport GlobalInt16Array from './int16array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Int16Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Int16Array` support\n*\n* @example\n* var bool = hasInt16ArraySupport();\n* // returns \n*/\nfunction hasInt16ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalInt16Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = new GlobalInt16Array( [ 1, 3.14, -3.14, INT16_MAX+1 ] );\n\t\tbool = (\n\t\t\tisInt16Array( arr ) &&\n\t\t\tarr[ 0 ] === 1 &&\n\t\t\tarr[ 1 ] === 3 && // truncation\n\t\t\tarr[ 2 ] === -3 && // truncation\n\t\t\tarr[ 3 ] === INT16_MIN // wrap around\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasInt16ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Minimum signed 16-bit integer.\n*\n* @module @stdlib/constants-int16-min\n* @type {integer32}\n*\n* @example\n* import INT16_MIN from '@stdlib/constants-int16-min';\n* // returns -32768\n*/\n\n\n// MAIN //\n\n/**\n* Minimum signed 16-bit integer.\n*\n* ## Notes\n*\n* The number has the value\n*\n* ```tex\n* -(2^{15})\n* ```\n*\n* which corresponds to the two's complement bit sequence\n*\n* ```binarystring\n* 1000000000000000\n* ```\n*\n* @constant\n* @type {integer32}\n* @default -32768\n*/\nvar INT16_MIN = -32768|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default INT16_MIN;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of twos-complement 16-bit signed integers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasInt32Array = ( typeof Int32Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is an Int32Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an Int32Array\n*\n* @example\n* var bool = isInt32Array( new Int32Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isInt32Array( [] );\n* // returns false\n*/\nfunction isInt32Array( value ) {\n\treturn (\n\t\t( hasInt32Array && value instanceof Int32Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Int32Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isInt32Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum signed 32-bit integer.\n*\n* @module @stdlib/constants-int32-max\n* @type {integer32}\n*\n* @example\n* import INT32_MAX from '@stdlib/constants-int32-max';\n* // returns 2147483647\n*/\n\n\n// MAIN //\n\n/**\n* Maximum signed 32-bit integer.\n*\n* ## Notes\n*\n* The number has the value\n*\n* ```tex\n* 2^{31} - 1\n* ```\n*\n* which corresponds to the bit sequence\n*\n* ```binarystring\n* 01111111111111111111111111111111\n* ```\n*\n* @constant\n* @type {integer32}\n* @default 2147483647\n*/\nvar INT32_MAX = 2147483647|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default INT32_MAX;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Int32Array === 'function' ) ? Int32Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Int32Array === 'function' ) ? Int32Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of twos-complement 32-bit signed integers in the platform byte order.\n*\n* @module @stdlib/array-int32\n*\n* @example\n* import ctor from '@stdlib/array-int32';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasInt32ArraySupport from '@stdlib/assert-has-int32array-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasInt32ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isInt32Array from '@stdlib/assert-is-int32array';\nimport INT32_MAX from '@stdlib/constants-int32-max';\nimport INT32_MIN from '@stdlib/constants-int32-min';\nimport GlobalInt32Array from './int32array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Int32Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Int32Array` support\n*\n* @example\n* var bool = hasInt32ArraySupport();\n* // returns \n*/\nfunction hasInt32ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalInt32Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = new GlobalInt32Array( [ 1, 3.14, -3.14, INT32_MAX+1 ] );\n\t\tbool = (\n\t\t\tisInt32Array( arr ) &&\n\t\t\tarr[ 0 ] === 1 &&\n\t\t\tarr[ 1 ] === 3 && // truncation\n\t\t\tarr[ 2 ] === -3 && // truncation\n\t\t\tarr[ 3 ] === INT32_MIN // wrap around\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasInt32ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Minimum signed 32-bit integer.\n*\n* @module @stdlib/constants-int32-min\n* @type {integer32}\n*\n* @example\n* import INT32_MIN from '@stdlib/constants-int32-min';\n* // returns -2147483648\n*/\n\n\n// MAIN //\n\n/**\n* Minimum signed 32-bit integer.\n*\n* ## Notes\n*\n* The number has the value\n*\n* ```tex\n* -(2^{31})\n* ```\n*\n* which corresponds to the two's complement bit sequence\n*\n* ```binarystring\n* 10000000000000000000000000000000\n* ```\n*\n* @constant\n* @type {integer32}\n* @default -2147483648\n*/\nvar INT32_MIN = -2147483648|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default INT32_MIN;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of twos-complement 32-bit signed integers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasInt8Array = ( typeof Int8Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is an Int8Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an Int8Array\n*\n* @example\n* var bool = isInt8Array( new Int8Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isInt8Array( [] );\n* // returns false\n*/\nfunction isInt8Array( value ) {\n\treturn (\n\t\t( hasInt8Array && value instanceof Int8Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Int8Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isInt8Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum signed 8-bit integer.\n*\n* @module @stdlib/constants-int8-max\n* @type {integer32}\n*\n* @example\n* import INT8_MAX from '@stdlib/constants-int8-max';\n* // returns 127\n*/\n\n\n// MAIN //\n\n/**\n* Maximum signed 8-bit integer.\n*\n* ## Notes\n*\n* The number is given by\n*\n* ```tex\n* 2^{7} - 1\n* ```\n*\n* which corresponds to the bit sequence\n*\n* ```binarystring\n* 01111111\n* ```\n*\n* @constant\n* @type {integer32}\n* @default 127\n*/\nvar INT8_MAX = 127|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default INT8_MAX;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Int8Array === 'function' ) ? Int8Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Int8Array === 'function' ) ? Int8Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of twos-complement 8-bit signed integers in the platform byte order.\n*\n* @module @stdlib/array-int8\n*\n* @example\n* import ctor from '@stdlib/array-int8';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasInt8ArraySupport from '@stdlib/assert-has-int8array-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasInt8ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isInt8Array from '@stdlib/assert-is-int8array';\nimport INT8_MAX from '@stdlib/constants-int8-max';\nimport INT8_MIN from '@stdlib/constants-int8-min';\nimport GlobalInt8Array from './int8array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Int8Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Int8Array` support\n*\n* @example\n* var bool = hasInt8ArraySupport();\n* // returns \n*/\nfunction hasInt8ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalInt8Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = new GlobalInt8Array( [ 1, 3.14, -3.14, INT8_MAX+1 ] );\n\t\tbool = (\n\t\t\tisInt8Array( arr ) &&\n\t\t\tarr[ 0 ] === 1 &&\n\t\t\tarr[ 1 ] === 3 && // truncation\n\t\t\tarr[ 2 ] === -3 && // truncation\n\t\t\tarr[ 3 ] === INT8_MIN // wrap around\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasInt8ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Minimum signed 8-bit integer.\n*\n* @module @stdlib/constants-int8-min\n* @type {integer32}\n*\n* @example\n* import INT8_MIN from '@stdlib/constants-int8-min';\n* // returns -128\n*/\n\n\n// MAIN //\n\n/**\n* Minimum signed 8-bit integer.\n*\n* ## Notes\n*\n* The number is given by\n*\n* ```tex\n* -(2^{7})\n* ```\n*\n* which corresponds to the two's complement bit sequence\n*\n* ```binarystring\n* 10000000\n* ```\n*\n* @constant\n* @type {integer32}\n* @default -128\n*/\nvar INT8_MIN = -128|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default INT8_MIN;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of twos-complement 8-bit signed integers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasUint16Array = ( typeof Uint16Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Uint16Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a Uint16Array\n*\n* @example\n* var bool = isUint16Array( new Uint16Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isUint16Array( [] );\n* // returns false\n*/\nfunction isUint16Array( value ) {\n\treturn (\n\t\t( hasUint16Array && value instanceof Uint16Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Uint16Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isUint16Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum unsigned 16-bit integer.\n*\n* @module @stdlib/constants-uint16-max\n* @type {integer32}\n*\n* @example\n* import UINT16_MAX from '@stdlib/constants-uint16-max';\n* // returns 65535\n*/\n\n\n// MAIN //\n\n/**\n* Maximum unsigned 16-bit integer.\n*\n* ## Notes\n*\n* The number has the value\n*\n* ```tex\n* 2^{16} - 1\n* ```\n*\n* which corresponds to the bit sequence\n*\n* ```binarystring\n* 1111111111111111\n* ```\n*\n* @constant\n* @type {integer32}\n* @default 65535\n*/\nvar UINT16_MAX = 65535|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default UINT16_MAX;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Uint16Array === 'function' ) ? Uint16Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Uint16Array === 'function' ) ? Uint16Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of 16-bit unsigned integers in the platform byte order.\n*\n* @module @stdlib/array-uint16\n*\n* @example\n* import ctor from '@stdlib/array-uint16';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasUint16ArraySupport from '@stdlib/assert-has-uint16array-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasUint16ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isUint16Array from '@stdlib/assert-is-uint16array';\nimport UINT16_MAX from '@stdlib/constants-uint16-max';\nimport GlobalUint16Array from './uint16array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Uint16Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Uint16Array` support\n*\n* @example\n* var bool = hasUint16ArraySupport();\n* // returns \n*/\nfunction hasUint16ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalUint16Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = [ 1, 3.14, -3.14, UINT16_MAX+1, UINT16_MAX+2 ];\n\t\tarr = new GlobalUint16Array( arr );\n\t\tbool = (\n\t\t\tisUint16Array( arr ) &&\n\t\t\tarr[ 0 ] === 1 &&\n\t\t\tarr[ 1 ] === 3 && // truncation\n\t\t\tarr[ 2 ] === UINT16_MAX-2 && // truncation and wrap around\n\t\t\tarr[ 3 ] === 0 && // wrap around\n\t\t\tarr[ 4 ] === 1 // wrap around\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasUint16ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of 16-bit unsigned integers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasUint32Array = ( typeof Uint32Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Uint32Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a Uint32Array\n*\n* @example\n* var bool = isUint32Array( new Uint32Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isUint32Array( [] );\n* // returns false\n*/\nfunction isUint32Array( value ) {\n\treturn (\n\t\t( hasUint32Array && value instanceof Uint32Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Uint32Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isUint32Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum unsigned 32-bit integer.\n*\n* @module @stdlib/constants-uint32-max\n* @type {uinteger32}\n*\n* @example\n* import UINT32_MAX from '@stdlib/constants-uint32-max';\n* // returns 4294967295\n*/\n\n\n// MAIN //\n\n/**\n* Maximum unsigned 32-bit integer.\n*\n* ## Notes\n*\n* The number has the value\n*\n* ```tex\n* 2^{32} - 1\n* ```\n*\n* which corresponds to the bit sequence\n*\n* ```binarystring\n* 11111111111111111111111111111111\n* ```\n*\n* @constant\n* @type {uinteger32}\n* @default 4294967295\n*/\nvar UINT32_MAX = 4294967295;\n\n\n// EXPORTS //\n\nexport default UINT32_MAX;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Uint32Array === 'function' ) ? Uint32Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Uint32Array === 'function' ) ? Uint32Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of 32-bit unsigned integers in the platform byte order.\n*\n* @module @stdlib/array-uint32\n*\n* @example\n* import ctor from '@stdlib/array-uint32';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasUint32ArraySupport from '@stdlib/assert-has-uint32array-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasUint32ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isUint32Array from '@stdlib/assert-is-uint32array';\nimport UINT32_MAX from '@stdlib/constants-uint32-max';\nimport GlobalUint32Array from './uint32array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Uint32Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Uint32Array` support\n*\n* @example\n* var bool = hasUint32ArraySupport();\n* // returns \n*/\nfunction hasUint32ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalUint32Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = [ 1, 3.14, -3.14, UINT32_MAX+1, UINT32_MAX+2 ];\n\t\tarr = new GlobalUint32Array( arr );\n\t\tbool = (\n\t\t\tisUint32Array( arr ) &&\n\t\t\tarr[ 0 ] === 1 &&\n\t\t\tarr[ 1 ] === 3 && // truncation\n\t\t\tarr[ 2 ] === UINT32_MAX-2 && // truncation and wrap around\n\t\t\tarr[ 3 ] === 0 && // wrap around\n\t\t\tarr[ 4 ] === 1 // wrap around\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasUint32ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of 32-bit unsigned integers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasUint8Array = ( typeof Uint8Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Uint8Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a Uint8Array\n*\n* @example\n* var bool = isUint8Array( new Uint8Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isUint8Array( [] );\n* // returns false\n*/\nfunction isUint8Array( value ) {\n\treturn (\n\t\t( hasUint8Array && value instanceof Uint8Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Uint8Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isUint8Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum unsigned 8-bit integer.\n*\n* @module @stdlib/constants-uint8-max\n* @type {integer32}\n*\n* @example\n* import UINT8_MAX from '@stdlib/constants-uint8-max';\n* // returns 255\n*/\n\n\n// MAIN //\n\n/**\n* Maximum unsigned 8-bit integer.\n*\n* ## Notes\n*\n* The number has the value\n*\n* ```tex\n* 2^{8} - 1\n* ```\n*\n* which corresponds to the bit sequence\n*\n* ```binarystring\n* 11111111\n* ```\n*\n* @constant\n* @type {integer32}\n* @default 255\n*/\nvar UINT8_MAX = 255|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default UINT8_MAX;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Uint8Array === 'function' ) ? Uint8Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Uint8Array === 'function' ) ? Uint8Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of 8-bit unsigned integers in the platform byte order.\n*\n* @module @stdlib/array-uint8\n*\n* @example\n* import ctor from '@stdlib/array-uint8';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasUint8ArraySupport from '@stdlib/assert-has-uint8array-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasUint8ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isUint8Array from '@stdlib/assert-is-uint8array';\nimport UINT8_MAX from '@stdlib/constants-uint8-max';\nimport GlobalUint8Array from './uint8array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Uint8Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Uint8Array` support\n*\n* @example\n* var bool = hasUint8ArraySupport();\n* // returns \n*/\nfunction hasUint8ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalUint8Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = [ 1, 3.14, -3.14, UINT8_MAX+1, UINT8_MAX+2 ];\n\t\tarr = new GlobalUint8Array( arr );\n\t\tbool = (\n\t\t\tisUint8Array( arr ) &&\n\t\t\tarr[ 0 ] === 1 &&\n\t\t\tarr[ 1 ] === 3 && // truncation\n\t\t\tarr[ 2 ] === UINT8_MAX-2 && // truncation and wrap around\n\t\t\tarr[ 3 ] === 0 && // wrap around\n\t\t\tarr[ 4 ] === 1 // wrap around\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasUint8ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of 8-bit unsigned integers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasUint8ClampedArray = ( typeof Uint8ClampedArray === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Uint8ClampedArray.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a Uint8ClampedArray\n*\n* @example\n* var bool = isUint8ClampedArray( new Uint8ClampedArray( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isUint8ClampedArray( [] );\n* // returns false\n*/\nfunction isUint8ClampedArray( value ) {\n\treturn (\n\t\t( hasUint8ClampedArray && value instanceof Uint8ClampedArray ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Uint8ClampedArray]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isUint8ClampedArray;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Uint8ClampedArray === 'function' ) ? Uint8ClampedArray : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Uint8ClampedArray === 'function' ) ? Uint8ClampedArray : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of 8-bit unsigned integers in the platform byte order clamped to 0-255.\n*\n* @module @stdlib/array-uint8c\n*\n* @example\n* import ctor from '@stdlib/array-uint8c';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasUint8ClampedArraySupport from '@stdlib/assert-has-uint8clampedarray-support'; // eslint-disable-line id-length\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasUint8ClampedArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isUint8ClampedArray from '@stdlib/assert-is-uint8clampedarray';\nimport GlobalUint8ClampedArray from './uint8clampedarray.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Uint8ClampedArray` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Uint8ClampedArray` support\n*\n* @example\n* var bool = hasUint8ClampedArraySupport();\n* // returns \n*/\nfunction hasUint8ClampedArraySupport() { // eslint-disable-line id-length\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalUint8ClampedArray !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = new GlobalUint8ClampedArray( [ -1, 0, 1, 3.14, 4.99, 255, 256 ] );\n\t\tbool = (\n\t\t\tisUint8ClampedArray( arr ) &&\n\t\t\tarr[ 0 ] === 0 && // clamped\n\t\t\tarr[ 1 ] === 0 &&\n\t\t\tarr[ 2 ] === 1 &&\n\t\t\tarr[ 3 ] === 3 && // round to nearest\n\t\t\tarr[ 4 ] === 5 && // round to nearest\n\t\t\tarr[ 5 ] === 255 &&\n\t\t\tarr[ 6 ] === 255 // clamped\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasUint8ClampedArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of 8-bit unsigned integers in the platform byte order clamped to 0-255.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum length of a generic array.\n*\n* @module @stdlib/constants-array-max-array-length\n*\n* @example\n* import MAX_ARRAY_LENGTH from '@stdlib/constants-array-max-array-length';\n* // returns 4294967295\n*/\n\n// MAIN //\n\n/**\n* Maximum length of a generic array.\n*\n* ```tex\n* 2^{32} - 1\n* ```\n*\n* @constant\n* @type {uinteger32}\n* @default 4294967295\n*/\nvar MAX_ARRAY_LENGTH = 4294967295>>>0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default MAX_ARRAY_LENGTH;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isInteger from '@stdlib/math-base-assert-is-integer';\nimport MAX_LENGTH from '@stdlib/constants-array-max-array-length';\n\n\n// MAIN //\n\n/**\n* Tests if a value is an array-like object.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is an array-like object\n*\n* @example\n* var bool = isArrayLikeObject( [] );\n* // returns true\n*\n* @example\n* var bool = isArrayLikeObject( { 'length':10 } );\n* // returns true\n*\n* @example\n* var bool = isArrayLikeObject( 'beep' );\n* // returns false\n*/\nfunction isArrayLikeObject( value ) {\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\ttypeof value.length === 'number' &&\n\t\tisInteger( value.length ) &&\n\t\tvalue.length >= 0 &&\n\t\tvalue.length <= MAX_LENGTH\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isArrayLikeObject;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum length of a typed array.\n*\n* @module @stdlib/constants-array-max-typed-array-length\n*\n* @example\n* import MAX_TYPED_ARRAY_LENGTH from '@stdlib/constants-array-max-typed-array-length';\n* // returns 9007199254740991\n*/\n\n// MAIN //\n\n/**\n* Maximum length of a typed array.\n*\n* ```tex\n* 2^{53} - 1\n* ```\n*\n* @constant\n* @type {number}\n* @default 9007199254740991\n*/\nvar MAX_TYPED_ARRAY_LENGTH = 9007199254740991;\n\n\n// EXPORTS //\n\nexport default MAX_TYPED_ARRAY_LENGTH;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isInteger from '@stdlib/math-base-assert-is-integer';\nimport MAX_LENGTH from '@stdlib/constants-array-max-typed-array-length';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a collection.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether a value is a collection\n*\n* @example\n* var bool = isCollection( [] );\n* // returns true\n*\n* @example\n* var bool = isCollection( {} );\n* // returns false\n*/\nfunction isCollection( value ) {\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\ttypeof value.length === 'number' &&\n\t\tisInteger( value.length ) &&\n\t\tvalue.length >= 0 &&\n\t\tvalue.length <= MAX_LENGTH\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isCollection;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasArrayBuffer = ( typeof ArrayBuffer === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is an ArrayBuffer.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an ArrayBuffer\n*\n* @example\n* import ArrayBuffer from '@stdlib/array-buffer';\n*\n* var bool = isArrayBuffer( new ArrayBuffer( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isArrayBuffer( [] );\n* // returns false\n*/\nfunction isArrayBuffer( value ) {\n\treturn (\n\t\t( hasArrayBuffer && value instanceof ArrayBuffer ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object ArrayBuffer]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isArrayBuffer;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar f;\n\n\n// FUNCTIONS //\n\n/**\n* Tests if a value is an array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an array\n*\n* @example\n* var bool = isArray( [] );\n* // returns true\n*\n* @example\n* var bool = isArray( {} );\n* // returns false\n*/\nfunction isArray( value ) {\n\treturn ( nativeClass( value ) === '[object Array]' );\n}\n\n\n// MAIN //\n\nif ( Array.isArray ) {\n\tf = Array.isArray;\n} else {\n\tf = isArray;\n}\n\n\n// EXPORTS //\n\nexport default f;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isArray from '@stdlib/assert-is-array';\n\n\n// MAIN //\n\n/**\n* Tests if a value is an object; e.g., `{}`.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an object\n*\n* @example\n* var bool = isObject( {} );\n* // returns true\n*\n* @example\n* var bool = isObject( null );\n* // returns false\n*/\nfunction isObject( value ) {\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\t!isArray( value )\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isObject;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Tests if a value is a string primitive.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a string primitive\n*\n* @example\n* var bool = isString( 'beep' );\n* // returns true\n*\n* @example\n* var bool = isString( new String( 'beep' ) );\n* // returns false\n*/\nfunction isString( value ) {\n\treturn ( typeof value === 'string' );\n}\n\n\n// EXPORTS //\n\nexport default isString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// eslint-disable-next-line stdlib/no-redeclare\nvar valueOf = String.prototype.valueOf; // non-generic\n\n\n// EXPORTS //\n\nexport default valueOf;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport hasToStringTag from '@stdlib/assert-has-tostringtag-support';\nimport nativeClass from '@stdlib/utils-native-class';\nimport test from './try2valueof.js';\n\n\n// VARIABLES //\n\nvar FLG = hasToStringTag();\n\n\n// MAIN //\n\n/**\n* Tests if a value is a string object.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a string object\n*\n* @example\n* var bool = isString( new String( 'beep' ) );\n* // returns true\n*\n* @example\n* var bool = isString( 'beep' );\n* // returns false\n*/\nfunction isString( value ) {\n\tif ( typeof value === 'object' ) {\n\t\tif ( value instanceof String ) {\n\t\t\treturn true;\n\t\t}\n\t\tif ( FLG ) {\n\t\t\treturn test( value );\n\t\t}\n\t\treturn ( nativeClass( value ) === '[object String]' );\n\t}\n\treturn false;\n}\n\n\n// EXPORTS //\n\nexport default isString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport valueOf from './valueof.js'; // eslint-disable-line stdlib/no-redeclare\n\n\n// MAIN //\n\n/**\n* Attempts to extract a string value.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a string can be extracted\n*/\nfunction test( value ) {\n\ttry {\n\t\tvalueOf.call( value );\n\t\treturn true;\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\treturn false;\n\t}\n}\n\n\n// EXPORTS //\n\nexport default test;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a string.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a string\n*\n* @example\n* var bool = isString( new String( 'beep' ) );\n* // returns true\n*\n* @example\n* var bool = isString( 'beep' );\n* // returns true\n*/\nfunction isString( value ) {\n\treturn ( isPrimitive( value ) || isObject( value ) );\n}\n\n\n// EXPORTS //\n\nexport default isString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test if a value is a string.\n*\n* @module @stdlib/assert-is-string\n*\n* @example\n* import isString from '@stdlib/assert-is-string';\n*\n* var bool = isString( 'beep' );\n* // returns true\n*\n* bool = isString( new String( 'beep' ) );\n* // returns true\n*\n* bool = isString( 5 );\n* // returns false\n*\n* @example\n* import { isObject as isString } from '@stdlib/assert-is-string';\n*\n* var bool = isString( new String( 'beep' ) );\n* // returns true\n*\n* bool = isString( 'beep' );\n* // returns false\n*\n* @example\n* import { isPrimitive as isString } from '@stdlib/assert-is-string';\n*\n* var bool = isString( 'beep' );\n* // returns true\n*\n* bool = isString( new String( 'beep' ) );\n* // returns false\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'isPrimitive', isPrimitive );\nsetReadOnly( main, 'isObject', isObject );\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\nvar RE = /./;\n\n\n// EXPORTS //\n\nexport default RE;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Tests if a value is a boolean primitive.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a boolean primitive\n*\n* @example\n* var bool = isBoolean( true );\n* // returns true\n*\n* @example\n* var bool = isBoolean( false );\n* // returns true\n*\n* @example\n* import Boolean from '@stdlib/boolean-ctor';\n*\n* var bool = isBoolean( new Boolean( true ) );\n* // returns false\n*/\nfunction isBoolean( value ) {\n\treturn ( typeof value === 'boolean' );\n}\n\n\n// EXPORTS //\n\nexport default isBoolean;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Returns a boolean.\n*\n* @name Boolean\n* @constructor\n* @type {Function}\n* @param {*} value - input value\n* @returns {(boolean|Boolean)} boolean\n*\n* @example\n* var b = Boolean( null );\n* // returns false\n*\n* b = Boolean( [] );\n* // returns true\n*\n* b = Boolean( {} );\n* // returns true\n*\n* @example\n* var b = new Boolean( false );\n* // returns \n*/\nvar Bool = Boolean; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default Bool;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// eslint-disable-next-line stdlib/no-redeclare\nvar toString = Boolean.prototype.toString; // non-generic\n\n\n// EXPORTS //\n\nexport default toString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport hasToStringTag from '@stdlib/assert-has-tostringtag-support';\nimport nativeClass from '@stdlib/utils-native-class';\nimport Boolean from '@stdlib/boolean-ctor';\nimport test from './try2serialize.js';\n\n\n// VARIABLES //\n\nvar FLG = hasToStringTag();\n\n\n// MAIN //\n\n/**\n* Tests if a value is a boolean object.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a boolean object\n*\n* @example\n* var bool = isBoolean( true );\n* // returns false\n*\n* @example\n* import Boolean from '@stdlib/boolean-ctor';\n*\n* var bool = isBoolean( new Boolean( false ) );\n* // returns true\n*/\nfunction isBoolean( value ) {\n\tif ( typeof value === 'object' ) {\n\t\tif ( value instanceof Boolean ) {\n\t\t\treturn true;\n\t\t}\n\t\tif ( FLG ) {\n\t\t\treturn test( value );\n\t\t}\n\t\treturn ( nativeClass( value ) === '[object Boolean]' );\n\t}\n\treturn false;\n}\n\n\n// EXPORTS //\n\nexport default isBoolean;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport toString from './tostring.js'; // eslint-disable-line stdlib/no-redeclare\n\n\n// MAIN //\n\n/**\n* Attempts to serialize a value to a string.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value can be serialized\n*/\nfunction test( value ) {\n\ttry {\n\t\ttoString.call( value );\n\t\treturn true;\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\treturn false;\n\t}\n}\n\n\n// EXPORTS //\n\nexport default test;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a boolean.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a boolean\n*\n* @example\n* var bool = isBoolean( false );\n* // returns true\n*\n* @example\n* var bool = isBoolean( true );\n* // returns true\n*\n* @example\n* import Boolean from '@stdlib/boolean-ctor';\n*\n* var bool = isBoolean( new Boolean( false ) );\n* // returns true\n*\n* @example\n* import Boolean from '@stdlib/boolean-ctor';\n*\n* var bool = isBoolean( new Boolean( true ) );\n* // returns true\n*/\nfunction isBoolean( value ) {\n\treturn ( isPrimitive( value ) || isObject( value ) );\n}\n\n\n// EXPORTS //\n\nexport default isBoolean;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test if a value is a boolean.\n*\n* @module @stdlib/assert-is-boolean\n*\n* @example\n* import Boolean from '@stdlib/boolean-ctor';\n* import isBoolean from '@stdlib/assert-is-boolean';\n*\n* var bool = isBoolean( false );\n* // returns true\n*\n* bool = isBoolean( new Boolean( false ) );\n* // returns true\n*\n* @example\n* import Boolean from '@stdlib/boolean-ctor';\n* import { isPrimitive as isBoolean } from '@stdlib/assert-is-boolean';\n*\n* var bool = isBoolean( false );\n* // returns true\n*\n* bool = isBoolean( new Boolean( true ) );\n* // returns false\n*\n* @example\n* import Boolean from '@stdlib/boolean-ctor';\n* import { isObject as isBoolean } from '@stdlib/assert-is-boolean';\n*\n* var bool = isBoolean( true );\n* // returns false\n*\n* bool = isBoolean( new Boolean( false ) );\n* // returns true\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'isPrimitive', isPrimitive );\nsetReadOnly( main, 'isObject', isObject );\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar obj = ( typeof self === 'object' ) ? self : null;\n\n\n// EXPORTS //\n\nexport default obj;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar obj = ( typeof window === 'object' ) ? window : null;\n\n\n// EXPORTS //\n\nexport default obj;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar obj = ( typeof global === 'object' ) ? global : null;\n\n\n// EXPORTS //\n\nexport default obj;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar obj = ( typeof globalThis === 'object' ) ? globalThis : null; // eslint-disable-line no-undef\n\n\n// EXPORTS //\n\nexport default obj;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport getGlobal from '@stdlib/utils-global';\n\n\n// MAIN //\n\nvar root = getGlobal();\nvar nodeList = root.document && root.document.childNodes;\n\n\n// EXPORTS //\n\nexport default nodeList;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isBoolean } from '@stdlib/assert-is-boolean';\nimport format from '@stdlib/string-format';\nimport getThis from './codegen.js';\nimport Self from './self.js';\nimport Win from './window.js';\nimport Global from './global.js';\nimport GlobalThis from './global_this.js';\n\n\n// MAIN //\n\n/**\n* Returns the global object.\n*\n* ## Notes\n*\n* - Using code generation is the **most** reliable way to resolve the global object; however, doing so is likely to violate content security policies (CSPs) in, e.g., Chrome Apps and elsewhere.\n*\n* @param {boolean} [codegen=false] - boolean indicating whether to use code generation to resolve the global object\n* @throws {TypeError} must provide a boolean\n* @throws {Error} unable to resolve global object\n* @returns {Object} global object\n*\n* @example\n* var g = getGlobal();\n* // returns {...}\n*/\nfunction getGlobal( codegen ) {\n\tif ( arguments.length ) {\n\t\tif ( !isBoolean( codegen ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Must provide a boolean. Value: `%s`.', codegen ) );\n\t\t}\n\t\tif ( codegen ) {\n\t\t\treturn getThis();\n\t\t}\n\t\t// Fall through...\n\t}\n\t// Case: 2020 revision of ECMAScript standard\n\tif ( GlobalThis ) {\n\t\treturn GlobalThis;\n\t}\n\t// Case: browsers and web workers\n\tif ( Self ) {\n\t\treturn Self;\n\t}\n\t// Case: browsers\n\tif ( Win ) {\n\t\treturn Win;\n\t}\n\t// Case: Node.js\n\tif ( Global ) {\n\t\treturn Global;\n\t}\n\t// Case: unknown\n\tthrow new Error( 'unexpected error. Unable to resolve global object.' );\n}\n\n\n// EXPORTS //\n\nexport default getGlobal;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Returns the global object using code generation.\n*\n* @private\n* @returns {Object} global object\n*/\nfunction getGlobal() {\n\treturn new Function( 'return this;' )(); // eslint-disable-line no-new-func, stdlib/require-globals\n}\n\n\n// EXPORTS //\n\nexport default getGlobal;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\nvar typedarray = Int8Array; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default typedarray;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Returns a regular expression to capture everything that is not a space immediately after the `function` keyword and before the first left parenthesis.\n*\n* @returns {RegExp} regular expression\n*\n* @example\n* var RE_FUNCTION_NAME = reFunctionName();\n*\n* function fname( fcn ) {\n* return RE_FUNCTION_NAME.exec( fcn.toString() )[ 1 ];\n* }\n*\n* var fn = fname( Math.sqrt );\n* // returns 'sqrt'\n*\n* fn = fname( Int8Array );\n* // returns 'Int8Array'\n*\n* fn = fname( Object.prototype.toString );\n* // returns 'toString'\n*\n* fn = fname( function(){} );\n* // returns ''\n*/\nfunction reFunctionName() {\n\treturn /^\\s*function\\s*([^(]*)/i;\n}\n\n\n// EXPORTS //\n\nexport default reFunctionName;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport reFunctionName from './main.js';\n\n\n// MAIN //\n\n/**\n* Captures everything that is not a space immediately after the `function` keyword and before the first left parenthesis.\n*\n* Regular expression: `/^\\s*function\\s*([^(]*)/i`\n*\n* - `/^\\s*`\n* - Match zero or more spaces at beginning\n*\n* - `function`\n* - Match the word `function`\n*\n* - `\\s*`\n* - Match zero or more spaces after the word `function`\n*\n* - `()`\n* - Capture\n*\n* - `[^(]*`\n* - Match anything except a left parenthesis `(` zero or more times\n*\n* - `/i`\n* - ignore case\n*\n* @constant\n* @type {RegExp}\n* @default /^\\s*function\\s*([^(]*)/i\n*/\nvar RE_FUNCTION_NAME = reFunctionName();\n\n\n// EXPORTS //\n\nexport default RE_FUNCTION_NAME;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Tests if a value is object-like.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether a value is object-like\n*\n* @example\n* var bool = isObjectLike( {} );\n* // returns true\n*\n* @example\n* var bool = isObjectLike( [] );\n* // returns true\n*\n* @example\n* var bool = isObjectLike( null );\n* // returns false\n*/\nfunction isObjectLike( value ) {\n\treturn (\n\t\tvalue !== null &&\n\t\ttypeof value === 'object'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isObjectLike;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\nimport { REGEXP as RE } from '@stdlib/regexp-function-name';\nimport isBuffer from '@stdlib/assert-is-buffer';\n\n\n// MAIN //\n\n/**\n* Determines the name of a value's constructor.\n*\n* @param {*} v - input value\n* @returns {string} name of a value's constructor\n*\n* @example\n* var v = constructorName( 'a' );\n* // returns 'String'\n*\n* @example\n* var v = constructorName( 5 );\n* // returns 'Number'\n*\n* @example\n* var v = constructorName( null );\n* // returns 'Null'\n*\n* @example\n* var v = constructorName( undefined );\n* // returns 'Undefined'\n*\n* @example\n* var v = constructorName( function noop() {} );\n* // returns 'Function'\n*/\nfunction constructorName( v ) {\n\tvar match;\n\tvar name;\n\tvar ctor;\n\tname = nativeClass( v ).slice( 8, -1 );\n\tif ( (name === 'Object' || name === 'Error') && v.constructor ) {\n\t\tctor = v.constructor;\n\t\tif ( typeof ctor.name === 'string' ) {\n\t\t\treturn ctor.name;\n\t\t}\n\t\tmatch = RE.exec( ctor.toString() );\n\t\tif ( match ) {\n\t\t\treturn match[ 1 ];\n\t\t}\n\t}\n\tif ( isBuffer( v ) ) {\n\t\treturn 'Buffer';\n\t}\n\treturn name;\n}\n\n\n// EXPORTS //\n\nexport default constructorName;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isObjectLike from '@stdlib/assert-is-object-like';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Buffer instance.\n*\n* @param {*} value - value to validate\n* @returns {boolean} boolean indicating if a value is a Buffer instance\n*\n* @example\n* var v = isBuffer( new Buffer( 'beep' ) );\n* // returns true\n*\n* @example\n* var v = isBuffer( new Buffer( [1,2,3,4] ) );\n* // returns true\n*\n* @example\n* var v = isBuffer( {} );\n* // returns false\n*\n* @example\n* var v = isBuffer( [] );\n* // returns false\n*/\nfunction isBuffer( value ) {\n\treturn (\n\t\tisObjectLike( value ) &&\n\t\t(\n\t\t\t// eslint-disable-next-line no-underscore-dangle\n\t\t\tvalue._isBuffer || // for envs missing Object.prototype.constructor (e.g., Safari 5-7)\n\t\t\t(\n\t\t\t\tvalue.constructor &&\n\n\t\t\t\t// WARNING: `typeof` is not a foolproof check, as certain envs consider RegExp and NodeList instances to be functions\n\t\t\t\ttypeof value.constructor.isBuffer === 'function' &&\n\t\t\t\tvalue.constructor.isBuffer( value )\n\t\t\t)\n\t\t)\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isBuffer;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Regular expression to capture everything that is not a space immediately after the `function` keyword and before the first left parenthesis.\n*\n* @module @stdlib/regexp-function-name\n*\n* @example\n* import reFunctionName from '@stdlib/regexp-function-name';\n* var RE_FUNCTION_NAME = reFunctionName();\n*\n* function fname( fcn ) {\n* return RE_FUNCTION_NAME.exec( fcn.toString() )[ 1 ];\n* }\n*\n* var fn = fname( Math.sqrt );\n* // returns 'sqrt'\n*\n* fn = fname( Int8Array );\n* // returns 'Int8Array'\n*\n* fn = fname( Object.prototype.toString );\n* // returns 'toString'\n*\n* fn = fname( function(){} );\n* // returns ''\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport REGEXP from './regexp.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'REGEXP', REGEXP );\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test if a value is object-like.\n*\n* @module @stdlib/assert-is-object-like\n*\n* @example\n* import isObjectLike from '@stdlib/assert-is-object-like';\n*\n* var bool = isObjectLike( {} );\n* // returns true\n*\n* bool = isObjectLike( [] );\n* // returns true\n*\n* bool = isObjectLike( null );\n* // returns false\n*\n* @example\n* import { isObjectLikeArray as isObjectLike } from '@stdlib/assert-is-object-like';\n*\n* var bool = isObjectLike( [ {}, [] ] );\n* // returns true\n*\n* bool = isObjectLike( [ {}, '3.0' ] );\n* // returns false\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport arrayfun from '@stdlib/assert-tools-array-function';\nimport main from './main.js';\n\n\n// VARIABLES //\n\nvar isObjectLikeArray = arrayfun( main );\n\n\n// MAIN //\n\nsetReadOnly( main, 'isObjectLikeArray', isObjectLikeArray );\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isArray from '@stdlib/assert-is-array';\nimport format from '@stdlib/string-format';\n\n\n// MAIN //\n\n/**\n* Returns a function which tests if every element in an array passes a test condition.\n*\n* @param {Function} predicate - function to apply\n* @throws {TypeError} must provide a function\n* @returns {Function} an array function\n*\n* @example\n* import isOdd from '@stdlib/assert-is-odd';\n*\n* var arr1 = [ 1, 3, 5, 7 ];\n* var arr2 = [ 3, 5, 8 ];\n*\n* var validate = arrayfcn( isOdd );\n*\n* var bool = validate( arr1 );\n* // returns true\n*\n* bool = validate( arr2 );\n* // returns false\n*/\nfunction arrayfcn( predicate ) {\n\tif ( typeof predicate !== 'function' ) {\n\t\tthrow new TypeError( format( 'invalid argument. Must provide a function. Value: `%s`.', predicate ) );\n\t}\n\treturn every;\n\n\t/**\n\t* Tests if every element in an array passes a test condition.\n\t*\n\t* @private\n\t* @param {*} value - value to test\n\t* @returns {boolean} boolean indicating whether a value is an array for which all elements pass a test condition\n\t*/\n\tfunction every( value ) {\n\t\tvar len;\n\t\tvar i;\n\t\tif ( !isArray( value ) ) {\n\t\t\treturn false;\n\t\t}\n\t\tlen = value.length;\n\t\tif ( len === 0 ) {\n\t\t\treturn false;\n\t\t}\n\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\tif ( predicate( value[ i ] ) === false ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}\n}\n\n\n// EXPORTS //\n\nexport default arrayfcn;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Determine a value's type.\n*\n* @module @stdlib/utils-type-of\n*\n* @example\n* import typeOf from '@stdlib/utils-type-of';\n*\n* var str = typeOf( 'a' );\n* // returns 'string'\n*\n* str = typeOf( 5 );\n* // returns 'number'\n*/\n\n// MODULES //\n\nimport usePolyfill from './check.js';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar main = ( usePolyfill() ) ? polyfill : builtin;\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport RE from './fixtures/re.js';\nimport nodeList from './fixtures/nodelist.js';\nimport typedarray from './fixtures/typedarray.js';\n\n\n// MAIN //\n\n/**\n* Checks whether a polyfill is needed when using the `typeof` operator.\n*\n* @private\n* @returns {boolean} boolean indicating whether a polyfill is needed\n*/\nfunction check() {\n\tif (\n\t\t// Chrome 1-12 returns 'function' for regular expression instances (see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/typeof):\n\t\ttypeof RE === 'function' ||\n\n\t\t// Safari 8 returns 'object' for typed array and weak map constructors (underscore #1929):\n\t\ttypeof typedarray === 'object' ||\n\n\t\t// PhantomJS 1.9 returns 'function' for `NodeList` instances (underscore #2236):\n\t\ttypeof nodeList === 'function'\n\t) {\n\t\treturn true;\n\t}\n\treturn false;\n}\n\n\n// EXPORTS //\n\nexport default check;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport ctorName from '@stdlib/utils-constructor-name';\n\n\n// MAIN //\n\n/**\n* Determines a value's type.\n*\n* @param {*} v - input value\n* @returns {string} string indicating the value's type\n*/\nfunction typeOf( v ) {\n\treturn ctorName( v ).toLowerCase();\n}\n\n\n// EXPORTS //\n\nexport default typeOf;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport ctorName from '@stdlib/utils-constructor-name';\n\n\n// NOTES //\n\n/*\n* Built-in `typeof` operator behavior:\n*\n* ```text\n* typeof null => 'object'\n* typeof undefined => 'undefined'\n* typeof 'a' => 'string'\n* typeof 5 => 'number'\n* typeof NaN => 'number'\n* typeof true => 'boolean'\n* typeof false => 'boolean'\n* typeof {} => 'object'\n* typeof [] => 'object'\n* typeof function foo(){} => 'function'\n* typeof function* foo(){} => 'object'\n* typeof Symbol() => 'symbol'\n* ```\n*\n*/\n\n\n// MAIN //\n\n/**\n* Determines a value's type.\n*\n* @param {*} v - input value\n* @returns {string} string indicating the value's type\n*/\nfunction typeOf( v ) {\n\tvar type;\n\n\t// Address `typeof null` => `object` (see http://wiki.ecmascript.org/doku.php?id=harmony:typeof_null):\n\tif ( v === null ) {\n\t\treturn 'null';\n\t}\n\ttype = typeof v;\n\n\t// If the `typeof` operator returned something other than `object`, we are done. Otherwise, we need to check for an internal class name or search for a constructor.\n\tif ( type === 'object' ) {\n\t\treturn ctorName( v ).toLowerCase();\n\t}\n\treturn type;\n}\n\n\n// EXPORTS //\n\nexport default typeOf;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport typeOf from '@stdlib/utils-type-of';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a function.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a function\n*\n* @example\n* function beep() {\n* return 'beep';\n* }\n*\n* var bool = isFunction( beep );\n* // returns true\n*/\nfunction isFunction( value ) {\n\t// Note: cannot use `typeof` directly, as various browser engines incorrectly return `'function'` when operating on non-function objects, such as regular expressions and NodeLists.\n\treturn ( typeOf( value ) === 'function' );\n}\n\n\n// EXPORTS //\n\nexport default isFunction;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isNumber } from '@stdlib/assert-is-number';\nimport defineProperty from '@stdlib/utils-define-property';\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport format from '@stdlib/string-format';\nimport toStr from './tostring.js';\nimport toJSON from './tojson.js';\n\n\n// MAIN //\n\n/**\n* 128-bit complex number constructor.\n*\n* @constructor\n* @param {number} real - real component\n* @param {number} imag - imaginary component\n* @throws {TypeError} must invoke using the `new` keyword\n* @throws {TypeError} real component must be a number\n* @throws {TypeError} imaginary component must be a number\n* @returns {Complex128} 128-bit complex number\n*\n* @example\n* var z = new Complex128( 5.0, 3.0 );\n* // returns \n*/\nfunction Complex128( real, imag ) {\n\tif ( !( this instanceof Complex128 ) ) {\n\t\tthrow new TypeError( 'invalid invocation. Constructor must be called with the `new` keyword.' );\n\t}\n\tif ( !isNumber( real ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Real component must be a number. Value: `%s`.', real ) );\n\t}\n\tif ( !isNumber( imag ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Imaginary component must be a number. Value: `%s`.', imag ) );\n\t}\n\tdefineProperty( this, 're', {\n\t\t'configurable': false,\n\t\t'enumerable': true,\n\t\t'writable': false,\n\t\t'value': real\n\t});\n\tdefineProperty( this, 'im', {\n\t\t'configurable': false,\n\t\t'enumerable': true,\n\t\t'writable': false,\n\t\t'value': imag\n\t});\n\treturn this;\n}\n\n/**\n* Size (in bytes) of each component.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex128\n* @type {integer}\n* @returns {integer} size of each component\n*\n* @example\n* var nbytes = Complex128.BYTES_PER_ELEMENT;\n* // returns 8\n*/\nsetReadOnly( Complex128, 'BYTES_PER_ELEMENT', 8 );\n\n/**\n* Size (in bytes) of each component.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex128.prototype\n* @type {integer}\n* @returns {integer} size of each component\n*\n* @example\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var nbytes = z.BYTES_PER_ELEMENT;\n* // returns 8\n*/\nsetReadOnly( Complex128.prototype, 'BYTES_PER_ELEMENT', 8 );\n\n/**\n* Length (in bytes) of a complex number.\n*\n* @name byteLength\n* @memberof Complex128.prototype\n* @type {integer}\n* @returns {integer} byte length\n*\n* @example\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var nbytes = z.byteLength;\n* // returns 16\n*/\nsetReadOnly( Complex128.prototype, 'byteLength', 16 );\n\n/**\n* Serializes a complex number as a string.\n*\n* @name toString\n* @memberof Complex128.prototype\n* @type {Function}\n* @returns {string} serialized complex number\n*\n* @example\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var str = z.toString();\n* // returns '5 + 3i'\n*/\nsetReadOnly( Complex128.prototype, 'toString', toStr );\n\n/**\n* Serializes a complex number as a JSON object.\n*\n* ## Notes\n*\n* - `JSON.stringify()` implicitly calls this method when stringifying a `Complex128` instance.\n*\n* @name toJSON\n* @memberof Complex128.prototype\n* @type {Function}\n* @returns {Object} serialized complex number\n*\n* @example\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var obj = z.toJSON();\n* // returns { 'type': 'Complex128', 're': 5.0, 'im': 3.0 }\n*/\nsetReadOnly( Complex128.prototype, 'toJSON', toJSON );\n\n\n// EXPORTS //\n\nexport default Complex128;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Serializes a complex number as a string.\n*\n* @private\n* @returns {string} serialized complex number\n*/\nfunction toString() { // eslint-disable-line stdlib/no-redeclare\n\t/* eslint-disable no-invalid-this */\n\tvar str = '' + this.re;\n\tif ( this.im < 0 ) {\n\t\tstr += ' - ' + (-this.im);\n\t} else {\n\t\tstr += ' + ' + this.im;\n\t}\n\tstr += 'i';\n\treturn str;\n}\n\n\n// EXPORTS //\n\nexport default toString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Serializes a complex number as a JSON object.\n*\n* @private\n* @returns {Object} JSON representation\n*/\nfunction toJSON() {\n\t/* eslint-disable no-invalid-this */\n\tvar out = {};\n\tout.type = 'Complex128';\n\tout.re = this.re;\n\tout.im = this.im;\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default toJSON;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar fround = ( typeof Math.fround === 'function' ) ? Math.fround : null; // eslint-disable-line stdlib/no-builtin-math\n\n\n// EXPORTS //\n\nexport default fround;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport Float32Array from '@stdlib/array-float32';\n\n\n// VARIABLES //\n\nvar FLOAT32_VIEW = new Float32Array( 1 );\n\n\n// MAIN //\n\n/**\n* Converts a double-precision floating-point number to the nearest single-precision floating-point number.\n*\n* @param {number} x - double-precision floating-point number\n* @returns {number} nearest single-precision floating-point number\n*\n* @example\n* var y = float64ToFloat32( 1.337 );\n* // returns 1.3370000123977661\n*/\nfunction float64ToFloat32( x ) {\n\tFLOAT32_VIEW[ 0 ] = x;\n\treturn FLOAT32_VIEW[ 0 ];\n}\n\n\n// EXPORTS //\n\nexport default float64ToFloat32;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Convert a double-precision floating-point number to the nearest single-precision floating-point number.\n*\n* @module @stdlib/number-float64-base-to-float32\n*\n* @example\n* import float64ToFloat32 from '@stdlib/number-float64-base-to-float32';\n*\n* var y = float64ToFloat32( 1.337 );\n* // returns 1.3370000123977661\n*/\n\n// MODULES //\n\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar float64ToFloat32;\nif ( typeof builtin === 'function' ) {\n\tfloat64ToFloat32 = builtin;\n} else {\n\tfloat64ToFloat32 = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default float64ToFloat32;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isNumber } from '@stdlib/assert-is-number';\nimport defineProperty from '@stdlib/utils-define-property';\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport float64ToFloat32 from '@stdlib/number-float64-base-to-float32';\nimport format from '@stdlib/string-format';\nimport toStr from './tostring.js';\nimport toJSON from './tojson.js';\n\n\n// MAIN //\n\n/**\n* 64-bit complex number constructor.\n*\n* @constructor\n* @param {number} real - real component\n* @param {number} imag - imaginary component\n* @throws {TypeError} must invoke using the `new` keyword\n* @throws {TypeError} real component must be a number\n* @throws {TypeError} imaginary component must be a number\n* @returns {Complex64} 64-bit complex number\n*\n* @example\n* var z = new Complex64( 5.0, 3.0 );\n* // returns \n*/\nfunction Complex64( real, imag ) {\n\tif ( !( this instanceof Complex64 ) ) {\n\t\tthrow new TypeError( 'invalid invocation. Constructor must be called with the `new` keyword.' );\n\t}\n\tif ( !isNumber( real ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Real component must be a number. Value: `%s`.', real ) );\n\t}\n\tif ( !isNumber( imag ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Imaginary component must be a number. Value: `%s`.', imag ) );\n\t}\n\tdefineProperty( this, 're', {\n\t\t'configurable': false,\n\t\t'enumerable': true,\n\t\t'writable': false,\n\t\t'value': float64ToFloat32( real )\n\t});\n\tdefineProperty( this, 'im', {\n\t\t'configurable': false,\n\t\t'enumerable': true,\n\t\t'writable': false,\n\t\t'value': float64ToFloat32( imag )\n\t});\n\treturn this;\n}\n\n/**\n* Size (in bytes) of each component.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex64\n* @type {integer}\n* @returns {integer} size of each component\n*\n* @example\n* var nbytes = Complex64.BYTES_PER_ELEMENT;\n* // returns 4\n*/\nsetReadOnly( Complex64, 'BYTES_PER_ELEMENT', 4 );\n\n/**\n* Size (in bytes) of each component.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex64.prototype\n* @type {integer}\n* @returns {integer} size of each component\n*\n* @example\n* var z = new Complex64( 5.0, 3.0 );\n*\n* var nbytes = z.BYTES_PER_ELEMENT;\n* // returns 4\n*/\nsetReadOnly( Complex64.prototype, 'BYTES_PER_ELEMENT', 4 );\n\n/**\n* Length (in bytes) of a complex number.\n*\n* @name byteLength\n* @memberof Complex64.prototype\n* @type {integer}\n* @returns {integer} byte length\n*\n* @example\n* var z = new Complex64( 5.0, 3.0 );\n*\n* var nbytes = z.byteLength;\n* // returns 8\n*/\nsetReadOnly( Complex64.prototype, 'byteLength', 8 );\n\n/**\n* Serializes a complex number as a string.\n*\n* @name toString\n* @memberof Complex64.prototype\n* @type {Function}\n* @returns {string} serialized complex number\n*\n* @example\n* var z = new Complex64( 5.0, 3.0 );\n*\n* var str = z.toString();\n* // returns '5 + 3i'\n*/\nsetReadOnly( Complex64.prototype, 'toString', toStr );\n\n/**\n* Serializes a complex number as a JSON object.\n*\n* ## Notes\n*\n* - `JSON.stringify()` implicitly calls this method when stringifying a `Complex64` instance.\n*\n* @name toJSON\n* @memberof Complex64.prototype\n* @type {Function}\n* @returns {Object} serialized complex number\n*\n* @example\n* var z = new Complex64( 5.0, 3.0 );\n*\n* var obj = z.toJSON();\n* // returns { 'type': 'Complex64', 're': 5.0, 'im': 3.0 }\n*/\nsetReadOnly( Complex64.prototype, 'toJSON', toJSON );\n\n\n// EXPORTS //\n\nexport default Complex64;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport Complex128 from '@stdlib/complex-float64';\nimport Complex64 from '@stdlib/complex-float32';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a complex number-like object.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a complex number-like object.\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n* import Complex64 from '@stdlib/complex-float32';\n*\n* var x = new Complex128( 4.0, 2.0 );\n* var bool = isComplexLike( x );\n* // returns true\n*\n* x = new Complex64( 4.0, 2.0 );\n* bool = isComplexLike( x );\n* // returns true\n*/\nfunction isComplexLike( value ) {\n\tif ( value instanceof Complex128 || value instanceof Complex64 ) {\n\t\treturn true;\n\t}\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\ttypeof value.re === 'number' &&\n\t\ttypeof value.im === 'number'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isComplexLike;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isInteger from '@stdlib/math-base-assert-is-integer';\n\n\n// MAIN //\n\n/**\n* Tests if a finite numeric value is an even number.\n*\n* @param {number} x - value to test\n* @returns {boolean} boolean indicating whether the value is an even number\n*\n* @example\n* var bool = isEven( 5.0 );\n* // returns false\n*\n* @example\n* var bool = isEven( -2.0 );\n* // returns true\n*\n* @example\n* var bool = isEven( 0.0 );\n* // returns true\n*\n* @example\n* var bool = isEven( NaN );\n* // returns false\n*/\nfunction isEven( x ) {\n\treturn isInteger( x/2.0 );\n}\n\n\n// EXPORTS //\n\nexport default isEven;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Serializes a complex number as a string.\n*\n* @private\n* @returns {string} serialized complex number\n*/\nfunction toString() { // eslint-disable-line stdlib/no-redeclare\n\t/* eslint-disable no-invalid-this */\n\tvar str = '' + this.re;\n\tif ( this.im < 0 ) {\n\t\tstr += ' - ' + (-this.im);\n\t} else {\n\t\tstr += ' + ' + this.im;\n\t}\n\tstr += 'i';\n\treturn str;\n}\n\n\n// EXPORTS //\n\nexport default toString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Serializes a complex number as a JSON object.\n*\n* @private\n* @returns {Object} JSON representation\n*/\nfunction toJSON() {\n\t/* eslint-disable no-invalid-this */\n\tvar out = {};\n\tout.type = 'Complex64';\n\tout.re = this.re;\n\tout.im = this.im;\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default toJSON;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// VARIABLES //\n\nvar BYTES_PER_ELEMENT = 8; // 4 bytes per float32 x (1 real + 1 imag component)\n\n\n// MAIN //\n\n/**\n* Returns a boolean indicating if a value is a `Complex64Array`.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a `Complex64Array`\n*\n* @example\n* import Complex64Array from '@stdlib/array-complex64';\n*\n* var bool = isComplex64Array( new Complex64Array( 10 ) );\n* // returns true\n*\n* bool = isComplex64Array( [] );\n* // returns false\n*/\nfunction isComplex64Array( value ) {\n\t// Note: the following is not robust and that is intentional. In this case, we are seeking a lower cost way to reasonably determine whether an input value is a `Complex64Array` in order to avoid walking the prototype chain and resolving constructors, which is necessary for robust identification of cross-realm instances. For more robust validation, see `@stdlib/assert/is-complex64array`.\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\tvalue.constructor.name === 'Complex64Array' &&\n\t\tvalue.BYTES_PER_ELEMENT === BYTES_PER_ELEMENT\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isComplex64Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// VARIABLES //\n\nvar BYTES_PER_ELEMENT = 16; // 8 bytes per float64 x (1 real + 1 imag component)\n\n\n// MAIN //\n\n/**\n* Returns a boolean indicating if a value is a `Complex128Array`.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a `Complex128Array`\n*\n* @example\n* import Complex128Array from '@stdlib/array-complex128';\n*\n* var bool = isComplex128Array( new Complex128Array( 10 ) );\n* // returns true\n*\n* bool = isComplex128Array( [] );\n* // returns false\n*/\nfunction isComplex128Array( value ) {\n\t// Note: the following is not robust and that is intentional. In this case, we are seeking a lower cost way to reasonably determine whether an input value is a `Complex128Array` in order to avoid walking the prototype chain and resolving constructors, which is necessary for robust identification of cross-realm instances. For more robust validation, see `@stdlib/assert/is-complex128array`.\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\tvalue.constructor.name === 'Complex128Array' &&\n\t\tvalue.BYTES_PER_ELEMENT === BYTES_PER_ELEMENT\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isComplex128Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport hasOwnProp from '@stdlib/assert-has-own-property';\nimport Symbol from '@stdlib/symbol-ctor';\n\n\n// MAIN //\n\n/**\n* Tests for native `Symbol.iterator` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Symbol.iterator` support\n*\n* @example\n* var bool = hasIteratorSymbolSupport();\n* // returns \n*/\nfunction hasIteratorSymbolSupport() {\n\treturn (\n\t\ttypeof Symbol === 'function' &&\n\t\ttypeof Symbol( 'foo' ) === 'symbol' &&\n\t\thasOwnProp( Symbol, 'iterator' ) &&\n\t\ttypeof Symbol.iterator === 'symbol'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default hasIteratorSymbolSupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport hasIteratorSymbolSupport from '@stdlib/assert-has-iterator-symbol-support';\n\n\n// MAIN //\n\n/**\n* Iterator symbol.\n*\n* @name IteratorSymbol\n* @constant\n* @type {(symbol|null)}\n*\n* @example\n* function iterator() {\n* var it;\n* var i;\n*\n* i = -1;\n*\n* it = {};\n* it.next = next;\n* it.return = done;\n*\n* if ( IteratorSymbol ) {\n* it[ IteratorSymbol ] = iterator;\n* }\n* return it;\n*\n* function next() {\n* i += 1;\n* return {\n* 'value': i,\n* 'done': false\n* };\n* }\n*\n* function done( value ) {\n* if ( arguments.length === 0 ) {\n* return {\n* 'done': true\n* };\n* }\n* return {\n* 'value': value,\n* 'done': true\n* };\n* }\n* }\n*\n* var obj = iterator();\n*/\nvar IteratorSymbol = ( hasIteratorSymbolSupport() ) ? Symbol.iterator : null;\n\n\n// EXPORTS //\n\nexport default IteratorSymbol;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport defineProperty from '@stdlib/utils-define-property';\n\n\n// MAIN //\n\n/**\n* Defines a non-enumerable read-only accessor.\n*\n* @param {Object} obj - object on which to define the property\n* @param {(string|symbol)} prop - property name\n* @param {Function} getter - accessor\n*\n* @example\n* function getter() {\n* return 'bar';\n* }\n*\n* var obj = {};\n*\n* setNonEnumerableReadOnlyAccessor( obj, 'foo', getter );\n*\n* try {\n* obj.foo = 'boop';\n* } catch ( err ) {\n* console.error( err.message );\n* }\n*/\nfunction setNonEnumerableReadOnlyAccessor( obj, prop, getter ) { // eslint-disable-line id-length\n\tdefineProperty( obj, prop, {\n\t\t'configurable': false,\n\t\t'enumerable': false,\n\t\t'get': getter\n\t});\n}\n\n\n// EXPORTS //\n\nexport default setNonEnumerableReadOnlyAccessor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Returns the real component of a single-precision complex floating-point number.\n*\n* @param {Complex} z - complex number\n* @returns {number} real component\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n*\n* var z = new Complex64( 5.0, 3.0 );\n*\n* var re = realf( z );\n* // returns 5.0\n*/\nfunction realf( z ) {\n\treturn z.re;\n}\n\n\n// EXPORTS //\n\nexport default realf;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Returns the imaginary component of a single-precision complex floating-point number.\n*\n* @param {Complex} z - complex number\n* @returns {number} imaginary component\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n*\n* var z = new Complex64( 5.0, 3.0 );\n*\n* var im = imagf( z );\n* // returns 3.0\n*/\nfunction imagf( z ) {\n\treturn z.im;\n}\n\n\n// EXPORTS //\n\nexport default imagf;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport Float32Array from '@stdlib/array-float32';\n\n\n// MAIN //\n\n/**\n* Reinterprets a `Complex64Array` as a `Float32Array`.\n*\n* @param {Complex64Array} x - input array\n* @param {NonNegativeInteger} offset - starting index\n* @returns {Float32Array} `Float32Array` view\n*\n* @example\n* import Complex64Array from '@stdlib/array-complex64';\n*\n* var x = new Complex64Array( 10 );\n*\n* var out = reinterpret( x, 0 );\n* // returns \n*\n* var bool = ( out.buffer === x.buffer );\n* // returns true\n*/\nfunction reinterpret( x, offset ) {\n\treturn new Float32Array( x.buffer, x.byteOffset+(x.BYTES_PER_ELEMENT*offset), 2*(x.length-offset) ); // eslint-disable-line max-len\n}\n\n\n// EXPORTS //\n\nexport default reinterpret;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport Float64Array from '@stdlib/array-float64';\n\n\n// MAIN //\n\n/**\n* Reinterprets a `Complex128Array` as a `Float64Array`.\n*\n* @param {Complex128Array} x - input array\n* @param {NonNegativeInteger} offset - starting index\n* @returns {Float64Array} `Float64Array` view\n*\n* @example\n* import Complex128Array from '@stdlib/array-complex128';\n*\n* var x = new Complex128Array( 10 );\n*\n* var out = reinterpret( x, 0 );\n* // returns \n*\n* var bool = ( out.buffer === x.buffer );\n* // returns true\n*/\nfunction reinterpret( x, offset ) {\n\treturn new Float64Array( x.buffer, x.byteOffset+(x.BYTES_PER_ELEMENT*offset), 2*(x.length-offset) ); // eslint-disable-line max-len\n}\n\n\n// EXPORTS //\n\nexport default reinterpret;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// VARIABLES //\n\nvar GETTERS = {\n\t'float64': getFloat64,\n\t'float32': getFloat32,\n\t'int32': getInt32,\n\t'int16': getInt16,\n\t'int8': getInt8,\n\t'uint32': getUint32,\n\t'uint16': getUint16,\n\t'uint8': getUint8,\n\t'uint8c': getUint8c,\n\t'generic': getGeneric,\n\t'default': getArrayLike\n};\n\n\n// FUNCTIONS //\n\n/**\n* Returns an element from a `Float64Array`.\n*\n* @private\n* @param {Float64Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n*\n* var arr = new Float64Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getFloat64( arr, 2 );\n* // returns 3.0\n*/\nfunction getFloat64( arr, idx ) {\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from a `Float32Array`.\n*\n* @private\n* @param {Float32Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Float32Array from '@stdlib/array-float32';\n*\n* var arr = new Float32Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getFloat32( arr, 2 );\n* // returns 3.0\n*/\nfunction getFloat32( arr, idx ) {\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from an `Int32Array`.\n*\n* @private\n* @param {Int32Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Int32Array from '@stdlib/array-int32';\n*\n* var arr = new Int32Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getInt32( arr, 2 );\n* // returns 3\n*/\nfunction getInt32( arr, idx ) { // eslint-disable-line stdlib/jsdoc-doctest-decimal-point\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from an `Int16Array`.\n*\n* @private\n* @param {Int16Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Int16Array from '@stdlib/array-int16';\n*\n* var arr = new Int16Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getInt16( arr, 2 );\n* // returns 3\n*/\nfunction getInt16( arr, idx ) { // eslint-disable-line stdlib/jsdoc-doctest-decimal-point\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from an `Int8Array`.\n*\n* @private\n* @param {Int8Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Int8Array from '@stdlib/array-int8';\n*\n* var arr = new Int8Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getInt8( arr, 2 );\n* // returns 3\n*/\nfunction getInt8( arr, idx ) { // eslint-disable-line stdlib/jsdoc-doctest-decimal-point\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from a `Uint32Array`.\n*\n* @private\n* @param {Uint32Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Uint32Array from '@stdlib/array-uint32';\n*\n* var arr = new Uint32Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getUint32( arr, 2 );\n* // returns 3\n*/\nfunction getUint32( arr, idx ) { // eslint-disable-line stdlib/jsdoc-doctest-decimal-point\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from a `Uint16Array`.\n*\n* @private\n* @param {Uint16Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Uint16Array from '@stdlib/array-uint16';\n*\n* var arr = new Uint16Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getUint16( arr, 2 );\n* // returns 3\n*/\nfunction getUint16( arr, idx ) { // eslint-disable-line stdlib/jsdoc-doctest-decimal-point\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from a `Uint8Array`.\n*\n* @private\n* @param {Uint8Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Uint8Array from '@stdlib/array-uint8';\n*\n* var arr = new Uint8Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getUint8( arr, 2 );\n* // returns 3\n*/\nfunction getUint8( arr, idx ) { // eslint-disable-line stdlib/jsdoc-doctest-decimal-point\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from a `Uint8ClampedArray`.\n*\n* @private\n* @param {Uint8ClampedArray} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Uint8ClampedArray from '@stdlib/array-uint8c';\n*\n* var arr = new Uint8ClampedArray( [ 1, 2, 3, 4 ] );\n*\n* var v = getUint8c( arr, 2 );\n* // returns 3\n*/\nfunction getUint8c( arr, idx ) { // eslint-disable-line stdlib/jsdoc-doctest-decimal-point\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from a generic `Array`.\n*\n* @private\n* @param {Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {*} element value\n*\n* @example\n* var arr = [ 1, 2, 3, 4 ];\n*\n* var v = getGeneric( arr, 2 );\n* // returns 3\n*/\nfunction getGeneric( arr, idx ) {\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from an indexed array-like object.\n*\n* @private\n* @param {Collection} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {*} element value\n*\n* @example\n* var arr = [ 1, 2, 3, 4 ];\n*\n* var v = getArrayLike( arr, 2 );\n* // returns 3\n*/\nfunction getArrayLike( arr, idx ) {\n\treturn arr[ idx ];\n}\n\n\n// MAIN //\n\n/**\n* Returns an accessor function for retrieving an element from an indexed array-like object.\n*\n* @param {string} dtype - array dtype\n* @returns {Function} accessor\n*\n* @example\n* import dtype from '@stdlib/array-dtype';\n*\n* var arr = [ 1, 2, 3, 4 ];\n*\n* var get = getter( dtype( arr ) );\n* var v = get( arr, 2 );\n* // returns 3\n*/\nfunction getter( dtype ) {\n\tvar f = GETTERS[ dtype ];\n\tif ( typeof f === 'function' ) {\n\t\treturn f;\n\t}\n\treturn GETTERS.default;\n}\n\n\n// EXPORTS //\n\nexport default getter;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// VARIABLES //\n\nvar GETTERS = {\n\t'complex128': getComplex128,\n\t'complex64': getComplex64,\n\t'default': getArrayLike\n};\n\n\n// FUNCTIONS //\n\n/**\n* Returns an element from a `Complex128Array`.\n*\n* @private\n* @param {Complex128Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Complex128Array from '@stdlib/array-complex128';\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* var arr = new Complex128Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getComplex128( arr, 1 );\n* // returns \n*\n* var re = real( v );\n* // returns 3.0\n*\n* var im = imag( v );\n* // returns 4.0\n*/\nfunction getComplex128( arr, idx ) {\n\treturn arr.get( idx );\n}\n\n/**\n* Returns an element from a `Complex64Array`.\n*\n* @private\n* @param {Complex64Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Complex64Array from '@stdlib/array-complex64';\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* var arr = new Complex64Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getComplex64( arr, 1 );\n* // returns \n*\n* var re = realf( v );\n* // returns 3.0\n*\n* var im = imagf( v );\n* // returns 4.0\n*/\nfunction getComplex64( arr, idx ) {\n\treturn arr.get( idx );\n}\n\n/**\n* Returns an element from an array-like object supporting the get/set protocol.\n*\n* @private\n* @param {Collection} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {*} element value\n*\n* @example\n* var arr = [ 1, 2, 3, 4 ];\n*\n* function get( idx ) {\n* return arr[ idx ];\n* }\n*\n* function set( value, idx ) {\n* arr[ idx ] = value;\n* }\n*\n* arr.get = get;\n* arr.set = set;\n*\n* var v = getArrayLike( arr, 2 );\n* // returns 3\n*/\nfunction getArrayLike( arr, idx ) {\n\treturn arr.get( idx );\n}\n\n\n// MAIN //\n\n/**\n* Returns an accessor function for retrieving an element from an array-like object supporting the get/set protocol.\n*\n* @param {string} dtype - array dtype\n* @returns {Function} accessor\n*\n* @example\n* import Complex64Array from '@stdlib/array-complex64';\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n* import dtype from '@stdlib/array-dtype';\n*\n* var arr = new Complex64Array( [ 1, 2, 3, 4 ] );\n*\n* var get = getter( dtype( arr ) );\n* var v = get( arr, 1 );\n* // returns \n*\n* var re = realf( v );\n* // returns 3.0\n*\n* var im = imagf( v );\n* // returns 4.0\n*/\nfunction getter( dtype ) {\n\tvar f = GETTERS[ dtype ];\n\tif ( typeof f === 'function' ) {\n\t\treturn f;\n\t}\n\treturn GETTERS.default;\n}\n\n\n// EXPORTS //\n\nexport default getter;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isArrayLikeObject from '@stdlib/assert-is-array-like-object';\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport realf from '@stdlib/complex-realf';\nimport imagf from '@stdlib/complex-imagf';\nimport format from '@stdlib/string-format';\n\n\n// MAIN //\n\n/**\n* Returns an array of iterated values.\n*\n* @private\n* @param {Object} it - iterator\n* @returns {(Array|TypeError)} array or an error\n*/\nfunction fromIterator( it ) {\n\tvar out;\n\tvar v;\n\tvar z;\n\n\tout = [];\n\twhile ( true ) {\n\t\tv = it.next();\n\t\tif ( v.done ) {\n\t\t\tbreak;\n\t\t}\n\t\tz = v.value;\n\t\tif ( isArrayLikeObject( z ) && z.length >= 2 ) {\n\t\t\tout.push( z[ 0 ], z[ 1 ] );\n\t\t} else if ( isComplexLike( z ) ) {\n\t\t\tout.push( realf( z ), imagf( z ) );\n\t\t} else {\n\t\t\treturn new TypeError( format( 'invalid argument. An iterator must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', z ) );\n\t\t}\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default fromIterator;\n","/* eslint-disable no-restricted-syntax, max-lines, no-invalid-this */\n\n/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isNonNegativeInteger } from '@stdlib/assert-is-nonnegative-integer';\nimport isArrayLikeObject from '@stdlib/assert-is-array-like-object';\nimport isCollection from '@stdlib/assert-is-collection';\nimport isArrayBuffer from '@stdlib/assert-is-arraybuffer';\nimport isObject from '@stdlib/assert-is-object';\nimport isArray from '@stdlib/assert-is-array';\nimport { isPrimitive as isString } from '@stdlib/assert-is-string';\nimport isFunction from '@stdlib/assert-is-function';\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport isEven from '@stdlib/math-base-assert-is-even';\nimport isInteger from '@stdlib/math-base-assert-is-integer';\nimport isComplex64Array from '@stdlib/array-base-assert-is-complex64array';\nimport isComplex128Array from '@stdlib/array-base-assert-is-complex128array';\nimport hasIteratorSymbolSupport from '@stdlib/assert-has-iterator-symbol-support';\nimport ITERATOR_SYMBOL from '@stdlib/symbol-iterator';\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport setReadOnlyAccessor from '@stdlib/utils-define-nonenumerable-read-only-accessor';\nimport Float32Array from '@stdlib/array-float32';\nimport Complex64 from '@stdlib/complex-float32';\nimport format from '@stdlib/string-format';\nimport realf from '@stdlib/complex-realf';\nimport imagf from '@stdlib/complex-imagf';\nimport floor from '@stdlib/math-base-special-floor';\nimport reinterpret64 from '@stdlib/strided-base-reinterpret-complex64';\nimport reinterpret128 from '@stdlib/strided-base-reinterpret-complex128';\nimport getter from '@stdlib/array-base-getter';\nimport accessorGetter from '@stdlib/array-base-accessor-getter';\nimport fromIterator from './from_iterator.js';\nimport fromIteratorMap from './from_iterator_map.js';\nimport fromArray from './from_array.js';\n\n\n// VARIABLES //\n\nvar BYTES_PER_ELEMENT = Float32Array.BYTES_PER_ELEMENT * 2;\nvar HAS_ITERATOR_SYMBOL = hasIteratorSymbolSupport();\n\n\n// FUNCTIONS //\n\n/**\n* Returns a boolean indicating if a value is a complex typed array.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a complex typed array\n*/\nfunction isComplexArray( value ) {\n\treturn (\n\t\tvalue instanceof Complex64Array ||\n\t\t(\n\t\t\ttypeof value === 'object' &&\n\t\t\tvalue !== null &&\n\t\t\t(\n\t\t\t\tvalue.constructor.name === 'Complex64Array' ||\n\t\t\t\tvalue.constructor.name === 'Complex128Array'\n\t\t\t) &&\n\t\t\ttypeof value._length === 'number' && // eslint-disable-line no-underscore-dangle\n\n\t\t\t// NOTE: we don't perform a more rigorous test here for a typed array for performance reasons, as robustly checking for a typed array instance could require walking the prototype tree and performing relatively expensive constructor checks...\n\t\t\ttypeof value._buffer === 'object' // eslint-disable-line no-underscore-dangle\n\t\t)\n\t);\n}\n\n/**\n* Returns a boolean indicating if a value is a complex typed array constructor.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a complex typed array constructor\n*/\nfunction isComplexArrayConstructor( value ) {\n\treturn (\n\t\tvalue === Complex64Array ||\n\n\t\t// NOTE: weaker test in order to avoid a circular dependency with Complex128Array...\n\t\tvalue.name === 'Complex128Array'\n\t);\n}\n\n/**\n* Retrieves a complex number from a complex number array buffer.\n*\n* @private\n* @param {Float32Array} buf - array buffer\n* @param {NonNegativeInteger} idx - element index\n* @returns {Complex64} complex number\n*/\nfunction getComplex64( buf, idx ) {\n\tidx *= 2;\n\treturn new Complex64( buf[ idx ], buf[ idx+1 ] );\n}\n\n\n// MAIN //\n\n/**\n* 64-bit complex number array constructor.\n*\n* @constructor\n* @param {(NonNegativeInteger|Collection|ArrayBuffer|Iterable)} [arg] - length, typed array, array-like object, buffer, or an iterable\n* @param {NonNegativeInteger} [byteOffset=0] - byte offset\n* @param {NonNegativeInteger} [length] - view length\n* @throws {RangeError} ArrayBuffer byte length must be a multiple of `8`\n* @throws {RangeError} array-like object and typed array input arguments must have a length which is a multiple of two\n* @throws {TypeError} if provided only a single argument, must provide a valid argument\n* @throws {TypeError} byte offset must be a nonnegative integer\n* @throws {RangeError} byte offset must be a multiple of `8`\n* @throws {TypeError} view length must be a positive multiple of `8`\n* @throws {RangeError} must provide sufficient memory to accommodate byte offset and view length requirements\n* @throws {TypeError} an iterator must return either a two element array containing real and imaginary components or a complex number\n* @returns {Complex64Array} complex number array\n*\n* @example\n* var arr = new Complex64Array();\n* // returns \n*\n* var len = arr.length;\n* // returns 0\n*\n* @example\n* var arr = new Complex64Array( 2 );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*\n* @example\n* var arr = new Complex64Array( [ 1.0, -1.0 ] );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* import ArrayBuffer from '@stdlib/array-buffer';\n*\n* var buf = new ArrayBuffer( 16 );\n* var arr = new Complex64Array( buf );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*\n* @example\n* import ArrayBuffer from '@stdlib/array-buffer';\n*\n* var buf = new ArrayBuffer( 16 );\n* var arr = new Complex64Array( buf, 8 );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* import ArrayBuffer from '@stdlib/array-buffer';\n*\n* var buf = new ArrayBuffer( 32 );\n* var arr = new Complex64Array( buf, 8, 2 );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*/\nfunction Complex64Array() {\n\tvar byteOffset;\n\tvar nargs;\n\tvar buf;\n\tvar len;\n\n\tnargs = arguments.length;\n\tif ( !(this instanceof Complex64Array) ) {\n\t\tif ( nargs === 0 ) {\n\t\t\treturn new Complex64Array();\n\t\t}\n\t\tif ( nargs === 1 ) {\n\t\t\treturn new Complex64Array( arguments[0] );\n\t\t}\n\t\tif ( nargs === 2 ) {\n\t\t\treturn new Complex64Array( arguments[0], arguments[1] );\n\t\t}\n\t\treturn new Complex64Array( arguments[0], arguments[1], arguments[2] );\n\t}\n\t// Create the underlying data buffer...\n\tif ( nargs === 0 ) {\n\t\tbuf = new Float32Array( 0 ); // backward-compatibility\n\t} else if ( nargs === 1 ) {\n\t\tif ( isNonNegativeInteger( arguments[0] ) ) {\n\t\t\tbuf = new Float32Array( arguments[0]*2 );\n\t\t} else if ( isCollection( arguments[0] ) ) {\n\t\t\tbuf = arguments[ 0 ];\n\t\t\tlen = buf.length;\n\n\t\t\t// If provided a \"generic\" array, peak at the first value, and, if the value is a complex number, try to process as an array of complex numbers, falling back to \"normal\" typed array initialization if we fail and ensuring consistency if the first value had not been a complex number...\n\t\t\tif ( len && isArray( buf ) && isComplexLike( buf[0] ) ) {\n\t\t\t\tbuf = fromArray( new Float32Array( len*2 ), buf );\n\t\t\t\tif ( buf === null ) {\n\t\t\t\t\t// We failed and we are now forced to allocate a new array :-(\n\t\t\t\t\tif ( !isEven( len ) ) {\n\t\t\t\t\t\tthrow new RangeError( format( 'invalid argument. Array-like object arguments must have a length which is a multiple of two. Length: `%u`.', len ) );\n\t\t\t\t\t}\n\t\t\t\t\t// We failed, so fall back to directly setting values...\n\t\t\t\t\tbuf = new Float32Array( arguments[0] );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ( isComplex64Array( buf ) ) {\n\t\t\t\t\tbuf = reinterpret64( buf, 0 );\n\t\t\t\t} else if ( isComplex128Array( buf ) ) {\n\t\t\t\t\tbuf = reinterpret128( buf, 0 );\n\t\t\t\t} else if ( !isEven( len ) ) {\n\t\t\t\t\tthrow new RangeError( format( 'invalid argument. Array-like object and typed array arguments must have a length which is a multiple of two. Length: `%u`.', len ) );\n\t\t\t\t}\n\t\t\t\tbuf = new Float32Array( buf );\n\t\t\t}\n\t\t} else if ( isArrayBuffer( arguments[0] ) ) {\n\t\t\tbuf = arguments[ 0 ];\n\t\t\tif ( !isInteger( buf.byteLength/BYTES_PER_ELEMENT ) ) {\n\t\t\t\tthrow new RangeError( format( 'invalid argument. ArrayBuffer byte length must be a multiple of %u. Byte length: `%u`.', BYTES_PER_ELEMENT, buf.byteLength ) );\n\t\t\t}\n\t\t\tbuf = new Float32Array( buf );\n\t\t} else if ( isObject( arguments[0] ) ) {\n\t\t\tbuf = arguments[ 0 ];\n\t\t\tif ( HAS_ITERATOR_SYMBOL === false ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Environment lacks Symbol.iterator support. Must provide a length, ArrayBuffer, typed array, or array-like object. Value: `%s`.', buf ) );\n\t\t\t}\n\t\t\tif ( !isFunction( buf[ ITERATOR_SYMBOL ] ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.', buf ) );\n\t\t\t}\n\t\t\tbuf = buf[ ITERATOR_SYMBOL ]();\n\t\t\tif ( !isFunction( buf.next ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.', buf ) ); // FIXME: `buf` is what is returned from above, NOT the original value\n\t\t\t}\n\t\t\tbuf = fromIterator( buf );\n\t\t\tif ( buf instanceof Error ) {\n\t\t\t\tthrow buf;\n\t\t\t}\n\t\t\tbuf = new Float32Array( buf );\n\t\t} else {\n\t\t\tthrow new TypeError( format( 'invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.', arguments[0] ) );\n\t\t}\n\t} else {\n\t\tbuf = arguments[ 0 ];\n\t\tif ( !isArrayBuffer( buf ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. First argument must be an ArrayBuffer. Value: `%s`.', buf ) );\n\t\t}\n\t\tbyteOffset = arguments[ 1 ];\n\t\tif ( !isNonNegativeInteger( byteOffset ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Byte offset must be a nonnegative integer. Value: `%s`.', byteOffset ) );\n\t\t}\n\t\tif ( !isInteger( byteOffset/BYTES_PER_ELEMENT ) ) {\n\t\t\tthrow new RangeError( format( 'invalid argument. Byte offset must be a multiple of %u. Value: `%u`.', BYTES_PER_ELEMENT, byteOffset ) );\n\t\t}\n\t\tif ( nargs === 2 ) {\n\t\t\tlen = buf.byteLength - byteOffset;\n\t\t\tif ( !isInteger( len/BYTES_PER_ELEMENT ) ) {\n\t\t\t\tthrow new RangeError( format( 'invalid arguments. ArrayBuffer view byte length must be a multiple of %u. View byte length: `%u`.', BYTES_PER_ELEMENT, len ) );\n\t\t\t}\n\t\t\tbuf = new Float32Array( buf, byteOffset );\n\t\t} else {\n\t\t\tlen = arguments[ 2 ];\n\t\t\tif ( !isNonNegativeInteger( len ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Length must be a nonnegative integer. Value: `%s`.', len ) );\n\t\t\t}\n\t\t\tif ( (len*BYTES_PER_ELEMENT) > (buf.byteLength-byteOffset) ) {\n\t\t\t\tthrow new RangeError( format( 'invalid arguments. ArrayBuffer has insufficient capacity. Either decrease the array length or provide a bigger buffer. Minimum capacity: `%u`.', len*BYTES_PER_ELEMENT ) );\n\t\t\t}\n\t\t\tbuf = new Float32Array( buf, byteOffset, len*2 );\n\t\t}\n\t}\n\tsetReadOnly( this, '_buffer', buf );\n\tsetReadOnly( this, '_length', buf.length/2 );\n\n\treturn this;\n}\n\n/**\n* Size (in bytes) of each array element.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex64Array\n* @readonly\n* @type {PositiveInteger}\n* @default 8\n*\n* @example\n* var nbytes = Complex64Array.BYTES_PER_ELEMENT;\n* // returns 8\n*/\nsetReadOnly( Complex64Array, 'BYTES_PER_ELEMENT', BYTES_PER_ELEMENT );\n\n/**\n* Constructor name.\n*\n* @name name\n* @memberof Complex64Array\n* @readonly\n* @type {string}\n* @default 'Complex64Array'\n*\n* @example\n* var str = Complex64Array.name;\n* // returns 'Complex64Array'\n*/\nsetReadOnly( Complex64Array, 'name', 'Complex64Array' );\n\n/**\n* Creates a new 64-bit complex number array from an array-like object or an iterable.\n*\n* @name from\n* @memberof Complex64Array\n* @type {Function}\n* @param {(Collection|Iterable)} src - array-like object or iterable\n* @param {Function} [clbk] - callback to invoke for each source element\n* @param {*} [thisArg] - context\n* @throws {TypeError} `this` context must be a constructor\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be an array-like object or an iterable\n* @throws {TypeError} second argument must be a function\n* @throws {RangeError} array-like objects must have a length which is a multiple of two\n* @throws {TypeError} an iterator must return either a two element array containing real and imaginary components or a complex number\n* @throws {TypeError} when provided an iterator, a callback must return either a two element array containing real and imaginary components or a complex number\n* @returns {Complex64Array} 64-bit complex number array\n*\n* @example\n* var arr = Complex64Array.from( [ 1.0, -1.0 ] );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n*\n* var arr = Complex64Array.from( [ new Complex64( 1.0, 1.0 ) ] );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* function clbk( v ) {\n* return new Complex64( realf(v)*2.0, imagf(v)*2.0 );\n* }\n*\n* var arr = Complex64Array.from( [ new Complex64( 1.0, 1.0 ) ], clbk );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*/\nsetReadOnly( Complex64Array, 'from', function from( src ) {\n\tvar thisArg;\n\tvar nargs;\n\tvar clbk;\n\tvar out;\n\tvar buf;\n\tvar tmp;\n\tvar get;\n\tvar len;\n\tvar flg;\n\tvar v;\n\tvar i;\n\tvar j;\n\tif ( !isFunction( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` context must be a constructor.' );\n\t}\n\tif ( !isComplexArrayConstructor( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tnargs = arguments.length;\n\tif ( nargs > 1 ) {\n\t\tclbk = arguments[ 1 ];\n\t\tif ( !isFunction( clbk ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be a function. Value: `%s`.', clbk ) );\n\t\t}\n\t\tif ( nargs > 2 ) {\n\t\t\tthisArg = arguments[ 2 ];\n\t\t}\n\t}\n\tif ( isComplexArray( src ) ) {\n\t\tlen = src.length;\n\t\tif ( clbk ) {\n\t\t\tout = new this( len );\n\t\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\t\tj = 0;\n\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\tv = clbk.call( thisArg, src.get( i ), i );\n\t\t\t\tif ( isComplexLike( v ) ) {\n\t\t\t\t\tbuf[ j ] = realf( v );\n\t\t\t\t\tbuf[ j+1 ] = imagf( v );\n\t\t\t\t} else if ( isArrayLikeObject( v ) && v.length >= 2 ) {\n\t\t\t\t\tbuf[ j ] = v[ 0 ];\n\t\t\t\t\tbuf[ j+1 ] = v[ 1 ];\n\t\t\t\t} else {\n\t\t\t\t\tthrow new TypeError( format( 'invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', v ) );\n\t\t\t\t}\n\t\t\t\tj += 2; // stride\n\t\t\t}\n\t\t\treturn out;\n\t\t}\n\t\treturn new this( src );\n\t}\n\tif ( isCollection( src ) ) {\n\t\tif ( clbk ) {\n\t\t\t// Note: array contents affect how we iterate over a provided data source. If only complex number objects, we can extract real and imaginary components. Otherwise, for non-complex number arrays (e.g., `Float64Array`, etc), we assume a strided array where real and imaginary components are interleaved. In the former case, we expect a callback to return real and imaginary components (possibly as a complex number). In the latter case, we expect a callback to return *either* a real or imaginary component.\n\n\t\t\tlen = src.length;\n\t\t\tif ( src.get && src.set ) {\n\t\t\t\tget = accessorGetter( 'default' );\n\t\t\t} else {\n\t\t\t\tget = getter( 'default' );\n\t\t\t}\n\t\t\t// Detect whether we've been provided an array which returns complex number objects...\n\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\tif ( !isComplexLike( get( src, i ) ) ) {\n\t\t\t\t\tflg = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// If an array does not contain only complex number objects, then we assume interleaved real and imaginary components...\n\t\t\tif ( flg ) {\n\t\t\t\tif ( !isEven( len ) ) {\n\t\t\t\t\tthrow new RangeError( format( 'invalid argument. First argument must have a length which is a multiple of %u. Length: `%u`.', 2, len ) );\n\t\t\t\t}\n\t\t\t\tout = new this( len/2 );\n\t\t\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\t\tbuf[ i ] = clbk.call( thisArg, get( src, i ), i );\n\t\t\t\t}\n\t\t\t\treturn out;\n\t\t\t}\n\t\t\t// If an array contains only complex number objects, then we need to extract real and imaginary components...\n\t\t\tout = new this( len );\n\t\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\t\tj = 0;\n\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\tv = clbk.call( thisArg, get( src, i ), i );\n\t\t\t\tif ( isComplexLike( v ) ) {\n\t\t\t\t\tbuf[ j ] = realf( v );\n\t\t\t\t\tbuf[ j+1 ] = imagf( v );\n\t\t\t\t} else if ( isArrayLikeObject( v ) && v.length >= 2 ) {\n\t\t\t\t\tbuf[ j ] = v[ 0 ];\n\t\t\t\t\tbuf[ j+1 ] = v[ 1 ];\n\t\t\t\t} else {\n\t\t\t\t\tthrow new TypeError( format( 'invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', v ) );\n\t\t\t\t}\n\t\t\t\tj += 2; // stride\n\t\t\t}\n\t\t\treturn out;\n\t\t}\n\t\treturn new this( src );\n\t}\n\tif ( isObject( src ) && HAS_ITERATOR_SYMBOL && isFunction( src[ ITERATOR_SYMBOL ] ) ) { // eslint-disable-line max-len\n\t\tbuf = src[ ITERATOR_SYMBOL ]();\n\t\tif ( !isFunction( buf.next ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.', src ) );\n\t\t}\n\t\tif ( clbk ) {\n\t\t\ttmp = fromIteratorMap( buf, clbk, thisArg );\n\t\t} else {\n\t\t\ttmp = fromIterator( buf );\n\t\t}\n\t\tif ( tmp instanceof Error ) {\n\t\t\tthrow tmp;\n\t\t}\n\t\tlen = tmp.length / 2;\n\t\tout = new this( len );\n\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\tbuf[ i ] = tmp[ i ];\n\t\t}\n\t\treturn out;\n\t}\n\tthrow new TypeError( format( 'invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.', src ) );\n});\n\n/**\n* Creates a new 64-bit complex number array from a variable number of arguments.\n*\n* @name of\n* @memberof Complex64Array\n* @type {Function}\n* @param {...*} element - array elements\n* @throws {TypeError} `this` context must be a constructor\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Complex64Array} 64-bit complex number array\n*\n* @example\n* var arr = Complex64Array.of( 1.0, 1.0, 1.0, 1.0 );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*/\nsetReadOnly( Complex64Array, 'of', function of() {\n\tvar args;\n\tvar i;\n\tif ( !isFunction( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` context must be a constructor.' );\n\t}\n\tif ( !isComplexArrayConstructor( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\targs = [];\n\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\targs.push( arguments[ i ] );\n\t}\n\treturn new this( args );\n});\n\n/**\n* Returns an array element with support for both nonnegative and negative integer indices.\n*\n* @name at\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {integer} idx - element index\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} must provide an integer\n* @returns {(Complex64|void)} array element\n*\n* @example\n* var arr = new Complex64Array( 10 );\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* var z = arr.at( 0 );\n* // returns \n*\n* var re = realf( z );\n* // returns 0.0\n*\n* var im = imagf( z );\n* // returns 0.0\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 9.0, -9.0 ], 9 );\n*\n* z = arr.at( 0 );\n* // returns \n*\n* re = realf( z );\n* // returns 1.0\n*\n* im = imagf( z );\n* // returns -1.0\n*\n* z = arr.at( -1 );\n* // returns \n*\n* re = realf( z );\n* // returns 9.0\n*\n* im = imagf( z );\n* // returns -9.0\n*\n* z = arr.at( 100 );\n* // returns undefined\n*\n* z = arr.at( -100 );\n* // returns undefined\n*/\nsetReadOnly( Complex64Array.prototype, 'at', function at( idx ) {\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isInteger( idx ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Must provide an integer. Value: `%s`.', idx ) );\n\t}\n\tif ( idx < 0 ) {\n\t\tidx += this._length;\n\t}\n\tif ( idx < 0 || idx >= this._length ) {\n\t\treturn;\n\t}\n\treturn getComplex64( this._buffer, idx );\n});\n\n/**\n* Pointer to the underlying data buffer.\n*\n* @name buffer\n* @memberof Complex64Array.prototype\n* @readonly\n* @type {ArrayBuffer}\n*\n* @example\n* var arr = new Complex64Array( 10 );\n*\n* var buf = arr.buffer;\n* // returns \n*/\nsetReadOnlyAccessor( Complex64Array.prototype, 'buffer', function get() {\n\treturn this._buffer.buffer;\n});\n\n/**\n* Size (in bytes) of the array.\n*\n* @name byteLength\n* @memberof Complex64Array.prototype\n* @readonly\n* @type {NonNegativeInteger}\n*\n* @example\n* var arr = new Complex64Array( 10 );\n*\n* var byteLength = arr.byteLength;\n* // returns 80\n*/\nsetReadOnlyAccessor( Complex64Array.prototype, 'byteLength', function get() {\n\treturn this._buffer.byteLength;\n});\n\n/**\n* Offset (in bytes) of the array from the start of its underlying `ArrayBuffer`.\n*\n* @name byteOffset\n* @memberof Complex64Array.prototype\n* @readonly\n* @type {NonNegativeInteger}\n*\n* @example\n* var arr = new Complex64Array( 10 );\n*\n* var byteOffset = arr.byteOffset;\n* // returns 0\n*/\nsetReadOnlyAccessor( Complex64Array.prototype, 'byteOffset', function get() {\n\treturn this._buffer.byteOffset;\n});\n\n/**\n* Size (in bytes) of each array element.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex64Array.prototype\n* @readonly\n* @type {PositiveInteger}\n* @default 8\n*\n* @example\n* var arr = new Complex64Array( 10 );\n*\n* var nbytes = arr.BYTES_PER_ELEMENT;\n* // returns 8\n*/\nsetReadOnly( Complex64Array.prototype, 'BYTES_PER_ELEMENT', Complex64Array.BYTES_PER_ELEMENT );\n\n/**\n* Copies a sequence of elements within the array to the position starting at `target`.\n*\n* @name copyWithin\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {integer} target - index at which to start copying elements\n* @param {integer} start - source index at which to copy elements from\n* @param {integer} [end] - source index at which to stop copying elements from\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Complex64Array} modified array\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* var arr = new Complex64Array( 4 );\n*\n* // Set the array elements:\n* arr.set( new Complex64( 1.0, 1.0 ), 0 );\n* arr.set( new Complex64( 2.0, 2.0 ), 1 );\n* arr.set( new Complex64( 3.0, 3.0 ), 2 );\n* arr.set( new Complex64( 4.0, 4.0 ), 3 );\n*\n* // Copy the first two elements to the last two elements:\n* arr.copyWithin( 2, 0, 2 );\n*\n* // Get the last array element:\n* var z = arr.get( 3 );\n*\n* var re = realf( z );\n* // returns 2.0\n*\n* var im = imagf( z );\n* // returns 2.0\n*/\nsetReadOnly( Complex64Array.prototype, 'copyWithin', function copyWithin( target, start ) {\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\t// FIXME: prefer a functional `copyWithin` implementation which addresses lack of universal browser support (e.g., IE11 and Safari) or ensure that typed arrays are polyfilled\n\tif ( arguments.length === 2 ) {\n\t\tthis._buffer.copyWithin( target*2, start*2 );\n\t} else {\n\t\tthis._buffer.copyWithin( target*2, start*2, arguments[2]*2 );\n\t}\n\treturn this;\n});\n\n/**\n* Returns an iterator for iterating over array key-value pairs.\n*\n* @name entries\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Iterator} iterator\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n*\n* var arr = [\n* new Complex64( 1.0, 1.0 ),\n* new Complex64( 2.0, 2.0 ),\n* new Complex64( 3.0, 3.0 )\n* ];\n* arr = new Complex64Array( arr );\n*\n* // Create an iterator:\n* var it = arr.entries();\n*\n* // Iterate over the key-value pairs...\n* var v = it.next().value;\n* // returns [ 0, ]\n*\n* v = it.next().value;\n* // returns [ 1, ]\n*\n* v = it.next().value;\n* // returns [ 2, ]\n*\n* var bool = it.next().done;\n* // returns true\n*/\nsetReadOnly( Complex64Array.prototype, 'entries', function entries() {\n\tvar buffer;\n\tvar self;\n\tvar iter;\n\tvar len;\n\tvar FLG;\n\tvar i;\n\tvar j;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tself = this;\n\tbuffer = this._buffer;\n\tlen = this._length;\n\n\t// Initialize the iteration indices:\n\ti = -1;\n\tj = -2;\n\n\t// Create an iterator protocol-compliant object:\n\titer = {};\n\tsetReadOnly( iter, 'next', next );\n\tsetReadOnly( iter, 'return', end );\n\n\tif ( ITERATOR_SYMBOL ) {\n\t\tsetReadOnly( iter, ITERATOR_SYMBOL, factory );\n\t}\n\treturn iter;\n\n\t/**\n\t* Returns an iterator protocol-compliant object containing the next iterated value.\n\t*\n\t* @private\n\t* @returns {Object} iterator protocol-compliant object\n\t*/\n\tfunction next() {\n\t\tvar z;\n\t\ti += 1;\n\t\tif ( FLG || i >= len ) {\n\t\t\treturn {\n\t\t\t\t'done': true\n\t\t\t};\n\t\t}\n\t\tj += 2;\n\t\tz = new Complex64( buffer[ j ], buffer[ j+1 ] );\n\t\treturn {\n\t\t\t'value': [ i, z ],\n\t\t\t'done': false\n\t\t};\n\t}\n\n\t/**\n\t* Finishes an iterator.\n\t*\n\t* @private\n\t* @param {*} [value] - value to return\n\t* @returns {Object} iterator protocol-compliant object\n\t*/\n\tfunction end( value ) {\n\t\tFLG = true;\n\t\tif ( arguments.length ) {\n\t\t\treturn {\n\t\t\t\t'value': value,\n\t\t\t\t'done': true\n\t\t\t};\n\t\t}\n\t\treturn {\n\t\t\t'done': true\n\t\t};\n\t}\n\n\t/**\n\t* Returns a new iterator.\n\t*\n\t* @private\n\t* @returns {Iterator} iterator\n\t*/\n\tfunction factory() {\n\t\treturn self.entries();\n\t}\n});\n\n/**\n* Tests whether all elements in an array pass a test implemented by a predicate function.\n*\n* @name every\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {boolean} boolean indicating whether all elements pass a test\n*\n* @example\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* function predicate( v ) {\n* return ( realf( v ) === imagf( v ) );\n* }\n*\n* var arr = new Complex64Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var bool = arr.every( predicate );\n* // returns true\n*/\nsetReadOnly( Complex64Array.prototype, 'every', function every( predicate, thisArg ) {\n\tvar buf;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tif ( !predicate.call( thisArg, getComplex64( buf, i ), i, this ) ) {\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn true;\n});\n\n/**\n* Returns a modified typed array filled with a fill value.\n*\n* @name fill\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {ComplexLike} value - fill value\n* @param {integer} [start=0] - starting index (inclusive)\n* @param {integer} [end] - ending index (exclusive)\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a complex number\n* @throws {TypeError} second argument must be an integer\n* @throws {TypeError} third argument must be an integer\n*\n* @example\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* var arr = new Complex64Array( 3 );\n*\n* arr.fill( new Complex64( 1.0, 1.0 ), 1 );\n*\n* var z = arr.get( 1 );\n* // returns \n*\n* var re = realf( z );\n* // returns 1.0\n*\n* var im = imagf( z );\n* // returns 1.0\n*\n* z = arr.get( 1 );\n* // returns \n*\n* re = realf( z );\n* // returns 1.0\n*\n* im = imagf( z );\n* // returns 1.0\n*/\nsetReadOnly( Complex64Array.prototype, 'fill', function fill( value, start, end ) {\n\tvar buf;\n\tvar len;\n\tvar idx;\n\tvar re;\n\tvar im;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isComplexLike( value ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a complex number. Value: `%s`.', value ) );\n\t}\n\tbuf = this._buffer;\n\tlen = this._length;\n\tif ( arguments.length > 1 ) {\n\t\tif ( !isInteger( start ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be an integer. Value: `%s`.', start ) );\n\t\t}\n\t\tif ( start < 0 ) {\n\t\t\tstart += len;\n\t\t\tif ( start < 0 ) {\n\t\t\t\tstart = 0;\n\t\t\t}\n\t\t}\n\t\tif ( arguments.length > 2 ) {\n\t\t\tif ( !isInteger( end ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Third argument must be an integer. Value: `%s`.', end ) );\n\t\t\t}\n\t\t\tif ( end < 0 ) {\n\t\t\t\tend += len;\n\t\t\t\tif ( end < 0 ) {\n\t\t\t\t\tend = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( end > len ) {\n\t\t\t\tend = len;\n\t\t\t}\n\t\t} else {\n\t\t\tend = len;\n\t\t}\n\t} else {\n\t\tstart = 0;\n\t\tend = len;\n\t}\n\tre = realf( value );\n\tim = imagf( value );\n\tfor ( i = start; i < end; i++ ) {\n\t\tidx = 2*i;\n\t\tbuf[ idx ] = re;\n\t\tbuf[ idx+1 ] = im;\n\t}\n\treturn this;\n});\n\n/**\n* Returns a new array containing the elements of an array which pass a test implemented by a predicate function.\n*\n* @name filter\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {Complex64Array} complex number array\n*\n* @example\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* function predicate( v ) {\n* return ( realf( v ) === imagf( v ) );\n* }\n*\n* var arr = new Complex64Array( 3 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n*\n* var out = arr.filter( predicate );\n* // returns \n*\n* var len = out.length;\n* // returns 1\n*\n* var z = out.get( 0 );\n* // returns \n*\n* var re = realf( z );\n* // returns 2.0\n*\n* var im = imagf( z );\n* // returns 2.0\n*/\nsetReadOnly( Complex64Array.prototype, 'filter', function filter( predicate, thisArg ) {\n\tvar buf;\n\tvar out;\n\tvar i;\n\tvar z;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tout = [];\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tz = getComplex64( buf, i );\n\t\tif ( predicate.call( thisArg, z, i, this ) ) {\n\t\t\tout.push( z );\n\t\t}\n\t}\n\treturn new this.constructor( out );\n});\n\n/**\n* Returns the first element in an array for which a predicate function returns a truthy value.\n*\n* @name find\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {(Complex64|void)} array element or undefined\n*\n* @example\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n* import Complex64 from '@stdlib/complex-float32';\n*\n* function predicate( v ) {\n* return ( realf( v ) === imagf( v ) );\n* }\n*\n* var arr = new Complex64Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var z = arr.find( predicate );\n* // returns \n*\n* var re = realf( z );\n* // returns 1.0\n*\n* var im = imagf( z );\n* // returns 1.0\n*/\nsetReadOnly( Complex64Array.prototype, 'find', function find( predicate, thisArg ) {\n\tvar buf;\n\tvar i;\n\tvar z;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tz = getComplex64( buf, i );\n\t\tif ( predicate.call( thisArg, z, i, this ) ) {\n\t\t\treturn z;\n\t\t}\n\t}\n});\n\n/**\n* Returns the index of the first element in an array for which a predicate function returns a truthy value.\n*\n* @name findIndex\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {integer} index or -1\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* function predicate( v ) {\n* return ( realf( v ) === imagf( v ) );\n* }\n*\n* var arr = new Complex64Array( 3 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var idx = arr.findIndex( predicate );\n* // returns 2\n*/\nsetReadOnly( Complex64Array.prototype, 'findIndex', function findIndex( predicate, thisArg ) {\n\tvar buf;\n\tvar i;\n\tvar z;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tz = getComplex64( buf, i );\n\t\tif ( predicate.call( thisArg, z, i, this ) ) {\n\t\t\treturn i;\n\t\t}\n\t}\n\treturn -1;\n});\n\n/**\n* Returns the last element in an array for which a predicate function returns a truthy value.\n*\n* @name findLast\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {(Complex64|void)} array element or undefined\n*\n* @example\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n* import Complex64 from '@stdlib/complex-float32';\n*\n* function predicate( v ) {\n* return ( realf( v ) === imagf( v ) );\n* }\n*\n* var arr = new Complex64Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var z = arr.findLast( predicate );\n* // returns \n*\n* var re = realf( z );\n* // returns 3.0\n*\n* var im = imagf( z );\n* // returns 3.0\n*/\nsetReadOnly( Complex64Array.prototype, 'findLast', function findLast( predicate, thisArg ) {\n\tvar buf;\n\tvar i;\n\tvar z;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = this._length-1; i >= 0; i-- ) {\n\t\tz = getComplex64( buf, i );\n\t\tif ( predicate.call( thisArg, z, i, this ) ) {\n\t\t\treturn z;\n\t\t}\n\t}\n});\n\n/**\n* Returns the index of the last element in an array for which a predicate function returns a truthy value.\n*\n* @name findLastIndex\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {integer} index or -1\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* function predicate( v ) {\n* return ( realf( v ) === imagf( v ) );\n* }\n*\n* var arr = new Complex64Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n*\n* var idx = arr.findLastIndex( predicate );\n* // returns 1\n*/\nsetReadOnly( Complex64Array.prototype, 'findLastIndex', function findLastIndex( predicate, thisArg ) {\n\tvar buf;\n\tvar i;\n\tvar z;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = this._length-1; i >= 0; i-- ) {\n\t\tz = getComplex64( buf, i );\n\t\tif ( predicate.call( thisArg, z, i, this ) ) {\n\t\t\treturn i;\n\t\t}\n\t}\n\treturn -1;\n});\n\n/**\n* Invokes a function once for each array element.\n*\n* @name forEach\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {Function} fcn - function to invoke\n* @param {*} [thisArg] - function invocation context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n*\n* function log( v, i ) {\n* console.log( '%s: %s', i, v.toString() );\n* }\n*\n* var arr = new Complex64Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* arr.forEach( log );\n*/\nsetReadOnly( Complex64Array.prototype, 'forEach', function forEach( fcn, thisArg ) {\n\tvar buf;\n\tvar i;\n\tvar z;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( fcn ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', fcn ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tz = getComplex64( buf, i );\n\t\tfcn.call( thisArg, z, i, this );\n\t}\n});\n\n/**\n* Returns an array element.\n*\n* @name get\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {NonNegativeInteger} idx - element index\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} must provide a nonnegative integer\n* @returns {(Complex64|void)} array element\n*\n* @example\n* var arr = new Complex64Array( 10 );\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* var z = arr.get( 0 );\n* // returns \n*\n* var re = realf( z );\n* // returns 0.0\n*\n* var im = imagf( z );\n* // returns 0.0\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n*\n* z = arr.get( 0 );\n* // returns \n*\n* re = realf( z );\n* // returns 1.0\n*\n* im = imagf( z );\n* // returns -1.0\n*\n* z = arr.get( 100 );\n* // returns undefined\n*/\nsetReadOnly( Complex64Array.prototype, 'get', function get( idx ) {\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isNonNegativeInteger( idx ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Must provide a nonnegative integer. Value: `%s`.', idx ) );\n\t}\n\tif ( idx >= this._length ) {\n\t\treturn;\n\t}\n\treturn getComplex64( this._buffer, idx );\n});\n\n/**\n* Returns a boolean indicating whether an array includes a provided value.\n*\n* @name includes\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {ComplexLike} searchElement - search element\n* @param {integer} [fromIndex=0] - starting index (inclusive)\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a complex number\n* @throws {TypeError} second argument must be an integer\n* @returns {boolean} boolean indicating whether an array includes a provided value\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n*\n* var arr = new Complex64Array( 5 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n* arr.set( [ 4.0, -4.0 ], 3 );\n* arr.set( [ 5.0, -5.0 ], 4 );\n*\n* var bool = arr.includes( new Complex64( 3.0, -3.0 ) );\n* // returns true\n*\n* bool = arr.includes( new Complex64( 3.0, -3.0 ), 3 );\n* // returns false\n*\n* bool = arr.includes( new Complex64( 4.0, -4.0 ), -3 );\n* // returns true\n*/\nsetReadOnly( Complex64Array.prototype, 'includes', function includes( searchElement, fromIndex ) {\n\tvar buf;\n\tvar idx;\n\tvar re;\n\tvar im;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isComplexLike( searchElement ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a complex number. Value: `%s`.', searchElement ) );\n\t}\n\tif ( arguments.length > 1 ) {\n\t\tif ( !isInteger( fromIndex ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be an integer. Value: `%s`.', fromIndex ) );\n\t\t}\n\t\tif ( fromIndex < 0 ) {\n\t\t\tfromIndex += this._length;\n\t\t\tif ( fromIndex < 0 ) {\n\t\t\t\tfromIndex = 0;\n\t\t\t}\n\t\t}\n\t} else {\n\t\tfromIndex = 0;\n\t}\n\tre = realf( searchElement );\n\tim = imagf( searchElement );\n\tbuf = this._buffer;\n\tfor ( i = fromIndex; i < this._length; i++ ) {\n\t\tidx = 2 * i;\n\t\tif ( re === buf[ idx ] && im === buf[ idx+1 ] ) {\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n});\n\n/**\n* Returns the first index at which a given element can be found.\n*\n* @name indexOf\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {ComplexLike} searchElement - element to find\n* @param {integer} [fromIndex=0] - starting index (inclusive)\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a complex number\n* @throws {TypeError} second argument must be an integer\n* @returns {integer} index or -1\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n*\n* var arr = new Complex64Array( 10 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n* arr.set( [ 4.0, -4.0 ], 3 );\n* arr.set( [ 5.0, -5.0 ], 4 );\n*\n* var idx = arr.indexOf( new Complex64( 3.0, -3.0 ) );\n* // returns 2\n*\n* idx = arr.indexOf( new Complex64( 3.0, -3.0 ), 3 );\n* // returns -1\n*\n* idx = arr.indexOf( new Complex64( 4.0, -4.0 ), -3 );\n* // returns -1\n*/\nsetReadOnly( Complex64Array.prototype, 'indexOf', function indexOf( searchElement, fromIndex ) {\n\tvar buf;\n\tvar idx;\n\tvar re;\n\tvar im;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isComplexLike( searchElement ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a complex number. Value: `%s`.', searchElement ) );\n\t}\n\tif ( arguments.length > 1 ) {\n\t\tif ( !isInteger( fromIndex ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be an integer. Value: `%s`.', fromIndex ) );\n\t\t}\n\t\tif ( fromIndex < 0 ) {\n\t\t\tfromIndex += this._length;\n\t\t\tif ( fromIndex < 0 ) {\n\t\t\t\tfromIndex = 0;\n\t\t\t}\n\t\t}\n\t} else {\n\t\tfromIndex = 0;\n\t}\n\tre = realf( searchElement );\n\tim = imagf( searchElement );\n\tbuf = this._buffer;\n\tfor ( i = fromIndex; i < this._length; i++ ) {\n\t\tidx = 2 * i;\n\t\tif ( re === buf[ idx ] && im === buf[ idx+1 ] ) {\n\t\t\treturn i;\n\t\t}\n\t}\n\treturn -1;\n});\n\n/**\n* Returns a new string by concatenating all array elements.\n*\n* @name join\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {string} [separator=','] - element separator\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a string\n* @returns {string} string representation\n*\n* @example\n* var arr = new Complex64Array( 2 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n*\n* var str = arr.join();\n* // returns '1 + 1i,2 + 2i'\n*\n* str = arr.join( '/' );\n* // returns '1 + 1i/2 + 2i'\n*/\nsetReadOnly( Complex64Array.prototype, 'join', function join( separator ) {\n\tvar out;\n\tvar buf;\n\tvar sep;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( arguments.length === 0 ) {\n\t\tsep = ',';\n\t} else if ( isString( separator ) ) {\n\t\tsep = separator;\n\t} else {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a string. Value: `%s`.', separator ) );\n\t}\n\tout = [];\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tout.push( getComplex64( buf, i ).toString() );\n\t}\n\treturn out.join( sep );\n});\n\n/**\n* Returns the last index at which a given element can be found.\n*\n* @name lastIndexOf\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {ComplexLike} searchElement - element to find\n* @param {integer} [fromIndex] - index at which to start searching backward (inclusive)\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a complex number\n* @throws {TypeError} second argument must be an integer\n* @returns {integer} index or -1\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n*\n* var arr = new Complex64Array( 5 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n* arr.set( [ 4.0, -4.0 ], 3 );\n* arr.set( [ 3.0, -3.0 ], 4 );\n*\n* var idx = arr.lastIndexOf( new Complex64( 3.0, -3.0 ) );\n* // returns 4\n*\n* idx = arr.lastIndexOf( new Complex64( 3.0, -3.0 ), 3 );\n* // returns 2\n*\n* idx = arr.lastIndexOf( new Complex64( 5.0, -5.0 ), 3 );\n* // returns -1\n*\n* idx = arr.lastIndexOf( new Complex64( 2.0, -2.0 ), -3 );\n* // returns 1\n*/\nsetReadOnly( Complex64Array.prototype, 'lastIndexOf', function lastIndexOf( searchElement, fromIndex ) {\n\tvar buf;\n\tvar idx;\n\tvar re;\n\tvar im;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isComplexLike( searchElement ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a complex number. Value: `%s`.', searchElement ) );\n\t}\n\tif ( arguments.length > 1 ) {\n\t\tif ( !isInteger( fromIndex ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be an integer. Value: `%s`.', fromIndex ) );\n\t\t}\n\t\tif ( fromIndex >= this._length ) {\n\t\t\tfromIndex = this._length - 1;\n\t\t} else if ( fromIndex < 0 ) {\n\t\t\tfromIndex += this._length;\n\t\t}\n\t} else {\n\t\tfromIndex = this._length - 1;\n\t}\n\tre = realf( searchElement );\n\tim = imagf( searchElement );\n\tbuf = this._buffer;\n\tfor ( i = fromIndex; i >= 0; i-- ) {\n\t\tidx = 2 * i;\n\t\tif ( re === buf[ idx ] && im === buf[ idx+1 ] ) {\n\t\t\treturn i;\n\t\t}\n\t}\n\treturn -1;\n});\n\n/**\n* Number of array elements.\n*\n* @name length\n* @memberof Complex64Array.prototype\n* @readonly\n* @type {NonNegativeInteger}\n*\n* @example\n* var arr = new Complex64Array( 10 );\n*\n* var len = arr.length;\n* // returns 10\n*/\nsetReadOnlyAccessor( Complex64Array.prototype, 'length', function get() {\n\treturn this._length;\n});\n\n/**\n* Returns a new array with each element being the result of a provided callback function.\n*\n* @name map\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {Function} fcn - callback function\n* @param {*} [thisArg] - callback function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {Complex64Array} complex number array\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* function scale( v, i ) {\n* return new Complex64( 2.0*realf( v ), 2.0*imagf( v ) );\n* }\n*\n* var arr = new Complex64Array( 3 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n*\n* var out = arr.map( scale );\n* // returns \n*\n* var z = out.get( 0 );\n* // returns \n*\n* var re = realf( z );\n* // returns 2\n*\n* var im = imagf( z );\n* // returns -2\n*/\nsetReadOnly( Complex64Array.prototype, 'map', function map( fcn, thisArg ) {\n\tvar outbuf;\n\tvar buf;\n\tvar out;\n\tvar i;\n\tvar v;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( fcn ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', fcn ) );\n\t}\n\tbuf = this._buffer;\n\tout = new this.constructor( this._length );\n\toutbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tv = fcn.call( thisArg, getComplex64( buf, i ), i, this );\n\t\tif ( isComplexLike( v ) ) {\n\t\t\toutbuf[ 2*i ] = realf( v );\n\t\t\toutbuf[ (2*i)+1 ] = imagf( v );\n\t\t} else if ( isArrayLikeObject( v ) && v.length === 2 ) {\n\t\t\toutbuf[ 2*i ] = v[ 0 ];\n\t\t\toutbuf[ (2*i)+1 ] = v[ 1 ];\n\t\t} else {\n\t\t\tthrow new TypeError( format( 'invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', v ) );\n\t\t}\n\t}\n\treturn out;\n});\n\n/**\n* Applies a provided callback function to each element of the array, in order, passing in the return value from the calculation on the preceding element and returning the accumulated result upon completion.\n*\n* @name reduce\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {Function} reducer - callback function\n* @param {*} [initialValue] - initial value\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @throws {Error} if not provided an initial value, the array must have at least one element\n* @returns {*} accumulated result\n*\n* @example\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n* import caddf from '@stdlib/math-base-ops-caddf';\n*\n* var arr = new Complex64Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var z = arr.reduce( caddf );\n* // returns \n*\n* var re = realf( z );\n* // returns 6.0\n*\n* var im = imagf( z );\n* // returns 6.0\n*/\nsetReadOnly( Complex64Array.prototype, 'reduce', function reduce( reducer, initialValue ) {\n\tvar buf;\n\tvar acc;\n\tvar len;\n\tvar v;\n\tvar i;\n\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( reducer ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', reducer ) );\n\t}\n\tbuf = this._buffer;\n\tlen = this._length;\n\tif ( arguments.length > 1 ) {\n\t\tacc = initialValue;\n\t\ti = 0;\n\t} else {\n\t\tif ( len === 0 ) {\n\t\t\tthrow new Error( 'invalid operation. If not provided an initial value, an array must contain at least one element.' );\n\t\t}\n\t\tacc = getComplex64( buf, 0 );\n\t\ti = 1;\n\t}\n\tfor ( ; i < len; i++ ) {\n\t\tv = getComplex64( buf, i );\n\t\tacc = reducer( acc, v, i, this );\n\t}\n\treturn acc;\n});\n\n/**\n* Reverses an array in-place.\n*\n* @name reverse\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Complex64Array} reversed array\n*\n* @example\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* var arr = new Complex64Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var out = arr.reverse();\n* // returns \n*\n* var z = out.get( 0 );\n* // returns \n*\n* var re = realf( z );\n* // returns 3.0\n*\n* var im = imagf( z );\n* // returns 3.0\n*\n* z = out.get( 1 );\n* // returns \n*\n* re = realf( z );\n* // returns 2.0\n*\n* im = imagf( z );\n* // returns 2.0\n*\n* z = out.get( 2 );\n* // returns \n*\n* re = realf( z );\n* // returns 1.0\n*\n* im = imagf( z );\n* // returns 1.0\n*/\nsetReadOnly( Complex64Array.prototype, 'reverse', function reverse() {\n\tvar buf;\n\tvar tmp;\n\tvar len;\n\tvar N;\n\tvar i;\n\tvar j;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tlen = this._length;\n\tbuf = this._buffer;\n\tN = floor( len / 2 );\n\tfor ( i = 0; i < N; i++ ) {\n\t\tj = len - i - 1;\n\t\ttmp = buf[ (2*i) ];\n\t\tbuf[ (2*i) ] = buf[ (2*j) ];\n\t\tbuf[ (2*j) ] = tmp;\n\t\ttmp = buf[ (2*i)+1 ];\n\t\tbuf[ (2*i)+1 ] = buf[ (2*j)+1 ];\n\t\tbuf[ (2*j)+1 ] = tmp;\n\t}\n\treturn this;\n});\n\n/**\n* Sets an array element.\n*\n* ## Notes\n*\n* - When provided a typed array, real or complex, we must check whether the source array shares the same buffer as the target array and whether the underlying memory overlaps. In particular, we are concerned with the following scenario:\n*\n* ```text\n* buf: ---------------------\n* src: ---------------------\n* ```\n*\n* In the above, as we copy values from `src`, we will overwrite values in the `src` view, resulting in duplicated values copied into the end of `buf`, which is not intended. Hence, to avoid overwriting source values, we must **copy** source values to a temporary array.\n*\n* In the other overlapping scenario,\n*\n* ```text\n* buf: ---------------------\n* src: ---------------------\n* ```\n*\n* by the time we begin copying into the overlapping region, we are copying from the end of `src`, a non-overlapping region, which means we don't run the risk of copying copied values, rather than the original `src` values, as intended.\n*\n* @name set\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {(Collection|Complex|ComplexArray)} value - value(s)\n* @param {NonNegativeInteger} [i=0] - element index at which to start writing values\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be either a complex number, an array-like object, or a complex number array\n* @throws {TypeError} index argument must be a nonnegative integer\n* @throws {RangeError} array-like objects must have a length which is a multiple of two\n* @throws {RangeError} index argument is out-of-bounds\n* @throws {RangeError} target array lacks sufficient storage to accommodate source values\n* @returns {void}\n*\n* @example\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* var arr = new Complex64Array( 10 );\n*\n* var z = arr.get( 0 );\n* // returns \n*\n* var re = realf( z );\n* // returns 0.0\n*\n* var im = imagf( z );\n* // returns 0.0\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n*\n* z = arr.get( 0 );\n* // returns \n*\n* re = realf( z );\n* // returns 1.0\n*\n* im = imagf( z );\n* // returns -1.0\n*/\nsetReadOnly( Complex64Array.prototype, 'set', function set( value ) {\n\t/* eslint-disable no-underscore-dangle */\n\tvar sbuf;\n\tvar idx;\n\tvar buf;\n\tvar tmp;\n\tvar flg;\n\tvar N;\n\tvar v;\n\tvar i;\n\tvar j;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tbuf = this._buffer;\n\tif ( arguments.length > 1 ) {\n\t\tidx = arguments[ 1 ];\n\t\tif ( !isNonNegativeInteger( idx ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Index argument must be a nonnegative integer. Value: `%s`.', idx ) );\n\t\t}\n\t} else {\n\t\tidx = 0;\n\t}\n\tif ( isComplexLike( value ) ) {\n\t\tif ( idx >= this._length ) {\n\t\t\tthrow new RangeError( format( 'invalid argument. Index argument is out-of-bounds. Value: `%u`.', idx ) );\n\t\t}\n\t\tidx *= 2;\n\t\tbuf[ idx ] = realf( value );\n\t\tbuf[ idx+1 ] = imagf( value );\n\t\treturn;\n\t}\n\tif ( isComplexArray( value ) ) {\n\t\tN = value._length;\n\t\tif ( idx+N > this._length ) {\n\t\t\tthrow new RangeError( 'invalid arguments. Target array lacks sufficient storage to accommodate source values.' );\n\t\t}\n\t\tsbuf = value._buffer;\n\n\t\t// Check for overlapping memory...\n\t\tj = buf.byteOffset + (idx*BYTES_PER_ELEMENT);\n\t\tif (\n\t\t\tsbuf.buffer === buf.buffer &&\n\t\t\t(\n\t\t\t\tsbuf.byteOffset < j &&\n\t\t\t\tsbuf.byteOffset+sbuf.byteLength > j\n\t\t\t)\n\t\t) {\n\t\t\t// We need to copy source values...\n\t\t\ttmp = new Float32Array( sbuf.length );\n\t\t\tfor ( i = 0; i < sbuf.length; i++ ) {\n\t\t\t\ttmp[ i ] = sbuf[ i ];\n\t\t\t}\n\t\t\tsbuf = tmp;\n\t\t}\n\t\tidx *= 2;\n\t\tj = 0;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\tbuf[ idx ] = sbuf[ j ];\n\t\t\tbuf[ idx+1 ] = sbuf[ j+1 ];\n\t\t\tidx += 2; // stride\n\t\t\tj += 2; // stride\n\t\t}\n\t\treturn;\n\t}\n\tif ( isCollection( value ) ) {\n\t\t// Detect whether we've been provided an array of complex numbers...\n\t\tN = value.length;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\tif ( !isComplexLike( value[ i ] ) ) {\n\t\t\t\tflg = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t// If an array does not contain only complex numbers, then we assume interleaved real and imaginary components...\n\t\tif ( flg ) {\n\t\t\tif ( !isEven( N ) ) {\n\t\t\t\tthrow new RangeError( format( 'invalid argument. Array-like object arguments must have a length which is a multiple of two. Length: `%u`.', N ) );\n\t\t\t}\n\t\t\tif ( idx+(N/2) > this._length ) {\n\t\t\t\tthrow new RangeError( 'invalid arguments. Target array lacks sufficient storage to accommodate source values.' );\n\t\t\t}\n\t\t\tsbuf = value;\n\n\t\t\t// Check for overlapping memory...\n\t\t\tj = buf.byteOffset + (idx*BYTES_PER_ELEMENT);\n\t\t\tif (\n\t\t\t\tsbuf.buffer === buf.buffer &&\n\t\t\t\t(\n\t\t\t\t\tsbuf.byteOffset < j &&\n\t\t\t\t\tsbuf.byteOffset+sbuf.byteLength > j\n\t\t\t\t)\n\t\t\t) {\n\t\t\t\t// We need to copy source values...\n\t\t\t\ttmp = new Float32Array( N );\n\t\t\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\t\t\ttmp[ i ] = sbuf[ i ]; // TODO: handle accessor arrays\n\t\t\t\t}\n\t\t\t\tsbuf = tmp;\n\t\t\t}\n\t\t\tidx *= 2;\n\t\t\tN /= 2;\n\t\t\tj = 0;\n\t\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\t\tbuf[ idx ] = sbuf[ j ];\n\t\t\t\tbuf[ idx+1 ] = sbuf[ j+1 ];\n\t\t\t\tidx += 2; // stride\n\t\t\t\tj += 2; // stride\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\t// If an array contains only complex numbers, then we need to extract real and imaginary components...\n\t\tif ( idx+N > this._length ) {\n\t\t\tthrow new RangeError( 'invalid arguments. Target array lacks sufficient storage to accommodate source values.' );\n\t\t}\n\t\tidx *= 2;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\tv = value[ i ];\n\t\t\tbuf[ idx ] = realf( v );\n\t\t\tbuf[ idx+1 ] = imagf( v );\n\t\t\tidx += 2; // stride\n\t\t}\n\t\treturn;\n\t}\n\tthrow new TypeError( format( 'invalid argument. First argument must be either a complex number, an array-like object, or a complex number array. Value: `%s`.', value ) );\n\n\t/* eslint-enable no-underscore-dangle */\n});\n\n/**\n* Copies a portion of a typed array to a new typed array.\n*\n* @name slice\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {integer} [start=0] - starting index (inclusive)\n* @param {integer} [end] - ending index (exclusive)\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be an integer\n* @throws {TypeError} second argument must be an integer\n* @returns {Complex64Array} complex number array\n*\n* @example\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* var arr = new Complex64Array( 5 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n* arr.set( [ 4.0, -4.0 ], 3 );\n* arr.set( [ 5.0, -5.0 ], 4 );\n*\n* var out = arr.slice();\n* // returns \n*\n* var len = out.length;\n* // returns 5\n*\n* var z = out.get( 0 );\n* // returns \n*\n* var re = realf( z );\n* // returns 1.0\n*\n* var im = imagf( z );\n* // returns -1.0\n*\n* z = out.get( len-1 );\n* // returns \n*\n* re = realf( z );\n* // returns 5.0\n*\n* im = imagf( z );\n* // returns -5.0\n*\n* out = arr.slice( 1, -2 );\n* // returns \n*\n* len = out.length;\n* // returns 2\n*\n* z = out.get( 0 );\n* // returns \n*\n* re = realf( z );\n* // returns 2.0\n*\n* im = imagf( z );\n* // returns -2.0\n*\n* z = out.get( len-1 );\n* // returns \n*\n* re = realf( z );\n* // returns 3.0\n*\n* im = imagf( z );\n* // returns -3.0\n*/\nsetReadOnly( Complex64Array.prototype, 'slice', function slice( start, end ) {\n\tvar outlen;\n\tvar outbuf;\n\tvar out;\n\tvar idx;\n\tvar buf;\n\tvar len;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tbuf = this._buffer;\n\tlen = this._length;\n\tif ( arguments.length === 0 ) {\n\t\tstart = 0;\n\t\tend = len;\n\t} else {\n\t\tif ( !isInteger( start ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. First argument must be an integer. Value: `%s`.', start ) );\n\t\t}\n\t\tif ( start < 0 ) {\n\t\t\tstart += len;\n\t\t\tif ( start < 0 ) {\n\t\t\t\tstart = 0;\n\t\t\t}\n\t\t}\n\t\tif ( arguments.length === 1 ) {\n\t\t\tend = len;\n\t\t} else {\n\t\t\tif ( !isInteger( end ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be an integer. Value: `%s`.', end ) );\n\t\t\t}\n\t\t\tif ( end < 0 ) {\n\t\t\t\tend += len;\n\t\t\t\tif ( end < 0 ) {\n\t\t\t\t\tend = 0;\n\t\t\t\t}\n\t\t\t} else if ( end > len ) {\n\t\t\t\tend = len;\n\t\t\t}\n\t\t}\n\t}\n\tif ( start < end ) {\n\t\toutlen = end - start;\n\t} else {\n\t\toutlen = 0;\n\t}\n\tout = new this.constructor( outlen );\n\toutbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\tfor ( i = 0; i < outlen; i++ ) {\n\t\tidx = 2*(i+start);\n\t\toutbuf[ 2*i ] = buf[ idx ];\n\t\toutbuf[ (2*i)+1 ] = buf[ idx+1 ];\n\t}\n\treturn out;\n});\n\n/**\n* Tests whether at least one element in an array passes a test implemented by a predicate function.\n*\n* @name some\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {boolean} boolean indicating whether at least one element passes a test\n*\n* @example\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* function predicate( v ) {\n* return ( realf( v ) === imagf( v ) );\n* }\n*\n* var arr = new Complex64Array( 3 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n*\n* var bool = arr.some( predicate );\n* // returns true\n*/\nsetReadOnly( Complex64Array.prototype, 'some', function some( predicate, thisArg ) {\n\tvar buf;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tif ( predicate.call( thisArg, getComplex64( buf, i ), i, this ) ) {\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n});\n\n/**\n* Creates a new typed array view over the same underlying `ArrayBuffer` and with the same underlying data type as the host array.\n*\n* @name subarray\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {integer} [begin=0] - starting index (inclusive)\n* @param {integer} [end] - ending index (exclusive)\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be an integer\n* @throws {TypeError} second argument must be an integer\n* @returns {Complex64Array} subarray\n*\n* @example\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* var arr = new Complex64Array( 5 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n* arr.set( [ 4.0, -4.0 ], 3 );\n* arr.set( [ 5.0, -5.0 ], 4 );\n*\n* var subarr = arr.subarray();\n* // returns \n*\n* var len = subarr.length;\n* // returns 5\n*\n* var z = subarr.get( 0 );\n* // returns \n*\n* var re = realf( z );\n* // returns 1.0\n*\n* var im = imagf( z );\n* // returns -1.0\n*\n* z = subarr.get( len-1 );\n* // returns \n*\n* re = realf( z );\n* // returns 5.0\n*\n* im = imagf( z );\n* // returns -5.0\n*\n* subarr = arr.subarray( 1, -2 );\n* // returns \n*\n* len = subarr.length;\n* // returns 2\n*\n* z = subarr.get( 0 );\n* // returns \n*\n* re = realf( z );\n* // returns 2.0\n*\n* im = imagf( z );\n* // returns -2.0\n*\n* z = subarr.get( len-1 );\n* // returns \n*\n* re = realf( z );\n* // returns 3.0\n*\n* im = imagf( z );\n* // returns -3.0\n*/\nsetReadOnly( Complex64Array.prototype, 'subarray', function subarray( begin, end ) {\n\tvar offset;\n\tvar buf;\n\tvar len;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tbuf = this._buffer;\n\tlen = this._length;\n\tif ( arguments.length === 0 ) {\n\t\tbegin = 0;\n\t\tend = len;\n\t} else {\n\t\tif ( !isInteger( begin ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. First argument must be an integer. Value: `%s`.', begin ) );\n\t\t}\n\t\tif ( begin < 0 ) {\n\t\t\tbegin += len;\n\t\t\tif ( begin < 0 ) {\n\t\t\t\tbegin = 0;\n\t\t\t}\n\t\t}\n\t\tif ( arguments.length === 1 ) {\n\t\t\tend = len;\n\t\t} else {\n\t\t\tif ( !isInteger( end ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be an integer. Value: `%s`.', end ) );\n\t\t\t}\n\t\t\tif ( end < 0 ) {\n\t\t\t\tend += len;\n\t\t\t\tif ( end < 0 ) {\n\t\t\t\t\tend = 0;\n\t\t\t\t}\n\t\t\t} else if ( end > len ) {\n\t\t\t\tend = len;\n\t\t\t}\n\t\t}\n\t}\n\tif ( begin >= len ) {\n\t\tlen = 0;\n\t\toffset = buf.byteLength;\n\t} else if ( begin >= end ) {\n\t\tlen = 0;\n\t\toffset = buf.byteOffset + (begin*BYTES_PER_ELEMENT);\n\t} else {\n\t\tlen = end - begin;\n\t\toffset = buf.byteOffset + ( begin*BYTES_PER_ELEMENT );\n\t}\n\treturn new this.constructor( buf.buffer, offset, ( len < 0 ) ? 0 : len );\n});\n\n/**\n* Returns a new typed array containing the elements in reversed order.\n*\n* @name toReversed\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Complex64Array} reversed array\n*\n* @example\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* var arr = new Complex64Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var out = arr.toReversed();\n* // returns \n*\n* var z = out.get( 0 );\n* // returns \n*\n* var re = realf( z );\n* // returns 3.0\n*\n* var im = imagf( z );\n* // returns 3.0\n*\n* z = out.get( 1 );\n* // returns \n*\n* re = realf( z );\n* // returns 2.0\n*\n* im = imagf( z );\n* // returns 2.0\n*\n* z = out.get( 2 );\n* // returns \n*\n* re = realf( z );\n* // returns 1.0\n*\n* im = imagf( z );\n* // returns 1.0\n*/\nsetReadOnly( Complex64Array.prototype, 'toReversed', function toReversed() {\n\tvar outbuf;\n\tvar out;\n\tvar len;\n\tvar buf;\n\tvar i;\n\tvar j;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tlen = this._length;\n\tout = new this.constructor( len );\n\tbuf = this._buffer;\n\toutbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\tfor ( i = 0; i < len; i++ ) {\n\t\tj = len - i - 1;\n\t\toutbuf[ (2*i) ] = buf[ (2*j) ];\n\t\toutbuf[ (2*i)+1 ] = buf[ (2*j)+1 ];\n\t}\n\treturn out;\n});\n\n/**\n* Serializes an array as a string.\n*\n* @name toString\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @throws {TypeError} `this` must be a complex number array\n* @returns {string} string representation\n*\n* @example\n* var arr = new Complex64Array( 2 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n*\n* var str = arr.toString();\n* // returns '1 + 1i,2 + 2i'\n*/\nsetReadOnly( Complex64Array.prototype, 'toString', function toString() {\n\tvar out;\n\tvar buf;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tout = [];\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tout.push( getComplex64( buf, i ).toString() );\n\t}\n\treturn out.join( ',' );\n});\n\n/**\n* Returns a new typed array with the element at a provided index replaced with a provided value.\n*\n* @name with\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {integer} index - element index\n* @param {ComplexLike} value - new value\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be an integer\n* @throws {RangeError} index argument is out-of-bounds\n* @throws {TypeError} second argument must be a complex number\n* @returns {Complex64Array} new typed array\n*\n* @example\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n* import Complex64 from '@stdlib/complex-float32';\n*\n* var arr = new Complex64Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var out = arr.with( 0, new Complex64( 4.0, 4.0 ) );\n* // returns \n*\n* var z = out.get( 0 );\n* // returns \n*\n* var re = realf( z );\n* // returns 4.0\n*\n* var im = imagf( z );\n* // returns 4.0\n*/\nsetReadOnly( Complex64Array.prototype, 'with', function copyWith( index, value ) {\n\tvar buf;\n\tvar out;\n\tvar len;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isInteger( index ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be an integer. Value: `%s`.', index ) );\n\t}\n\tlen = this._length;\n\tif ( index < 0 ) {\n\t\tindex += len;\n\t}\n\tif ( index < 0 || index >= len ) {\n\t\tthrow new RangeError( format( 'invalid argument. Index argument is out-of-bounds. Value: `%s`.', index ) );\n\t}\n\tif ( !isComplexLike( value ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Second argument must be a complex number. Value: `%s`.', value ) );\n\t}\n\tout = new this.constructor( this._buffer );\n\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\tbuf[ 2*index ] = realf( value );\n\tbuf[ (2*index)+1 ] = imagf( value );\n\treturn out;\n});\n\n\n// EXPORTS //\n\nexport default Complex64Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport realf from '@stdlib/complex-realf';\nimport imagf from '@stdlib/complex-imagf';\n\n\n// MAIN //\n\n/**\n* Returns a strided array of real and imaginary components.\n*\n* @private\n* @param {Float32Array} buf - output array\n* @param {Array} arr - array containing complex numbers\n* @returns {(Float32Array|null)} output array or null\n*/\nfunction fromArray( buf, arr ) {\n\tvar len;\n\tvar v;\n\tvar i;\n\tvar j;\n\n\tlen = arr.length;\n\tj = 0;\n\tfor ( i = 0; i < len; i++ ) {\n\t\tv = arr[ i ];\n\t\tif ( !isComplexLike( v ) ) {\n\t\t\treturn null;\n\t\t}\n\t\tbuf[ j ] = realf( v );\n\t\tbuf[ j+1 ] = imagf( v );\n\t\tj += 2; // stride\n\t}\n\treturn buf;\n}\n\n\n// EXPORTS //\n\nexport default fromArray;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Returns the real component of a double-precision complex floating-point number.\n*\n* @param {Complex} z - complex number\n* @returns {number} real component\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n*\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var re = real( z );\n* // returns 5.0\n*/\nfunction real( z ) {\n\treturn z.re;\n}\n\n\n// EXPORTS //\n\nexport default real;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Returns the imaginary component of a double-precision complex floating-point number.\n*\n* @param {Complex} z - complex number\n* @returns {number} imaginary component\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n*\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var im = imag( z );\n* // returns 3.0\n*/\nfunction imag( z ) {\n\treturn z.im;\n}\n\n\n// EXPORTS //\n\nexport default imag;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isArrayLikeObject from '@stdlib/assert-is-array-like-object';\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport format from '@stdlib/string-format';\nimport real from '@stdlib/complex-real';\nimport imag from '@stdlib/complex-imag';\n\n\n// MAIN //\n\n/**\n* Returns an array of iterated values.\n*\n* @private\n* @param {Object} it - iterator\n* @returns {(Array|TypeError)} array or an error\n*/\nfunction fromIterator( it ) {\n\tvar out;\n\tvar v;\n\tvar z;\n\n\tout = [];\n\twhile ( true ) {\n\t\tv = it.next();\n\t\tif ( v.done ) {\n\t\t\tbreak;\n\t\t}\n\t\tz = v.value;\n\t\tif ( isArrayLikeObject( z ) && z.length >= 2 ) {\n\t\t\tout.push( z[ 0 ], z[ 1 ] );\n\t\t} else if ( isComplexLike( z ) ) {\n\t\t\tout.push( real( z ), imag( z ) );\n\t\t} else {\n\t\t\treturn new TypeError( format( 'invalid argument. An iterator must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', z ) );\n\t\t}\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default fromIterator;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isArrayLikeObject from '@stdlib/assert-is-array-like-object';\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport realf from '@stdlib/complex-realf';\nimport imagf from '@stdlib/complex-imagf';\nimport format from '@stdlib/string-format';\n\n\n// MAIN //\n\n/**\n* Returns an array of iterated values.\n*\n* @private\n* @param {Object} it - iterator\n* @param {Function} clbk - callback to invoke for each iterated value\n* @param {*} thisArg - invocation context\n* @returns {(Array|TypeError)} array or an error\n*/\nfunction fromIteratorMap( it, clbk, thisArg ) {\n\tvar out;\n\tvar v;\n\tvar z;\n\tvar i;\n\n\tout = [];\n\ti = -1;\n\twhile ( true ) {\n\t\tv = it.next();\n\t\tif ( v.done ) {\n\t\t\tbreak;\n\t\t}\n\t\ti += 1;\n\t\tz = clbk.call( thisArg, v.value, i );\n\t\tif ( isArrayLikeObject( z ) && z.length >= 2 ) {\n\t\t\tout.push( z[ 0 ], z[ 1 ] );\n\t\t} else if ( isComplexLike( z ) ) {\n\t\t\tout.push( realf( z ), imagf( z ) );\n\t\t} else {\n\t\t\treturn new TypeError( format( 'invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', z ) );\n\t\t}\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default fromIteratorMap;\n","/* eslint-disable no-restricted-syntax, max-lines, no-invalid-this */\n\n/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isNonNegativeInteger } from '@stdlib/assert-is-nonnegative-integer';\nimport isArrayLikeObject from '@stdlib/assert-is-array-like-object';\nimport isCollection from '@stdlib/assert-is-collection';\nimport isArrayBuffer from '@stdlib/assert-is-arraybuffer';\nimport isObject from '@stdlib/assert-is-object';\nimport isArray from '@stdlib/assert-is-array';\nimport isString from '@stdlib/assert-is-string';\nimport isFunction from '@stdlib/assert-is-function';\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport isEven from '@stdlib/math-base-assert-is-even';\nimport isInteger from '@stdlib/math-base-assert-is-integer';\nimport isComplex64Array from '@stdlib/array-base-assert-is-complex64array';\nimport isComplex128Array from '@stdlib/array-base-assert-is-complex128array';\nimport hasIteratorSymbolSupport from '@stdlib/assert-has-iterator-symbol-support';\nimport ITERATOR_SYMBOL from '@stdlib/symbol-iterator';\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport setReadOnlyAccessor from '@stdlib/utils-define-nonenumerable-read-only-accessor';\nimport Float64Array from '@stdlib/array-float64';\nimport Complex128 from '@stdlib/complex-float64';\nimport real from '@stdlib/complex-real';\nimport imag from '@stdlib/complex-imag';\nimport floor from '@stdlib/math-base-special-floor';\nimport reinterpret64 from '@stdlib/strided-base-reinterpret-complex64';\nimport reinterpret128 from '@stdlib/strided-base-reinterpret-complex128';\nimport getter from '@stdlib/array-base-getter';\nimport accessorGetter from '@stdlib/array-base-accessor-getter';\nimport format from '@stdlib/string-format';\nimport fromIterator from './from_iterator.js';\nimport fromIteratorMap from './from_iterator_map.js';\nimport fromArray from './from_array.js';\n\n\n// VARIABLES //\n\nvar BYTES_PER_ELEMENT = Float64Array.BYTES_PER_ELEMENT * 2;\nvar HAS_ITERATOR_SYMBOL = hasIteratorSymbolSupport();\n\n\n// FUNCTIONS //\n\n/**\n* Returns a boolean indicating if a value is a complex typed array.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a complex typed array\n*/\nfunction isComplexArray( value ) {\n\treturn (\n\t\tvalue instanceof Complex128Array ||\n\t\t(\n\t\t\ttypeof value === 'object' &&\n\t\t\tvalue !== null &&\n\t\t\t(\n\t\t\t\tvalue.constructor.name === 'Complex64Array' ||\n\t\t\t\tvalue.constructor.name === 'Complex128Array'\n\t\t\t) &&\n\t\t\ttypeof value._length === 'number' && // eslint-disable-line no-underscore-dangle\n\n\t\t\t// NOTE: we don't perform a more rigorous test here for a typed array for performance reasons, as robustly checking for a typed array instance could require walking the prototype tree and performing relatively expensive constructor checks...\n\t\t\ttypeof value._buffer === 'object' // eslint-disable-line no-underscore-dangle\n\t\t)\n\t);\n}\n\n/**\n* Returns a boolean indicating if a value is a complex typed array constructor.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a complex typed array constructor\n*/\nfunction isComplexArrayConstructor( value ) {\n\treturn (\n\t\tvalue === Complex128Array ||\n\n\t\t// NOTE: weaker test in order to avoid a circular dependency with Complex64Array...\n\t\tvalue.name === 'Complex64Array'\n\t);\n}\n\n/**\n* Retrieves a complex number from a complex number array buffer.\n*\n* @private\n* @param {Float64Array} buf - array buffer\n* @param {NonNegativeInteger} idx - element index\n* @returns {Complex128} complex number\n*/\nfunction getComplex128( buf, idx ) {\n\tidx *= 2;\n\treturn new Complex128( buf[ idx ], buf[ idx+1 ] );\n}\n\n\n// MAIN //\n\n/**\n* 128-bit complex number array constructor.\n*\n* @constructor\n* @param {(NonNegativeInteger|Collection|ArrayBuffer|Iterable)} [arg] - length, typed array, array-like object, buffer, or iterable\n* @param {NonNegativeInteger} [byteOffset=0] - byte offset\n* @param {NonNegativeInteger} [length] - view length\n* @throws {RangeError} ArrayBuffer byte length must be a multiple of `16`\n* @throws {RangeError} array-like object and typed array input arguments must have a length which is a multiple of two\n* @throws {TypeError} if provided only a single argument, must provide a valid argument\n* @throws {TypeError} byte offset must be a nonnegative integer\n* @throws {RangeError} byte offset must be a multiple of `16`\n* @throws {TypeError} view length must be a positive multiple of `16`\n* @throws {RangeError} must provide sufficient memory to accommodate byte offset and view length requirements\n* @throws {TypeError} an iterator must return either a two element array containing real and imaginary components or a complex number\n* @returns {Complex128Array} complex number array\n*\n* @example\n* var arr = new Complex128Array();\n* // returns \n*\n* var len = arr.length;\n* // returns 0\n*\n* @example\n* var arr = new Complex128Array( 2 );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*\n* @example\n* var arr = new Complex128Array( [ 1.0, -1.0 ] );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* import ArrayBuffer from '@stdlib/array-buffer';\n*\n* var buf = new ArrayBuffer( 32 );\n* var arr = new Complex128Array( buf );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*\n* @example\n* import ArrayBuffer from '@stdlib/array-buffer';\n*\n* var buf = new ArrayBuffer( 32 );\n* var arr = new Complex128Array( buf, 16 );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* import ArrayBuffer from '@stdlib/array-buffer';\n*\n* var buf = new ArrayBuffer( 64 );\n* var arr = new Complex128Array( buf, 16, 2 );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*/\nfunction Complex128Array() {\n\tvar byteOffset;\n\tvar nargs;\n\tvar buf;\n\tvar len;\n\n\tnargs = arguments.length;\n\tif ( !(this instanceof Complex128Array) ) {\n\t\tif ( nargs === 0 ) {\n\t\t\treturn new Complex128Array();\n\t\t}\n\t\tif ( nargs === 1 ) {\n\t\t\treturn new Complex128Array( arguments[0] );\n\t\t}\n\t\tif ( nargs === 2 ) {\n\t\t\treturn new Complex128Array( arguments[0], arguments[1] );\n\t\t}\n\t\treturn new Complex128Array( arguments[0], arguments[1], arguments[2] );\n\t}\n\t// Create the underlying data buffer...\n\tif ( nargs === 0 ) {\n\t\tbuf = new Float64Array( 0 ); // backward-compatibility\n\t} else if ( nargs === 1 ) {\n\t\tif ( isNonNegativeInteger( arguments[0] ) ) {\n\t\t\tbuf = new Float64Array( arguments[0]*2 );\n\t\t} else if ( isCollection( arguments[0] ) ) {\n\t\t\tbuf = arguments[ 0 ];\n\t\t\tlen = buf.length;\n\n\t\t\t// If provided a \"generic\" array, peak at the first value, and, if the value is a complex number, try to process as an array of complex numbers, falling back to \"normal\" typed array initialization if we fail and ensuring consistency if the first value had not been a complex number...\n\t\t\tif ( len && isArray( buf ) && isComplexLike( buf[0] ) ) {\n\t\t\t\tbuf = fromArray( new Float64Array( len*2 ), buf );\n\t\t\t\tif ( buf === null ) {\n\t\t\t\t\t// We failed and we are now forced to allocate a new array :-(\n\t\t\t\t\tif ( !isEven( len ) ) {\n\t\t\t\t\t\tthrow new RangeError( format( 'invalid argument. Array-like object arguments must have a length which is a multiple of two. Length: `%u`.', len ) );\n\t\t\t\t\t}\n\t\t\t\t\t// We failed, so fall back to directly setting values...\n\t\t\t\t\tbuf = new Float64Array( arguments[0] );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ( isComplex64Array( buf ) ) {\n\t\t\t\t\tbuf = reinterpret64( buf, 0 );\n\t\t\t\t} else if ( isComplex128Array( buf ) ) {\n\t\t\t\t\tbuf = reinterpret128( buf, 0 );\n\t\t\t\t} else if ( !isEven( len ) ) {\n\t\t\t\t\tthrow new RangeError( format( 'invalid argument. Array-like object and typed array arguments must have a length which is a multiple of two. Length: `%u`.', len ) );\n\t\t\t\t}\n\t\t\t\tbuf = new Float64Array( buf );\n\t\t\t}\n\t\t} else if ( isArrayBuffer( arguments[0] ) ) {\n\t\t\tbuf = arguments[ 0 ];\n\t\t\tif ( !isInteger( buf.byteLength/BYTES_PER_ELEMENT ) ) {\n\t\t\t\tthrow new RangeError( format( 'invalid argument. ArrayBuffer byte length must be a multiple of %u. Byte length: `%u`.', BYTES_PER_ELEMENT, buf.byteLength ) );\n\t\t\t}\n\t\t\tbuf = new Float64Array( buf );\n\t\t} else if ( isObject( arguments[0] ) ) {\n\t\t\tbuf = arguments[ 0 ];\n\t\t\tif ( HAS_ITERATOR_SYMBOL === false ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Environment lacks Symbol.iterator support. Must provide a length, ArrayBuffer, typed array, or array-like object. Value: `%s`.', buf ) );\n\t\t\t}\n\t\t\tif ( !isFunction( buf[ ITERATOR_SYMBOL ] ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.', buf ) );\n\t\t\t}\n\t\t\tbuf = buf[ ITERATOR_SYMBOL ]();\n\t\t\tif ( !isFunction( buf.next ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.', buf ) );\n\t\t\t}\n\t\t\tbuf = fromIterator( buf );\n\t\t\tif ( buf instanceof Error ) {\n\t\t\t\tthrow buf;\n\t\t\t}\n\t\t\tbuf = new Float64Array( buf );\n\t\t} else {\n\t\t\tthrow new TypeError( format( 'invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.', arguments[0] ) );\n\t\t}\n\t} else {\n\t\tbuf = arguments[ 0 ];\n\t\tif ( !isArrayBuffer( buf ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. First argument must be an ArrayBuffer. Value: `%s`.', buf ) );\n\t\t}\n\t\tbyteOffset = arguments[ 1 ];\n\t\tif ( !isNonNegativeInteger( byteOffset ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Byte offset must be a nonnegative integer. Value: `%s`.', byteOffset ) );\n\t\t}\n\t\tif ( !isInteger( byteOffset/BYTES_PER_ELEMENT ) ) {\n\t\t\tthrow new RangeError( format( 'invalid argument. Byte offset must be a multiple of %u. Value: `%u`.', BYTES_PER_ELEMENT, byteOffset ) );\n\t\t}\n\t\tif ( nargs === 2 ) {\n\t\t\tlen = buf.byteLength - byteOffset;\n\t\t\tif ( !isInteger( len/BYTES_PER_ELEMENT ) ) {\n\t\t\t\tthrow new RangeError( format( 'invalid arguments. ArrayBuffer view byte length must be a multiple of %u. View byte length: `%u`.', BYTES_PER_ELEMENT, len ) );\n\t\t\t}\n\t\t\tbuf = new Float64Array( buf, byteOffset );\n\t\t} else {\n\t\t\tlen = arguments[ 2 ];\n\t\t\tif ( !isNonNegativeInteger( len ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Length must be a nonnegative integer. Value: `%s`.', len ) );\n\t\t\t}\n\t\t\tif ( (len*BYTES_PER_ELEMENT) > (buf.byteLength-byteOffset) ) {\n\t\t\t\tthrow new RangeError( format( 'invalid arguments. ArrayBuffer has insufficient capacity. Either decrease the array length or provide a bigger buffer. Minimum capacity: `%u`.', len*BYTES_PER_ELEMENT ) );\n\t\t\t}\n\t\t\tbuf = new Float64Array( buf, byteOffset, len*2 );\n\t\t}\n\t}\n\tsetReadOnly( this, '_buffer', buf );\n\tsetReadOnly( this, '_length', buf.length/2 );\n\n\treturn this;\n}\n\n/**\n* Size (in bytes) of each array element.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex128Array\n* @readonly\n* @type {PositiveInteger}\n* @default 16\n*\n* @example\n* var nbytes = Complex128Array.BYTES_PER_ELEMENT;\n* // returns 16\n*/\nsetReadOnly( Complex128Array, 'BYTES_PER_ELEMENT', BYTES_PER_ELEMENT );\n\n/**\n* Constructor name.\n*\n* @name name\n* @memberof Complex128Array\n* @readonly\n* @type {string}\n* @default 'Complex128Array'\n*\n* @example\n* var name = Complex128Array.name;\n* // returns 'Complex128Array'\n*/\nsetReadOnly( Complex128Array, 'name', 'Complex128Array' );\n\n/**\n* Creates a new 128-bit complex number array from an array-like object or an iterable.\n*\n* @name from\n* @memberof Complex128Array\n* @type {Function}\n* @param {(Collection|Object)} src - array-like object or iterable\n* @param {Function} [clbk] - callback to invoke for each source element\n* @param {*} [thisArg] - context\n* @throws {TypeError} `this` context must be a constructor\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be an array-like object or an iterable\n* @throws {TypeError} second argument must be a function\n* @throws {RangeError} array-like objects must have a length which is a multiple of two\n* @throws {TypeError} an iterator must return either a two element array containing real and imaginary components or a complex number\n* @throws {TypeError} when provided an iterator, a callback must return either a two element array containing real and imaginary components or a complex number\n* @returns {Complex128Array} 128-bit complex number array\n*\n* @example\n* var arr = Complex128Array.from( [ 1.0, -1.0 ] );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n*\n* var arr = Complex128Array.from( [ new Complex128( 1.0, 1.0 ) ] );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* function clbk( v ) {\n* return new Complex128( real(v)*2.0, imag(v)*2.0 );\n* }\n*\n* var arr = Complex128Array.from( [ new Complex128( 1.0, 1.0 ) ], clbk );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*/\nsetReadOnly( Complex128Array, 'from', function from( src ) {\n\tvar thisArg;\n\tvar nargs;\n\tvar clbk;\n\tvar out;\n\tvar buf;\n\tvar tmp;\n\tvar get;\n\tvar len;\n\tvar flg;\n\tvar v;\n\tvar i;\n\tvar j;\n\tif ( !isFunction( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` context must be a constructor.' );\n\t}\n\tif ( !isComplexArrayConstructor( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tnargs = arguments.length;\n\tif ( nargs > 1 ) {\n\t\tclbk = arguments[ 1 ];\n\t\tif ( !isFunction( clbk ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be a function. Value: `%s`.', clbk ) );\n\t\t}\n\t\tif ( nargs > 2 ) {\n\t\t\tthisArg = arguments[ 2 ];\n\t\t}\n\t}\n\tif ( isComplexArray( src ) ) {\n\t\tlen = src.length;\n\t\tif ( clbk ) {\n\t\t\tout = new this( len );\n\t\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\t\tj = 0;\n\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\tv = clbk.call( thisArg, src.get( i ), i );\n\t\t\t\tif ( isComplexLike( v ) ) {\n\t\t\t\t\tbuf[ j ] = real( v );\n\t\t\t\t\tbuf[ j+1 ] = imag( v );\n\t\t\t\t} else if ( isArrayLikeObject( v ) && v.length >= 2 ) {\n\t\t\t\t\tbuf[ j ] = v[ 0 ];\n\t\t\t\t\tbuf[ j+1 ] = v[ 1 ];\n\t\t\t\t} else {\n\t\t\t\t\tthrow new TypeError( format( 'invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', v ) );\n\t\t\t\t}\n\t\t\t\tj += 2; // stride\n\t\t\t}\n\t\t\treturn out;\n\t\t}\n\t\treturn new this( src );\n\t}\n\tif ( isCollection( src ) ) {\n\t\tif ( clbk ) {\n\t\t\t// Note: array contents affect how we iterate over a provided data source. If only complex number objects, we can extract real and imaginary components. Otherwise, for non-complex number arrays (e.g., `Float64Array`, etc), we assume a strided array where real and imaginary components are interleaved. In the former case, we expect a callback to return real and imaginary components (possibly as a complex number). In the latter case, we expect a callback to return *either* a real or imaginary component.\n\n\t\t\tlen = src.length;\n\t\t\tif ( src.get && src.set ) {\n\t\t\t\tget = accessorGetter( 'default' );\n\t\t\t} else {\n\t\t\t\tget = getter( 'default' );\n\t\t\t}\n\t\t\t// Detect whether we've been provided an array which returns complex number objects...\n\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\tif ( !isComplexLike( get( src, i ) ) ) {\n\t\t\t\t\tflg = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// If an array does not contain only complex number objects, then we assume interleaved real and imaginary components...\n\t\t\tif ( flg ) {\n\t\t\t\tif ( !isEven( len ) ) {\n\t\t\t\t\tthrow new RangeError( format( 'invalid argument. First argument must have a length which is a multiple of two. Length: `%u`.', len ) );\n\t\t\t\t}\n\t\t\t\tout = new this( len/2 );\n\t\t\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\t\tbuf[ i ] = clbk.call( thisArg, get( src, i ), i );\n\t\t\t\t}\n\t\t\t\treturn out;\n\t\t\t}\n\t\t\t// If an array contains only complex number objects, then we need to extract real and imaginary components...\n\t\t\tout = new this( len );\n\t\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\t\tj = 0;\n\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\tv = clbk.call( thisArg, get( src, i ), i );\n\t\t\t\tif ( isComplexLike( v ) ) {\n\t\t\t\t\tbuf[ j ] = real( v );\n\t\t\t\t\tbuf[ j+1 ] = imag( v );\n\t\t\t\t} else if ( isArrayLikeObject( v ) && v.length >= 2 ) {\n\t\t\t\t\tbuf[ j ] = v[ 0 ];\n\t\t\t\t\tbuf[ j+1 ] = v[ 1 ];\n\t\t\t\t} else {\n\t\t\t\t\tthrow new TypeError( format( 'invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', v ) );\n\t\t\t\t}\n\t\t\t\tj += 2; // stride\n\t\t\t}\n\t\t\treturn out;\n\t\t}\n\t\treturn new this( src );\n\t}\n\tif ( isObject( src ) && HAS_ITERATOR_SYMBOL && isFunction( src[ ITERATOR_SYMBOL ] ) ) { // eslint-disable-line max-len\n\t\tbuf = src[ ITERATOR_SYMBOL ]();\n\t\tif ( !isFunction( buf.next ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.', src ) );\n\t\t}\n\t\tif ( clbk ) {\n\t\t\ttmp = fromIteratorMap( buf, clbk, thisArg );\n\t\t} else {\n\t\t\ttmp = fromIterator( buf );\n\t\t}\n\t\tif ( tmp instanceof Error ) {\n\t\t\tthrow tmp;\n\t\t}\n\t\tlen = tmp.length / 2;\n\t\tout = new this( len );\n\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\tbuf[ i ] = tmp[ i ];\n\t\t}\n\t\treturn out;\n\t}\n\tthrow new TypeError( format( 'invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.', src ) );\n});\n\n/**\n* Creates a new 128-bit complex number array from a variable number of arguments.\n*\n* @name of\n* @memberof Complex128Array\n* @type {Function}\n* @param {...*} element - array elements\n* @throws {TypeError} `this` context must be a constructor\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Complex128Array} 128-bit complex number array\n*\n* @example\n* var arr = Complex128Array.of( 1.0, 1.0, 1.0, 1.0 );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*/\nsetReadOnly( Complex128Array, 'of', function of() {\n\tvar args;\n\tvar i;\n\tif ( !isFunction( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` context must be a constructor.' );\n\t}\n\tif ( !isComplexArrayConstructor( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\targs = [];\n\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\targs.push( arguments[ i ] );\n\t}\n\treturn new this( args );\n});\n\n/**\n* Returns an array element with support for both nonnegative and negative integer indices.\n*\n* @name at\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {integer} idx - element index\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} must provide an integer\n* @returns {(Complex128|void)} array element\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* var arr = new Complex128Array( 10 );\n*\n* var z = arr.at( 0 );\n* // returns \n*\n* var re = real( z );\n* // returns 0.0\n*\n* var im = imag( z );\n* // returns 0.0\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 9.0, -9.0 ], 9 );\n*\n* z = arr.at( 0 );\n* // returns \n*\n* re = real( z );\n* // returns 1.0\n*\n* im = imag( z );\n* // returns -1.0\n*\n* z = arr.at( -1 );\n* // returns \n*\n* re = real( z );\n* // returns 9.0\n*\n* im = imag( z );\n* // returns -9.0\n*\n* z = arr.at( 100 );\n* // returns undefined\n*\n* z = arr.at( -100 );\n* // returns undefined\n*/\nsetReadOnly( Complex128Array.prototype, 'at', function at( idx ) {\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isInteger( idx ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Must provide an integer. Value: `%s`.', idx ) );\n\t}\n\tif ( idx < 0 ) {\n\t\tidx += this._length;\n\t}\n\tif ( idx < 0 || idx >= this._length ) {\n\t\treturn;\n\t}\n\treturn getComplex128( this._buffer, idx );\n});\n\n/**\n* Pointer to the underlying data buffer.\n*\n* @name buffer\n* @memberof Complex128Array.prototype\n* @readonly\n* @type {ArrayBuffer}\n*\n* @example\n* var arr = new Complex128Array( 10 );\n*\n* var buf = arr.buffer;\n* // returns \n*/\nsetReadOnlyAccessor( Complex128Array.prototype, 'buffer', function get() {\n\treturn this._buffer.buffer;\n});\n\n/**\n* Size (in bytes) of the array.\n*\n* @name byteLength\n* @memberof Complex128Array.prototype\n* @readonly\n* @type {NonNegativeInteger}\n*\n* @example\n* var arr = new Complex128Array( 10 );\n*\n* var byteLength = arr.byteLength;\n* // returns 160\n*/\nsetReadOnlyAccessor( Complex128Array.prototype, 'byteLength', function get() {\n\treturn this._buffer.byteLength;\n});\n\n/**\n* Offset (in bytes) of the array from the start of its underlying `ArrayBuffer`.\n*\n* @name byteOffset\n* @memberof Complex128Array.prototype\n* @readonly\n* @type {NonNegativeInteger}\n*\n* @example\n* var arr = new Complex128Array( 10 );\n*\n* var byteOffset = arr.byteOffset;\n* // returns 0\n*/\nsetReadOnlyAccessor( Complex128Array.prototype, 'byteOffset', function get() {\n\treturn this._buffer.byteOffset;\n});\n\n/**\n* Size (in bytes) of each array element.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex128Array.prototype\n* @readonly\n* @type {PositiveInteger}\n* @default 16\n*\n* @example\n* var arr = new Complex128Array( 10 );\n*\n* var nbytes = arr.BYTES_PER_ELEMENT;\n* // returns 16\n*/\nsetReadOnly( Complex128Array.prototype, 'BYTES_PER_ELEMENT', Complex128Array.BYTES_PER_ELEMENT );\n\n/**\n* Copies a sequence of elements within the array to the position starting at `target`.\n*\n* @name copyWithin\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {integer} target - index at which to start copying elements\n* @param {integer} start - source index at which to copy elements from\n* @param {integer} [end] - source index at which to stop copying elements from\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Complex128Array} modified array\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* var arr = new Complex128Array( 4 );\n*\n* // Set the array elements:\n* arr.set( new Complex128( 1.0, 1.0 ), 0 );\n* arr.set( new Complex128( 2.0, 2.0 ), 1 );\n* arr.set( new Complex128( 3.0, 3.0 ), 2 );\n* arr.set( new Complex128( 4.0, 4.0 ), 3 );\n*\n* // Copy the first two elements to the last two elements:\n* arr.copyWithin( 2, 0, 2 );\n*\n* // Get the last array element:\n* var z = arr.get( 3 );\n*\n* var re = real( z );\n* // returns 2.0\n*\n* var im = imag( z );\n* // returns 2.0\n*/\nsetReadOnly( Complex128Array.prototype, 'copyWithin', function copyWithin( target, start ) {\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\t// FIXME: prefer a functional `copyWithin` implementation which addresses lack of universal browser support (e.g., IE11 and Safari) or ensure that typed arrays are polyfilled\n\tif ( arguments.length === 2 ) {\n\t\tthis._buffer.copyWithin( target*2, start*2 );\n\t} else {\n\t\tthis._buffer.copyWithin( target*2, start*2, arguments[2]*2 );\n\t}\n\treturn this;\n});\n\n/**\n* Returns an iterator for iterating over array key-value pairs.\n*\n* @name entries\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Iterator} iterator\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n*\n* var arr = [\n* new Complex128( 1.0, 1.0 ),\n* new Complex128( 2.0, 2.0 ),\n* new Complex128( 3.0, 3.0 )\n* ];\n* arr = new Complex128Array( arr );\n*\n* // Create an iterator:\n* var it = arr.entries();\n*\n* // Iterate over the key-value pairs...\n* var v = it.next().value;\n* // returns [ 0, ]\n*\n* v = it.next().value;\n* // returns [ 1, ]\n*\n* v = it.next().value;\n* // returns [ 2, ]\n*\n* var bool = it.next().done;\n* // returns true\n*/\nsetReadOnly( Complex128Array.prototype, 'entries', function entries() {\n\tvar buffer;\n\tvar self;\n\tvar iter;\n\tvar len;\n\tvar FLG;\n\tvar i;\n\tvar j;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tself = this;\n\tbuffer = this._buffer;\n\tlen = this._length;\n\n\t// Initialize the iteration indices:\n\ti = -1;\n\tj = -2;\n\n\t// Create an iterator protocol-compliant object:\n\titer = {};\n\tsetReadOnly( iter, 'next', next );\n\tsetReadOnly( iter, 'return', end );\n\n\tif ( ITERATOR_SYMBOL ) {\n\t\tsetReadOnly( iter, ITERATOR_SYMBOL, factory );\n\t}\n\treturn iter;\n\n\t/**\n\t* Returns an iterator protocol-compliant object containing the next iterated value.\n\t*\n\t* @private\n\t* @returns {Object} iterator protocol-compliant object\n\t*/\n\tfunction next() {\n\t\tvar z;\n\t\ti += 1;\n\t\tif ( FLG || i >= len ) {\n\t\t\treturn {\n\t\t\t\t'done': true\n\t\t\t};\n\t\t}\n\t\tj += 2;\n\t\tz = new Complex128( buffer[ j ], buffer[ j+1 ] );\n\t\treturn {\n\t\t\t'value': [ i, z ],\n\t\t\t'done': false\n\t\t};\n\t}\n\n\t/**\n\t* Finishes an iterator.\n\t*\n\t* @private\n\t* @param {*} [value] - value to return\n\t* @returns {Object} iterator protocol-compliant object\n\t*/\n\tfunction end( value ) {\n\t\tFLG = true;\n\t\tif ( arguments.length ) {\n\t\t\treturn {\n\t\t\t\t'value': value,\n\t\t\t\t'done': true\n\t\t\t};\n\t\t}\n\t\treturn {\n\t\t\t'done': true\n\t\t};\n\t}\n\n\t/**\n\t* Returns a new iterator.\n\t*\n\t* @private\n\t* @returns {Iterator} iterator\n\t*/\n\tfunction factory() {\n\t\treturn self.entries();\n\t}\n});\n\n/**\n* Tests whether all elements in an array pass a test implemented by a predicate function.\n*\n* @name every\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {boolean} boolean indicating whether all elements pass a test\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* function predicate( v ) {\n* return ( real( v ) === imag( v ) );\n* }\n*\n* var arr = new Complex128Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var bool = arr.every( predicate );\n* // returns true\n*/\nsetReadOnly( Complex128Array.prototype, 'every', function every( predicate, thisArg ) {\n\tvar buf;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tif ( !predicate.call( thisArg, getComplex128( buf, i ), i, this ) ) {\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn true;\n});\n\n/**\n* Returns a modified typed array filled with a fill value.\n*\n* @name fill\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {ComplexLike} value - fill value\n* @param {integer} [start=0] - starting index (inclusive)\n* @param {integer} [end] - ending index (exclusive)\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a complex number\n* @throws {TypeError} second argument must be an integer\n* @throws {TypeError} third argument must be an integer\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* var arr = new Complex128Array( 3 );\n*\n* arr.fill( new Complex128( 1.0, 1.0 ), 1 );\n*\n* var z = arr.get( 1 );\n* // returns \n*\n* var re = real( z );\n* // returns 1.0\n*\n* var im = imag( z );\n* // returns 1.0\n*\n* z = arr.get( 1 );\n* // returns \n*\n* re = real( z );\n* // returns 1.0\n*\n* im = imag( z );\n* // returns 1.0\n*/\nsetReadOnly( Complex128Array.prototype, 'fill', function fill( value, start, end ) {\n\tvar buf;\n\tvar len;\n\tvar idx;\n\tvar re;\n\tvar im;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isComplexLike( value ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a complex number. Value: `%s`.', value ) );\n\t}\n\tbuf = this._buffer;\n\tlen = this._length;\n\tif ( arguments.length > 1 ) {\n\t\tif ( !isInteger( start ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be an integer. Value: `%s`.', start ) );\n\t\t}\n\t\tif ( start < 0 ) {\n\t\t\tstart += len;\n\t\t\tif ( start < 0 ) {\n\t\t\t\tstart = 0;\n\t\t\t}\n\t\t}\n\t\tif ( arguments.length > 2 ) {\n\t\t\tif ( !isInteger( end ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Third argument must be an integer. Value: `%s`.', end ) );\n\t\t\t}\n\t\t\tif ( end < 0 ) {\n\t\t\t\tend += len;\n\t\t\t\tif ( end < 0 ) {\n\t\t\t\t\tend = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( end > len ) {\n\t\t\t\tend = len;\n\t\t\t}\n\t\t} else {\n\t\t\tend = len;\n\t\t}\n\t} else {\n\t\tstart = 0;\n\t\tend = len;\n\t}\n\tre = real( value );\n\tim = imag( value );\n\tfor ( i = start; i < end; i++ ) {\n\t\tidx = 2*i;\n\t\tbuf[ idx ] = re;\n\t\tbuf[ idx+1 ] = im;\n\t}\n\treturn this;\n});\n\n/**\n* Returns a new array containing the elements of an array which pass a test implemented by a predicate function.\n*\n* @name filter\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {Complex128Array} complex number array\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* function predicate( v ) {\n* return ( real( v ) === imag( v ) );\n* }\n*\n* var arr = new Complex128Array( 3 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n*\n* var out = arr.filter( predicate );\n* // returns \n*\n* var len = out.length;\n* // returns 1\n*\n* var z = out.get( 0 );\n* // returns \n*\n* var re = real( z );\n* // returns 2.0\n*\n* var im = imag( z );\n* // returns 2.0\n*/\nsetReadOnly( Complex128Array.prototype, 'filter', function filter( predicate, thisArg ) {\n\tvar buf;\n\tvar out;\n\tvar i;\n\tvar z;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tout = [];\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tz = getComplex128( buf, i );\n\t\tif ( predicate.call( thisArg, z, i, this ) ) {\n\t\t\tout.push( z );\n\t\t}\n\t}\n\treturn new this.constructor( out );\n});\n\n/**\n* Returns the first element in an array for which a predicate function returns a truthy value.\n*\n* @name find\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {(Complex128|void)} array element or undefined\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* function predicate( v ) {\n* return ( real( v ) === imag( v ) );\n* }\n*\n* var arr = new Complex128Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var z = arr.find( predicate );\n* // returns \n*\n* var re = real( z );\n* // returns 1.0\n*\n* var im = imag( z );\n* // returns 1.0\n*/\nsetReadOnly( Complex128Array.prototype, 'find', function find( predicate, thisArg ) {\n\tvar buf;\n\tvar i;\n\tvar z;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tz = getComplex128( buf, i );\n\t\tif ( predicate.call( thisArg, z, i, this ) ) {\n\t\t\treturn z;\n\t\t}\n\t}\n});\n\n/**\n* Returns the index of the first element in an array for which a predicate function returns a truthy value.\n*\n* @name findIndex\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {integer} index or -1\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* function predicate( v ) {\n* return ( real( v ) === imag( v ) );\n* }\n*\n* var arr = new Complex128Array( 3 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var idx = arr.findIndex( predicate );\n* // returns 2\n*/\nsetReadOnly( Complex128Array.prototype, 'findIndex', function findIndex( predicate, thisArg ) {\n\tvar buf;\n\tvar i;\n\tvar z;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tz = getComplex128( buf, i );\n\t\tif ( predicate.call( thisArg, z, i, this ) ) {\n\t\t\treturn i;\n\t\t}\n\t}\n\treturn -1;\n});\n\n/**\n* Returns the last element in an array for which a predicate function returns a truthy value.\n*\n* @name findLast\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {(Complex128|void)} array element or undefined\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* function predicate( v ) {\n* return ( real( v ) === imag( v ) );\n* }\n*\n* var arr = new Complex128Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var z = arr.findLast( predicate );\n* // returns \n*\n* var re = real( z );\n* // returns 3.0\n*\n* var im = imag( z );\n* // returns 3.0\n*/\nsetReadOnly( Complex128Array.prototype, 'findLast', function findLast( predicate, thisArg ) {\n\tvar buf;\n\tvar i;\n\tvar z;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = this._length-1; i >= 0; i-- ) {\n\t\tz = getComplex128( buf, i );\n\t\tif ( predicate.call( thisArg, z, i, this ) ) {\n\t\t\treturn z;\n\t\t}\n\t}\n});\n\n/**\n* Returns the index of the last element in an array for which a predicate function returns a truthy value.\n*\n* @name findLastIndex\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {integer} index or -1\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* function predicate( v ) {\n* return ( real( v ) === imag( v ) );\n* }\n*\n* var arr = new Complex128Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n*\n* var idx = arr.findLastIndex( predicate );\n* // returns 1\n*/\nsetReadOnly( Complex128Array.prototype, 'findLastIndex', function findLastIndex( predicate, thisArg ) {\n\tvar buf;\n\tvar i;\n\tvar z;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = this._length-1; i >= 0; i-- ) {\n\t\tz = getComplex128( buf, i );\n\t\tif ( predicate.call( thisArg, z, i, this ) ) {\n\t\t\treturn i;\n\t\t}\n\t}\n\treturn -1;\n});\n\n/**\n* Invokes a function once for each array element.\n*\n* @name forEach\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {Function} fcn - function to invoke\n* @param {*} [thisArg] - function invocation context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n*\n* function log( v, i ) {\n* console.log( '%s: %s', i, v.toString() );\n* }\n*\n* var arr = new Complex128Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* arr.forEach( log );\n*/\nsetReadOnly( Complex128Array.prototype, 'forEach', function forEach( fcn, thisArg ) {\n\tvar buf;\n\tvar i;\n\tvar z;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( fcn ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', fcn ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tz = getComplex128( buf, i );\n\t\tfcn.call( thisArg, z, i, this );\n\t}\n});\n\n/**\n* Returns an array element.\n*\n* @name get\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {NonNegativeInteger} idx - element index\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} must provide a nonnegative integer\n* @returns {(Complex128|void)} array element\n*\n* @example\n* var arr = new Complex128Array( 10 );\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* var z = arr.get( 0 );\n* // returns \n*\n* var re = real( z );\n* // returns 0.0\n*\n* var im = imag( z );\n* // returns 0.0\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n*\n* z = arr.get( 0 );\n* // returns \n*\n* re = real( z );\n* // returns 1.0\n*\n* im = imag( z );\n* // returns -1.0\n*\n* z = arr.get( 100 );\n* // returns undefined\n*/\nsetReadOnly( Complex128Array.prototype, 'get', function get( idx ) {\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isNonNegativeInteger( idx ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Must provide a nonnegative integer. Value: `%s`.', idx ) );\n\t}\n\tif ( idx >= this._length ) {\n\t\treturn;\n\t}\n\treturn getComplex128( this._buffer, idx );\n});\n\n/**\n* Number of array elements.\n*\n* @name length\n* @memberof Complex128Array.prototype\n* @readonly\n* @type {NonNegativeInteger}\n*\n* @example\n* var arr = new Complex128Array( 10 );\n*\n* var len = arr.length;\n* // returns 10\n*/\nsetReadOnlyAccessor( Complex128Array.prototype, 'length', function get() {\n\treturn this._length;\n});\n\n/**\n* Returns a boolean indicating whether an array includes a provided value.\n*\n* @name includes\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {ComplexLike} searchElement - search element\n* @param {integer} [fromIndex=0] - starting index (inclusive)\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a complex number\n* @throws {TypeError} second argument must be an integer\n* @returns {boolean} boolean indicating whether an array includes a provided value\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n*\n* var arr = new Complex128Array( 5 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n* arr.set( [ 4.0, -4.0 ], 3 );\n* arr.set( [ 5.0, -5.0 ], 4 );\n*\n* var bool = arr.includes( new Complex128( 3.0, -3.0 ) );\n* // returns true\n*\n* bool = arr.includes( new Complex128( 3.0, -3.0 ), 3 );\n* // returns false\n*\n* bool = arr.includes( new Complex128( 4.0, -4.0 ), -3 );\n* // returns true\n*/\nsetReadOnly( Complex128Array.prototype, 'includes', function includes( searchElement, fromIndex ) {\n\tvar buf;\n\tvar idx;\n\tvar re;\n\tvar im;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isComplexLike( searchElement ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a complex number. Value: `%s`.', searchElement ) );\n\t}\n\tif ( arguments.length > 1 ) {\n\t\tif ( !isInteger( fromIndex ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be an integer. Value: `%s`.', fromIndex ) );\n\t\t}\n\t\tif ( fromIndex < 0 ) {\n\t\t\tfromIndex += this._length;\n\t\t\tif ( fromIndex < 0 ) {\n\t\t\t\tfromIndex = 0;\n\t\t\t}\n\t\t}\n\t} else {\n\t\tfromIndex = 0;\n\t}\n\tre = real( searchElement );\n\tim = imag( searchElement );\n\tbuf = this._buffer;\n\tfor ( i = fromIndex; i < this._length; i++ ) {\n\t\tidx = 2 * i;\n\t\tif ( re === buf[ idx ] && im === buf[ idx+1 ] ) {\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n});\n\n/**\n* Returns the first index at which a given element can be found.\n*\n* @name indexOf\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {ComplexLike} searchElement - element to find\n* @param {integer} [fromIndex=0] - starting index (inclusive)\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a complex number\n* @throws {TypeError} second argument must be an integer\n* @returns {integer} index or -1\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n*\n* var arr = new Complex128Array( 5 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n* arr.set( [ 4.0, -4.0 ], 3 );\n* arr.set( [ 5.0, -5.0 ], 4 );\n*\n* var idx = arr.indexOf( new Complex128( 3.0, -3.0 ) );\n* // returns 2\n*\n* idx = arr.indexOf( new Complex128( 3.0, -3.0 ), 3 );\n* // returns -1\n*\n* idx = arr.indexOf( new Complex128( 4.0, -4.0 ), -3 );\n* // returns 3\n*/\nsetReadOnly( Complex128Array.prototype, 'indexOf', function indexOf( searchElement, fromIndex ) {\n\tvar buf;\n\tvar idx;\n\tvar re;\n\tvar im;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isComplexLike( searchElement ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a complex number. Value: `%s`.', searchElement ) );\n\t}\n\tif ( arguments.length > 1 ) {\n\t\tif ( !isInteger( fromIndex ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be an integer. Value: `%s`.', fromIndex ) );\n\t\t}\n\t\tif ( fromIndex < 0 ) {\n\t\t\tfromIndex += this._length;\n\t\t\tif ( fromIndex < 0 ) {\n\t\t\t\tfromIndex = 0;\n\t\t\t}\n\t\t}\n\t} else {\n\t\tfromIndex = 0;\n\t}\n\tre = real( searchElement );\n\tim = imag( searchElement );\n\tbuf = this._buffer;\n\tfor ( i = fromIndex; i < this._length; i++ ) {\n\t\tidx = 2 * i;\n\t\tif ( re === buf[ idx ] && im === buf[ idx+1 ] ) {\n\t\t\treturn i;\n\t\t}\n\t}\n\treturn -1;\n});\n\n/**\n* Returns a new string by concatenating all array elements.\n*\n* @name join\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {string} [separator=','] - element separator\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a string\n* @returns {string} string representation\n*\n* @example\n* var arr = new Complex128Array( 2 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n*\n* var str = arr.join();\n* // returns '1 + 1i,2 + 2i'\n*\n* str = arr.join( '/' );\n* // returns '1 + 1i/2 + 2i'\n*/\nsetReadOnly( Complex128Array.prototype, 'join', function join( separator ) {\n\tvar out;\n\tvar buf;\n\tvar sep;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( arguments.length === 0 ) {\n\t\tsep = ',';\n\t} else if ( isString( separator ) ) {\n\t\tsep = separator;\n\t} else {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a string. Value: `%s`.', separator ) );\n\t}\n\tout = [];\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tout.push( getComplex128( buf, i ).toString() );\n\t}\n\treturn out.join( sep );\n});\n\n/**\n* Returns the last index at which a given element can be found.\n*\n* @name lastIndexOf\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {ComplexLike} searchElement - element to find\n* @param {integer} [fromIndex] - index at which to start searching backward (inclusive)\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a complex number\n* @throws {TypeError} second argument must be an integer\n* @returns {integer} index or -1\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n*\n* var arr = new Complex128Array( 5 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n* arr.set( [ 4.0, -4.0 ], 3 );\n* arr.set( [ 3.0, -3.0 ], 4 );\n*\n* var idx = arr.lastIndexOf( new Complex128( 3.0, -3.0 ) );\n* // returns 4\n*\n* idx = arr.lastIndexOf( new Complex128( 3.0, -3.0 ), 3 );\n* // returns 2\n*\n* idx = arr.lastIndexOf( new Complex128( 5.0, -5.0 ), 3 );\n* // returns -1\n*\n* idx = arr.lastIndexOf( new Complex128( 2.0, -2.0 ), -3 );\n* // returns 1\n*/\nsetReadOnly( Complex128Array.prototype, 'lastIndexOf', function lastIndexOf( searchElement, fromIndex ) {\n\tvar buf;\n\tvar idx;\n\tvar re;\n\tvar im;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isComplexLike( searchElement ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a complex number. Value: `%s`.', searchElement ) );\n\t}\n\tif ( arguments.length > 1 ) {\n\t\tif ( !isInteger( fromIndex ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be an integer. Value: `%s`.', fromIndex ) );\n\t\t}\n\t\tif ( fromIndex >= this._length ) {\n\t\t\tfromIndex = this._length - 1;\n\t\t} else if ( fromIndex < 0 ) {\n\t\t\tfromIndex += this._length;\n\t\t}\n\t} else {\n\t\tfromIndex = this._length - 1;\n\t}\n\tre = real( searchElement );\n\tim = imag( searchElement );\n\tbuf = this._buffer;\n\tfor ( i = fromIndex; i >= 0; i-- ) {\n\t\tidx = 2 * i;\n\t\tif ( re === buf[ idx ] && im === buf[ idx+1 ] ) {\n\t\t\treturn i;\n\t\t}\n\t}\n\treturn -1;\n});\n\n/**\n* Returns a new array with each element being the result of a provided callback function.\n*\n* @name map\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {Function} fcn - callback function\n* @param {*} [thisArg] - callback function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {Complex128Array} complex number array\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* function scale( v, i ) {\n* return new Complex128( 2.0*real( v ), 2.0*imag( v ) );\n* }\n*\n* var arr = new Complex128Array( 3 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n*\n* var out = arr.map( scale );\n* // returns \n*\n* var z = out.get( 0 );\n* // returns \n*\n* var re = real( z );\n* // returns 2.0\n*\n* var im = imag( z );\n* // returns -2.0\n*/\nsetReadOnly( Complex128Array.prototype, 'map', function map( fcn, thisArg ) {\n\tvar outbuf;\n\tvar buf;\n\tvar out;\n\tvar i;\n\tvar v;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( fcn ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', fcn ) );\n\t}\n\tbuf = this._buffer;\n\tout = new this.constructor( this._length );\n\toutbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tv = fcn.call( thisArg, getComplex128( buf, i ), i, this );\n\t\tif ( isComplexLike( v ) ) {\n\t\t\toutbuf[ 2*i ] = real( v );\n\t\t\toutbuf[ (2*i)+1 ] = imag( v );\n\t\t} else if ( isArrayLikeObject( v ) && v.length === 2 ) {\n\t\t\toutbuf[ 2*i ] = v[ 0 ];\n\t\t\toutbuf[ (2*i)+1 ] = v[ 1 ];\n\t\t} else {\n\t\t\tthrow new TypeError( format( 'invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', v ) );\n\t\t}\n\t}\n\treturn out;\n});\n\n/**\n* Applies a provided callback function to each element of the array, in order, passing in the return value from the calculation on the preceding element and returning the accumulated result upon completion.\n*\n* @name reduce\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {Function} reducer - callback function\n* @param {*} [initialValue] - initial value\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @throws {Error} if not provided an initial value, the array must have at least one element\n* @returns {*} accumulated result\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n* import cadd from '@stdlib/math-base-ops-cadd';\n*\n* var arr = new Complex128Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var z = arr.reduce( cadd );\n* // returns \n*\n* var re = real( z );\n* // returns 6.0\n*\n* var im = imag( z );\n* // returns 6.0\n*/\nsetReadOnly( Complex128Array.prototype, 'reduce', function reduce( reducer, initialValue ) {\n\tvar buf;\n\tvar acc;\n\tvar len;\n\tvar v;\n\tvar i;\n\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( reducer ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', reducer ) );\n\t}\n\tbuf = this._buffer;\n\tlen = this._length;\n\tif ( arguments.length > 1 ) {\n\t\tacc = initialValue;\n\t\ti = 0;\n\t} else {\n\t\tif ( len === 0 ) {\n\t\t\tthrow new Error( 'invalid operation. If not provided an initial value, an array must contain at least one element.' );\n\t\t}\n\t\tacc = getComplex128( buf, 0 );\n\t\ti = 1;\n\t}\n\tfor ( ; i < len; i++ ) {\n\t\tv = getComplex128( buf, i );\n\t\tacc = reducer( acc, v, i, this );\n\t}\n\treturn acc;\n});\n\n/**\n* Reverses an array in-place.\n*\n* @name reverse\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Complex128Array} reversed array\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* var arr = new Complex128Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var out = arr.reverse();\n* // returns \n*\n* var z = out.get( 0 );\n* // returns \n*\n* var re = real( z );\n* // returns 3.0\n*\n* var im = imag( z );\n* // returns 3.0\n*\n* z = out.get( 1 );\n* // returns \n*\n* re = real( z );\n* // returns 2.0\n*\n* im = imag( z );\n* // returns 2.0\n*\n* z = out.get( 2 );\n* // returns \n*\n* re = real( z );\n* // returns 1.0\n*\n* im = imag( z );\n* // returns 1.0\n*/\nsetReadOnly( Complex128Array.prototype, 'reverse', function reverse() {\n\tvar buf;\n\tvar tmp;\n\tvar len;\n\tvar N;\n\tvar i;\n\tvar j;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tlen = this._length;\n\tbuf = this._buffer;\n\tN = floor( len / 2 );\n\tfor ( i = 0; i < N; i++ ) {\n\t\tj = len - i - 1;\n\t\ttmp = buf[ (2*i) ];\n\t\tbuf[ (2*i) ] = buf[ (2*j) ];\n\t\tbuf[ (2*j) ] = tmp;\n\t\ttmp = buf[ (2*i)+1 ];\n\t\tbuf[ (2*i)+1 ] = buf[ (2*j)+1 ];\n\t\tbuf[ (2*j)+1 ] = tmp;\n\t}\n\treturn this;\n});\n\n/**\n* Sets an array element.\n*\n* ## Notes\n*\n* - When provided a typed array, real or complex, we must check whether the source array shares the same buffer as the target array and whether the underlying memory overlaps. In particular, we are concerned with the following scenario:\n*\n* ```text\n* buf: ---------------------\n* src: ---------------------\n* ```\n*\n* In the above, as we copy values from `src`, we will overwrite values in the `src` view, resulting in duplicated values copied into the end of `buf`, which is not intended. Hence, to avoid overwriting source values, we must **copy** source values to a temporary array.\n*\n* In the other overlapping scenario,\n*\n* ```text\n* buf: ---------------------\n* src: ---------------------\n* ```\n*\n* by the time we begin copying into the overlapping region, we are copying from the end of `src`, a non-overlapping region, which means we don't run the risk of copying copied values, rather than the original `src` values as intended.\n*\n* @name set\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {(Collection|Complex|ComplexArray)} value - value(s)\n* @param {NonNegativeInteger} [i=0] - element index at which to start writing values\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be either a complex number, an array-like object, or a complex number array\n* @throws {TypeError} index argument must be a nonnegative integer\n* @throws {RangeError} array-like objects must have a length which is a multiple of two\n* @throws {RangeError} index argument is out-of-bounds\n* @throws {RangeError} target array lacks sufficient storage to accommodate source values\n* @returns {void}\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* var arr = new Complex128Array( 10 );\n*\n* var z = arr.get( 0 );\n* // returns \n*\n* var re = real( z );\n* // returns 0.0\n*\n* var im = imag( z );\n* // returns 0.0\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n*\n* z = arr.get( 0 );\n* // returns \n*\n* re = real( z );\n* // returns 1.0\n*\n* im = imag( z );\n* // returns -1.0\n*/\nsetReadOnly( Complex128Array.prototype, 'set', function set( value ) {\n\t/* eslint-disable no-underscore-dangle */\n\tvar sbuf;\n\tvar idx;\n\tvar buf;\n\tvar tmp;\n\tvar flg;\n\tvar N;\n\tvar v;\n\tvar i;\n\tvar j;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tbuf = this._buffer;\n\tif ( arguments.length > 1 ) {\n\t\tidx = arguments[ 1 ];\n\t\tif ( !isNonNegativeInteger( idx ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Index argument must be a nonnegative integer. Value: `%s`.', idx ) );\n\t\t}\n\t} else {\n\t\tidx = 0;\n\t}\n\tif ( isComplexLike( value ) ) {\n\t\tif ( idx >= this._length ) {\n\t\t\tthrow new RangeError( format( 'invalid argument. Index argument is out-of-bounds. Value: `%u`.', idx ) );\n\t\t}\n\t\tidx *= 2;\n\t\tbuf[ idx ] = real( value );\n\t\tbuf[ idx+1 ] = imag( value );\n\t\treturn;\n\t}\n\tif ( isComplexArray( value ) ) {\n\t\tN = value._length;\n\t\tif ( idx+N > this._length ) {\n\t\t\tthrow new RangeError( 'invalid arguments. Target array lacks sufficient storage to accommodate source values.' );\n\t\t}\n\t\tsbuf = value._buffer;\n\n\t\t// Check for overlapping memory...\n\t\tj = buf.byteOffset + (idx*BYTES_PER_ELEMENT);\n\t\tif (\n\t\t\tsbuf.buffer === buf.buffer &&\n\t\t\t(\n\t\t\t\tsbuf.byteOffset < j &&\n\t\t\t\tsbuf.byteOffset+sbuf.byteLength > j\n\t\t\t)\n\t\t) {\n\t\t\t// We need to copy source values...\n\t\t\ttmp = new Float64Array( sbuf.length );\n\t\t\tfor ( i = 0; i < sbuf.length; i++ ) {\n\t\t\t\ttmp[ i ] = sbuf[ i ];\n\t\t\t}\n\t\t\tsbuf = tmp;\n\t\t}\n\t\tidx *= 2;\n\t\tj = 0;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\tbuf[ idx ] = sbuf[ j ];\n\t\t\tbuf[ idx+1 ] = sbuf[ j+1 ];\n\t\t\tidx += 2; // stride\n\t\t\tj += 2; // stride\n\t\t}\n\t\treturn;\n\t}\n\tif ( isCollection( value ) ) {\n\t\t// Detect whether we've been provided an array of complex numbers...\n\t\tN = value.length;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\tif ( !isComplexLike( value[ i ] ) ) {\n\t\t\t\tflg = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t// If an array does not contain only complex numbers, then we assume interleaved real and imaginary components...\n\t\tif ( flg ) {\n\t\t\tif ( !isEven( N ) ) {\n\t\t\t\tthrow new RangeError( format( 'invalid argument. Array-like object arguments must have a length which is a multiple of two. Length: `%u`.', N ) );\n\t\t\t}\n\t\t\tif ( idx+(N/2) > this._length ) {\n\t\t\t\tthrow new RangeError( 'invalid arguments. Target array lacks sufficient storage to accommodate source values.' );\n\t\t\t}\n\t\t\tsbuf = value;\n\n\t\t\t// Check for overlapping memory...\n\t\t\tj = buf.byteOffset + (idx*BYTES_PER_ELEMENT);\n\t\t\tif (\n\t\t\t\tsbuf.buffer === buf.buffer &&\n\t\t\t\t(\n\t\t\t\t\tsbuf.byteOffset < j &&\n\t\t\t\t\tsbuf.byteOffset+sbuf.byteLength > j\n\t\t\t\t)\n\t\t\t) {\n\t\t\t\t// We need to copy source values...\n\t\t\t\ttmp = new Float64Array( N );\n\t\t\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\t\t\ttmp[ i ] = sbuf[ i ];\n\t\t\t\t}\n\t\t\t\tsbuf = tmp;\n\t\t\t}\n\t\t\tidx *= 2;\n\t\t\tN /= 2;\n\t\t\tj = 0;\n\t\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\t\tbuf[ idx ] = sbuf[ j ];\n\t\t\t\tbuf[ idx+1 ] = sbuf[ j+1 ];\n\t\t\t\tidx += 2; // stride\n\t\t\t\tj += 2; // stride\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\t// If an array contains only complex numbers, then we need to extract real and imaginary components...\n\t\tif ( idx+N > this._length ) {\n\t\t\tthrow new RangeError( 'invalid arguments. Target array lacks sufficient storage to accommodate source values.' );\n\t\t}\n\t\tidx *= 2;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\tv = value[ i ];\n\t\t\tbuf[ idx ] = real( v );\n\t\t\tbuf[ idx+1 ] = imag( v );\n\t\t\tidx += 2; // stride\n\t\t}\n\t\treturn;\n\t}\n\tthrow new TypeError( format( 'invalid argument. First argument must be either a complex number, an array-like object, or a complex number array. Value: `%s`.', value ) );\n\n\t/* eslint-enable no-underscore-dangle */\n});\n\n/**\n* Copies a portion of a typed array to a new typed array.\n*\n* @name slice\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {integer} [start=0] - starting index (inclusive)\n* @param {integer} [end] - ending index (exclusive)\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be an integer\n* @throws {TypeError} second argument must be an integer\n* @returns {Complex128Array} complex number array\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* var arr = new Complex128Array( 5 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n* arr.set( [ 4.0, -4.0 ], 3 );\n* arr.set( [ 5.0, -5.0 ], 4 );\n*\n* var out = arr.slice();\n* // returns \n*\n* var len = out.length;\n* // returns 5\n*\n* var z = out.get( 0 );\n* // returns \n*\n* var re = real( z );\n* // returns 1.0\n*\n* var im = imag( z );\n* // returns -1.0\n*\n* z = out.get( len-1 );\n* // returns \n*\n* re = real( z );\n* // returns 5.0\n*\n* im = imag( z );\n* // returns -5.0\n*\n* out = arr.slice( 1, -2 );\n* // returns \n*\n* len = out.length;\n* // returns 2\n*\n* z = out.get( 0 );\n* // returns \n*\n* re = real( z );\n* // returns 2.0\n*\n* im = imag( z );\n* // returns -2.0\n*\n* z = out.get( len-1 );\n* // returns \n*\n* re = real( z );\n* // returns 3.0\n*\n* im = imag( z );\n* // returns -3.0\n*/\nsetReadOnly( Complex128Array.prototype, 'slice', function slice( start, end ) {\n\tvar outlen;\n\tvar outbuf;\n\tvar out;\n\tvar idx;\n\tvar buf;\n\tvar len;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tbuf = this._buffer;\n\tlen = this._length;\n\tif ( arguments.length === 0 ) {\n\t\tstart = 0;\n\t\tend = len;\n\t} else {\n\t\tif ( !isInteger( start ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. First argument must be an integer. Value: `%s`.', start ) );\n\t\t}\n\t\tif ( start < 0 ) {\n\t\t\tstart += len;\n\t\t\tif ( start < 0 ) {\n\t\t\t\tstart = 0;\n\t\t\t}\n\t\t}\n\t\tif ( arguments.length === 1 ) {\n\t\t\tend = len;\n\t\t} else {\n\t\t\tif ( !isInteger( end ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be an integer. Value: `%s`.', end ) );\n\t\t\t}\n\t\t\tif ( end < 0 ) {\n\t\t\t\tend += len;\n\t\t\t\tif ( end < 0 ) {\n\t\t\t\t\tend = 0;\n\t\t\t\t}\n\t\t\t} else if ( end > len ) {\n\t\t\t\tend = len;\n\t\t\t}\n\t\t}\n\t}\n\tif ( start < end ) {\n\t\toutlen = end - start;\n\t} else {\n\t\toutlen = 0;\n\t}\n\tout = new this.constructor( outlen );\n\toutbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\tfor ( i = 0; i < outlen; i++ ) {\n\t\tidx = 2*(i+start);\n\t\toutbuf[ 2*i ] = buf[ idx ];\n\t\toutbuf[ (2*i)+1 ] = buf[ idx+1 ];\n\t}\n\treturn out;\n});\n\n/**\n* Tests whether at least one element in an array passes a test implemented by a predicate function.\n*\n* @name some\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {boolean} boolean indicating whether at least one element passes a test\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* function predicate( v ) {\n* return ( real( v ) === imag( v ) );\n* }\n*\n* var arr = new Complex128Array( 3 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n*\n* var bool = arr.some( predicate );\n* // returns true\n*/\nsetReadOnly( Complex128Array.prototype, 'some', function some( predicate, thisArg ) {\n\tvar buf;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tif ( predicate.call( thisArg, getComplex128( buf, i ), i, this ) ) {\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n});\n\n/**\n* Creates a new typed array view over the same underlying `ArrayBuffer` and with the same underlying data type as the host array.\n*\n* @name subarray\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {integer} [begin=0] - starting index (inclusive)\n* @param {integer} [end] - ending index (exclusive)\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be an integer\n* @throws {TypeError} second argument must be an integer\n* @returns {Complex64Array} subarray\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* var arr = new Complex128Array( 5 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n* arr.set( [ 4.0, -4.0 ], 3 );\n* arr.set( [ 5.0, -5.0 ], 4 );\n*\n* var subarr = arr.subarray();\n* // returns \n*\n* var len = subarr.length;\n* // returns 5\n*\n* var z = subarr.get( 0 );\n* // returns \n*\n* var re = real( z );\n* // returns 1.0\n*\n* var im = imag( z );\n* // returns -1.0\n*\n* z = subarr.get( len-1 );\n* // returns \n*\n* re = real( z );\n* // returns 5.0\n*\n* im = imag( z );\n* // returns -5.0\n*\n* subarr = arr.subarray( 1, -2 );\n* // returns \n*\n* len = subarr.length;\n* // returns 2\n*\n* z = subarr.get( 0 );\n* // returns \n*\n* re = real( z );\n* // returns 2.0\n*\n* im = imag( z );\n* // returns -2.0\n*\n* z = subarr.get( len-1 );\n* // returns \n*\n* re = real( z );\n* // returns 3.0\n*\n* im = imag( z );\n* // returns -3.0\n*/\nsetReadOnly( Complex128Array.prototype, 'subarray', function subarray( begin, end ) {\n\tvar offset;\n\tvar buf;\n\tvar len;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tbuf = this._buffer;\n\tlen = this._length;\n\tif ( arguments.length === 0 ) {\n\t\tbegin = 0;\n\t\tend = len;\n\t} else {\n\t\tif ( !isInteger( begin ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. First argument must be an integer. Value: `%s`.', begin ) );\n\t\t}\n\t\tif ( begin < 0 ) {\n\t\t\tbegin += len;\n\t\t\tif ( begin < 0 ) {\n\t\t\t\tbegin = 0;\n\t\t\t}\n\t\t}\n\t\tif ( arguments.length === 1 ) {\n\t\t\tend = len;\n\t\t} else {\n\t\t\tif ( !isInteger( end ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be an integer. Value: `%s`.', end ) );\n\t\t\t}\n\t\t\tif ( end < 0 ) {\n\t\t\t\tend += len;\n\t\t\t\tif ( end < 0 ) {\n\t\t\t\t\tend = 0;\n\t\t\t\t}\n\t\t\t} else if ( end > len ) {\n\t\t\t\tend = len;\n\t\t\t}\n\t\t}\n\t}\n\tif ( begin >= len ) {\n\t\tlen = 0;\n\t\toffset = buf.byteLength;\n\t} else if ( begin >= end ) {\n\t\tlen = 0;\n\t\toffset = buf.byteOffset + ( begin*BYTES_PER_ELEMENT );\n\t} else {\n\t\tlen = end - begin;\n\t\toffset = buf.byteOffset + ( begin*BYTES_PER_ELEMENT );\n\t}\n\treturn new this.constructor( buf.buffer, offset, ( len < 0 ) ? 0 : len );\n});\n\n/**\n* Returns a new typed array containing the elements in reversed order.\n*\n* @name toReversed\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Complex128Array} reversed array\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* var arr = new Complex128Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var out = arr.toReversed();\n* // returns \n*\n* var z = out.get( 0 );\n* // returns \n*\n* var re = real( z );\n* // returns 3.0\n*\n* var im = imag( z );\n* // returns 3.0\n*\n* z = out.get( 1 );\n* // returns \n*\n* re = real( z );\n* // returns 2.0\n*\n* im = imag( z );\n* // returns 2.0\n*\n* z = out.get( 2 );\n* // returns \n*\n* re = real( z );\n* // returns 1.0\n*\n* im = imag( z );\n* // returns 1.0\n*/\nsetReadOnly( Complex128Array.prototype, 'toReversed', function toReversed() {\n\tvar outbuf;\n\tvar out;\n\tvar len;\n\tvar buf;\n\tvar i;\n\tvar j;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tlen = this._length;\n\tout = new this.constructor( len );\n\tbuf = this._buffer;\n\toutbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\tfor ( i = 0; i < len; i++ ) {\n\t\tj = len - i - 1;\n\t\toutbuf[ (2*i) ] = buf[ (2*j) ];\n\t\toutbuf[ (2*i)+1 ] = buf[ (2*j)+1 ];\n\t}\n\treturn out;\n});\n\n/**\n* Serializes an array as a string.\n*\n* @name toString\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @throws {TypeError} `this` must be a complex number array\n* @returns {string} string representation\n*\n* @example\n* var arr = new Complex128Array( 2 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n*\n* var str = arr.toString();\n* // returns '1 + 1i,2 + 2i'\n*/\nsetReadOnly( Complex128Array.prototype, 'toString', function toString() {\n\tvar out;\n\tvar buf;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tout = [];\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tout.push( getComplex128( buf, i ).toString() );\n\t}\n\treturn out.join( ',' );\n});\n\n/**\n* Returns a new typed array with the element at a provided index replaced with a provided value.\n*\n* @name with\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {integer} index - element index\n* @param {ComplexLike} value - new value\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be an integer\n* @throws {RangeError} index argument is out-of-bounds\n* @throws {TypeError} second argument must be a complex number\n* @returns {Complex128Array} new typed array\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n* import Complex128 from '@stdlib/complex-float64';\n*\n* var arr = new Complex128Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var out = arr.with( 0, new Complex128( 4.0, 4.0 ) );\n* // returns \n*\n* var z = out.get( 0 );\n* // returns \n*\n* var re = real( z );\n* // returns 4.0\n*\n* var im = imag( z );\n* // returns 4.0\n*/\nsetReadOnly( Complex128Array.prototype, 'with', function copyWith( index, value ) {\n\tvar buf;\n\tvar out;\n\tvar len;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isInteger( index ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be an integer. Value: `%s`.', index ) );\n\t}\n\tlen = this._length;\n\tif ( index < 0 ) {\n\t\tindex += len;\n\t}\n\tif ( index < 0 || index >= len ) {\n\t\tthrow new RangeError( format( 'invalid argument. Index argument is out-of-bounds. Value: `%s`.', index ) );\n\t}\n\tif ( !isComplexLike( value ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Second argument must be a complex number. Value: `%s`.', value ) );\n\t}\n\tout = new this.constructor( this._buffer );\n\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\tbuf[ 2*index ] = real( value );\n\tbuf[ (2*index)+1 ] = imag( value );\n\treturn out;\n});\n\n\n// EXPORTS //\n\nexport default Complex128Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport real from '@stdlib/complex-real';\nimport imag from '@stdlib/complex-imag';\n\n\n// MAIN //\n\n/**\n* Returns a strided array of real and imaginary components.\n*\n* @private\n* @param {Float64Array} buf - output array\n* @param {Array} arr - array containing complex numbers\n* @returns {(Float64Array|null)} output array or null\n*/\nfunction fromArray( buf, arr ) {\n\tvar len;\n\tvar v;\n\tvar i;\n\tvar j;\n\n\tlen = arr.length;\n\tj = 0;\n\tfor ( i = 0; i < len; i++ ) {\n\t\tv = arr[ i ];\n\t\tif ( !isComplexLike( v ) ) {\n\t\t\treturn null;\n\t\t}\n\t\tbuf[ j ] = real( v );\n\t\tbuf[ j+1 ] = imag( v );\n\t\tj += 2; // stride\n\t}\n\treturn buf;\n}\n\n\n// EXPORTS //\n\nexport default fromArray;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isArrayLikeObject from '@stdlib/assert-is-array-like-object';\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport format from '@stdlib/string-format';\nimport real from '@stdlib/complex-real';\nimport imag from '@stdlib/complex-imag';\n\n\n// MAIN //\n\n/**\n* Returns an array of iterated values.\n*\n* @private\n* @param {Object} it - iterator\n* @param {Function} clbk - callback to invoke for each iterated value\n* @param {*} thisArg - invocation context\n* @returns {(Array|TypeError)} array or an error\n*/\nfunction fromIteratorMap( it, clbk, thisArg ) {\n\tvar out;\n\tvar v;\n\tvar z;\n\tvar i;\n\n\tout = [];\n\ti = -1;\n\twhile ( true ) {\n\t\tv = it.next();\n\t\tif ( v.done ) {\n\t\t\tbreak;\n\t\t}\n\t\ti += 1;\n\t\tz = clbk.call( thisArg, v.value, i );\n\t\tif ( isArrayLikeObject( z ) && z.length >= 2 ) {\n\t\t\tout.push( z[ 0 ], z[ 1 ] );\n\t\t} else if ( isComplexLike( z ) ) {\n\t\t\tout.push( real( z ), imag( z ) );\n\t\t} else {\n\t\t\treturn new TypeError( format( 'invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', z ) );\n\t\t}\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default fromIteratorMap;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport Float64Array from '@stdlib/array-float64';\nimport Float32Array from '@stdlib/array-float32';\nimport Int16Array from '@stdlib/array-int16';\nimport Int32Array from '@stdlib/array-int32';\nimport Int8Array from '@stdlib/array-int8';\nimport Uint16Array from '@stdlib/array-uint16';\nimport Uint32Array from '@stdlib/array-uint32';\nimport Uint8Array from '@stdlib/array-uint8';\nimport Uint8ClampedArray from '@stdlib/array-uint8c';\nimport Complex64Array from '@stdlib/array-complex64';\nimport Complex128Array from '@stdlib/array-complex128';\n\n\n// MAIN //\n\n// Mapping from data types to constructors...\nvar ctors = {\n\t'float64': Float64Array,\n\t'float32': Float32Array,\n\t'generic': Array, // TODO: replace with `stdlib` pkg\n\t'int16': Int16Array,\n\t'int32': Int32Array,\n\t'int8': Int8Array,\n\t'uint16': Uint16Array,\n\t'uint32': Uint32Array,\n\t'uint8': Uint8Array,\n\t'uint8c': Uint8ClampedArray,\n\t'complex64': Complex64Array,\n\t'complex128': Complex128Array\n};\n\n\n// EXPORTS //\n\nexport default ctors;\n","/**\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// MAIN //\n\n/**\n* Returns default array settings.\n*\n* @returns {Object} defaults\n*\n* @example\n* var o = defaults();\n* // returns {...}\n*/\nfunction defaults() {\n\treturn {\n\t\t// Data types:\n\t\t'dtypes': {\n\t\t\t'default': 'float64',\n\t\t\t'numeric': 'float64',\n\t\t\t'real': 'float64',\n\t\t\t'floating_point': 'float64',\n\t\t\t'real_floating_point': 'float64',\n\t\t\t'complex_floating_point': 'complex128',\n\t\t\t'integer': 'int32',\n\t\t\t'signed_integer': 'int32',\n\t\t\t'unsigned_integer': 'uint32'\n\t\t}\n\t};\n}\n\n\n// EXPORTS //\n\nexport default defaults;\n","/**\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// MODULES //\n\nimport defaults from './main.js';\n\n\n// VARIABLES //\n\nvar DEFAULTS = defaults();\nvar HASH = {\n\t'dtypes.default': DEFAULTS.dtypes.default,\n\t'dtypes.numeric': DEFAULTS.dtypes.numeric,\n\t'dtypes.real': DEFAULTS.dtypes.real,\n\t'dtypes.floating_point': DEFAULTS.dtypes.floating_point,\n\t'dtypes.real_floating_point': DEFAULTS.dtypes.real_floating_point,\n\t'dtypes.complex_floating_point': DEFAULTS.dtypes.complex_floating_point,\n\t'dtypes.integer': DEFAULTS.dtypes.integer,\n\t'dtypes.signed_integer': DEFAULTS.dtypes.signed_integer,\n\t'dtypes.unsigned_integer': DEFAULTS.dtypes.unsigned_integer\n};\n\n\n// MAIN //\n\n/**\n* Returns a default array setting.\n*\n* @param {string} name - setting name\n* @returns {*} default setting or null\n*\n* @example\n* var v = get( 'dtypes.default' );\n* // returns \n*/\nfunction get( name ) {\n\tvar v = HASH[ name ];\n\treturn ( v === void 0 ) ? null : v;\n}\n\n\n// EXPORTS //\n\nexport default get;\n","/**\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* Return default array settings.\n*\n* @module @stdlib/array-defaults\n*\n* @example\n* import defaults from '@stdlib/array-defaults';\n*\n* var o = defaults();\n* // returns {...}\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport get from './get.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'get', get );\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isNonNegativeInteger } from '@stdlib/assert-is-nonnegative-integer';\nimport ctors from '@stdlib/array-ctors';\nimport gzeros from '@stdlib/array-base-zeros';\nimport defaults from '@stdlib/array-defaults';\nimport format from '@stdlib/string-format';\n\n\n// VARIABLES //\n\nvar DEFAULT_DTYPE = defaults.get( 'dtypes.default' );\n\n\n// MAIN //\n\n/**\n* Creates a zero-filled array having a specified length.\n*\n* @param {NonNegativeInteger} length - array length\n* @param {string} [dtype=\"float64\"] - data type\n* @throws {TypeError} first argument must be a nonnegative integer\n* @throws {TypeError} second argument must be a recognized data type\n* @returns {(TypedArray|Array|ComplexArray)} array or typed array\n*\n* @example\n* var arr = zeros( 2 );\n* // returns [ 0.0, 0.0 ]\n*\n* @example\n* var arr = zeros( 2, 'float32' );\n* // returns [ 0.0, 0.0 ]\n*/\nfunction zeros( length ) {\n\tvar dtype;\n\tvar ctor;\n\tif ( !isNonNegativeInteger( length ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a nonnegative integer. Value: `%s`.', length ) );\n\t}\n\tif ( arguments.length > 1 ) {\n\t\tdtype = arguments[ 1 ];\n\t} else {\n\t\tdtype = DEFAULT_DTYPE;\n\t}\n\tif ( dtype === 'generic' ) {\n\t\treturn gzeros( length );\n\t}\n\tctor = ctors( dtype );\n\tif ( ctor === null ) {\n\t\tthrow new TypeError( format( 'invalid argument. Second argument must be a recognized data type. Value: `%s`.', dtype ) );\n\t}\n\treturn new ctor( length ); // WARNING: we assume that, apart from 'generic', the constructors for supported array data types are zero-filled by default\n}\n\n\n// EXPORTS //\n\nexport default zeros;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Returns a filled \"generic\" array.\n*\n* @param {*} value - fill value\n* @param {NonNegativeInteger} len - array length\n* @returns {Array} filled array\n*\n* @example\n* var out = filled( 0.0, 3 );\n* // returns [ 0.0, 0.0, 0.0 ]\n*\n* @example\n* var out = filled( 'beep', 3 );\n* // returns [ 'beep', 'beep', 'beep' ]\n*/\nfunction filled( value, len ) {\n\tvar arr;\n\tvar i;\n\n\t// Manually push elements in order to ensure \"fast\" elements...\n\tarr = [];\n\tfor ( i = 0; i < len; i++ ) {\n\t\tarr.push( value );\n\t}\n\treturn arr;\n}\n\n\n// EXPORTS //\n\nexport default filled;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport filled from '@stdlib/array-base-filled';\n\n\n// MAIN //\n\n/**\n* Returns a zero-filled \"generic\" array.\n*\n* @param {NonNegativeInteger} len - array length\n* @returns {Array} output array\n*\n* @example\n* var out = zeros( 3 );\n* // returns [ 0.0, 0.0, 0.0 ]\n*/\nfunction zeros( len ) {\n\treturn filled( 0.0, len );\n}\n\n\n// EXPORTS //\n\nexport default zeros;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport table from './ctors.js';\n\n\n// MAIN //\n\n/**\n* Returns an array constructor.\n*\n* @param {string} dtype - data type\n* @returns {(Function|null)} constructor or null\n*\n* @example\n* var ctor = ctors( 'float64' );\n* // returns \n*\n* @example\n* var ctor = ctors( 'float' );\n* // returns null\n*/\nfunction ctors( dtype ) {\n\treturn table[ dtype ] || null;\n}\n\n\n// EXPORTS //\n\nexport default ctors;\n","/**\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// MODULES //\n\nimport zeros from '@stdlib/array-zeros';\n\n\n// MAIN //\n\n/**\n* Creates an uninitialized array having a specified length.\n*\n* @private\n* @param {NonNegativeInteger} length - array length\n* @param {string} [dtype=\"float64\"] - data type\n* @throws {TypeError} first argument must be a nonnegative integer\n* @throws {TypeError} second argument must be a recognized data type\n* @returns {(TypedArray|Array|ComplexArray)} array or typed array\n*\n* @example\n* var arr = empty( 2 );\n* // returns \n*\n* @example\n* var arr = empty( 2, 'float32' );\n* // returns \n*/\nfunction empty( length ) {\n\tif ( arguments.length > 1 ) {\n\t\treturn zeros( length, arguments[ 1 ] );\n\t}\n\treturn zeros( length );\n}\n\n\n// EXPORTS //\n\nexport default empty;\n"],"names":["main","Object","defineProperty","isNumber","value","zeros","n","i","out","zeroPad","str","width","right","negative","pad","length","startsWithMinus","substr","lowercase","String","prototype","toLowerCase","uppercase","toUpperCase","formatInteger","token","base","specifier","arg","parseInt","isFinite","Error","toString","precision","padRight","sign","alternate","call","charAt","abs","Math","replace","RE_EXP_POS_DIGITS","RE_EXP_NEG_DIGITS","RE_ONLY_DIGITS","RE_DIGITS_BEFORE_EXP","RE_TRAILING_PERIOD_ZERO","RE_PERIOD_ZERO_EXP","RE_ZERO_BEFORE_EXP","formatDouble","digits","f","parseFloat","toExponential","toFixed","toPrecision","spaces","fromCharCode","isnan","isNaN","isArray","Array","initialize","flags","mapping","formatInterpolate","tokens","hasPeriod","flag","num","pos","j","TypeError","padZeros","indexOf","arguments","maxWidth","substring","RE","parse","match","formatTokenize","content","prev","exec","slice","lastIndex","push","format","args","tokenize","interpolate","apply","objectProtoype","toStr","defineGetter","__defineGetter__","defineSetter","__defineSetter__","lookupGetter","__lookupGetter__","lookupSetter","__lookupSetter__","err","hasDefinePropertySupport","builtin","obj","prop","descriptor","hasValue","hasGet","hasSet","__proto__","get","set","defineProperty$1","setNonEnumerableReadOnly","configurable","enumerable","writable","FLG","Symbol","hasToStringTagSupport","toStringTag","has","hasOwnProperty","hasOwnProp","property","Sym","toStrTag","nativeClass","hasToStringTag","v","isOwn","tag","main$b","Number","test","isPrimitive","isObject","setReadOnly","FLOAT64_PINF","POSITIVE_INFINITY","FLOAT64_NINF","NEGATIVE_INFINITY","floor","isInteger","x","PINF","NINF","isInt","valueOf","isNonNegativeInteger","hasFloat64Array","Float64Array","ctor","Float64Array$1","bool","arr","GlobalFloat64Array","NaN","hasFloat64ArraySupport","hasFloat32Array","Float32Array","Float32Array$1","GlobalFloat32Array","hasFloat32ArraySupport","hasInt16Array","Int16Array","Int16Array$1","GlobalInt16Array","INT16_MAX","hasInt16ArraySupport","hasInt32Array","Int32Array","Int32Array$1","GlobalInt32Array","INT32_MAX","hasInt32ArraySupport","hasInt8Array","Int8Array","Int8Array$1","GlobalInt8Array","INT8_MAX","hasInt8ArraySupport","hasUint16Array","Uint16Array","Uint16Array$1","GlobalUint16Array","UINT16_MAX","hasUint16ArraySupport","hasUint32Array","Uint32Array","Uint32Array$1","GlobalUint32Array","UINT32_MAX","hasUint32ArraySupport","hasUint8Array","Uint8Array","Uint8Array$1","GlobalUint8Array","UINT8_MAX","hasUint8ArraySupport","hasUint8ClampedArray","Uint8ClampedArray","Uint8ClampedArray$1","GlobalUint8ClampedArray","hasUint8ClampedArraySupport","MAX_ARRAY_LENGTH","isArrayLikeObject","MAX_LENGTH","MAX_TYPED_ARRAY_LENGTH","isCollection","hasArrayBuffer","ArrayBuffer","isArrayBuffer","main$1","isString","isBoolean","Bool","Boolean","self","window","global","globalThis","root","codegen","Function","GlobalThis","Self","Win","Global","getGlobal","nodeList","document","childNodes","typedarray","reFunctionName","RE_FUNCTION_NAME","isObjectLike","constructorName","name","constructor","_isBuffer","isBuffer","REGEXP","predicate","len","arrayfun","ctorName","type","isFunction","typeOf","Complex128","real","imag","this","re","im","fround","FLOAT32_VIEW","float64ToFloat32$1","Complex64","float64ToFloat32","isComplexLike","isEven","BYTES_PER_ELEMENT","isComplex64Array","isComplex128Array","hasIteratorSymbolSupport","iterator","IteratorSymbol","setNonEnumerableReadOnlyAccessor","getter","realf","z","imagf","reinterpret","offset","buffer","byteOffset","GETTERS","float64","idx","float32","int32","int16","int8","uint32","uint16","uint8","uint8c","generic","default","dtype","complex128","complex64","fromIterator","it","next","done","HAS_ITERATOR_SYMBOL","isComplexArray","Complex64Array","_length","_buffer","isComplexArrayConstructor","getComplex64","buf","nargs","fromArray","RangeError","reinterpret64","reinterpret128","byteLength","ITERATOR_SYMBOL","src","thisArg","clbk","tmp","flg","accessorGetter","fromIteratorMap","setReadOnlyAccessor","target","start","copyWithin","iter","entries","end","fcn","searchElement","fromIndex","separator","sep","join","outbuf","reducer","initialValue","acc","N","sbuf","outlen","begin","index","Complex128Array","getComplex128","ctors","defaults","dtypes","numeric","floating_point","real_floating_point","complex_floating_point","integer","signed_integer","unsigned_integer","DEFAULTS","HASH","DEFAULT_DTYPE","filled","table","empty"],"mappings":";;AAsBA,IAAIA,EAA0C,mBAA1BC,OAAOC,eAAkCD,OAAOC,eAAiB,KCiCrF,IAAIA,EAAiBD,OAAOC,eCjB5B,SAASC,EAAUC,GAClB,MAA0B,iBAAVA,CACjB,CCAA,SAASC,EAAOC,GACf,IACIC,EADAC,EAAM,GAEV,IAAMD,EAAI,EAAGA,EAAID,EAAGC,IACnBC,GAAO,IAER,OAAOA,CACR,CAcA,SAASC,EAASC,EAAKC,EAAOC,GAC7B,IAAIC,GAAW,EACXC,EAAMH,EAAQD,EAAIK,OACtB,OAAKD,EAAM,IAnCZ,SAA0BJ,GACzB,MAAoB,MAAbA,EAAK,EACb,CAoCMM,CAAiBN,KACrBG,GAAW,EACXH,EAAMA,EAAIO,OAAQ,IAEnBP,EAAM,EACLA,EAAML,EAAOS,GACbT,EAAOS,GAAQJ,EACXG,IACJH,EAAM,IAAMA,IAVLA,CAaT,CCpDA,IAAIQ,EAAYC,OAAOC,UAAUC,YAC7BC,EAAYH,OAAOC,UAAUG,YAajC,SAASC,EAAeC,GACvB,IAAIC,EACAlB,EACAD,EAEJ,OAASkB,EAAME,WACf,IAAK,IAEJD,EAAO,EACP,MACD,IAAK,IAEJA,EAAO,EACP,MACD,IAAK,IACL,IAAK,IAEJA,EAAO,GACP,MAID,QAECA,EAAO,GAKR,GAFAlB,EAAMiB,EAAMG,IACZrB,EAAIsB,SAAUrB,EAAK,KACbsB,SAAUvB,GAAM,CACrB,IAAMJ,EAAUK,GACf,MAAM,IAAIuB,MAAO,2BAA6BvB,GAE/CD,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ACjD,iBAAkBI,GAASR,OAAOK,QAClC,wBAAyBG,GAASR,OAAOM,eACzC,0BAA2BE,GAASR,OAAOO,kBCI5CxN,EAAA5I,GAAA,ODYA,SAAciP,GACb,IAAI7G,EAAIkO,GAAMrH,GACd,YAAe,IAAN7G,EAAiB,KAAOA,CAClC,IEzBA,IAAImO,GAAgBX,GAAS3O,IAAK,kBAsBlC,SAAS5G,GAAOU,GACf,IAAIuR,EACA3I,EACJ,IAAMH,GAAsBzI,GAC3B,MAAM,IAAIyD,UAAWgB,EAAQ,+EAAgFzE,IAO9G,GAAe,aAJduR,EADI3N,UAAU5D,OAAS,EACf4D,UAAW,GAEX4R,IAGR,OC5BF,SAAiBnW,EAAOmP,GACvB,IAAIzF,EACAvJ,EAIJ,IADAuJ,EAAM,GACAvJ,EAAI,EAAGA,EAAIgP,EAAKhP,IACrBuJ,EAAIvE,KAAMnF,GAEX,OAAO0J,CACR,CCTQ0M,CAAQ,EF2BCzV,GAGhB,GADA4I,EG1BD,SAAgB2I,GACf,OAAOmE,GAAOnE,IAAW,IAC1B,CHwBQqD,CAAOrD,GACA,OAAT3I,EACJ,MAAM,IAAInF,UAAWgB,EAAQ,iFAAkF8M,IAEhH,OAAO,IAAI3I,EAAM5I,EAClB,CI3BA,SAAS2V,GAAO3V,GACf,OAAK4D,UAAU5D,OAAS,EAChBV,GAAOU,EAAQ4D,UAAW,IAE3BtE,GAAOU,EACf","x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189]} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index ed5a549..0000000 --- a/stats.html +++ /dev/null @@ -1,4842 +0,0 @@ - - - - - - - - Rollup Visualizer - - - -
- - - - - From 66553c275d83bd56dc216fd15b1de272746ce0b2 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Mon, 1 Apr 2024 12:57:52 +0000 Subject: [PATCH 58/75] 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 | 36 +- SECURITY.md | 5 - benchmark/benchmark.js | 264 -- benchmark/benchmark.length.complex128.js | 93 - benchmark/benchmark.length.complex64.js | 93 - benchmark/benchmark.length.float32.js | 93 - benchmark/benchmark.length.float64.js | 93 - benchmark/benchmark.length.generic.js | 93 - benchmark/benchmark.length.int16.js | 93 - benchmark/benchmark.length.int32.js | 93 - benchmark/benchmark.length.int8.js | 93 - benchmark/benchmark.length.uint16.js | 93 - benchmark/benchmark.length.uint32.js | 93 - benchmark/benchmark.length.uint8.js | 93 - benchmark/benchmark.length.uint8c.js | 93 - branches.md | 56 - dist/index.d.ts | 3 - dist/index.js | 9 - dist/index.js.map | 7 - docs/repl.txt | 52 - docs/types/test.ts | 77 - examples/index.js | 33 - lib/index.js | 58 - lib/is_buffer_uint8array.js | 47 - lib/main.js | 107 - lib/polyfill.js | 56 - docs/types/index.d.ts => mod.d.ts | 2 +- mod.js | 4 + mod.js.map | 1 + package.json | 82 +- stats.html | 4842 +++++++++++++++++++++ test/dist/test.js | 33 - test/test.js | 60 - test/test.main.js | 274 -- test/test.polyfill.js | 324 -- 59 files changed, 4859 insertions(+), 5855 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 benchmark/benchmark.js delete mode 100644 benchmark/benchmark.length.complex128.js delete mode 100644 benchmark/benchmark.length.complex64.js delete mode 100644 benchmark/benchmark.length.float32.js delete mode 100644 benchmark/benchmark.length.float64.js delete mode 100644 benchmark/benchmark.length.generic.js delete mode 100644 benchmark/benchmark.length.int16.js delete mode 100644 benchmark/benchmark.length.int32.js delete mode 100644 benchmark/benchmark.length.int8.js delete mode 100644 benchmark/benchmark.length.uint16.js delete mode 100644 benchmark/benchmark.length.uint32.js delete mode 100644 benchmark/benchmark.length.uint8.js delete mode 100644 benchmark/benchmark.length.uint8c.js 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/repl.txt delete mode 100644 docs/types/test.ts delete mode 100644 examples/index.js delete mode 100644 lib/index.js delete mode 100644 lib/is_buffer_uint8array.js delete mode 100644 lib/main.js delete mode 100644 lib/polyfill.js rename docs/types/index.d.ts => mod.d.ts (96%) create mode 100644 mod.js create mode 100644 mod.js.map create mode 100644 stats.html delete mode 100644 test/dist/test.js delete mode 100644 test/test.js delete mode 100644 test/test.main.js delete mode 100644 test/test.polyfill.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 fe5624c..0000000 --- a/.github/.keepalive +++ /dev/null @@ -1 +0,0 @@ -2024-04-01T05:11:30.359Z diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index 96f81a8..0000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,7 +0,0 @@ - - -We are excited about your pull request, but unfortunately we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/empty) 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 ddb353e..0000000 --- a/.github/workflows/close_pull_requests.yml +++ /dev/null @@ -1,54 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: close_pull_requests - -# Workflow triggers: -on: - pull_request_target: - types: [opened] - -# Workflow jobs: -jobs: - - # Define job to close all pull requests: - run: - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Close pull request - - name: 'Close pull request' - # Pin action to full length commit SHA corresponding to v3.1.2 - uses: superbrothers/close-pull-request@9c18513d320d7b2c7185fb93396d0c664d5d8448 - with: - comment: | - Thank you for submitting a pull request. :raised_hands: - - We greatly appreciate your willingness to submit a contribution. However, we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). - - We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/empty) 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 8376c30..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: '49 1 * * 5' - - # 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 + + + + 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 8e62cb8..0000000 --- a/test/test.js +++ /dev/null @@ -1,60 +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 proxyquire = require( 'proxyquire' ); -var main = require( './../lib/main.js' ); -var polyfill = require( './../lib/polyfill.js' ); -var empty = require( './../lib' ); - - -// TESTS // - -tape( 'main export is a function', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof empty, 'function', 'main export is a function' ); - t.end(); -}); - -tape( 'if an environment supports Node.js buffer instances inheriting from Uint8Array, the main export supports returning arrays having uninitialized memory', function test( t ) { - var empty = proxyquire( './../lib', { - './is_buffer_uint8array.js': mock - }); - t.strictEqual( empty, main, 'returns expected value' ); - t.end(); - - function mock() { - return true; - } -}); - -tape( 'if an environment does not support Node.js buffer instances inheriting from Uint8Array, the main export supports returning zero-filled arrays', function test( t ) { - var empty = proxyquire( './../lib', { - './is_buffer_uint8array.js': mock - }); - t.strictEqual( empty, polyfill, 'returns expected value' ); - t.end(); - - function mock() { - return false; - } -}); diff --git a/test/test.main.js b/test/test.main.js deleted file mode 100644 index 3ceb26e..0000000 --- a/test/test.main.js +++ /dev/null @@ -1,274 +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 Float64Array = require( '@stdlib/array-float64' ); -var Float32Array = require( '@stdlib/array-float32' ); -var Int32Array = require( '@stdlib/array-int32' ); -var Uint32Array = require( '@stdlib/array-uint32' ); -var Int16Array = require( '@stdlib/array-int16' ); -var Uint16Array = require( '@stdlib/array-uint16' ); -var Int8Array = require( '@stdlib/array-int8' ); -var Uint8Array = require( '@stdlib/array-uint8' ); -var Uint8ClampedArray = require( '@stdlib/array-uint8c' ); -var Complex64Array = require( '@stdlib/array-complex64' ); -var Complex128Array = require( '@stdlib/array-complex128' ); -var instanceOf = require( '@stdlib/assert-instance-of' ); -var empty = require( './../lib/main.js' ); - - -// TESTS // - -tape( 'main export is a function', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof empty, 'function', 'main export is a function' ); - t.end(); -}); - -tape( 'the function throws an error if provided a value other than a nonnegative integer for the first argument', function test( t ) { - var values; - var i; - - values = [ - '5', - -3, - 3.14, - NaN, - true, - false, - null, - void 0, - [], - {}, - function noop() {} - ]; - - for ( i = 0; i < values.length; i++ ) { - t.throws( badValue( values[i] ), TypeError, 'throws an error when provided '+values[i] ); - } - t.end(); - - function badValue( value ) { - return function badValue() { - empty( value ); - }; - } -}); - -tape( 'the function throws an error if provided a value other than a nonnegative integer for the first argument (dtype)', function test( t ) { - var values; - var i; - - values = [ - '5', - -3, - 3.14, - NaN, - true, - false, - null, - void 0, - [], - {}, - function noop() {} - ]; - - for ( i = 0; i < values.length; i++ ) { - t.throws( badValue( values[i] ), TypeError, 'throws an error when provided '+values[i] ); - } - t.end(); - - function badValue( value ) { - return function badValue() { - empty( value, 'float32' ); - }; - } -}); - -tape( 'the function throws an error if provided an unrecognized data type', function test( t ) { - var values; - var i; - - values = [ - '5', - 'beep', - 'empty', - 'Int32', - 'Uint32', - 'Int16', - 'Uint16', - 'Int8', - 'Uint8', - 'Uint8c', - 'uint8_clamped', - 'Float64', - 'Float32', - 'FLOAT64', - 'FLOAT32', - 'GENERIC' - ]; - - for ( i = 0; i < values.length; i++ ) { - t.throws( badValue( values[i] ), TypeError, 'throws an error when provided '+values[i] ); - } - t.end(); - - function badValue( value ) { - return function badValue() { - empty( 10, value ); - }; - } -}); - -tape( 'the function returns an empty array (default)', function test( t ) { - var arr; - - arr = empty( 5 ); - t.strictEqual( instanceOf( arr, Float64Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=float64)', function test( t ) { - var arr; - - arr = empty( 5, 'float64' ); - t.strictEqual( instanceOf( arr, Float64Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=float32)', function test( t ) { - var arr; - - arr = empty( 5, 'float32' ); - t.strictEqual( instanceOf( arr, Float32Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=complex128)', function test( t ) { - var arr; - - arr = empty( 5, 'complex128' ); - t.strictEqual( instanceOf( arr, Complex128Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=complex64)', function test( t ) { - var arr; - - arr = empty( 5, 'complex64' ); - t.strictEqual( instanceOf( arr, Complex64Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=int32)', function test( t ) { - var arr; - - arr = empty( 5, 'int32' ); - t.strictEqual( instanceOf( arr, Int32Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=uint32)', function test( t ) { - var arr; - - arr = empty( 5, 'uint32' ); - t.strictEqual( instanceOf( arr, Uint32Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=int16)', function test( t ) { - var arr; - - arr = empty( 5, 'int16' ); - t.strictEqual( instanceOf( arr, Int16Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=uint16)', function test( t ) { - var arr; - - arr = empty( 5, 'uint16' ); - t.strictEqual( instanceOf( arr, Uint16Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=int8)', function test( t ) { - var arr; - - arr = empty( 5, 'int8' ); - t.strictEqual( instanceOf( arr, Int8Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=uint8)', function test( t ) { - var arr; - - arr = empty( 5, 'uint8' ); - t.strictEqual( instanceOf( arr, Uint8Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=uint8c)', function test( t ) { - var arr; - - arr = empty( 5, 'uint8c' ); - t.strictEqual( instanceOf( arr, Uint8ClampedArray ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=generic)', function test( t ) { - var expected; - var arr; - - expected = [ 0, 0, 0, 0, 0 ]; - - arr = empty( 5, 'generic' ); - t.strictEqual( instanceOf( arr, Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); diff --git a/test/test.polyfill.js b/test/test.polyfill.js deleted file mode 100644 index 17b99f3..0000000 --- a/test/test.polyfill.js +++ /dev/null @@ -1,324 +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 Float64Array = require( '@stdlib/array-float64' ); -var Float32Array = require( '@stdlib/array-float32' ); -var Int32Array = require( '@stdlib/array-int32' ); -var Uint32Array = require( '@stdlib/array-uint32' ); -var Int16Array = require( '@stdlib/array-int16' ); -var Uint16Array = require( '@stdlib/array-uint16' ); -var Int8Array = require( '@stdlib/array-int8' ); -var Uint8Array = require( '@stdlib/array-uint8' ); -var Uint8ClampedArray = require( '@stdlib/array-uint8c' ); -var Complex64Array = require( '@stdlib/array-complex64' ); -var Complex128Array = require( '@stdlib/array-complex128' ); -var reinterpret64 = require( '@stdlib/strided-base-reinterpret-complex64' ); -var reinterpret128 = require( '@stdlib/strided-base-reinterpret-complex128' ); -var instanceOf = require( '@stdlib/assert-instance-of' ); -var empty = require( './../lib/polyfill.js' ); - - -// TESTS // - -tape( 'main export is a function', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof empty, 'function', 'main export is a function' ); - t.end(); -}); - -tape( 'the function throws an error if provided a value other than a nonnegative integer for the first argument', function test( t ) { - var values; - var i; - - values = [ - '5', - -3, - 3.14, - NaN, - true, - false, - null, - void 0, - [], - {}, - function noop() {} - ]; - - for ( i = 0; i < values.length; i++ ) { - t.throws( badValue( values[i] ), TypeError, 'throws an error when provided '+values[i] ); - } - t.end(); - - function badValue( value ) { - return function badValue() { - empty( value ); - }; - } -}); - -tape( 'the function throws an error if provided a value other than a nonnegative integer for the first argument (dtype)', function test( t ) { - var values; - var i; - - values = [ - '5', - -3, - 3.14, - NaN, - true, - false, - null, - void 0, - [], - {}, - function noop() {} - ]; - - for ( i = 0; i < values.length; i++ ) { - t.throws( badValue( values[i] ), TypeError, 'throws an error when provided '+values[i] ); - } - t.end(); - - function badValue( value ) { - return function badValue() { - empty( value, 'float32' ); - }; - } -}); - -tape( 'the function throws an error if provided an unrecognized data type', function test( t ) { - var values; - var i; - - values = [ - '5', - 'beep', - 'empty', - 'Int32', - 'Uint32', - 'Int16', - 'Uint16', - 'Int8', - 'Uint8', - 'Uint8c', - 'uint8_clamped', - 'Float64', - 'Float32', - 'FLOAT64', - 'FLOAT32', - 'GENERIC' - ]; - - for ( i = 0; i < values.length; i++ ) { - t.throws( badValue( values[i] ), TypeError, 'throws an error when provided '+values[i] ); - } - t.end(); - - function badValue( value ) { - return function badValue() { - empty( 10, value ); - }; - } -}); - -tape( 'the function returns a zero-filled array (default)', function test( t ) { - var expected; - var arr; - - expected = new Float64Array( [ 0.0, 0.0, 0.0, 0.0, 0.0 ] ); - - arr = empty( 5 ); - t.strictEqual( instanceOf( arr, Float64Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=float64)', function test( t ) { - var expected; - var arr; - - expected = new Float64Array( [ 0.0, 0.0, 0.0, 0.0, 0.0 ] ); - - arr = empty( 5, 'float64' ); - t.strictEqual( instanceOf( arr, Float64Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=float32)', function test( t ) { - var expected; - var arr; - - expected = new Float32Array( [ 0.0, 0.0, 0.0, 0.0, 0.0 ] ); - - arr = empty( 5, 'float32' ); - t.strictEqual( instanceOf( arr, Float32Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=complex128)', function test( t ) { - var expected; - var arr; - - expected = new Float64Array( [ 0.0, 0.0, 0.0, 0.0 ] ); - - arr = empty( 2, 'complex128' ); - t.strictEqual( instanceOf( arr, Complex128Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length/2, 'returns expected value' ); - t.deepEqual( reinterpret128( arr, 0 ), expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=complex64)', function test( t ) { - var expected; - var arr; - - expected = new Float32Array( [ 0.0, 0.0, 0.0, 0.0 ] ); - - arr = empty( 2, 'complex64' ); - t.strictEqual( instanceOf( arr, Complex64Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length/2, 'returns expected value' ); - t.deepEqual( reinterpret64( arr, 0 ), expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=int32)', function test( t ) { - var expected; - var arr; - - expected = new Int32Array( [ 0, 0, 0, 0, 0 ] ); - - arr = empty( 5, 'int32' ); - t.strictEqual( instanceOf( arr, Int32Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=uint32)', function test( t ) { - var expected; - var arr; - - expected = new Uint32Array( [ 0, 0, 0, 0, 0 ] ); - - arr = empty( 5, 'uint32' ); - t.strictEqual( instanceOf( arr, Uint32Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=int16)', function test( t ) { - var expected; - var arr; - - expected = new Int16Array( [ 0, 0, 0, 0, 0 ] ); - - arr = empty( 5, 'int16' ); - t.strictEqual( instanceOf( arr, Int16Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=uint16)', function test( t ) { - var expected; - var arr; - - expected = new Uint16Array( [ 0, 0, 0, 0, 0 ] ); - - arr = empty( 5, 'uint16' ); - t.strictEqual( instanceOf( arr, Uint16Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=int8)', function test( t ) { - var expected; - var arr; - - expected = new Int8Array( [ 0, 0, 0, 0, 0 ] ); - - arr = empty( 5, 'int8' ); - t.strictEqual( instanceOf( arr, Int8Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=uint8)', function test( t ) { - var expected; - var arr; - - expected = new Uint8Array( [ 0, 0, 0, 0, 0 ] ); - - arr = empty( 5, 'uint8' ); - t.strictEqual( instanceOf( arr, Uint8Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=uint8c)', function test( t ) { - var expected; - var arr; - - expected = new Uint8ClampedArray( [ 0, 0, 0, 0, 0 ] ); - - arr = empty( 5, 'uint8c' ); - t.strictEqual( instanceOf( arr, Uint8ClampedArray ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=generic)', function test( t ) { - var expected; - var arr; - - expected = [ 0, 0, 0, 0, 0 ]; - - arr = empty( 5, 'generic' ); - t.strictEqual( instanceOf( arr, Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); From 574fd1db275349c3c240b96b3bc7841901679586 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Fri, 12 Apr 2024 03:43:52 +0000 Subject: [PATCH 59/75] Transform error messages --- lib/main.js | 6 +++--- package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/main.js b/lib/main.js index 33d8392..44eb4a4 100644 --- a/lib/main.js +++ b/lib/main.js @@ -26,7 +26,7 @@ var ctors = require( '@stdlib/array-typed-ctors' ); var zeros = require( '@stdlib/array-base-zeros' ); var bytesPerElement = require( '@stdlib/ndarray-base-bytes-per-element' ); var defaults = require( '@stdlib/array-defaults' ); -var format = require( '@stdlib/string-format' ); +var format = require( '@stdlib/error-tools-fmtprodmsg' ); // VARIABLES // @@ -63,7 +63,7 @@ function empty( length ) { var nb; if ( !isNonNegativeInteger( length ) ) { - throw new TypeError( format( 'invalid argument. First argument must be a nonnegative integer. Value: `%s`.', length ) ); + throw new TypeError( format( '1Zj2d', length ) ); } if ( arguments.length > 1 ) { dtype = arguments[ 1 ]; @@ -75,7 +75,7 @@ function empty( length ) { } nbytes = bytesPerElement( dtype ); if ( nbytes === null ) { - throw new TypeError( format( 'invalid argument. Second argument must be a supported data type. Value: `%s`.', dtype ) ); + throw new TypeError( format( '1ZjEC', dtype ) ); } // Resolve typed array constructor: ctor = ctors( dtype ); diff --git a/package.json b/package.json index 824d634..9aca4da 100644 --- a/package.json +++ b/package.json @@ -46,7 +46,7 @@ "@stdlib/assert-is-uint8array": "^0.2.1", "@stdlib/buffer-alloc-unsafe": "^0.2.1", "@stdlib/ndarray-base-bytes-per-element": "^0.2.1", - "@stdlib/string-format": "^0.2.1", + "@stdlib/error-tools-fmtprodmsg": "^0.2.1", "@stdlib/types": "^0.3.2", "@stdlib/error-tools-fmtprodmsg": "^0.2.1" }, From e8ad363d87450d67c91f8e142d4988d7069d1c13 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Fri, 12 Apr 2024 09:07:33 +0000 Subject: [PATCH 60/75] Remove files --- mod.d.ts | 66 - mod.js | 4 - mod.js.map | 1 - stats.html | 4842 ---------------------------------------------------- 4 files changed, 4913 deletions(-) delete mode 100644 mod.d.ts delete mode 100644 mod.js delete mode 100644 mod.js.map delete mode 100644 stats.html diff --git a/mod.d.ts b/mod.d.ts deleted file mode 100644 index 863116c..0000000 --- a/mod.d.ts +++ /dev/null @@ -1,66 +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 - -/// - -import { DataTypeMap } from '@stdlib/types/array'; - -/** -* Creates an uninitialized array having a specified length. -* -* The function recognizes the following data types: -* -* - `float64`: double-precision floating-point numbers (IEEE 754) -* - `float32`: single-precision floating-point numbers (IEEE 754) -* - `complex128`: double-precision complex floating-point numbers -* - `complex64`: single-precision complex floating-point numbers -* - `int32`: 32-bit two's complement signed integers -* - `uint32`: 32-bit unsigned integers -* - `int16`: 16-bit two's complement signed integers -* - `uint16`: 16-bit unsigned integers -* - `int8`: 8-bit two's complement signed integers -* - `uint8`: 8-bit unsigned integers -* - `uint8c`: 8-bit unsigned integers clamped to `0-255` -* - `generic`: generic JavaScript values -* -* ## Notes -* -* - In browser environments, the function always returns zero-filled arrays. -* - If `dtype` is `'generic'`, the function always returns a zero-filled array. -* - In Node.js versions `>=3.0.0`, the underlying memory of returned typed arrays is **not** initialized. Memory contents are unknown and may contain **sensitive** data. -* -* @param length - array length -* @param dtype - data type (default: 'float64') -* @returns empty array -* -* @example -* var arr = empty( 2 ); -* // returns -* -* @example -* var arr = empty( 2, 'float32' ); -* // returns -*/ -declare function empty = 'float64'>( length: number, dtype?: T ): DataTypeMap[T]; - - -// EXPORTS // - -export = empty; diff --git a/mod.js b/mod.js deleted file mode 100644 index 8ffb56d..0000000 --- a/mod.js +++ /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 -/// -var r="function"==typeof Object.defineProperty?Object.defineProperty:null;var e=Object.defineProperty;function t(r){return"number"==typeof r}function n(r){var e,t="";for(e=0;e0&&(e-=1),n=i.toExponential(e)):n=i.toPrecision(r.precision),r.alternate||(n=h.call(n,v,"$1e"),n=h.call(n,w,"e"),n=h.call(n,g,""));break;default:throw new Error("invalid double notation. Value: "+r.specifier)}return n=h.call(n,c,"e+0$1"),n=h.call(n,p,"e-0$1"),r.alternate&&(n=h.call(n,y,"$1."),n=h.call(n,m,"$1.e")),i>=0&&r.sign&&(n=r.sign+n),n=r.specifier===s.call(r.specifier)?s.call(n):l.call(n)}function d(r){var e,t="";for(e=0;e127)throw new Error("invalid character code. Value: "+n.arg);n.arg=_(a)?String(n.arg):E(a)}break;case"e":case"E":case"f":case"F":case"g":case"G":e||(n.precision=6),n.arg=b(n);break;default:throw new Error("invalid specifier: "+n.specifier)}n.maxWidth>=0&&n.arg.length>n.maxWidth&&(n.arg=n.arg.substring(0,n.maxWidth)),n.padZeros?n.arg=i(n.arg,n.width||n.precision,n.padRight):n.width&&(n.arg=(c=n.arg,p=n.width,y=n.padRight,m=void 0,(m=p-c.length)<0?c:c=y?c+d(m):d(m)+c)),f+=n.arg||"",l+=1}return f}var A=/%(?:([1-9]\d*)\$)?([0 +\-#]*)(\*|\d+)?(?:(\.)(\*|\d+)?)?[hlL]?([%A-Za-z])/g;function j(r){var e={mapping:r[1]?parseInt(r[1],10):void 0,flags:r[2],width:r[3],precision:r[5],specifier:r[6]};return"."===r[4]&&void 0===r[5]&&(e.precision="1"),e}function F(r){var e,t,n,i;for(t=[],i=0,n=A.exec(r);n;)(e=r.slice(i,A.lastIndex-n[0].length)).length&&t.push(e),t.push(j(n)),i=A.lastIndex,n=A.exec(r);return(e=r.slice(i)).length&&t.push(e),t}function S(r){var e,t;if("string"!=typeof r)throw new TypeError(S("invalid argument. First argument must be a string. Value: `%s`.",r));for(e=[F(r)],t=1;trr&&tr(r)}function ir(r){return U(r)&&nr(r)}function or(r){return H(r)&&nr(r.valueOf())}function ar(r){return ir(r)||or(r)}function ur(r){return ir(r)&&r>=0}function fr(r){return or(r)&&r.valueOf()>=0}function lr(r){return ur(r)||fr(r)}N(ar,"isPrimitive",ir),N(ar,"isObject",or),N(lr,"isPrimitive",ur),N(lr,"isObject",fr);var sr="function"==typeof Float64Array;var hr="function"==typeof Float64Array?Float64Array:null;var cr="function"==typeof Float64Array?Float64Array:void 0;var pr=function(){var r,e,t;if("function"!=typeof hr)return!1;try{e=new hr([1,3.14,-3.14,NaN]),t=e,r=(sr&&t instanceof Float64Array||"[object Float64Array]"===z(t))&&1===e[0]&&3.14===e[1]&&-3.14===e[2]&&e[3]!=e[3]}catch(e){r=!1}return r}()?cr:function(){throw new Error("not implemented")},yr="function"==typeof Float32Array;var mr="function"==typeof Float32Array?Float32Array:null;var gr="function"==typeof Float32Array?Float32Array:void 0;var wr=function(){var r,e,t;if("function"!=typeof mr)return!1;try{e=new mr([1,3.14,-3.14,5e40]),t=e,r=(yr&&t instanceof Float32Array||"[object Float32Array]"===z(t))&&1===e[0]&&3.140000104904175===e[1]&&-3.140000104904175===e[2]&&e[3]===Q}catch(e){r=!1}return r}()?gr:function(){throw new Error("not implemented")},vr="function"==typeof Int16Array;var br="function"==typeof Int16Array?Int16Array:null;var dr="function"==typeof Int16Array?Int16Array:void 0;var Er=function(){var r,e,t;if("function"!=typeof br)return!1;try{e=new br([1,3.14,-3.14,32768]),t=e,r=(vr&&t instanceof Int16Array||"[object Int16Array]"===z(t))&&1===e[0]&&3===e[1]&&-3===e[2]&&-32768===e[3]}catch(e){r=!1}return r}()?dr:function(){throw new Error("not implemented")},_r="function"==typeof Int32Array;var Tr="function"==typeof Int32Array?Int32Array:null;var xr="function"==typeof Int32Array?Int32Array:void 0;var Vr=function(){var r,e,t;if("function"!=typeof Tr)return!1;try{e=new Tr([1,3.14,-3.14,2147483648]),t=e,r=(_r&&t instanceof Int32Array||"[object Int32Array]"===z(t))&&1===e[0]&&3===e[1]&&-3===e[2]&&-2147483648===e[3]}catch(e){r=!1}return r}()?xr:function(){throw new Error("not implemented")},Ar="function"==typeof Int8Array;var jr="function"==typeof Int8Array?Int8Array:null;var Fr="function"==typeof Int8Array?Int8Array:void 0;var Sr=function(){var r,e,t;if("function"!=typeof jr)return!1;try{e=new jr([1,3.14,-3.14,128]),t=e,r=(Ar&&t instanceof Int8Array||"[object Int8Array]"===z(t))&&1===e[0]&&3===e[1]&&-3===e[2]&&-128===e[3]}catch(e){r=!1}return r}()?Fr:function(){throw new Error("not implemented")},kr="function"==typeof Uint16Array;var Lr="function"==typeof Uint16Array?Uint16Array:null;var Ir="function"==typeof Uint16Array?Uint16Array:void 0;var Rr=function(){var r,e,t;if("function"!=typeof Lr)return!1;try{e=new Lr(e=[1,3.14,-3.14,65536,65537]),t=e,r=(kr&&t instanceof Uint16Array||"[object Uint16Array]"===z(t))&&1===e[0]&&3===e[1]&&65533===e[2]&&0===e[3]&&1===e[4]}catch(e){r=!1}return r}()?Ir:function(){throw new Error("not implemented")},Br="function"==typeof Uint32Array;var Or="function"==typeof Uint32Array?Uint32Array:null;var Cr="function"==typeof Uint32Array?Uint32Array:void 0;var Mr=function(){var r,e,t;if("function"!=typeof Or)return!1;try{e=new Or(e=[1,3.14,-3.14,4294967296,4294967297]),t=e,r=(Br&&t instanceof Uint32Array||"[object Uint32Array]"===z(t))&&1===e[0]&&3===e[1]&&4294967293===e[2]&&0===e[3]&&1===e[4]}catch(e){r=!1}return r}()?Cr:function(){throw new Error("not implemented")},Nr="function"==typeof Uint8Array;var Ur="function"==typeof Uint8Array?Uint8Array:null;var Pr="function"==typeof Uint8Array?Uint8Array:void 0;var Yr=function(){var r,e,t;if("function"!=typeof Ur)return!1;try{e=new Ur(e=[1,3.14,-3.14,256,257]),t=e,r=(Nr&&t instanceof Uint8Array||"[object Uint8Array]"===z(t))&&1===e[0]&&3===e[1]&&253===e[2]&&0===e[3]&&1===e[4]}catch(e){r=!1}return r}()?Pr:function(){throw new Error("not implemented")},Wr="function"==typeof Uint8ClampedArray;var $r="function"==typeof Uint8ClampedArray?Uint8ClampedArray:null;var Gr="function"==typeof Uint8ClampedArray?Uint8ClampedArray:void 0;var Zr=function(){var r,e,t;if("function"!=typeof $r)return!1;try{e=new $r([-1,0,1,3.14,4.99,255,256]),t=e,r=(Wr&&t instanceof Uint8ClampedArray||"[object Uint8ClampedArray]"===z(t))&&0===e[0]&&0===e[1]&&1===e[2]&&3===e[3]&&5===e[4]&&255===e[5]&&255===e[6]}catch(e){r=!1}return r}()?Gr:function(){throw new Error("not implemented")},Xr=4294967295;function zr(r){return"object"==typeof r&&null!==r&&"number"==typeof r.length&&tr(r.length)&&r.length>=0&&r.length<=Xr}var Jr=9007199254740991;function qr(r){return"object"==typeof r&&null!==r&&"number"==typeof r.length&&tr(r.length)&&r.length>=0&&r.length<=Jr}var Dr="function"==typeof ArrayBuffer;function Hr(r){return Dr&&r instanceof ArrayBuffer||"[object ArrayBuffer]"===z(r)}var Kr=Array.isArray?Array.isArray:function(r){return"[object Array]"===z(r)};function Qr(r){return"object"==typeof r&&null!==r&&!Kr(r)}function re(r){return"string"==typeof r}var ee=String.prototype.valueOf;var te=Y();function ne(r){return"object"==typeof r&&(r instanceof String||(te?function(r){try{return ee.call(r),!0}catch(r){return!1}}(r):"[object String]"===z(r)))}function ie(r){return re(r)||ne(r)}N(ie,"isPrimitive",re),N(ie,"isObject",ne);var oe=/./;function ae(r){return"boolean"==typeof r}var ue=Boolean,fe=Boolean.prototype.toString;var le=Y();function se(r){return"object"==typeof r&&(r instanceof ue||(le?function(r){try{return fe.call(r),!0}catch(r){return!1}}(r):"[object Boolean]"===z(r)))}function he(r){return ae(r)||se(r)}N(he,"isPrimitive",ae),N(he,"isObject",se);var ce="object"==typeof self?self:null,pe="object"==typeof window?window:null,ye="undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},me="object"==typeof ye?ye:null,ge="object"==typeof globalThis?globalThis:null;var we=function(r){if(arguments.length){if(!ae(r))throw new TypeError(S("invalid argument. Must provide a boolean. Value: `%s`.",r));if(r)return new Function("return this;")()}if(ge)return ge;if(ce)return ce;if(pe)return pe;if(me)return me;throw new Error("unexpected error. Unable to resolve global object.")}(),ve=we.document&&we.document.childNodes,be=Int8Array;function de(){return/^\s*function\s*([^(]*)/i}var Ee=/^\s*function\s*([^(]*)/i;function _e(r){return null!==r&&"object"==typeof r}function Te(r){var e,t,n,i;if(("Object"===(t=z(r).slice(8,-1))||"Error"===t)&&r.constructor){if("string"==typeof(n=r.constructor).name)return n.name;if(e=Ee.exec(n.toString()))return e[1]}return _e(i=r)&&(i._isBuffer||i.constructor&&"function"==typeof i.constructor.isBuffer&&i.constructor.isBuffer(i))?"Buffer":t}N(de,"REGEXP",Ee),N(_e,"isObjectLikeArray",function(r){if("function"!=typeof r)throw new TypeError(S("invalid argument. Must provide a function. Value: `%s`.",r));return function(e){var t,n;if(!Kr(e))return!1;if(0===(t=e.length))return!1;for(n=0;n=2)e.push(n[0],n[1]);else{if(!Le(n))return new TypeError(S("invalid argument. An iterator must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",n));e.push(Pe(n),Ye(n))}return e}var qe=2*wr.BYTES_PER_ELEMENT,De=Me();function He(r){return r instanceof rt||"object"==typeof r&&null!==r&&("Complex64Array"===r.constructor.name||"Complex128Array"===r.constructor.name)&&"number"==typeof r._length&&"object"==typeof r._buffer}function Ke(r){return r===rt||"Complex128Array"===r.name}function Qe(r,e){return new ke(r[e*=2],r[e+1])}function rt(){var r,e,t,n;if(e=arguments.length,!(this instanceof rt))return 0===e?new rt:1===e?new rt(arguments[0]):2===e?new rt(arguments[0],arguments[1]):new rt(arguments[0],arguments[1],arguments[2]);if(0===e)t=new wr(0);else if(1===e)if(ur(arguments[0]))t=new wr(2*arguments[0]);else if(qr(arguments[0]))if((n=(t=arguments[0]).length)&&Kr(t)&&Le(t[0])){if(t=function(r,e){var t,n,i,o;for(t=e.length,o=0,i=0;it.byteLength-r)throw new RangeError(S("invalid arguments. ArrayBuffer has insufficient capacity. Either decrease the array length or provide a bigger buffer. Minimum capacity: `%u`.",n*qe));t=new wr(t,r,2*n)}}return N(this,"_buffer",t),N(this,"_length",t.length/2),this}function et(r){return r.re}function tt(r){return r.im}function nt(r){var e,t,n;for(e=[];!(t=r.next()).done;)if(zr(n=t.value)&&n.length>=2)e.push(n[0],n[1]);else{if(!Le(n))return new TypeError(S("invalid argument. An iterator must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",n));e.push(et(n),tt(n))}return e}N(rt,"BYTES_PER_ELEMENT",qe),N(rt,"name","Complex64Array"),N(rt,"from",(function(r){var e,t,n,i,o,a,u,f,l,s,h,c;if(!Ve(this))throw new TypeError("invalid invocation. `this` context must be a constructor.");if(!Ke(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if((t=arguments.length)>1){if(!Ve(n=arguments[1]))throw new TypeError(S("invalid argument. Second argument must be a function. Value: `%s`.",n));t>2&&(e=arguments[2])}if(He(r)){if(f=r.length,n){for(o=(i=new this(f))._buffer,c=0,h=0;h=2))throw new TypeError(S("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",s));o[c]=s[0],o[c+1]=s[1]}c+=2}return i}return new this(r)}if(qr(r)){if(n){for(f=r.length,u=r.get&&r.set?ze("default"):Ze("default"),h=0;h=2))throw new TypeError(S("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",s));o[c]=s[0],o[c+1]=s[1]}c+=2}return i}return new this(r)}if(Qr(r)&&De&&Ve(r[Ne])){if(!Ve((o=r[Ne]()).next))throw new TypeError(S("invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.",r));if(a=n?function(r,e,t){var n,i,o,a;for(n=[],a=-1;!(i=r.next()).done;)if(a+=1,zr(o=e.call(t,i.value,a))&&o.length>=2)n.push(o[0],o[1]);else{if(!Le(o))return new TypeError(S("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",o));n.push(Pe(o),Ye(o))}return n}(o,n,e):Je(o),a instanceof Error)throw a;for(o=(i=new this(f=a.length/2))._buffer,h=0;h=this._length))return Qe(this._buffer,r)})),Ue(rt.prototype,"buffer",(function(){return this._buffer.buffer})),Ue(rt.prototype,"byteLength",(function(){return this._buffer.byteLength})),Ue(rt.prototype,"byteOffset",(function(){return this._buffer.byteOffset})),N(rt.prototype,"BYTES_PER_ELEMENT",rt.BYTES_PER_ELEMENT),N(rt.prototype,"copyWithin",(function(r,e){if(!He(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");return 2===arguments.length?this._buffer.copyWithin(2*r,2*e):this._buffer.copyWithin(2*r,2*e,2*arguments[2]),this})),N(rt.prototype,"entries",(function(){var r,e,t,n,i,o,a;if(!He(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");return e=this,r=this._buffer,n=this._length,o=-1,a=-2,N(t={},"next",(function(){var e;if(o+=1,i||o>=n)return{done:!0};return e=new ke(r[a+=2],r[a+1]),{value:[o,e],done:!1}})),N(t,"return",(function(r){if(i=!0,arguments.length)return{value:r,done:!0};return{done:!0}})),Ne&&N(t,Ne,(function(){return e.entries()})),t})),N(rt.prototype,"every",(function(r,e){var t,n;if(!He(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Ve(r))throw new TypeError(S("invalid argument. First argument must be a function. Value: `%s`.",r));for(t=this._buffer,n=0;n1){if(!tr(e))throw new TypeError(S("invalid argument. Second argument must be an integer. Value: `%s`.",e));if(e<0&&(e+=i)<0&&(e=0),arguments.length>2){if(!tr(t))throw new TypeError(S("invalid argument. Third argument must be an integer. Value: `%s`.",t));t<0&&(t+=i)<0&&(t=0),t>i&&(t=i)}else t=i}else e=0,t=i;for(a=Pe(r),u=Ye(r),f=e;f=0;n--)if(i=Qe(t,n),r.call(e,i,n,this))return i})),N(rt.prototype,"findLastIndex",(function(r,e){var t,n,i;if(!He(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Ve(r))throw new TypeError(S("invalid argument. First argument must be a function. Value: `%s`.",r));for(t=this._buffer,n=this._length-1;n>=0;n--)if(i=Qe(t,n),r.call(e,i,n,this))return n;return-1})),N(rt.prototype,"forEach",(function(r,e){var t,n,i;if(!He(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Ve(r))throw new TypeError(S("invalid argument. First argument must be a function. Value: `%s`.",r));for(t=this._buffer,n=0;n=this._length))return Qe(this._buffer,r)})),N(rt.prototype,"includes",(function(r,e){var t,n,i,o,a;if(!He(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Le(r))throw new TypeError(S("invalid argument. First argument must be a complex number. Value: `%s`.",r));if(arguments.length>1){if(!tr(e))throw new TypeError(S("invalid argument. Second argument must be an integer. Value: `%s`.",e));e<0&&(e+=this._length)<0&&(e=0)}else e=0;for(i=Pe(r),o=Ye(r),t=this._buffer,a=e;a1){if(!tr(e))throw new TypeError(S("invalid argument. Second argument must be an integer. Value: `%s`.",e));e<0&&(e+=this._length)<0&&(e=0)}else e=0;for(i=Pe(r),o=Ye(r),t=this._buffer,a=e;a1){if(!tr(e))throw new TypeError(S("invalid argument. Second argument must be an integer. Value: `%s`.",e));e>=this._length?e=this._length-1:e<0&&(e+=this._length)}else e=this._length-1;for(i=Pe(r),o=Ye(r),t=this._buffer,a=e;a>=0;a--)if(i===t[n=2*a]&&o===t[n+1])return a;return-1})),Ue(rt.prototype,"length",(function(){return this._length})),N(rt.prototype,"map",(function(r,e){var t,n,i,o,a;if(!He(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Ve(r))throw new TypeError(S("invalid argument. First argument must be a function. Value: `%s`.",r));for(n=this._buffer,t=(i=new this.constructor(this._length))._buffer,o=0;o1)n=e,o=0;else{if(0===i)throw new Error("invalid operation. If not provided an initial value, an array must contain at least one element.");n=Qe(t,0),o=1}for(;o1){if(!ur(t=arguments[1]))throw new TypeError(S("invalid argument. Index argument must be a nonnegative integer. Value: `%s`.",t))}else t=0;if(Le(r)){if(t>=this._length)throw new RangeError(S("invalid argument. Index argument is out-of-bounds. Value: `%u`.",t));return n[t*=2]=Pe(r),void(n[t+1]=Ye(r))}if(He(r)){if(t+(a=r._length)>this._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");if(e=r._buffer,l=n.byteOffset+t*qe,e.buffer===n.buffer&&e.byteOffsetl){for(i=new wr(e.length),f=0;fthis._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");if(e=r,l=n.byteOffset+t*qe,e.buffer===n.buffer&&e.byteOffsetl){for(i=new wr(a),f=0;fthis._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");for(t*=2,f=0;fu&&(e=u)}}for(t=ri&&(e=i)}}return r>=i?(i=0,t=n.byteLength):r>=e?(i=0,t=n.byteOffset+r*qe):(i=e-r,t=n.byteOffset+r*qe),new this.constructor(n.buffer,t,i<0?0:i)})),N(rt.prototype,"toReversed",(function(){var r,e,t,n,i,o;if(!He(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");for(t=this._length,e=new this.constructor(t),n=this._buffer,r=e._buffer,i=0;i=i)throw new RangeError(S("invalid argument. Index argument is out-of-bounds. Value: `%s`.",r));if(!Le(e))throw new TypeError(S("invalid argument. Second argument must be a complex number. Value: `%s`.",e));return(t=(n=new this.constructor(this._buffer))._buffer)[2*r]=Pe(e),t[2*r+1]=Ye(e),n}));var it=2*pr.BYTES_PER_ELEMENT,ot=Me();function at(r){return r instanceof lt||"object"==typeof r&&null!==r&&("Complex64Array"===r.constructor.name||"Complex128Array"===r.constructor.name)&&"number"==typeof r._length&&"object"==typeof r._buffer}function ut(r){return r===lt||"Complex64Array"===r.name}function ft(r,e){return new Ae(r[e*=2],r[e+1])}function lt(){var r,e,t,n;if(e=arguments.length,!(this instanceof lt))return 0===e?new lt:1===e?new lt(arguments[0]):2===e?new lt(arguments[0],arguments[1]):new lt(arguments[0],arguments[1],arguments[2]);if(0===e)t=new pr(0);else if(1===e)if(ur(arguments[0]))t=new pr(2*arguments[0]);else if(qr(arguments[0]))if((n=(t=arguments[0]).length)&&Kr(t)&&Le(t[0])){if(t=function(r,e){var t,n,i,o;for(t=e.length,o=0,i=0;it.byteLength-r)throw new RangeError(S("invalid arguments. ArrayBuffer has insufficient capacity. Either decrease the array length or provide a bigger buffer. Minimum capacity: `%u`.",n*it));t=new pr(t,r,2*n)}}return N(this,"_buffer",t),N(this,"_length",t.length/2),this}N(lt,"BYTES_PER_ELEMENT",it),N(lt,"name","Complex128Array"),N(lt,"from",(function(r){var e,t,n,i,o,a,u,f,l,s,h,c;if(!Ve(this))throw new TypeError("invalid invocation. `this` context must be a constructor.");if(!ut(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if((t=arguments.length)>1){if(!Ve(n=arguments[1]))throw new TypeError(S("invalid argument. Second argument must be a function. Value: `%s`.",n));t>2&&(e=arguments[2])}if(at(r)){if(f=r.length,n){for(o=(i=new this(f))._buffer,c=0,h=0;h=2))throw new TypeError(S("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",s));o[c]=s[0],o[c+1]=s[1]}c+=2}return i}return new this(r)}if(qr(r)){if(n){for(f=r.length,u=r.get&&r.set?ze("default"):Ze("default"),h=0;h=2))throw new TypeError(S("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",s));o[c]=s[0],o[c+1]=s[1]}c+=2}return i}return new this(r)}if(Qr(r)&&ot&&Ve(r[Ne])){if(!Ve((o=r[Ne]()).next))throw new TypeError(S("invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.",r));if(a=n?function(r,e,t){var n,i,o,a;for(n=[],a=-1;!(i=r.next()).done;)if(a+=1,zr(o=e.call(t,i.value,a))&&o.length>=2)n.push(o[0],o[1]);else{if(!Le(o))return new TypeError(S("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",o));n.push(et(o),tt(o))}return n}(o,n,e):nt(o),a instanceof Error)throw a;for(o=(i=new this(f=a.length/2))._buffer,h=0;h=this._length))return ft(this._buffer,r)})),Ue(lt.prototype,"buffer",(function(){return this._buffer.buffer})),Ue(lt.prototype,"byteLength",(function(){return this._buffer.byteLength})),Ue(lt.prototype,"byteOffset",(function(){return this._buffer.byteOffset})),N(lt.prototype,"BYTES_PER_ELEMENT",lt.BYTES_PER_ELEMENT),N(lt.prototype,"copyWithin",(function(r,e){if(!at(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");return 2===arguments.length?this._buffer.copyWithin(2*r,2*e):this._buffer.copyWithin(2*r,2*e,2*arguments[2]),this})),N(lt.prototype,"entries",(function(){var r,e,t,n,i,o,a;if(!at(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");return e=this,r=this._buffer,n=this._length,o=-1,a=-2,N(t={},"next",(function(){var e;if(o+=1,i||o>=n)return{done:!0};return e=new Ae(r[a+=2],r[a+1]),{value:[o,e],done:!1}})),N(t,"return",(function(r){if(i=!0,arguments.length)return{value:r,done:!0};return{done:!0}})),Ne&&N(t,Ne,(function(){return e.entries()})),t})),N(lt.prototype,"every",(function(r,e){var t,n;if(!at(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Ve(r))throw new TypeError(S("invalid argument. First argument must be a function. Value: `%s`.",r));for(t=this._buffer,n=0;n1){if(!tr(e))throw new TypeError(S("invalid argument. Second argument must be an integer. Value: `%s`.",e));if(e<0&&(e+=i)<0&&(e=0),arguments.length>2){if(!tr(t))throw new TypeError(S("invalid argument. Third argument must be an integer. Value: `%s`.",t));t<0&&(t+=i)<0&&(t=0),t>i&&(t=i)}else t=i}else e=0,t=i;for(a=et(r),u=tt(r),f=e;f=0;n--)if(i=ft(t,n),r.call(e,i,n,this))return i})),N(lt.prototype,"findLastIndex",(function(r,e){var t,n,i;if(!at(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Ve(r))throw new TypeError(S("invalid argument. First argument must be a function. Value: `%s`.",r));for(t=this._buffer,n=this._length-1;n>=0;n--)if(i=ft(t,n),r.call(e,i,n,this))return n;return-1})),N(lt.prototype,"forEach",(function(r,e){var t,n,i;if(!at(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Ve(r))throw new TypeError(S("invalid argument. First argument must be a function. Value: `%s`.",r));for(t=this._buffer,n=0;n=this._length))return ft(this._buffer,r)})),Ue(lt.prototype,"length",(function(){return this._length})),N(lt.prototype,"includes",(function(r,e){var t,n,i,o,a;if(!at(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Le(r))throw new TypeError(S("invalid argument. First argument must be a complex number. Value: `%s`.",r));if(arguments.length>1){if(!tr(e))throw new TypeError(S("invalid argument. Second argument must be an integer. Value: `%s`.",e));e<0&&(e+=this._length)<0&&(e=0)}else e=0;for(i=et(r),o=tt(r),t=this._buffer,a=e;a1){if(!tr(e))throw new TypeError(S("invalid argument. Second argument must be an integer. Value: `%s`.",e));e<0&&(e+=this._length)<0&&(e=0)}else e=0;for(i=et(r),o=tt(r),t=this._buffer,a=e;a1){if(!tr(e))throw new TypeError(S("invalid argument. Second argument must be an integer. Value: `%s`.",e));e>=this._length?e=this._length-1:e<0&&(e+=this._length)}else e=this._length-1;for(i=et(r),o=tt(r),t=this._buffer,a=e;a>=0;a--)if(i===t[n=2*a]&&o===t[n+1])return a;return-1})),N(lt.prototype,"map",(function(r,e){var t,n,i,o,a;if(!at(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Ve(r))throw new TypeError(S("invalid argument. First argument must be a function. Value: `%s`.",r));for(n=this._buffer,t=(i=new this.constructor(this._length))._buffer,o=0;o1)n=e,o=0;else{if(0===i)throw new Error("invalid operation. If not provided an initial value, an array must contain at least one element.");n=ft(t,0),o=1}for(;o1){if(!ur(t=arguments[1]))throw new TypeError(S("invalid argument. Index argument must be a nonnegative integer. Value: `%s`.",t))}else t=0;if(Le(r)){if(t>=this._length)throw new RangeError(S("invalid argument. Index argument is out-of-bounds. Value: `%u`.",t));return n[t*=2]=et(r),void(n[t+1]=tt(r))}if(at(r)){if(t+(a=r._length)>this._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");if(e=r._buffer,l=n.byteOffset+t*it,e.buffer===n.buffer&&e.byteOffsetl){for(i=new pr(e.length),f=0;fthis._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");if(e=r,l=n.byteOffset+t*it,e.buffer===n.buffer&&e.byteOffsetl){for(i=new pr(a),f=0;fthis._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");for(t*=2,f=0;fu&&(e=u)}}for(t=ri&&(e=i)}}return r>=i?(i=0,t=n.byteLength):r>=e?(i=0,t=n.byteOffset+r*it):(i=e-r,t=n.byteOffset+r*it),new this.constructor(n.buffer,t,i<0?0:i)})),N(lt.prototype,"toReversed",(function(){var r,e,t,n,i,o;if(!at(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");for(t=this._length,e=new this.constructor(t),n=this._buffer,r=e._buffer,i=0;i=i)throw new RangeError(S("invalid argument. Index argument is out-of-bounds. Value: `%s`.",r));if(!Le(e))throw new TypeError(S("invalid argument. Second argument must be a complex number. Value: `%s`.",e));return(t=(n=new this.constructor(this._buffer))._buffer)[2*r]=et(e),t[2*r+1]=tt(e),n}));var st={float64:pr,float32:wr,generic:Array,int16:Er,int32:Vr,int8:Sr,uint16:Rr,uint32:Mr,uint8:Yr,uint8c:Zr,complex64:rt,complex128:lt};function ht(){return{dtypes:{default:"float64",numeric:"float64",real:"float64",floating_point:"float64",real_floating_point:"float64",complex_floating_point:"complex128",integer:"int32",signed_integer:"int32",unsigned_integer:"uint32"}}}var ct={dtypes:{default:"float64",numeric:"float64",real:"float64",floating_point:"float64",real_floating_point:"float64",complex_floating_point:"complex128",integer:"int32",signed_integer:"int32",unsigned_integer:"uint32"}},pt={"dtypes.default":ct.dtypes.default,"dtypes.numeric":ct.dtypes.numeric,"dtypes.real":ct.dtypes.real,"dtypes.floating_point":ct.dtypes.floating_point,"dtypes.real_floating_point":ct.dtypes.real_floating_point,"dtypes.complex_floating_point":ct.dtypes.complex_floating_point,"dtypes.integer":ct.dtypes.integer,"dtypes.signed_integer":ct.dtypes.signed_integer,"dtypes.unsigned_integer":ct.dtypes.unsigned_integer};N(ht,"get",(function(r){var e=pt[r];return void 0===e?null:e}));var yt=ht.get("dtypes.default");function mt(r){var e,t;if(!ur(r))throw new TypeError(S("invalid argument. First argument must be a nonnegative integer. Value: `%s`.",r));if("generic"===(e=arguments.length>1?arguments[1]:yt))return function(r,e){var t,n;for(t=[],n=0;n1?mt(r,arguments[1]):mt(r)}export{gt as default}; -//# sourceMappingURL=mod.js.map diff --git a/mod.js.map b/mod.js.map deleted file mode 100644 index 7b2fd54..0000000 --- a/mod.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"mod.js","sources":["../node_modules/@stdlib/utils-define-property/lib/define_property.js","../node_modules/@stdlib/utils-define-property/lib/builtin.js","../node_modules/@stdlib/string-base-format-interpolate/lib/is_number.js","../node_modules/@stdlib/string-base-format-interpolate/lib/zero_pad.js","../node_modules/@stdlib/string-base-format-interpolate/lib/format_integer.js","../node_modules/@stdlib/string-base-format-interpolate/lib/format_double.js","../node_modules/@stdlib/string-base-format-interpolate/lib/space_pad.js","../node_modules/@stdlib/string-base-format-interpolate/lib/main.js","../node_modules/@stdlib/string-base-format-interpolate/lib/is_string.js","../node_modules/@stdlib/string-base-format-tokenize/lib/main.js","../node_modules/@stdlib/string-format/lib/main.js","../node_modules/@stdlib/string-format/lib/is_string.js","../node_modules/@stdlib/utils-define-property/lib/polyfill.js","../node_modules/@stdlib/utils-define-property/lib/index.js","../node_modules/@stdlib/utils-define-property/lib/has_define_property_support.js","../node_modules/@stdlib/utils-define-nonenumerable-read-only-property/lib/main.js","../node_modules/@stdlib/assert-is-number/lib/primitive.js","../node_modules/@stdlib/assert-has-tostringtag-support/lib/main.js","../node_modules/@stdlib/assert-has-symbol-support/lib/main.js","../node_modules/@stdlib/utils-native-class/lib/tostring.js","../node_modules/@stdlib/assert-has-own-property/lib/main.js","../node_modules/@stdlib/symbol-ctor/lib/main.js","../node_modules/@stdlib/utils-native-class/lib/tostringtag.js","../node_modules/@stdlib/utils-native-class/lib/index.js","../node_modules/@stdlib/utils-native-class/lib/polyfill.js","../node_modules/@stdlib/utils-native-class/lib/main.js","../node_modules/@stdlib/number-ctor/lib/main.js","../node_modules/@stdlib/assert-is-number/lib/tostring.js","../node_modules/@stdlib/assert-is-number/lib/object.js","../node_modules/@stdlib/assert-is-number/lib/try2serialize.js","../node_modules/@stdlib/assert-is-number/lib/main.js","../node_modules/@stdlib/assert-is-number/lib/index.js","../node_modules/@stdlib/constants-float64-pinf/lib/index.js","../node_modules/@stdlib/constants-float64-ninf/lib/index.js","../node_modules/@stdlib/math-base-special-floor/lib/main.js","../node_modules/@stdlib/math-base-assert-is-integer/lib/main.js","../node_modules/@stdlib/assert-is-integer/lib/integer.js","../node_modules/@stdlib/assert-is-integer/lib/primitive.js","../node_modules/@stdlib/assert-is-integer/lib/object.js","../node_modules/@stdlib/assert-is-integer/lib/main.js","../node_modules/@stdlib/assert-is-nonnegative-integer/lib/primitive.js","../node_modules/@stdlib/assert-is-nonnegative-integer/lib/object.js","../node_modules/@stdlib/assert-is-nonnegative-integer/lib/main.js","../node_modules/@stdlib/assert-is-integer/lib/index.js","../node_modules/@stdlib/assert-is-nonnegative-integer/lib/index.js","../node_modules/@stdlib/assert-is-float64array/lib/main.js","../node_modules/@stdlib/assert-has-float64array-support/lib/float64array.js","../node_modules/@stdlib/array-float64/lib/main.js","../node_modules/@stdlib/array-float64/lib/index.js","../node_modules/@stdlib/assert-has-float64array-support/lib/main.js","../node_modules/@stdlib/array-float64/lib/polyfill.js","../node_modules/@stdlib/assert-is-float32array/lib/main.js","../node_modules/@stdlib/assert-has-float32array-support/lib/float32array.js","../node_modules/@stdlib/array-float32/lib/main.js","../node_modules/@stdlib/array-float32/lib/index.js","../node_modules/@stdlib/assert-has-float32array-support/lib/main.js","../node_modules/@stdlib/array-float32/lib/polyfill.js","../node_modules/@stdlib/assert-is-int16array/lib/main.js","../node_modules/@stdlib/constants-int16-max/lib/index.js","../node_modules/@stdlib/assert-has-int16array-support/lib/int16array.js","../node_modules/@stdlib/array-int16/lib/main.js","../node_modules/@stdlib/array-int16/lib/index.js","../node_modules/@stdlib/assert-has-int16array-support/lib/main.js","../node_modules/@stdlib/constants-int16-min/lib/index.js","../node_modules/@stdlib/array-int16/lib/polyfill.js","../node_modules/@stdlib/assert-is-int32array/lib/main.js","../node_modules/@stdlib/constants-int32-max/lib/index.js","../node_modules/@stdlib/assert-has-int32array-support/lib/int32array.js","../node_modules/@stdlib/array-int32/lib/main.js","../node_modules/@stdlib/array-int32/lib/index.js","../node_modules/@stdlib/assert-has-int32array-support/lib/main.js","../node_modules/@stdlib/constants-int32-min/lib/index.js","../node_modules/@stdlib/array-int32/lib/polyfill.js","../node_modules/@stdlib/assert-is-int8array/lib/main.js","../node_modules/@stdlib/constants-int8-max/lib/index.js","../node_modules/@stdlib/assert-has-int8array-support/lib/int8array.js","../node_modules/@stdlib/array-int8/lib/main.js","../node_modules/@stdlib/array-int8/lib/index.js","../node_modules/@stdlib/assert-has-int8array-support/lib/main.js","../node_modules/@stdlib/constants-int8-min/lib/index.js","../node_modules/@stdlib/array-int8/lib/polyfill.js","../node_modules/@stdlib/assert-is-uint16array/lib/main.js","../node_modules/@stdlib/constants-uint16-max/lib/index.js","../node_modules/@stdlib/assert-has-uint16array-support/lib/uint16array.js","../node_modules/@stdlib/array-uint16/lib/main.js","../node_modules/@stdlib/array-uint16/lib/index.js","../node_modules/@stdlib/assert-has-uint16array-support/lib/main.js","../node_modules/@stdlib/array-uint16/lib/polyfill.js","../node_modules/@stdlib/assert-is-uint32array/lib/main.js","../node_modules/@stdlib/constants-uint32-max/lib/index.js","../node_modules/@stdlib/assert-has-uint32array-support/lib/uint32array.js","../node_modules/@stdlib/array-uint32/lib/main.js","../node_modules/@stdlib/array-uint32/lib/index.js","../node_modules/@stdlib/assert-has-uint32array-support/lib/main.js","../node_modules/@stdlib/array-uint32/lib/polyfill.js","../node_modules/@stdlib/assert-is-uint8array/lib/main.js","../node_modules/@stdlib/constants-uint8-max/lib/index.js","../node_modules/@stdlib/assert-has-uint8array-support/lib/uint8array.js","../node_modules/@stdlib/array-uint8/lib/main.js","../node_modules/@stdlib/array-uint8/lib/index.js","../node_modules/@stdlib/assert-has-uint8array-support/lib/main.js","../node_modules/@stdlib/array-uint8/lib/polyfill.js","../node_modules/@stdlib/assert-is-uint8clampedarray/lib/main.js","../node_modules/@stdlib/assert-has-uint8clampedarray-support/lib/uint8clampedarray.js","../node_modules/@stdlib/array-uint8c/lib/main.js","../node_modules/@stdlib/array-uint8c/lib/index.js","../node_modules/@stdlib/assert-has-uint8clampedarray-support/lib/main.js","../node_modules/@stdlib/array-uint8c/lib/polyfill.js","../node_modules/@stdlib/constants-array-max-array-length/lib/index.js","../node_modules/@stdlib/assert-is-array-like-object/lib/main.js","../node_modules/@stdlib/constants-array-max-typed-array-length/lib/index.js","../node_modules/@stdlib/assert-is-collection/lib/main.js","../node_modules/@stdlib/assert-is-arraybuffer/lib/main.js","../node_modules/@stdlib/assert-is-array/lib/main.js","../node_modules/@stdlib/assert-is-object/lib/main.js","../node_modules/@stdlib/assert-is-string/lib/primitive.js","../node_modules/@stdlib/assert-is-string/lib/valueof.js","../node_modules/@stdlib/assert-is-string/lib/object.js","../node_modules/@stdlib/assert-is-string/lib/try2valueof.js","../node_modules/@stdlib/assert-is-string/lib/main.js","../node_modules/@stdlib/assert-is-string/lib/index.js","../node_modules/@stdlib/utils-type-of/lib/fixtures/re.js","../node_modules/@stdlib/assert-is-boolean/lib/primitive.js","../node_modules/@stdlib/boolean-ctor/lib/main.js","../node_modules/@stdlib/assert-is-boolean/lib/tostring.js","../node_modules/@stdlib/assert-is-boolean/lib/object.js","../node_modules/@stdlib/assert-is-boolean/lib/try2serialize.js","../node_modules/@stdlib/assert-is-boolean/lib/main.js","../node_modules/@stdlib/assert-is-boolean/lib/index.js","../node_modules/@stdlib/utils-global/lib/self.js","../node_modules/@stdlib/utils-global/lib/window.js","../node_modules/@stdlib/utils-global/lib/global.js","../node_modules/@stdlib/utils-global/lib/global_this.js","../node_modules/@stdlib/utils-type-of/lib/fixtures/nodelist.js","../node_modules/@stdlib/utils-global/lib/main.js","../node_modules/@stdlib/utils-global/lib/codegen.js","../node_modules/@stdlib/utils-type-of/lib/fixtures/typedarray.js","../node_modules/@stdlib/regexp-function-name/lib/main.js","../node_modules/@stdlib/regexp-function-name/lib/regexp.js","../node_modules/@stdlib/assert-is-object-like/lib/main.js","../node_modules/@stdlib/utils-constructor-name/lib/main.js","../node_modules/@stdlib/assert-is-buffer/lib/main.js","../node_modules/@stdlib/regexp-function-name/lib/index.js","../node_modules/@stdlib/assert-is-object-like/lib/index.js","../node_modules/@stdlib/assert-tools-array-function/lib/main.js","../node_modules/@stdlib/utils-type-of/lib/index.js","../node_modules/@stdlib/utils-type-of/lib/check.js","../node_modules/@stdlib/utils-type-of/lib/polyfill.js","../node_modules/@stdlib/utils-type-of/lib/main.js","../node_modules/@stdlib/assert-is-function/lib/main.js","../node_modules/@stdlib/complex-float64/lib/main.js","../node_modules/@stdlib/complex-float64/lib/tostring.js","../node_modules/@stdlib/complex-float64/lib/tojson.js","../node_modules/@stdlib/number-float64-base-to-float32/lib/main.js","../node_modules/@stdlib/number-float64-base-to-float32/lib/polyfill.js","../node_modules/@stdlib/number-float64-base-to-float32/lib/index.js","../node_modules/@stdlib/complex-float32/lib/main.js","../node_modules/@stdlib/assert-is-complex-like/lib/main.js","../node_modules/@stdlib/math-base-assert-is-even/lib/main.js","../node_modules/@stdlib/complex-float32/lib/tostring.js","../node_modules/@stdlib/complex-float32/lib/tojson.js","../node_modules/@stdlib/array-base-assert-is-complex64array/lib/main.js","../node_modules/@stdlib/array-base-assert-is-complex128array/lib/main.js","../node_modules/@stdlib/assert-has-iterator-symbol-support/lib/main.js","../node_modules/@stdlib/symbol-iterator/lib/main.js","../node_modules/@stdlib/utils-define-nonenumerable-read-only-accessor/lib/main.js","../node_modules/@stdlib/complex-realf/lib/main.js","../node_modules/@stdlib/complex-imagf/lib/main.js","../node_modules/@stdlib/strided-base-reinterpret-complex64/lib/main.js","../node_modules/@stdlib/strided-base-reinterpret-complex128/lib/main.js","../node_modules/@stdlib/array-base-getter/lib/main.js","../node_modules/@stdlib/array-base-accessor-getter/lib/main.js","../node_modules/@stdlib/array-complex64/lib/from_iterator.js","../node_modules/@stdlib/array-complex64/lib/main.js","../node_modules/@stdlib/array-complex64/lib/from_array.js","../node_modules/@stdlib/complex-real/lib/main.js","../node_modules/@stdlib/complex-imag/lib/main.js","../node_modules/@stdlib/array-complex128/lib/from_iterator.js","../node_modules/@stdlib/array-complex64/lib/from_iterator_map.js","../node_modules/@stdlib/array-complex128/lib/main.js","../node_modules/@stdlib/array-complex128/lib/from_array.js","../node_modules/@stdlib/array-complex128/lib/from_iterator_map.js","../node_modules/@stdlib/array-ctors/lib/ctors.js","../node_modules/@stdlib/array-defaults/lib/main.js","../node_modules/@stdlib/array-defaults/lib/get.js","../node_modules/@stdlib/array-defaults/lib/index.js","../node_modules/@stdlib/array-zeros/lib/main.js","../node_modules/@stdlib/array-base-filled/lib/main.js","../node_modules/@stdlib/array-base-zeros/lib/main.js","../node_modules/@stdlib/array-ctors/lib/main.js","../lib/polyfill.js"],"sourcesContent":["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Object.defineProperty === 'function' ) ? Object.defineProperty : null;\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Defines (or modifies) an object property.\n*\n* ## Notes\n*\n* - Property descriptors come in two flavors: **data descriptors** and **accessor descriptors**. A data descriptor is a property that has a value, which may or may not be writable. An accessor descriptor is a property described by a getter-setter function pair. A descriptor must be one of these two flavors and cannot be both.\n*\n* @name defineProperty\n* @type {Function}\n* @param {Object} obj - object on which to define the property\n* @param {(string|symbol)} prop - property name\n* @param {Object} descriptor - property descriptor\n* @param {boolean} [descriptor.configurable=false] - boolean indicating if property descriptor can be changed and if the property can be deleted from the provided object\n* @param {boolean} [descriptor.enumerable=false] - boolean indicating if the property shows up when enumerating object properties\n* @param {boolean} [descriptor.writable=false] - boolean indicating if the value associated with the property can be changed with an assignment operator\n* @param {*} [descriptor.value] - property value\n* @param {(Function|void)} [descriptor.get=undefined] - function which serves as a getter for the property, or, if no getter, undefined. When the property is accessed, a getter function is called without arguments and with the `this` context set to the object through which the property is accessed (which may not be the object on which the property is defined due to inheritance). The return value will be used as the property value.\n* @param {(Function|void)} [descriptor.set=undefined] - function which serves as a setter for the property, or, if no setter, undefined. When assigning a property value, a setter function is called with one argument (the value being assigned to the property) and with the `this` context set to the object through which the property is assigned.\n* @throws {TypeError} first argument must be an object\n* @throws {TypeError} third argument must be an object\n* @throws {Error} property descriptor cannot have both a value and a setter and/or getter\n* @returns {Object} object with added property\n*\n* @example\n* var obj = {};\n*\n* defineProperty( obj, 'foo', {\n* 'value': 'bar'\n* });\n*\n* var str = obj.foo;\n* // returns 'bar'\n*/\nvar defineProperty = Object.defineProperty;\n\n\n// EXPORTS //\n\nexport default defineProperty;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Tests if a value is a number primitive.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number primitive\n*\n* @example\n* var bool = isNumber( 3.14 );\n* // returns true\n*\n* @example\n* var bool = isNumber( NaN );\n* // returns true\n*\n* @example\n* var bool = isNumber( new Number( 3.14 ) );\n* // returns false\n*/\nfunction isNumber( value ) {\n\treturn ( typeof value === 'number' ); // NOTE: we inline the `isNumber.isPrimitive` function from `@stdlib/assert/is-number` in order to avoid circular dependencies.\n}\n\n\n// EXPORTS //\n\nexport default isNumber;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// FUNCTIONS //\n\n/**\n* Tests if a string starts with a minus sign (`-`).\n*\n* @private\n* @param {string} str - input string\n* @returns {boolean} boolean indicating if a string starts with a minus sign (`-`)\n*/\nfunction startsWithMinus( str ) {\n\treturn str[ 0 ] === '-';\n}\n\n/**\n* Returns a string of `n` zeros.\n*\n* @private\n* @param {number} n - number of zeros\n* @returns {string} string of zeros\n*/\nfunction zeros( n ) {\n\tvar out = '';\n\tvar i;\n\tfor ( i = 0; i < n; i++ ) {\n\t\tout += '0';\n\t}\n\treturn out;\n}\n\n\n// MAIN //\n\n/**\n* Pads a token with zeros to the specified width.\n*\n* @private\n* @param {string} str - token argument\n* @param {number} width - token width\n* @param {boolean} [right=false] - boolean indicating whether to pad to the right\n* @returns {string} padded token argument\n*/\nfunction zeroPad( str, width, right ) {\n\tvar negative = false;\n\tvar pad = width - str.length;\n\tif ( pad < 0 ) {\n\t\treturn str;\n\t}\n\tif ( startsWithMinus( str ) ) {\n\t\tnegative = true;\n\t\tstr = str.substr( 1 );\n\t}\n\tstr = ( right ) ?\n\t\tstr + zeros( pad ) :\n\t\tzeros( pad ) + str;\n\tif ( negative ) {\n\t\tstr = '-' + str;\n\t}\n\treturn str;\n}\n\n\n// EXPORTS //\n\nexport default zeroPad;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isNumber from './is_number.js';\nimport zeroPad from './zero_pad.js';\n\n// NOTE: for the following, we explicitly avoid using stdlib packages in this particular package in order to avoid circular dependencies.\nvar lowercase = String.prototype.toLowerCase;\nvar uppercase = String.prototype.toUpperCase;\n\n\n// MAIN //\n\n/**\n* Formats a token object argument as an integer.\n*\n* @private\n* @param {Object} token - token object\n* @throws {Error} must provide a valid integer\n* @returns {string} formatted token argument\n*/\nfunction formatInteger( token ) {\n\tvar base;\n\tvar out;\n\tvar i;\n\n\tswitch ( token.specifier ) {\n\tcase 'b':\n\t\t// Case: %b (binary)\n\t\tbase = 2;\n\t\tbreak;\n\tcase 'o':\n\t\t// Case: %o (octal)\n\t\tbase = 8;\n\t\tbreak;\n\tcase 'x':\n\tcase 'X':\n\t\t// Case: %x, %X (hexadecimal)\n\t\tbase = 16;\n\t\tbreak;\n\tcase 'd':\n\tcase 'i':\n\tcase 'u':\n\tdefault:\n\t\t// Case: %d, %i, %u (decimal)\n\t\tbase = 10;\n\t\tbreak;\n\t}\n\tout = token.arg;\n\ti = parseInt( out, 10 );\n\tif ( !isFinite( i ) ) { // NOTE: We use the global `isFinite` function here instead of `@stdlib/math/base/assert/is-finite` in order to avoid circular dependencies.\n\t\tif ( !isNumber( out ) ) {\n\t\t\tthrow new Error( 'invalid integer. Value: ' + out );\n\t\t}\n\t\ti = 0;\n\t}\n\tif ( i < 0 && ( token.specifier === 'u' || base !== 10 ) ) {\n\t\ti = 0xffffffff + i + 1;\n\t}\n\tif ( i < 0 ) {\n\t\tout = ( -i ).toString( base );\n\t\tif ( token.precision ) {\n\t\t\tout = zeroPad( out, token.precision, token.padRight );\n\t\t}\n\t\tout = '-' + out;\n\t} else {\n\t\tout = i.toString( base );\n\t\tif ( !i && !token.precision ) {\n\t\t\tout = '';\n\t\t} else if ( token.precision ) {\n\t\t\tout = zeroPad( out, token.precision, token.padRight );\n\t\t}\n\t\tif ( token.sign ) {\n\t\t\tout = token.sign + out;\n\t\t}\n\t}\n\tif ( base === 16 ) {\n\t\tif ( token.alternate ) {\n\t\t\tout = '0x' + out;\n\t\t}\n\t\tout = ( token.specifier === uppercase.call( token.specifier ) ) ?\n\t\t\tuppercase.call( out ) :\n\t\t\tlowercase.call( out );\n\t}\n\tif ( base === 8 ) {\n\t\tif ( token.alternate && out.charAt( 0 ) !== '0' ) {\n\t\t\tout = '0' + out;\n\t\t}\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default formatInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isNumber from './is_number.js';\n\n// NOTE: for the following, we explicitly avoid using stdlib packages in this particular package in order to avoid circular dependencies.\nvar abs = Math.abs; // eslint-disable-line stdlib/no-builtin-math\nvar lowercase = String.prototype.toLowerCase;\nvar uppercase = String.prototype.toUpperCase;\nvar replace = String.prototype.replace;\n\n\n// VARIABLES //\n\nvar RE_EXP_POS_DIGITS = /e\\+(\\d)$/;\nvar RE_EXP_NEG_DIGITS = /e-(\\d)$/;\nvar RE_ONLY_DIGITS = /^(\\d+)$/;\nvar RE_DIGITS_BEFORE_EXP = /^(\\d+)e/;\nvar RE_TRAILING_PERIOD_ZERO = /\\.0$/;\nvar RE_PERIOD_ZERO_EXP = /\\.0*e/;\nvar RE_ZERO_BEFORE_EXP = /(\\..*[^0])0*e/;\n\n\n// MAIN //\n\n/**\n* Formats a token object argument as a floating-point number.\n*\n* @private\n* @param {Object} token - token object\n* @throws {Error} must provide a valid floating-point number\n* @returns {string} formatted token argument\n*/\nfunction formatDouble( token ) {\n\tvar digits;\n\tvar out;\n\tvar f = parseFloat( token.arg );\n\tif ( !isFinite( f ) ) { // NOTE: We use the global `isFinite` function here instead of `@stdlib/math/base/assert/is-finite` in order to avoid circular dependencies.\n\t\tif ( !isNumber( token.arg ) ) {\n\t\t\tthrow new Error( 'invalid floating-point number. Value: ' + out );\n\t\t}\n\t\t// Case: NaN, Infinity, or -Infinity\n\t\tf = token.arg;\n\t}\n\tswitch ( token.specifier ) {\n\tcase 'e':\n\tcase 'E':\n\t\tout = f.toExponential( token.precision );\n\t\tbreak;\n\tcase 'f':\n\tcase 'F':\n\t\tout = f.toFixed( token.precision );\n\t\tbreak;\n\tcase 'g':\n\tcase 'G':\n\t\tif ( abs( f ) < 0.0001 ) {\n\t\t\tdigits = token.precision;\n\t\t\tif ( digits > 0 ) {\n\t\t\t\tdigits -= 1;\n\t\t\t}\n\t\t\tout = f.toExponential( digits );\n\t\t} else {\n\t\t\tout = f.toPrecision( token.precision );\n\t\t}\n\t\tif ( !token.alternate ) {\n\t\t\tout = replace.call( out, RE_ZERO_BEFORE_EXP, '$1e' );\n\t\t\tout = replace.call( out, RE_PERIOD_ZERO_EXP, 'e');\n\t\t\tout = replace.call( out, RE_TRAILING_PERIOD_ZERO, '' );\n\t\t}\n\t\tbreak;\n\tdefault:\n\t\tthrow new Error( 'invalid double notation. Value: ' + token.specifier );\n\t}\n\tout = replace.call( out, RE_EXP_POS_DIGITS, 'e+0$1' );\n\tout = replace.call( out, RE_EXP_NEG_DIGITS, 'e-0$1' );\n\tif ( token.alternate ) {\n\t\tout = replace.call( out, RE_ONLY_DIGITS, '$1.' );\n\t\tout = replace.call( out, RE_DIGITS_BEFORE_EXP, '$1.e' );\n\t}\n\tif ( f >= 0 && token.sign ) {\n\t\tout = token.sign + out;\n\t}\n\tout = ( token.specifier === uppercase.call( token.specifier ) ) ?\n\t\tuppercase.call( out ) :\n\t\tlowercase.call( out );\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default formatDouble;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// FUNCTIONS //\n\n/**\n* Returns `n` spaces.\n*\n* @private\n* @param {number} n - number of spaces\n* @returns {string} string of spaces\n*/\nfunction spaces( n ) {\n\tvar out = '';\n\tvar i;\n\tfor ( i = 0; i < n; i++ ) {\n\t\tout += ' ';\n\t}\n\treturn out;\n}\n\n\n// MAIN //\n\n/**\n* Pads a token with spaces to the specified width.\n*\n* @private\n* @param {string} str - token argument\n* @param {number} width - token width\n* @param {boolean} [right=false] - boolean indicating whether to pad to the right\n* @returns {string} padded token argument\n*/\nfunction spacePad( str, width, right ) {\n\tvar pad = width - str.length;\n\tif ( pad < 0 ) {\n\t\treturn str;\n\t}\n\tstr = ( right ) ?\n\t\tstr + spaces( pad ) :\n\t\tspaces( pad ) + str;\n\treturn str;\n}\n\n\n// EXPORTS //\n\nexport default spacePad;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport formatInteger from './format_integer.js';\nimport isString from './is_string.js';\nimport formatDouble from './format_double.js';\nimport spacePad from './space_pad.js';\nimport zeroPad from './zero_pad.js';\n\n\n// VARIABLES //\n\nvar fromCharCode = String.fromCharCode;\nvar isnan = isNaN; // NOTE: We use the global `isNaN` function here instead of `@stdlib/math/base/assert/is-nan` to avoid circular dependencies.\nvar isArray = Array.isArray; // NOTE: We use the global `Array.isArray` function here instead of `@stdlib/assert/is-array` to avoid circular dependencies.\n\n\n// FUNCTIONS //\n\n/**\n* Initializes token object with properties of supplied format identifier object or default values if not present.\n*\n* @private\n* @param {Object} token - format identifier object\n* @returns {Object} token object\n*/\nfunction initialize( token ) {\n\tvar out = {};\n\tout.specifier = token.specifier;\n\tout.precision = ( token.precision === void 0 ) ? 1 : token.precision;\n\tout.width = token.width;\n\tout.flags = token.flags || '';\n\tout.mapping = token.mapping;\n\treturn out;\n}\n\n\n// MAIN //\n\n/**\n* Generates string from a token array by interpolating values.\n*\n* @param {Array} tokens - string parts and format identifier objects\n* @param {Array} ...args - variable values\n* @throws {TypeError} first argument must be an array\n* @throws {Error} invalid flags\n* @returns {string} formatted string\n*\n* @example\n* var tokens = [ 'beep ', { 'specifier': 's' } ];\n* var out = formatInterpolate( tokens, 'boop' );\n* // returns 'beep boop'\n*/\nfunction formatInterpolate( tokens ) {\n\tvar hasPeriod;\n\tvar flags;\n\tvar token;\n\tvar flag;\n\tvar num;\n\tvar out;\n\tvar pos;\n\tvar i;\n\tvar j;\n\n\tif ( !isArray( tokens ) ) {\n\t\tthrow new TypeError( 'invalid argument. First argument must be an array. Value: `' + tokens + '`.' );\n\t}\n\tout = '';\n\tpos = 1;\n\tfor ( i = 0; i < tokens.length; i++ ) {\n\t\ttoken = tokens[ i ];\n\t\tif ( isString( token ) ) {\n\t\t\tout += token;\n\t\t} else {\n\t\t\thasPeriod = token.precision !== void 0;\n\t\t\ttoken = initialize( token );\n\t\t\tif ( !token.specifier ) {\n\t\t\t\tthrow new TypeError( 'invalid argument. Token is missing `specifier` property. Index: `'+ i +'`. Value: `' + token + '`.' );\n\t\t\t}\n\t\t\tif ( token.mapping ) {\n\t\t\t\tpos = token.mapping;\n\t\t\t}\n\t\t\tflags = token.flags;\n\t\t\tfor ( j = 0; j < flags.length; j++ ) {\n\t\t\t\tflag = flags.charAt( j );\n\t\t\t\tswitch ( flag ) {\n\t\t\t\tcase ' ':\n\t\t\t\t\ttoken.sign = ' ';\n\t\t\t\t\tbreak;\n\t\t\t\tcase '+':\n\t\t\t\t\ttoken.sign = '+';\n\t\t\t\t\tbreak;\n\t\t\t\tcase '-':\n\t\t\t\t\ttoken.padRight = true;\n\t\t\t\t\ttoken.padZeros = false;\n\t\t\t\t\tbreak;\n\t\t\t\tcase '0':\n\t\t\t\t\ttoken.padZeros = flags.indexOf( '-' ) < 0; // NOTE: We use built-in `Array.prototype.indexOf` here instead of `@stdlib/assert/contains` in order to avoid circular dependencies.\n\t\t\t\t\tbreak;\n\t\t\t\tcase '#':\n\t\t\t\t\ttoken.alternate = true;\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tthrow new Error( 'invalid flag: ' + flag );\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( token.width === '*' ) {\n\t\t\t\ttoken.width = parseInt( arguments[ pos ], 10 );\n\t\t\t\tpos += 1;\n\t\t\t\tif ( isnan( token.width ) ) {\n\t\t\t\t\tthrow new TypeError( 'the argument for * width at position ' + pos + ' is not a number. Value: `' + token.width + '`.' );\n\t\t\t\t}\n\t\t\t\tif ( token.width < 0 ) {\n\t\t\t\t\ttoken.padRight = true;\n\t\t\t\t\ttoken.width = -token.width;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( hasPeriod ) {\n\t\t\t\tif ( token.precision === '*' ) {\n\t\t\t\t\ttoken.precision = parseInt( arguments[ pos ], 10 );\n\t\t\t\t\tpos += 1;\n\t\t\t\t\tif ( isnan( token.precision ) ) {\n\t\t\t\t\t\tthrow new TypeError( 'the argument for * precision at position ' + pos + ' is not a number. Value: `' + token.precision + '`.' );\n\t\t\t\t\t}\n\t\t\t\t\tif ( token.precision < 0 ) {\n\t\t\t\t\t\ttoken.precision = 1;\n\t\t\t\t\t\thasPeriod = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\ttoken.arg = arguments[ pos ];\n\t\t\tswitch ( token.specifier ) {\n\t\t\tcase 'b':\n\t\t\tcase 'o':\n\t\t\tcase 'x':\n\t\t\tcase 'X':\n\t\t\tcase 'd':\n\t\t\tcase 'i':\n\t\t\tcase 'u':\n\t\t\t\t// Case: %b (binary), %o (octal), %x, %X (hexadecimal), %d, %i (decimal), %u (unsigned decimal)\n\t\t\t\tif ( hasPeriod ) {\n\t\t\t\t\ttoken.padZeros = false;\n\t\t\t\t}\n\t\t\t\ttoken.arg = formatInteger( token );\n\t\t\t\tbreak;\n\t\t\tcase 's':\n\t\t\t\t// Case: %s (string)\n\t\t\t\ttoken.maxWidth = ( hasPeriod ) ? token.precision : -1;\n\t\t\t\tbreak;\n\t\t\tcase 'c':\n\t\t\t\t// Case: %c (character)\n\t\t\t\tif ( !isnan( token.arg ) ) {\n\t\t\t\t\tnum = parseInt( token.arg, 10 );\n\t\t\t\t\tif ( num < 0 || num > 127 ) {\n\t\t\t\t\t\tthrow new Error( 'invalid character code. Value: ' + token.arg );\n\t\t\t\t\t}\n\t\t\t\t\ttoken.arg = ( isnan( num ) ) ?\n\t\t\t\t\t\tString( token.arg ) :\n\t\t\t\t\t\tfromCharCode( num );\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'e':\n\t\t\tcase 'E':\n\t\t\tcase 'f':\n\t\t\tcase 'F':\n\t\t\tcase 'g':\n\t\t\tcase 'G':\n\t\t\t\t// Case: %e, %E (scientific notation), %f, %F (decimal floating point), %g, %G (uses the shorter of %e/E or %f/F)\n\t\t\t\tif ( !hasPeriod ) {\n\t\t\t\t\ttoken.precision = 6;\n\t\t\t\t}\n\t\t\t\ttoken.arg = formatDouble( token );\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tthrow new Error( 'invalid specifier: ' + token.specifier );\n\t\t\t}\n\t\t\t// Fit argument into field width...\n\t\t\tif ( token.maxWidth >= 0 && token.arg.length > token.maxWidth ) {\n\t\t\t\ttoken.arg = token.arg.substring( 0, token.maxWidth );\n\t\t\t}\n\t\t\tif ( token.padZeros ) {\n\t\t\t\ttoken.arg = zeroPad( token.arg, token.width || token.precision, token.padRight ); // eslint-disable-line max-len\n\t\t\t} else if ( token.width ) {\n\t\t\t\ttoken.arg = spacePad( token.arg, token.width, token.padRight );\n\t\t\t}\n\t\t\tout += token.arg || '';\n\t\t\tpos += 1;\n\t\t}\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default formatInterpolate;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Tests if a value is a string primitive.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a string primitive\n*\n* @example\n* var bool = isString( 'beep' );\n* // returns true\n*\n* @example\n* var bool = isString( new String( 'beep' ) );\n* // returns false\n*/\nfunction isString( value ) {\n\treturn ( typeof value === 'string' ); // NOTE: we inline the `isString.isPrimitive` function from `@stdlib/assert/is-string` in order to avoid circular dependencies.\n}\n\n\n// EXPORTS //\n\nexport default isString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// VARIABLES //\n\nvar RE = /%(?:([1-9]\\d*)\\$)?([0 +\\-#]*)(\\*|\\d+)?(?:(\\.)(\\*|\\d+)?)?[hlL]?([%A-Za-z])/g;\n\n\n// FUNCTIONS //\n\n/**\n* Parses a delimiter.\n*\n* @private\n* @param {Array} match - regular expression match\n* @returns {Object} delimiter token object\n*/\nfunction parse( match ) {\n\tvar token = {\n\t\t'mapping': ( match[ 1 ] ) ? parseInt( match[ 1 ], 10 ) : void 0,\n\t\t'flags': match[ 2 ],\n\t\t'width': match[ 3 ],\n\t\t'precision': match[ 5 ],\n\t\t'specifier': match[ 6 ]\n\t};\n\tif ( match[ 4 ] === '.' && match[ 5 ] === void 0 ) {\n\t\ttoken.precision = '1';\n\t}\n\treturn token;\n}\n\n\n// MAIN //\n\n/**\n* Tokenizes a string into an array of string parts and format identifier objects.\n*\n* @param {string} str - input string\n* @returns {Array} tokens\n*\n* @example\n* var tokens = formatTokenize( 'Hello %s!' );\n* // returns [ 'Hello ', {...}, '!' ]\n*/\nfunction formatTokenize( str ) {\n\tvar content;\n\tvar tokens;\n\tvar match;\n\tvar prev;\n\n\ttokens = [];\n\tprev = 0;\n\tmatch = RE.exec( str );\n\twhile ( match ) {\n\t\tcontent = str.slice( prev, RE.lastIndex - match[ 0 ].length );\n\t\tif ( content.length ) {\n\t\t\ttokens.push( content );\n\t\t}\n\t\ttokens.push( parse( match ) );\n\t\tprev = RE.lastIndex;\n\t\tmatch = RE.exec( str );\n\t}\n\tcontent = str.slice( prev );\n\tif ( content.length ) {\n\t\ttokens.push( content );\n\t}\n\treturn tokens;\n}\n\n\n// EXPORTS //\n\nexport default formatTokenize;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport interpolate from '@stdlib/string-base-format-interpolate';\nimport tokenize from '@stdlib/string-base-format-tokenize';\nimport isString from './is_string.js';\n\n\n// MAIN //\n\n/**\n* Inserts supplied variable values into a format string.\n*\n* @param {string} str - input string\n* @param {Array} ...args - variable values\n* @throws {TypeError} first argument must be a string\n* @throws {Error} invalid flags\n* @returns {string} formatted string\n*\n* @example\n* var str = format( 'Hello %s!', 'world' );\n* // returns 'Hello world!'\n*\n* @example\n* var str = format( 'Pi: ~%.2f', 3.141592653589793 );\n* // returns 'Pi: ~3.14'\n*/\nfunction format( str ) {\n\tvar args;\n\tvar i;\n\n\tif ( !isString( str ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a string. Value: `%s`.', str ) );\n\t}\n\targs = [ tokenize( str ) ];\n\tfor ( i = 1; i < arguments.length; i++ ) {\n\t\targs.push( arguments[ i ] );\n\t}\n\treturn interpolate.apply( null, args );\n}\n\n\n// EXPORTS //\n\nexport default format;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Tests if a value is a string primitive.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a string primitive\n*\n* @example\n* var bool = isString( 'beep' );\n* // returns true\n*\n* @example\n* var bool = isString( new String( 'beep' ) );\n* // returns false\n*/\nfunction isString( value ) {\n\treturn ( typeof value === 'string' ); // NOTE: we inline the `isString.isPrimitive` function from `@stdlib/assert/is-string` in order to avoid circular dependencies.\n}\n\n\n// EXPORTS //\n\nexport default isString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable no-underscore-dangle, no-proto */\n\n'use strict';\n\n// MODULES //\n\nimport format from '@stdlib/string-format';\n\n\n// VARIABLES //\n\nvar objectProtoype = Object.prototype;\nvar toStr = objectProtoype.toString;\nvar defineGetter = objectProtoype.__defineGetter__;\nvar defineSetter = objectProtoype.__defineSetter__;\nvar lookupGetter = objectProtoype.__lookupGetter__;\nvar lookupSetter = objectProtoype.__lookupSetter__;\n\n\n// MAIN //\n\n/**\n* Defines (or modifies) an object property.\n*\n* ## Notes\n*\n* - Property descriptors come in two flavors: **data descriptors** and **accessor descriptors**. A data descriptor is a property that has a value, which may or may not be writable. An accessor descriptor is a property described by a getter-setter function pair. A descriptor must be one of these two flavors and cannot be both.\n*\n* @param {Object} obj - object on which to define the property\n* @param {string} prop - property name\n* @param {Object} descriptor - property descriptor\n* @param {boolean} [descriptor.configurable=false] - boolean indicating if property descriptor can be changed and if the property can be deleted from the provided object\n* @param {boolean} [descriptor.enumerable=false] - boolean indicating if the property shows up when enumerating object properties\n* @param {boolean} [descriptor.writable=false] - boolean indicating if the value associated with the property can be changed with an assignment operator\n* @param {*} [descriptor.value] - property value\n* @param {(Function|void)} [descriptor.get=undefined] - function which serves as a getter for the property, or, if no getter, undefined. When the property is accessed, a getter function is called without arguments and with the `this` context set to the object through which the property is accessed (which may not be the object on which the property is defined due to inheritance). The return value will be used as the property value.\n* @param {(Function|void)} [descriptor.set=undefined] - function which serves as a setter for the property, or, if no setter, undefined. When assigning a property value, a setter function is called with one argument (the value being assigned to the property) and with the `this` context set to the object through which the property is assigned.\n* @throws {TypeError} first argument must be an object\n* @throws {TypeError} third argument must be an object\n* @throws {Error} property descriptor cannot have both a value and a setter and/or getter\n* @returns {Object} object with added property\n*\n* @example\n* var obj = {};\n*\n* defineProperty( obj, 'foo', {\n* 'value': 'bar'\n* });\n*\n* var str = obj.foo;\n* // returns 'bar'\n*/\nfunction defineProperty( obj, prop, descriptor ) {\n\tvar prototype;\n\tvar hasValue;\n\tvar hasGet;\n\tvar hasSet;\n\n\tif ( typeof obj !== 'object' || obj === null || toStr.call( obj ) === '[object Array]' ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be an object. Value: `%s`.', obj ) );\n\t}\n\tif ( typeof descriptor !== 'object' || descriptor === null || toStr.call( descriptor ) === '[object Array]' ) {\n\t\tthrow new TypeError( format( 'invalid argument. Property descriptor must be an object. Value: `%s`.', descriptor ) );\n\t}\n\thasValue = ( 'value' in descriptor );\n\tif ( hasValue ) {\n\t\tif (\n\t\t\tlookupGetter.call( obj, prop ) ||\n\t\t\tlookupSetter.call( obj, prop )\n\t\t) {\n\t\t\t// Override `__proto__` to avoid touching inherited accessors:\n\t\t\tprototype = obj.__proto__;\n\t\t\tobj.__proto__ = objectProtoype;\n\n\t\t\t// Delete property as existing getters/setters prevent assigning value to specified property:\n\t\t\tdelete obj[ prop ];\n\t\t\tobj[ prop ] = descriptor.value;\n\n\t\t\t// Restore original prototype:\n\t\t\tobj.__proto__ = prototype;\n\t\t} else {\n\t\t\tobj[ prop ] = descriptor.value;\n\t\t}\n\t}\n\thasGet = ( 'get' in descriptor );\n\thasSet = ( 'set' in descriptor );\n\n\tif ( hasValue && ( hasGet || hasSet ) ) {\n\t\tthrow new Error( 'invalid argument. Cannot specify one or more accessors and a value or writable attribute in the property descriptor.' );\n\t}\n\n\tif ( hasGet && defineGetter ) {\n\t\tdefineGetter.call( obj, prop, descriptor.get );\n\t}\n\tif ( hasSet && defineSetter ) {\n\t\tdefineSetter.call( obj, prop, descriptor.set );\n\t}\n\treturn obj;\n}\n\n\n// EXPORTS //\n\nexport default defineProperty;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Define (or modify) an object property.\n*\n* @module @stdlib/utils-define-property\n*\n* @example\n* import defineProperty from '@stdlib/utils-define-property';\n*\n* var obj = {};\n* defineProperty( obj, 'foo', {\n* 'value': 'bar',\n* 'writable': false,\n* 'configurable': false,\n* 'enumerable': false\n* });\n* obj.foo = 'boop'; // => throws\n*/\n\n// MODULES //\n\nimport hasDefinePropertySupport from './has_define_property_support.js';\nimport builtin from './builtin.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar defineProperty;\nif ( hasDefinePropertySupport() ) {\n\tdefineProperty = builtin;\n} else {\n\tdefineProperty = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default defineProperty;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport defineProperty from './define_property.js';\n\n\n// MAIN //\n\n/**\n* Tests for `Object.defineProperty` support.\n*\n* @private\n* @returns {boolean} boolean indicating if an environment has `Object.defineProperty` support\n*\n* @example\n* var bool = hasDefinePropertySupport();\n* // returns \n*/\nfunction hasDefinePropertySupport() {\n\t// Test basic support...\n\ttry {\n\t\tdefineProperty( {}, 'x', {} );\n\t\treturn true;\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\treturn false;\n\t}\n}\n\n\n// EXPORTS //\n\nexport default hasDefinePropertySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport defineProperty from '@stdlib/utils-define-property';\n\n\n// MAIN //\n\n/**\n* Defines a non-enumerable read-only property.\n*\n* @param {Object} obj - object on which to define the property\n* @param {(string|symbol)} prop - property name\n* @param {*} value - value to set\n*\n* @example\n* var obj = {};\n*\n* setNonEnumerableReadOnly( obj, 'foo', 'bar' );\n*\n* try {\n* obj.foo = 'boop';\n* } catch ( err ) {\n* console.error( err.message );\n* }\n*/\nfunction setNonEnumerableReadOnly( obj, prop, value ) {\n\tdefineProperty( obj, prop, {\n\t\t'configurable': false,\n\t\t'enumerable': false,\n\t\t'writable': false,\n\t\t'value': value\n\t});\n}\n\n\n// EXPORTS //\n\nexport default setNonEnumerableReadOnly;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Tests if a value is a number primitive.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number primitive\n*\n* @example\n* var bool = isNumber( 3.14 );\n* // returns true\n*\n* @example\n* var bool = isNumber( NaN );\n* // returns true\n*\n* @example\n* var bool = isNumber( new Number( 3.14 ) );\n* // returns false\n*/\nfunction isNumber( value ) {\n\treturn ( typeof value === 'number' );\n}\n\n\n// EXPORTS //\n\nexport default isNumber;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport hasSymbols from '@stdlib/assert-has-symbol-support';\n\n\n// VARIABLES //\n\nvar FLG = hasSymbols();\n\n\n// MAIN //\n\n/**\n* Tests for native `toStringTag` support.\n*\n* @returns {boolean} boolean indicating if an environment has `toStringTag` support\n*\n* @example\n* var bool = hasToStringTagSupport();\n* // returns \n*/\nfunction hasToStringTagSupport() {\n\treturn ( FLG && typeof Symbol.toStringTag === 'symbol' );\n}\n\n\n// EXPORTS //\n\nexport default hasToStringTagSupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Tests for native `Symbol` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Symbol` support\n*\n* @example\n* var bool = hasSymbolSupport();\n* // returns \n*/\nfunction hasSymbolSupport() {\n\treturn (\n\t\ttypeof Symbol === 'function' &&\n\t\ttypeof Symbol( 'foo' ) === 'symbol'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default hasSymbolSupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar toStr = Object.prototype.toString;\n\n\n// EXPORTS //\n\nexport default toStr;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// FUNCTIONS //\n\nvar has = Object.prototype.hasOwnProperty;\n\n\n// MAIN //\n\n/**\n* Tests if an object has a specified property.\n*\n* @param {*} value - value to test\n* @param {*} property - property to test\n* @returns {boolean} boolean indicating if an object has a specified property\n*\n* @example\n* var beep = {\n* 'boop': true\n* };\n*\n* var bool = hasOwnProp( beep, 'boop' );\n* // returns true\n*\n* @example\n* var beep = {\n* 'boop': true\n* };\n*\n* var bool = hasOwnProp( beep, 'bap' );\n* // returns false\n*/\nfunction hasOwnProp( value, property ) {\n\tif (\n\t\tvalue === void 0 ||\n\t\tvalue === null\n\t) {\n\t\treturn false;\n\t}\n\treturn has.call( value, property );\n}\n\n\n// EXPORTS //\n\nexport default hasOwnProp;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar Sym = ( typeof Symbol === 'function' ) ? Symbol : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default Sym;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport Symbol from '@stdlib/symbol-ctor';\n\n\n// MAIN //\n\nvar toStrTag = ( typeof Symbol === 'function' ) ? Symbol.toStringTag : '';\n\n\n// EXPORTS //\n\nexport default toStrTag;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Return a string value indicating a specification defined classification of an object.\n*\n* @module @stdlib/utils-native-class\n*\n* @example\n* import nativeClass from '@stdlib/utils-native-class';\n*\n* var str = nativeClass( 'a' );\n* // returns '[object String]'\n*\n* str = nativeClass( 5 );\n* // returns '[object Number]'\n*\n* function Beep() {\n* return this;\n* }\n* str = nativeClass( new Beep() );\n* // returns '[object Object]'\n*/\n\n// MODULES //\n\nimport hasToStringTag from '@stdlib/assert-has-tostringtag-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar main;\nif ( hasToStringTag() ) {\n\tmain = polyfill;\n} else {\n\tmain = builtin;\n}\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport hasOwnProp from '@stdlib/assert-has-own-property';\nimport toStringTag from './tostringtag.js';\nimport toStr from './tostring.js';\n\n\n// MAIN //\n\n/**\n* Returns a string value indicating a specification defined classification of an object in environments supporting `Symbol.toStringTag`.\n*\n* @param {*} v - input value\n* @returns {string} string value indicating a specification defined classification of the input value\n*\n* @example\n* var str = nativeClass( 'a' );\n* // returns '[object String]'\n*\n* @example\n* var str = nativeClass( 5 );\n* // returns '[object Number]'\n*\n* @example\n* function Beep() {\n* return this;\n* }\n* var str = nativeClass( new Beep() );\n* // returns '[object Object]'\n*/\nfunction nativeClass( v ) {\n\tvar isOwn;\n\tvar tag;\n\tvar out;\n\n\tif ( v === null || v === void 0 ) {\n\t\treturn toStr.call( v );\n\t}\n\ttag = v[ toStringTag ];\n\tisOwn = hasOwnProp( v, toStringTag );\n\n\t// Attempt to override the `toStringTag` property. For built-ins having a `Symbol.toStringTag` property (e.g., `JSON`, `Math`, etc), the `Symbol.toStringTag` property is read-only (e.g., , so we need to wrap in a `try/catch`.\n\ttry {\n\t\tv[ toStringTag ] = void 0;\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\treturn toStr.call( v );\n\t}\n\tout = toStr.call( v );\n\n\tif ( isOwn ) {\n\t\tv[ toStringTag ] = tag;\n\t} else {\n\t\tdelete v[ toStringTag ];\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default nativeClass;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport toStr from './tostring.js';\n\n\n// MAIN //\n\n/**\n* Returns a string value indicating a specification defined classification (via the internal property `[[Class]]`) of an object.\n*\n* @param {*} v - input value\n* @returns {string} string value indicating a specification defined classification of the input value\n*\n* @example\n* var str = nativeClass( 'a' );\n* // returns '[object String]'\n*\n* @example\n* var str = nativeClass( 5 );\n* // returns '[object Number]'\n*\n* @example\n* function Beep() {\n* return this;\n* }\n* var str = nativeClass( new Beep() );\n* // returns '[object Object]'\n*/\nfunction nativeClass( v ) {\n\treturn toStr.call( v );\n}\n\n\n// EXPORTS //\n\nexport default nativeClass;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// EXPORTS //\n\nexport default Number; // eslint-disable-line stdlib/require-globals\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport Number from '@stdlib/number-ctor';\n\n\n// MAIN //\n\n// eslint-disable-next-line stdlib/no-redeclare\nvar toString = Number.prototype.toString; // non-generic\n\n\n// EXPORTS //\n\nexport default toString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport hasToStringTag from '@stdlib/assert-has-tostringtag-support';\nimport nativeClass from '@stdlib/utils-native-class';\nimport Number from '@stdlib/number-ctor';\nimport test from './try2serialize.js';\n\n\n// VARIABLES //\n\nvar FLG = hasToStringTag();\n\n\n// MAIN //\n\n/**\n* Tests if a value is a number object.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number object\n*\n* @example\n* var bool = isNumber( 3.14 );\n* // returns false\n*\n* @example\n* var bool = isNumber( new Number( 3.14 ) );\n* // returns true\n*/\nfunction isNumber( value ) {\n\tif ( typeof value === 'object' ) {\n\t\tif ( value instanceof Number ) {\n\t\t\treturn true;\n\t\t}\n\t\tif ( FLG ) {\n\t\t\treturn test( value );\n\t\t}\n\t\treturn ( nativeClass( value ) === '[object Number]' );\n\t}\n\treturn false;\n}\n\n\n// EXPORTS //\n\nexport default isNumber;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport toString from './tostring.js'; // eslint-disable-line stdlib/no-redeclare\n\n\n// MAIN //\n\n/**\n* Attempts to serialize a value to a string.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value can be serialized\n*/\nfunction test( value ) {\n\ttry {\n\t\ttoString.call( value );\n\t\treturn true;\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\treturn false;\n\t}\n}\n\n\n// EXPORTS //\n\nexport default test;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a number.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a number\n*\n* @example\n* var bool = isNumber( 3.14 );\n* // returns true\n*\n* @example\n* var bool = isNumber( new Number( 3.14 ) );\n* // returns true\n*\n* @example\n* var bool = isNumber( NaN );\n* // returns true\n*\n* @example\n* var bool = isNumber( null );\n* // returns false\n*/\nfunction isNumber( value ) {\n\treturn ( isPrimitive( value ) || isObject( value ) );\n}\n\n\n// EXPORTS //\n\nexport default isNumber;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test if a value is a number.\n*\n* @module @stdlib/assert-is-number\n*\n* @example\n* import isNumber from '@stdlib/assert-is-number';\n*\n* var bool = isNumber( 3.14 );\n* // returns true\n*\n* bool = isNumber( new Number( 3.14 ) );\n* // returns true\n*\n* bool = isNumber( NaN );\n* // returns true\n*\n* bool = isNumber( null );\n* // returns false\n*\n* @example\n* import { isPrimitive as isNumber } from '@stdlib/assert-is-number';\n*\n* var bool = isNumber( 3.14 );\n* // returns true\n*\n* bool = isNumber( NaN );\n* // returns true\n*\n* bool = isNumber( new Number( 3.14 ) );\n* // returns false\n*\n* @example\n* import { isObject as isNumber } from '@stdlib/assert-is-number';\n*\n* var bool = isNumber( 3.14 );\n* // returns false\n*\n* bool = isNumber( new Number( 3.14 ) );\n* // returns true\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'isPrimitive', isPrimitive );\nsetReadOnly( main, 'isObject', isObject );\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Double-precision floating-point positive infinity.\n*\n* @module @stdlib/constants-float64-pinf\n* @type {number}\n*\n* @example\n* import FLOAT64_PINF from '@stdlib/constants-float64-pinf';\n* // returns Infinity\n*/\n\n\n// MAIN //\n\n/**\n* Double-precision floating-point positive infinity.\n*\n* ## Notes\n*\n* Double-precision floating-point positive infinity has the bit sequence\n*\n* ```binarystring\n* 0 11111111111 00000000000000000000 00000000000000000000000000000000\n* ```\n*\n* @constant\n* @type {number}\n* @default Number.POSITIVE_INFINITY\n* @see [IEEE 754]{@link https://en.wikipedia.org/wiki/IEEE_754-1985}\n*/\nvar FLOAT64_PINF = Number.POSITIVE_INFINITY; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default FLOAT64_PINF;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Double-precision floating-point negative infinity.\n*\n* @module @stdlib/constants-float64-ninf\n* @type {number}\n*\n* @example\n* import FLOAT64_NINF from '@stdlib/constants-float64-ninf';\n* // returns -Infinity\n*/\n\n// MODULES //\n\nimport Number from '@stdlib/number-ctor';\n\n\n// MAIN //\n\n/**\n* Double-precision floating-point negative infinity.\n*\n* ## Notes\n*\n* Double-precision floating-point negative infinity has the bit sequence\n*\n* ```binarystring\n* 1 11111111111 00000000000000000000 00000000000000000000000000000000\n* ```\n*\n* @constant\n* @type {number}\n* @default Number.NEGATIVE_INFINITY\n* @see [IEEE 754]{@link https://en.wikipedia.org/wiki/IEEE_754-1985}\n*/\nvar FLOAT64_NINF = Number.NEGATIVE_INFINITY;\n\n\n// EXPORTS //\n\nexport default FLOAT64_NINF;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: implementation (?)\n\n/**\n* Rounds a double-precision floating-point number toward negative infinity.\n*\n* @param {number} x - input value\n* @returns {number} rounded value\n*\n* @example\n* var v = floor( -4.2 );\n* // returns -5.0\n*\n* @example\n* var v = floor( 9.99999 );\n* // returns 9.0\n*\n* @example\n* var v = floor( 0.0 );\n* // returns 0.0\n*\n* @example\n* var v = floor( NaN );\n* // returns NaN\n*/\nvar floor = Math.floor; // eslint-disable-line stdlib/no-builtin-math\n\n\n// EXPORTS //\n\nexport default floor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport floor from '@stdlib/math-base-special-floor';\n\n\n// MAIN //\n\n/**\n* Tests if a finite double-precision floating-point number is an integer.\n*\n* @param {number} x - value to test\n* @returns {boolean} boolean indicating whether the value is an integer\n*\n* @example\n* var bool = isInteger( 1.0 );\n* // returns true\n*\n* @example\n* var bool = isInteger( 3.14 );\n* // returns false\n*/\nfunction isInteger( x ) {\n\treturn (floor(x) === x);\n}\n\n\n// EXPORTS //\n\nexport default isInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport PINF from '@stdlib/constants-float64-pinf';\nimport NINF from '@stdlib/constants-float64-ninf';\nimport isInt from '@stdlib/math-base-assert-is-integer';\n\n\n// MAIN //\n\n/**\n* Tests if a number primitive is an integer value.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a number primitive is an integer value\n*/\nfunction isInteger( value ) {\n\treturn (\n\t\tvalue < PINF &&\n\t\tvalue > NINF &&\n\t\tisInt( value )\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isNumber } from '@stdlib/assert-is-number';\nimport isInt from './integer.js';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a number primitive having an integer value.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number primitive having an integer value\n*\n* @example\n* var bool = isInteger( -3.0 );\n* // returns true\n*\n* @example\n* var bool = isInteger( new Number( -3.0 ) );\n* // returns false\n*/\nfunction isInteger( value ) {\n\treturn (\n\t\tisNumber( value ) &&\n\t\tisInt( value )\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isObject as isNumber } from '@stdlib/assert-is-number';\nimport isInt from './integer.js';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a number object having an integer value.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number object having an integer value\n*\n* @example\n* var bool = isInteger( 3.0 );\n* // returns false\n*\n* @example\n* var bool = isInteger( new Number( 3.0 ) );\n* // returns true\n*/\nfunction isInteger( value ) {\n\treturn (\n\t\tisNumber( value ) &&\n\t\tisInt( value.valueOf() )\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\n/**\n* Tests if a value is an integer.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an integer\n*\n* @example\n* var bool = isInteger( 5.0 );\n* // returns true\n*\n* @example\n* var bool = isInteger( new Number( 5.0 ) );\n* // returns true\n*\n* @example\n* var bool = isInteger( -3.14 );\n* // returns false\n*\n* @example\n* var bool = isInteger( null );\n* // returns false\n*/\nfunction isInteger( value ) {\n\treturn ( isPrimitive( value ) || isObject( value ) );\n}\n\n\n// EXPORTS //\n\nexport default isInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isInteger } from '@stdlib/assert-is-integer';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a number primitive having a nonnegative integer value.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number primitive having a nonnegative integer value\n*\n* @example\n* var bool = isNonNegativeInteger( 3.0 );\n* // returns true\n*\n* @example\n* var bool = isNonNegativeInteger( new Number( 3.0 ) );\n* // returns false\n*/\nfunction isNonNegativeInteger( value ) {\n\treturn (\n\t\tisInteger( value ) &&\n\t\tvalue >= 0\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isNonNegativeInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isObject as isInteger } from '@stdlib/assert-is-integer';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a number object having a nonnegative integer value.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number object having a nonnegative integer value\n*\n* @example\n* var bool = isNonNegativeInteger( 3.0 );\n* // returns false\n*\n* @example\n* var bool = isNonNegativeInteger( new Number( 3.0 ) );\n* // returns true\n*/\nfunction isNonNegativeInteger( value ) {\n\treturn (\n\t\tisInteger( value ) &&\n\t\tvalue.valueOf() >= 0\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isNonNegativeInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a nonnegative integer.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a nonnegative integer\n*\n* @example\n* var bool = isNonNegativeInteger( 5.0 );\n* // returns true\n*\n* @example\n* var bool = isNonNegativeInteger( new Number( 5.0 ) );\n* // returns true\n*\n* @example\n* var bool = isNonNegativeInteger( -5.0 );\n* // returns false\n*\n* @example\n* var bool = isNonNegativeInteger( 3.14 );\n* // returns false\n*\n* @example\n* var bool = isNonNegativeInteger( null );\n* // returns false\n*/\nfunction isNonNegativeInteger( value ) {\n\treturn ( isPrimitive( value ) || isObject( value ) );\n}\n\n\n// EXPORTS //\n\nexport default isNonNegativeInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test if a value is an integer.\n*\n* @module @stdlib/assert-is-integer\n*\n* @example\n* import isInteger from '@stdlib/assert-is-integer';\n*\n* var bool = isInteger( 5.0 );\n* // returns true\n*\n* bool = isInteger( new Number( 5.0 ) );\n* // returns true\n*\n* bool = isInteger( -3.14 );\n* // returns false\n*\n* bool = isInteger( null );\n* // returns false\n*\n* @example\n* // Use interface to check for integer primitives...\n* import { isPrimitive as isInteger } from '@stdlib/assert-is-integer';\n*\n* var bool = isInteger( -3.0 );\n* // returns true\n*\n* bool = isInteger( new Number( -3.0 ) );\n* // returns false\n*\n* @example\n* // Use interface to check for integer objects...\n* import { isObject as isInteger } from '@stdlib/assert-is-integer';\n*\n* var bool = isInteger( 3.0 );\n* // returns false\n*\n* bool = isInteger( new Number( 3.0 ) );\n* // returns true\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'isPrimitive', isPrimitive );\nsetReadOnly( main, 'isObject', isObject );\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test if a value is a nonnegative integer.\n*\n* @module @stdlib/assert-is-nonnegative-integer\n*\n* @example\n* import isNonNegativeInteger from '@stdlib/assert-is-nonnegative-integer';\n*\n* var bool = isNonNegativeInteger( 5.0 );\n* // returns true\n*\n* bool = isNonNegativeInteger( new Number( 5.0 ) );\n* // returns true\n*\n* bool = isNonNegativeInteger( -5.0 );\n* // returns false\n*\n* bool = isNonNegativeInteger( 3.14 );\n* // returns false\n*\n* bool = isNonNegativeInteger( null );\n* // returns false\n*\n* @example\n* import { isPrimitive as isNonNegativeInteger } from '@stdlib/assert-is-nonnegative-integer';\n*\n* var bool = isNonNegativeInteger( 3.0 );\n* // returns true\n*\n* bool = isNonNegativeInteger( new Number( 3.0 ) );\n* // returns false\n*\n* @example\n* import { isObject as isNonNegativeInteger } from '@stdlib/assert-is-nonnegative-integer';\n*\n* var bool = isNonNegativeInteger( 3.0 );\n* // returns false\n*\n* bool = isNonNegativeInteger( new Number( 3.0 ) );\n* // returns true\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'isPrimitive', isPrimitive );\nsetReadOnly( main, 'isObject', isObject );\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasFloat64Array = ( typeof Float64Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Float64Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a Float64Array\n*\n* @example\n* var bool = isFloat64Array( new Float64Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isFloat64Array( [] );\n* // returns false\n*/\nfunction isFloat64Array( value ) {\n\treturn (\n\t\t( hasFloat64Array && value instanceof Float64Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Float64Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isFloat64Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Float64Array === 'function' ) ? Float64Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Float64Array === 'function' ) ? Float64Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of double-precision floating-point numbers in the platform byte order.\n*\n* @module @stdlib/array-float64\n*\n* @example\n* import ctor from '@stdlib/array-float64';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasFloat64ArraySupport from '@stdlib/assert-has-float64array-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasFloat64ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isFloat64Array from '@stdlib/assert-is-float64array';\nimport GlobalFloat64Array from './float64array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Float64Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Float64Array` support\n*\n* @example\n* var bool = hasFloat64ArraySupport();\n* // returns \n*/\nfunction hasFloat64ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalFloat64Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = new GlobalFloat64Array( [ 1.0, 3.14, -3.14, NaN ] );\n\t\tbool = (\n\t\t\tisFloat64Array( arr ) &&\n\t\t\tarr[ 0 ] === 1.0 &&\n\t\t\tarr[ 1 ] === 3.14 &&\n\t\t\tarr[ 2 ] === -3.14 &&\n\t\t\tarr[ 3 ] !== arr[ 3 ]\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasFloat64ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of double-precision floating-point numbers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasFloat32Array = ( typeof Float32Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Float32Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a Float32Array\n*\n* @example\n* var bool = isFloat32Array( new Float32Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isFloat32Array( [] );\n* // returns false\n*/\nfunction isFloat32Array( value ) {\n\treturn (\n\t\t( hasFloat32Array && value instanceof Float32Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Float32Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isFloat32Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Float32Array === 'function' ) ? Float32Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Float32Array === 'function' ) ? Float32Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of single-precision floating-point numbers in the platform byte order.\n*\n* @module @stdlib/array-float32\n*\n* @example\n* import ctor from '@stdlib/array-float32';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasFloat32ArraySupport from '@stdlib/assert-has-float32array-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasFloat32ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isFloat32Array from '@stdlib/assert-is-float32array';\nimport PINF from '@stdlib/constants-float64-pinf';\nimport GlobalFloat32Array from './float32array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Float32Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Float32Array` support\n*\n* @example\n* var bool = hasFloat32ArraySupport();\n* // returns \n*/\nfunction hasFloat32ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalFloat32Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = new GlobalFloat32Array( [ 1.0, 3.14, -3.14, 5.0e40 ] );\n\t\tbool = (\n\t\t\tisFloat32Array( arr ) &&\n\t\t\tarr[ 0 ] === 1.0 &&\n\t\t\tarr[ 1 ] === 3.140000104904175 &&\n\t\t\tarr[ 2 ] === -3.140000104904175 &&\n\t\t\tarr[ 3 ] === PINF\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasFloat32ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of single-precision floating-point numbers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasInt16Array = ( typeof Int16Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is an Int16Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an Int16Array\n*\n* @example\n* var bool = isInt16Array( new Int16Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isInt16Array( [] );\n* // returns false\n*/\nfunction isInt16Array( value ) {\n\treturn (\n\t\t( hasInt16Array && value instanceof Int16Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Int16Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isInt16Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum signed 16-bit integer.\n*\n* @module @stdlib/constants-int16-max\n* @type {integer32}\n*\n* @example\n* import INT16_MAX from '@stdlib/constants-int16-max';\n* // returns 32767\n*/\n\n\n// MAIN //\n\n/**\n* Maximum signed 16-bit integer.\n*\n* ## Notes\n*\n* The number has the value\n*\n* ```tex\n* 2^{15} - 1\n* ```\n*\n* which corresponds to the bit sequence\n*\n* ```binarystring\n* 0111111111111111\n* ```\n*\n* @constant\n* @type {integer32}\n* @default 32767\n*/\nvar INT16_MAX = 32767|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default INT16_MAX;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Int16Array === 'function' ) ? Int16Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Int16Array === 'function' ) ? Int16Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of twos-complement 16-bit signed integers in the platform byte order.\n*\n* @module @stdlib/array-int16\n*\n* @example\n* import ctor from '@stdlib/array-int16';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasInt16ArraySupport from '@stdlib/assert-has-int16array-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasInt16ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isInt16Array from '@stdlib/assert-is-int16array';\nimport INT16_MAX from '@stdlib/constants-int16-max';\nimport INT16_MIN from '@stdlib/constants-int16-min';\nimport GlobalInt16Array from './int16array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Int16Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Int16Array` support\n*\n* @example\n* var bool = hasInt16ArraySupport();\n* // returns \n*/\nfunction hasInt16ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalInt16Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = new GlobalInt16Array( [ 1, 3.14, -3.14, INT16_MAX+1 ] );\n\t\tbool = (\n\t\t\tisInt16Array( arr ) &&\n\t\t\tarr[ 0 ] === 1 &&\n\t\t\tarr[ 1 ] === 3 && // truncation\n\t\t\tarr[ 2 ] === -3 && // truncation\n\t\t\tarr[ 3 ] === INT16_MIN // wrap around\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasInt16ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Minimum signed 16-bit integer.\n*\n* @module @stdlib/constants-int16-min\n* @type {integer32}\n*\n* @example\n* import INT16_MIN from '@stdlib/constants-int16-min';\n* // returns -32768\n*/\n\n\n// MAIN //\n\n/**\n* Minimum signed 16-bit integer.\n*\n* ## Notes\n*\n* The number has the value\n*\n* ```tex\n* -(2^{15})\n* ```\n*\n* which corresponds to the two's complement bit sequence\n*\n* ```binarystring\n* 1000000000000000\n* ```\n*\n* @constant\n* @type {integer32}\n* @default -32768\n*/\nvar INT16_MIN = -32768|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default INT16_MIN;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of twos-complement 16-bit signed integers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasInt32Array = ( typeof Int32Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is an Int32Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an Int32Array\n*\n* @example\n* var bool = isInt32Array( new Int32Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isInt32Array( [] );\n* // returns false\n*/\nfunction isInt32Array( value ) {\n\treturn (\n\t\t( hasInt32Array && value instanceof Int32Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Int32Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isInt32Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum signed 32-bit integer.\n*\n* @module @stdlib/constants-int32-max\n* @type {integer32}\n*\n* @example\n* import INT32_MAX from '@stdlib/constants-int32-max';\n* // returns 2147483647\n*/\n\n\n// MAIN //\n\n/**\n* Maximum signed 32-bit integer.\n*\n* ## Notes\n*\n* The number has the value\n*\n* ```tex\n* 2^{31} - 1\n* ```\n*\n* which corresponds to the bit sequence\n*\n* ```binarystring\n* 01111111111111111111111111111111\n* ```\n*\n* @constant\n* @type {integer32}\n* @default 2147483647\n*/\nvar INT32_MAX = 2147483647|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default INT32_MAX;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Int32Array === 'function' ) ? Int32Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Int32Array === 'function' ) ? Int32Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of twos-complement 32-bit signed integers in the platform byte order.\n*\n* @module @stdlib/array-int32\n*\n* @example\n* import ctor from '@stdlib/array-int32';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasInt32ArraySupport from '@stdlib/assert-has-int32array-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasInt32ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isInt32Array from '@stdlib/assert-is-int32array';\nimport INT32_MAX from '@stdlib/constants-int32-max';\nimport INT32_MIN from '@stdlib/constants-int32-min';\nimport GlobalInt32Array from './int32array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Int32Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Int32Array` support\n*\n* @example\n* var bool = hasInt32ArraySupport();\n* // returns \n*/\nfunction hasInt32ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalInt32Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = new GlobalInt32Array( [ 1, 3.14, -3.14, INT32_MAX+1 ] );\n\t\tbool = (\n\t\t\tisInt32Array( arr ) &&\n\t\t\tarr[ 0 ] === 1 &&\n\t\t\tarr[ 1 ] === 3 && // truncation\n\t\t\tarr[ 2 ] === -3 && // truncation\n\t\t\tarr[ 3 ] === INT32_MIN // wrap around\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasInt32ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Minimum signed 32-bit integer.\n*\n* @module @stdlib/constants-int32-min\n* @type {integer32}\n*\n* @example\n* import INT32_MIN from '@stdlib/constants-int32-min';\n* // returns -2147483648\n*/\n\n\n// MAIN //\n\n/**\n* Minimum signed 32-bit integer.\n*\n* ## Notes\n*\n* The number has the value\n*\n* ```tex\n* -(2^{31})\n* ```\n*\n* which corresponds to the two's complement bit sequence\n*\n* ```binarystring\n* 10000000000000000000000000000000\n* ```\n*\n* @constant\n* @type {integer32}\n* @default -2147483648\n*/\nvar INT32_MIN = -2147483648|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default INT32_MIN;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of twos-complement 32-bit signed integers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasInt8Array = ( typeof Int8Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is an Int8Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an Int8Array\n*\n* @example\n* var bool = isInt8Array( new Int8Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isInt8Array( [] );\n* // returns false\n*/\nfunction isInt8Array( value ) {\n\treturn (\n\t\t( hasInt8Array && value instanceof Int8Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Int8Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isInt8Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum signed 8-bit integer.\n*\n* @module @stdlib/constants-int8-max\n* @type {integer32}\n*\n* @example\n* import INT8_MAX from '@stdlib/constants-int8-max';\n* // returns 127\n*/\n\n\n// MAIN //\n\n/**\n* Maximum signed 8-bit integer.\n*\n* ## Notes\n*\n* The number is given by\n*\n* ```tex\n* 2^{7} - 1\n* ```\n*\n* which corresponds to the bit sequence\n*\n* ```binarystring\n* 01111111\n* ```\n*\n* @constant\n* @type {integer32}\n* @default 127\n*/\nvar INT8_MAX = 127|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default INT8_MAX;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Int8Array === 'function' ) ? Int8Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Int8Array === 'function' ) ? Int8Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of twos-complement 8-bit signed integers in the platform byte order.\n*\n* @module @stdlib/array-int8\n*\n* @example\n* import ctor from '@stdlib/array-int8';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasInt8ArraySupport from '@stdlib/assert-has-int8array-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasInt8ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isInt8Array from '@stdlib/assert-is-int8array';\nimport INT8_MAX from '@stdlib/constants-int8-max';\nimport INT8_MIN from '@stdlib/constants-int8-min';\nimport GlobalInt8Array from './int8array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Int8Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Int8Array` support\n*\n* @example\n* var bool = hasInt8ArraySupport();\n* // returns \n*/\nfunction hasInt8ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalInt8Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = new GlobalInt8Array( [ 1, 3.14, -3.14, INT8_MAX+1 ] );\n\t\tbool = (\n\t\t\tisInt8Array( arr ) &&\n\t\t\tarr[ 0 ] === 1 &&\n\t\t\tarr[ 1 ] === 3 && // truncation\n\t\t\tarr[ 2 ] === -3 && // truncation\n\t\t\tarr[ 3 ] === INT8_MIN // wrap around\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasInt8ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Minimum signed 8-bit integer.\n*\n* @module @stdlib/constants-int8-min\n* @type {integer32}\n*\n* @example\n* import INT8_MIN from '@stdlib/constants-int8-min';\n* // returns -128\n*/\n\n\n// MAIN //\n\n/**\n* Minimum signed 8-bit integer.\n*\n* ## Notes\n*\n* The number is given by\n*\n* ```tex\n* -(2^{7})\n* ```\n*\n* which corresponds to the two's complement bit sequence\n*\n* ```binarystring\n* 10000000\n* ```\n*\n* @constant\n* @type {integer32}\n* @default -128\n*/\nvar INT8_MIN = -128|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default INT8_MIN;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of twos-complement 8-bit signed integers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasUint16Array = ( typeof Uint16Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Uint16Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a Uint16Array\n*\n* @example\n* var bool = isUint16Array( new Uint16Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isUint16Array( [] );\n* // returns false\n*/\nfunction isUint16Array( value ) {\n\treturn (\n\t\t( hasUint16Array && value instanceof Uint16Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Uint16Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isUint16Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum unsigned 16-bit integer.\n*\n* @module @stdlib/constants-uint16-max\n* @type {integer32}\n*\n* @example\n* import UINT16_MAX from '@stdlib/constants-uint16-max';\n* // returns 65535\n*/\n\n\n// MAIN //\n\n/**\n* Maximum unsigned 16-bit integer.\n*\n* ## Notes\n*\n* The number has the value\n*\n* ```tex\n* 2^{16} - 1\n* ```\n*\n* which corresponds to the bit sequence\n*\n* ```binarystring\n* 1111111111111111\n* ```\n*\n* @constant\n* @type {integer32}\n* @default 65535\n*/\nvar UINT16_MAX = 65535|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default UINT16_MAX;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Uint16Array === 'function' ) ? Uint16Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Uint16Array === 'function' ) ? Uint16Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of 16-bit unsigned integers in the platform byte order.\n*\n* @module @stdlib/array-uint16\n*\n* @example\n* import ctor from '@stdlib/array-uint16';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasUint16ArraySupport from '@stdlib/assert-has-uint16array-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasUint16ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isUint16Array from '@stdlib/assert-is-uint16array';\nimport UINT16_MAX from '@stdlib/constants-uint16-max';\nimport GlobalUint16Array from './uint16array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Uint16Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Uint16Array` support\n*\n* @example\n* var bool = hasUint16ArraySupport();\n* // returns \n*/\nfunction hasUint16ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalUint16Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = [ 1, 3.14, -3.14, UINT16_MAX+1, UINT16_MAX+2 ];\n\t\tarr = new GlobalUint16Array( arr );\n\t\tbool = (\n\t\t\tisUint16Array( arr ) &&\n\t\t\tarr[ 0 ] === 1 &&\n\t\t\tarr[ 1 ] === 3 && // truncation\n\t\t\tarr[ 2 ] === UINT16_MAX-2 && // truncation and wrap around\n\t\t\tarr[ 3 ] === 0 && // wrap around\n\t\t\tarr[ 4 ] === 1 // wrap around\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasUint16ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of 16-bit unsigned integers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasUint32Array = ( typeof Uint32Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Uint32Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a Uint32Array\n*\n* @example\n* var bool = isUint32Array( new Uint32Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isUint32Array( [] );\n* // returns false\n*/\nfunction isUint32Array( value ) {\n\treturn (\n\t\t( hasUint32Array && value instanceof Uint32Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Uint32Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isUint32Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum unsigned 32-bit integer.\n*\n* @module @stdlib/constants-uint32-max\n* @type {uinteger32}\n*\n* @example\n* import UINT32_MAX from '@stdlib/constants-uint32-max';\n* // returns 4294967295\n*/\n\n\n// MAIN //\n\n/**\n* Maximum unsigned 32-bit integer.\n*\n* ## Notes\n*\n* The number has the value\n*\n* ```tex\n* 2^{32} - 1\n* ```\n*\n* which corresponds to the bit sequence\n*\n* ```binarystring\n* 11111111111111111111111111111111\n* ```\n*\n* @constant\n* @type {uinteger32}\n* @default 4294967295\n*/\nvar UINT32_MAX = 4294967295;\n\n\n// EXPORTS //\n\nexport default UINT32_MAX;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Uint32Array === 'function' ) ? Uint32Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Uint32Array === 'function' ) ? Uint32Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of 32-bit unsigned integers in the platform byte order.\n*\n* @module @stdlib/array-uint32\n*\n* @example\n* import ctor from '@stdlib/array-uint32';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasUint32ArraySupport from '@stdlib/assert-has-uint32array-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasUint32ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isUint32Array from '@stdlib/assert-is-uint32array';\nimport UINT32_MAX from '@stdlib/constants-uint32-max';\nimport GlobalUint32Array from './uint32array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Uint32Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Uint32Array` support\n*\n* @example\n* var bool = hasUint32ArraySupport();\n* // returns \n*/\nfunction hasUint32ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalUint32Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = [ 1, 3.14, -3.14, UINT32_MAX+1, UINT32_MAX+2 ];\n\t\tarr = new GlobalUint32Array( arr );\n\t\tbool = (\n\t\t\tisUint32Array( arr ) &&\n\t\t\tarr[ 0 ] === 1 &&\n\t\t\tarr[ 1 ] === 3 && // truncation\n\t\t\tarr[ 2 ] === UINT32_MAX-2 && // truncation and wrap around\n\t\t\tarr[ 3 ] === 0 && // wrap around\n\t\t\tarr[ 4 ] === 1 // wrap around\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasUint32ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of 32-bit unsigned integers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasUint8Array = ( typeof Uint8Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Uint8Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a Uint8Array\n*\n* @example\n* var bool = isUint8Array( new Uint8Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isUint8Array( [] );\n* // returns false\n*/\nfunction isUint8Array( value ) {\n\treturn (\n\t\t( hasUint8Array && value instanceof Uint8Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Uint8Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isUint8Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum unsigned 8-bit integer.\n*\n* @module @stdlib/constants-uint8-max\n* @type {integer32}\n*\n* @example\n* import UINT8_MAX from '@stdlib/constants-uint8-max';\n* // returns 255\n*/\n\n\n// MAIN //\n\n/**\n* Maximum unsigned 8-bit integer.\n*\n* ## Notes\n*\n* The number has the value\n*\n* ```tex\n* 2^{8} - 1\n* ```\n*\n* which corresponds to the bit sequence\n*\n* ```binarystring\n* 11111111\n* ```\n*\n* @constant\n* @type {integer32}\n* @default 255\n*/\nvar UINT8_MAX = 255|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default UINT8_MAX;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Uint8Array === 'function' ) ? Uint8Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Uint8Array === 'function' ) ? Uint8Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of 8-bit unsigned integers in the platform byte order.\n*\n* @module @stdlib/array-uint8\n*\n* @example\n* import ctor from '@stdlib/array-uint8';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasUint8ArraySupport from '@stdlib/assert-has-uint8array-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasUint8ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isUint8Array from '@stdlib/assert-is-uint8array';\nimport UINT8_MAX from '@stdlib/constants-uint8-max';\nimport GlobalUint8Array from './uint8array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Uint8Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Uint8Array` support\n*\n* @example\n* var bool = hasUint8ArraySupport();\n* // returns \n*/\nfunction hasUint8ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalUint8Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = [ 1, 3.14, -3.14, UINT8_MAX+1, UINT8_MAX+2 ];\n\t\tarr = new GlobalUint8Array( arr );\n\t\tbool = (\n\t\t\tisUint8Array( arr ) &&\n\t\t\tarr[ 0 ] === 1 &&\n\t\t\tarr[ 1 ] === 3 && // truncation\n\t\t\tarr[ 2 ] === UINT8_MAX-2 && // truncation and wrap around\n\t\t\tarr[ 3 ] === 0 && // wrap around\n\t\t\tarr[ 4 ] === 1 // wrap around\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasUint8ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of 8-bit unsigned integers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasUint8ClampedArray = ( typeof Uint8ClampedArray === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Uint8ClampedArray.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a Uint8ClampedArray\n*\n* @example\n* var bool = isUint8ClampedArray( new Uint8ClampedArray( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isUint8ClampedArray( [] );\n* // returns false\n*/\nfunction isUint8ClampedArray( value ) {\n\treturn (\n\t\t( hasUint8ClampedArray && value instanceof Uint8ClampedArray ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Uint8ClampedArray]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isUint8ClampedArray;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Uint8ClampedArray === 'function' ) ? Uint8ClampedArray : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Uint8ClampedArray === 'function' ) ? Uint8ClampedArray : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of 8-bit unsigned integers in the platform byte order clamped to 0-255.\n*\n* @module @stdlib/array-uint8c\n*\n* @example\n* import ctor from '@stdlib/array-uint8c';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasUint8ClampedArraySupport from '@stdlib/assert-has-uint8clampedarray-support'; // eslint-disable-line id-length\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasUint8ClampedArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isUint8ClampedArray from '@stdlib/assert-is-uint8clampedarray';\nimport GlobalUint8ClampedArray from './uint8clampedarray.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Uint8ClampedArray` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Uint8ClampedArray` support\n*\n* @example\n* var bool = hasUint8ClampedArraySupport();\n* // returns \n*/\nfunction hasUint8ClampedArraySupport() { // eslint-disable-line id-length\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalUint8ClampedArray !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = new GlobalUint8ClampedArray( [ -1, 0, 1, 3.14, 4.99, 255, 256 ] );\n\t\tbool = (\n\t\t\tisUint8ClampedArray( arr ) &&\n\t\t\tarr[ 0 ] === 0 && // clamped\n\t\t\tarr[ 1 ] === 0 &&\n\t\t\tarr[ 2 ] === 1 &&\n\t\t\tarr[ 3 ] === 3 && // round to nearest\n\t\t\tarr[ 4 ] === 5 && // round to nearest\n\t\t\tarr[ 5 ] === 255 &&\n\t\t\tarr[ 6 ] === 255 // clamped\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasUint8ClampedArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of 8-bit unsigned integers in the platform byte order clamped to 0-255.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum length of a generic array.\n*\n* @module @stdlib/constants-array-max-array-length\n*\n* @example\n* import MAX_ARRAY_LENGTH from '@stdlib/constants-array-max-array-length';\n* // returns 4294967295\n*/\n\n// MAIN //\n\n/**\n* Maximum length of a generic array.\n*\n* ```tex\n* 2^{32} - 1\n* ```\n*\n* @constant\n* @type {uinteger32}\n* @default 4294967295\n*/\nvar MAX_ARRAY_LENGTH = 4294967295>>>0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default MAX_ARRAY_LENGTH;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isInteger from '@stdlib/math-base-assert-is-integer';\nimport MAX_LENGTH from '@stdlib/constants-array-max-array-length';\n\n\n// MAIN //\n\n/**\n* Tests if a value is an array-like object.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is an array-like object\n*\n* @example\n* var bool = isArrayLikeObject( [] );\n* // returns true\n*\n* @example\n* var bool = isArrayLikeObject( { 'length':10 } );\n* // returns true\n*\n* @example\n* var bool = isArrayLikeObject( 'beep' );\n* // returns false\n*/\nfunction isArrayLikeObject( value ) {\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\ttypeof value.length === 'number' &&\n\t\tisInteger( value.length ) &&\n\t\tvalue.length >= 0 &&\n\t\tvalue.length <= MAX_LENGTH\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isArrayLikeObject;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum length of a typed array.\n*\n* @module @stdlib/constants-array-max-typed-array-length\n*\n* @example\n* import MAX_TYPED_ARRAY_LENGTH from '@stdlib/constants-array-max-typed-array-length';\n* // returns 9007199254740991\n*/\n\n// MAIN //\n\n/**\n* Maximum length of a typed array.\n*\n* ```tex\n* 2^{53} - 1\n* ```\n*\n* @constant\n* @type {number}\n* @default 9007199254740991\n*/\nvar MAX_TYPED_ARRAY_LENGTH = 9007199254740991;\n\n\n// EXPORTS //\n\nexport default MAX_TYPED_ARRAY_LENGTH;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isInteger from '@stdlib/math-base-assert-is-integer';\nimport MAX_LENGTH from '@stdlib/constants-array-max-typed-array-length';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a collection.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether a value is a collection\n*\n* @example\n* var bool = isCollection( [] );\n* // returns true\n*\n* @example\n* var bool = isCollection( {} );\n* // returns false\n*/\nfunction isCollection( value ) {\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\ttypeof value.length === 'number' &&\n\t\tisInteger( value.length ) &&\n\t\tvalue.length >= 0 &&\n\t\tvalue.length <= MAX_LENGTH\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isCollection;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasArrayBuffer = ( typeof ArrayBuffer === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is an ArrayBuffer.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an ArrayBuffer\n*\n* @example\n* import ArrayBuffer from '@stdlib/array-buffer';\n*\n* var bool = isArrayBuffer( new ArrayBuffer( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isArrayBuffer( [] );\n* // returns false\n*/\nfunction isArrayBuffer( value ) {\n\treturn (\n\t\t( hasArrayBuffer && value instanceof ArrayBuffer ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object ArrayBuffer]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isArrayBuffer;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar f;\n\n\n// FUNCTIONS //\n\n/**\n* Tests if a value is an array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an array\n*\n* @example\n* var bool = isArray( [] );\n* // returns true\n*\n* @example\n* var bool = isArray( {} );\n* // returns false\n*/\nfunction isArray( value ) {\n\treturn ( nativeClass( value ) === '[object Array]' );\n}\n\n\n// MAIN //\n\nif ( Array.isArray ) {\n\tf = Array.isArray;\n} else {\n\tf = isArray;\n}\n\n\n// EXPORTS //\n\nexport default f;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isArray from '@stdlib/assert-is-array';\n\n\n// MAIN //\n\n/**\n* Tests if a value is an object; e.g., `{}`.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an object\n*\n* @example\n* var bool = isObject( {} );\n* // returns true\n*\n* @example\n* var bool = isObject( null );\n* // returns false\n*/\nfunction isObject( value ) {\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\t!isArray( value )\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isObject;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Tests if a value is a string primitive.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a string primitive\n*\n* @example\n* var bool = isString( 'beep' );\n* // returns true\n*\n* @example\n* var bool = isString( new String( 'beep' ) );\n* // returns false\n*/\nfunction isString( value ) {\n\treturn ( typeof value === 'string' );\n}\n\n\n// EXPORTS //\n\nexport default isString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// eslint-disable-next-line stdlib/no-redeclare\nvar valueOf = String.prototype.valueOf; // non-generic\n\n\n// EXPORTS //\n\nexport default valueOf;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport hasToStringTag from '@stdlib/assert-has-tostringtag-support';\nimport nativeClass from '@stdlib/utils-native-class';\nimport test from './try2valueof.js';\n\n\n// VARIABLES //\n\nvar FLG = hasToStringTag();\n\n\n// MAIN //\n\n/**\n* Tests if a value is a string object.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a string object\n*\n* @example\n* var bool = isString( new String( 'beep' ) );\n* // returns true\n*\n* @example\n* var bool = isString( 'beep' );\n* // returns false\n*/\nfunction isString( value ) {\n\tif ( typeof value === 'object' ) {\n\t\tif ( value instanceof String ) {\n\t\t\treturn true;\n\t\t}\n\t\tif ( FLG ) {\n\t\t\treturn test( value );\n\t\t}\n\t\treturn ( nativeClass( value ) === '[object String]' );\n\t}\n\treturn false;\n}\n\n\n// EXPORTS //\n\nexport default isString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport valueOf from './valueof.js'; // eslint-disable-line stdlib/no-redeclare\n\n\n// MAIN //\n\n/**\n* Attempts to extract a string value.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a string can be extracted\n*/\nfunction test( value ) {\n\ttry {\n\t\tvalueOf.call( value );\n\t\treturn true;\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\treturn false;\n\t}\n}\n\n\n// EXPORTS //\n\nexport default test;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a string.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a string\n*\n* @example\n* var bool = isString( new String( 'beep' ) );\n* // returns true\n*\n* @example\n* var bool = isString( 'beep' );\n* // returns true\n*/\nfunction isString( value ) {\n\treturn ( isPrimitive( value ) || isObject( value ) );\n}\n\n\n// EXPORTS //\n\nexport default isString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test if a value is a string.\n*\n* @module @stdlib/assert-is-string\n*\n* @example\n* import isString from '@stdlib/assert-is-string';\n*\n* var bool = isString( 'beep' );\n* // returns true\n*\n* bool = isString( new String( 'beep' ) );\n* // returns true\n*\n* bool = isString( 5 );\n* // returns false\n*\n* @example\n* import { isObject as isString } from '@stdlib/assert-is-string';\n*\n* var bool = isString( new String( 'beep' ) );\n* // returns true\n*\n* bool = isString( 'beep' );\n* // returns false\n*\n* @example\n* import { isPrimitive as isString } from '@stdlib/assert-is-string';\n*\n* var bool = isString( 'beep' );\n* // returns true\n*\n* bool = isString( new String( 'beep' ) );\n* // returns false\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'isPrimitive', isPrimitive );\nsetReadOnly( main, 'isObject', isObject );\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\nvar RE = /./;\n\n\n// EXPORTS //\n\nexport default RE;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Tests if a value is a boolean primitive.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a boolean primitive\n*\n* @example\n* var bool = isBoolean( true );\n* // returns true\n*\n* @example\n* var bool = isBoolean( false );\n* // returns true\n*\n* @example\n* import Boolean from '@stdlib/boolean-ctor';\n*\n* var bool = isBoolean( new Boolean( true ) );\n* // returns false\n*/\nfunction isBoolean( value ) {\n\treturn ( typeof value === 'boolean' );\n}\n\n\n// EXPORTS //\n\nexport default isBoolean;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Returns a boolean.\n*\n* @name Boolean\n* @constructor\n* @type {Function}\n* @param {*} value - input value\n* @returns {(boolean|Boolean)} boolean\n*\n* @example\n* var b = Boolean( null );\n* // returns false\n*\n* b = Boolean( [] );\n* // returns true\n*\n* b = Boolean( {} );\n* // returns true\n*\n* @example\n* var b = new Boolean( false );\n* // returns \n*/\nvar Bool = Boolean; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default Bool;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// eslint-disable-next-line stdlib/no-redeclare\nvar toString = Boolean.prototype.toString; // non-generic\n\n\n// EXPORTS //\n\nexport default toString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport hasToStringTag from '@stdlib/assert-has-tostringtag-support';\nimport nativeClass from '@stdlib/utils-native-class';\nimport Boolean from '@stdlib/boolean-ctor';\nimport test from './try2serialize.js';\n\n\n// VARIABLES //\n\nvar FLG = hasToStringTag();\n\n\n// MAIN //\n\n/**\n* Tests if a value is a boolean object.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a boolean object\n*\n* @example\n* var bool = isBoolean( true );\n* // returns false\n*\n* @example\n* import Boolean from '@stdlib/boolean-ctor';\n*\n* var bool = isBoolean( new Boolean( false ) );\n* // returns true\n*/\nfunction isBoolean( value ) {\n\tif ( typeof value === 'object' ) {\n\t\tif ( value instanceof Boolean ) {\n\t\t\treturn true;\n\t\t}\n\t\tif ( FLG ) {\n\t\t\treturn test( value );\n\t\t}\n\t\treturn ( nativeClass( value ) === '[object Boolean]' );\n\t}\n\treturn false;\n}\n\n\n// EXPORTS //\n\nexport default isBoolean;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport toString from './tostring.js'; // eslint-disable-line stdlib/no-redeclare\n\n\n// MAIN //\n\n/**\n* Attempts to serialize a value to a string.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value can be serialized\n*/\nfunction test( value ) {\n\ttry {\n\t\ttoString.call( value );\n\t\treturn true;\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\treturn false;\n\t}\n}\n\n\n// EXPORTS //\n\nexport default test;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a boolean.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a boolean\n*\n* @example\n* var bool = isBoolean( false );\n* // returns true\n*\n* @example\n* var bool = isBoolean( true );\n* // returns true\n*\n* @example\n* import Boolean from '@stdlib/boolean-ctor';\n*\n* var bool = isBoolean( new Boolean( false ) );\n* // returns true\n*\n* @example\n* import Boolean from '@stdlib/boolean-ctor';\n*\n* var bool = isBoolean( new Boolean( true ) );\n* // returns true\n*/\nfunction isBoolean( value ) {\n\treturn ( isPrimitive( value ) || isObject( value ) );\n}\n\n\n// EXPORTS //\n\nexport default isBoolean;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test if a value is a boolean.\n*\n* @module @stdlib/assert-is-boolean\n*\n* @example\n* import Boolean from '@stdlib/boolean-ctor';\n* import isBoolean from '@stdlib/assert-is-boolean';\n*\n* var bool = isBoolean( false );\n* // returns true\n*\n* bool = isBoolean( new Boolean( false ) );\n* // returns true\n*\n* @example\n* import Boolean from '@stdlib/boolean-ctor';\n* import { isPrimitive as isBoolean } from '@stdlib/assert-is-boolean';\n*\n* var bool = isBoolean( false );\n* // returns true\n*\n* bool = isBoolean( new Boolean( true ) );\n* // returns false\n*\n* @example\n* import Boolean from '@stdlib/boolean-ctor';\n* import { isObject as isBoolean } from '@stdlib/assert-is-boolean';\n*\n* var bool = isBoolean( true );\n* // returns false\n*\n* bool = isBoolean( new Boolean( false ) );\n* // returns true\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'isPrimitive', isPrimitive );\nsetReadOnly( main, 'isObject', isObject );\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar obj = ( typeof self === 'object' ) ? self : null;\n\n\n// EXPORTS //\n\nexport default obj;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar obj = ( typeof window === 'object' ) ? window : null;\n\n\n// EXPORTS //\n\nexport default obj;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar obj = ( typeof global === 'object' ) ? global : null;\n\n\n// EXPORTS //\n\nexport default obj;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar obj = ( typeof globalThis === 'object' ) ? globalThis : null; // eslint-disable-line no-undef\n\n\n// EXPORTS //\n\nexport default obj;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport getGlobal from '@stdlib/utils-global';\n\n\n// MAIN //\n\nvar root = getGlobal();\nvar nodeList = root.document && root.document.childNodes;\n\n\n// EXPORTS //\n\nexport default nodeList;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isBoolean } from '@stdlib/assert-is-boolean';\nimport format from '@stdlib/string-format';\nimport getThis from './codegen.js';\nimport Self from './self.js';\nimport Win from './window.js';\nimport Global from './global.js';\nimport GlobalThis from './global_this.js';\n\n\n// MAIN //\n\n/**\n* Returns the global object.\n*\n* ## Notes\n*\n* - Using code generation is the **most** reliable way to resolve the global object; however, doing so is likely to violate content security policies (CSPs) in, e.g., Chrome Apps and elsewhere.\n*\n* @param {boolean} [codegen=false] - boolean indicating whether to use code generation to resolve the global object\n* @throws {TypeError} must provide a boolean\n* @throws {Error} unable to resolve global object\n* @returns {Object} global object\n*\n* @example\n* var g = getGlobal();\n* // returns {...}\n*/\nfunction getGlobal( codegen ) {\n\tif ( arguments.length ) {\n\t\tif ( !isBoolean( codegen ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Must provide a boolean. Value: `%s`.', codegen ) );\n\t\t}\n\t\tif ( codegen ) {\n\t\t\treturn getThis();\n\t\t}\n\t\t// Fall through...\n\t}\n\t// Case: 2020 revision of ECMAScript standard\n\tif ( GlobalThis ) {\n\t\treturn GlobalThis;\n\t}\n\t// Case: browsers and web workers\n\tif ( Self ) {\n\t\treturn Self;\n\t}\n\t// Case: browsers\n\tif ( Win ) {\n\t\treturn Win;\n\t}\n\t// Case: Node.js\n\tif ( Global ) {\n\t\treturn Global;\n\t}\n\t// Case: unknown\n\tthrow new Error( 'unexpected error. Unable to resolve global object.' );\n}\n\n\n// EXPORTS //\n\nexport default getGlobal;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Returns the global object using code generation.\n*\n* @private\n* @returns {Object} global object\n*/\nfunction getGlobal() {\n\treturn new Function( 'return this;' )(); // eslint-disable-line no-new-func, stdlib/require-globals\n}\n\n\n// EXPORTS //\n\nexport default getGlobal;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\nvar typedarray = Int8Array; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default typedarray;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Returns a regular expression to capture everything that is not a space immediately after the `function` keyword and before the first left parenthesis.\n*\n* @returns {RegExp} regular expression\n*\n* @example\n* var RE_FUNCTION_NAME = reFunctionName();\n*\n* function fname( fcn ) {\n* return RE_FUNCTION_NAME.exec( fcn.toString() )[ 1 ];\n* }\n*\n* var fn = fname( Math.sqrt );\n* // returns 'sqrt'\n*\n* fn = fname( Int8Array );\n* // returns 'Int8Array'\n*\n* fn = fname( Object.prototype.toString );\n* // returns 'toString'\n*\n* fn = fname( function(){} );\n* // returns ''\n*/\nfunction reFunctionName() {\n\treturn /^\\s*function\\s*([^(]*)/i;\n}\n\n\n// EXPORTS //\n\nexport default reFunctionName;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport reFunctionName from './main.js';\n\n\n// MAIN //\n\n/**\n* Captures everything that is not a space immediately after the `function` keyword and before the first left parenthesis.\n*\n* Regular expression: `/^\\s*function\\s*([^(]*)/i`\n*\n* - `/^\\s*`\n* - Match zero or more spaces at beginning\n*\n* - `function`\n* - Match the word `function`\n*\n* - `\\s*`\n* - Match zero or more spaces after the word `function`\n*\n* - `()`\n* - Capture\n*\n* - `[^(]*`\n* - Match anything except a left parenthesis `(` zero or more times\n*\n* - `/i`\n* - ignore case\n*\n* @constant\n* @type {RegExp}\n* @default /^\\s*function\\s*([^(]*)/i\n*/\nvar RE_FUNCTION_NAME = reFunctionName();\n\n\n// EXPORTS //\n\nexport default RE_FUNCTION_NAME;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Tests if a value is object-like.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether a value is object-like\n*\n* @example\n* var bool = isObjectLike( {} );\n* // returns true\n*\n* @example\n* var bool = isObjectLike( [] );\n* // returns true\n*\n* @example\n* var bool = isObjectLike( null );\n* // returns false\n*/\nfunction isObjectLike( value ) {\n\treturn (\n\t\tvalue !== null &&\n\t\ttypeof value === 'object'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isObjectLike;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\nimport { REGEXP as RE } from '@stdlib/regexp-function-name';\nimport isBuffer from '@stdlib/assert-is-buffer';\n\n\n// MAIN //\n\n/**\n* Determines the name of a value's constructor.\n*\n* @param {*} v - input value\n* @returns {string} name of a value's constructor\n*\n* @example\n* var v = constructorName( 'a' );\n* // returns 'String'\n*\n* @example\n* var v = constructorName( 5 );\n* // returns 'Number'\n*\n* @example\n* var v = constructorName( null );\n* // returns 'Null'\n*\n* @example\n* var v = constructorName( undefined );\n* // returns 'Undefined'\n*\n* @example\n* var v = constructorName( function noop() {} );\n* // returns 'Function'\n*/\nfunction constructorName( v ) {\n\tvar match;\n\tvar name;\n\tvar ctor;\n\tname = nativeClass( v ).slice( 8, -1 );\n\tif ( (name === 'Object' || name === 'Error') && v.constructor ) {\n\t\tctor = v.constructor;\n\t\tif ( typeof ctor.name === 'string' ) {\n\t\t\treturn ctor.name;\n\t\t}\n\t\tmatch = RE.exec( ctor.toString() );\n\t\tif ( match ) {\n\t\t\treturn match[ 1 ];\n\t\t}\n\t}\n\tif ( isBuffer( v ) ) {\n\t\treturn 'Buffer';\n\t}\n\treturn name;\n}\n\n\n// EXPORTS //\n\nexport default constructorName;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isObjectLike from '@stdlib/assert-is-object-like';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Buffer instance.\n*\n* @param {*} value - value to validate\n* @returns {boolean} boolean indicating if a value is a Buffer instance\n*\n* @example\n* var v = isBuffer( new Buffer( 'beep' ) );\n* // returns true\n*\n* @example\n* var v = isBuffer( new Buffer( [1,2,3,4] ) );\n* // returns true\n*\n* @example\n* var v = isBuffer( {} );\n* // returns false\n*\n* @example\n* var v = isBuffer( [] );\n* // returns false\n*/\nfunction isBuffer( value ) {\n\treturn (\n\t\tisObjectLike( value ) &&\n\t\t(\n\t\t\t// eslint-disable-next-line no-underscore-dangle\n\t\t\tvalue._isBuffer || // for envs missing Object.prototype.constructor (e.g., Safari 5-7)\n\t\t\t(\n\t\t\t\tvalue.constructor &&\n\n\t\t\t\t// WARNING: `typeof` is not a foolproof check, as certain envs consider RegExp and NodeList instances to be functions\n\t\t\t\ttypeof value.constructor.isBuffer === 'function' &&\n\t\t\t\tvalue.constructor.isBuffer( value )\n\t\t\t)\n\t\t)\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isBuffer;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Regular expression to capture everything that is not a space immediately after the `function` keyword and before the first left parenthesis.\n*\n* @module @stdlib/regexp-function-name\n*\n* @example\n* import reFunctionName from '@stdlib/regexp-function-name';\n* var RE_FUNCTION_NAME = reFunctionName();\n*\n* function fname( fcn ) {\n* return RE_FUNCTION_NAME.exec( fcn.toString() )[ 1 ];\n* }\n*\n* var fn = fname( Math.sqrt );\n* // returns 'sqrt'\n*\n* fn = fname( Int8Array );\n* // returns 'Int8Array'\n*\n* fn = fname( Object.prototype.toString );\n* // returns 'toString'\n*\n* fn = fname( function(){} );\n* // returns ''\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport REGEXP from './regexp.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'REGEXP', REGEXP );\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test if a value is object-like.\n*\n* @module @stdlib/assert-is-object-like\n*\n* @example\n* import isObjectLike from '@stdlib/assert-is-object-like';\n*\n* var bool = isObjectLike( {} );\n* // returns true\n*\n* bool = isObjectLike( [] );\n* // returns true\n*\n* bool = isObjectLike( null );\n* // returns false\n*\n* @example\n* import { isObjectLikeArray as isObjectLike } from '@stdlib/assert-is-object-like';\n*\n* var bool = isObjectLike( [ {}, [] ] );\n* // returns true\n*\n* bool = isObjectLike( [ {}, '3.0' ] );\n* // returns false\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport arrayfun from '@stdlib/assert-tools-array-function';\nimport main from './main.js';\n\n\n// VARIABLES //\n\nvar isObjectLikeArray = arrayfun( main );\n\n\n// MAIN //\n\nsetReadOnly( main, 'isObjectLikeArray', isObjectLikeArray );\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isArray from '@stdlib/assert-is-array';\nimport format from '@stdlib/string-format';\n\n\n// MAIN //\n\n/**\n* Returns a function which tests if every element in an array passes a test condition.\n*\n* @param {Function} predicate - function to apply\n* @throws {TypeError} must provide a function\n* @returns {Function} an array function\n*\n* @example\n* import isOdd from '@stdlib/assert-is-odd';\n*\n* var arr1 = [ 1, 3, 5, 7 ];\n* var arr2 = [ 3, 5, 8 ];\n*\n* var validate = arrayfcn( isOdd );\n*\n* var bool = validate( arr1 );\n* // returns true\n*\n* bool = validate( arr2 );\n* // returns false\n*/\nfunction arrayfcn( predicate ) {\n\tif ( typeof predicate !== 'function' ) {\n\t\tthrow new TypeError( format( 'invalid argument. Must provide a function. Value: `%s`.', predicate ) );\n\t}\n\treturn every;\n\n\t/**\n\t* Tests if every element in an array passes a test condition.\n\t*\n\t* @private\n\t* @param {*} value - value to test\n\t* @returns {boolean} boolean indicating whether a value is an array for which all elements pass a test condition\n\t*/\n\tfunction every( value ) {\n\t\tvar len;\n\t\tvar i;\n\t\tif ( !isArray( value ) ) {\n\t\t\treturn false;\n\t\t}\n\t\tlen = value.length;\n\t\tif ( len === 0 ) {\n\t\t\treturn false;\n\t\t}\n\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\tif ( predicate( value[ i ] ) === false ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}\n}\n\n\n// EXPORTS //\n\nexport default arrayfcn;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Determine a value's type.\n*\n* @module @stdlib/utils-type-of\n*\n* @example\n* import typeOf from '@stdlib/utils-type-of';\n*\n* var str = typeOf( 'a' );\n* // returns 'string'\n*\n* str = typeOf( 5 );\n* // returns 'number'\n*/\n\n// MODULES //\n\nimport usePolyfill from './check.js';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar main = ( usePolyfill() ) ? polyfill : builtin;\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport RE from './fixtures/re.js';\nimport nodeList from './fixtures/nodelist.js';\nimport typedarray from './fixtures/typedarray.js';\n\n\n// MAIN //\n\n/**\n* Checks whether a polyfill is needed when using the `typeof` operator.\n*\n* @private\n* @returns {boolean} boolean indicating whether a polyfill is needed\n*/\nfunction check() {\n\tif (\n\t\t// Chrome 1-12 returns 'function' for regular expression instances (see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/typeof):\n\t\ttypeof RE === 'function' ||\n\n\t\t// Safari 8 returns 'object' for typed array and weak map constructors (underscore #1929):\n\t\ttypeof typedarray === 'object' ||\n\n\t\t// PhantomJS 1.9 returns 'function' for `NodeList` instances (underscore #2236):\n\t\ttypeof nodeList === 'function'\n\t) {\n\t\treturn true;\n\t}\n\treturn false;\n}\n\n\n// EXPORTS //\n\nexport default check;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport ctorName from '@stdlib/utils-constructor-name';\n\n\n// MAIN //\n\n/**\n* Determines a value's type.\n*\n* @param {*} v - input value\n* @returns {string} string indicating the value's type\n*/\nfunction typeOf( v ) {\n\treturn ctorName( v ).toLowerCase();\n}\n\n\n// EXPORTS //\n\nexport default typeOf;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport ctorName from '@stdlib/utils-constructor-name';\n\n\n// NOTES //\n\n/*\n* Built-in `typeof` operator behavior:\n*\n* ```text\n* typeof null => 'object'\n* typeof undefined => 'undefined'\n* typeof 'a' => 'string'\n* typeof 5 => 'number'\n* typeof NaN => 'number'\n* typeof true => 'boolean'\n* typeof false => 'boolean'\n* typeof {} => 'object'\n* typeof [] => 'object'\n* typeof function foo(){} => 'function'\n* typeof function* foo(){} => 'object'\n* typeof Symbol() => 'symbol'\n* ```\n*\n*/\n\n\n// MAIN //\n\n/**\n* Determines a value's type.\n*\n* @param {*} v - input value\n* @returns {string} string indicating the value's type\n*/\nfunction typeOf( v ) {\n\tvar type;\n\n\t// Address `typeof null` => `object` (see http://wiki.ecmascript.org/doku.php?id=harmony:typeof_null):\n\tif ( v === null ) {\n\t\treturn 'null';\n\t}\n\ttype = typeof v;\n\n\t// If the `typeof` operator returned something other than `object`, we are done. Otherwise, we need to check for an internal class name or search for a constructor.\n\tif ( type === 'object' ) {\n\t\treturn ctorName( v ).toLowerCase();\n\t}\n\treturn type;\n}\n\n\n// EXPORTS //\n\nexport default typeOf;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport typeOf from '@stdlib/utils-type-of';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a function.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a function\n*\n* @example\n* function beep() {\n* return 'beep';\n* }\n*\n* var bool = isFunction( beep );\n* // returns true\n*/\nfunction isFunction( value ) {\n\t// Note: cannot use `typeof` directly, as various browser engines incorrectly return `'function'` when operating on non-function objects, such as regular expressions and NodeLists.\n\treturn ( typeOf( value ) === 'function' );\n}\n\n\n// EXPORTS //\n\nexport default isFunction;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isNumber } from '@stdlib/assert-is-number';\nimport defineProperty from '@stdlib/utils-define-property';\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport format from '@stdlib/string-format';\nimport toStr from './tostring.js';\nimport toJSON from './tojson.js';\n\n\n// MAIN //\n\n/**\n* 128-bit complex number constructor.\n*\n* @constructor\n* @param {number} real - real component\n* @param {number} imag - imaginary component\n* @throws {TypeError} must invoke using the `new` keyword\n* @throws {TypeError} real component must be a number\n* @throws {TypeError} imaginary component must be a number\n* @returns {Complex128} 128-bit complex number\n*\n* @example\n* var z = new Complex128( 5.0, 3.0 );\n* // returns \n*/\nfunction Complex128( real, imag ) {\n\tif ( !( this instanceof Complex128 ) ) {\n\t\tthrow new TypeError( 'invalid invocation. Constructor must be called with the `new` keyword.' );\n\t}\n\tif ( !isNumber( real ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Real component must be a number. Value: `%s`.', real ) );\n\t}\n\tif ( !isNumber( imag ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Imaginary component must be a number. Value: `%s`.', imag ) );\n\t}\n\tdefineProperty( this, 're', {\n\t\t'configurable': false,\n\t\t'enumerable': true,\n\t\t'writable': false,\n\t\t'value': real\n\t});\n\tdefineProperty( this, 'im', {\n\t\t'configurable': false,\n\t\t'enumerable': true,\n\t\t'writable': false,\n\t\t'value': imag\n\t});\n\treturn this;\n}\n\n/**\n* Size (in bytes) of each component.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex128\n* @type {integer}\n* @returns {integer} size of each component\n*\n* @example\n* var nbytes = Complex128.BYTES_PER_ELEMENT;\n* // returns 8\n*/\nsetReadOnly( Complex128, 'BYTES_PER_ELEMENT', 8 );\n\n/**\n* Size (in bytes) of each component.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex128.prototype\n* @type {integer}\n* @returns {integer} size of each component\n*\n* @example\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var nbytes = z.BYTES_PER_ELEMENT;\n* // returns 8\n*/\nsetReadOnly( Complex128.prototype, 'BYTES_PER_ELEMENT', 8 );\n\n/**\n* Length (in bytes) of a complex number.\n*\n* @name byteLength\n* @memberof Complex128.prototype\n* @type {integer}\n* @returns {integer} byte length\n*\n* @example\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var nbytes = z.byteLength;\n* // returns 16\n*/\nsetReadOnly( Complex128.prototype, 'byteLength', 16 );\n\n/**\n* Serializes a complex number as a string.\n*\n* @name toString\n* @memberof Complex128.prototype\n* @type {Function}\n* @returns {string} serialized complex number\n*\n* @example\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var str = z.toString();\n* // returns '5 + 3i'\n*/\nsetReadOnly( Complex128.prototype, 'toString', toStr );\n\n/**\n* Serializes a complex number as a JSON object.\n*\n* ## Notes\n*\n* - `JSON.stringify()` implicitly calls this method when stringifying a `Complex128` instance.\n*\n* @name toJSON\n* @memberof Complex128.prototype\n* @type {Function}\n* @returns {Object} serialized complex number\n*\n* @example\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var obj = z.toJSON();\n* // returns { 'type': 'Complex128', 're': 5.0, 'im': 3.0 }\n*/\nsetReadOnly( Complex128.prototype, 'toJSON', toJSON );\n\n\n// EXPORTS //\n\nexport default Complex128;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Serializes a complex number as a string.\n*\n* @private\n* @returns {string} serialized complex number\n*/\nfunction toString() { // eslint-disable-line stdlib/no-redeclare\n\t/* eslint-disable no-invalid-this */\n\tvar str = '' + this.re;\n\tif ( this.im < 0 ) {\n\t\tstr += ' - ' + (-this.im);\n\t} else {\n\t\tstr += ' + ' + this.im;\n\t}\n\tstr += 'i';\n\treturn str;\n}\n\n\n// EXPORTS //\n\nexport default toString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Serializes a complex number as a JSON object.\n*\n* @private\n* @returns {Object} JSON representation\n*/\nfunction toJSON() {\n\t/* eslint-disable no-invalid-this */\n\tvar out = {};\n\tout.type = 'Complex128';\n\tout.re = this.re;\n\tout.im = this.im;\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default toJSON;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar fround = ( typeof Math.fround === 'function' ) ? Math.fround : null; // eslint-disable-line stdlib/no-builtin-math\n\n\n// EXPORTS //\n\nexport default fround;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport Float32Array from '@stdlib/array-float32';\n\n\n// VARIABLES //\n\nvar FLOAT32_VIEW = new Float32Array( 1 );\n\n\n// MAIN //\n\n/**\n* Converts a double-precision floating-point number to the nearest single-precision floating-point number.\n*\n* @param {number} x - double-precision floating-point number\n* @returns {number} nearest single-precision floating-point number\n*\n* @example\n* var y = float64ToFloat32( 1.337 );\n* // returns 1.3370000123977661\n*/\nfunction float64ToFloat32( x ) {\n\tFLOAT32_VIEW[ 0 ] = x;\n\treturn FLOAT32_VIEW[ 0 ];\n}\n\n\n// EXPORTS //\n\nexport default float64ToFloat32;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Convert a double-precision floating-point number to the nearest single-precision floating-point number.\n*\n* @module @stdlib/number-float64-base-to-float32\n*\n* @example\n* import float64ToFloat32 from '@stdlib/number-float64-base-to-float32';\n*\n* var y = float64ToFloat32( 1.337 );\n* // returns 1.3370000123977661\n*/\n\n// MODULES //\n\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar float64ToFloat32;\nif ( typeof builtin === 'function' ) {\n\tfloat64ToFloat32 = builtin;\n} else {\n\tfloat64ToFloat32 = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default float64ToFloat32;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isNumber } from '@stdlib/assert-is-number';\nimport defineProperty from '@stdlib/utils-define-property';\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport float64ToFloat32 from '@stdlib/number-float64-base-to-float32';\nimport format from '@stdlib/string-format';\nimport toStr from './tostring.js';\nimport toJSON from './tojson.js';\n\n\n// MAIN //\n\n/**\n* 64-bit complex number constructor.\n*\n* @constructor\n* @param {number} real - real component\n* @param {number} imag - imaginary component\n* @throws {TypeError} must invoke using the `new` keyword\n* @throws {TypeError} real component must be a number\n* @throws {TypeError} imaginary component must be a number\n* @returns {Complex64} 64-bit complex number\n*\n* @example\n* var z = new Complex64( 5.0, 3.0 );\n* // returns \n*/\nfunction Complex64( real, imag ) {\n\tif ( !( this instanceof Complex64 ) ) {\n\t\tthrow new TypeError( 'invalid invocation. Constructor must be called with the `new` keyword.' );\n\t}\n\tif ( !isNumber( real ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Real component must be a number. Value: `%s`.', real ) );\n\t}\n\tif ( !isNumber( imag ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Imaginary component must be a number. Value: `%s`.', imag ) );\n\t}\n\tdefineProperty( this, 're', {\n\t\t'configurable': false,\n\t\t'enumerable': true,\n\t\t'writable': false,\n\t\t'value': float64ToFloat32( real )\n\t});\n\tdefineProperty( this, 'im', {\n\t\t'configurable': false,\n\t\t'enumerable': true,\n\t\t'writable': false,\n\t\t'value': float64ToFloat32( imag )\n\t});\n\treturn this;\n}\n\n/**\n* Size (in bytes) of each component.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex64\n* @type {integer}\n* @returns {integer} size of each component\n*\n* @example\n* var nbytes = Complex64.BYTES_PER_ELEMENT;\n* // returns 4\n*/\nsetReadOnly( Complex64, 'BYTES_PER_ELEMENT', 4 );\n\n/**\n* Size (in bytes) of each component.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex64.prototype\n* @type {integer}\n* @returns {integer} size of each component\n*\n* @example\n* var z = new Complex64( 5.0, 3.0 );\n*\n* var nbytes = z.BYTES_PER_ELEMENT;\n* // returns 4\n*/\nsetReadOnly( Complex64.prototype, 'BYTES_PER_ELEMENT', 4 );\n\n/**\n* Length (in bytes) of a complex number.\n*\n* @name byteLength\n* @memberof Complex64.prototype\n* @type {integer}\n* @returns {integer} byte length\n*\n* @example\n* var z = new Complex64( 5.0, 3.0 );\n*\n* var nbytes = z.byteLength;\n* // returns 8\n*/\nsetReadOnly( Complex64.prototype, 'byteLength', 8 );\n\n/**\n* Serializes a complex number as a string.\n*\n* @name toString\n* @memberof Complex64.prototype\n* @type {Function}\n* @returns {string} serialized complex number\n*\n* @example\n* var z = new Complex64( 5.0, 3.0 );\n*\n* var str = z.toString();\n* // returns '5 + 3i'\n*/\nsetReadOnly( Complex64.prototype, 'toString', toStr );\n\n/**\n* Serializes a complex number as a JSON object.\n*\n* ## Notes\n*\n* - `JSON.stringify()` implicitly calls this method when stringifying a `Complex64` instance.\n*\n* @name toJSON\n* @memberof Complex64.prototype\n* @type {Function}\n* @returns {Object} serialized complex number\n*\n* @example\n* var z = new Complex64( 5.0, 3.0 );\n*\n* var obj = z.toJSON();\n* // returns { 'type': 'Complex64', 're': 5.0, 'im': 3.0 }\n*/\nsetReadOnly( Complex64.prototype, 'toJSON', toJSON );\n\n\n// EXPORTS //\n\nexport default Complex64;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport Complex128 from '@stdlib/complex-float64';\nimport Complex64 from '@stdlib/complex-float32';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a complex number-like object.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a complex number-like object.\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n* import Complex64 from '@stdlib/complex-float32';\n*\n* var x = new Complex128( 4.0, 2.0 );\n* var bool = isComplexLike( x );\n* // returns true\n*\n* x = new Complex64( 4.0, 2.0 );\n* bool = isComplexLike( x );\n* // returns true\n*/\nfunction isComplexLike( value ) {\n\tif ( value instanceof Complex128 || value instanceof Complex64 ) {\n\t\treturn true;\n\t}\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\ttypeof value.re === 'number' &&\n\t\ttypeof value.im === 'number'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isComplexLike;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isInteger from '@stdlib/math-base-assert-is-integer';\n\n\n// MAIN //\n\n/**\n* Tests if a finite numeric value is an even number.\n*\n* @param {number} x - value to test\n* @returns {boolean} boolean indicating whether the value is an even number\n*\n* @example\n* var bool = isEven( 5.0 );\n* // returns false\n*\n* @example\n* var bool = isEven( -2.0 );\n* // returns true\n*\n* @example\n* var bool = isEven( 0.0 );\n* // returns true\n*\n* @example\n* var bool = isEven( NaN );\n* // returns false\n*/\nfunction isEven( x ) {\n\treturn isInteger( x/2.0 );\n}\n\n\n// EXPORTS //\n\nexport default isEven;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Serializes a complex number as a string.\n*\n* @private\n* @returns {string} serialized complex number\n*/\nfunction toString() { // eslint-disable-line stdlib/no-redeclare\n\t/* eslint-disable no-invalid-this */\n\tvar str = '' + this.re;\n\tif ( this.im < 0 ) {\n\t\tstr += ' - ' + (-this.im);\n\t} else {\n\t\tstr += ' + ' + this.im;\n\t}\n\tstr += 'i';\n\treturn str;\n}\n\n\n// EXPORTS //\n\nexport default toString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Serializes a complex number as a JSON object.\n*\n* @private\n* @returns {Object} JSON representation\n*/\nfunction toJSON() {\n\t/* eslint-disable no-invalid-this */\n\tvar out = {};\n\tout.type = 'Complex64';\n\tout.re = this.re;\n\tout.im = this.im;\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default toJSON;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// VARIABLES //\n\nvar BYTES_PER_ELEMENT = 8; // 4 bytes per float32 x (1 real + 1 imag component)\n\n\n// MAIN //\n\n/**\n* Returns a boolean indicating if a value is a `Complex64Array`.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a `Complex64Array`\n*\n* @example\n* import Complex64Array from '@stdlib/array-complex64';\n*\n* var bool = isComplex64Array( new Complex64Array( 10 ) );\n* // returns true\n*\n* bool = isComplex64Array( [] );\n* // returns false\n*/\nfunction isComplex64Array( value ) {\n\t// Note: the following is not robust and that is intentional. In this case, we are seeking a lower cost way to reasonably determine whether an input value is a `Complex64Array` in order to avoid walking the prototype chain and resolving constructors, which is necessary for robust identification of cross-realm instances. For more robust validation, see `@stdlib/assert/is-complex64array`.\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\tvalue.constructor.name === 'Complex64Array' &&\n\t\tvalue.BYTES_PER_ELEMENT === BYTES_PER_ELEMENT\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isComplex64Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// VARIABLES //\n\nvar BYTES_PER_ELEMENT = 16; // 8 bytes per float64 x (1 real + 1 imag component)\n\n\n// MAIN //\n\n/**\n* Returns a boolean indicating if a value is a `Complex128Array`.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a `Complex128Array`\n*\n* @example\n* import Complex128Array from '@stdlib/array-complex128';\n*\n* var bool = isComplex128Array( new Complex128Array( 10 ) );\n* // returns true\n*\n* bool = isComplex128Array( [] );\n* // returns false\n*/\nfunction isComplex128Array( value ) {\n\t// Note: the following is not robust and that is intentional. In this case, we are seeking a lower cost way to reasonably determine whether an input value is a `Complex128Array` in order to avoid walking the prototype chain and resolving constructors, which is necessary for robust identification of cross-realm instances. For more robust validation, see `@stdlib/assert/is-complex128array`.\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\tvalue.constructor.name === 'Complex128Array' &&\n\t\tvalue.BYTES_PER_ELEMENT === BYTES_PER_ELEMENT\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isComplex128Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport hasOwnProp from '@stdlib/assert-has-own-property';\nimport Symbol from '@stdlib/symbol-ctor';\n\n\n// MAIN //\n\n/**\n* Tests for native `Symbol.iterator` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Symbol.iterator` support\n*\n* @example\n* var bool = hasIteratorSymbolSupport();\n* // returns \n*/\nfunction hasIteratorSymbolSupport() {\n\treturn (\n\t\ttypeof Symbol === 'function' &&\n\t\ttypeof Symbol( 'foo' ) === 'symbol' &&\n\t\thasOwnProp( Symbol, 'iterator' ) &&\n\t\ttypeof Symbol.iterator === 'symbol'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default hasIteratorSymbolSupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport hasIteratorSymbolSupport from '@stdlib/assert-has-iterator-symbol-support';\n\n\n// MAIN //\n\n/**\n* Iterator symbol.\n*\n* @name IteratorSymbol\n* @constant\n* @type {(symbol|null)}\n*\n* @example\n* function iterator() {\n* var it;\n* var i;\n*\n* i = -1;\n*\n* it = {};\n* it.next = next;\n* it.return = done;\n*\n* if ( IteratorSymbol ) {\n* it[ IteratorSymbol ] = iterator;\n* }\n* return it;\n*\n* function next() {\n* i += 1;\n* return {\n* 'value': i,\n* 'done': false\n* };\n* }\n*\n* function done( value ) {\n* if ( arguments.length === 0 ) {\n* return {\n* 'done': true\n* };\n* }\n* return {\n* 'value': value,\n* 'done': true\n* };\n* }\n* }\n*\n* var obj = iterator();\n*/\nvar IteratorSymbol = ( hasIteratorSymbolSupport() ) ? Symbol.iterator : null;\n\n\n// EXPORTS //\n\nexport default IteratorSymbol;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport defineProperty from '@stdlib/utils-define-property';\n\n\n// MAIN //\n\n/**\n* Defines a non-enumerable read-only accessor.\n*\n* @param {Object} obj - object on which to define the property\n* @param {(string|symbol)} prop - property name\n* @param {Function} getter - accessor\n*\n* @example\n* function getter() {\n* return 'bar';\n* }\n*\n* var obj = {};\n*\n* setNonEnumerableReadOnlyAccessor( obj, 'foo', getter );\n*\n* try {\n* obj.foo = 'boop';\n* } catch ( err ) {\n* console.error( err.message );\n* }\n*/\nfunction setNonEnumerableReadOnlyAccessor( obj, prop, getter ) { // eslint-disable-line id-length\n\tdefineProperty( obj, prop, {\n\t\t'configurable': false,\n\t\t'enumerable': false,\n\t\t'get': getter\n\t});\n}\n\n\n// EXPORTS //\n\nexport default setNonEnumerableReadOnlyAccessor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Returns the real component of a single-precision complex floating-point number.\n*\n* @param {Complex} z - complex number\n* @returns {number} real component\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n*\n* var z = new Complex64( 5.0, 3.0 );\n*\n* var re = realf( z );\n* // returns 5.0\n*/\nfunction realf( z ) {\n\treturn z.re;\n}\n\n\n// EXPORTS //\n\nexport default realf;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Returns the imaginary component of a single-precision complex floating-point number.\n*\n* @param {Complex} z - complex number\n* @returns {number} imaginary component\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n*\n* var z = new Complex64( 5.0, 3.0 );\n*\n* var im = imagf( z );\n* // returns 3.0\n*/\nfunction imagf( z ) {\n\treturn z.im;\n}\n\n\n// EXPORTS //\n\nexport default imagf;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport Float32Array from '@stdlib/array-float32';\n\n\n// MAIN //\n\n/**\n* Reinterprets a `Complex64Array` as a `Float32Array`.\n*\n* @param {Complex64Array} x - input array\n* @param {NonNegativeInteger} offset - starting index\n* @returns {Float32Array} `Float32Array` view\n*\n* @example\n* import Complex64Array from '@stdlib/array-complex64';\n*\n* var x = new Complex64Array( 10 );\n*\n* var out = reinterpret( x, 0 );\n* // returns \n*\n* var bool = ( out.buffer === x.buffer );\n* // returns true\n*/\nfunction reinterpret( x, offset ) {\n\treturn new Float32Array( x.buffer, x.byteOffset+(x.BYTES_PER_ELEMENT*offset), 2*(x.length-offset) ); // eslint-disable-line max-len\n}\n\n\n// EXPORTS //\n\nexport default reinterpret;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport Float64Array from '@stdlib/array-float64';\n\n\n// MAIN //\n\n/**\n* Reinterprets a `Complex128Array` as a `Float64Array`.\n*\n* @param {Complex128Array} x - input array\n* @param {NonNegativeInteger} offset - starting index\n* @returns {Float64Array} `Float64Array` view\n*\n* @example\n* import Complex128Array from '@stdlib/array-complex128';\n*\n* var x = new Complex128Array( 10 );\n*\n* var out = reinterpret( x, 0 );\n* // returns \n*\n* var bool = ( out.buffer === x.buffer );\n* // returns true\n*/\nfunction reinterpret( x, offset ) {\n\treturn new Float64Array( x.buffer, x.byteOffset+(x.BYTES_PER_ELEMENT*offset), 2*(x.length-offset) ); // eslint-disable-line max-len\n}\n\n\n// EXPORTS //\n\nexport default reinterpret;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// VARIABLES //\n\nvar GETTERS = {\n\t'float64': getFloat64,\n\t'float32': getFloat32,\n\t'int32': getInt32,\n\t'int16': getInt16,\n\t'int8': getInt8,\n\t'uint32': getUint32,\n\t'uint16': getUint16,\n\t'uint8': getUint8,\n\t'uint8c': getUint8c,\n\t'generic': getGeneric,\n\t'default': getArrayLike\n};\n\n\n// FUNCTIONS //\n\n/**\n* Returns an element from a `Float64Array`.\n*\n* @private\n* @param {Float64Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n*\n* var arr = new Float64Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getFloat64( arr, 2 );\n* // returns 3.0\n*/\nfunction getFloat64( arr, idx ) {\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from a `Float32Array`.\n*\n* @private\n* @param {Float32Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Float32Array from '@stdlib/array-float32';\n*\n* var arr = new Float32Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getFloat32( arr, 2 );\n* // returns 3.0\n*/\nfunction getFloat32( arr, idx ) {\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from an `Int32Array`.\n*\n* @private\n* @param {Int32Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Int32Array from '@stdlib/array-int32';\n*\n* var arr = new Int32Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getInt32( arr, 2 );\n* // returns 3\n*/\nfunction getInt32( arr, idx ) { // eslint-disable-line stdlib/jsdoc-doctest-decimal-point\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from an `Int16Array`.\n*\n* @private\n* @param {Int16Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Int16Array from '@stdlib/array-int16';\n*\n* var arr = new Int16Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getInt16( arr, 2 );\n* // returns 3\n*/\nfunction getInt16( arr, idx ) { // eslint-disable-line stdlib/jsdoc-doctest-decimal-point\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from an `Int8Array`.\n*\n* @private\n* @param {Int8Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Int8Array from '@stdlib/array-int8';\n*\n* var arr = new Int8Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getInt8( arr, 2 );\n* // returns 3\n*/\nfunction getInt8( arr, idx ) { // eslint-disable-line stdlib/jsdoc-doctest-decimal-point\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from a `Uint32Array`.\n*\n* @private\n* @param {Uint32Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Uint32Array from '@stdlib/array-uint32';\n*\n* var arr = new Uint32Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getUint32( arr, 2 );\n* // returns 3\n*/\nfunction getUint32( arr, idx ) { // eslint-disable-line stdlib/jsdoc-doctest-decimal-point\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from a `Uint16Array`.\n*\n* @private\n* @param {Uint16Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Uint16Array from '@stdlib/array-uint16';\n*\n* var arr = new Uint16Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getUint16( arr, 2 );\n* // returns 3\n*/\nfunction getUint16( arr, idx ) { // eslint-disable-line stdlib/jsdoc-doctest-decimal-point\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from a `Uint8Array`.\n*\n* @private\n* @param {Uint8Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Uint8Array from '@stdlib/array-uint8';\n*\n* var arr = new Uint8Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getUint8( arr, 2 );\n* // returns 3\n*/\nfunction getUint8( arr, idx ) { // eslint-disable-line stdlib/jsdoc-doctest-decimal-point\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from a `Uint8ClampedArray`.\n*\n* @private\n* @param {Uint8ClampedArray} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Uint8ClampedArray from '@stdlib/array-uint8c';\n*\n* var arr = new Uint8ClampedArray( [ 1, 2, 3, 4 ] );\n*\n* var v = getUint8c( arr, 2 );\n* // returns 3\n*/\nfunction getUint8c( arr, idx ) { // eslint-disable-line stdlib/jsdoc-doctest-decimal-point\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from a generic `Array`.\n*\n* @private\n* @param {Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {*} element value\n*\n* @example\n* var arr = [ 1, 2, 3, 4 ];\n*\n* var v = getGeneric( arr, 2 );\n* // returns 3\n*/\nfunction getGeneric( arr, idx ) {\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from an indexed array-like object.\n*\n* @private\n* @param {Collection} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {*} element value\n*\n* @example\n* var arr = [ 1, 2, 3, 4 ];\n*\n* var v = getArrayLike( arr, 2 );\n* // returns 3\n*/\nfunction getArrayLike( arr, idx ) {\n\treturn arr[ idx ];\n}\n\n\n// MAIN //\n\n/**\n* Returns an accessor function for retrieving an element from an indexed array-like object.\n*\n* @param {string} dtype - array dtype\n* @returns {Function} accessor\n*\n* @example\n* import dtype from '@stdlib/array-dtype';\n*\n* var arr = [ 1, 2, 3, 4 ];\n*\n* var get = getter( dtype( arr ) );\n* var v = get( arr, 2 );\n* // returns 3\n*/\nfunction getter( dtype ) {\n\tvar f = GETTERS[ dtype ];\n\tif ( typeof f === 'function' ) {\n\t\treturn f;\n\t}\n\treturn GETTERS.default;\n}\n\n\n// EXPORTS //\n\nexport default getter;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// VARIABLES //\n\nvar GETTERS = {\n\t'complex128': getComplex128,\n\t'complex64': getComplex64,\n\t'default': getArrayLike\n};\n\n\n// FUNCTIONS //\n\n/**\n* Returns an element from a `Complex128Array`.\n*\n* @private\n* @param {Complex128Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Complex128Array from '@stdlib/array-complex128';\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* var arr = new Complex128Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getComplex128( arr, 1 );\n* // returns \n*\n* var re = real( v );\n* // returns 3.0\n*\n* var im = imag( v );\n* // returns 4.0\n*/\nfunction getComplex128( arr, idx ) {\n\treturn arr.get( idx );\n}\n\n/**\n* Returns an element from a `Complex64Array`.\n*\n* @private\n* @param {Complex64Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Complex64Array from '@stdlib/array-complex64';\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* var arr = new Complex64Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getComplex64( arr, 1 );\n* // returns \n*\n* var re = realf( v );\n* // returns 3.0\n*\n* var im = imagf( v );\n* // returns 4.0\n*/\nfunction getComplex64( arr, idx ) {\n\treturn arr.get( idx );\n}\n\n/**\n* Returns an element from an array-like object supporting the get/set protocol.\n*\n* @private\n* @param {Collection} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {*} element value\n*\n* @example\n* var arr = [ 1, 2, 3, 4 ];\n*\n* function get( idx ) {\n* return arr[ idx ];\n* }\n*\n* function set( value, idx ) {\n* arr[ idx ] = value;\n* }\n*\n* arr.get = get;\n* arr.set = set;\n*\n* var v = getArrayLike( arr, 2 );\n* // returns 3\n*/\nfunction getArrayLike( arr, idx ) {\n\treturn arr.get( idx );\n}\n\n\n// MAIN //\n\n/**\n* Returns an accessor function for retrieving an element from an array-like object supporting the get/set protocol.\n*\n* @param {string} dtype - array dtype\n* @returns {Function} accessor\n*\n* @example\n* import Complex64Array from '@stdlib/array-complex64';\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n* import dtype from '@stdlib/array-dtype';\n*\n* var arr = new Complex64Array( [ 1, 2, 3, 4 ] );\n*\n* var get = getter( dtype( arr ) );\n* var v = get( arr, 1 );\n* // returns \n*\n* var re = realf( v );\n* // returns 3.0\n*\n* var im = imagf( v );\n* // returns 4.0\n*/\nfunction getter( dtype ) {\n\tvar f = GETTERS[ dtype ];\n\tif ( typeof f === 'function' ) {\n\t\treturn f;\n\t}\n\treturn GETTERS.default;\n}\n\n\n// EXPORTS //\n\nexport default getter;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isArrayLikeObject from '@stdlib/assert-is-array-like-object';\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport realf from '@stdlib/complex-realf';\nimport imagf from '@stdlib/complex-imagf';\nimport format from '@stdlib/string-format';\n\n\n// MAIN //\n\n/**\n* Returns an array of iterated values.\n*\n* @private\n* @param {Object} it - iterator\n* @returns {(Array|TypeError)} array or an error\n*/\nfunction fromIterator( it ) {\n\tvar out;\n\tvar v;\n\tvar z;\n\n\tout = [];\n\twhile ( true ) {\n\t\tv = it.next();\n\t\tif ( v.done ) {\n\t\t\tbreak;\n\t\t}\n\t\tz = v.value;\n\t\tif ( isArrayLikeObject( z ) && z.length >= 2 ) {\n\t\t\tout.push( z[ 0 ], z[ 1 ] );\n\t\t} else if ( isComplexLike( z ) ) {\n\t\t\tout.push( realf( z ), imagf( z ) );\n\t\t} else {\n\t\t\treturn new TypeError( format( 'invalid argument. An iterator must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', z ) );\n\t\t}\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default fromIterator;\n","/* eslint-disable no-restricted-syntax, max-lines, no-invalid-this */\n\n/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isNonNegativeInteger } from '@stdlib/assert-is-nonnegative-integer';\nimport isArrayLikeObject from '@stdlib/assert-is-array-like-object';\nimport isCollection from '@stdlib/assert-is-collection';\nimport isArrayBuffer from '@stdlib/assert-is-arraybuffer';\nimport isObject from '@stdlib/assert-is-object';\nimport isArray from '@stdlib/assert-is-array';\nimport { isPrimitive as isString } from '@stdlib/assert-is-string';\nimport isFunction from '@stdlib/assert-is-function';\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport isEven from '@stdlib/math-base-assert-is-even';\nimport isInteger from '@stdlib/math-base-assert-is-integer';\nimport isComplex64Array from '@stdlib/array-base-assert-is-complex64array';\nimport isComplex128Array from '@stdlib/array-base-assert-is-complex128array';\nimport hasIteratorSymbolSupport from '@stdlib/assert-has-iterator-symbol-support';\nimport ITERATOR_SYMBOL from '@stdlib/symbol-iterator';\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport setReadOnlyAccessor from '@stdlib/utils-define-nonenumerable-read-only-accessor';\nimport Float32Array from '@stdlib/array-float32';\nimport Complex64 from '@stdlib/complex-float32';\nimport format from '@stdlib/string-format';\nimport realf from '@stdlib/complex-realf';\nimport imagf from '@stdlib/complex-imagf';\nimport floor from '@stdlib/math-base-special-floor';\nimport reinterpret64 from '@stdlib/strided-base-reinterpret-complex64';\nimport reinterpret128 from '@stdlib/strided-base-reinterpret-complex128';\nimport getter from '@stdlib/array-base-getter';\nimport accessorGetter from '@stdlib/array-base-accessor-getter';\nimport fromIterator from './from_iterator.js';\nimport fromIteratorMap from './from_iterator_map.js';\nimport fromArray from './from_array.js';\n\n\n// VARIABLES //\n\nvar BYTES_PER_ELEMENT = Float32Array.BYTES_PER_ELEMENT * 2;\nvar HAS_ITERATOR_SYMBOL = hasIteratorSymbolSupport();\n\n\n// FUNCTIONS //\n\n/**\n* Returns a boolean indicating if a value is a complex typed array.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a complex typed array\n*/\nfunction isComplexArray( value ) {\n\treturn (\n\t\tvalue instanceof Complex64Array ||\n\t\t(\n\t\t\ttypeof value === 'object' &&\n\t\t\tvalue !== null &&\n\t\t\t(\n\t\t\t\tvalue.constructor.name === 'Complex64Array' ||\n\t\t\t\tvalue.constructor.name === 'Complex128Array'\n\t\t\t) &&\n\t\t\ttypeof value._length === 'number' && // eslint-disable-line no-underscore-dangle\n\n\t\t\t// NOTE: we don't perform a more rigorous test here for a typed array for performance reasons, as robustly checking for a typed array instance could require walking the prototype tree and performing relatively expensive constructor checks...\n\t\t\ttypeof value._buffer === 'object' // eslint-disable-line no-underscore-dangle\n\t\t)\n\t);\n}\n\n/**\n* Returns a boolean indicating if a value is a complex typed array constructor.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a complex typed array constructor\n*/\nfunction isComplexArrayConstructor( value ) {\n\treturn (\n\t\tvalue === Complex64Array ||\n\n\t\t// NOTE: weaker test in order to avoid a circular dependency with Complex128Array...\n\t\tvalue.name === 'Complex128Array'\n\t);\n}\n\n/**\n* Retrieves a complex number from a complex number array buffer.\n*\n* @private\n* @param {Float32Array} buf - array buffer\n* @param {NonNegativeInteger} idx - element index\n* @returns {Complex64} complex number\n*/\nfunction getComplex64( buf, idx ) {\n\tidx *= 2;\n\treturn new Complex64( buf[ idx ], buf[ idx+1 ] );\n}\n\n\n// MAIN //\n\n/**\n* 64-bit complex number array constructor.\n*\n* @constructor\n* @param {(NonNegativeInteger|Collection|ArrayBuffer|Iterable)} [arg] - length, typed array, array-like object, buffer, or an iterable\n* @param {NonNegativeInteger} [byteOffset=0] - byte offset\n* @param {NonNegativeInteger} [length] - view length\n* @throws {RangeError} ArrayBuffer byte length must be a multiple of `8`\n* @throws {RangeError} array-like object and typed array input arguments must have a length which is a multiple of two\n* @throws {TypeError} if provided only a single argument, must provide a valid argument\n* @throws {TypeError} byte offset must be a nonnegative integer\n* @throws {RangeError} byte offset must be a multiple of `8`\n* @throws {TypeError} view length must be a positive multiple of `8`\n* @throws {RangeError} must provide sufficient memory to accommodate byte offset and view length requirements\n* @throws {TypeError} an iterator must return either a two element array containing real and imaginary components or a complex number\n* @returns {Complex64Array} complex number array\n*\n* @example\n* var arr = new Complex64Array();\n* // returns \n*\n* var len = arr.length;\n* // returns 0\n*\n* @example\n* var arr = new Complex64Array( 2 );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*\n* @example\n* var arr = new Complex64Array( [ 1.0, -1.0 ] );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* import ArrayBuffer from '@stdlib/array-buffer';\n*\n* var buf = new ArrayBuffer( 16 );\n* var arr = new Complex64Array( buf );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*\n* @example\n* import ArrayBuffer from '@stdlib/array-buffer';\n*\n* var buf = new ArrayBuffer( 16 );\n* var arr = new Complex64Array( buf, 8 );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* import ArrayBuffer from '@stdlib/array-buffer';\n*\n* var buf = new ArrayBuffer( 32 );\n* var arr = new Complex64Array( buf, 8, 2 );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*/\nfunction Complex64Array() {\n\tvar byteOffset;\n\tvar nargs;\n\tvar buf;\n\tvar len;\n\n\tnargs = arguments.length;\n\tif ( !(this instanceof Complex64Array) ) {\n\t\tif ( nargs === 0 ) {\n\t\t\treturn new Complex64Array();\n\t\t}\n\t\tif ( nargs === 1 ) {\n\t\t\treturn new Complex64Array( arguments[0] );\n\t\t}\n\t\tif ( nargs === 2 ) {\n\t\t\treturn new Complex64Array( arguments[0], arguments[1] );\n\t\t}\n\t\treturn new Complex64Array( arguments[0], arguments[1], arguments[2] );\n\t}\n\t// Create the underlying data buffer...\n\tif ( nargs === 0 ) {\n\t\tbuf = new Float32Array( 0 ); // backward-compatibility\n\t} else if ( nargs === 1 ) {\n\t\tif ( isNonNegativeInteger( arguments[0] ) ) {\n\t\t\tbuf = new Float32Array( arguments[0]*2 );\n\t\t} else if ( isCollection( arguments[0] ) ) {\n\t\t\tbuf = arguments[ 0 ];\n\t\t\tlen = buf.length;\n\n\t\t\t// If provided a \"generic\" array, peak at the first value, and, if the value is a complex number, try to process as an array of complex numbers, falling back to \"normal\" typed array initialization if we fail and ensuring consistency if the first value had not been a complex number...\n\t\t\tif ( len && isArray( buf ) && isComplexLike( buf[0] ) ) {\n\t\t\t\tbuf = fromArray( new Float32Array( len*2 ), buf );\n\t\t\t\tif ( buf === null ) {\n\t\t\t\t\t// We failed and we are now forced to allocate a new array :-(\n\t\t\t\t\tif ( !isEven( len ) ) {\n\t\t\t\t\t\tthrow new RangeError( format( 'invalid argument. Array-like object arguments must have a length which is a multiple of two. Length: `%u`.', len ) );\n\t\t\t\t\t}\n\t\t\t\t\t// We failed, so fall back to directly setting values...\n\t\t\t\t\tbuf = new Float32Array( arguments[0] );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ( isComplex64Array( buf ) ) {\n\t\t\t\t\tbuf = reinterpret64( buf, 0 );\n\t\t\t\t} else if ( isComplex128Array( buf ) ) {\n\t\t\t\t\tbuf = reinterpret128( buf, 0 );\n\t\t\t\t} else if ( !isEven( len ) ) {\n\t\t\t\t\tthrow new RangeError( format( 'invalid argument. Array-like object and typed array arguments must have a length which is a multiple of two. Length: `%u`.', len ) );\n\t\t\t\t}\n\t\t\t\tbuf = new Float32Array( buf );\n\t\t\t}\n\t\t} else if ( isArrayBuffer( arguments[0] ) ) {\n\t\t\tbuf = arguments[ 0 ];\n\t\t\tif ( !isInteger( buf.byteLength/BYTES_PER_ELEMENT ) ) {\n\t\t\t\tthrow new RangeError( format( 'invalid argument. ArrayBuffer byte length must be a multiple of %u. Byte length: `%u`.', BYTES_PER_ELEMENT, buf.byteLength ) );\n\t\t\t}\n\t\t\tbuf = new Float32Array( buf );\n\t\t} else if ( isObject( arguments[0] ) ) {\n\t\t\tbuf = arguments[ 0 ];\n\t\t\tif ( HAS_ITERATOR_SYMBOL === false ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Environment lacks Symbol.iterator support. Must provide a length, ArrayBuffer, typed array, or array-like object. Value: `%s`.', buf ) );\n\t\t\t}\n\t\t\tif ( !isFunction( buf[ ITERATOR_SYMBOL ] ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.', buf ) );\n\t\t\t}\n\t\t\tbuf = buf[ ITERATOR_SYMBOL ]();\n\t\t\tif ( !isFunction( buf.next ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.', buf ) ); // FIXME: `buf` is what is returned from above, NOT the original value\n\t\t\t}\n\t\t\tbuf = fromIterator( buf );\n\t\t\tif ( buf instanceof Error ) {\n\t\t\t\tthrow buf;\n\t\t\t}\n\t\t\tbuf = new Float32Array( buf );\n\t\t} else {\n\t\t\tthrow new TypeError( format( 'invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.', arguments[0] ) );\n\t\t}\n\t} else {\n\t\tbuf = arguments[ 0 ];\n\t\tif ( !isArrayBuffer( buf ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. First argument must be an ArrayBuffer. Value: `%s`.', buf ) );\n\t\t}\n\t\tbyteOffset = arguments[ 1 ];\n\t\tif ( !isNonNegativeInteger( byteOffset ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Byte offset must be a nonnegative integer. Value: `%s`.', byteOffset ) );\n\t\t}\n\t\tif ( !isInteger( byteOffset/BYTES_PER_ELEMENT ) ) {\n\t\t\tthrow new RangeError( format( 'invalid argument. Byte offset must be a multiple of %u. Value: `%u`.', BYTES_PER_ELEMENT, byteOffset ) );\n\t\t}\n\t\tif ( nargs === 2 ) {\n\t\t\tlen = buf.byteLength - byteOffset;\n\t\t\tif ( !isInteger( len/BYTES_PER_ELEMENT ) ) {\n\t\t\t\tthrow new RangeError( format( 'invalid arguments. ArrayBuffer view byte length must be a multiple of %u. View byte length: `%u`.', BYTES_PER_ELEMENT, len ) );\n\t\t\t}\n\t\t\tbuf = new Float32Array( buf, byteOffset );\n\t\t} else {\n\t\t\tlen = arguments[ 2 ];\n\t\t\tif ( !isNonNegativeInteger( len ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Length must be a nonnegative integer. Value: `%s`.', len ) );\n\t\t\t}\n\t\t\tif ( (len*BYTES_PER_ELEMENT) > (buf.byteLength-byteOffset) ) {\n\t\t\t\tthrow new RangeError( format( 'invalid arguments. ArrayBuffer has insufficient capacity. Either decrease the array length or provide a bigger buffer. Minimum capacity: `%u`.', len*BYTES_PER_ELEMENT ) );\n\t\t\t}\n\t\t\tbuf = new Float32Array( buf, byteOffset, len*2 );\n\t\t}\n\t}\n\tsetReadOnly( this, '_buffer', buf );\n\tsetReadOnly( this, '_length', buf.length/2 );\n\n\treturn this;\n}\n\n/**\n* Size (in bytes) of each array element.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex64Array\n* @readonly\n* @type {PositiveInteger}\n* @default 8\n*\n* @example\n* var nbytes = Complex64Array.BYTES_PER_ELEMENT;\n* // returns 8\n*/\nsetReadOnly( Complex64Array, 'BYTES_PER_ELEMENT', BYTES_PER_ELEMENT );\n\n/**\n* Constructor name.\n*\n* @name name\n* @memberof Complex64Array\n* @readonly\n* @type {string}\n* @default 'Complex64Array'\n*\n* @example\n* var str = Complex64Array.name;\n* // returns 'Complex64Array'\n*/\nsetReadOnly( Complex64Array, 'name', 'Complex64Array' );\n\n/**\n* Creates a new 64-bit complex number array from an array-like object or an iterable.\n*\n* @name from\n* @memberof Complex64Array\n* @type {Function}\n* @param {(Collection|Iterable)} src - array-like object or iterable\n* @param {Function} [clbk] - callback to invoke for each source element\n* @param {*} [thisArg] - context\n* @throws {TypeError} `this` context must be a constructor\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be an array-like object or an iterable\n* @throws {TypeError} second argument must be a function\n* @throws {RangeError} array-like objects must have a length which is a multiple of two\n* @throws {TypeError} an iterator must return either a two element array containing real and imaginary components or a complex number\n* @throws {TypeError} when provided an iterator, a callback must return either a two element array containing real and imaginary components or a complex number\n* @returns {Complex64Array} 64-bit complex number array\n*\n* @example\n* var arr = Complex64Array.from( [ 1.0, -1.0 ] );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n*\n* var arr = Complex64Array.from( [ new Complex64( 1.0, 1.0 ) ] );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* function clbk( v ) {\n* return new Complex64( realf(v)*2.0, imagf(v)*2.0 );\n* }\n*\n* var arr = Complex64Array.from( [ new Complex64( 1.0, 1.0 ) ], clbk );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*/\nsetReadOnly( Complex64Array, 'from', function from( src ) {\n\tvar thisArg;\n\tvar nargs;\n\tvar clbk;\n\tvar out;\n\tvar buf;\n\tvar tmp;\n\tvar get;\n\tvar len;\n\tvar flg;\n\tvar v;\n\tvar i;\n\tvar j;\n\tif ( !isFunction( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` context must be a constructor.' );\n\t}\n\tif ( !isComplexArrayConstructor( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tnargs = arguments.length;\n\tif ( nargs > 1 ) {\n\t\tclbk = arguments[ 1 ];\n\t\tif ( !isFunction( clbk ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be a function. Value: `%s`.', clbk ) );\n\t\t}\n\t\tif ( nargs > 2 ) {\n\t\t\tthisArg = arguments[ 2 ];\n\t\t}\n\t}\n\tif ( isComplexArray( src ) ) {\n\t\tlen = src.length;\n\t\tif ( clbk ) {\n\t\t\tout = new this( len );\n\t\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\t\tj = 0;\n\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\tv = clbk.call( thisArg, src.get( i ), i );\n\t\t\t\tif ( isComplexLike( v ) ) {\n\t\t\t\t\tbuf[ j ] = realf( v );\n\t\t\t\t\tbuf[ j+1 ] = imagf( v );\n\t\t\t\t} else if ( isArrayLikeObject( v ) && v.length >= 2 ) {\n\t\t\t\t\tbuf[ j ] = v[ 0 ];\n\t\t\t\t\tbuf[ j+1 ] = v[ 1 ];\n\t\t\t\t} else {\n\t\t\t\t\tthrow new TypeError( format( 'invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', v ) );\n\t\t\t\t}\n\t\t\t\tj += 2; // stride\n\t\t\t}\n\t\t\treturn out;\n\t\t}\n\t\treturn new this( src );\n\t}\n\tif ( isCollection( src ) ) {\n\t\tif ( clbk ) {\n\t\t\t// Note: array contents affect how we iterate over a provided data source. If only complex number objects, we can extract real and imaginary components. Otherwise, for non-complex number arrays (e.g., `Float64Array`, etc), we assume a strided array where real and imaginary components are interleaved. In the former case, we expect a callback to return real and imaginary components (possibly as a complex number). In the latter case, we expect a callback to return *either* a real or imaginary component.\n\n\t\t\tlen = src.length;\n\t\t\tif ( src.get && src.set ) {\n\t\t\t\tget = accessorGetter( 'default' );\n\t\t\t} else {\n\t\t\t\tget = getter( 'default' );\n\t\t\t}\n\t\t\t// Detect whether we've been provided an array which returns complex number objects...\n\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\tif ( !isComplexLike( get( src, i ) ) ) {\n\t\t\t\t\tflg = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// If an array does not contain only complex number objects, then we assume interleaved real and imaginary components...\n\t\t\tif ( flg ) {\n\t\t\t\tif ( !isEven( len ) ) {\n\t\t\t\t\tthrow new RangeError( format( 'invalid argument. First argument must have a length which is a multiple of %u. Length: `%u`.', 2, len ) );\n\t\t\t\t}\n\t\t\t\tout = new this( len/2 );\n\t\t\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\t\tbuf[ i ] = clbk.call( thisArg, get( src, i ), i );\n\t\t\t\t}\n\t\t\t\treturn out;\n\t\t\t}\n\t\t\t// If an array contains only complex number objects, then we need to extract real and imaginary components...\n\t\t\tout = new this( len );\n\t\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\t\tj = 0;\n\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\tv = clbk.call( thisArg, get( src, i ), i );\n\t\t\t\tif ( isComplexLike( v ) ) {\n\t\t\t\t\tbuf[ j ] = realf( v );\n\t\t\t\t\tbuf[ j+1 ] = imagf( v );\n\t\t\t\t} else if ( isArrayLikeObject( v ) && v.length >= 2 ) {\n\t\t\t\t\tbuf[ j ] = v[ 0 ];\n\t\t\t\t\tbuf[ j+1 ] = v[ 1 ];\n\t\t\t\t} else {\n\t\t\t\t\tthrow new TypeError( format( 'invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', v ) );\n\t\t\t\t}\n\t\t\t\tj += 2; // stride\n\t\t\t}\n\t\t\treturn out;\n\t\t}\n\t\treturn new this( src );\n\t}\n\tif ( isObject( src ) && HAS_ITERATOR_SYMBOL && isFunction( src[ ITERATOR_SYMBOL ] ) ) { // eslint-disable-line max-len\n\t\tbuf = src[ ITERATOR_SYMBOL ]();\n\t\tif ( !isFunction( buf.next ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.', src ) );\n\t\t}\n\t\tif ( clbk ) {\n\t\t\ttmp = fromIteratorMap( buf, clbk, thisArg );\n\t\t} else {\n\t\t\ttmp = fromIterator( buf );\n\t\t}\n\t\tif ( tmp instanceof Error ) {\n\t\t\tthrow tmp;\n\t\t}\n\t\tlen = tmp.length / 2;\n\t\tout = new this( len );\n\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\tbuf[ i ] = tmp[ i ];\n\t\t}\n\t\treturn out;\n\t}\n\tthrow new TypeError( format( 'invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.', src ) );\n});\n\n/**\n* Creates a new 64-bit complex number array from a variable number of arguments.\n*\n* @name of\n* @memberof Complex64Array\n* @type {Function}\n* @param {...*} element - array elements\n* @throws {TypeError} `this` context must be a constructor\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Complex64Array} 64-bit complex number array\n*\n* @example\n* var arr = Complex64Array.of( 1.0, 1.0, 1.0, 1.0 );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*/\nsetReadOnly( Complex64Array, 'of', function of() {\n\tvar args;\n\tvar i;\n\tif ( !isFunction( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` context must be a constructor.' );\n\t}\n\tif ( !isComplexArrayConstructor( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\targs = [];\n\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\targs.push( arguments[ i ] );\n\t}\n\treturn new this( args );\n});\n\n/**\n* Returns an array element with support for both nonnegative and negative integer indices.\n*\n* @name at\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {integer} idx - element index\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} must provide an integer\n* @returns {(Complex64|void)} array element\n*\n* @example\n* var arr = new Complex64Array( 10 );\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* var z = arr.at( 0 );\n* // returns \n*\n* var re = realf( z );\n* // returns 0.0\n*\n* var im = imagf( z );\n* // returns 0.0\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 9.0, -9.0 ], 9 );\n*\n* z = arr.at( 0 );\n* // returns \n*\n* re = realf( z );\n* // returns 1.0\n*\n* im = imagf( z );\n* // returns -1.0\n*\n* z = arr.at( -1 );\n* // returns \n*\n* re = realf( z );\n* // returns 9.0\n*\n* im = imagf( z );\n* // returns -9.0\n*\n* z = arr.at( 100 );\n* // returns undefined\n*\n* z = arr.at( -100 );\n* // returns undefined\n*/\nsetReadOnly( Complex64Array.prototype, 'at', function at( idx ) {\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isInteger( idx ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Must provide an integer. Value: `%s`.', idx ) );\n\t}\n\tif ( idx < 0 ) {\n\t\tidx += this._length;\n\t}\n\tif ( idx < 0 || idx >= this._length ) {\n\t\treturn;\n\t}\n\treturn getComplex64( this._buffer, idx );\n});\n\n/**\n* Pointer to the underlying data buffer.\n*\n* @name buffer\n* @memberof Complex64Array.prototype\n* @readonly\n* @type {ArrayBuffer}\n*\n* @example\n* var arr = new Complex64Array( 10 );\n*\n* var buf = arr.buffer;\n* // returns \n*/\nsetReadOnlyAccessor( Complex64Array.prototype, 'buffer', function get() {\n\treturn this._buffer.buffer;\n});\n\n/**\n* Size (in bytes) of the array.\n*\n* @name byteLength\n* @memberof Complex64Array.prototype\n* @readonly\n* @type {NonNegativeInteger}\n*\n* @example\n* var arr = new Complex64Array( 10 );\n*\n* var byteLength = arr.byteLength;\n* // returns 80\n*/\nsetReadOnlyAccessor( Complex64Array.prototype, 'byteLength', function get() {\n\treturn this._buffer.byteLength;\n});\n\n/**\n* Offset (in bytes) of the array from the start of its underlying `ArrayBuffer`.\n*\n* @name byteOffset\n* @memberof Complex64Array.prototype\n* @readonly\n* @type {NonNegativeInteger}\n*\n* @example\n* var arr = new Complex64Array( 10 );\n*\n* var byteOffset = arr.byteOffset;\n* // returns 0\n*/\nsetReadOnlyAccessor( Complex64Array.prototype, 'byteOffset', function get() {\n\treturn this._buffer.byteOffset;\n});\n\n/**\n* Size (in bytes) of each array element.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex64Array.prototype\n* @readonly\n* @type {PositiveInteger}\n* @default 8\n*\n* @example\n* var arr = new Complex64Array( 10 );\n*\n* var nbytes = arr.BYTES_PER_ELEMENT;\n* // returns 8\n*/\nsetReadOnly( Complex64Array.prototype, 'BYTES_PER_ELEMENT', Complex64Array.BYTES_PER_ELEMENT );\n\n/**\n* Copies a sequence of elements within the array to the position starting at `target`.\n*\n* @name copyWithin\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {integer} target - index at which to start copying elements\n* @param {integer} start - source index at which to copy elements from\n* @param {integer} [end] - source index at which to stop copying elements from\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Complex64Array} modified array\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* var arr = new Complex64Array( 4 );\n*\n* // Set the array elements:\n* arr.set( new Complex64( 1.0, 1.0 ), 0 );\n* arr.set( new Complex64( 2.0, 2.0 ), 1 );\n* arr.set( new Complex64( 3.0, 3.0 ), 2 );\n* arr.set( new Complex64( 4.0, 4.0 ), 3 );\n*\n* // Copy the first two elements to the last two elements:\n* arr.copyWithin( 2, 0, 2 );\n*\n* // Get the last array element:\n* var z = arr.get( 3 );\n*\n* var re = realf( z );\n* // returns 2.0\n*\n* var im = imagf( z );\n* // returns 2.0\n*/\nsetReadOnly( Complex64Array.prototype, 'copyWithin', function copyWithin( target, start ) {\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\t// FIXME: prefer a functional `copyWithin` implementation which addresses lack of universal browser support (e.g., IE11 and Safari) or ensure that typed arrays are polyfilled\n\tif ( arguments.length === 2 ) {\n\t\tthis._buffer.copyWithin( target*2, start*2 );\n\t} else {\n\t\tthis._buffer.copyWithin( target*2, start*2, arguments[2]*2 );\n\t}\n\treturn this;\n});\n\n/**\n* Returns an iterator for iterating over array key-value pairs.\n*\n* @name entries\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Iterator} iterator\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n*\n* var arr = [\n* new Complex64( 1.0, 1.0 ),\n* new Complex64( 2.0, 2.0 ),\n* new Complex64( 3.0, 3.0 )\n* ];\n* arr = new Complex64Array( arr );\n*\n* // Create an iterator:\n* var it = arr.entries();\n*\n* // Iterate over the key-value pairs...\n* var v = it.next().value;\n* // returns [ 0, ]\n*\n* v = it.next().value;\n* // returns [ 1, ]\n*\n* v = it.next().value;\n* // returns [ 2, ]\n*\n* var bool = it.next().done;\n* // returns true\n*/\nsetReadOnly( Complex64Array.prototype, 'entries', function entries() {\n\tvar buffer;\n\tvar self;\n\tvar iter;\n\tvar len;\n\tvar FLG;\n\tvar i;\n\tvar j;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tself = this;\n\tbuffer = this._buffer;\n\tlen = this._length;\n\n\t// Initialize the iteration indices:\n\ti = -1;\n\tj = -2;\n\n\t// Create an iterator protocol-compliant object:\n\titer = {};\n\tsetReadOnly( iter, 'next', next );\n\tsetReadOnly( iter, 'return', end );\n\n\tif ( ITERATOR_SYMBOL ) {\n\t\tsetReadOnly( iter, ITERATOR_SYMBOL, factory );\n\t}\n\treturn iter;\n\n\t/**\n\t* Returns an iterator protocol-compliant object containing the next iterated value.\n\t*\n\t* @private\n\t* @returns {Object} iterator protocol-compliant object\n\t*/\n\tfunction next() {\n\t\tvar z;\n\t\ti += 1;\n\t\tif ( FLG || i >= len ) {\n\t\t\treturn {\n\t\t\t\t'done': true\n\t\t\t};\n\t\t}\n\t\tj += 2;\n\t\tz = new Complex64( buffer[ j ], buffer[ j+1 ] );\n\t\treturn {\n\t\t\t'value': [ i, z ],\n\t\t\t'done': false\n\t\t};\n\t}\n\n\t/**\n\t* Finishes an iterator.\n\t*\n\t* @private\n\t* @param {*} [value] - value to return\n\t* @returns {Object} iterator protocol-compliant object\n\t*/\n\tfunction end( value ) {\n\t\tFLG = true;\n\t\tif ( arguments.length ) {\n\t\t\treturn {\n\t\t\t\t'value': value,\n\t\t\t\t'done': true\n\t\t\t};\n\t\t}\n\t\treturn {\n\t\t\t'done': true\n\t\t};\n\t}\n\n\t/**\n\t* Returns a new iterator.\n\t*\n\t* @private\n\t* @returns {Iterator} iterator\n\t*/\n\tfunction factory() {\n\t\treturn self.entries();\n\t}\n});\n\n/**\n* Tests whether all elements in an array pass a test implemented by a predicate function.\n*\n* @name every\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {boolean} boolean indicating whether all elements pass a test\n*\n* @example\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* function predicate( v ) {\n* return ( realf( v ) === imagf( v ) );\n* }\n*\n* var arr = new Complex64Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var bool = arr.every( predicate );\n* // returns true\n*/\nsetReadOnly( Complex64Array.prototype, 'every', function every( predicate, thisArg ) {\n\tvar buf;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tif ( !predicate.call( thisArg, getComplex64( buf, i ), i, this ) ) {\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn true;\n});\n\n/**\n* Returns a modified typed array filled with a fill value.\n*\n* @name fill\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {ComplexLike} value - fill value\n* @param {integer} [start=0] - starting index (inclusive)\n* @param {integer} [end] - ending index (exclusive)\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a complex number\n* @throws {TypeError} second argument must be an integer\n* @throws {TypeError} third argument must be an integer\n*\n* @example\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* var arr = new Complex64Array( 3 );\n*\n* arr.fill( new Complex64( 1.0, 1.0 ), 1 );\n*\n* var z = arr.get( 1 );\n* // returns \n*\n* var re = realf( z );\n* // returns 1.0\n*\n* var im = imagf( z );\n* // returns 1.0\n*\n* z = arr.get( 1 );\n* // returns \n*\n* re = realf( z );\n* // returns 1.0\n*\n* im = imagf( z );\n* // returns 1.0\n*/\nsetReadOnly( Complex64Array.prototype, 'fill', function fill( value, start, end ) {\n\tvar buf;\n\tvar len;\n\tvar idx;\n\tvar re;\n\tvar im;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isComplexLike( value ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a complex number. Value: `%s`.', value ) );\n\t}\n\tbuf = this._buffer;\n\tlen = this._length;\n\tif ( arguments.length > 1 ) {\n\t\tif ( !isInteger( start ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be an integer. Value: `%s`.', start ) );\n\t\t}\n\t\tif ( start < 0 ) {\n\t\t\tstart += len;\n\t\t\tif ( start < 0 ) {\n\t\t\t\tstart = 0;\n\t\t\t}\n\t\t}\n\t\tif ( arguments.length > 2 ) {\n\t\t\tif ( !isInteger( end ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Third argument must be an integer. Value: `%s`.', end ) );\n\t\t\t}\n\t\t\tif ( end < 0 ) {\n\t\t\t\tend += len;\n\t\t\t\tif ( end < 0 ) {\n\t\t\t\t\tend = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( end > len ) {\n\t\t\t\tend = len;\n\t\t\t}\n\t\t} else {\n\t\t\tend = len;\n\t\t}\n\t} else {\n\t\tstart = 0;\n\t\tend = len;\n\t}\n\tre = realf( value );\n\tim = imagf( value );\n\tfor ( i = start; i < end; i++ ) {\n\t\tidx = 2*i;\n\t\tbuf[ idx ] = re;\n\t\tbuf[ idx+1 ] = im;\n\t}\n\treturn this;\n});\n\n/**\n* Returns a new array containing the elements of an array which pass a test implemented by a predicate function.\n*\n* @name filter\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {Complex64Array} complex number array\n*\n* @example\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* function predicate( v ) {\n* return ( realf( v ) === imagf( v ) );\n* }\n*\n* var arr = new Complex64Array( 3 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n*\n* var out = arr.filter( predicate );\n* // returns \n*\n* var len = out.length;\n* // returns 1\n*\n* var z = out.get( 0 );\n* // returns \n*\n* var re = realf( z );\n* // returns 2.0\n*\n* var im = imagf( z );\n* // returns 2.0\n*/\nsetReadOnly( Complex64Array.prototype, 'filter', function filter( predicate, thisArg ) {\n\tvar buf;\n\tvar out;\n\tvar i;\n\tvar z;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tout = [];\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tz = getComplex64( buf, i );\n\t\tif ( predicate.call( thisArg, z, i, this ) ) {\n\t\t\tout.push( z );\n\t\t}\n\t}\n\treturn new this.constructor( out );\n});\n\n/**\n* Returns the first element in an array for which a predicate function returns a truthy value.\n*\n* @name find\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {(Complex64|void)} array element or undefined\n*\n* @example\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n* import Complex64 from '@stdlib/complex-float32';\n*\n* function predicate( v ) {\n* return ( realf( v ) === imagf( v ) );\n* }\n*\n* var arr = new Complex64Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var z = arr.find( predicate );\n* // returns \n*\n* var re = realf( z );\n* // returns 1.0\n*\n* var im = imagf( z );\n* // returns 1.0\n*/\nsetReadOnly( Complex64Array.prototype, 'find', function find( predicate, thisArg ) {\n\tvar buf;\n\tvar i;\n\tvar z;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tz = getComplex64( buf, i );\n\t\tif ( predicate.call( thisArg, z, i, this ) ) {\n\t\t\treturn z;\n\t\t}\n\t}\n});\n\n/**\n* Returns the index of the first element in an array for which a predicate function returns a truthy value.\n*\n* @name findIndex\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {integer} index or -1\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* function predicate( v ) {\n* return ( realf( v ) === imagf( v ) );\n* }\n*\n* var arr = new Complex64Array( 3 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var idx = arr.findIndex( predicate );\n* // returns 2\n*/\nsetReadOnly( Complex64Array.prototype, 'findIndex', function findIndex( predicate, thisArg ) {\n\tvar buf;\n\tvar i;\n\tvar z;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tz = getComplex64( buf, i );\n\t\tif ( predicate.call( thisArg, z, i, this ) ) {\n\t\t\treturn i;\n\t\t}\n\t}\n\treturn -1;\n});\n\n/**\n* Returns the last element in an array for which a predicate function returns a truthy value.\n*\n* @name findLast\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {(Complex64|void)} array element or undefined\n*\n* @example\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n* import Complex64 from '@stdlib/complex-float32';\n*\n* function predicate( v ) {\n* return ( realf( v ) === imagf( v ) );\n* }\n*\n* var arr = new Complex64Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var z = arr.findLast( predicate );\n* // returns \n*\n* var re = realf( z );\n* // returns 3.0\n*\n* var im = imagf( z );\n* // returns 3.0\n*/\nsetReadOnly( Complex64Array.prototype, 'findLast', function findLast( predicate, thisArg ) {\n\tvar buf;\n\tvar i;\n\tvar z;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = this._length-1; i >= 0; i-- ) {\n\t\tz = getComplex64( buf, i );\n\t\tif ( predicate.call( thisArg, z, i, this ) ) {\n\t\t\treturn z;\n\t\t}\n\t}\n});\n\n/**\n* Returns the index of the last element in an array for which a predicate function returns a truthy value.\n*\n* @name findLastIndex\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {integer} index or -1\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* function predicate( v ) {\n* return ( realf( v ) === imagf( v ) );\n* }\n*\n* var arr = new Complex64Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n*\n* var idx = arr.findLastIndex( predicate );\n* // returns 1\n*/\nsetReadOnly( Complex64Array.prototype, 'findLastIndex', function findLastIndex( predicate, thisArg ) {\n\tvar buf;\n\tvar i;\n\tvar z;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = this._length-1; i >= 0; i-- ) {\n\t\tz = getComplex64( buf, i );\n\t\tif ( predicate.call( thisArg, z, i, this ) ) {\n\t\t\treturn i;\n\t\t}\n\t}\n\treturn -1;\n});\n\n/**\n* Invokes a function once for each array element.\n*\n* @name forEach\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {Function} fcn - function to invoke\n* @param {*} [thisArg] - function invocation context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n*\n* function log( v, i ) {\n* console.log( '%s: %s', i, v.toString() );\n* }\n*\n* var arr = new Complex64Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* arr.forEach( log );\n*/\nsetReadOnly( Complex64Array.prototype, 'forEach', function forEach( fcn, thisArg ) {\n\tvar buf;\n\tvar i;\n\tvar z;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( fcn ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', fcn ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tz = getComplex64( buf, i );\n\t\tfcn.call( thisArg, z, i, this );\n\t}\n});\n\n/**\n* Returns an array element.\n*\n* @name get\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {NonNegativeInteger} idx - element index\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} must provide a nonnegative integer\n* @returns {(Complex64|void)} array element\n*\n* @example\n* var arr = new Complex64Array( 10 );\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* var z = arr.get( 0 );\n* // returns \n*\n* var re = realf( z );\n* // returns 0.0\n*\n* var im = imagf( z );\n* // returns 0.0\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n*\n* z = arr.get( 0 );\n* // returns \n*\n* re = realf( z );\n* // returns 1.0\n*\n* im = imagf( z );\n* // returns -1.0\n*\n* z = arr.get( 100 );\n* // returns undefined\n*/\nsetReadOnly( Complex64Array.prototype, 'get', function get( idx ) {\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isNonNegativeInteger( idx ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Must provide a nonnegative integer. Value: `%s`.', idx ) );\n\t}\n\tif ( idx >= this._length ) {\n\t\treturn;\n\t}\n\treturn getComplex64( this._buffer, idx );\n});\n\n/**\n* Returns a boolean indicating whether an array includes a provided value.\n*\n* @name includes\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {ComplexLike} searchElement - search element\n* @param {integer} [fromIndex=0] - starting index (inclusive)\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a complex number\n* @throws {TypeError} second argument must be an integer\n* @returns {boolean} boolean indicating whether an array includes a provided value\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n*\n* var arr = new Complex64Array( 5 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n* arr.set( [ 4.0, -4.0 ], 3 );\n* arr.set( [ 5.0, -5.0 ], 4 );\n*\n* var bool = arr.includes( new Complex64( 3.0, -3.0 ) );\n* // returns true\n*\n* bool = arr.includes( new Complex64( 3.0, -3.0 ), 3 );\n* // returns false\n*\n* bool = arr.includes( new Complex64( 4.0, -4.0 ), -3 );\n* // returns true\n*/\nsetReadOnly( Complex64Array.prototype, 'includes', function includes( searchElement, fromIndex ) {\n\tvar buf;\n\tvar idx;\n\tvar re;\n\tvar im;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isComplexLike( searchElement ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a complex number. Value: `%s`.', searchElement ) );\n\t}\n\tif ( arguments.length > 1 ) {\n\t\tif ( !isInteger( fromIndex ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be an integer. Value: `%s`.', fromIndex ) );\n\t\t}\n\t\tif ( fromIndex < 0 ) {\n\t\t\tfromIndex += this._length;\n\t\t\tif ( fromIndex < 0 ) {\n\t\t\t\tfromIndex = 0;\n\t\t\t}\n\t\t}\n\t} else {\n\t\tfromIndex = 0;\n\t}\n\tre = realf( searchElement );\n\tim = imagf( searchElement );\n\tbuf = this._buffer;\n\tfor ( i = fromIndex; i < this._length; i++ ) {\n\t\tidx = 2 * i;\n\t\tif ( re === buf[ idx ] && im === buf[ idx+1 ] ) {\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n});\n\n/**\n* Returns the first index at which a given element can be found.\n*\n* @name indexOf\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {ComplexLike} searchElement - element to find\n* @param {integer} [fromIndex=0] - starting index (inclusive)\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a complex number\n* @throws {TypeError} second argument must be an integer\n* @returns {integer} index or -1\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n*\n* var arr = new Complex64Array( 10 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n* arr.set( [ 4.0, -4.0 ], 3 );\n* arr.set( [ 5.0, -5.0 ], 4 );\n*\n* var idx = arr.indexOf( new Complex64( 3.0, -3.0 ) );\n* // returns 2\n*\n* idx = arr.indexOf( new Complex64( 3.0, -3.0 ), 3 );\n* // returns -1\n*\n* idx = arr.indexOf( new Complex64( 4.0, -4.0 ), -3 );\n* // returns -1\n*/\nsetReadOnly( Complex64Array.prototype, 'indexOf', function indexOf( searchElement, fromIndex ) {\n\tvar buf;\n\tvar idx;\n\tvar re;\n\tvar im;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isComplexLike( searchElement ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a complex number. Value: `%s`.', searchElement ) );\n\t}\n\tif ( arguments.length > 1 ) {\n\t\tif ( !isInteger( fromIndex ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be an integer. Value: `%s`.', fromIndex ) );\n\t\t}\n\t\tif ( fromIndex < 0 ) {\n\t\t\tfromIndex += this._length;\n\t\t\tif ( fromIndex < 0 ) {\n\t\t\t\tfromIndex = 0;\n\t\t\t}\n\t\t}\n\t} else {\n\t\tfromIndex = 0;\n\t}\n\tre = realf( searchElement );\n\tim = imagf( searchElement );\n\tbuf = this._buffer;\n\tfor ( i = fromIndex; i < this._length; i++ ) {\n\t\tidx = 2 * i;\n\t\tif ( re === buf[ idx ] && im === buf[ idx+1 ] ) {\n\t\t\treturn i;\n\t\t}\n\t}\n\treturn -1;\n});\n\n/**\n* Returns a new string by concatenating all array elements.\n*\n* @name join\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {string} [separator=','] - element separator\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a string\n* @returns {string} string representation\n*\n* @example\n* var arr = new Complex64Array( 2 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n*\n* var str = arr.join();\n* // returns '1 + 1i,2 + 2i'\n*\n* str = arr.join( '/' );\n* // returns '1 + 1i/2 + 2i'\n*/\nsetReadOnly( Complex64Array.prototype, 'join', function join( separator ) {\n\tvar out;\n\tvar buf;\n\tvar sep;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( arguments.length === 0 ) {\n\t\tsep = ',';\n\t} else if ( isString( separator ) ) {\n\t\tsep = separator;\n\t} else {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a string. Value: `%s`.', separator ) );\n\t}\n\tout = [];\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tout.push( getComplex64( buf, i ).toString() );\n\t}\n\treturn out.join( sep );\n});\n\n/**\n* Returns the last index at which a given element can be found.\n*\n* @name lastIndexOf\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {ComplexLike} searchElement - element to find\n* @param {integer} [fromIndex] - index at which to start searching backward (inclusive)\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a complex number\n* @throws {TypeError} second argument must be an integer\n* @returns {integer} index or -1\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n*\n* var arr = new Complex64Array( 5 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n* arr.set( [ 4.0, -4.0 ], 3 );\n* arr.set( [ 3.0, -3.0 ], 4 );\n*\n* var idx = arr.lastIndexOf( new Complex64( 3.0, -3.0 ) );\n* // returns 4\n*\n* idx = arr.lastIndexOf( new Complex64( 3.0, -3.0 ), 3 );\n* // returns 2\n*\n* idx = arr.lastIndexOf( new Complex64( 5.0, -5.0 ), 3 );\n* // returns -1\n*\n* idx = arr.lastIndexOf( new Complex64( 2.0, -2.0 ), -3 );\n* // returns 1\n*/\nsetReadOnly( Complex64Array.prototype, 'lastIndexOf', function lastIndexOf( searchElement, fromIndex ) {\n\tvar buf;\n\tvar idx;\n\tvar re;\n\tvar im;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isComplexLike( searchElement ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a complex number. Value: `%s`.', searchElement ) );\n\t}\n\tif ( arguments.length > 1 ) {\n\t\tif ( !isInteger( fromIndex ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be an integer. Value: `%s`.', fromIndex ) );\n\t\t}\n\t\tif ( fromIndex >= this._length ) {\n\t\t\tfromIndex = this._length - 1;\n\t\t} else if ( fromIndex < 0 ) {\n\t\t\tfromIndex += this._length;\n\t\t}\n\t} else {\n\t\tfromIndex = this._length - 1;\n\t}\n\tre = realf( searchElement );\n\tim = imagf( searchElement );\n\tbuf = this._buffer;\n\tfor ( i = fromIndex; i >= 0; i-- ) {\n\t\tidx = 2 * i;\n\t\tif ( re === buf[ idx ] && im === buf[ idx+1 ] ) {\n\t\t\treturn i;\n\t\t}\n\t}\n\treturn -1;\n});\n\n/**\n* Number of array elements.\n*\n* @name length\n* @memberof Complex64Array.prototype\n* @readonly\n* @type {NonNegativeInteger}\n*\n* @example\n* var arr = new Complex64Array( 10 );\n*\n* var len = arr.length;\n* // returns 10\n*/\nsetReadOnlyAccessor( Complex64Array.prototype, 'length', function get() {\n\treturn this._length;\n});\n\n/**\n* Returns a new array with each element being the result of a provided callback function.\n*\n* @name map\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {Function} fcn - callback function\n* @param {*} [thisArg] - callback function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {Complex64Array} complex number array\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* function scale( v, i ) {\n* return new Complex64( 2.0*realf( v ), 2.0*imagf( v ) );\n* }\n*\n* var arr = new Complex64Array( 3 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n*\n* var out = arr.map( scale );\n* // returns \n*\n* var z = out.get( 0 );\n* // returns \n*\n* var re = realf( z );\n* // returns 2\n*\n* var im = imagf( z );\n* // returns -2\n*/\nsetReadOnly( Complex64Array.prototype, 'map', function map( fcn, thisArg ) {\n\tvar outbuf;\n\tvar buf;\n\tvar out;\n\tvar i;\n\tvar v;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( fcn ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', fcn ) );\n\t}\n\tbuf = this._buffer;\n\tout = new this.constructor( this._length );\n\toutbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tv = fcn.call( thisArg, getComplex64( buf, i ), i, this );\n\t\tif ( isComplexLike( v ) ) {\n\t\t\toutbuf[ 2*i ] = realf( v );\n\t\t\toutbuf[ (2*i)+1 ] = imagf( v );\n\t\t} else if ( isArrayLikeObject( v ) && v.length === 2 ) {\n\t\t\toutbuf[ 2*i ] = v[ 0 ];\n\t\t\toutbuf[ (2*i)+1 ] = v[ 1 ];\n\t\t} else {\n\t\t\tthrow new TypeError( format( 'invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', v ) );\n\t\t}\n\t}\n\treturn out;\n});\n\n/**\n* Applies a provided callback function to each element of the array, in order, passing in the return value from the calculation on the preceding element and returning the accumulated result upon completion.\n*\n* @name reduce\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {Function} reducer - callback function\n* @param {*} [initialValue] - initial value\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @throws {Error} if not provided an initial value, the array must have at least one element\n* @returns {*} accumulated result\n*\n* @example\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n* import caddf from '@stdlib/math-base-ops-caddf';\n*\n* var arr = new Complex64Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var z = arr.reduce( caddf );\n* // returns \n*\n* var re = realf( z );\n* // returns 6.0\n*\n* var im = imagf( z );\n* // returns 6.0\n*/\nsetReadOnly( Complex64Array.prototype, 'reduce', function reduce( reducer, initialValue ) {\n\tvar buf;\n\tvar acc;\n\tvar len;\n\tvar v;\n\tvar i;\n\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( reducer ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', reducer ) );\n\t}\n\tbuf = this._buffer;\n\tlen = this._length;\n\tif ( arguments.length > 1 ) {\n\t\tacc = initialValue;\n\t\ti = 0;\n\t} else {\n\t\tif ( len === 0 ) {\n\t\t\tthrow new Error( 'invalid operation. If not provided an initial value, an array must contain at least one element.' );\n\t\t}\n\t\tacc = getComplex64( buf, 0 );\n\t\ti = 1;\n\t}\n\tfor ( ; i < len; i++ ) {\n\t\tv = getComplex64( buf, i );\n\t\tacc = reducer( acc, v, i, this );\n\t}\n\treturn acc;\n});\n\n/**\n* Reverses an array in-place.\n*\n* @name reverse\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Complex64Array} reversed array\n*\n* @example\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* var arr = new Complex64Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var out = arr.reverse();\n* // returns \n*\n* var z = out.get( 0 );\n* // returns \n*\n* var re = realf( z );\n* // returns 3.0\n*\n* var im = imagf( z );\n* // returns 3.0\n*\n* z = out.get( 1 );\n* // returns \n*\n* re = realf( z );\n* // returns 2.0\n*\n* im = imagf( z );\n* // returns 2.0\n*\n* z = out.get( 2 );\n* // returns \n*\n* re = realf( z );\n* // returns 1.0\n*\n* im = imagf( z );\n* // returns 1.0\n*/\nsetReadOnly( Complex64Array.prototype, 'reverse', function reverse() {\n\tvar buf;\n\tvar tmp;\n\tvar len;\n\tvar N;\n\tvar i;\n\tvar j;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tlen = this._length;\n\tbuf = this._buffer;\n\tN = floor( len / 2 );\n\tfor ( i = 0; i < N; i++ ) {\n\t\tj = len - i - 1;\n\t\ttmp = buf[ (2*i) ];\n\t\tbuf[ (2*i) ] = buf[ (2*j) ];\n\t\tbuf[ (2*j) ] = tmp;\n\t\ttmp = buf[ (2*i)+1 ];\n\t\tbuf[ (2*i)+1 ] = buf[ (2*j)+1 ];\n\t\tbuf[ (2*j)+1 ] = tmp;\n\t}\n\treturn this;\n});\n\n/**\n* Sets an array element.\n*\n* ## Notes\n*\n* - When provided a typed array, real or complex, we must check whether the source array shares the same buffer as the target array and whether the underlying memory overlaps. In particular, we are concerned with the following scenario:\n*\n* ```text\n* buf: ---------------------\n* src: ---------------------\n* ```\n*\n* In the above, as we copy values from `src`, we will overwrite values in the `src` view, resulting in duplicated values copied into the end of `buf`, which is not intended. Hence, to avoid overwriting source values, we must **copy** source values to a temporary array.\n*\n* In the other overlapping scenario,\n*\n* ```text\n* buf: ---------------------\n* src: ---------------------\n* ```\n*\n* by the time we begin copying into the overlapping region, we are copying from the end of `src`, a non-overlapping region, which means we don't run the risk of copying copied values, rather than the original `src` values, as intended.\n*\n* @name set\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {(Collection|Complex|ComplexArray)} value - value(s)\n* @param {NonNegativeInteger} [i=0] - element index at which to start writing values\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be either a complex number, an array-like object, or a complex number array\n* @throws {TypeError} index argument must be a nonnegative integer\n* @throws {RangeError} array-like objects must have a length which is a multiple of two\n* @throws {RangeError} index argument is out-of-bounds\n* @throws {RangeError} target array lacks sufficient storage to accommodate source values\n* @returns {void}\n*\n* @example\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* var arr = new Complex64Array( 10 );\n*\n* var z = arr.get( 0 );\n* // returns \n*\n* var re = realf( z );\n* // returns 0.0\n*\n* var im = imagf( z );\n* // returns 0.0\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n*\n* z = arr.get( 0 );\n* // returns \n*\n* re = realf( z );\n* // returns 1.0\n*\n* im = imagf( z );\n* // returns -1.0\n*/\nsetReadOnly( Complex64Array.prototype, 'set', function set( value ) {\n\t/* eslint-disable no-underscore-dangle */\n\tvar sbuf;\n\tvar idx;\n\tvar buf;\n\tvar tmp;\n\tvar flg;\n\tvar N;\n\tvar v;\n\tvar i;\n\tvar j;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tbuf = this._buffer;\n\tif ( arguments.length > 1 ) {\n\t\tidx = arguments[ 1 ];\n\t\tif ( !isNonNegativeInteger( idx ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Index argument must be a nonnegative integer. Value: `%s`.', idx ) );\n\t\t}\n\t} else {\n\t\tidx = 0;\n\t}\n\tif ( isComplexLike( value ) ) {\n\t\tif ( idx >= this._length ) {\n\t\t\tthrow new RangeError( format( 'invalid argument. Index argument is out-of-bounds. Value: `%u`.', idx ) );\n\t\t}\n\t\tidx *= 2;\n\t\tbuf[ idx ] = realf( value );\n\t\tbuf[ idx+1 ] = imagf( value );\n\t\treturn;\n\t}\n\tif ( isComplexArray( value ) ) {\n\t\tN = value._length;\n\t\tif ( idx+N > this._length ) {\n\t\t\tthrow new RangeError( 'invalid arguments. Target array lacks sufficient storage to accommodate source values.' );\n\t\t}\n\t\tsbuf = value._buffer;\n\n\t\t// Check for overlapping memory...\n\t\tj = buf.byteOffset + (idx*BYTES_PER_ELEMENT);\n\t\tif (\n\t\t\tsbuf.buffer === buf.buffer &&\n\t\t\t(\n\t\t\t\tsbuf.byteOffset < j &&\n\t\t\t\tsbuf.byteOffset+sbuf.byteLength > j\n\t\t\t)\n\t\t) {\n\t\t\t// We need to copy source values...\n\t\t\ttmp = new Float32Array( sbuf.length );\n\t\t\tfor ( i = 0; i < sbuf.length; i++ ) {\n\t\t\t\ttmp[ i ] = sbuf[ i ];\n\t\t\t}\n\t\t\tsbuf = tmp;\n\t\t}\n\t\tidx *= 2;\n\t\tj = 0;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\tbuf[ idx ] = sbuf[ j ];\n\t\t\tbuf[ idx+1 ] = sbuf[ j+1 ];\n\t\t\tidx += 2; // stride\n\t\t\tj += 2; // stride\n\t\t}\n\t\treturn;\n\t}\n\tif ( isCollection( value ) ) {\n\t\t// Detect whether we've been provided an array of complex numbers...\n\t\tN = value.length;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\tif ( !isComplexLike( value[ i ] ) ) {\n\t\t\t\tflg = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t// If an array does not contain only complex numbers, then we assume interleaved real and imaginary components...\n\t\tif ( flg ) {\n\t\t\tif ( !isEven( N ) ) {\n\t\t\t\tthrow new RangeError( format( 'invalid argument. Array-like object arguments must have a length which is a multiple of two. Length: `%u`.', N ) );\n\t\t\t}\n\t\t\tif ( idx+(N/2) > this._length ) {\n\t\t\t\tthrow new RangeError( 'invalid arguments. Target array lacks sufficient storage to accommodate source values.' );\n\t\t\t}\n\t\t\tsbuf = value;\n\n\t\t\t// Check for overlapping memory...\n\t\t\tj = buf.byteOffset + (idx*BYTES_PER_ELEMENT);\n\t\t\tif (\n\t\t\t\tsbuf.buffer === buf.buffer &&\n\t\t\t\t(\n\t\t\t\t\tsbuf.byteOffset < j &&\n\t\t\t\t\tsbuf.byteOffset+sbuf.byteLength > j\n\t\t\t\t)\n\t\t\t) {\n\t\t\t\t// We need to copy source values...\n\t\t\t\ttmp = new Float32Array( N );\n\t\t\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\t\t\ttmp[ i ] = sbuf[ i ]; // TODO: handle accessor arrays\n\t\t\t\t}\n\t\t\t\tsbuf = tmp;\n\t\t\t}\n\t\t\tidx *= 2;\n\t\t\tN /= 2;\n\t\t\tj = 0;\n\t\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\t\tbuf[ idx ] = sbuf[ j ];\n\t\t\t\tbuf[ idx+1 ] = sbuf[ j+1 ];\n\t\t\t\tidx += 2; // stride\n\t\t\t\tj += 2; // stride\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\t// If an array contains only complex numbers, then we need to extract real and imaginary components...\n\t\tif ( idx+N > this._length ) {\n\t\t\tthrow new RangeError( 'invalid arguments. Target array lacks sufficient storage to accommodate source values.' );\n\t\t}\n\t\tidx *= 2;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\tv = value[ i ];\n\t\t\tbuf[ idx ] = realf( v );\n\t\t\tbuf[ idx+1 ] = imagf( v );\n\t\t\tidx += 2; // stride\n\t\t}\n\t\treturn;\n\t}\n\tthrow new TypeError( format( 'invalid argument. First argument must be either a complex number, an array-like object, or a complex number array. Value: `%s`.', value ) );\n\n\t/* eslint-enable no-underscore-dangle */\n});\n\n/**\n* Copies a portion of a typed array to a new typed array.\n*\n* @name slice\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {integer} [start=0] - starting index (inclusive)\n* @param {integer} [end] - ending index (exclusive)\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be an integer\n* @throws {TypeError} second argument must be an integer\n* @returns {Complex64Array} complex number array\n*\n* @example\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* var arr = new Complex64Array( 5 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n* arr.set( [ 4.0, -4.0 ], 3 );\n* arr.set( [ 5.0, -5.0 ], 4 );\n*\n* var out = arr.slice();\n* // returns \n*\n* var len = out.length;\n* // returns 5\n*\n* var z = out.get( 0 );\n* // returns \n*\n* var re = realf( z );\n* // returns 1.0\n*\n* var im = imagf( z );\n* // returns -1.0\n*\n* z = out.get( len-1 );\n* // returns \n*\n* re = realf( z );\n* // returns 5.0\n*\n* im = imagf( z );\n* // returns -5.0\n*\n* out = arr.slice( 1, -2 );\n* // returns \n*\n* len = out.length;\n* // returns 2\n*\n* z = out.get( 0 );\n* // returns \n*\n* re = realf( z );\n* // returns 2.0\n*\n* im = imagf( z );\n* // returns -2.0\n*\n* z = out.get( len-1 );\n* // returns \n*\n* re = realf( z );\n* // returns 3.0\n*\n* im = imagf( z );\n* // returns -3.0\n*/\nsetReadOnly( Complex64Array.prototype, 'slice', function slice( start, end ) {\n\tvar outlen;\n\tvar outbuf;\n\tvar out;\n\tvar idx;\n\tvar buf;\n\tvar len;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tbuf = this._buffer;\n\tlen = this._length;\n\tif ( arguments.length === 0 ) {\n\t\tstart = 0;\n\t\tend = len;\n\t} else {\n\t\tif ( !isInteger( start ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. First argument must be an integer. Value: `%s`.', start ) );\n\t\t}\n\t\tif ( start < 0 ) {\n\t\t\tstart += len;\n\t\t\tif ( start < 0 ) {\n\t\t\t\tstart = 0;\n\t\t\t}\n\t\t}\n\t\tif ( arguments.length === 1 ) {\n\t\t\tend = len;\n\t\t} else {\n\t\t\tif ( !isInteger( end ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be an integer. Value: `%s`.', end ) );\n\t\t\t}\n\t\t\tif ( end < 0 ) {\n\t\t\t\tend += len;\n\t\t\t\tif ( end < 0 ) {\n\t\t\t\t\tend = 0;\n\t\t\t\t}\n\t\t\t} else if ( end > len ) {\n\t\t\t\tend = len;\n\t\t\t}\n\t\t}\n\t}\n\tif ( start < end ) {\n\t\toutlen = end - start;\n\t} else {\n\t\toutlen = 0;\n\t}\n\tout = new this.constructor( outlen );\n\toutbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\tfor ( i = 0; i < outlen; i++ ) {\n\t\tidx = 2*(i+start);\n\t\toutbuf[ 2*i ] = buf[ idx ];\n\t\toutbuf[ (2*i)+1 ] = buf[ idx+1 ];\n\t}\n\treturn out;\n});\n\n/**\n* Tests whether at least one element in an array passes a test implemented by a predicate function.\n*\n* @name some\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {boolean} boolean indicating whether at least one element passes a test\n*\n* @example\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* function predicate( v ) {\n* return ( realf( v ) === imagf( v ) );\n* }\n*\n* var arr = new Complex64Array( 3 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n*\n* var bool = arr.some( predicate );\n* // returns true\n*/\nsetReadOnly( Complex64Array.prototype, 'some', function some( predicate, thisArg ) {\n\tvar buf;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tif ( predicate.call( thisArg, getComplex64( buf, i ), i, this ) ) {\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n});\n\n/**\n* Creates a new typed array view over the same underlying `ArrayBuffer` and with the same underlying data type as the host array.\n*\n* @name subarray\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {integer} [begin=0] - starting index (inclusive)\n* @param {integer} [end] - ending index (exclusive)\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be an integer\n* @throws {TypeError} second argument must be an integer\n* @returns {Complex64Array} subarray\n*\n* @example\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* var arr = new Complex64Array( 5 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n* arr.set( [ 4.0, -4.0 ], 3 );\n* arr.set( [ 5.0, -5.0 ], 4 );\n*\n* var subarr = arr.subarray();\n* // returns \n*\n* var len = subarr.length;\n* // returns 5\n*\n* var z = subarr.get( 0 );\n* // returns \n*\n* var re = realf( z );\n* // returns 1.0\n*\n* var im = imagf( z );\n* // returns -1.0\n*\n* z = subarr.get( len-1 );\n* // returns \n*\n* re = realf( z );\n* // returns 5.0\n*\n* im = imagf( z );\n* // returns -5.0\n*\n* subarr = arr.subarray( 1, -2 );\n* // returns \n*\n* len = subarr.length;\n* // returns 2\n*\n* z = subarr.get( 0 );\n* // returns \n*\n* re = realf( z );\n* // returns 2.0\n*\n* im = imagf( z );\n* // returns -2.0\n*\n* z = subarr.get( len-1 );\n* // returns \n*\n* re = realf( z );\n* // returns 3.0\n*\n* im = imagf( z );\n* // returns -3.0\n*/\nsetReadOnly( Complex64Array.prototype, 'subarray', function subarray( begin, end ) {\n\tvar offset;\n\tvar buf;\n\tvar len;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tbuf = this._buffer;\n\tlen = this._length;\n\tif ( arguments.length === 0 ) {\n\t\tbegin = 0;\n\t\tend = len;\n\t} else {\n\t\tif ( !isInteger( begin ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. First argument must be an integer. Value: `%s`.', begin ) );\n\t\t}\n\t\tif ( begin < 0 ) {\n\t\t\tbegin += len;\n\t\t\tif ( begin < 0 ) {\n\t\t\t\tbegin = 0;\n\t\t\t}\n\t\t}\n\t\tif ( arguments.length === 1 ) {\n\t\t\tend = len;\n\t\t} else {\n\t\t\tif ( !isInteger( end ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be an integer. Value: `%s`.', end ) );\n\t\t\t}\n\t\t\tif ( end < 0 ) {\n\t\t\t\tend += len;\n\t\t\t\tif ( end < 0 ) {\n\t\t\t\t\tend = 0;\n\t\t\t\t}\n\t\t\t} else if ( end > len ) {\n\t\t\t\tend = len;\n\t\t\t}\n\t\t}\n\t}\n\tif ( begin >= len ) {\n\t\tlen = 0;\n\t\toffset = buf.byteLength;\n\t} else if ( begin >= end ) {\n\t\tlen = 0;\n\t\toffset = buf.byteOffset + (begin*BYTES_PER_ELEMENT);\n\t} else {\n\t\tlen = end - begin;\n\t\toffset = buf.byteOffset + ( begin*BYTES_PER_ELEMENT );\n\t}\n\treturn new this.constructor( buf.buffer, offset, ( len < 0 ) ? 0 : len );\n});\n\n/**\n* Returns a new typed array containing the elements in reversed order.\n*\n* @name toReversed\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Complex64Array} reversed array\n*\n* @example\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* var arr = new Complex64Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var out = arr.toReversed();\n* // returns \n*\n* var z = out.get( 0 );\n* // returns \n*\n* var re = realf( z );\n* // returns 3.0\n*\n* var im = imagf( z );\n* // returns 3.0\n*\n* z = out.get( 1 );\n* // returns \n*\n* re = realf( z );\n* // returns 2.0\n*\n* im = imagf( z );\n* // returns 2.0\n*\n* z = out.get( 2 );\n* // returns \n*\n* re = realf( z );\n* // returns 1.0\n*\n* im = imagf( z );\n* // returns 1.0\n*/\nsetReadOnly( Complex64Array.prototype, 'toReversed', function toReversed() {\n\tvar outbuf;\n\tvar out;\n\tvar len;\n\tvar buf;\n\tvar i;\n\tvar j;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tlen = this._length;\n\tout = new this.constructor( len );\n\tbuf = this._buffer;\n\toutbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\tfor ( i = 0; i < len; i++ ) {\n\t\tj = len - i - 1;\n\t\toutbuf[ (2*i) ] = buf[ (2*j) ];\n\t\toutbuf[ (2*i)+1 ] = buf[ (2*j)+1 ];\n\t}\n\treturn out;\n});\n\n/**\n* Serializes an array as a string.\n*\n* @name toString\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @throws {TypeError} `this` must be a complex number array\n* @returns {string} string representation\n*\n* @example\n* var arr = new Complex64Array( 2 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n*\n* var str = arr.toString();\n* // returns '1 + 1i,2 + 2i'\n*/\nsetReadOnly( Complex64Array.prototype, 'toString', function toString() {\n\tvar out;\n\tvar buf;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tout = [];\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tout.push( getComplex64( buf, i ).toString() );\n\t}\n\treturn out.join( ',' );\n});\n\n/**\n* Returns a new typed array with the element at a provided index replaced with a provided value.\n*\n* @name with\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {integer} index - element index\n* @param {ComplexLike} value - new value\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be an integer\n* @throws {RangeError} index argument is out-of-bounds\n* @throws {TypeError} second argument must be a complex number\n* @returns {Complex64Array} new typed array\n*\n* @example\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n* import Complex64 from '@stdlib/complex-float32';\n*\n* var arr = new Complex64Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var out = arr.with( 0, new Complex64( 4.0, 4.0 ) );\n* // returns \n*\n* var z = out.get( 0 );\n* // returns \n*\n* var re = realf( z );\n* // returns 4.0\n*\n* var im = imagf( z );\n* // returns 4.0\n*/\nsetReadOnly( Complex64Array.prototype, 'with', function copyWith( index, value ) {\n\tvar buf;\n\tvar out;\n\tvar len;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isInteger( index ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be an integer. Value: `%s`.', index ) );\n\t}\n\tlen = this._length;\n\tif ( index < 0 ) {\n\t\tindex += len;\n\t}\n\tif ( index < 0 || index >= len ) {\n\t\tthrow new RangeError( format( 'invalid argument. Index argument is out-of-bounds. Value: `%s`.', index ) );\n\t}\n\tif ( !isComplexLike( value ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Second argument must be a complex number. Value: `%s`.', value ) );\n\t}\n\tout = new this.constructor( this._buffer );\n\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\tbuf[ 2*index ] = realf( value );\n\tbuf[ (2*index)+1 ] = imagf( value );\n\treturn out;\n});\n\n\n// EXPORTS //\n\nexport default Complex64Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport realf from '@stdlib/complex-realf';\nimport imagf from '@stdlib/complex-imagf';\n\n\n// MAIN //\n\n/**\n* Returns a strided array of real and imaginary components.\n*\n* @private\n* @param {Float32Array} buf - output array\n* @param {Array} arr - array containing complex numbers\n* @returns {(Float32Array|null)} output array or null\n*/\nfunction fromArray( buf, arr ) {\n\tvar len;\n\tvar v;\n\tvar i;\n\tvar j;\n\n\tlen = arr.length;\n\tj = 0;\n\tfor ( i = 0; i < len; i++ ) {\n\t\tv = arr[ i ];\n\t\tif ( !isComplexLike( v ) ) {\n\t\t\treturn null;\n\t\t}\n\t\tbuf[ j ] = realf( v );\n\t\tbuf[ j+1 ] = imagf( v );\n\t\tj += 2; // stride\n\t}\n\treturn buf;\n}\n\n\n// EXPORTS //\n\nexport default fromArray;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Returns the real component of a double-precision complex floating-point number.\n*\n* @param {Complex} z - complex number\n* @returns {number} real component\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n*\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var re = real( z );\n* // returns 5.0\n*/\nfunction real( z ) {\n\treturn z.re;\n}\n\n\n// EXPORTS //\n\nexport default real;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Returns the imaginary component of a double-precision complex floating-point number.\n*\n* @param {Complex} z - complex number\n* @returns {number} imaginary component\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n*\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var im = imag( z );\n* // returns 3.0\n*/\nfunction imag( z ) {\n\treturn z.im;\n}\n\n\n// EXPORTS //\n\nexport default imag;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isArrayLikeObject from '@stdlib/assert-is-array-like-object';\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport format from '@stdlib/string-format';\nimport real from '@stdlib/complex-real';\nimport imag from '@stdlib/complex-imag';\n\n\n// MAIN //\n\n/**\n* Returns an array of iterated values.\n*\n* @private\n* @param {Object} it - iterator\n* @returns {(Array|TypeError)} array or an error\n*/\nfunction fromIterator( it ) {\n\tvar out;\n\tvar v;\n\tvar z;\n\n\tout = [];\n\twhile ( true ) {\n\t\tv = it.next();\n\t\tif ( v.done ) {\n\t\t\tbreak;\n\t\t}\n\t\tz = v.value;\n\t\tif ( isArrayLikeObject( z ) && z.length >= 2 ) {\n\t\t\tout.push( z[ 0 ], z[ 1 ] );\n\t\t} else if ( isComplexLike( z ) ) {\n\t\t\tout.push( real( z ), imag( z ) );\n\t\t} else {\n\t\t\treturn new TypeError( format( 'invalid argument. An iterator must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', z ) );\n\t\t}\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default fromIterator;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isArrayLikeObject from '@stdlib/assert-is-array-like-object';\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport realf from '@stdlib/complex-realf';\nimport imagf from '@stdlib/complex-imagf';\nimport format from '@stdlib/string-format';\n\n\n// MAIN //\n\n/**\n* Returns an array of iterated values.\n*\n* @private\n* @param {Object} it - iterator\n* @param {Function} clbk - callback to invoke for each iterated value\n* @param {*} thisArg - invocation context\n* @returns {(Array|TypeError)} array or an error\n*/\nfunction fromIteratorMap( it, clbk, thisArg ) {\n\tvar out;\n\tvar v;\n\tvar z;\n\tvar i;\n\n\tout = [];\n\ti = -1;\n\twhile ( true ) {\n\t\tv = it.next();\n\t\tif ( v.done ) {\n\t\t\tbreak;\n\t\t}\n\t\ti += 1;\n\t\tz = clbk.call( thisArg, v.value, i );\n\t\tif ( isArrayLikeObject( z ) && z.length >= 2 ) {\n\t\t\tout.push( z[ 0 ], z[ 1 ] );\n\t\t} else if ( isComplexLike( z ) ) {\n\t\t\tout.push( realf( z ), imagf( z ) );\n\t\t} else {\n\t\t\treturn new TypeError( format( 'invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', z ) );\n\t\t}\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default fromIteratorMap;\n","/* eslint-disable no-restricted-syntax, max-lines, no-invalid-this */\n\n/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isNonNegativeInteger } from '@stdlib/assert-is-nonnegative-integer';\nimport isArrayLikeObject from '@stdlib/assert-is-array-like-object';\nimport isCollection from '@stdlib/assert-is-collection';\nimport isArrayBuffer from '@stdlib/assert-is-arraybuffer';\nimport isObject from '@stdlib/assert-is-object';\nimport isArray from '@stdlib/assert-is-array';\nimport isString from '@stdlib/assert-is-string';\nimport isFunction from '@stdlib/assert-is-function';\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport isEven from '@stdlib/math-base-assert-is-even';\nimport isInteger from '@stdlib/math-base-assert-is-integer';\nimport isComplex64Array from '@stdlib/array-base-assert-is-complex64array';\nimport isComplex128Array from '@stdlib/array-base-assert-is-complex128array';\nimport hasIteratorSymbolSupport from '@stdlib/assert-has-iterator-symbol-support';\nimport ITERATOR_SYMBOL from '@stdlib/symbol-iterator';\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport setReadOnlyAccessor from '@stdlib/utils-define-nonenumerable-read-only-accessor';\nimport Float64Array from '@stdlib/array-float64';\nimport Complex128 from '@stdlib/complex-float64';\nimport real from '@stdlib/complex-real';\nimport imag from '@stdlib/complex-imag';\nimport floor from '@stdlib/math-base-special-floor';\nimport reinterpret64 from '@stdlib/strided-base-reinterpret-complex64';\nimport reinterpret128 from '@stdlib/strided-base-reinterpret-complex128';\nimport getter from '@stdlib/array-base-getter';\nimport accessorGetter from '@stdlib/array-base-accessor-getter';\nimport format from '@stdlib/string-format';\nimport fromIterator from './from_iterator.js';\nimport fromIteratorMap from './from_iterator_map.js';\nimport fromArray from './from_array.js';\n\n\n// VARIABLES //\n\nvar BYTES_PER_ELEMENT = Float64Array.BYTES_PER_ELEMENT * 2;\nvar HAS_ITERATOR_SYMBOL = hasIteratorSymbolSupport();\n\n\n// FUNCTIONS //\n\n/**\n* Returns a boolean indicating if a value is a complex typed array.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a complex typed array\n*/\nfunction isComplexArray( value ) {\n\treturn (\n\t\tvalue instanceof Complex128Array ||\n\t\t(\n\t\t\ttypeof value === 'object' &&\n\t\t\tvalue !== null &&\n\t\t\t(\n\t\t\t\tvalue.constructor.name === 'Complex64Array' ||\n\t\t\t\tvalue.constructor.name === 'Complex128Array'\n\t\t\t) &&\n\t\t\ttypeof value._length === 'number' && // eslint-disable-line no-underscore-dangle\n\n\t\t\t// NOTE: we don't perform a more rigorous test here for a typed array for performance reasons, as robustly checking for a typed array instance could require walking the prototype tree and performing relatively expensive constructor checks...\n\t\t\ttypeof value._buffer === 'object' // eslint-disable-line no-underscore-dangle\n\t\t)\n\t);\n}\n\n/**\n* Returns a boolean indicating if a value is a complex typed array constructor.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a complex typed array constructor\n*/\nfunction isComplexArrayConstructor( value ) {\n\treturn (\n\t\tvalue === Complex128Array ||\n\n\t\t// NOTE: weaker test in order to avoid a circular dependency with Complex64Array...\n\t\tvalue.name === 'Complex64Array'\n\t);\n}\n\n/**\n* Retrieves a complex number from a complex number array buffer.\n*\n* @private\n* @param {Float64Array} buf - array buffer\n* @param {NonNegativeInteger} idx - element index\n* @returns {Complex128} complex number\n*/\nfunction getComplex128( buf, idx ) {\n\tidx *= 2;\n\treturn new Complex128( buf[ idx ], buf[ idx+1 ] );\n}\n\n\n// MAIN //\n\n/**\n* 128-bit complex number array constructor.\n*\n* @constructor\n* @param {(NonNegativeInteger|Collection|ArrayBuffer|Iterable)} [arg] - length, typed array, array-like object, buffer, or iterable\n* @param {NonNegativeInteger} [byteOffset=0] - byte offset\n* @param {NonNegativeInteger} [length] - view length\n* @throws {RangeError} ArrayBuffer byte length must be a multiple of `16`\n* @throws {RangeError} array-like object and typed array input arguments must have a length which is a multiple of two\n* @throws {TypeError} if provided only a single argument, must provide a valid argument\n* @throws {TypeError} byte offset must be a nonnegative integer\n* @throws {RangeError} byte offset must be a multiple of `16`\n* @throws {TypeError} view length must be a positive multiple of `16`\n* @throws {RangeError} must provide sufficient memory to accommodate byte offset and view length requirements\n* @throws {TypeError} an iterator must return either a two element array containing real and imaginary components or a complex number\n* @returns {Complex128Array} complex number array\n*\n* @example\n* var arr = new Complex128Array();\n* // returns \n*\n* var len = arr.length;\n* // returns 0\n*\n* @example\n* var arr = new Complex128Array( 2 );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*\n* @example\n* var arr = new Complex128Array( [ 1.0, -1.0 ] );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* import ArrayBuffer from '@stdlib/array-buffer';\n*\n* var buf = new ArrayBuffer( 32 );\n* var arr = new Complex128Array( buf );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*\n* @example\n* import ArrayBuffer from '@stdlib/array-buffer';\n*\n* var buf = new ArrayBuffer( 32 );\n* var arr = new Complex128Array( buf, 16 );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* import ArrayBuffer from '@stdlib/array-buffer';\n*\n* var buf = new ArrayBuffer( 64 );\n* var arr = new Complex128Array( buf, 16, 2 );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*/\nfunction Complex128Array() {\n\tvar byteOffset;\n\tvar nargs;\n\tvar buf;\n\tvar len;\n\n\tnargs = arguments.length;\n\tif ( !(this instanceof Complex128Array) ) {\n\t\tif ( nargs === 0 ) {\n\t\t\treturn new Complex128Array();\n\t\t}\n\t\tif ( nargs === 1 ) {\n\t\t\treturn new Complex128Array( arguments[0] );\n\t\t}\n\t\tif ( nargs === 2 ) {\n\t\t\treturn new Complex128Array( arguments[0], arguments[1] );\n\t\t}\n\t\treturn new Complex128Array( arguments[0], arguments[1], arguments[2] );\n\t}\n\t// Create the underlying data buffer...\n\tif ( nargs === 0 ) {\n\t\tbuf = new Float64Array( 0 ); // backward-compatibility\n\t} else if ( nargs === 1 ) {\n\t\tif ( isNonNegativeInteger( arguments[0] ) ) {\n\t\t\tbuf = new Float64Array( arguments[0]*2 );\n\t\t} else if ( isCollection( arguments[0] ) ) {\n\t\t\tbuf = arguments[ 0 ];\n\t\t\tlen = buf.length;\n\n\t\t\t// If provided a \"generic\" array, peak at the first value, and, if the value is a complex number, try to process as an array of complex numbers, falling back to \"normal\" typed array initialization if we fail and ensuring consistency if the first value had not been a complex number...\n\t\t\tif ( len && isArray( buf ) && isComplexLike( buf[0] ) ) {\n\t\t\t\tbuf = fromArray( new Float64Array( len*2 ), buf );\n\t\t\t\tif ( buf === null ) {\n\t\t\t\t\t// We failed and we are now forced to allocate a new array :-(\n\t\t\t\t\tif ( !isEven( len ) ) {\n\t\t\t\t\t\tthrow new RangeError( format( 'invalid argument. Array-like object arguments must have a length which is a multiple of two. Length: `%u`.', len ) );\n\t\t\t\t\t}\n\t\t\t\t\t// We failed, so fall back to directly setting values...\n\t\t\t\t\tbuf = new Float64Array( arguments[0] );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ( isComplex64Array( buf ) ) {\n\t\t\t\t\tbuf = reinterpret64( buf, 0 );\n\t\t\t\t} else if ( isComplex128Array( buf ) ) {\n\t\t\t\t\tbuf = reinterpret128( buf, 0 );\n\t\t\t\t} else if ( !isEven( len ) ) {\n\t\t\t\t\tthrow new RangeError( format( 'invalid argument. Array-like object and typed array arguments must have a length which is a multiple of two. Length: `%u`.', len ) );\n\t\t\t\t}\n\t\t\t\tbuf = new Float64Array( buf );\n\t\t\t}\n\t\t} else if ( isArrayBuffer( arguments[0] ) ) {\n\t\t\tbuf = arguments[ 0 ];\n\t\t\tif ( !isInteger( buf.byteLength/BYTES_PER_ELEMENT ) ) {\n\t\t\t\tthrow new RangeError( format( 'invalid argument. ArrayBuffer byte length must be a multiple of %u. Byte length: `%u`.', BYTES_PER_ELEMENT, buf.byteLength ) );\n\t\t\t}\n\t\t\tbuf = new Float64Array( buf );\n\t\t} else if ( isObject( arguments[0] ) ) {\n\t\t\tbuf = arguments[ 0 ];\n\t\t\tif ( HAS_ITERATOR_SYMBOL === false ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Environment lacks Symbol.iterator support. Must provide a length, ArrayBuffer, typed array, or array-like object. Value: `%s`.', buf ) );\n\t\t\t}\n\t\t\tif ( !isFunction( buf[ ITERATOR_SYMBOL ] ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.', buf ) );\n\t\t\t}\n\t\t\tbuf = buf[ ITERATOR_SYMBOL ]();\n\t\t\tif ( !isFunction( buf.next ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.', buf ) );\n\t\t\t}\n\t\t\tbuf = fromIterator( buf );\n\t\t\tif ( buf instanceof Error ) {\n\t\t\t\tthrow buf;\n\t\t\t}\n\t\t\tbuf = new Float64Array( buf );\n\t\t} else {\n\t\t\tthrow new TypeError( format( 'invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.', arguments[0] ) );\n\t\t}\n\t} else {\n\t\tbuf = arguments[ 0 ];\n\t\tif ( !isArrayBuffer( buf ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. First argument must be an ArrayBuffer. Value: `%s`.', buf ) );\n\t\t}\n\t\tbyteOffset = arguments[ 1 ];\n\t\tif ( !isNonNegativeInteger( byteOffset ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Byte offset must be a nonnegative integer. Value: `%s`.', byteOffset ) );\n\t\t}\n\t\tif ( !isInteger( byteOffset/BYTES_PER_ELEMENT ) ) {\n\t\t\tthrow new RangeError( format( 'invalid argument. Byte offset must be a multiple of %u. Value: `%u`.', BYTES_PER_ELEMENT, byteOffset ) );\n\t\t}\n\t\tif ( nargs === 2 ) {\n\t\t\tlen = buf.byteLength - byteOffset;\n\t\t\tif ( !isInteger( len/BYTES_PER_ELEMENT ) ) {\n\t\t\t\tthrow new RangeError( format( 'invalid arguments. ArrayBuffer view byte length must be a multiple of %u. View byte length: `%u`.', BYTES_PER_ELEMENT, len ) );\n\t\t\t}\n\t\t\tbuf = new Float64Array( buf, byteOffset );\n\t\t} else {\n\t\t\tlen = arguments[ 2 ];\n\t\t\tif ( !isNonNegativeInteger( len ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Length must be a nonnegative integer. Value: `%s`.', len ) );\n\t\t\t}\n\t\t\tif ( (len*BYTES_PER_ELEMENT) > (buf.byteLength-byteOffset) ) {\n\t\t\t\tthrow new RangeError( format( 'invalid arguments. ArrayBuffer has insufficient capacity. Either decrease the array length or provide a bigger buffer. Minimum capacity: `%u`.', len*BYTES_PER_ELEMENT ) );\n\t\t\t}\n\t\t\tbuf = new Float64Array( buf, byteOffset, len*2 );\n\t\t}\n\t}\n\tsetReadOnly( this, '_buffer', buf );\n\tsetReadOnly( this, '_length', buf.length/2 );\n\n\treturn this;\n}\n\n/**\n* Size (in bytes) of each array element.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex128Array\n* @readonly\n* @type {PositiveInteger}\n* @default 16\n*\n* @example\n* var nbytes = Complex128Array.BYTES_PER_ELEMENT;\n* // returns 16\n*/\nsetReadOnly( Complex128Array, 'BYTES_PER_ELEMENT', BYTES_PER_ELEMENT );\n\n/**\n* Constructor name.\n*\n* @name name\n* @memberof Complex128Array\n* @readonly\n* @type {string}\n* @default 'Complex128Array'\n*\n* @example\n* var name = Complex128Array.name;\n* // returns 'Complex128Array'\n*/\nsetReadOnly( Complex128Array, 'name', 'Complex128Array' );\n\n/**\n* Creates a new 128-bit complex number array from an array-like object or an iterable.\n*\n* @name from\n* @memberof Complex128Array\n* @type {Function}\n* @param {(Collection|Object)} src - array-like object or iterable\n* @param {Function} [clbk] - callback to invoke for each source element\n* @param {*} [thisArg] - context\n* @throws {TypeError} `this` context must be a constructor\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be an array-like object or an iterable\n* @throws {TypeError} second argument must be a function\n* @throws {RangeError} array-like objects must have a length which is a multiple of two\n* @throws {TypeError} an iterator must return either a two element array containing real and imaginary components or a complex number\n* @throws {TypeError} when provided an iterator, a callback must return either a two element array containing real and imaginary components or a complex number\n* @returns {Complex128Array} 128-bit complex number array\n*\n* @example\n* var arr = Complex128Array.from( [ 1.0, -1.0 ] );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n*\n* var arr = Complex128Array.from( [ new Complex128( 1.0, 1.0 ) ] );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* function clbk( v ) {\n* return new Complex128( real(v)*2.0, imag(v)*2.0 );\n* }\n*\n* var arr = Complex128Array.from( [ new Complex128( 1.0, 1.0 ) ], clbk );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*/\nsetReadOnly( Complex128Array, 'from', function from( src ) {\n\tvar thisArg;\n\tvar nargs;\n\tvar clbk;\n\tvar out;\n\tvar buf;\n\tvar tmp;\n\tvar get;\n\tvar len;\n\tvar flg;\n\tvar v;\n\tvar i;\n\tvar j;\n\tif ( !isFunction( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` context must be a constructor.' );\n\t}\n\tif ( !isComplexArrayConstructor( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tnargs = arguments.length;\n\tif ( nargs > 1 ) {\n\t\tclbk = arguments[ 1 ];\n\t\tif ( !isFunction( clbk ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be a function. Value: `%s`.', clbk ) );\n\t\t}\n\t\tif ( nargs > 2 ) {\n\t\t\tthisArg = arguments[ 2 ];\n\t\t}\n\t}\n\tif ( isComplexArray( src ) ) {\n\t\tlen = src.length;\n\t\tif ( clbk ) {\n\t\t\tout = new this( len );\n\t\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\t\tj = 0;\n\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\tv = clbk.call( thisArg, src.get( i ), i );\n\t\t\t\tif ( isComplexLike( v ) ) {\n\t\t\t\t\tbuf[ j ] = real( v );\n\t\t\t\t\tbuf[ j+1 ] = imag( v );\n\t\t\t\t} else if ( isArrayLikeObject( v ) && v.length >= 2 ) {\n\t\t\t\t\tbuf[ j ] = v[ 0 ];\n\t\t\t\t\tbuf[ j+1 ] = v[ 1 ];\n\t\t\t\t} else {\n\t\t\t\t\tthrow new TypeError( format( 'invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', v ) );\n\t\t\t\t}\n\t\t\t\tj += 2; // stride\n\t\t\t}\n\t\t\treturn out;\n\t\t}\n\t\treturn new this( src );\n\t}\n\tif ( isCollection( src ) ) {\n\t\tif ( clbk ) {\n\t\t\t// Note: array contents affect how we iterate over a provided data source. If only complex number objects, we can extract real and imaginary components. Otherwise, for non-complex number arrays (e.g., `Float64Array`, etc), we assume a strided array where real and imaginary components are interleaved. In the former case, we expect a callback to return real and imaginary components (possibly as a complex number). In the latter case, we expect a callback to return *either* a real or imaginary component.\n\n\t\t\tlen = src.length;\n\t\t\tif ( src.get && src.set ) {\n\t\t\t\tget = accessorGetter( 'default' );\n\t\t\t} else {\n\t\t\t\tget = getter( 'default' );\n\t\t\t}\n\t\t\t// Detect whether we've been provided an array which returns complex number objects...\n\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\tif ( !isComplexLike( get( src, i ) ) ) {\n\t\t\t\t\tflg = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// If an array does not contain only complex number objects, then we assume interleaved real and imaginary components...\n\t\t\tif ( flg ) {\n\t\t\t\tif ( !isEven( len ) ) {\n\t\t\t\t\tthrow new RangeError( format( 'invalid argument. First argument must have a length which is a multiple of two. Length: `%u`.', len ) );\n\t\t\t\t}\n\t\t\t\tout = new this( len/2 );\n\t\t\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\t\tbuf[ i ] = clbk.call( thisArg, get( src, i ), i );\n\t\t\t\t}\n\t\t\t\treturn out;\n\t\t\t}\n\t\t\t// If an array contains only complex number objects, then we need to extract real and imaginary components...\n\t\t\tout = new this( len );\n\t\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\t\tj = 0;\n\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\tv = clbk.call( thisArg, get( src, i ), i );\n\t\t\t\tif ( isComplexLike( v ) ) {\n\t\t\t\t\tbuf[ j ] = real( v );\n\t\t\t\t\tbuf[ j+1 ] = imag( v );\n\t\t\t\t} else if ( isArrayLikeObject( v ) && v.length >= 2 ) {\n\t\t\t\t\tbuf[ j ] = v[ 0 ];\n\t\t\t\t\tbuf[ j+1 ] = v[ 1 ];\n\t\t\t\t} else {\n\t\t\t\t\tthrow new TypeError( format( 'invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', v ) );\n\t\t\t\t}\n\t\t\t\tj += 2; // stride\n\t\t\t}\n\t\t\treturn out;\n\t\t}\n\t\treturn new this( src );\n\t}\n\tif ( isObject( src ) && HAS_ITERATOR_SYMBOL && isFunction( src[ ITERATOR_SYMBOL ] ) ) { // eslint-disable-line max-len\n\t\tbuf = src[ ITERATOR_SYMBOL ]();\n\t\tif ( !isFunction( buf.next ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.', src ) );\n\t\t}\n\t\tif ( clbk ) {\n\t\t\ttmp = fromIteratorMap( buf, clbk, thisArg );\n\t\t} else {\n\t\t\ttmp = fromIterator( buf );\n\t\t}\n\t\tif ( tmp instanceof Error ) {\n\t\t\tthrow tmp;\n\t\t}\n\t\tlen = tmp.length / 2;\n\t\tout = new this( len );\n\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\tbuf[ i ] = tmp[ i ];\n\t\t}\n\t\treturn out;\n\t}\n\tthrow new TypeError( format( 'invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.', src ) );\n});\n\n/**\n* Creates a new 128-bit complex number array from a variable number of arguments.\n*\n* @name of\n* @memberof Complex128Array\n* @type {Function}\n* @param {...*} element - array elements\n* @throws {TypeError} `this` context must be a constructor\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Complex128Array} 128-bit complex number array\n*\n* @example\n* var arr = Complex128Array.of( 1.0, 1.0, 1.0, 1.0 );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*/\nsetReadOnly( Complex128Array, 'of', function of() {\n\tvar args;\n\tvar i;\n\tif ( !isFunction( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` context must be a constructor.' );\n\t}\n\tif ( !isComplexArrayConstructor( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\targs = [];\n\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\targs.push( arguments[ i ] );\n\t}\n\treturn new this( args );\n});\n\n/**\n* Returns an array element with support for both nonnegative and negative integer indices.\n*\n* @name at\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {integer} idx - element index\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} must provide an integer\n* @returns {(Complex128|void)} array element\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* var arr = new Complex128Array( 10 );\n*\n* var z = arr.at( 0 );\n* // returns \n*\n* var re = real( z );\n* // returns 0.0\n*\n* var im = imag( z );\n* // returns 0.0\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 9.0, -9.0 ], 9 );\n*\n* z = arr.at( 0 );\n* // returns \n*\n* re = real( z );\n* // returns 1.0\n*\n* im = imag( z );\n* // returns -1.0\n*\n* z = arr.at( -1 );\n* // returns \n*\n* re = real( z );\n* // returns 9.0\n*\n* im = imag( z );\n* // returns -9.0\n*\n* z = arr.at( 100 );\n* // returns undefined\n*\n* z = arr.at( -100 );\n* // returns undefined\n*/\nsetReadOnly( Complex128Array.prototype, 'at', function at( idx ) {\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isInteger( idx ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Must provide an integer. Value: `%s`.', idx ) );\n\t}\n\tif ( idx < 0 ) {\n\t\tidx += this._length;\n\t}\n\tif ( idx < 0 || idx >= this._length ) {\n\t\treturn;\n\t}\n\treturn getComplex128( this._buffer, idx );\n});\n\n/**\n* Pointer to the underlying data buffer.\n*\n* @name buffer\n* @memberof Complex128Array.prototype\n* @readonly\n* @type {ArrayBuffer}\n*\n* @example\n* var arr = new Complex128Array( 10 );\n*\n* var buf = arr.buffer;\n* // returns \n*/\nsetReadOnlyAccessor( Complex128Array.prototype, 'buffer', function get() {\n\treturn this._buffer.buffer;\n});\n\n/**\n* Size (in bytes) of the array.\n*\n* @name byteLength\n* @memberof Complex128Array.prototype\n* @readonly\n* @type {NonNegativeInteger}\n*\n* @example\n* var arr = new Complex128Array( 10 );\n*\n* var byteLength = arr.byteLength;\n* // returns 160\n*/\nsetReadOnlyAccessor( Complex128Array.prototype, 'byteLength', function get() {\n\treturn this._buffer.byteLength;\n});\n\n/**\n* Offset (in bytes) of the array from the start of its underlying `ArrayBuffer`.\n*\n* @name byteOffset\n* @memberof Complex128Array.prototype\n* @readonly\n* @type {NonNegativeInteger}\n*\n* @example\n* var arr = new Complex128Array( 10 );\n*\n* var byteOffset = arr.byteOffset;\n* // returns 0\n*/\nsetReadOnlyAccessor( Complex128Array.prototype, 'byteOffset', function get() {\n\treturn this._buffer.byteOffset;\n});\n\n/**\n* Size (in bytes) of each array element.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex128Array.prototype\n* @readonly\n* @type {PositiveInteger}\n* @default 16\n*\n* @example\n* var arr = new Complex128Array( 10 );\n*\n* var nbytes = arr.BYTES_PER_ELEMENT;\n* // returns 16\n*/\nsetReadOnly( Complex128Array.prototype, 'BYTES_PER_ELEMENT', Complex128Array.BYTES_PER_ELEMENT );\n\n/**\n* Copies a sequence of elements within the array to the position starting at `target`.\n*\n* @name copyWithin\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {integer} target - index at which to start copying elements\n* @param {integer} start - source index at which to copy elements from\n* @param {integer} [end] - source index at which to stop copying elements from\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Complex128Array} modified array\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* var arr = new Complex128Array( 4 );\n*\n* // Set the array elements:\n* arr.set( new Complex128( 1.0, 1.0 ), 0 );\n* arr.set( new Complex128( 2.0, 2.0 ), 1 );\n* arr.set( new Complex128( 3.0, 3.0 ), 2 );\n* arr.set( new Complex128( 4.0, 4.0 ), 3 );\n*\n* // Copy the first two elements to the last two elements:\n* arr.copyWithin( 2, 0, 2 );\n*\n* // Get the last array element:\n* var z = arr.get( 3 );\n*\n* var re = real( z );\n* // returns 2.0\n*\n* var im = imag( z );\n* // returns 2.0\n*/\nsetReadOnly( Complex128Array.prototype, 'copyWithin', function copyWithin( target, start ) {\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\t// FIXME: prefer a functional `copyWithin` implementation which addresses lack of universal browser support (e.g., IE11 and Safari) or ensure that typed arrays are polyfilled\n\tif ( arguments.length === 2 ) {\n\t\tthis._buffer.copyWithin( target*2, start*2 );\n\t} else {\n\t\tthis._buffer.copyWithin( target*2, start*2, arguments[2]*2 );\n\t}\n\treturn this;\n});\n\n/**\n* Returns an iterator for iterating over array key-value pairs.\n*\n* @name entries\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Iterator} iterator\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n*\n* var arr = [\n* new Complex128( 1.0, 1.0 ),\n* new Complex128( 2.0, 2.0 ),\n* new Complex128( 3.0, 3.0 )\n* ];\n* arr = new Complex128Array( arr );\n*\n* // Create an iterator:\n* var it = arr.entries();\n*\n* // Iterate over the key-value pairs...\n* var v = it.next().value;\n* // returns [ 0, ]\n*\n* v = it.next().value;\n* // returns [ 1, ]\n*\n* v = it.next().value;\n* // returns [ 2, ]\n*\n* var bool = it.next().done;\n* // returns true\n*/\nsetReadOnly( Complex128Array.prototype, 'entries', function entries() {\n\tvar buffer;\n\tvar self;\n\tvar iter;\n\tvar len;\n\tvar FLG;\n\tvar i;\n\tvar j;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tself = this;\n\tbuffer = this._buffer;\n\tlen = this._length;\n\n\t// Initialize the iteration indices:\n\ti = -1;\n\tj = -2;\n\n\t// Create an iterator protocol-compliant object:\n\titer = {};\n\tsetReadOnly( iter, 'next', next );\n\tsetReadOnly( iter, 'return', end );\n\n\tif ( ITERATOR_SYMBOL ) {\n\t\tsetReadOnly( iter, ITERATOR_SYMBOL, factory );\n\t}\n\treturn iter;\n\n\t/**\n\t* Returns an iterator protocol-compliant object containing the next iterated value.\n\t*\n\t* @private\n\t* @returns {Object} iterator protocol-compliant object\n\t*/\n\tfunction next() {\n\t\tvar z;\n\t\ti += 1;\n\t\tif ( FLG || i >= len ) {\n\t\t\treturn {\n\t\t\t\t'done': true\n\t\t\t};\n\t\t}\n\t\tj += 2;\n\t\tz = new Complex128( buffer[ j ], buffer[ j+1 ] );\n\t\treturn {\n\t\t\t'value': [ i, z ],\n\t\t\t'done': false\n\t\t};\n\t}\n\n\t/**\n\t* Finishes an iterator.\n\t*\n\t* @private\n\t* @param {*} [value] - value to return\n\t* @returns {Object} iterator protocol-compliant object\n\t*/\n\tfunction end( value ) {\n\t\tFLG = true;\n\t\tif ( arguments.length ) {\n\t\t\treturn {\n\t\t\t\t'value': value,\n\t\t\t\t'done': true\n\t\t\t};\n\t\t}\n\t\treturn {\n\t\t\t'done': true\n\t\t};\n\t}\n\n\t/**\n\t* Returns a new iterator.\n\t*\n\t* @private\n\t* @returns {Iterator} iterator\n\t*/\n\tfunction factory() {\n\t\treturn self.entries();\n\t}\n});\n\n/**\n* Tests whether all elements in an array pass a test implemented by a predicate function.\n*\n* @name every\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {boolean} boolean indicating whether all elements pass a test\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* function predicate( v ) {\n* return ( real( v ) === imag( v ) );\n* }\n*\n* var arr = new Complex128Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var bool = arr.every( predicate );\n* // returns true\n*/\nsetReadOnly( Complex128Array.prototype, 'every', function every( predicate, thisArg ) {\n\tvar buf;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tif ( !predicate.call( thisArg, getComplex128( buf, i ), i, this ) ) {\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn true;\n});\n\n/**\n* Returns a modified typed array filled with a fill value.\n*\n* @name fill\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {ComplexLike} value - fill value\n* @param {integer} [start=0] - starting index (inclusive)\n* @param {integer} [end] - ending index (exclusive)\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a complex number\n* @throws {TypeError} second argument must be an integer\n* @throws {TypeError} third argument must be an integer\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* var arr = new Complex128Array( 3 );\n*\n* arr.fill( new Complex128( 1.0, 1.0 ), 1 );\n*\n* var z = arr.get( 1 );\n* // returns \n*\n* var re = real( z );\n* // returns 1.0\n*\n* var im = imag( z );\n* // returns 1.0\n*\n* z = arr.get( 1 );\n* // returns \n*\n* re = real( z );\n* // returns 1.0\n*\n* im = imag( z );\n* // returns 1.0\n*/\nsetReadOnly( Complex128Array.prototype, 'fill', function fill( value, start, end ) {\n\tvar buf;\n\tvar len;\n\tvar idx;\n\tvar re;\n\tvar im;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isComplexLike( value ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a complex number. Value: `%s`.', value ) );\n\t}\n\tbuf = this._buffer;\n\tlen = this._length;\n\tif ( arguments.length > 1 ) {\n\t\tif ( !isInteger( start ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be an integer. Value: `%s`.', start ) );\n\t\t}\n\t\tif ( start < 0 ) {\n\t\t\tstart += len;\n\t\t\tif ( start < 0 ) {\n\t\t\t\tstart = 0;\n\t\t\t}\n\t\t}\n\t\tif ( arguments.length > 2 ) {\n\t\t\tif ( !isInteger( end ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Third argument must be an integer. Value: `%s`.', end ) );\n\t\t\t}\n\t\t\tif ( end < 0 ) {\n\t\t\t\tend += len;\n\t\t\t\tif ( end < 0 ) {\n\t\t\t\t\tend = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( end > len ) {\n\t\t\t\tend = len;\n\t\t\t}\n\t\t} else {\n\t\t\tend = len;\n\t\t}\n\t} else {\n\t\tstart = 0;\n\t\tend = len;\n\t}\n\tre = real( value );\n\tim = imag( value );\n\tfor ( i = start; i < end; i++ ) {\n\t\tidx = 2*i;\n\t\tbuf[ idx ] = re;\n\t\tbuf[ idx+1 ] = im;\n\t}\n\treturn this;\n});\n\n/**\n* Returns a new array containing the elements of an array which pass a test implemented by a predicate function.\n*\n* @name filter\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {Complex128Array} complex number array\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* function predicate( v ) {\n* return ( real( v ) === imag( v ) );\n* }\n*\n* var arr = new Complex128Array( 3 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n*\n* var out = arr.filter( predicate );\n* // returns \n*\n* var len = out.length;\n* // returns 1\n*\n* var z = out.get( 0 );\n* // returns \n*\n* var re = real( z );\n* // returns 2.0\n*\n* var im = imag( z );\n* // returns 2.0\n*/\nsetReadOnly( Complex128Array.prototype, 'filter', function filter( predicate, thisArg ) {\n\tvar buf;\n\tvar out;\n\tvar i;\n\tvar z;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tout = [];\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tz = getComplex128( buf, i );\n\t\tif ( predicate.call( thisArg, z, i, this ) ) {\n\t\t\tout.push( z );\n\t\t}\n\t}\n\treturn new this.constructor( out );\n});\n\n/**\n* Returns the first element in an array for which a predicate function returns a truthy value.\n*\n* @name find\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {(Complex128|void)} array element or undefined\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* function predicate( v ) {\n* return ( real( v ) === imag( v ) );\n* }\n*\n* var arr = new Complex128Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var z = arr.find( predicate );\n* // returns \n*\n* var re = real( z );\n* // returns 1.0\n*\n* var im = imag( z );\n* // returns 1.0\n*/\nsetReadOnly( Complex128Array.prototype, 'find', function find( predicate, thisArg ) {\n\tvar buf;\n\tvar i;\n\tvar z;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tz = getComplex128( buf, i );\n\t\tif ( predicate.call( thisArg, z, i, this ) ) {\n\t\t\treturn z;\n\t\t}\n\t}\n});\n\n/**\n* Returns the index of the first element in an array for which a predicate function returns a truthy value.\n*\n* @name findIndex\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {integer} index or -1\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* function predicate( v ) {\n* return ( real( v ) === imag( v ) );\n* }\n*\n* var arr = new Complex128Array( 3 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var idx = arr.findIndex( predicate );\n* // returns 2\n*/\nsetReadOnly( Complex128Array.prototype, 'findIndex', function findIndex( predicate, thisArg ) {\n\tvar buf;\n\tvar i;\n\tvar z;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tz = getComplex128( buf, i );\n\t\tif ( predicate.call( thisArg, z, i, this ) ) {\n\t\t\treturn i;\n\t\t}\n\t}\n\treturn -1;\n});\n\n/**\n* Returns the last element in an array for which a predicate function returns a truthy value.\n*\n* @name findLast\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {(Complex128|void)} array element or undefined\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* function predicate( v ) {\n* return ( real( v ) === imag( v ) );\n* }\n*\n* var arr = new Complex128Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var z = arr.findLast( predicate );\n* // returns \n*\n* var re = real( z );\n* // returns 3.0\n*\n* var im = imag( z );\n* // returns 3.0\n*/\nsetReadOnly( Complex128Array.prototype, 'findLast', function findLast( predicate, thisArg ) {\n\tvar buf;\n\tvar i;\n\tvar z;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = this._length-1; i >= 0; i-- ) {\n\t\tz = getComplex128( buf, i );\n\t\tif ( predicate.call( thisArg, z, i, this ) ) {\n\t\t\treturn z;\n\t\t}\n\t}\n});\n\n/**\n* Returns the index of the last element in an array for which a predicate function returns a truthy value.\n*\n* @name findLastIndex\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {integer} index or -1\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* function predicate( v ) {\n* return ( real( v ) === imag( v ) );\n* }\n*\n* var arr = new Complex128Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n*\n* var idx = arr.findLastIndex( predicate );\n* // returns 1\n*/\nsetReadOnly( Complex128Array.prototype, 'findLastIndex', function findLastIndex( predicate, thisArg ) {\n\tvar buf;\n\tvar i;\n\tvar z;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = this._length-1; i >= 0; i-- ) {\n\t\tz = getComplex128( buf, i );\n\t\tif ( predicate.call( thisArg, z, i, this ) ) {\n\t\t\treturn i;\n\t\t}\n\t}\n\treturn -1;\n});\n\n/**\n* Invokes a function once for each array element.\n*\n* @name forEach\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {Function} fcn - function to invoke\n* @param {*} [thisArg] - function invocation context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n*\n* function log( v, i ) {\n* console.log( '%s: %s', i, v.toString() );\n* }\n*\n* var arr = new Complex128Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* arr.forEach( log );\n*/\nsetReadOnly( Complex128Array.prototype, 'forEach', function forEach( fcn, thisArg ) {\n\tvar buf;\n\tvar i;\n\tvar z;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( fcn ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', fcn ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tz = getComplex128( buf, i );\n\t\tfcn.call( thisArg, z, i, this );\n\t}\n});\n\n/**\n* Returns an array element.\n*\n* @name get\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {NonNegativeInteger} idx - element index\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} must provide a nonnegative integer\n* @returns {(Complex128|void)} array element\n*\n* @example\n* var arr = new Complex128Array( 10 );\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* var z = arr.get( 0 );\n* // returns \n*\n* var re = real( z );\n* // returns 0.0\n*\n* var im = imag( z );\n* // returns 0.0\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n*\n* z = arr.get( 0 );\n* // returns \n*\n* re = real( z );\n* // returns 1.0\n*\n* im = imag( z );\n* // returns -1.0\n*\n* z = arr.get( 100 );\n* // returns undefined\n*/\nsetReadOnly( Complex128Array.prototype, 'get', function get( idx ) {\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isNonNegativeInteger( idx ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Must provide a nonnegative integer. Value: `%s`.', idx ) );\n\t}\n\tif ( idx >= this._length ) {\n\t\treturn;\n\t}\n\treturn getComplex128( this._buffer, idx );\n});\n\n/**\n* Number of array elements.\n*\n* @name length\n* @memberof Complex128Array.prototype\n* @readonly\n* @type {NonNegativeInteger}\n*\n* @example\n* var arr = new Complex128Array( 10 );\n*\n* var len = arr.length;\n* // returns 10\n*/\nsetReadOnlyAccessor( Complex128Array.prototype, 'length', function get() {\n\treturn this._length;\n});\n\n/**\n* Returns a boolean indicating whether an array includes a provided value.\n*\n* @name includes\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {ComplexLike} searchElement - search element\n* @param {integer} [fromIndex=0] - starting index (inclusive)\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a complex number\n* @throws {TypeError} second argument must be an integer\n* @returns {boolean} boolean indicating whether an array includes a provided value\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n*\n* var arr = new Complex128Array( 5 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n* arr.set( [ 4.0, -4.0 ], 3 );\n* arr.set( [ 5.0, -5.0 ], 4 );\n*\n* var bool = arr.includes( new Complex128( 3.0, -3.0 ) );\n* // returns true\n*\n* bool = arr.includes( new Complex128( 3.0, -3.0 ), 3 );\n* // returns false\n*\n* bool = arr.includes( new Complex128( 4.0, -4.0 ), -3 );\n* // returns true\n*/\nsetReadOnly( Complex128Array.prototype, 'includes', function includes( searchElement, fromIndex ) {\n\tvar buf;\n\tvar idx;\n\tvar re;\n\tvar im;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isComplexLike( searchElement ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a complex number. Value: `%s`.', searchElement ) );\n\t}\n\tif ( arguments.length > 1 ) {\n\t\tif ( !isInteger( fromIndex ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be an integer. Value: `%s`.', fromIndex ) );\n\t\t}\n\t\tif ( fromIndex < 0 ) {\n\t\t\tfromIndex += this._length;\n\t\t\tif ( fromIndex < 0 ) {\n\t\t\t\tfromIndex = 0;\n\t\t\t}\n\t\t}\n\t} else {\n\t\tfromIndex = 0;\n\t}\n\tre = real( searchElement );\n\tim = imag( searchElement );\n\tbuf = this._buffer;\n\tfor ( i = fromIndex; i < this._length; i++ ) {\n\t\tidx = 2 * i;\n\t\tif ( re === buf[ idx ] && im === buf[ idx+1 ] ) {\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n});\n\n/**\n* Returns the first index at which a given element can be found.\n*\n* @name indexOf\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {ComplexLike} searchElement - element to find\n* @param {integer} [fromIndex=0] - starting index (inclusive)\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a complex number\n* @throws {TypeError} second argument must be an integer\n* @returns {integer} index or -1\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n*\n* var arr = new Complex128Array( 5 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n* arr.set( [ 4.0, -4.0 ], 3 );\n* arr.set( [ 5.0, -5.0 ], 4 );\n*\n* var idx = arr.indexOf( new Complex128( 3.0, -3.0 ) );\n* // returns 2\n*\n* idx = arr.indexOf( new Complex128( 3.0, -3.0 ), 3 );\n* // returns -1\n*\n* idx = arr.indexOf( new Complex128( 4.0, -4.0 ), -3 );\n* // returns 3\n*/\nsetReadOnly( Complex128Array.prototype, 'indexOf', function indexOf( searchElement, fromIndex ) {\n\tvar buf;\n\tvar idx;\n\tvar re;\n\tvar im;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isComplexLike( searchElement ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a complex number. Value: `%s`.', searchElement ) );\n\t}\n\tif ( arguments.length > 1 ) {\n\t\tif ( !isInteger( fromIndex ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be an integer. Value: `%s`.', fromIndex ) );\n\t\t}\n\t\tif ( fromIndex < 0 ) {\n\t\t\tfromIndex += this._length;\n\t\t\tif ( fromIndex < 0 ) {\n\t\t\t\tfromIndex = 0;\n\t\t\t}\n\t\t}\n\t} else {\n\t\tfromIndex = 0;\n\t}\n\tre = real( searchElement );\n\tim = imag( searchElement );\n\tbuf = this._buffer;\n\tfor ( i = fromIndex; i < this._length; i++ ) {\n\t\tidx = 2 * i;\n\t\tif ( re === buf[ idx ] && im === buf[ idx+1 ] ) {\n\t\t\treturn i;\n\t\t}\n\t}\n\treturn -1;\n});\n\n/**\n* Returns a new string by concatenating all array elements.\n*\n* @name join\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {string} [separator=','] - element separator\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a string\n* @returns {string} string representation\n*\n* @example\n* var arr = new Complex128Array( 2 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n*\n* var str = arr.join();\n* // returns '1 + 1i,2 + 2i'\n*\n* str = arr.join( '/' );\n* // returns '1 + 1i/2 + 2i'\n*/\nsetReadOnly( Complex128Array.prototype, 'join', function join( separator ) {\n\tvar out;\n\tvar buf;\n\tvar sep;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( arguments.length === 0 ) {\n\t\tsep = ',';\n\t} else if ( isString( separator ) ) {\n\t\tsep = separator;\n\t} else {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a string. Value: `%s`.', separator ) );\n\t}\n\tout = [];\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tout.push( getComplex128( buf, i ).toString() );\n\t}\n\treturn out.join( sep );\n});\n\n/**\n* Returns the last index at which a given element can be found.\n*\n* @name lastIndexOf\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {ComplexLike} searchElement - element to find\n* @param {integer} [fromIndex] - index at which to start searching backward (inclusive)\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a complex number\n* @throws {TypeError} second argument must be an integer\n* @returns {integer} index or -1\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n*\n* var arr = new Complex128Array( 5 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n* arr.set( [ 4.0, -4.0 ], 3 );\n* arr.set( [ 3.0, -3.0 ], 4 );\n*\n* var idx = arr.lastIndexOf( new Complex128( 3.0, -3.0 ) );\n* // returns 4\n*\n* idx = arr.lastIndexOf( new Complex128( 3.0, -3.0 ), 3 );\n* // returns 2\n*\n* idx = arr.lastIndexOf( new Complex128( 5.0, -5.0 ), 3 );\n* // returns -1\n*\n* idx = arr.lastIndexOf( new Complex128( 2.0, -2.0 ), -3 );\n* // returns 1\n*/\nsetReadOnly( Complex128Array.prototype, 'lastIndexOf', function lastIndexOf( searchElement, fromIndex ) {\n\tvar buf;\n\tvar idx;\n\tvar re;\n\tvar im;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isComplexLike( searchElement ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a complex number. Value: `%s`.', searchElement ) );\n\t}\n\tif ( arguments.length > 1 ) {\n\t\tif ( !isInteger( fromIndex ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be an integer. Value: `%s`.', fromIndex ) );\n\t\t}\n\t\tif ( fromIndex >= this._length ) {\n\t\t\tfromIndex = this._length - 1;\n\t\t} else if ( fromIndex < 0 ) {\n\t\t\tfromIndex += this._length;\n\t\t}\n\t} else {\n\t\tfromIndex = this._length - 1;\n\t}\n\tre = real( searchElement );\n\tim = imag( searchElement );\n\tbuf = this._buffer;\n\tfor ( i = fromIndex; i >= 0; i-- ) {\n\t\tidx = 2 * i;\n\t\tif ( re === buf[ idx ] && im === buf[ idx+1 ] ) {\n\t\t\treturn i;\n\t\t}\n\t}\n\treturn -1;\n});\n\n/**\n* Returns a new array with each element being the result of a provided callback function.\n*\n* @name map\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {Function} fcn - callback function\n* @param {*} [thisArg] - callback function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {Complex128Array} complex number array\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* function scale( v, i ) {\n* return new Complex128( 2.0*real( v ), 2.0*imag( v ) );\n* }\n*\n* var arr = new Complex128Array( 3 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n*\n* var out = arr.map( scale );\n* // returns \n*\n* var z = out.get( 0 );\n* // returns \n*\n* var re = real( z );\n* // returns 2.0\n*\n* var im = imag( z );\n* // returns -2.0\n*/\nsetReadOnly( Complex128Array.prototype, 'map', function map( fcn, thisArg ) {\n\tvar outbuf;\n\tvar buf;\n\tvar out;\n\tvar i;\n\tvar v;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( fcn ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', fcn ) );\n\t}\n\tbuf = this._buffer;\n\tout = new this.constructor( this._length );\n\toutbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tv = fcn.call( thisArg, getComplex128( buf, i ), i, this );\n\t\tif ( isComplexLike( v ) ) {\n\t\t\toutbuf[ 2*i ] = real( v );\n\t\t\toutbuf[ (2*i)+1 ] = imag( v );\n\t\t} else if ( isArrayLikeObject( v ) && v.length === 2 ) {\n\t\t\toutbuf[ 2*i ] = v[ 0 ];\n\t\t\toutbuf[ (2*i)+1 ] = v[ 1 ];\n\t\t} else {\n\t\t\tthrow new TypeError( format( 'invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', v ) );\n\t\t}\n\t}\n\treturn out;\n});\n\n/**\n* Applies a provided callback function to each element of the array, in order, passing in the return value from the calculation on the preceding element and returning the accumulated result upon completion.\n*\n* @name reduce\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {Function} reducer - callback function\n* @param {*} [initialValue] - initial value\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @throws {Error} if not provided an initial value, the array must have at least one element\n* @returns {*} accumulated result\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n* import cadd from '@stdlib/math-base-ops-cadd';\n*\n* var arr = new Complex128Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var z = arr.reduce( cadd );\n* // returns \n*\n* var re = real( z );\n* // returns 6.0\n*\n* var im = imag( z );\n* // returns 6.0\n*/\nsetReadOnly( Complex128Array.prototype, 'reduce', function reduce( reducer, initialValue ) {\n\tvar buf;\n\tvar acc;\n\tvar len;\n\tvar v;\n\tvar i;\n\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( reducer ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', reducer ) );\n\t}\n\tbuf = this._buffer;\n\tlen = this._length;\n\tif ( arguments.length > 1 ) {\n\t\tacc = initialValue;\n\t\ti = 0;\n\t} else {\n\t\tif ( len === 0 ) {\n\t\t\tthrow new Error( 'invalid operation. If not provided an initial value, an array must contain at least one element.' );\n\t\t}\n\t\tacc = getComplex128( buf, 0 );\n\t\ti = 1;\n\t}\n\tfor ( ; i < len; i++ ) {\n\t\tv = getComplex128( buf, i );\n\t\tacc = reducer( acc, v, i, this );\n\t}\n\treturn acc;\n});\n\n/**\n* Reverses an array in-place.\n*\n* @name reverse\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Complex128Array} reversed array\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* var arr = new Complex128Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var out = arr.reverse();\n* // returns \n*\n* var z = out.get( 0 );\n* // returns \n*\n* var re = real( z );\n* // returns 3.0\n*\n* var im = imag( z );\n* // returns 3.0\n*\n* z = out.get( 1 );\n* // returns \n*\n* re = real( z );\n* // returns 2.0\n*\n* im = imag( z );\n* // returns 2.0\n*\n* z = out.get( 2 );\n* // returns \n*\n* re = real( z );\n* // returns 1.0\n*\n* im = imag( z );\n* // returns 1.0\n*/\nsetReadOnly( Complex128Array.prototype, 'reverse', function reverse() {\n\tvar buf;\n\tvar tmp;\n\tvar len;\n\tvar N;\n\tvar i;\n\tvar j;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tlen = this._length;\n\tbuf = this._buffer;\n\tN = floor( len / 2 );\n\tfor ( i = 0; i < N; i++ ) {\n\t\tj = len - i - 1;\n\t\ttmp = buf[ (2*i) ];\n\t\tbuf[ (2*i) ] = buf[ (2*j) ];\n\t\tbuf[ (2*j) ] = tmp;\n\t\ttmp = buf[ (2*i)+1 ];\n\t\tbuf[ (2*i)+1 ] = buf[ (2*j)+1 ];\n\t\tbuf[ (2*j)+1 ] = tmp;\n\t}\n\treturn this;\n});\n\n/**\n* Sets an array element.\n*\n* ## Notes\n*\n* - When provided a typed array, real or complex, we must check whether the source array shares the same buffer as the target array and whether the underlying memory overlaps. In particular, we are concerned with the following scenario:\n*\n* ```text\n* buf: ---------------------\n* src: ---------------------\n* ```\n*\n* In the above, as we copy values from `src`, we will overwrite values in the `src` view, resulting in duplicated values copied into the end of `buf`, which is not intended. Hence, to avoid overwriting source values, we must **copy** source values to a temporary array.\n*\n* In the other overlapping scenario,\n*\n* ```text\n* buf: ---------------------\n* src: ---------------------\n* ```\n*\n* by the time we begin copying into the overlapping region, we are copying from the end of `src`, a non-overlapping region, which means we don't run the risk of copying copied values, rather than the original `src` values as intended.\n*\n* @name set\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {(Collection|Complex|ComplexArray)} value - value(s)\n* @param {NonNegativeInteger} [i=0] - element index at which to start writing values\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be either a complex number, an array-like object, or a complex number array\n* @throws {TypeError} index argument must be a nonnegative integer\n* @throws {RangeError} array-like objects must have a length which is a multiple of two\n* @throws {RangeError} index argument is out-of-bounds\n* @throws {RangeError} target array lacks sufficient storage to accommodate source values\n* @returns {void}\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* var arr = new Complex128Array( 10 );\n*\n* var z = arr.get( 0 );\n* // returns \n*\n* var re = real( z );\n* // returns 0.0\n*\n* var im = imag( z );\n* // returns 0.0\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n*\n* z = arr.get( 0 );\n* // returns \n*\n* re = real( z );\n* // returns 1.0\n*\n* im = imag( z );\n* // returns -1.0\n*/\nsetReadOnly( Complex128Array.prototype, 'set', function set( value ) {\n\t/* eslint-disable no-underscore-dangle */\n\tvar sbuf;\n\tvar idx;\n\tvar buf;\n\tvar tmp;\n\tvar flg;\n\tvar N;\n\tvar v;\n\tvar i;\n\tvar j;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tbuf = this._buffer;\n\tif ( arguments.length > 1 ) {\n\t\tidx = arguments[ 1 ];\n\t\tif ( !isNonNegativeInteger( idx ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Index argument must be a nonnegative integer. Value: `%s`.', idx ) );\n\t\t}\n\t} else {\n\t\tidx = 0;\n\t}\n\tif ( isComplexLike( value ) ) {\n\t\tif ( idx >= this._length ) {\n\t\t\tthrow new RangeError( format( 'invalid argument. Index argument is out-of-bounds. Value: `%u`.', idx ) );\n\t\t}\n\t\tidx *= 2;\n\t\tbuf[ idx ] = real( value );\n\t\tbuf[ idx+1 ] = imag( value );\n\t\treturn;\n\t}\n\tif ( isComplexArray( value ) ) {\n\t\tN = value._length;\n\t\tif ( idx+N > this._length ) {\n\t\t\tthrow new RangeError( 'invalid arguments. Target array lacks sufficient storage to accommodate source values.' );\n\t\t}\n\t\tsbuf = value._buffer;\n\n\t\t// Check for overlapping memory...\n\t\tj = buf.byteOffset + (idx*BYTES_PER_ELEMENT);\n\t\tif (\n\t\t\tsbuf.buffer === buf.buffer &&\n\t\t\t(\n\t\t\t\tsbuf.byteOffset < j &&\n\t\t\t\tsbuf.byteOffset+sbuf.byteLength > j\n\t\t\t)\n\t\t) {\n\t\t\t// We need to copy source values...\n\t\t\ttmp = new Float64Array( sbuf.length );\n\t\t\tfor ( i = 0; i < sbuf.length; i++ ) {\n\t\t\t\ttmp[ i ] = sbuf[ i ];\n\t\t\t}\n\t\t\tsbuf = tmp;\n\t\t}\n\t\tidx *= 2;\n\t\tj = 0;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\tbuf[ idx ] = sbuf[ j ];\n\t\t\tbuf[ idx+1 ] = sbuf[ j+1 ];\n\t\t\tidx += 2; // stride\n\t\t\tj += 2; // stride\n\t\t}\n\t\treturn;\n\t}\n\tif ( isCollection( value ) ) {\n\t\t// Detect whether we've been provided an array of complex numbers...\n\t\tN = value.length;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\tif ( !isComplexLike( value[ i ] ) ) {\n\t\t\t\tflg = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t// If an array does not contain only complex numbers, then we assume interleaved real and imaginary components...\n\t\tif ( flg ) {\n\t\t\tif ( !isEven( N ) ) {\n\t\t\t\tthrow new RangeError( format( 'invalid argument. Array-like object arguments must have a length which is a multiple of two. Length: `%u`.', N ) );\n\t\t\t}\n\t\t\tif ( idx+(N/2) > this._length ) {\n\t\t\t\tthrow new RangeError( 'invalid arguments. Target array lacks sufficient storage to accommodate source values.' );\n\t\t\t}\n\t\t\tsbuf = value;\n\n\t\t\t// Check for overlapping memory...\n\t\t\tj = buf.byteOffset + (idx*BYTES_PER_ELEMENT);\n\t\t\tif (\n\t\t\t\tsbuf.buffer === buf.buffer &&\n\t\t\t\t(\n\t\t\t\t\tsbuf.byteOffset < j &&\n\t\t\t\t\tsbuf.byteOffset+sbuf.byteLength > j\n\t\t\t\t)\n\t\t\t) {\n\t\t\t\t// We need to copy source values...\n\t\t\t\ttmp = new Float64Array( N );\n\t\t\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\t\t\ttmp[ i ] = sbuf[ i ];\n\t\t\t\t}\n\t\t\t\tsbuf = tmp;\n\t\t\t}\n\t\t\tidx *= 2;\n\t\t\tN /= 2;\n\t\t\tj = 0;\n\t\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\t\tbuf[ idx ] = sbuf[ j ];\n\t\t\t\tbuf[ idx+1 ] = sbuf[ j+1 ];\n\t\t\t\tidx += 2; // stride\n\t\t\t\tj += 2; // stride\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\t// If an array contains only complex numbers, then we need to extract real and imaginary components...\n\t\tif ( idx+N > this._length ) {\n\t\t\tthrow new RangeError( 'invalid arguments. Target array lacks sufficient storage to accommodate source values.' );\n\t\t}\n\t\tidx *= 2;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\tv = value[ i ];\n\t\t\tbuf[ idx ] = real( v );\n\t\t\tbuf[ idx+1 ] = imag( v );\n\t\t\tidx += 2; // stride\n\t\t}\n\t\treturn;\n\t}\n\tthrow new TypeError( format( 'invalid argument. First argument must be either a complex number, an array-like object, or a complex number array. Value: `%s`.', value ) );\n\n\t/* eslint-enable no-underscore-dangle */\n});\n\n/**\n* Copies a portion of a typed array to a new typed array.\n*\n* @name slice\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {integer} [start=0] - starting index (inclusive)\n* @param {integer} [end] - ending index (exclusive)\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be an integer\n* @throws {TypeError} second argument must be an integer\n* @returns {Complex128Array} complex number array\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* var arr = new Complex128Array( 5 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n* arr.set( [ 4.0, -4.0 ], 3 );\n* arr.set( [ 5.0, -5.0 ], 4 );\n*\n* var out = arr.slice();\n* // returns \n*\n* var len = out.length;\n* // returns 5\n*\n* var z = out.get( 0 );\n* // returns \n*\n* var re = real( z );\n* // returns 1.0\n*\n* var im = imag( z );\n* // returns -1.0\n*\n* z = out.get( len-1 );\n* // returns \n*\n* re = real( z );\n* // returns 5.0\n*\n* im = imag( z );\n* // returns -5.0\n*\n* out = arr.slice( 1, -2 );\n* // returns \n*\n* len = out.length;\n* // returns 2\n*\n* z = out.get( 0 );\n* // returns \n*\n* re = real( z );\n* // returns 2.0\n*\n* im = imag( z );\n* // returns -2.0\n*\n* z = out.get( len-1 );\n* // returns \n*\n* re = real( z );\n* // returns 3.0\n*\n* im = imag( z );\n* // returns -3.0\n*/\nsetReadOnly( Complex128Array.prototype, 'slice', function slice( start, end ) {\n\tvar outlen;\n\tvar outbuf;\n\tvar out;\n\tvar idx;\n\tvar buf;\n\tvar len;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tbuf = this._buffer;\n\tlen = this._length;\n\tif ( arguments.length === 0 ) {\n\t\tstart = 0;\n\t\tend = len;\n\t} else {\n\t\tif ( !isInteger( start ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. First argument must be an integer. Value: `%s`.', start ) );\n\t\t}\n\t\tif ( start < 0 ) {\n\t\t\tstart += len;\n\t\t\tif ( start < 0 ) {\n\t\t\t\tstart = 0;\n\t\t\t}\n\t\t}\n\t\tif ( arguments.length === 1 ) {\n\t\t\tend = len;\n\t\t} else {\n\t\t\tif ( !isInteger( end ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be an integer. Value: `%s`.', end ) );\n\t\t\t}\n\t\t\tif ( end < 0 ) {\n\t\t\t\tend += len;\n\t\t\t\tif ( end < 0 ) {\n\t\t\t\t\tend = 0;\n\t\t\t\t}\n\t\t\t} else if ( end > len ) {\n\t\t\t\tend = len;\n\t\t\t}\n\t\t}\n\t}\n\tif ( start < end ) {\n\t\toutlen = end - start;\n\t} else {\n\t\toutlen = 0;\n\t}\n\tout = new this.constructor( outlen );\n\toutbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\tfor ( i = 0; i < outlen; i++ ) {\n\t\tidx = 2*(i+start);\n\t\toutbuf[ 2*i ] = buf[ idx ];\n\t\toutbuf[ (2*i)+1 ] = buf[ idx+1 ];\n\t}\n\treturn out;\n});\n\n/**\n* Tests whether at least one element in an array passes a test implemented by a predicate function.\n*\n* @name some\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {boolean} boolean indicating whether at least one element passes a test\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* function predicate( v ) {\n* return ( real( v ) === imag( v ) );\n* }\n*\n* var arr = new Complex128Array( 3 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n*\n* var bool = arr.some( predicate );\n* // returns true\n*/\nsetReadOnly( Complex128Array.prototype, 'some', function some( predicate, thisArg ) {\n\tvar buf;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tif ( predicate.call( thisArg, getComplex128( buf, i ), i, this ) ) {\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n});\n\n/**\n* Creates a new typed array view over the same underlying `ArrayBuffer` and with the same underlying data type as the host array.\n*\n* @name subarray\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {integer} [begin=0] - starting index (inclusive)\n* @param {integer} [end] - ending index (exclusive)\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be an integer\n* @throws {TypeError} second argument must be an integer\n* @returns {Complex64Array} subarray\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* var arr = new Complex128Array( 5 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n* arr.set( [ 4.0, -4.0 ], 3 );\n* arr.set( [ 5.0, -5.0 ], 4 );\n*\n* var subarr = arr.subarray();\n* // returns \n*\n* var len = subarr.length;\n* // returns 5\n*\n* var z = subarr.get( 0 );\n* // returns \n*\n* var re = real( z );\n* // returns 1.0\n*\n* var im = imag( z );\n* // returns -1.0\n*\n* z = subarr.get( len-1 );\n* // returns \n*\n* re = real( z );\n* // returns 5.0\n*\n* im = imag( z );\n* // returns -5.0\n*\n* subarr = arr.subarray( 1, -2 );\n* // returns \n*\n* len = subarr.length;\n* // returns 2\n*\n* z = subarr.get( 0 );\n* // returns \n*\n* re = real( z );\n* // returns 2.0\n*\n* im = imag( z );\n* // returns -2.0\n*\n* z = subarr.get( len-1 );\n* // returns \n*\n* re = real( z );\n* // returns 3.0\n*\n* im = imag( z );\n* // returns -3.0\n*/\nsetReadOnly( Complex128Array.prototype, 'subarray', function subarray( begin, end ) {\n\tvar offset;\n\tvar buf;\n\tvar len;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tbuf = this._buffer;\n\tlen = this._length;\n\tif ( arguments.length === 0 ) {\n\t\tbegin = 0;\n\t\tend = len;\n\t} else {\n\t\tif ( !isInteger( begin ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. First argument must be an integer. Value: `%s`.', begin ) );\n\t\t}\n\t\tif ( begin < 0 ) {\n\t\t\tbegin += len;\n\t\t\tif ( begin < 0 ) {\n\t\t\t\tbegin = 0;\n\t\t\t}\n\t\t}\n\t\tif ( arguments.length === 1 ) {\n\t\t\tend = len;\n\t\t} else {\n\t\t\tif ( !isInteger( end ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be an integer. Value: `%s`.', end ) );\n\t\t\t}\n\t\t\tif ( end < 0 ) {\n\t\t\t\tend += len;\n\t\t\t\tif ( end < 0 ) {\n\t\t\t\t\tend = 0;\n\t\t\t\t}\n\t\t\t} else if ( end > len ) {\n\t\t\t\tend = len;\n\t\t\t}\n\t\t}\n\t}\n\tif ( begin >= len ) {\n\t\tlen = 0;\n\t\toffset = buf.byteLength;\n\t} else if ( begin >= end ) {\n\t\tlen = 0;\n\t\toffset = buf.byteOffset + ( begin*BYTES_PER_ELEMENT );\n\t} else {\n\t\tlen = end - begin;\n\t\toffset = buf.byteOffset + ( begin*BYTES_PER_ELEMENT );\n\t}\n\treturn new this.constructor( buf.buffer, offset, ( len < 0 ) ? 0 : len );\n});\n\n/**\n* Returns a new typed array containing the elements in reversed order.\n*\n* @name toReversed\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Complex128Array} reversed array\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* var arr = new Complex128Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var out = arr.toReversed();\n* // returns \n*\n* var z = out.get( 0 );\n* // returns \n*\n* var re = real( z );\n* // returns 3.0\n*\n* var im = imag( z );\n* // returns 3.0\n*\n* z = out.get( 1 );\n* // returns \n*\n* re = real( z );\n* // returns 2.0\n*\n* im = imag( z );\n* // returns 2.0\n*\n* z = out.get( 2 );\n* // returns \n*\n* re = real( z );\n* // returns 1.0\n*\n* im = imag( z );\n* // returns 1.0\n*/\nsetReadOnly( Complex128Array.prototype, 'toReversed', function toReversed() {\n\tvar outbuf;\n\tvar out;\n\tvar len;\n\tvar buf;\n\tvar i;\n\tvar j;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tlen = this._length;\n\tout = new this.constructor( len );\n\tbuf = this._buffer;\n\toutbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\tfor ( i = 0; i < len; i++ ) {\n\t\tj = len - i - 1;\n\t\toutbuf[ (2*i) ] = buf[ (2*j) ];\n\t\toutbuf[ (2*i)+1 ] = buf[ (2*j)+1 ];\n\t}\n\treturn out;\n});\n\n/**\n* Serializes an array as a string.\n*\n* @name toString\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @throws {TypeError} `this` must be a complex number array\n* @returns {string} string representation\n*\n* @example\n* var arr = new Complex128Array( 2 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n*\n* var str = arr.toString();\n* // returns '1 + 1i,2 + 2i'\n*/\nsetReadOnly( Complex128Array.prototype, 'toString', function toString() {\n\tvar out;\n\tvar buf;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tout = [];\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tout.push( getComplex128( buf, i ).toString() );\n\t}\n\treturn out.join( ',' );\n});\n\n/**\n* Returns a new typed array with the element at a provided index replaced with a provided value.\n*\n* @name with\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {integer} index - element index\n* @param {ComplexLike} value - new value\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be an integer\n* @throws {RangeError} index argument is out-of-bounds\n* @throws {TypeError} second argument must be a complex number\n* @returns {Complex128Array} new typed array\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n* import Complex128 from '@stdlib/complex-float64';\n*\n* var arr = new Complex128Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var out = arr.with( 0, new Complex128( 4.0, 4.0 ) );\n* // returns \n*\n* var z = out.get( 0 );\n* // returns \n*\n* var re = real( z );\n* // returns 4.0\n*\n* var im = imag( z );\n* // returns 4.0\n*/\nsetReadOnly( Complex128Array.prototype, 'with', function copyWith( index, value ) {\n\tvar buf;\n\tvar out;\n\tvar len;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isInteger( index ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be an integer. Value: `%s`.', index ) );\n\t}\n\tlen = this._length;\n\tif ( index < 0 ) {\n\t\tindex += len;\n\t}\n\tif ( index < 0 || index >= len ) {\n\t\tthrow new RangeError( format( 'invalid argument. Index argument is out-of-bounds. Value: `%s`.', index ) );\n\t}\n\tif ( !isComplexLike( value ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Second argument must be a complex number. Value: `%s`.', value ) );\n\t}\n\tout = new this.constructor( this._buffer );\n\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\tbuf[ 2*index ] = real( value );\n\tbuf[ (2*index)+1 ] = imag( value );\n\treturn out;\n});\n\n\n// EXPORTS //\n\nexport default Complex128Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport real from '@stdlib/complex-real';\nimport imag from '@stdlib/complex-imag';\n\n\n// MAIN //\n\n/**\n* Returns a strided array of real and imaginary components.\n*\n* @private\n* @param {Float64Array} buf - output array\n* @param {Array} arr - array containing complex numbers\n* @returns {(Float64Array|null)} output array or null\n*/\nfunction fromArray( buf, arr ) {\n\tvar len;\n\tvar v;\n\tvar i;\n\tvar j;\n\n\tlen = arr.length;\n\tj = 0;\n\tfor ( i = 0; i < len; i++ ) {\n\t\tv = arr[ i ];\n\t\tif ( !isComplexLike( v ) ) {\n\t\t\treturn null;\n\t\t}\n\t\tbuf[ j ] = real( v );\n\t\tbuf[ j+1 ] = imag( v );\n\t\tj += 2; // stride\n\t}\n\treturn buf;\n}\n\n\n// EXPORTS //\n\nexport default fromArray;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isArrayLikeObject from '@stdlib/assert-is-array-like-object';\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport format from '@stdlib/string-format';\nimport real from '@stdlib/complex-real';\nimport imag from '@stdlib/complex-imag';\n\n\n// MAIN //\n\n/**\n* Returns an array of iterated values.\n*\n* @private\n* @param {Object} it - iterator\n* @param {Function} clbk - callback to invoke for each iterated value\n* @param {*} thisArg - invocation context\n* @returns {(Array|TypeError)} array or an error\n*/\nfunction fromIteratorMap( it, clbk, thisArg ) {\n\tvar out;\n\tvar v;\n\tvar z;\n\tvar i;\n\n\tout = [];\n\ti = -1;\n\twhile ( true ) {\n\t\tv = it.next();\n\t\tif ( v.done ) {\n\t\t\tbreak;\n\t\t}\n\t\ti += 1;\n\t\tz = clbk.call( thisArg, v.value, i );\n\t\tif ( isArrayLikeObject( z ) && z.length >= 2 ) {\n\t\t\tout.push( z[ 0 ], z[ 1 ] );\n\t\t} else if ( isComplexLike( z ) ) {\n\t\t\tout.push( real( z ), imag( z ) );\n\t\t} else {\n\t\t\treturn new TypeError( format( 'invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', z ) );\n\t\t}\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default fromIteratorMap;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport Float64Array from '@stdlib/array-float64';\nimport Float32Array from '@stdlib/array-float32';\nimport Int16Array from '@stdlib/array-int16';\nimport Int32Array from '@stdlib/array-int32';\nimport Int8Array from '@stdlib/array-int8';\nimport Uint16Array from '@stdlib/array-uint16';\nimport Uint32Array from '@stdlib/array-uint32';\nimport Uint8Array from '@stdlib/array-uint8';\nimport Uint8ClampedArray from '@stdlib/array-uint8c';\nimport Complex64Array from '@stdlib/array-complex64';\nimport Complex128Array from '@stdlib/array-complex128';\n\n\n// MAIN //\n\n// Mapping from data types to constructors...\nvar ctors = {\n\t'float64': Float64Array,\n\t'float32': Float32Array,\n\t'generic': Array, // TODO: replace with `stdlib` pkg\n\t'int16': Int16Array,\n\t'int32': Int32Array,\n\t'int8': Int8Array,\n\t'uint16': Uint16Array,\n\t'uint32': Uint32Array,\n\t'uint8': Uint8Array,\n\t'uint8c': Uint8ClampedArray,\n\t'complex64': Complex64Array,\n\t'complex128': Complex128Array\n};\n\n\n// EXPORTS //\n\nexport default ctors;\n","/**\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// MAIN //\n\n/**\n* Returns default array settings.\n*\n* @returns {Object} defaults\n*\n* @example\n* var o = defaults();\n* // returns {...}\n*/\nfunction defaults() {\n\treturn {\n\t\t// Data types:\n\t\t'dtypes': {\n\t\t\t'default': 'float64',\n\t\t\t'numeric': 'float64',\n\t\t\t'real': 'float64',\n\t\t\t'floating_point': 'float64',\n\t\t\t'real_floating_point': 'float64',\n\t\t\t'complex_floating_point': 'complex128',\n\t\t\t'integer': 'int32',\n\t\t\t'signed_integer': 'int32',\n\t\t\t'unsigned_integer': 'uint32'\n\t\t}\n\t};\n}\n\n\n// EXPORTS //\n\nexport default defaults;\n","/**\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// MODULES //\n\nimport defaults from './main.js';\n\n\n// VARIABLES //\n\nvar DEFAULTS = defaults();\nvar HASH = {\n\t'dtypes.default': DEFAULTS.dtypes.default,\n\t'dtypes.numeric': DEFAULTS.dtypes.numeric,\n\t'dtypes.real': DEFAULTS.dtypes.real,\n\t'dtypes.floating_point': DEFAULTS.dtypes.floating_point,\n\t'dtypes.real_floating_point': DEFAULTS.dtypes.real_floating_point,\n\t'dtypes.complex_floating_point': DEFAULTS.dtypes.complex_floating_point,\n\t'dtypes.integer': DEFAULTS.dtypes.integer,\n\t'dtypes.signed_integer': DEFAULTS.dtypes.signed_integer,\n\t'dtypes.unsigned_integer': DEFAULTS.dtypes.unsigned_integer\n};\n\n\n// MAIN //\n\n/**\n* Returns a default array setting.\n*\n* @param {string} name - setting name\n* @returns {*} default setting or null\n*\n* @example\n* var v = get( 'dtypes.default' );\n* // returns \n*/\nfunction get( name ) {\n\tvar v = HASH[ name ];\n\treturn ( v === void 0 ) ? null : v;\n}\n\n\n// EXPORTS //\n\nexport default get;\n","/**\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* Return default array settings.\n*\n* @module @stdlib/array-defaults\n*\n* @example\n* import defaults from '@stdlib/array-defaults';\n*\n* var o = defaults();\n* // returns {...}\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport get from './get.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'get', get );\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isNonNegativeInteger } from '@stdlib/assert-is-nonnegative-integer';\nimport ctors from '@stdlib/array-ctors';\nimport gzeros from '@stdlib/array-base-zeros';\nimport defaults from '@stdlib/array-defaults';\nimport format from '@stdlib/string-format';\n\n\n// VARIABLES //\n\nvar DEFAULT_DTYPE = defaults.get( 'dtypes.default' );\n\n\n// MAIN //\n\n/**\n* Creates a zero-filled array having a specified length.\n*\n* @param {NonNegativeInteger} length - array length\n* @param {string} [dtype=\"float64\"] - data type\n* @throws {TypeError} first argument must be a nonnegative integer\n* @throws {TypeError} second argument must be a recognized data type\n* @returns {(TypedArray|Array|ComplexArray)} array or typed array\n*\n* @example\n* var arr = zeros( 2 );\n* // returns [ 0.0, 0.0 ]\n*\n* @example\n* var arr = zeros( 2, 'float32' );\n* // returns [ 0.0, 0.0 ]\n*/\nfunction zeros( length ) {\n\tvar dtype;\n\tvar ctor;\n\tif ( !isNonNegativeInteger( length ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a nonnegative integer. Value: `%s`.', length ) );\n\t}\n\tif ( arguments.length > 1 ) {\n\t\tdtype = arguments[ 1 ];\n\t} else {\n\t\tdtype = DEFAULT_DTYPE;\n\t}\n\tif ( dtype === 'generic' ) {\n\t\treturn gzeros( length );\n\t}\n\tctor = ctors( dtype );\n\tif ( ctor === null ) {\n\t\tthrow new TypeError( format( 'invalid argument. Second argument must be a recognized data type. Value: `%s`.', dtype ) );\n\t}\n\treturn new ctor( length ); // WARNING: we assume that, apart from 'generic', the constructors for supported array data types are zero-filled by default\n}\n\n\n// EXPORTS //\n\nexport default zeros;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Returns a filled \"generic\" array.\n*\n* @param {*} value - fill value\n* @param {NonNegativeInteger} len - array length\n* @returns {Array} filled array\n*\n* @example\n* var out = filled( 0.0, 3 );\n* // returns [ 0.0, 0.0, 0.0 ]\n*\n* @example\n* var out = filled( 'beep', 3 );\n* // returns [ 'beep', 'beep', 'beep' ]\n*/\nfunction filled( value, len ) {\n\tvar arr;\n\tvar i;\n\n\t// Manually push elements in order to ensure \"fast\" elements...\n\tarr = [];\n\tfor ( i = 0; i < len; i++ ) {\n\t\tarr.push( value );\n\t}\n\treturn arr;\n}\n\n\n// EXPORTS //\n\nexport default filled;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport filled from '@stdlib/array-base-filled';\n\n\n// MAIN //\n\n/**\n* Returns a zero-filled \"generic\" array.\n*\n* @param {NonNegativeInteger} len - array length\n* @returns {Array} output array\n*\n* @example\n* var out = zeros( 3 );\n* // returns [ 0.0, 0.0, 0.0 ]\n*/\nfunction zeros( len ) {\n\treturn filled( 0.0, len );\n}\n\n\n// EXPORTS //\n\nexport default zeros;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport table from './ctors.js';\n\n\n// MAIN //\n\n/**\n* Returns an array constructor.\n*\n* @param {string} dtype - data type\n* @returns {(Function|null)} constructor or null\n*\n* @example\n* var ctor = ctors( 'float64' );\n* // returns \n*\n* @example\n* var ctor = ctors( 'float' );\n* // returns null\n*/\nfunction ctors( dtype ) {\n\treturn table[ dtype ] || null;\n}\n\n\n// EXPORTS //\n\nexport default ctors;\n","/**\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// MODULES //\n\nimport zeros from '@stdlib/array-zeros';\n\n\n// MAIN //\n\n/**\n* Creates an uninitialized array having a specified length.\n*\n* @private\n* @param {NonNegativeInteger} length - array length\n* @param {string} [dtype=\"float64\"] - data type\n* @throws {TypeError} first argument must be a nonnegative integer\n* @throws {TypeError} second argument must be a recognized data type\n* @returns {(TypedArray|Array|ComplexArray)} array or typed array\n*\n* @example\n* var arr = empty( 2 );\n* // returns \n*\n* @example\n* var arr = empty( 2, 'float32' );\n* // returns \n*/\nfunction empty( length ) {\n\tif ( arguments.length > 1 ) {\n\t\treturn zeros( length, arguments[ 1 ] );\n\t}\n\treturn zeros( length );\n}\n\n\n// EXPORTS //\n\nexport default empty;\n"],"names":["main","Object","defineProperty","isNumber","value","zeros","n","i","out","zeroPad","str","width","right","negative","pad","length","startsWithMinus","substr","lowercase","String","prototype","toLowerCase","uppercase","toUpperCase","formatInteger","token","base","specifier","arg","parseInt","isFinite","Error","toString","precision","padRight","sign","alternate","call","charAt","abs","Math","replace","RE_EXP_POS_DIGITS","RE_EXP_NEG_DIGITS","RE_ONLY_DIGITS","RE_DIGITS_BEFORE_EXP","RE_TRAILING_PERIOD_ZERO","RE_PERIOD_ZERO_EXP","RE_ZERO_BEFORE_EXP","formatDouble","digits","f","parseFloat","toExponential","toFixed","toPrecision","spaces","fromCharCode","isnan","isNaN","isArray","Array","initialize","flags","mapping","formatInterpolate","tokens","hasPeriod","flag","num","pos","j","TypeError","padZeros","indexOf","arguments","maxWidth","substring","RE","parse","match","formatTokenize","content","prev","exec","slice","lastIndex","push","format","args","tokenize","interpolate","apply","objectProtoype","toStr","defineGetter","__defineGetter__","defineSetter","__defineSetter__","lookupGetter","__lookupGetter__","lookupSetter","__lookupSetter__","err","hasDefinePropertySupport","builtin","obj","prop","descriptor","hasValue","hasGet","hasSet","__proto__","get","set","defineProperty$1","setNonEnumerableReadOnly","configurable","enumerable","writable","FLG","Symbol","hasToStringTagSupport","toStringTag","has","hasOwnProperty","hasOwnProp","property","Sym","toStrTag","nativeClass","hasToStringTag","v","isOwn","tag","main$b","Number","test","isPrimitive","isObject","setReadOnly","FLOAT64_PINF","POSITIVE_INFINITY","FLOAT64_NINF","NEGATIVE_INFINITY","floor","isInteger","x","PINF","NINF","isInt","valueOf","isNonNegativeInteger","hasFloat64Array","Float64Array","ctor","Float64Array$1","bool","arr","GlobalFloat64Array","NaN","hasFloat64ArraySupport","hasFloat32Array","Float32Array","Float32Array$1","GlobalFloat32Array","hasFloat32ArraySupport","hasInt16Array","Int16Array","Int16Array$1","GlobalInt16Array","INT16_MAX","hasInt16ArraySupport","hasInt32Array","Int32Array","Int32Array$1","GlobalInt32Array","INT32_MAX","hasInt32ArraySupport","hasInt8Array","Int8Array","Int8Array$1","GlobalInt8Array","INT8_MAX","hasInt8ArraySupport","hasUint16Array","Uint16Array","Uint16Array$1","GlobalUint16Array","UINT16_MAX","hasUint16ArraySupport","hasUint32Array","Uint32Array","Uint32Array$1","GlobalUint32Array","UINT32_MAX","hasUint32ArraySupport","hasUint8Array","Uint8Array","Uint8Array$1","GlobalUint8Array","UINT8_MAX","hasUint8ArraySupport","hasUint8ClampedArray","Uint8ClampedArray","Uint8ClampedArray$1","GlobalUint8ClampedArray","hasUint8ClampedArraySupport","MAX_ARRAY_LENGTH","isArrayLikeObject","MAX_LENGTH","MAX_TYPED_ARRAY_LENGTH","isCollection","hasArrayBuffer","ArrayBuffer","isArrayBuffer","main$1","isString","isBoolean","Bool","Boolean","self","window","global","globalThis","root","codegen","Function","GlobalThis","Self","Win","Global","getGlobal","nodeList","document","childNodes","typedarray","reFunctionName","RE_FUNCTION_NAME","isObjectLike","constructorName","name","constructor","_isBuffer","isBuffer","REGEXP","predicate","len","arrayfun","ctorName","type","isFunction","typeOf","Complex128","real","imag","this","re","im","fround","FLOAT32_VIEW","float64ToFloat32$1","Complex64","float64ToFloat32","isComplexLike","isEven","BYTES_PER_ELEMENT","isComplex64Array","isComplex128Array","hasIteratorSymbolSupport","iterator","IteratorSymbol","setNonEnumerableReadOnlyAccessor","getter","realf","z","imagf","reinterpret","offset","buffer","byteOffset","GETTERS","float64","idx","float32","int32","int16","int8","uint32","uint16","uint8","uint8c","generic","default","dtype","complex128","complex64","fromIterator","it","next","done","HAS_ITERATOR_SYMBOL","isComplexArray","Complex64Array","_length","_buffer","isComplexArrayConstructor","getComplex64","buf","nargs","fromArray","RangeError","reinterpret64","reinterpret128","byteLength","ITERATOR_SYMBOL","src","thisArg","clbk","tmp","flg","accessorGetter","fromIteratorMap","setReadOnlyAccessor","target","start","copyWithin","iter","entries","end","fcn","searchElement","fromIndex","separator","sep","join","outbuf","reducer","initialValue","acc","N","sbuf","outlen","begin","index","Complex128Array","getComplex128","ctors","defaults","dtypes","numeric","floating_point","real_floating_point","complex_floating_point","integer","signed_integer","unsigned_integer","DEFAULTS","HASH","DEFAULT_DTYPE","filled","table","empty"],"mappings":";;AAsBA,IAAIA,EAA0C,mBAA1BC,OAAOC,eAAkCD,OAAOC,eAAiB,KCiCrF,IAAIA,E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,aAJduR,EADI3N,UAAU5D,OAAS,EACf4D,UAAW,GAEX4R,IAGR,OC5BF,SAAiBnW,EAAOmP,GACvB,IAAIzF,EACAvJ,EAIJ,IADAuJ,EAAM,GACAvJ,EAAI,EAAGA,EAAIgP,EAAKhP,IACrBuJ,EAAIvE,KAAMnF,GAEX,OAAO0J,CACR,CCTQ0M,CAAQ,EF2BCzV,GAGhB,GADA4I,EG1BD,SAAgB2I,GACf,OAAOmE,GAAOnE,IAAW,IAC1B,CHwBQqD,CAAOrD,GACA,OAAT3I,EACJ,MAAM,IAAInF,UAAWgB,EAAQ,iFAAkF8M,IAEhH,OAAO,IAAI3I,EAAM5I,EAClB,CI3BA,SAAS2V,GAAO3V,GACf,OAAK4D,UAAU5D,OAAS,EAChBV,GAAOU,EAAQ4D,UAAW,IAE3BtE,GAAOU,EACf","x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189]} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index ed5a549..0000000 --- a/stats.html +++ /dev/null @@ -1,4842 +0,0 @@ - - - - - - - - Rollup Visualizer - - - -
- - - - - From 0194a693229e2f41940ed63e41cb5fd449bc36ea Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Fri, 12 Apr 2024 09:07:52 +0000 Subject: [PATCH 61/75] 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 | 36 +- SECURITY.md | 5 - benchmark/benchmark.js | 264 -- benchmark/benchmark.length.complex128.js | 93 - benchmark/benchmark.length.complex64.js | 93 - benchmark/benchmark.length.float32.js | 93 - benchmark/benchmark.length.float64.js | 93 - benchmark/benchmark.length.generic.js | 93 - benchmark/benchmark.length.int16.js | 93 - benchmark/benchmark.length.int32.js | 93 - benchmark/benchmark.length.int8.js | 93 - benchmark/benchmark.length.uint16.js | 93 - benchmark/benchmark.length.uint32.js | 93 - benchmark/benchmark.length.uint8.js | 93 - benchmark/benchmark.length.uint8c.js | 93 - branches.md | 56 - dist/index.d.ts | 3 - dist/index.js | 9 - dist/index.js.map | 7 - docs/repl.txt | 52 - docs/types/test.ts | 77 - examples/index.js | 33 - lib/index.js | 58 - lib/is_buffer_uint8array.js | 47 - lib/main.js | 107 - lib/polyfill.js | 56 - docs/types/index.d.ts => mod.d.ts | 2 +- mod.js | 4 + mod.js.map | 1 + package.json | 82 +- stats.html | 4842 +++++++++++++++++++++ test/dist/test.js | 33 - test/test.js | 60 - test/test.main.js | 274 -- test/test.polyfill.js | 324 -- 58 files changed, 4859 insertions(+), 5856 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 benchmark/benchmark.js delete mode 100644 benchmark/benchmark.length.complex128.js delete mode 100644 benchmark/benchmark.length.complex64.js delete mode 100644 benchmark/benchmark.length.float32.js delete mode 100644 benchmark/benchmark.length.float64.js delete mode 100644 benchmark/benchmark.length.generic.js delete mode 100644 benchmark/benchmark.length.int16.js delete mode 100644 benchmark/benchmark.length.int32.js delete mode 100644 benchmark/benchmark.length.int8.js delete mode 100644 benchmark/benchmark.length.uint16.js delete mode 100644 benchmark/benchmark.length.uint32.js delete mode 100644 benchmark/benchmark.length.uint8.js delete mode 100644 benchmark/benchmark.length.uint8c.js 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/repl.txt delete mode 100644 docs/types/test.ts delete mode 100644 examples/index.js delete mode 100644 lib/index.js delete mode 100644 lib/is_buffer_uint8array.js delete mode 100644 lib/main.js delete mode 100644 lib/polyfill.js rename docs/types/index.d.ts => mod.d.ts (96%) create mode 100644 mod.js create mode 100644 mod.js.map create mode 100644 stats.html delete mode 100644 test/dist/test.js delete mode 100644 test/test.js delete mode 100644 test/test.main.js delete mode 100644 test/test.polyfill.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 96f81a8..0000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,7 +0,0 @@ - - -We are excited about your pull request, but unfortunately we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/empty) 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 ddb353e..0000000 --- a/.github/workflows/close_pull_requests.yml +++ /dev/null @@ -1,54 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: close_pull_requests - -# Workflow triggers: -on: - pull_request_target: - types: [opened] - -# Workflow jobs: -jobs: - - # Define job to close all pull requests: - run: - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Close pull request - - name: 'Close pull request' - # Pin action to full length commit SHA corresponding to v3.1.2 - uses: superbrothers/close-pull-request@9c18513d320d7b2c7185fb93396d0c664d5d8448 - with: - comment: | - Thank you for submitting a pull request. :raised_hands: - - We greatly appreciate your willingness to submit a contribution. However, we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). - - We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/empty) 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 8376c30..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: '49 1 * * 5' - - # 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 + + + + 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 8e62cb8..0000000 --- a/test/test.js +++ /dev/null @@ -1,60 +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 proxyquire = require( 'proxyquire' ); -var main = require( './../lib/main.js' ); -var polyfill = require( './../lib/polyfill.js' ); -var empty = require( './../lib' ); - - -// TESTS // - -tape( 'main export is a function', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof empty, 'function', 'main export is a function' ); - t.end(); -}); - -tape( 'if an environment supports Node.js buffer instances inheriting from Uint8Array, the main export supports returning arrays having uninitialized memory', function test( t ) { - var empty = proxyquire( './../lib', { - './is_buffer_uint8array.js': mock - }); - t.strictEqual( empty, main, 'returns expected value' ); - t.end(); - - function mock() { - return true; - } -}); - -tape( 'if an environment does not support Node.js buffer instances inheriting from Uint8Array, the main export supports returning zero-filled arrays', function test( t ) { - var empty = proxyquire( './../lib', { - './is_buffer_uint8array.js': mock - }); - t.strictEqual( empty, polyfill, 'returns expected value' ); - t.end(); - - function mock() { - return false; - } -}); diff --git a/test/test.main.js b/test/test.main.js deleted file mode 100644 index 3ceb26e..0000000 --- a/test/test.main.js +++ /dev/null @@ -1,274 +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 Float64Array = require( '@stdlib/array-float64' ); -var Float32Array = require( '@stdlib/array-float32' ); -var Int32Array = require( '@stdlib/array-int32' ); -var Uint32Array = require( '@stdlib/array-uint32' ); -var Int16Array = require( '@stdlib/array-int16' ); -var Uint16Array = require( '@stdlib/array-uint16' ); -var Int8Array = require( '@stdlib/array-int8' ); -var Uint8Array = require( '@stdlib/array-uint8' ); -var Uint8ClampedArray = require( '@stdlib/array-uint8c' ); -var Complex64Array = require( '@stdlib/array-complex64' ); -var Complex128Array = require( '@stdlib/array-complex128' ); -var instanceOf = require( '@stdlib/assert-instance-of' ); -var empty = require( './../lib/main.js' ); - - -// TESTS // - -tape( 'main export is a function', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof empty, 'function', 'main export is a function' ); - t.end(); -}); - -tape( 'the function throws an error if provided a value other than a nonnegative integer for the first argument', function test( t ) { - var values; - var i; - - values = [ - '5', - -3, - 3.14, - NaN, - true, - false, - null, - void 0, - [], - {}, - function noop() {} - ]; - - for ( i = 0; i < values.length; i++ ) { - t.throws( badValue( values[i] ), TypeError, 'throws an error when provided '+values[i] ); - } - t.end(); - - function badValue( value ) { - return function badValue() { - empty( value ); - }; - } -}); - -tape( 'the function throws an error if provided a value other than a nonnegative integer for the first argument (dtype)', function test( t ) { - var values; - var i; - - values = [ - '5', - -3, - 3.14, - NaN, - true, - false, - null, - void 0, - [], - {}, - function noop() {} - ]; - - for ( i = 0; i < values.length; i++ ) { - t.throws( badValue( values[i] ), TypeError, 'throws an error when provided '+values[i] ); - } - t.end(); - - function badValue( value ) { - return function badValue() { - empty( value, 'float32' ); - }; - } -}); - -tape( 'the function throws an error if provided an unrecognized data type', function test( t ) { - var values; - var i; - - values = [ - '5', - 'beep', - 'empty', - 'Int32', - 'Uint32', - 'Int16', - 'Uint16', - 'Int8', - 'Uint8', - 'Uint8c', - 'uint8_clamped', - 'Float64', - 'Float32', - 'FLOAT64', - 'FLOAT32', - 'GENERIC' - ]; - - for ( i = 0; i < values.length; i++ ) { - t.throws( badValue( values[i] ), TypeError, 'throws an error when provided '+values[i] ); - } - t.end(); - - function badValue( value ) { - return function badValue() { - empty( 10, value ); - }; - } -}); - -tape( 'the function returns an empty array (default)', function test( t ) { - var arr; - - arr = empty( 5 ); - t.strictEqual( instanceOf( arr, Float64Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=float64)', function test( t ) { - var arr; - - arr = empty( 5, 'float64' ); - t.strictEqual( instanceOf( arr, Float64Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=float32)', function test( t ) { - var arr; - - arr = empty( 5, 'float32' ); - t.strictEqual( instanceOf( arr, Float32Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=complex128)', function test( t ) { - var arr; - - arr = empty( 5, 'complex128' ); - t.strictEqual( instanceOf( arr, Complex128Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=complex64)', function test( t ) { - var arr; - - arr = empty( 5, 'complex64' ); - t.strictEqual( instanceOf( arr, Complex64Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=int32)', function test( t ) { - var arr; - - arr = empty( 5, 'int32' ); - t.strictEqual( instanceOf( arr, Int32Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=uint32)', function test( t ) { - var arr; - - arr = empty( 5, 'uint32' ); - t.strictEqual( instanceOf( arr, Uint32Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=int16)', function test( t ) { - var arr; - - arr = empty( 5, 'int16' ); - t.strictEqual( instanceOf( arr, Int16Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=uint16)', function test( t ) { - var arr; - - arr = empty( 5, 'uint16' ); - t.strictEqual( instanceOf( arr, Uint16Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=int8)', function test( t ) { - var arr; - - arr = empty( 5, 'int8' ); - t.strictEqual( instanceOf( arr, Int8Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=uint8)', function test( t ) { - var arr; - - arr = empty( 5, 'uint8' ); - t.strictEqual( instanceOf( arr, Uint8Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=uint8c)', function test( t ) { - var arr; - - arr = empty( 5, 'uint8c' ); - t.strictEqual( instanceOf( arr, Uint8ClampedArray ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=generic)', function test( t ) { - var expected; - var arr; - - expected = [ 0, 0, 0, 0, 0 ]; - - arr = empty( 5, 'generic' ); - t.strictEqual( instanceOf( arr, Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); diff --git a/test/test.polyfill.js b/test/test.polyfill.js deleted file mode 100644 index 17b99f3..0000000 --- a/test/test.polyfill.js +++ /dev/null @@ -1,324 +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 Float64Array = require( '@stdlib/array-float64' ); -var Float32Array = require( '@stdlib/array-float32' ); -var Int32Array = require( '@stdlib/array-int32' ); -var Uint32Array = require( '@stdlib/array-uint32' ); -var Int16Array = require( '@stdlib/array-int16' ); -var Uint16Array = require( '@stdlib/array-uint16' ); -var Int8Array = require( '@stdlib/array-int8' ); -var Uint8Array = require( '@stdlib/array-uint8' ); -var Uint8ClampedArray = require( '@stdlib/array-uint8c' ); -var Complex64Array = require( '@stdlib/array-complex64' ); -var Complex128Array = require( '@stdlib/array-complex128' ); -var reinterpret64 = require( '@stdlib/strided-base-reinterpret-complex64' ); -var reinterpret128 = require( '@stdlib/strided-base-reinterpret-complex128' ); -var instanceOf = require( '@stdlib/assert-instance-of' ); -var empty = require( './../lib/polyfill.js' ); - - -// TESTS // - -tape( 'main export is a function', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof empty, 'function', 'main export is a function' ); - t.end(); -}); - -tape( 'the function throws an error if provided a value other than a nonnegative integer for the first argument', function test( t ) { - var values; - var i; - - values = [ - '5', - -3, - 3.14, - NaN, - true, - false, - null, - void 0, - [], - {}, - function noop() {} - ]; - - for ( i = 0; i < values.length; i++ ) { - t.throws( badValue( values[i] ), TypeError, 'throws an error when provided '+values[i] ); - } - t.end(); - - function badValue( value ) { - return function badValue() { - empty( value ); - }; - } -}); - -tape( 'the function throws an error if provided a value other than a nonnegative integer for the first argument (dtype)', function test( t ) { - var values; - var i; - - values = [ - '5', - -3, - 3.14, - NaN, - true, - false, - null, - void 0, - [], - {}, - function noop() {} - ]; - - for ( i = 0; i < values.length; i++ ) { - t.throws( badValue( values[i] ), TypeError, 'throws an error when provided '+values[i] ); - } - t.end(); - - function badValue( value ) { - return function badValue() { - empty( value, 'float32' ); - }; - } -}); - -tape( 'the function throws an error if provided an unrecognized data type', function test( t ) { - var values; - var i; - - values = [ - '5', - 'beep', - 'empty', - 'Int32', - 'Uint32', - 'Int16', - 'Uint16', - 'Int8', - 'Uint8', - 'Uint8c', - 'uint8_clamped', - 'Float64', - 'Float32', - 'FLOAT64', - 'FLOAT32', - 'GENERIC' - ]; - - for ( i = 0; i < values.length; i++ ) { - t.throws( badValue( values[i] ), TypeError, 'throws an error when provided '+values[i] ); - } - t.end(); - - function badValue( value ) { - return function badValue() { - empty( 10, value ); - }; - } -}); - -tape( 'the function returns a zero-filled array (default)', function test( t ) { - var expected; - var arr; - - expected = new Float64Array( [ 0.0, 0.0, 0.0, 0.0, 0.0 ] ); - - arr = empty( 5 ); - t.strictEqual( instanceOf( arr, Float64Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=float64)', function test( t ) { - var expected; - var arr; - - expected = new Float64Array( [ 0.0, 0.0, 0.0, 0.0, 0.0 ] ); - - arr = empty( 5, 'float64' ); - t.strictEqual( instanceOf( arr, Float64Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=float32)', function test( t ) { - var expected; - var arr; - - expected = new Float32Array( [ 0.0, 0.0, 0.0, 0.0, 0.0 ] ); - - arr = empty( 5, 'float32' ); - t.strictEqual( instanceOf( arr, Float32Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=complex128)', function test( t ) { - var expected; - var arr; - - expected = new Float64Array( [ 0.0, 0.0, 0.0, 0.0 ] ); - - arr = empty( 2, 'complex128' ); - t.strictEqual( instanceOf( arr, Complex128Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length/2, 'returns expected value' ); - t.deepEqual( reinterpret128( arr, 0 ), expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=complex64)', function test( t ) { - var expected; - var arr; - - expected = new Float32Array( [ 0.0, 0.0, 0.0, 0.0 ] ); - - arr = empty( 2, 'complex64' ); - t.strictEqual( instanceOf( arr, Complex64Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length/2, 'returns expected value' ); - t.deepEqual( reinterpret64( arr, 0 ), expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=int32)', function test( t ) { - var expected; - var arr; - - expected = new Int32Array( [ 0, 0, 0, 0, 0 ] ); - - arr = empty( 5, 'int32' ); - t.strictEqual( instanceOf( arr, Int32Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=uint32)', function test( t ) { - var expected; - var arr; - - expected = new Uint32Array( [ 0, 0, 0, 0, 0 ] ); - - arr = empty( 5, 'uint32' ); - t.strictEqual( instanceOf( arr, Uint32Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=int16)', function test( t ) { - var expected; - var arr; - - expected = new Int16Array( [ 0, 0, 0, 0, 0 ] ); - - arr = empty( 5, 'int16' ); - t.strictEqual( instanceOf( arr, Int16Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=uint16)', function test( t ) { - var expected; - var arr; - - expected = new Uint16Array( [ 0, 0, 0, 0, 0 ] ); - - arr = empty( 5, 'uint16' ); - t.strictEqual( instanceOf( arr, Uint16Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=int8)', function test( t ) { - var expected; - var arr; - - expected = new Int8Array( [ 0, 0, 0, 0, 0 ] ); - - arr = empty( 5, 'int8' ); - t.strictEqual( instanceOf( arr, Int8Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=uint8)', function test( t ) { - var expected; - var arr; - - expected = new Uint8Array( [ 0, 0, 0, 0, 0 ] ); - - arr = empty( 5, 'uint8' ); - t.strictEqual( instanceOf( arr, Uint8Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=uint8c)', function test( t ) { - var expected; - var arr; - - expected = new Uint8ClampedArray( [ 0, 0, 0, 0, 0 ] ); - - arr = empty( 5, 'uint8c' ); - t.strictEqual( instanceOf( arr, Uint8ClampedArray ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=generic)', function test( t ) { - var expected; - var arr; - - expected = [ 0, 0, 0, 0, 0 ]; - - arr = empty( 5, 'generic' ); - t.strictEqual( instanceOf( arr, Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); From 8ac1a665f2aae319e0c7fc5d9a06339b2049ddde Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Wed, 26 Jun 2024 23:10:55 +0000 Subject: [PATCH 62/75] Transform error messages --- lib/main.js | 6 +++--- package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/main.js b/lib/main.js index 33d8392..44eb4a4 100644 --- a/lib/main.js +++ b/lib/main.js @@ -26,7 +26,7 @@ var ctors = require( '@stdlib/array-typed-ctors' ); var zeros = require( '@stdlib/array-base-zeros' ); var bytesPerElement = require( '@stdlib/ndarray-base-bytes-per-element' ); var defaults = require( '@stdlib/array-defaults' ); -var format = require( '@stdlib/string-format' ); +var format = require( '@stdlib/error-tools-fmtprodmsg' ); // VARIABLES // @@ -63,7 +63,7 @@ function empty( length ) { var nb; if ( !isNonNegativeInteger( length ) ) { - throw new TypeError( format( 'invalid argument. First argument must be a nonnegative integer. Value: `%s`.', length ) ); + throw new TypeError( format( '1Zj2d', length ) ); } if ( arguments.length > 1 ) { dtype = arguments[ 1 ]; @@ -75,7 +75,7 @@ function empty( length ) { } nbytes = bytesPerElement( dtype ); if ( nbytes === null ) { - throw new TypeError( format( 'invalid argument. Second argument must be a supported data type. Value: `%s`.', dtype ) ); + throw new TypeError( format( '1ZjEC', dtype ) ); } // Resolve typed array constructor: ctor = ctors( dtype ); diff --git a/package.json b/package.json index b00788d..d76929b 100644 --- a/package.json +++ b/package.json @@ -46,7 +46,7 @@ "@stdlib/assert-is-uint8array": "^0.2.1", "@stdlib/buffer-alloc-unsafe": "^0.2.1", "@stdlib/ndarray-base-bytes-per-element": "^0.2.1", - "@stdlib/string-format": "^0.2.1", + "@stdlib/error-tools-fmtprodmsg": "^0.2.1", "@stdlib/types": "^0.3.2", "@stdlib/error-tools-fmtprodmsg": "^0.2.1" }, From 78bd4460fbd714899daa848e23e14e47cea4f8d9 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Wed, 26 Jun 2024 23:12:25 +0000 Subject: [PATCH 63/75] Remove files --- mod.d.ts | 66 - mod.js | 4 - mod.js.map | 1 - stats.html | 4842 ---------------------------------------------------- 4 files changed, 4913 deletions(-) delete mode 100644 mod.d.ts delete mode 100644 mod.js delete mode 100644 mod.js.map delete mode 100644 stats.html diff --git a/mod.d.ts b/mod.d.ts deleted file mode 100644 index 863116c..0000000 --- a/mod.d.ts +++ /dev/null @@ -1,66 +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 - -/// - -import { DataTypeMap } from '@stdlib/types/array'; - -/** -* Creates an uninitialized array having a specified length. -* -* The function recognizes the following data types: -* -* - `float64`: double-precision floating-point numbers (IEEE 754) -* - `float32`: single-precision floating-point numbers (IEEE 754) -* - `complex128`: double-precision complex floating-point numbers -* - `complex64`: single-precision complex floating-point numbers -* - `int32`: 32-bit two's complement signed integers -* - `uint32`: 32-bit unsigned integers -* - `int16`: 16-bit two's complement signed integers -* - `uint16`: 16-bit unsigned integers -* - `int8`: 8-bit two's complement signed integers -* - `uint8`: 8-bit unsigned integers -* - `uint8c`: 8-bit unsigned integers clamped to `0-255` -* - `generic`: generic JavaScript values -* -* ## Notes -* -* - In browser environments, the function always returns zero-filled arrays. -* - If `dtype` is `'generic'`, the function always returns a zero-filled array. -* - In Node.js versions `>=3.0.0`, the underlying memory of returned typed arrays is **not** initialized. Memory contents are unknown and may contain **sensitive** data. -* -* @param length - array length -* @param dtype - data type (default: 'float64') -* @returns empty array -* -* @example -* var arr = empty( 2 ); -* // returns -* -* @example -* var arr = empty( 2, 'float32' ); -* // returns -*/ -declare function empty = 'float64'>( length: number, dtype?: T ): DataTypeMap[T]; - - -// EXPORTS // - -export = empty; diff --git a/mod.js b/mod.js deleted file mode 100644 index 8ffb56d..0000000 --- a/mod.js +++ /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 -/// -var r="function"==typeof Object.defineProperty?Object.defineProperty:null;var e=Object.defineProperty;function t(r){return"number"==typeof r}function n(r){var e,t="";for(e=0;e0&&(e-=1),n=i.toExponential(e)):n=i.toPrecision(r.precision),r.alternate||(n=h.call(n,v,"$1e"),n=h.call(n,w,"e"),n=h.call(n,g,""));break;default:throw new Error("invalid double notation. Value: "+r.specifier)}return n=h.call(n,c,"e+0$1"),n=h.call(n,p,"e-0$1"),r.alternate&&(n=h.call(n,y,"$1."),n=h.call(n,m,"$1.e")),i>=0&&r.sign&&(n=r.sign+n),n=r.specifier===s.call(r.specifier)?s.call(n):l.call(n)}function d(r){var e,t="";for(e=0;e127)throw new Error("invalid character code. Value: "+n.arg);n.arg=_(a)?String(n.arg):E(a)}break;case"e":case"E":case"f":case"F":case"g":case"G":e||(n.precision=6),n.arg=b(n);break;default:throw new Error("invalid specifier: "+n.specifier)}n.maxWidth>=0&&n.arg.length>n.maxWidth&&(n.arg=n.arg.substring(0,n.maxWidth)),n.padZeros?n.arg=i(n.arg,n.width||n.precision,n.padRight):n.width&&(n.arg=(c=n.arg,p=n.width,y=n.padRight,m=void 0,(m=p-c.length)<0?c:c=y?c+d(m):d(m)+c)),f+=n.arg||"",l+=1}return f}var A=/%(?:([1-9]\d*)\$)?([0 +\-#]*)(\*|\d+)?(?:(\.)(\*|\d+)?)?[hlL]?([%A-Za-z])/g;function j(r){var e={mapping:r[1]?parseInt(r[1],10):void 0,flags:r[2],width:r[3],precision:r[5],specifier:r[6]};return"."===r[4]&&void 0===r[5]&&(e.precision="1"),e}function F(r){var e,t,n,i;for(t=[],i=0,n=A.exec(r);n;)(e=r.slice(i,A.lastIndex-n[0].length)).length&&t.push(e),t.push(j(n)),i=A.lastIndex,n=A.exec(r);return(e=r.slice(i)).length&&t.push(e),t}function S(r){var e,t;if("string"!=typeof r)throw new TypeError(S("invalid argument. First argument must be a string. Value: `%s`.",r));for(e=[F(r)],t=1;trr&&tr(r)}function ir(r){return U(r)&&nr(r)}function or(r){return H(r)&&nr(r.valueOf())}function ar(r){return ir(r)||or(r)}function ur(r){return ir(r)&&r>=0}function fr(r){return or(r)&&r.valueOf()>=0}function lr(r){return ur(r)||fr(r)}N(ar,"isPrimitive",ir),N(ar,"isObject",or),N(lr,"isPrimitive",ur),N(lr,"isObject",fr);var sr="function"==typeof Float64Array;var hr="function"==typeof Float64Array?Float64Array:null;var cr="function"==typeof Float64Array?Float64Array:void 0;var pr=function(){var r,e,t;if("function"!=typeof hr)return!1;try{e=new hr([1,3.14,-3.14,NaN]),t=e,r=(sr&&t instanceof Float64Array||"[object Float64Array]"===z(t))&&1===e[0]&&3.14===e[1]&&-3.14===e[2]&&e[3]!=e[3]}catch(e){r=!1}return r}()?cr:function(){throw new Error("not implemented")},yr="function"==typeof Float32Array;var mr="function"==typeof Float32Array?Float32Array:null;var gr="function"==typeof Float32Array?Float32Array:void 0;var wr=function(){var r,e,t;if("function"!=typeof mr)return!1;try{e=new mr([1,3.14,-3.14,5e40]),t=e,r=(yr&&t instanceof Float32Array||"[object Float32Array]"===z(t))&&1===e[0]&&3.140000104904175===e[1]&&-3.140000104904175===e[2]&&e[3]===Q}catch(e){r=!1}return r}()?gr:function(){throw new Error("not implemented")},vr="function"==typeof Int16Array;var br="function"==typeof Int16Array?Int16Array:null;var dr="function"==typeof Int16Array?Int16Array:void 0;var Er=function(){var r,e,t;if("function"!=typeof br)return!1;try{e=new br([1,3.14,-3.14,32768]),t=e,r=(vr&&t instanceof Int16Array||"[object Int16Array]"===z(t))&&1===e[0]&&3===e[1]&&-3===e[2]&&-32768===e[3]}catch(e){r=!1}return r}()?dr:function(){throw new Error("not implemented")},_r="function"==typeof Int32Array;var Tr="function"==typeof Int32Array?Int32Array:null;var xr="function"==typeof Int32Array?Int32Array:void 0;var Vr=function(){var r,e,t;if("function"!=typeof Tr)return!1;try{e=new Tr([1,3.14,-3.14,2147483648]),t=e,r=(_r&&t instanceof Int32Array||"[object Int32Array]"===z(t))&&1===e[0]&&3===e[1]&&-3===e[2]&&-2147483648===e[3]}catch(e){r=!1}return r}()?xr:function(){throw new Error("not implemented")},Ar="function"==typeof Int8Array;var jr="function"==typeof Int8Array?Int8Array:null;var Fr="function"==typeof Int8Array?Int8Array:void 0;var Sr=function(){var r,e,t;if("function"!=typeof jr)return!1;try{e=new jr([1,3.14,-3.14,128]),t=e,r=(Ar&&t instanceof Int8Array||"[object Int8Array]"===z(t))&&1===e[0]&&3===e[1]&&-3===e[2]&&-128===e[3]}catch(e){r=!1}return r}()?Fr:function(){throw new Error("not implemented")},kr="function"==typeof Uint16Array;var Lr="function"==typeof Uint16Array?Uint16Array:null;var Ir="function"==typeof Uint16Array?Uint16Array:void 0;var Rr=function(){var r,e,t;if("function"!=typeof Lr)return!1;try{e=new Lr(e=[1,3.14,-3.14,65536,65537]),t=e,r=(kr&&t instanceof Uint16Array||"[object Uint16Array]"===z(t))&&1===e[0]&&3===e[1]&&65533===e[2]&&0===e[3]&&1===e[4]}catch(e){r=!1}return r}()?Ir:function(){throw new Error("not implemented")},Br="function"==typeof Uint32Array;var Or="function"==typeof Uint32Array?Uint32Array:null;var Cr="function"==typeof Uint32Array?Uint32Array:void 0;var Mr=function(){var r,e,t;if("function"!=typeof Or)return!1;try{e=new Or(e=[1,3.14,-3.14,4294967296,4294967297]),t=e,r=(Br&&t instanceof Uint32Array||"[object Uint32Array]"===z(t))&&1===e[0]&&3===e[1]&&4294967293===e[2]&&0===e[3]&&1===e[4]}catch(e){r=!1}return r}()?Cr:function(){throw new Error("not implemented")},Nr="function"==typeof Uint8Array;var Ur="function"==typeof Uint8Array?Uint8Array:null;var Pr="function"==typeof Uint8Array?Uint8Array:void 0;var Yr=function(){var r,e,t;if("function"!=typeof Ur)return!1;try{e=new Ur(e=[1,3.14,-3.14,256,257]),t=e,r=(Nr&&t instanceof Uint8Array||"[object Uint8Array]"===z(t))&&1===e[0]&&3===e[1]&&253===e[2]&&0===e[3]&&1===e[4]}catch(e){r=!1}return r}()?Pr:function(){throw new Error("not implemented")},Wr="function"==typeof Uint8ClampedArray;var $r="function"==typeof Uint8ClampedArray?Uint8ClampedArray:null;var Gr="function"==typeof Uint8ClampedArray?Uint8ClampedArray:void 0;var Zr=function(){var r,e,t;if("function"!=typeof $r)return!1;try{e=new $r([-1,0,1,3.14,4.99,255,256]),t=e,r=(Wr&&t instanceof Uint8ClampedArray||"[object Uint8ClampedArray]"===z(t))&&0===e[0]&&0===e[1]&&1===e[2]&&3===e[3]&&5===e[4]&&255===e[5]&&255===e[6]}catch(e){r=!1}return r}()?Gr:function(){throw new Error("not implemented")},Xr=4294967295;function zr(r){return"object"==typeof r&&null!==r&&"number"==typeof r.length&&tr(r.length)&&r.length>=0&&r.length<=Xr}var Jr=9007199254740991;function qr(r){return"object"==typeof r&&null!==r&&"number"==typeof r.length&&tr(r.length)&&r.length>=0&&r.length<=Jr}var Dr="function"==typeof ArrayBuffer;function Hr(r){return Dr&&r instanceof ArrayBuffer||"[object ArrayBuffer]"===z(r)}var Kr=Array.isArray?Array.isArray:function(r){return"[object Array]"===z(r)};function Qr(r){return"object"==typeof r&&null!==r&&!Kr(r)}function re(r){return"string"==typeof r}var ee=String.prototype.valueOf;var te=Y();function ne(r){return"object"==typeof r&&(r instanceof String||(te?function(r){try{return ee.call(r),!0}catch(r){return!1}}(r):"[object String]"===z(r)))}function ie(r){return re(r)||ne(r)}N(ie,"isPrimitive",re),N(ie,"isObject",ne);var oe=/./;function ae(r){return"boolean"==typeof r}var ue=Boolean,fe=Boolean.prototype.toString;var le=Y();function se(r){return"object"==typeof r&&(r instanceof ue||(le?function(r){try{return fe.call(r),!0}catch(r){return!1}}(r):"[object Boolean]"===z(r)))}function he(r){return ae(r)||se(r)}N(he,"isPrimitive",ae),N(he,"isObject",se);var ce="object"==typeof self?self:null,pe="object"==typeof window?window:null,ye="undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},me="object"==typeof ye?ye:null,ge="object"==typeof globalThis?globalThis:null;var we=function(r){if(arguments.length){if(!ae(r))throw new TypeError(S("invalid argument. Must provide a boolean. Value: `%s`.",r));if(r)return new Function("return this;")()}if(ge)return ge;if(ce)return ce;if(pe)return pe;if(me)return me;throw new Error("unexpected error. Unable to resolve global object.")}(),ve=we.document&&we.document.childNodes,be=Int8Array;function de(){return/^\s*function\s*([^(]*)/i}var Ee=/^\s*function\s*([^(]*)/i;function _e(r){return null!==r&&"object"==typeof r}function Te(r){var e,t,n,i;if(("Object"===(t=z(r).slice(8,-1))||"Error"===t)&&r.constructor){if("string"==typeof(n=r.constructor).name)return n.name;if(e=Ee.exec(n.toString()))return e[1]}return _e(i=r)&&(i._isBuffer||i.constructor&&"function"==typeof i.constructor.isBuffer&&i.constructor.isBuffer(i))?"Buffer":t}N(de,"REGEXP",Ee),N(_e,"isObjectLikeArray",function(r){if("function"!=typeof r)throw new TypeError(S("invalid argument. Must provide a function. Value: `%s`.",r));return function(e){var t,n;if(!Kr(e))return!1;if(0===(t=e.length))return!1;for(n=0;n=2)e.push(n[0],n[1]);else{if(!Le(n))return new TypeError(S("invalid argument. An iterator must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",n));e.push(Pe(n),Ye(n))}return e}var qe=2*wr.BYTES_PER_ELEMENT,De=Me();function He(r){return r instanceof rt||"object"==typeof r&&null!==r&&("Complex64Array"===r.constructor.name||"Complex128Array"===r.constructor.name)&&"number"==typeof r._length&&"object"==typeof r._buffer}function Ke(r){return r===rt||"Complex128Array"===r.name}function Qe(r,e){return new ke(r[e*=2],r[e+1])}function rt(){var r,e,t,n;if(e=arguments.length,!(this instanceof rt))return 0===e?new rt:1===e?new rt(arguments[0]):2===e?new rt(arguments[0],arguments[1]):new rt(arguments[0],arguments[1],arguments[2]);if(0===e)t=new wr(0);else if(1===e)if(ur(arguments[0]))t=new wr(2*arguments[0]);else if(qr(arguments[0]))if((n=(t=arguments[0]).length)&&Kr(t)&&Le(t[0])){if(t=function(r,e){var t,n,i,o;for(t=e.length,o=0,i=0;it.byteLength-r)throw new RangeError(S("invalid arguments. ArrayBuffer has insufficient capacity. Either decrease the array length or provide a bigger buffer. Minimum capacity: `%u`.",n*qe));t=new wr(t,r,2*n)}}return N(this,"_buffer",t),N(this,"_length",t.length/2),this}function et(r){return r.re}function tt(r){return r.im}function nt(r){var e,t,n;for(e=[];!(t=r.next()).done;)if(zr(n=t.value)&&n.length>=2)e.push(n[0],n[1]);else{if(!Le(n))return new TypeError(S("invalid argument. An iterator must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",n));e.push(et(n),tt(n))}return e}N(rt,"BYTES_PER_ELEMENT",qe),N(rt,"name","Complex64Array"),N(rt,"from",(function(r){var e,t,n,i,o,a,u,f,l,s,h,c;if(!Ve(this))throw new TypeError("invalid invocation. `this` context must be a constructor.");if(!Ke(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if((t=arguments.length)>1){if(!Ve(n=arguments[1]))throw new TypeError(S("invalid argument. Second argument must be a function. Value: `%s`.",n));t>2&&(e=arguments[2])}if(He(r)){if(f=r.length,n){for(o=(i=new this(f))._buffer,c=0,h=0;h=2))throw new TypeError(S("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",s));o[c]=s[0],o[c+1]=s[1]}c+=2}return i}return new this(r)}if(qr(r)){if(n){for(f=r.length,u=r.get&&r.set?ze("default"):Ze("default"),h=0;h=2))throw new TypeError(S("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",s));o[c]=s[0],o[c+1]=s[1]}c+=2}return i}return new this(r)}if(Qr(r)&&De&&Ve(r[Ne])){if(!Ve((o=r[Ne]()).next))throw new TypeError(S("invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.",r));if(a=n?function(r,e,t){var n,i,o,a;for(n=[],a=-1;!(i=r.next()).done;)if(a+=1,zr(o=e.call(t,i.value,a))&&o.length>=2)n.push(o[0],o[1]);else{if(!Le(o))return new TypeError(S("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",o));n.push(Pe(o),Ye(o))}return n}(o,n,e):Je(o),a instanceof Error)throw a;for(o=(i=new this(f=a.length/2))._buffer,h=0;h=this._length))return Qe(this._buffer,r)})),Ue(rt.prototype,"buffer",(function(){return this._buffer.buffer})),Ue(rt.prototype,"byteLength",(function(){return this._buffer.byteLength})),Ue(rt.prototype,"byteOffset",(function(){return this._buffer.byteOffset})),N(rt.prototype,"BYTES_PER_ELEMENT",rt.BYTES_PER_ELEMENT),N(rt.prototype,"copyWithin",(function(r,e){if(!He(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");return 2===arguments.length?this._buffer.copyWithin(2*r,2*e):this._buffer.copyWithin(2*r,2*e,2*arguments[2]),this})),N(rt.prototype,"entries",(function(){var r,e,t,n,i,o,a;if(!He(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");return e=this,r=this._buffer,n=this._length,o=-1,a=-2,N(t={},"next",(function(){var e;if(o+=1,i||o>=n)return{done:!0};return e=new ke(r[a+=2],r[a+1]),{value:[o,e],done:!1}})),N(t,"return",(function(r){if(i=!0,arguments.length)return{value:r,done:!0};return{done:!0}})),Ne&&N(t,Ne,(function(){return e.entries()})),t})),N(rt.prototype,"every",(function(r,e){var t,n;if(!He(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Ve(r))throw new TypeError(S("invalid argument. First argument must be a function. Value: `%s`.",r));for(t=this._buffer,n=0;n1){if(!tr(e))throw new TypeError(S("invalid argument. Second argument must be an integer. Value: `%s`.",e));if(e<0&&(e+=i)<0&&(e=0),arguments.length>2){if(!tr(t))throw new TypeError(S("invalid argument. Third argument must be an integer. Value: `%s`.",t));t<0&&(t+=i)<0&&(t=0),t>i&&(t=i)}else t=i}else e=0,t=i;for(a=Pe(r),u=Ye(r),f=e;f=0;n--)if(i=Qe(t,n),r.call(e,i,n,this))return i})),N(rt.prototype,"findLastIndex",(function(r,e){var t,n,i;if(!He(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Ve(r))throw new TypeError(S("invalid argument. First argument must be a function. Value: `%s`.",r));for(t=this._buffer,n=this._length-1;n>=0;n--)if(i=Qe(t,n),r.call(e,i,n,this))return n;return-1})),N(rt.prototype,"forEach",(function(r,e){var t,n,i;if(!He(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Ve(r))throw new TypeError(S("invalid argument. First argument must be a function. Value: `%s`.",r));for(t=this._buffer,n=0;n=this._length))return Qe(this._buffer,r)})),N(rt.prototype,"includes",(function(r,e){var t,n,i,o,a;if(!He(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Le(r))throw new TypeError(S("invalid argument. First argument must be a complex number. Value: `%s`.",r));if(arguments.length>1){if(!tr(e))throw new TypeError(S("invalid argument. Second argument must be an integer. Value: `%s`.",e));e<0&&(e+=this._length)<0&&(e=0)}else e=0;for(i=Pe(r),o=Ye(r),t=this._buffer,a=e;a1){if(!tr(e))throw new TypeError(S("invalid argument. Second argument must be an integer. Value: `%s`.",e));e<0&&(e+=this._length)<0&&(e=0)}else e=0;for(i=Pe(r),o=Ye(r),t=this._buffer,a=e;a1){if(!tr(e))throw new TypeError(S("invalid argument. Second argument must be an integer. Value: `%s`.",e));e>=this._length?e=this._length-1:e<0&&(e+=this._length)}else e=this._length-1;for(i=Pe(r),o=Ye(r),t=this._buffer,a=e;a>=0;a--)if(i===t[n=2*a]&&o===t[n+1])return a;return-1})),Ue(rt.prototype,"length",(function(){return this._length})),N(rt.prototype,"map",(function(r,e){var t,n,i,o,a;if(!He(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Ve(r))throw new TypeError(S("invalid argument. First argument must be a function. Value: `%s`.",r));for(n=this._buffer,t=(i=new this.constructor(this._length))._buffer,o=0;o1)n=e,o=0;else{if(0===i)throw new Error("invalid operation. If not provided an initial value, an array must contain at least one element.");n=Qe(t,0),o=1}for(;o1){if(!ur(t=arguments[1]))throw new TypeError(S("invalid argument. Index argument must be a nonnegative integer. Value: `%s`.",t))}else t=0;if(Le(r)){if(t>=this._length)throw new RangeError(S("invalid argument. Index argument is out-of-bounds. Value: `%u`.",t));return n[t*=2]=Pe(r),void(n[t+1]=Ye(r))}if(He(r)){if(t+(a=r._length)>this._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");if(e=r._buffer,l=n.byteOffset+t*qe,e.buffer===n.buffer&&e.byteOffsetl){for(i=new wr(e.length),f=0;fthis._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");if(e=r,l=n.byteOffset+t*qe,e.buffer===n.buffer&&e.byteOffsetl){for(i=new wr(a),f=0;fthis._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");for(t*=2,f=0;fu&&(e=u)}}for(t=ri&&(e=i)}}return r>=i?(i=0,t=n.byteLength):r>=e?(i=0,t=n.byteOffset+r*qe):(i=e-r,t=n.byteOffset+r*qe),new this.constructor(n.buffer,t,i<0?0:i)})),N(rt.prototype,"toReversed",(function(){var r,e,t,n,i,o;if(!He(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");for(t=this._length,e=new this.constructor(t),n=this._buffer,r=e._buffer,i=0;i=i)throw new RangeError(S("invalid argument. Index argument is out-of-bounds. Value: `%s`.",r));if(!Le(e))throw new TypeError(S("invalid argument. Second argument must be a complex number. Value: `%s`.",e));return(t=(n=new this.constructor(this._buffer))._buffer)[2*r]=Pe(e),t[2*r+1]=Ye(e),n}));var it=2*pr.BYTES_PER_ELEMENT,ot=Me();function at(r){return r instanceof lt||"object"==typeof r&&null!==r&&("Complex64Array"===r.constructor.name||"Complex128Array"===r.constructor.name)&&"number"==typeof r._length&&"object"==typeof r._buffer}function ut(r){return r===lt||"Complex64Array"===r.name}function ft(r,e){return new Ae(r[e*=2],r[e+1])}function lt(){var r,e,t,n;if(e=arguments.length,!(this instanceof lt))return 0===e?new lt:1===e?new lt(arguments[0]):2===e?new lt(arguments[0],arguments[1]):new lt(arguments[0],arguments[1],arguments[2]);if(0===e)t=new pr(0);else if(1===e)if(ur(arguments[0]))t=new pr(2*arguments[0]);else if(qr(arguments[0]))if((n=(t=arguments[0]).length)&&Kr(t)&&Le(t[0])){if(t=function(r,e){var t,n,i,o;for(t=e.length,o=0,i=0;it.byteLength-r)throw new RangeError(S("invalid arguments. ArrayBuffer has insufficient capacity. Either decrease the array length or provide a bigger buffer. Minimum capacity: `%u`.",n*it));t=new pr(t,r,2*n)}}return N(this,"_buffer",t),N(this,"_length",t.length/2),this}N(lt,"BYTES_PER_ELEMENT",it),N(lt,"name","Complex128Array"),N(lt,"from",(function(r){var e,t,n,i,o,a,u,f,l,s,h,c;if(!Ve(this))throw new TypeError("invalid invocation. `this` context must be a constructor.");if(!ut(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if((t=arguments.length)>1){if(!Ve(n=arguments[1]))throw new TypeError(S("invalid argument. Second argument must be a function. Value: `%s`.",n));t>2&&(e=arguments[2])}if(at(r)){if(f=r.length,n){for(o=(i=new this(f))._buffer,c=0,h=0;h=2))throw new TypeError(S("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",s));o[c]=s[0],o[c+1]=s[1]}c+=2}return i}return new this(r)}if(qr(r)){if(n){for(f=r.length,u=r.get&&r.set?ze("default"):Ze("default"),h=0;h=2))throw new TypeError(S("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",s));o[c]=s[0],o[c+1]=s[1]}c+=2}return i}return new this(r)}if(Qr(r)&&ot&&Ve(r[Ne])){if(!Ve((o=r[Ne]()).next))throw new TypeError(S("invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.",r));if(a=n?function(r,e,t){var n,i,o,a;for(n=[],a=-1;!(i=r.next()).done;)if(a+=1,zr(o=e.call(t,i.value,a))&&o.length>=2)n.push(o[0],o[1]);else{if(!Le(o))return new TypeError(S("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",o));n.push(et(o),tt(o))}return n}(o,n,e):nt(o),a instanceof Error)throw a;for(o=(i=new this(f=a.length/2))._buffer,h=0;h=this._length))return ft(this._buffer,r)})),Ue(lt.prototype,"buffer",(function(){return this._buffer.buffer})),Ue(lt.prototype,"byteLength",(function(){return this._buffer.byteLength})),Ue(lt.prototype,"byteOffset",(function(){return this._buffer.byteOffset})),N(lt.prototype,"BYTES_PER_ELEMENT",lt.BYTES_PER_ELEMENT),N(lt.prototype,"copyWithin",(function(r,e){if(!at(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");return 2===arguments.length?this._buffer.copyWithin(2*r,2*e):this._buffer.copyWithin(2*r,2*e,2*arguments[2]),this})),N(lt.prototype,"entries",(function(){var r,e,t,n,i,o,a;if(!at(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");return e=this,r=this._buffer,n=this._length,o=-1,a=-2,N(t={},"next",(function(){var e;if(o+=1,i||o>=n)return{done:!0};return e=new Ae(r[a+=2],r[a+1]),{value:[o,e],done:!1}})),N(t,"return",(function(r){if(i=!0,arguments.length)return{value:r,done:!0};return{done:!0}})),Ne&&N(t,Ne,(function(){return e.entries()})),t})),N(lt.prototype,"every",(function(r,e){var t,n;if(!at(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Ve(r))throw new TypeError(S("invalid argument. First argument must be a function. Value: `%s`.",r));for(t=this._buffer,n=0;n1){if(!tr(e))throw new TypeError(S("invalid argument. Second argument must be an integer. Value: `%s`.",e));if(e<0&&(e+=i)<0&&(e=0),arguments.length>2){if(!tr(t))throw new TypeError(S("invalid argument. Third argument must be an integer. Value: `%s`.",t));t<0&&(t+=i)<0&&(t=0),t>i&&(t=i)}else t=i}else e=0,t=i;for(a=et(r),u=tt(r),f=e;f=0;n--)if(i=ft(t,n),r.call(e,i,n,this))return i})),N(lt.prototype,"findLastIndex",(function(r,e){var t,n,i;if(!at(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Ve(r))throw new TypeError(S("invalid argument. First argument must be a function. Value: `%s`.",r));for(t=this._buffer,n=this._length-1;n>=0;n--)if(i=ft(t,n),r.call(e,i,n,this))return n;return-1})),N(lt.prototype,"forEach",(function(r,e){var t,n,i;if(!at(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Ve(r))throw new TypeError(S("invalid argument. First argument must be a function. Value: `%s`.",r));for(t=this._buffer,n=0;n=this._length))return ft(this._buffer,r)})),Ue(lt.prototype,"length",(function(){return this._length})),N(lt.prototype,"includes",(function(r,e){var t,n,i,o,a;if(!at(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Le(r))throw new TypeError(S("invalid argument. First argument must be a complex number. Value: `%s`.",r));if(arguments.length>1){if(!tr(e))throw new TypeError(S("invalid argument. Second argument must be an integer. Value: `%s`.",e));e<0&&(e+=this._length)<0&&(e=0)}else e=0;for(i=et(r),o=tt(r),t=this._buffer,a=e;a1){if(!tr(e))throw new TypeError(S("invalid argument. Second argument must be an integer. Value: `%s`.",e));e<0&&(e+=this._length)<0&&(e=0)}else e=0;for(i=et(r),o=tt(r),t=this._buffer,a=e;a1){if(!tr(e))throw new TypeError(S("invalid argument. Second argument must be an integer. Value: `%s`.",e));e>=this._length?e=this._length-1:e<0&&(e+=this._length)}else e=this._length-1;for(i=et(r),o=tt(r),t=this._buffer,a=e;a>=0;a--)if(i===t[n=2*a]&&o===t[n+1])return a;return-1})),N(lt.prototype,"map",(function(r,e){var t,n,i,o,a;if(!at(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Ve(r))throw new TypeError(S("invalid argument. First argument must be a function. Value: `%s`.",r));for(n=this._buffer,t=(i=new this.constructor(this._length))._buffer,o=0;o1)n=e,o=0;else{if(0===i)throw new Error("invalid operation. If not provided an initial value, an array must contain at least one element.");n=ft(t,0),o=1}for(;o1){if(!ur(t=arguments[1]))throw new TypeError(S("invalid argument. Index argument must be a nonnegative integer. Value: `%s`.",t))}else t=0;if(Le(r)){if(t>=this._length)throw new RangeError(S("invalid argument. Index argument is out-of-bounds. Value: `%u`.",t));return n[t*=2]=et(r),void(n[t+1]=tt(r))}if(at(r)){if(t+(a=r._length)>this._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");if(e=r._buffer,l=n.byteOffset+t*it,e.buffer===n.buffer&&e.byteOffsetl){for(i=new pr(e.length),f=0;fthis._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");if(e=r,l=n.byteOffset+t*it,e.buffer===n.buffer&&e.byteOffsetl){for(i=new pr(a),f=0;fthis._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");for(t*=2,f=0;fu&&(e=u)}}for(t=ri&&(e=i)}}return r>=i?(i=0,t=n.byteLength):r>=e?(i=0,t=n.byteOffset+r*it):(i=e-r,t=n.byteOffset+r*it),new this.constructor(n.buffer,t,i<0?0:i)})),N(lt.prototype,"toReversed",(function(){var r,e,t,n,i,o;if(!at(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");for(t=this._length,e=new this.constructor(t),n=this._buffer,r=e._buffer,i=0;i=i)throw new RangeError(S("invalid argument. Index argument is out-of-bounds. Value: `%s`.",r));if(!Le(e))throw new TypeError(S("invalid argument. Second argument must be a complex number. Value: `%s`.",e));return(t=(n=new this.constructor(this._buffer))._buffer)[2*r]=et(e),t[2*r+1]=tt(e),n}));var st={float64:pr,float32:wr,generic:Array,int16:Er,int32:Vr,int8:Sr,uint16:Rr,uint32:Mr,uint8:Yr,uint8c:Zr,complex64:rt,complex128:lt};function ht(){return{dtypes:{default:"float64",numeric:"float64",real:"float64",floating_point:"float64",real_floating_point:"float64",complex_floating_point:"complex128",integer:"int32",signed_integer:"int32",unsigned_integer:"uint32"}}}var ct={dtypes:{default:"float64",numeric:"float64",real:"float64",floating_point:"float64",real_floating_point:"float64",complex_floating_point:"complex128",integer:"int32",signed_integer:"int32",unsigned_integer:"uint32"}},pt={"dtypes.default":ct.dtypes.default,"dtypes.numeric":ct.dtypes.numeric,"dtypes.real":ct.dtypes.real,"dtypes.floating_point":ct.dtypes.floating_point,"dtypes.real_floating_point":ct.dtypes.real_floating_point,"dtypes.complex_floating_point":ct.dtypes.complex_floating_point,"dtypes.integer":ct.dtypes.integer,"dtypes.signed_integer":ct.dtypes.signed_integer,"dtypes.unsigned_integer":ct.dtypes.unsigned_integer};N(ht,"get",(function(r){var e=pt[r];return void 0===e?null:e}));var yt=ht.get("dtypes.default");function mt(r){var e,t;if(!ur(r))throw new TypeError(S("invalid argument. First argument must be a nonnegative integer. Value: `%s`.",r));if("generic"===(e=arguments.length>1?arguments[1]:yt))return function(r,e){var t,n;for(t=[],n=0;n1?mt(r,arguments[1]):mt(r)}export{gt as default}; -//# sourceMappingURL=mod.js.map diff --git a/mod.js.map b/mod.js.map deleted file mode 100644 index 7b2fd54..0000000 --- a/mod.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"mod.js","sources":["../node_modules/@stdlib/utils-define-property/lib/define_property.js","../node_modules/@stdlib/utils-define-property/lib/builtin.js","../node_modules/@stdlib/string-base-format-interpolate/lib/is_number.js","../node_modules/@stdlib/string-base-format-interpolate/lib/zero_pad.js","../node_modules/@stdlib/string-base-format-interpolate/lib/format_integer.js","../node_modules/@stdlib/string-base-format-interpolate/lib/format_double.js","../node_modules/@stdlib/string-base-format-interpolate/lib/space_pad.js","../node_modules/@stdlib/string-base-format-interpolate/lib/main.js","../node_modules/@stdlib/string-base-format-interpolate/lib/is_string.js","../node_modules/@stdlib/string-base-format-tokenize/lib/main.js","../node_modules/@stdlib/string-format/lib/main.js","../node_modules/@stdlib/string-format/lib/is_string.js","../node_modules/@stdlib/utils-define-property/lib/polyfill.js","../node_modules/@stdlib/utils-define-property/lib/index.js","../node_modules/@stdlib/utils-define-property/lib/has_define_property_support.js","../node_modules/@stdlib/utils-define-nonenumerable-read-only-property/lib/main.js","../node_modules/@stdlib/assert-is-number/lib/primitive.js","../node_modules/@stdlib/assert-has-tostringtag-support/lib/main.js","../node_modules/@stdlib/assert-has-symbol-support/lib/main.js","../node_modules/@stdlib/utils-native-class/lib/tostring.js","../node_modules/@stdlib/assert-has-own-property/lib/main.js","../node_modules/@stdlib/symbol-ctor/lib/main.js","../node_modules/@stdlib/utils-native-class/lib/tostringtag.js","../node_modules/@stdlib/utils-native-class/lib/index.js","../node_modules/@stdlib/utils-native-class/lib/polyfill.js","../node_modules/@stdlib/utils-native-class/lib/main.js","../node_modules/@stdlib/number-ctor/lib/main.js","../node_modules/@stdlib/assert-is-number/lib/tostring.js","../node_modules/@stdlib/assert-is-number/lib/object.js","../node_modules/@stdlib/assert-is-number/lib/try2serialize.js","../node_modules/@stdlib/assert-is-number/lib/main.js","../node_modules/@stdlib/assert-is-number/lib/index.js","../node_modules/@stdlib/constants-float64-pinf/lib/index.js","../node_modules/@stdlib/constants-float64-ninf/lib/index.js","../node_modules/@stdlib/math-base-special-floor/lib/main.js","../node_modules/@stdlib/math-base-assert-is-integer/lib/main.js","../node_modules/@stdlib/assert-is-integer/lib/integer.js","../node_modules/@stdlib/assert-is-integer/lib/primitive.js","../node_modules/@stdlib/assert-is-integer/lib/object.js","../node_modules/@stdlib/assert-is-integer/lib/main.js","../node_modules/@stdlib/assert-is-nonnegative-integer/lib/primitive.js","../node_modules/@stdlib/assert-is-nonnegative-integer/lib/object.js","../node_modules/@stdlib/assert-is-nonnegative-integer/lib/main.js","../node_modules/@stdlib/assert-is-integer/lib/index.js","../node_modules/@stdlib/assert-is-nonnegative-integer/lib/index.js","../node_modules/@stdlib/assert-is-float64array/lib/main.js","../node_modules/@stdlib/assert-has-float64array-support/lib/float64array.js","../node_modules/@stdlib/array-float64/lib/main.js","../node_modules/@stdlib/array-float64/lib/index.js","../node_modules/@stdlib/assert-has-float64array-support/lib/main.js","../node_modules/@stdlib/array-float64/lib/polyfill.js","../node_modules/@stdlib/assert-is-float32array/lib/main.js","../node_modules/@stdlib/assert-has-float32array-support/lib/float32array.js","../node_modules/@stdlib/array-float32/lib/main.js","../node_modules/@stdlib/array-float32/lib/index.js","../node_modules/@stdlib/assert-has-float32array-support/lib/main.js","../node_modules/@stdlib/array-float32/lib/polyfill.js","../node_modules/@stdlib/assert-is-int16array/lib/main.js","../node_modules/@stdlib/constants-int16-max/lib/index.js","../node_modules/@stdlib/assert-has-int16array-support/lib/int16array.js","../node_modules/@stdlib/array-int16/lib/main.js","../node_modules/@stdlib/array-int16/lib/index.js","../node_modules/@stdlib/assert-has-int16array-support/lib/main.js","../node_modules/@stdlib/constants-int16-min/lib/index.js","../node_modules/@stdlib/array-int16/lib/polyfill.js","../node_modules/@stdlib/assert-is-int32array/lib/main.js","../node_modules/@stdlib/constants-int32-max/lib/index.js","../node_modules/@stdlib/assert-has-int32array-support/lib/int32array.js","../node_modules/@stdlib/array-int32/lib/main.js","../node_modules/@stdlib/array-int32/lib/index.js","../node_modules/@stdlib/assert-has-int32array-support/lib/main.js","../node_modules/@stdlib/constants-int32-min/lib/index.js","../node_modules/@stdlib/array-int32/lib/polyfill.js","../node_modules/@stdlib/assert-is-int8array/lib/main.js","../node_modules/@stdlib/constants-int8-max/lib/index.js","../node_modules/@stdlib/assert-has-int8array-support/lib/int8array.js","../node_modules/@stdlib/array-int8/lib/main.js","../node_modules/@stdlib/array-int8/lib/index.js","../node_modules/@stdlib/assert-has-int8array-support/lib/main.js","../node_modules/@stdlib/constants-int8-min/lib/index.js","../node_modules/@stdlib/array-int8/lib/polyfill.js","../node_modules/@stdlib/assert-is-uint16array/lib/main.js","../node_modules/@stdlib/constants-uint16-max/lib/index.js","../node_modules/@stdlib/assert-has-uint16array-support/lib/uint16array.js","../node_modules/@stdlib/array-uint16/lib/main.js","../node_modules/@stdlib/array-uint16/lib/index.js","../node_modules/@stdlib/assert-has-uint16array-support/lib/main.js","../node_modules/@stdlib/array-uint16/lib/polyfill.js","../node_modules/@stdlib/assert-is-uint32array/lib/main.js","../node_modules/@stdlib/constants-uint32-max/lib/index.js","../node_modules/@stdlib/assert-has-uint32array-support/lib/uint32array.js","../node_modules/@stdlib/array-uint32/lib/main.js","../node_modules/@stdlib/array-uint32/lib/index.js","../node_modules/@stdlib/assert-has-uint32array-support/lib/main.js","../node_modules/@stdlib/array-uint32/lib/polyfill.js","../node_modules/@stdlib/assert-is-uint8array/lib/main.js","../node_modules/@stdlib/constants-uint8-max/lib/index.js","../node_modules/@stdlib/assert-has-uint8array-support/lib/uint8array.js","../node_modules/@stdlib/array-uint8/lib/main.js","../node_modules/@stdlib/array-uint8/lib/index.js","../node_modules/@stdlib/assert-has-uint8array-support/lib/main.js","../node_modules/@stdlib/array-uint8/lib/polyfill.js","../node_modules/@stdlib/assert-is-uint8clampedarray/lib/main.js","../node_modules/@stdlib/assert-has-uint8clampedarray-support/lib/uint8clampedarray.js","../node_modules/@stdlib/array-uint8c/lib/main.js","../node_modules/@stdlib/array-uint8c/lib/index.js","../node_modules/@stdlib/assert-has-uint8clampedarray-support/lib/main.js","../node_modules/@stdlib/array-uint8c/lib/polyfill.js","../node_modules/@stdlib/constants-array-max-array-length/lib/index.js","../node_modules/@stdlib/assert-is-array-like-object/lib/main.js","../node_modules/@stdlib/constants-array-max-typed-array-length/lib/index.js","../node_modules/@stdlib/assert-is-collection/lib/main.js","../node_modules/@stdlib/assert-is-arraybuffer/lib/main.js","../node_modules/@stdlib/assert-is-array/lib/main.js","../node_modules/@stdlib/assert-is-object/lib/main.js","../node_modules/@stdlib/assert-is-string/lib/primitive.js","../node_modules/@stdlib/assert-is-string/lib/valueof.js","../node_modules/@stdlib/assert-is-string/lib/object.js","../node_modules/@stdlib/assert-is-string/lib/try2valueof.js","../node_modules/@stdlib/assert-is-string/lib/main.js","../node_modules/@stdlib/assert-is-string/lib/index.js","../node_modules/@stdlib/utils-type-of/lib/fixtures/re.js","../node_modules/@stdlib/assert-is-boolean/lib/primitive.js","../node_modules/@stdlib/boolean-ctor/lib/main.js","../node_modules/@stdlib/assert-is-boolean/lib/tostring.js","../node_modules/@stdlib/assert-is-boolean/lib/object.js","../node_modules/@stdlib/assert-is-boolean/lib/try2serialize.js","../node_modules/@stdlib/assert-is-boolean/lib/main.js","../node_modules/@stdlib/assert-is-boolean/lib/index.js","../node_modules/@stdlib/utils-global/lib/self.js","../node_modules/@stdlib/utils-global/lib/window.js","../node_modules/@stdlib/utils-global/lib/global.js","../node_modules/@stdlib/utils-global/lib/global_this.js","../node_modules/@stdlib/utils-type-of/lib/fixtures/nodelist.js","../node_modules/@stdlib/utils-global/lib/main.js","../node_modules/@stdlib/utils-global/lib/codegen.js","../node_modules/@stdlib/utils-type-of/lib/fixtures/typedarray.js","../node_modules/@stdlib/regexp-function-name/lib/main.js","../node_modules/@stdlib/regexp-function-name/lib/regexp.js","../node_modules/@stdlib/assert-is-object-like/lib/main.js","../node_modules/@stdlib/utils-constructor-name/lib/main.js","../node_modules/@stdlib/assert-is-buffer/lib/main.js","../node_modules/@stdlib/regexp-function-name/lib/index.js","../node_modules/@stdlib/assert-is-object-like/lib/index.js","../node_modules/@stdlib/assert-tools-array-function/lib/main.js","../node_modules/@stdlib/utils-type-of/lib/index.js","../node_modules/@stdlib/utils-type-of/lib/check.js","../node_modules/@stdlib/utils-type-of/lib/polyfill.js","../node_modules/@stdlib/utils-type-of/lib/main.js","../node_modules/@stdlib/assert-is-function/lib/main.js","../node_modules/@stdlib/complex-float64/lib/main.js","../node_modules/@stdlib/complex-float64/lib/tostring.js","../node_modules/@stdlib/complex-float64/lib/tojson.js","../node_modules/@stdlib/number-float64-base-to-float32/lib/main.js","../node_modules/@stdlib/number-float64-base-to-float32/lib/polyfill.js","../node_modules/@stdlib/number-float64-base-to-float32/lib/index.js","../node_modules/@stdlib/complex-float32/lib/main.js","../node_modules/@stdlib/assert-is-complex-like/lib/main.js","../node_modules/@stdlib/math-base-assert-is-even/lib/main.js","../node_modules/@stdlib/complex-float32/lib/tostring.js","../node_modules/@stdlib/complex-float32/lib/tojson.js","../node_modules/@stdlib/array-base-assert-is-complex64array/lib/main.js","../node_modules/@stdlib/array-base-assert-is-complex128array/lib/main.js","../node_modules/@stdlib/assert-has-iterator-symbol-support/lib/main.js","../node_modules/@stdlib/symbol-iterator/lib/main.js","../node_modules/@stdlib/utils-define-nonenumerable-read-only-accessor/lib/main.js","../node_modules/@stdlib/complex-realf/lib/main.js","../node_modules/@stdlib/complex-imagf/lib/main.js","../node_modules/@stdlib/strided-base-reinterpret-complex64/lib/main.js","../node_modules/@stdlib/strided-base-reinterpret-complex128/lib/main.js","../node_modules/@stdlib/array-base-getter/lib/main.js","../node_modules/@stdlib/array-base-accessor-getter/lib/main.js","../node_modules/@stdlib/array-complex64/lib/from_iterator.js","../node_modules/@stdlib/array-complex64/lib/main.js","../node_modules/@stdlib/array-complex64/lib/from_array.js","../node_modules/@stdlib/complex-real/lib/main.js","../node_modules/@stdlib/complex-imag/lib/main.js","../node_modules/@stdlib/array-complex128/lib/from_iterator.js","../node_modules/@stdlib/array-complex64/lib/from_iterator_map.js","../node_modules/@stdlib/array-complex128/lib/main.js","../node_modules/@stdlib/array-complex128/lib/from_array.js","../node_modules/@stdlib/array-complex128/lib/from_iterator_map.js","../node_modules/@stdlib/array-ctors/lib/ctors.js","../node_modules/@stdlib/array-defaults/lib/main.js","../node_modules/@stdlib/array-defaults/lib/get.js","../node_modules/@stdlib/array-defaults/lib/index.js","../node_modules/@stdlib/array-zeros/lib/main.js","../node_modules/@stdlib/array-base-filled/lib/main.js","../node_modules/@stdlib/array-base-zeros/lib/main.js","../node_modules/@stdlib/array-ctors/lib/main.js","../lib/polyfill.js"],"sourcesContent":["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Object.defineProperty === 'function' ) ? Object.defineProperty : null;\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Defines (or modifies) an object property.\n*\n* ## Notes\n*\n* - Property descriptors come in two flavors: **data descriptors** and **accessor descriptors**. A data descriptor is a property that has a value, which may or may not be writable. An accessor descriptor is a property described by a getter-setter function pair. A descriptor must be one of these two flavors and cannot be both.\n*\n* @name defineProperty\n* @type {Function}\n* @param {Object} obj - object on which to define the property\n* @param {(string|symbol)} prop - property name\n* @param {Object} descriptor - property descriptor\n* @param {boolean} [descriptor.configurable=false] - boolean indicating if property descriptor can be changed and if the property can be deleted from the provided object\n* @param {boolean} [descriptor.enumerable=false] - boolean indicating if the property shows up when enumerating object properties\n* @param {boolean} [descriptor.writable=false] - boolean indicating if the value associated with the property can be changed with an assignment operator\n* @param {*} [descriptor.value] - property value\n* @param {(Function|void)} [descriptor.get=undefined] - function which serves as a getter for the property, or, if no getter, undefined. When the property is accessed, a getter function is called without arguments and with the `this` context set to the object through which the property is accessed (which may not be the object on which the property is defined due to inheritance). The return value will be used as the property value.\n* @param {(Function|void)} [descriptor.set=undefined] - function which serves as a setter for the property, or, if no setter, undefined. When assigning a property value, a setter function is called with one argument (the value being assigned to the property) and with the `this` context set to the object through which the property is assigned.\n* @throws {TypeError} first argument must be an object\n* @throws {TypeError} third argument must be an object\n* @throws {Error} property descriptor cannot have both a value and a setter and/or getter\n* @returns {Object} object with added property\n*\n* @example\n* var obj = {};\n*\n* defineProperty( obj, 'foo', {\n* 'value': 'bar'\n* });\n*\n* var str = obj.foo;\n* // returns 'bar'\n*/\nvar defineProperty = Object.defineProperty;\n\n\n// EXPORTS //\n\nexport default defineProperty;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Tests if a value is a number primitive.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number primitive\n*\n* @example\n* var bool = isNumber( 3.14 );\n* // returns true\n*\n* @example\n* var bool = isNumber( NaN );\n* // returns true\n*\n* @example\n* var bool = isNumber( new Number( 3.14 ) );\n* // returns false\n*/\nfunction isNumber( value ) {\n\treturn ( typeof value === 'number' ); // NOTE: we inline the `isNumber.isPrimitive` function from `@stdlib/assert/is-number` in order to avoid circular dependencies.\n}\n\n\n// EXPORTS //\n\nexport default isNumber;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// FUNCTIONS //\n\n/**\n* Tests if a string starts with a minus sign (`-`).\n*\n* @private\n* @param {string} str - input string\n* @returns {boolean} boolean indicating if a string starts with a minus sign (`-`)\n*/\nfunction startsWithMinus( str ) {\n\treturn str[ 0 ] === '-';\n}\n\n/**\n* Returns a string of `n` zeros.\n*\n* @private\n* @param {number} n - number of zeros\n* @returns {string} string of zeros\n*/\nfunction zeros( n ) {\n\tvar out = '';\n\tvar i;\n\tfor ( i = 0; i < n; i++ ) {\n\t\tout += '0';\n\t}\n\treturn out;\n}\n\n\n// MAIN //\n\n/**\n* Pads a token with zeros to the specified width.\n*\n* @private\n* @param {string} str - token argument\n* @param {number} width - token width\n* @param {boolean} [right=false] - boolean indicating whether to pad to the right\n* @returns {string} padded token argument\n*/\nfunction zeroPad( str, width, right ) {\n\tvar negative = false;\n\tvar pad = width - str.length;\n\tif ( pad < 0 ) {\n\t\treturn str;\n\t}\n\tif ( startsWithMinus( str ) ) {\n\t\tnegative = true;\n\t\tstr = str.substr( 1 );\n\t}\n\tstr = ( right ) ?\n\t\tstr + zeros( pad ) :\n\t\tzeros( pad ) + str;\n\tif ( negative ) {\n\t\tstr = '-' + str;\n\t}\n\treturn str;\n}\n\n\n// EXPORTS //\n\nexport default zeroPad;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isNumber from './is_number.js';\nimport zeroPad from './zero_pad.js';\n\n// NOTE: for the following, we explicitly avoid using stdlib packages in this particular package in order to avoid circular dependencies.\nvar lowercase = String.prototype.toLowerCase;\nvar uppercase = String.prototype.toUpperCase;\n\n\n// MAIN //\n\n/**\n* Formats a token object argument as an integer.\n*\n* @private\n* @param {Object} token - token object\n* @throws {Error} must provide a valid integer\n* @returns {string} formatted token argument\n*/\nfunction formatInteger( token ) {\n\tvar base;\n\tvar out;\n\tvar i;\n\n\tswitch ( token.specifier ) {\n\tcase 'b':\n\t\t// Case: %b (binary)\n\t\tbase = 2;\n\t\tbreak;\n\tcase 'o':\n\t\t// Case: %o (octal)\n\t\tbase = 8;\n\t\tbreak;\n\tcase 'x':\n\tcase 'X':\n\t\t// Case: %x, %X (hexadecimal)\n\t\tbase = 16;\n\t\tbreak;\n\tcase 'd':\n\tcase 'i':\n\tcase 'u':\n\tdefault:\n\t\t// Case: %d, %i, %u (decimal)\n\t\tbase = 10;\n\t\tbreak;\n\t}\n\tout = token.arg;\n\ti = parseInt( out, 10 );\n\tif ( !isFinite( i ) ) { // NOTE: We use the global `isFinite` function here instead of `@stdlib/math/base/assert/is-finite` in order to avoid circular dependencies.\n\t\tif ( !isNumber( out ) ) {\n\t\t\tthrow new Error( 'invalid integer. Value: ' + out );\n\t\t}\n\t\ti = 0;\n\t}\n\tif ( i < 0 && ( token.specifier === 'u' || base !== 10 ) ) {\n\t\ti = 0xffffffff + i + 1;\n\t}\n\tif ( i < 0 ) {\n\t\tout = ( -i ).toString( base );\n\t\tif ( token.precision ) {\n\t\t\tout = zeroPad( out, token.precision, token.padRight );\n\t\t}\n\t\tout = '-' + out;\n\t} else {\n\t\tout = i.toString( base );\n\t\tif ( !i && !token.precision ) {\n\t\t\tout = '';\n\t\t} else if ( token.precision ) {\n\t\t\tout = zeroPad( out, token.precision, token.padRight );\n\t\t}\n\t\tif ( token.sign ) {\n\t\t\tout = token.sign + out;\n\t\t}\n\t}\n\tif ( base === 16 ) {\n\t\tif ( token.alternate ) {\n\t\t\tout = '0x' + out;\n\t\t}\n\t\tout = ( token.specifier === uppercase.call( token.specifier ) ) ?\n\t\t\tuppercase.call( out ) :\n\t\t\tlowercase.call( out );\n\t}\n\tif ( base === 8 ) {\n\t\tif ( token.alternate && out.charAt( 0 ) !== '0' ) {\n\t\t\tout = '0' + out;\n\t\t}\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default formatInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isNumber from './is_number.js';\n\n// NOTE: for the following, we explicitly avoid using stdlib packages in this particular package in order to avoid circular dependencies.\nvar abs = Math.abs; // eslint-disable-line stdlib/no-builtin-math\nvar lowercase = String.prototype.toLowerCase;\nvar uppercase = String.prototype.toUpperCase;\nvar replace = String.prototype.replace;\n\n\n// VARIABLES //\n\nvar RE_EXP_POS_DIGITS = /e\\+(\\d)$/;\nvar RE_EXP_NEG_DIGITS = /e-(\\d)$/;\nvar RE_ONLY_DIGITS = /^(\\d+)$/;\nvar RE_DIGITS_BEFORE_EXP = /^(\\d+)e/;\nvar RE_TRAILING_PERIOD_ZERO = /\\.0$/;\nvar RE_PERIOD_ZERO_EXP = /\\.0*e/;\nvar RE_ZERO_BEFORE_EXP = /(\\..*[^0])0*e/;\n\n\n// MAIN //\n\n/**\n* Formats a token object argument as a floating-point number.\n*\n* @private\n* @param {Object} token - token object\n* @throws {Error} must provide a valid floating-point number\n* @returns {string} formatted token argument\n*/\nfunction formatDouble( token ) {\n\tvar digits;\n\tvar out;\n\tvar f = parseFloat( token.arg );\n\tif ( !isFinite( f ) ) { // NOTE: We use the global `isFinite` function here instead of `@stdlib/math/base/assert/is-finite` in order to avoid circular dependencies.\n\t\tif ( !isNumber( token.arg ) ) {\n\t\t\tthrow new Error( 'invalid floating-point number. Value: ' + out );\n\t\t}\n\t\t// Case: NaN, Infinity, or -Infinity\n\t\tf = token.arg;\n\t}\n\tswitch ( token.specifier ) {\n\tcase 'e':\n\tcase 'E':\n\t\tout = f.toExponential( token.precision );\n\t\tbreak;\n\tcase 'f':\n\tcase 'F':\n\t\tout = f.toFixed( token.precision );\n\t\tbreak;\n\tcase 'g':\n\tcase 'G':\n\t\tif ( abs( f ) < 0.0001 ) {\n\t\t\tdigits = token.precision;\n\t\t\tif ( digits > 0 ) {\n\t\t\t\tdigits -= 1;\n\t\t\t}\n\t\t\tout = f.toExponential( digits );\n\t\t} else {\n\t\t\tout = f.toPrecision( token.precision );\n\t\t}\n\t\tif ( !token.alternate ) {\n\t\t\tout = replace.call( out, RE_ZERO_BEFORE_EXP, '$1e' );\n\t\t\tout = replace.call( out, RE_PERIOD_ZERO_EXP, 'e');\n\t\t\tout = replace.call( out, RE_TRAILING_PERIOD_ZERO, '' );\n\t\t}\n\t\tbreak;\n\tdefault:\n\t\tthrow new Error( 'invalid double notation. Value: ' + token.specifier );\n\t}\n\tout = replace.call( out, RE_EXP_POS_DIGITS, 'e+0$1' );\n\tout = replace.call( out, RE_EXP_NEG_DIGITS, 'e-0$1' );\n\tif ( token.alternate ) {\n\t\tout = replace.call( out, RE_ONLY_DIGITS, '$1.' );\n\t\tout = replace.call( out, RE_DIGITS_BEFORE_EXP, '$1.e' );\n\t}\n\tif ( f >= 0 && token.sign ) {\n\t\tout = token.sign + out;\n\t}\n\tout = ( token.specifier === uppercase.call( token.specifier ) ) ?\n\t\tuppercase.call( out ) :\n\t\tlowercase.call( out );\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default formatDouble;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// FUNCTIONS //\n\n/**\n* Returns `n` spaces.\n*\n* @private\n* @param {number} n - number of spaces\n* @returns {string} string of spaces\n*/\nfunction spaces( n ) {\n\tvar out = '';\n\tvar i;\n\tfor ( i = 0; i < n; i++ ) {\n\t\tout += ' ';\n\t}\n\treturn out;\n}\n\n\n// MAIN //\n\n/**\n* Pads a token with spaces to the specified width.\n*\n* @private\n* @param {string} str - token argument\n* @param {number} width - token width\n* @param {boolean} [right=false] - boolean indicating whether to pad to the right\n* @returns {string} padded token argument\n*/\nfunction spacePad( str, width, right ) {\n\tvar pad = width - str.length;\n\tif ( pad < 0 ) {\n\t\treturn str;\n\t}\n\tstr = ( right ) ?\n\t\tstr + spaces( pad ) :\n\t\tspaces( pad ) + str;\n\treturn str;\n}\n\n\n// EXPORTS //\n\nexport default spacePad;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport formatInteger from './format_integer.js';\nimport isString from './is_string.js';\nimport formatDouble from './format_double.js';\nimport spacePad from './space_pad.js';\nimport zeroPad from './zero_pad.js';\n\n\n// VARIABLES //\n\nvar fromCharCode = String.fromCharCode;\nvar isnan = isNaN; // NOTE: We use the global `isNaN` function here instead of `@stdlib/math/base/assert/is-nan` to avoid circular dependencies.\nvar isArray = Array.isArray; // NOTE: We use the global `Array.isArray` function here instead of `@stdlib/assert/is-array` to avoid circular dependencies.\n\n\n// FUNCTIONS //\n\n/**\n* Initializes token object with properties of supplied format identifier object or default values if not present.\n*\n* @private\n* @param {Object} token - format identifier object\n* @returns {Object} token object\n*/\nfunction initialize( token ) {\n\tvar out = {};\n\tout.specifier = token.specifier;\n\tout.precision = ( token.precision === void 0 ) ? 1 : token.precision;\n\tout.width = token.width;\n\tout.flags = token.flags || '';\n\tout.mapping = token.mapping;\n\treturn out;\n}\n\n\n// MAIN //\n\n/**\n* Generates string from a token array by interpolating values.\n*\n* @param {Array} tokens - string parts and format identifier objects\n* @param {Array} ...args - variable values\n* @throws {TypeError} first argument must be an array\n* @throws {Error} invalid flags\n* @returns {string} formatted string\n*\n* @example\n* var tokens = [ 'beep ', { 'specifier': 's' } ];\n* var out = formatInterpolate( tokens, 'boop' );\n* // returns 'beep boop'\n*/\nfunction formatInterpolate( tokens ) {\n\tvar hasPeriod;\n\tvar flags;\n\tvar token;\n\tvar flag;\n\tvar num;\n\tvar out;\n\tvar pos;\n\tvar i;\n\tvar j;\n\n\tif ( !isArray( tokens ) ) {\n\t\tthrow new TypeError( 'invalid argument. First argument must be an array. Value: `' + tokens + '`.' );\n\t}\n\tout = '';\n\tpos = 1;\n\tfor ( i = 0; i < tokens.length; i++ ) {\n\t\ttoken = tokens[ i ];\n\t\tif ( isString( token ) ) {\n\t\t\tout += token;\n\t\t} else {\n\t\t\thasPeriod = token.precision !== void 0;\n\t\t\ttoken = initialize( token );\n\t\t\tif ( !token.specifier ) {\n\t\t\t\tthrow new TypeError( 'invalid argument. Token is missing `specifier` property. Index: `'+ i +'`. Value: `' + token + '`.' );\n\t\t\t}\n\t\t\tif ( token.mapping ) {\n\t\t\t\tpos = token.mapping;\n\t\t\t}\n\t\t\tflags = token.flags;\n\t\t\tfor ( j = 0; j < flags.length; j++ ) {\n\t\t\t\tflag = flags.charAt( j );\n\t\t\t\tswitch ( flag ) {\n\t\t\t\tcase ' ':\n\t\t\t\t\ttoken.sign = ' ';\n\t\t\t\t\tbreak;\n\t\t\t\tcase '+':\n\t\t\t\t\ttoken.sign = '+';\n\t\t\t\t\tbreak;\n\t\t\t\tcase '-':\n\t\t\t\t\ttoken.padRight = true;\n\t\t\t\t\ttoken.padZeros = false;\n\t\t\t\t\tbreak;\n\t\t\t\tcase '0':\n\t\t\t\t\ttoken.padZeros = flags.indexOf( '-' ) < 0; // NOTE: We use built-in `Array.prototype.indexOf` here instead of `@stdlib/assert/contains` in order to avoid circular dependencies.\n\t\t\t\t\tbreak;\n\t\t\t\tcase '#':\n\t\t\t\t\ttoken.alternate = true;\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tthrow new Error( 'invalid flag: ' + flag );\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( token.width === '*' ) {\n\t\t\t\ttoken.width = parseInt( arguments[ pos ], 10 );\n\t\t\t\tpos += 1;\n\t\t\t\tif ( isnan( token.width ) ) {\n\t\t\t\t\tthrow new TypeError( 'the argument for * width at position ' + pos + ' is not a number. Value: `' + token.width + '`.' );\n\t\t\t\t}\n\t\t\t\tif ( token.width < 0 ) {\n\t\t\t\t\ttoken.padRight = true;\n\t\t\t\t\ttoken.width = -token.width;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( hasPeriod ) {\n\t\t\t\tif ( token.precision === '*' ) {\n\t\t\t\t\ttoken.precision = parseInt( arguments[ pos ], 10 );\n\t\t\t\t\tpos += 1;\n\t\t\t\t\tif ( isnan( token.precision ) ) {\n\t\t\t\t\t\tthrow new TypeError( 'the argument for * precision at position ' + pos + ' is not a number. Value: `' + token.precision + '`.' );\n\t\t\t\t\t}\n\t\t\t\t\tif ( token.precision < 0 ) {\n\t\t\t\t\t\ttoken.precision = 1;\n\t\t\t\t\t\thasPeriod = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\ttoken.arg = arguments[ pos ];\n\t\t\tswitch ( token.specifier ) {\n\t\t\tcase 'b':\n\t\t\tcase 'o':\n\t\t\tcase 'x':\n\t\t\tcase 'X':\n\t\t\tcase 'd':\n\t\t\tcase 'i':\n\t\t\tcase 'u':\n\t\t\t\t// Case: %b (binary), %o (octal), %x, %X (hexadecimal), %d, %i (decimal), %u (unsigned decimal)\n\t\t\t\tif ( hasPeriod ) {\n\t\t\t\t\ttoken.padZeros = false;\n\t\t\t\t}\n\t\t\t\ttoken.arg = formatInteger( token );\n\t\t\t\tbreak;\n\t\t\tcase 's':\n\t\t\t\t// Case: %s (string)\n\t\t\t\ttoken.maxWidth = ( hasPeriod ) ? token.precision : -1;\n\t\t\t\tbreak;\n\t\t\tcase 'c':\n\t\t\t\t// Case: %c (character)\n\t\t\t\tif ( !isnan( token.arg ) ) {\n\t\t\t\t\tnum = parseInt( token.arg, 10 );\n\t\t\t\t\tif ( num < 0 || num > 127 ) {\n\t\t\t\t\t\tthrow new Error( 'invalid character code. Value: ' + token.arg );\n\t\t\t\t\t}\n\t\t\t\t\ttoken.arg = ( isnan( num ) ) ?\n\t\t\t\t\t\tString( token.arg ) :\n\t\t\t\t\t\tfromCharCode( num );\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'e':\n\t\t\tcase 'E':\n\t\t\tcase 'f':\n\t\t\tcase 'F':\n\t\t\tcase 'g':\n\t\t\tcase 'G':\n\t\t\t\t// Case: %e, %E (scientific notation), %f, %F (decimal floating point), %g, %G (uses the shorter of %e/E or %f/F)\n\t\t\t\tif ( !hasPeriod ) {\n\t\t\t\t\ttoken.precision = 6;\n\t\t\t\t}\n\t\t\t\ttoken.arg = formatDouble( token );\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tthrow new Error( 'invalid specifier: ' + token.specifier );\n\t\t\t}\n\t\t\t// Fit argument into field width...\n\t\t\tif ( token.maxWidth >= 0 && token.arg.length > token.maxWidth ) {\n\t\t\t\ttoken.arg = token.arg.substring( 0, token.maxWidth );\n\t\t\t}\n\t\t\tif ( token.padZeros ) {\n\t\t\t\ttoken.arg = zeroPad( token.arg, token.width || token.precision, token.padRight ); // eslint-disable-line max-len\n\t\t\t} else if ( token.width ) {\n\t\t\t\ttoken.arg = spacePad( token.arg, token.width, token.padRight );\n\t\t\t}\n\t\t\tout += token.arg || '';\n\t\t\tpos += 1;\n\t\t}\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default formatInterpolate;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Tests if a value is a string primitive.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a string primitive\n*\n* @example\n* var bool = isString( 'beep' );\n* // returns true\n*\n* @example\n* var bool = isString( new String( 'beep' ) );\n* // returns false\n*/\nfunction isString( value ) {\n\treturn ( typeof value === 'string' ); // NOTE: we inline the `isString.isPrimitive` function from `@stdlib/assert/is-string` in order to avoid circular dependencies.\n}\n\n\n// EXPORTS //\n\nexport default isString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// VARIABLES //\n\nvar RE = /%(?:([1-9]\\d*)\\$)?([0 +\\-#]*)(\\*|\\d+)?(?:(\\.)(\\*|\\d+)?)?[hlL]?([%A-Za-z])/g;\n\n\n// FUNCTIONS //\n\n/**\n* Parses a delimiter.\n*\n* @private\n* @param {Array} match - regular expression match\n* @returns {Object} delimiter token object\n*/\nfunction parse( match ) {\n\tvar token = {\n\t\t'mapping': ( match[ 1 ] ) ? parseInt( match[ 1 ], 10 ) : void 0,\n\t\t'flags': match[ 2 ],\n\t\t'width': match[ 3 ],\n\t\t'precision': match[ 5 ],\n\t\t'specifier': match[ 6 ]\n\t};\n\tif ( match[ 4 ] === '.' && match[ 5 ] === void 0 ) {\n\t\ttoken.precision = '1';\n\t}\n\treturn token;\n}\n\n\n// MAIN //\n\n/**\n* Tokenizes a string into an array of string parts and format identifier objects.\n*\n* @param {string} str - input string\n* @returns {Array} tokens\n*\n* @example\n* var tokens = formatTokenize( 'Hello %s!' );\n* // returns [ 'Hello ', {...}, '!' ]\n*/\nfunction formatTokenize( str ) {\n\tvar content;\n\tvar tokens;\n\tvar match;\n\tvar prev;\n\n\ttokens = [];\n\tprev = 0;\n\tmatch = RE.exec( str );\n\twhile ( match ) {\n\t\tcontent = str.slice( prev, RE.lastIndex - match[ 0 ].length );\n\t\tif ( content.length ) {\n\t\t\ttokens.push( content );\n\t\t}\n\t\ttokens.push( parse( match ) );\n\t\tprev = RE.lastIndex;\n\t\tmatch = RE.exec( str );\n\t}\n\tcontent = str.slice( prev );\n\tif ( content.length ) {\n\t\ttokens.push( content );\n\t}\n\treturn tokens;\n}\n\n\n// EXPORTS //\n\nexport default formatTokenize;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport interpolate from '@stdlib/string-base-format-interpolate';\nimport tokenize from '@stdlib/string-base-format-tokenize';\nimport isString from './is_string.js';\n\n\n// MAIN //\n\n/**\n* Inserts supplied variable values into a format string.\n*\n* @param {string} str - input string\n* @param {Array} ...args - variable values\n* @throws {TypeError} first argument must be a string\n* @throws {Error} invalid flags\n* @returns {string} formatted string\n*\n* @example\n* var str = format( 'Hello %s!', 'world' );\n* // returns 'Hello world!'\n*\n* @example\n* var str = format( 'Pi: ~%.2f', 3.141592653589793 );\n* // returns 'Pi: ~3.14'\n*/\nfunction format( str ) {\n\tvar args;\n\tvar i;\n\n\tif ( !isString( str ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a string. Value: `%s`.', str ) );\n\t}\n\targs = [ tokenize( str ) ];\n\tfor ( i = 1; i < arguments.length; i++ ) {\n\t\targs.push( arguments[ i ] );\n\t}\n\treturn interpolate.apply( null, args );\n}\n\n\n// EXPORTS //\n\nexport default format;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Tests if a value is a string primitive.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a string primitive\n*\n* @example\n* var bool = isString( 'beep' );\n* // returns true\n*\n* @example\n* var bool = isString( new String( 'beep' ) );\n* // returns false\n*/\nfunction isString( value ) {\n\treturn ( typeof value === 'string' ); // NOTE: we inline the `isString.isPrimitive` function from `@stdlib/assert/is-string` in order to avoid circular dependencies.\n}\n\n\n// EXPORTS //\n\nexport default isString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable no-underscore-dangle, no-proto */\n\n'use strict';\n\n// MODULES //\n\nimport format from '@stdlib/string-format';\n\n\n// VARIABLES //\n\nvar objectProtoype = Object.prototype;\nvar toStr = objectProtoype.toString;\nvar defineGetter = objectProtoype.__defineGetter__;\nvar defineSetter = objectProtoype.__defineSetter__;\nvar lookupGetter = objectProtoype.__lookupGetter__;\nvar lookupSetter = objectProtoype.__lookupSetter__;\n\n\n// MAIN //\n\n/**\n* Defines (or modifies) an object property.\n*\n* ## Notes\n*\n* - Property descriptors come in two flavors: **data descriptors** and **accessor descriptors**. A data descriptor is a property that has a value, which may or may not be writable. An accessor descriptor is a property described by a getter-setter function pair. A descriptor must be one of these two flavors and cannot be both.\n*\n* @param {Object} obj - object on which to define the property\n* @param {string} prop - property name\n* @param {Object} descriptor - property descriptor\n* @param {boolean} [descriptor.configurable=false] - boolean indicating if property descriptor can be changed and if the property can be deleted from the provided object\n* @param {boolean} [descriptor.enumerable=false] - boolean indicating if the property shows up when enumerating object properties\n* @param {boolean} [descriptor.writable=false] - boolean indicating if the value associated with the property can be changed with an assignment operator\n* @param {*} [descriptor.value] - property value\n* @param {(Function|void)} [descriptor.get=undefined] - function which serves as a getter for the property, or, if no getter, undefined. When the property is accessed, a getter function is called without arguments and with the `this` context set to the object through which the property is accessed (which may not be the object on which the property is defined due to inheritance). The return value will be used as the property value.\n* @param {(Function|void)} [descriptor.set=undefined] - function which serves as a setter for the property, or, if no setter, undefined. When assigning a property value, a setter function is called with one argument (the value being assigned to the property) and with the `this` context set to the object through which the property is assigned.\n* @throws {TypeError} first argument must be an object\n* @throws {TypeError} third argument must be an object\n* @throws {Error} property descriptor cannot have both a value and a setter and/or getter\n* @returns {Object} object with added property\n*\n* @example\n* var obj = {};\n*\n* defineProperty( obj, 'foo', {\n* 'value': 'bar'\n* });\n*\n* var str = obj.foo;\n* // returns 'bar'\n*/\nfunction defineProperty( obj, prop, descriptor ) {\n\tvar prototype;\n\tvar hasValue;\n\tvar hasGet;\n\tvar hasSet;\n\n\tif ( typeof obj !== 'object' || obj === null || toStr.call( obj ) === '[object Array]' ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be an object. Value: `%s`.', obj ) );\n\t}\n\tif ( typeof descriptor !== 'object' || descriptor === null || toStr.call( descriptor ) === '[object Array]' ) {\n\t\tthrow new TypeError( format( 'invalid argument. Property descriptor must be an object. Value: `%s`.', descriptor ) );\n\t}\n\thasValue = ( 'value' in descriptor );\n\tif ( hasValue ) {\n\t\tif (\n\t\t\tlookupGetter.call( obj, prop ) ||\n\t\t\tlookupSetter.call( obj, prop )\n\t\t) {\n\t\t\t// Override `__proto__` to avoid touching inherited accessors:\n\t\t\tprototype = obj.__proto__;\n\t\t\tobj.__proto__ = objectProtoype;\n\n\t\t\t// Delete property as existing getters/setters prevent assigning value to specified property:\n\t\t\tdelete obj[ prop ];\n\t\t\tobj[ prop ] = descriptor.value;\n\n\t\t\t// Restore original prototype:\n\t\t\tobj.__proto__ = prototype;\n\t\t} else {\n\t\t\tobj[ prop ] = descriptor.value;\n\t\t}\n\t}\n\thasGet = ( 'get' in descriptor );\n\thasSet = ( 'set' in descriptor );\n\n\tif ( hasValue && ( hasGet || hasSet ) ) {\n\t\tthrow new Error( 'invalid argument. Cannot specify one or more accessors and a value or writable attribute in the property descriptor.' );\n\t}\n\n\tif ( hasGet && defineGetter ) {\n\t\tdefineGetter.call( obj, prop, descriptor.get );\n\t}\n\tif ( hasSet && defineSetter ) {\n\t\tdefineSetter.call( obj, prop, descriptor.set );\n\t}\n\treturn obj;\n}\n\n\n// EXPORTS //\n\nexport default defineProperty;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Define (or modify) an object property.\n*\n* @module @stdlib/utils-define-property\n*\n* @example\n* import defineProperty from '@stdlib/utils-define-property';\n*\n* var obj = {};\n* defineProperty( obj, 'foo', {\n* 'value': 'bar',\n* 'writable': false,\n* 'configurable': false,\n* 'enumerable': false\n* });\n* obj.foo = 'boop'; // => throws\n*/\n\n// MODULES //\n\nimport hasDefinePropertySupport from './has_define_property_support.js';\nimport builtin from './builtin.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar defineProperty;\nif ( hasDefinePropertySupport() ) {\n\tdefineProperty = builtin;\n} else {\n\tdefineProperty = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default defineProperty;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport defineProperty from './define_property.js';\n\n\n// MAIN //\n\n/**\n* Tests for `Object.defineProperty` support.\n*\n* @private\n* @returns {boolean} boolean indicating if an environment has `Object.defineProperty` support\n*\n* @example\n* var bool = hasDefinePropertySupport();\n* // returns \n*/\nfunction hasDefinePropertySupport() {\n\t// Test basic support...\n\ttry {\n\t\tdefineProperty( {}, 'x', {} );\n\t\treturn true;\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\treturn false;\n\t}\n}\n\n\n// EXPORTS //\n\nexport default hasDefinePropertySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport defineProperty from '@stdlib/utils-define-property';\n\n\n// MAIN //\n\n/**\n* Defines a non-enumerable read-only property.\n*\n* @param {Object} obj - object on which to define the property\n* @param {(string|symbol)} prop - property name\n* @param {*} value - value to set\n*\n* @example\n* var obj = {};\n*\n* setNonEnumerableReadOnly( obj, 'foo', 'bar' );\n*\n* try {\n* obj.foo = 'boop';\n* } catch ( err ) {\n* console.error( err.message );\n* }\n*/\nfunction setNonEnumerableReadOnly( obj, prop, value ) {\n\tdefineProperty( obj, prop, {\n\t\t'configurable': false,\n\t\t'enumerable': false,\n\t\t'writable': false,\n\t\t'value': value\n\t});\n}\n\n\n// EXPORTS //\n\nexport default setNonEnumerableReadOnly;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Tests if a value is a number primitive.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number primitive\n*\n* @example\n* var bool = isNumber( 3.14 );\n* // returns true\n*\n* @example\n* var bool = isNumber( NaN );\n* // returns true\n*\n* @example\n* var bool = isNumber( new Number( 3.14 ) );\n* // returns false\n*/\nfunction isNumber( value ) {\n\treturn ( typeof value === 'number' );\n}\n\n\n// EXPORTS //\n\nexport default isNumber;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport hasSymbols from '@stdlib/assert-has-symbol-support';\n\n\n// VARIABLES //\n\nvar FLG = hasSymbols();\n\n\n// MAIN //\n\n/**\n* Tests for native `toStringTag` support.\n*\n* @returns {boolean} boolean indicating if an environment has `toStringTag` support\n*\n* @example\n* var bool = hasToStringTagSupport();\n* // returns \n*/\nfunction hasToStringTagSupport() {\n\treturn ( FLG && typeof Symbol.toStringTag === 'symbol' );\n}\n\n\n// EXPORTS //\n\nexport default hasToStringTagSupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Tests for native `Symbol` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Symbol` support\n*\n* @example\n* var bool = hasSymbolSupport();\n* // returns \n*/\nfunction hasSymbolSupport() {\n\treturn (\n\t\ttypeof Symbol === 'function' &&\n\t\ttypeof Symbol( 'foo' ) === 'symbol'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default hasSymbolSupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar toStr = Object.prototype.toString;\n\n\n// EXPORTS //\n\nexport default toStr;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// FUNCTIONS //\n\nvar has = Object.prototype.hasOwnProperty;\n\n\n// MAIN //\n\n/**\n* Tests if an object has a specified property.\n*\n* @param {*} value - value to test\n* @param {*} property - property to test\n* @returns {boolean} boolean indicating if an object has a specified property\n*\n* @example\n* var beep = {\n* 'boop': true\n* };\n*\n* var bool = hasOwnProp( beep, 'boop' );\n* // returns true\n*\n* @example\n* var beep = {\n* 'boop': true\n* };\n*\n* var bool = hasOwnProp( beep, 'bap' );\n* // returns false\n*/\nfunction hasOwnProp( value, property ) {\n\tif (\n\t\tvalue === void 0 ||\n\t\tvalue === null\n\t) {\n\t\treturn false;\n\t}\n\treturn has.call( value, property );\n}\n\n\n// EXPORTS //\n\nexport default hasOwnProp;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar Sym = ( typeof Symbol === 'function' ) ? Symbol : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default Sym;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport Symbol from '@stdlib/symbol-ctor';\n\n\n// MAIN //\n\nvar toStrTag = ( typeof Symbol === 'function' ) ? Symbol.toStringTag : '';\n\n\n// EXPORTS //\n\nexport default toStrTag;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Return a string value indicating a specification defined classification of an object.\n*\n* @module @stdlib/utils-native-class\n*\n* @example\n* import nativeClass from '@stdlib/utils-native-class';\n*\n* var str = nativeClass( 'a' );\n* // returns '[object String]'\n*\n* str = nativeClass( 5 );\n* // returns '[object Number]'\n*\n* function Beep() {\n* return this;\n* }\n* str = nativeClass( new Beep() );\n* // returns '[object Object]'\n*/\n\n// MODULES //\n\nimport hasToStringTag from '@stdlib/assert-has-tostringtag-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar main;\nif ( hasToStringTag() ) {\n\tmain = polyfill;\n} else {\n\tmain = builtin;\n}\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport hasOwnProp from '@stdlib/assert-has-own-property';\nimport toStringTag from './tostringtag.js';\nimport toStr from './tostring.js';\n\n\n// MAIN //\n\n/**\n* Returns a string value indicating a specification defined classification of an object in environments supporting `Symbol.toStringTag`.\n*\n* @param {*} v - input value\n* @returns {string} string value indicating a specification defined classification of the input value\n*\n* @example\n* var str = nativeClass( 'a' );\n* // returns '[object String]'\n*\n* @example\n* var str = nativeClass( 5 );\n* // returns '[object Number]'\n*\n* @example\n* function Beep() {\n* return this;\n* }\n* var str = nativeClass( new Beep() );\n* // returns '[object Object]'\n*/\nfunction nativeClass( v ) {\n\tvar isOwn;\n\tvar tag;\n\tvar out;\n\n\tif ( v === null || v === void 0 ) {\n\t\treturn toStr.call( v );\n\t}\n\ttag = v[ toStringTag ];\n\tisOwn = hasOwnProp( v, toStringTag );\n\n\t// Attempt to override the `toStringTag` property. For built-ins having a `Symbol.toStringTag` property (e.g., `JSON`, `Math`, etc), the `Symbol.toStringTag` property is read-only (e.g., , so we need to wrap in a `try/catch`.\n\ttry {\n\t\tv[ toStringTag ] = void 0;\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\treturn toStr.call( v );\n\t}\n\tout = toStr.call( v );\n\n\tif ( isOwn ) {\n\t\tv[ toStringTag ] = tag;\n\t} else {\n\t\tdelete v[ toStringTag ];\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default nativeClass;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport toStr from './tostring.js';\n\n\n// MAIN //\n\n/**\n* Returns a string value indicating a specification defined classification (via the internal property `[[Class]]`) of an object.\n*\n* @param {*} v - input value\n* @returns {string} string value indicating a specification defined classification of the input value\n*\n* @example\n* var str = nativeClass( 'a' );\n* // returns '[object String]'\n*\n* @example\n* var str = nativeClass( 5 );\n* // returns '[object Number]'\n*\n* @example\n* function Beep() {\n* return this;\n* }\n* var str = nativeClass( new Beep() );\n* // returns '[object Object]'\n*/\nfunction nativeClass( v ) {\n\treturn toStr.call( v );\n}\n\n\n// EXPORTS //\n\nexport default nativeClass;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// EXPORTS //\n\nexport default Number; // eslint-disable-line stdlib/require-globals\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport Number from '@stdlib/number-ctor';\n\n\n// MAIN //\n\n// eslint-disable-next-line stdlib/no-redeclare\nvar toString = Number.prototype.toString; // non-generic\n\n\n// EXPORTS //\n\nexport default toString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport hasToStringTag from '@stdlib/assert-has-tostringtag-support';\nimport nativeClass from '@stdlib/utils-native-class';\nimport Number from '@stdlib/number-ctor';\nimport test from './try2serialize.js';\n\n\n// VARIABLES //\n\nvar FLG = hasToStringTag();\n\n\n// MAIN //\n\n/**\n* Tests if a value is a number object.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number object\n*\n* @example\n* var bool = isNumber( 3.14 );\n* // returns false\n*\n* @example\n* var bool = isNumber( new Number( 3.14 ) );\n* // returns true\n*/\nfunction isNumber( value ) {\n\tif ( typeof value === 'object' ) {\n\t\tif ( value instanceof Number ) {\n\t\t\treturn true;\n\t\t}\n\t\tif ( FLG ) {\n\t\t\treturn test( value );\n\t\t}\n\t\treturn ( nativeClass( value ) === '[object Number]' );\n\t}\n\treturn false;\n}\n\n\n// EXPORTS //\n\nexport default isNumber;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport toString from './tostring.js'; // eslint-disable-line stdlib/no-redeclare\n\n\n// MAIN //\n\n/**\n* Attempts to serialize a value to a string.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value can be serialized\n*/\nfunction test( value ) {\n\ttry {\n\t\ttoString.call( value );\n\t\treturn true;\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\treturn false;\n\t}\n}\n\n\n// EXPORTS //\n\nexport default test;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a number.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a number\n*\n* @example\n* var bool = isNumber( 3.14 );\n* // returns true\n*\n* @example\n* var bool = isNumber( new Number( 3.14 ) );\n* // returns true\n*\n* @example\n* var bool = isNumber( NaN );\n* // returns true\n*\n* @example\n* var bool = isNumber( null );\n* // returns false\n*/\nfunction isNumber( value ) {\n\treturn ( isPrimitive( value ) || isObject( value ) );\n}\n\n\n// EXPORTS //\n\nexport default isNumber;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test if a value is a number.\n*\n* @module @stdlib/assert-is-number\n*\n* @example\n* import isNumber from '@stdlib/assert-is-number';\n*\n* var bool = isNumber( 3.14 );\n* // returns true\n*\n* bool = isNumber( new Number( 3.14 ) );\n* // returns true\n*\n* bool = isNumber( NaN );\n* // returns true\n*\n* bool = isNumber( null );\n* // returns false\n*\n* @example\n* import { isPrimitive as isNumber } from '@stdlib/assert-is-number';\n*\n* var bool = isNumber( 3.14 );\n* // returns true\n*\n* bool = isNumber( NaN );\n* // returns true\n*\n* bool = isNumber( new Number( 3.14 ) );\n* // returns false\n*\n* @example\n* import { isObject as isNumber } from '@stdlib/assert-is-number';\n*\n* var bool = isNumber( 3.14 );\n* // returns false\n*\n* bool = isNumber( new Number( 3.14 ) );\n* // returns true\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'isPrimitive', isPrimitive );\nsetReadOnly( main, 'isObject', isObject );\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Double-precision floating-point positive infinity.\n*\n* @module @stdlib/constants-float64-pinf\n* @type {number}\n*\n* @example\n* import FLOAT64_PINF from '@stdlib/constants-float64-pinf';\n* // returns Infinity\n*/\n\n\n// MAIN //\n\n/**\n* Double-precision floating-point positive infinity.\n*\n* ## Notes\n*\n* Double-precision floating-point positive infinity has the bit sequence\n*\n* ```binarystring\n* 0 11111111111 00000000000000000000 00000000000000000000000000000000\n* ```\n*\n* @constant\n* @type {number}\n* @default Number.POSITIVE_INFINITY\n* @see [IEEE 754]{@link https://en.wikipedia.org/wiki/IEEE_754-1985}\n*/\nvar FLOAT64_PINF = Number.POSITIVE_INFINITY; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default FLOAT64_PINF;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Double-precision floating-point negative infinity.\n*\n* @module @stdlib/constants-float64-ninf\n* @type {number}\n*\n* @example\n* import FLOAT64_NINF from '@stdlib/constants-float64-ninf';\n* // returns -Infinity\n*/\n\n// MODULES //\n\nimport Number from '@stdlib/number-ctor';\n\n\n// MAIN //\n\n/**\n* Double-precision floating-point negative infinity.\n*\n* ## Notes\n*\n* Double-precision floating-point negative infinity has the bit sequence\n*\n* ```binarystring\n* 1 11111111111 00000000000000000000 00000000000000000000000000000000\n* ```\n*\n* @constant\n* @type {number}\n* @default Number.NEGATIVE_INFINITY\n* @see [IEEE 754]{@link https://en.wikipedia.org/wiki/IEEE_754-1985}\n*/\nvar FLOAT64_NINF = Number.NEGATIVE_INFINITY;\n\n\n// EXPORTS //\n\nexport default FLOAT64_NINF;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: implementation (?)\n\n/**\n* Rounds a double-precision floating-point number toward negative infinity.\n*\n* @param {number} x - input value\n* @returns {number} rounded value\n*\n* @example\n* var v = floor( -4.2 );\n* // returns -5.0\n*\n* @example\n* var v = floor( 9.99999 );\n* // returns 9.0\n*\n* @example\n* var v = floor( 0.0 );\n* // returns 0.0\n*\n* @example\n* var v = floor( NaN );\n* // returns NaN\n*/\nvar floor = Math.floor; // eslint-disable-line stdlib/no-builtin-math\n\n\n// EXPORTS //\n\nexport default floor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport floor from '@stdlib/math-base-special-floor';\n\n\n// MAIN //\n\n/**\n* Tests if a finite double-precision floating-point number is an integer.\n*\n* @param {number} x - value to test\n* @returns {boolean} boolean indicating whether the value is an integer\n*\n* @example\n* var bool = isInteger( 1.0 );\n* // returns true\n*\n* @example\n* var bool = isInteger( 3.14 );\n* // returns false\n*/\nfunction isInteger( x ) {\n\treturn (floor(x) === x);\n}\n\n\n// EXPORTS //\n\nexport default isInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport PINF from '@stdlib/constants-float64-pinf';\nimport NINF from '@stdlib/constants-float64-ninf';\nimport isInt from '@stdlib/math-base-assert-is-integer';\n\n\n// MAIN //\n\n/**\n* Tests if a number primitive is an integer value.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a number primitive is an integer value\n*/\nfunction isInteger( value ) {\n\treturn (\n\t\tvalue < PINF &&\n\t\tvalue > NINF &&\n\t\tisInt( value )\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isNumber } from '@stdlib/assert-is-number';\nimport isInt from './integer.js';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a number primitive having an integer value.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number primitive having an integer value\n*\n* @example\n* var bool = isInteger( -3.0 );\n* // returns true\n*\n* @example\n* var bool = isInteger( new Number( -3.0 ) );\n* // returns false\n*/\nfunction isInteger( value ) {\n\treturn (\n\t\tisNumber( value ) &&\n\t\tisInt( value )\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isObject as isNumber } from '@stdlib/assert-is-number';\nimport isInt from './integer.js';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a number object having an integer value.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number object having an integer value\n*\n* @example\n* var bool = isInteger( 3.0 );\n* // returns false\n*\n* @example\n* var bool = isInteger( new Number( 3.0 ) );\n* // returns true\n*/\nfunction isInteger( value ) {\n\treturn (\n\t\tisNumber( value ) &&\n\t\tisInt( value.valueOf() )\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\n/**\n* Tests if a value is an integer.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an integer\n*\n* @example\n* var bool = isInteger( 5.0 );\n* // returns true\n*\n* @example\n* var bool = isInteger( new Number( 5.0 ) );\n* // returns true\n*\n* @example\n* var bool = isInteger( -3.14 );\n* // returns false\n*\n* @example\n* var bool = isInteger( null );\n* // returns false\n*/\nfunction isInteger( value ) {\n\treturn ( isPrimitive( value ) || isObject( value ) );\n}\n\n\n// EXPORTS //\n\nexport default isInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isInteger } from '@stdlib/assert-is-integer';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a number primitive having a nonnegative integer value.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number primitive having a nonnegative integer value\n*\n* @example\n* var bool = isNonNegativeInteger( 3.0 );\n* // returns true\n*\n* @example\n* var bool = isNonNegativeInteger( new Number( 3.0 ) );\n* // returns false\n*/\nfunction isNonNegativeInteger( value ) {\n\treturn (\n\t\tisInteger( value ) &&\n\t\tvalue >= 0\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isNonNegativeInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isObject as isInteger } from '@stdlib/assert-is-integer';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a number object having a nonnegative integer value.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number object having a nonnegative integer value\n*\n* @example\n* var bool = isNonNegativeInteger( 3.0 );\n* // returns false\n*\n* @example\n* var bool = isNonNegativeInteger( new Number( 3.0 ) );\n* // returns true\n*/\nfunction isNonNegativeInteger( value ) {\n\treturn (\n\t\tisInteger( value ) &&\n\t\tvalue.valueOf() >= 0\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isNonNegativeInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a nonnegative integer.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a nonnegative integer\n*\n* @example\n* var bool = isNonNegativeInteger( 5.0 );\n* // returns true\n*\n* @example\n* var bool = isNonNegativeInteger( new Number( 5.0 ) );\n* // returns true\n*\n* @example\n* var bool = isNonNegativeInteger( -5.0 );\n* // returns false\n*\n* @example\n* var bool = isNonNegativeInteger( 3.14 );\n* // returns false\n*\n* @example\n* var bool = isNonNegativeInteger( null );\n* // returns false\n*/\nfunction isNonNegativeInteger( value ) {\n\treturn ( isPrimitive( value ) || isObject( value ) );\n}\n\n\n// EXPORTS //\n\nexport default isNonNegativeInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test if a value is an integer.\n*\n* @module @stdlib/assert-is-integer\n*\n* @example\n* import isInteger from '@stdlib/assert-is-integer';\n*\n* var bool = isInteger( 5.0 );\n* // returns true\n*\n* bool = isInteger( new Number( 5.0 ) );\n* // returns true\n*\n* bool = isInteger( -3.14 );\n* // returns false\n*\n* bool = isInteger( null );\n* // returns false\n*\n* @example\n* // Use interface to check for integer primitives...\n* import { isPrimitive as isInteger } from '@stdlib/assert-is-integer';\n*\n* var bool = isInteger( -3.0 );\n* // returns true\n*\n* bool = isInteger( new Number( -3.0 ) );\n* // returns false\n*\n* @example\n* // Use interface to check for integer objects...\n* import { isObject as isInteger } from '@stdlib/assert-is-integer';\n*\n* var bool = isInteger( 3.0 );\n* // returns false\n*\n* bool = isInteger( new Number( 3.0 ) );\n* // returns true\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'isPrimitive', isPrimitive );\nsetReadOnly( main, 'isObject', isObject );\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test if a value is a nonnegative integer.\n*\n* @module @stdlib/assert-is-nonnegative-integer\n*\n* @example\n* import isNonNegativeInteger from '@stdlib/assert-is-nonnegative-integer';\n*\n* var bool = isNonNegativeInteger( 5.0 );\n* // returns true\n*\n* bool = isNonNegativeInteger( new Number( 5.0 ) );\n* // returns true\n*\n* bool = isNonNegativeInteger( -5.0 );\n* // returns false\n*\n* bool = isNonNegativeInteger( 3.14 );\n* // returns false\n*\n* bool = isNonNegativeInteger( null );\n* // returns false\n*\n* @example\n* import { isPrimitive as isNonNegativeInteger } from '@stdlib/assert-is-nonnegative-integer';\n*\n* var bool = isNonNegativeInteger( 3.0 );\n* // returns true\n*\n* bool = isNonNegativeInteger( new Number( 3.0 ) );\n* // returns false\n*\n* @example\n* import { isObject as isNonNegativeInteger } from '@stdlib/assert-is-nonnegative-integer';\n*\n* var bool = isNonNegativeInteger( 3.0 );\n* // returns false\n*\n* bool = isNonNegativeInteger( new Number( 3.0 ) );\n* // returns true\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'isPrimitive', isPrimitive );\nsetReadOnly( main, 'isObject', isObject );\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasFloat64Array = ( typeof Float64Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Float64Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a Float64Array\n*\n* @example\n* var bool = isFloat64Array( new Float64Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isFloat64Array( [] );\n* // returns false\n*/\nfunction isFloat64Array( value ) {\n\treturn (\n\t\t( hasFloat64Array && value instanceof Float64Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Float64Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isFloat64Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Float64Array === 'function' ) ? Float64Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Float64Array === 'function' ) ? Float64Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of double-precision floating-point numbers in the platform byte order.\n*\n* @module @stdlib/array-float64\n*\n* @example\n* import ctor from '@stdlib/array-float64';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasFloat64ArraySupport from '@stdlib/assert-has-float64array-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasFloat64ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isFloat64Array from '@stdlib/assert-is-float64array';\nimport GlobalFloat64Array from './float64array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Float64Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Float64Array` support\n*\n* @example\n* var bool = hasFloat64ArraySupport();\n* // returns \n*/\nfunction hasFloat64ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalFloat64Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = new GlobalFloat64Array( [ 1.0, 3.14, -3.14, NaN ] );\n\t\tbool = (\n\t\t\tisFloat64Array( arr ) &&\n\t\t\tarr[ 0 ] === 1.0 &&\n\t\t\tarr[ 1 ] === 3.14 &&\n\t\t\tarr[ 2 ] === -3.14 &&\n\t\t\tarr[ 3 ] !== arr[ 3 ]\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasFloat64ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of double-precision floating-point numbers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasFloat32Array = ( typeof Float32Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Float32Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a Float32Array\n*\n* @example\n* var bool = isFloat32Array( new Float32Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isFloat32Array( [] );\n* // returns false\n*/\nfunction isFloat32Array( value ) {\n\treturn (\n\t\t( hasFloat32Array && value instanceof Float32Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Float32Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isFloat32Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Float32Array === 'function' ) ? Float32Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Float32Array === 'function' ) ? Float32Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of single-precision floating-point numbers in the platform byte order.\n*\n* @module @stdlib/array-float32\n*\n* @example\n* import ctor from '@stdlib/array-float32';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasFloat32ArraySupport from '@stdlib/assert-has-float32array-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasFloat32ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isFloat32Array from '@stdlib/assert-is-float32array';\nimport PINF from '@stdlib/constants-float64-pinf';\nimport GlobalFloat32Array from './float32array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Float32Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Float32Array` support\n*\n* @example\n* var bool = hasFloat32ArraySupport();\n* // returns \n*/\nfunction hasFloat32ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalFloat32Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = new GlobalFloat32Array( [ 1.0, 3.14, -3.14, 5.0e40 ] );\n\t\tbool = (\n\t\t\tisFloat32Array( arr ) &&\n\t\t\tarr[ 0 ] === 1.0 &&\n\t\t\tarr[ 1 ] === 3.140000104904175 &&\n\t\t\tarr[ 2 ] === -3.140000104904175 &&\n\t\t\tarr[ 3 ] === PINF\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasFloat32ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of single-precision floating-point numbers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasInt16Array = ( typeof Int16Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is an Int16Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an Int16Array\n*\n* @example\n* var bool = isInt16Array( new Int16Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isInt16Array( [] );\n* // returns false\n*/\nfunction isInt16Array( value ) {\n\treturn (\n\t\t( hasInt16Array && value instanceof Int16Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Int16Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isInt16Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum signed 16-bit integer.\n*\n* @module @stdlib/constants-int16-max\n* @type {integer32}\n*\n* @example\n* import INT16_MAX from '@stdlib/constants-int16-max';\n* // returns 32767\n*/\n\n\n// MAIN //\n\n/**\n* Maximum signed 16-bit integer.\n*\n* ## Notes\n*\n* The number has the value\n*\n* ```tex\n* 2^{15} - 1\n* ```\n*\n* which corresponds to the bit sequence\n*\n* ```binarystring\n* 0111111111111111\n* ```\n*\n* @constant\n* @type {integer32}\n* @default 32767\n*/\nvar INT16_MAX = 32767|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default INT16_MAX;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Int16Array === 'function' ) ? Int16Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Int16Array === 'function' ) ? Int16Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of twos-complement 16-bit signed integers in the platform byte order.\n*\n* @module @stdlib/array-int16\n*\n* @example\n* import ctor from '@stdlib/array-int16';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasInt16ArraySupport from '@stdlib/assert-has-int16array-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasInt16ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isInt16Array from '@stdlib/assert-is-int16array';\nimport INT16_MAX from '@stdlib/constants-int16-max';\nimport INT16_MIN from '@stdlib/constants-int16-min';\nimport GlobalInt16Array from './int16array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Int16Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Int16Array` support\n*\n* @example\n* var bool = hasInt16ArraySupport();\n* // returns \n*/\nfunction hasInt16ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalInt16Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = new GlobalInt16Array( [ 1, 3.14, -3.14, INT16_MAX+1 ] );\n\t\tbool = (\n\t\t\tisInt16Array( arr ) &&\n\t\t\tarr[ 0 ] === 1 &&\n\t\t\tarr[ 1 ] === 3 && // truncation\n\t\t\tarr[ 2 ] === -3 && // truncation\n\t\t\tarr[ 3 ] === INT16_MIN // wrap around\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasInt16ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Minimum signed 16-bit integer.\n*\n* @module @stdlib/constants-int16-min\n* @type {integer32}\n*\n* @example\n* import INT16_MIN from '@stdlib/constants-int16-min';\n* // returns -32768\n*/\n\n\n// MAIN //\n\n/**\n* Minimum signed 16-bit integer.\n*\n* ## Notes\n*\n* The number has the value\n*\n* ```tex\n* -(2^{15})\n* ```\n*\n* which corresponds to the two's complement bit sequence\n*\n* ```binarystring\n* 1000000000000000\n* ```\n*\n* @constant\n* @type {integer32}\n* @default -32768\n*/\nvar INT16_MIN = -32768|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default INT16_MIN;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of twos-complement 16-bit signed integers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasInt32Array = ( typeof Int32Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is an Int32Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an Int32Array\n*\n* @example\n* var bool = isInt32Array( new Int32Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isInt32Array( [] );\n* // returns false\n*/\nfunction isInt32Array( value ) {\n\treturn (\n\t\t( hasInt32Array && value instanceof Int32Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Int32Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isInt32Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum signed 32-bit integer.\n*\n* @module @stdlib/constants-int32-max\n* @type {integer32}\n*\n* @example\n* import INT32_MAX from '@stdlib/constants-int32-max';\n* // returns 2147483647\n*/\n\n\n// MAIN //\n\n/**\n* Maximum signed 32-bit integer.\n*\n* ## Notes\n*\n* The number has the value\n*\n* ```tex\n* 2^{31} - 1\n* ```\n*\n* which corresponds to the bit sequence\n*\n* ```binarystring\n* 01111111111111111111111111111111\n* ```\n*\n* @constant\n* @type {integer32}\n* @default 2147483647\n*/\nvar INT32_MAX = 2147483647|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default INT32_MAX;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Int32Array === 'function' ) ? Int32Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Int32Array === 'function' ) ? Int32Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of twos-complement 32-bit signed integers in the platform byte order.\n*\n* @module @stdlib/array-int32\n*\n* @example\n* import ctor from '@stdlib/array-int32';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasInt32ArraySupport from '@stdlib/assert-has-int32array-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasInt32ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isInt32Array from '@stdlib/assert-is-int32array';\nimport INT32_MAX from '@stdlib/constants-int32-max';\nimport INT32_MIN from '@stdlib/constants-int32-min';\nimport GlobalInt32Array from './int32array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Int32Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Int32Array` support\n*\n* @example\n* var bool = hasInt32ArraySupport();\n* // returns \n*/\nfunction hasInt32ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalInt32Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = new GlobalInt32Array( [ 1, 3.14, -3.14, INT32_MAX+1 ] );\n\t\tbool = (\n\t\t\tisInt32Array( arr ) &&\n\t\t\tarr[ 0 ] === 1 &&\n\t\t\tarr[ 1 ] === 3 && // truncation\n\t\t\tarr[ 2 ] === -3 && // truncation\n\t\t\tarr[ 3 ] === INT32_MIN // wrap around\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasInt32ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Minimum signed 32-bit integer.\n*\n* @module @stdlib/constants-int32-min\n* @type {integer32}\n*\n* @example\n* import INT32_MIN from '@stdlib/constants-int32-min';\n* // returns -2147483648\n*/\n\n\n// MAIN //\n\n/**\n* Minimum signed 32-bit integer.\n*\n* ## Notes\n*\n* The number has the value\n*\n* ```tex\n* -(2^{31})\n* ```\n*\n* which corresponds to the two's complement bit sequence\n*\n* ```binarystring\n* 10000000000000000000000000000000\n* ```\n*\n* @constant\n* @type {integer32}\n* @default -2147483648\n*/\nvar INT32_MIN = -2147483648|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default INT32_MIN;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of twos-complement 32-bit signed integers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasInt8Array = ( typeof Int8Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is an Int8Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an Int8Array\n*\n* @example\n* var bool = isInt8Array( new Int8Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isInt8Array( [] );\n* // returns false\n*/\nfunction isInt8Array( value ) {\n\treturn (\n\t\t( hasInt8Array && value instanceof Int8Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Int8Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isInt8Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum signed 8-bit integer.\n*\n* @module @stdlib/constants-int8-max\n* @type {integer32}\n*\n* @example\n* import INT8_MAX from '@stdlib/constants-int8-max';\n* // returns 127\n*/\n\n\n// MAIN //\n\n/**\n* Maximum signed 8-bit integer.\n*\n* ## Notes\n*\n* The number is given by\n*\n* ```tex\n* 2^{7} - 1\n* ```\n*\n* which corresponds to the bit sequence\n*\n* ```binarystring\n* 01111111\n* ```\n*\n* @constant\n* @type {integer32}\n* @default 127\n*/\nvar INT8_MAX = 127|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default INT8_MAX;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Int8Array === 'function' ) ? Int8Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Int8Array === 'function' ) ? Int8Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of twos-complement 8-bit signed integers in the platform byte order.\n*\n* @module @stdlib/array-int8\n*\n* @example\n* import ctor from '@stdlib/array-int8';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasInt8ArraySupport from '@stdlib/assert-has-int8array-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasInt8ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isInt8Array from '@stdlib/assert-is-int8array';\nimport INT8_MAX from '@stdlib/constants-int8-max';\nimport INT8_MIN from '@stdlib/constants-int8-min';\nimport GlobalInt8Array from './int8array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Int8Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Int8Array` support\n*\n* @example\n* var bool = hasInt8ArraySupport();\n* // returns \n*/\nfunction hasInt8ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalInt8Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = new GlobalInt8Array( [ 1, 3.14, -3.14, INT8_MAX+1 ] );\n\t\tbool = (\n\t\t\tisInt8Array( arr ) &&\n\t\t\tarr[ 0 ] === 1 &&\n\t\t\tarr[ 1 ] === 3 && // truncation\n\t\t\tarr[ 2 ] === -3 && // truncation\n\t\t\tarr[ 3 ] === INT8_MIN // wrap around\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasInt8ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Minimum signed 8-bit integer.\n*\n* @module @stdlib/constants-int8-min\n* @type {integer32}\n*\n* @example\n* import INT8_MIN from '@stdlib/constants-int8-min';\n* // returns -128\n*/\n\n\n// MAIN //\n\n/**\n* Minimum signed 8-bit integer.\n*\n* ## Notes\n*\n* The number is given by\n*\n* ```tex\n* -(2^{7})\n* ```\n*\n* which corresponds to the two's complement bit sequence\n*\n* ```binarystring\n* 10000000\n* ```\n*\n* @constant\n* @type {integer32}\n* @default -128\n*/\nvar INT8_MIN = -128|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default INT8_MIN;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of twos-complement 8-bit signed integers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasUint16Array = ( typeof Uint16Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Uint16Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a Uint16Array\n*\n* @example\n* var bool = isUint16Array( new Uint16Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isUint16Array( [] );\n* // returns false\n*/\nfunction isUint16Array( value ) {\n\treturn (\n\t\t( hasUint16Array && value instanceof Uint16Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Uint16Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isUint16Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum unsigned 16-bit integer.\n*\n* @module @stdlib/constants-uint16-max\n* @type {integer32}\n*\n* @example\n* import UINT16_MAX from '@stdlib/constants-uint16-max';\n* // returns 65535\n*/\n\n\n// MAIN //\n\n/**\n* Maximum unsigned 16-bit integer.\n*\n* ## Notes\n*\n* The number has the value\n*\n* ```tex\n* 2^{16} - 1\n* ```\n*\n* which corresponds to the bit sequence\n*\n* ```binarystring\n* 1111111111111111\n* ```\n*\n* @constant\n* @type {integer32}\n* @default 65535\n*/\nvar UINT16_MAX = 65535|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default UINT16_MAX;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Uint16Array === 'function' ) ? Uint16Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Uint16Array === 'function' ) ? Uint16Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of 16-bit unsigned integers in the platform byte order.\n*\n* @module @stdlib/array-uint16\n*\n* @example\n* import ctor from '@stdlib/array-uint16';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasUint16ArraySupport from '@stdlib/assert-has-uint16array-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasUint16ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isUint16Array from '@stdlib/assert-is-uint16array';\nimport UINT16_MAX from '@stdlib/constants-uint16-max';\nimport GlobalUint16Array from './uint16array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Uint16Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Uint16Array` support\n*\n* @example\n* var bool = hasUint16ArraySupport();\n* // returns \n*/\nfunction hasUint16ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalUint16Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = [ 1, 3.14, -3.14, UINT16_MAX+1, UINT16_MAX+2 ];\n\t\tarr = new GlobalUint16Array( arr );\n\t\tbool = (\n\t\t\tisUint16Array( arr ) &&\n\t\t\tarr[ 0 ] === 1 &&\n\t\t\tarr[ 1 ] === 3 && // truncation\n\t\t\tarr[ 2 ] === UINT16_MAX-2 && // truncation and wrap around\n\t\t\tarr[ 3 ] === 0 && // wrap around\n\t\t\tarr[ 4 ] === 1 // wrap around\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasUint16ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of 16-bit unsigned integers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasUint32Array = ( typeof Uint32Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Uint32Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a Uint32Array\n*\n* @example\n* var bool = isUint32Array( new Uint32Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isUint32Array( [] );\n* // returns false\n*/\nfunction isUint32Array( value ) {\n\treturn (\n\t\t( hasUint32Array && value instanceof Uint32Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Uint32Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isUint32Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum unsigned 32-bit integer.\n*\n* @module @stdlib/constants-uint32-max\n* @type {uinteger32}\n*\n* @example\n* import UINT32_MAX from '@stdlib/constants-uint32-max';\n* // returns 4294967295\n*/\n\n\n// MAIN //\n\n/**\n* Maximum unsigned 32-bit integer.\n*\n* ## Notes\n*\n* The number has the value\n*\n* ```tex\n* 2^{32} - 1\n* ```\n*\n* which corresponds to the bit sequence\n*\n* ```binarystring\n* 11111111111111111111111111111111\n* ```\n*\n* @constant\n* @type {uinteger32}\n* @default 4294967295\n*/\nvar UINT32_MAX = 4294967295;\n\n\n// EXPORTS //\n\nexport default UINT32_MAX;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Uint32Array === 'function' ) ? Uint32Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Uint32Array === 'function' ) ? Uint32Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of 32-bit unsigned integers in the platform byte order.\n*\n* @module @stdlib/array-uint32\n*\n* @example\n* import ctor from '@stdlib/array-uint32';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasUint32ArraySupport from '@stdlib/assert-has-uint32array-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasUint32ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isUint32Array from '@stdlib/assert-is-uint32array';\nimport UINT32_MAX from '@stdlib/constants-uint32-max';\nimport GlobalUint32Array from './uint32array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Uint32Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Uint32Array` support\n*\n* @example\n* var bool = hasUint32ArraySupport();\n* // returns \n*/\nfunction hasUint32ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalUint32Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = [ 1, 3.14, -3.14, UINT32_MAX+1, UINT32_MAX+2 ];\n\t\tarr = new GlobalUint32Array( arr );\n\t\tbool = (\n\t\t\tisUint32Array( arr ) &&\n\t\t\tarr[ 0 ] === 1 &&\n\t\t\tarr[ 1 ] === 3 && // truncation\n\t\t\tarr[ 2 ] === UINT32_MAX-2 && // truncation and wrap around\n\t\t\tarr[ 3 ] === 0 && // wrap around\n\t\t\tarr[ 4 ] === 1 // wrap around\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasUint32ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of 32-bit unsigned integers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasUint8Array = ( typeof Uint8Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Uint8Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a Uint8Array\n*\n* @example\n* var bool = isUint8Array( new Uint8Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isUint8Array( [] );\n* // returns false\n*/\nfunction isUint8Array( value ) {\n\treturn (\n\t\t( hasUint8Array && value instanceof Uint8Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Uint8Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isUint8Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum unsigned 8-bit integer.\n*\n* @module @stdlib/constants-uint8-max\n* @type {integer32}\n*\n* @example\n* import UINT8_MAX from '@stdlib/constants-uint8-max';\n* // returns 255\n*/\n\n\n// MAIN //\n\n/**\n* Maximum unsigned 8-bit integer.\n*\n* ## Notes\n*\n* The number has the value\n*\n* ```tex\n* 2^{8} - 1\n* ```\n*\n* which corresponds to the bit sequence\n*\n* ```binarystring\n* 11111111\n* ```\n*\n* @constant\n* @type {integer32}\n* @default 255\n*/\nvar UINT8_MAX = 255|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default UINT8_MAX;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Uint8Array === 'function' ) ? Uint8Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Uint8Array === 'function' ) ? Uint8Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of 8-bit unsigned integers in the platform byte order.\n*\n* @module @stdlib/array-uint8\n*\n* @example\n* import ctor from '@stdlib/array-uint8';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasUint8ArraySupport from '@stdlib/assert-has-uint8array-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasUint8ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isUint8Array from '@stdlib/assert-is-uint8array';\nimport UINT8_MAX from '@stdlib/constants-uint8-max';\nimport GlobalUint8Array from './uint8array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Uint8Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Uint8Array` support\n*\n* @example\n* var bool = hasUint8ArraySupport();\n* // returns \n*/\nfunction hasUint8ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalUint8Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = [ 1, 3.14, -3.14, UINT8_MAX+1, UINT8_MAX+2 ];\n\t\tarr = new GlobalUint8Array( arr );\n\t\tbool = (\n\t\t\tisUint8Array( arr ) &&\n\t\t\tarr[ 0 ] === 1 &&\n\t\t\tarr[ 1 ] === 3 && // truncation\n\t\t\tarr[ 2 ] === UINT8_MAX-2 && // truncation and wrap around\n\t\t\tarr[ 3 ] === 0 && // wrap around\n\t\t\tarr[ 4 ] === 1 // wrap around\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasUint8ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of 8-bit unsigned integers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasUint8ClampedArray = ( typeof Uint8ClampedArray === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Uint8ClampedArray.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a Uint8ClampedArray\n*\n* @example\n* var bool = isUint8ClampedArray( new Uint8ClampedArray( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isUint8ClampedArray( [] );\n* // returns false\n*/\nfunction isUint8ClampedArray( value ) {\n\treturn (\n\t\t( hasUint8ClampedArray && value instanceof Uint8ClampedArray ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Uint8ClampedArray]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isUint8ClampedArray;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Uint8ClampedArray === 'function' ) ? Uint8ClampedArray : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Uint8ClampedArray === 'function' ) ? Uint8ClampedArray : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of 8-bit unsigned integers in the platform byte order clamped to 0-255.\n*\n* @module @stdlib/array-uint8c\n*\n* @example\n* import ctor from '@stdlib/array-uint8c';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasUint8ClampedArraySupport from '@stdlib/assert-has-uint8clampedarray-support'; // eslint-disable-line id-length\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasUint8ClampedArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isUint8ClampedArray from '@stdlib/assert-is-uint8clampedarray';\nimport GlobalUint8ClampedArray from './uint8clampedarray.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Uint8ClampedArray` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Uint8ClampedArray` support\n*\n* @example\n* var bool = hasUint8ClampedArraySupport();\n* // returns \n*/\nfunction hasUint8ClampedArraySupport() { // eslint-disable-line id-length\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalUint8ClampedArray !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = new GlobalUint8ClampedArray( [ -1, 0, 1, 3.14, 4.99, 255, 256 ] );\n\t\tbool = (\n\t\t\tisUint8ClampedArray( arr ) &&\n\t\t\tarr[ 0 ] === 0 && // clamped\n\t\t\tarr[ 1 ] === 0 &&\n\t\t\tarr[ 2 ] === 1 &&\n\t\t\tarr[ 3 ] === 3 && // round to nearest\n\t\t\tarr[ 4 ] === 5 && // round to nearest\n\t\t\tarr[ 5 ] === 255 &&\n\t\t\tarr[ 6 ] === 255 // clamped\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasUint8ClampedArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of 8-bit unsigned integers in the platform byte order clamped to 0-255.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum length of a generic array.\n*\n* @module @stdlib/constants-array-max-array-length\n*\n* @example\n* import MAX_ARRAY_LENGTH from '@stdlib/constants-array-max-array-length';\n* // returns 4294967295\n*/\n\n// MAIN //\n\n/**\n* Maximum length of a generic array.\n*\n* ```tex\n* 2^{32} - 1\n* ```\n*\n* @constant\n* @type {uinteger32}\n* @default 4294967295\n*/\nvar MAX_ARRAY_LENGTH = 4294967295>>>0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default MAX_ARRAY_LENGTH;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isInteger from '@stdlib/math-base-assert-is-integer';\nimport MAX_LENGTH from '@stdlib/constants-array-max-array-length';\n\n\n// MAIN //\n\n/**\n* Tests if a value is an array-like object.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is an array-like object\n*\n* @example\n* var bool = isArrayLikeObject( [] );\n* // returns true\n*\n* @example\n* var bool = isArrayLikeObject( { 'length':10 } );\n* // returns true\n*\n* @example\n* var bool = isArrayLikeObject( 'beep' );\n* // returns false\n*/\nfunction isArrayLikeObject( value ) {\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\ttypeof value.length === 'number' &&\n\t\tisInteger( value.length ) &&\n\t\tvalue.length >= 0 &&\n\t\tvalue.length <= MAX_LENGTH\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isArrayLikeObject;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum length of a typed array.\n*\n* @module @stdlib/constants-array-max-typed-array-length\n*\n* @example\n* import MAX_TYPED_ARRAY_LENGTH from '@stdlib/constants-array-max-typed-array-length';\n* // returns 9007199254740991\n*/\n\n// MAIN //\n\n/**\n* Maximum length of a typed array.\n*\n* ```tex\n* 2^{53} - 1\n* ```\n*\n* @constant\n* @type {number}\n* @default 9007199254740991\n*/\nvar MAX_TYPED_ARRAY_LENGTH = 9007199254740991;\n\n\n// EXPORTS //\n\nexport default MAX_TYPED_ARRAY_LENGTH;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isInteger from '@stdlib/math-base-assert-is-integer';\nimport MAX_LENGTH from '@stdlib/constants-array-max-typed-array-length';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a collection.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether a value is a collection\n*\n* @example\n* var bool = isCollection( [] );\n* // returns true\n*\n* @example\n* var bool = isCollection( {} );\n* // returns false\n*/\nfunction isCollection( value ) {\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\ttypeof value.length === 'number' &&\n\t\tisInteger( value.length ) &&\n\t\tvalue.length >= 0 &&\n\t\tvalue.length <= MAX_LENGTH\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isCollection;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasArrayBuffer = ( typeof ArrayBuffer === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is an ArrayBuffer.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an ArrayBuffer\n*\n* @example\n* import ArrayBuffer from '@stdlib/array-buffer';\n*\n* var bool = isArrayBuffer( new ArrayBuffer( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isArrayBuffer( [] );\n* // returns false\n*/\nfunction isArrayBuffer( value ) {\n\treturn (\n\t\t( hasArrayBuffer && value instanceof ArrayBuffer ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object ArrayBuffer]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isArrayBuffer;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar f;\n\n\n// FUNCTIONS //\n\n/**\n* Tests if a value is an array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an array\n*\n* @example\n* var bool = isArray( [] );\n* // returns true\n*\n* @example\n* var bool = isArray( {} );\n* // returns false\n*/\nfunction isArray( value ) {\n\treturn ( nativeClass( value ) === '[object Array]' );\n}\n\n\n// MAIN //\n\nif ( Array.isArray ) {\n\tf = Array.isArray;\n} else {\n\tf = isArray;\n}\n\n\n// EXPORTS //\n\nexport default f;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isArray from '@stdlib/assert-is-array';\n\n\n// MAIN //\n\n/**\n* Tests if a value is an object; e.g., `{}`.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an object\n*\n* @example\n* var bool = isObject( {} );\n* // returns true\n*\n* @example\n* var bool = isObject( null );\n* // returns false\n*/\nfunction isObject( value ) {\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\t!isArray( value )\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isObject;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Tests if a value is a string primitive.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a string primitive\n*\n* @example\n* var bool = isString( 'beep' );\n* // returns true\n*\n* @example\n* var bool = isString( new String( 'beep' ) );\n* // returns false\n*/\nfunction isString( value ) {\n\treturn ( typeof value === 'string' );\n}\n\n\n// EXPORTS //\n\nexport default isString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// eslint-disable-next-line stdlib/no-redeclare\nvar valueOf = String.prototype.valueOf; // non-generic\n\n\n// EXPORTS //\n\nexport default valueOf;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport hasToStringTag from '@stdlib/assert-has-tostringtag-support';\nimport nativeClass from '@stdlib/utils-native-class';\nimport test from './try2valueof.js';\n\n\n// VARIABLES //\n\nvar FLG = hasToStringTag();\n\n\n// MAIN //\n\n/**\n* Tests if a value is a string object.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a string object\n*\n* @example\n* var bool = isString( new String( 'beep' ) );\n* // returns true\n*\n* @example\n* var bool = isString( 'beep' );\n* // returns false\n*/\nfunction isString( value ) {\n\tif ( typeof value === 'object' ) {\n\t\tif ( value instanceof String ) {\n\t\t\treturn true;\n\t\t}\n\t\tif ( FLG ) {\n\t\t\treturn test( value );\n\t\t}\n\t\treturn ( nativeClass( value ) === '[object String]' );\n\t}\n\treturn false;\n}\n\n\n// EXPORTS //\n\nexport default isString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport valueOf from './valueof.js'; // eslint-disable-line stdlib/no-redeclare\n\n\n// MAIN //\n\n/**\n* Attempts to extract a string value.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a string can be extracted\n*/\nfunction test( value ) {\n\ttry {\n\t\tvalueOf.call( value );\n\t\treturn true;\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\treturn false;\n\t}\n}\n\n\n// EXPORTS //\n\nexport default test;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a string.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a string\n*\n* @example\n* var bool = isString( new String( 'beep' ) );\n* // returns true\n*\n* @example\n* var bool = isString( 'beep' );\n* // returns true\n*/\nfunction isString( value ) {\n\treturn ( isPrimitive( value ) || isObject( value ) );\n}\n\n\n// EXPORTS //\n\nexport default isString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test if a value is a string.\n*\n* @module @stdlib/assert-is-string\n*\n* @example\n* import isString from '@stdlib/assert-is-string';\n*\n* var bool = isString( 'beep' );\n* // returns true\n*\n* bool = isString( new String( 'beep' ) );\n* // returns true\n*\n* bool = isString( 5 );\n* // returns false\n*\n* @example\n* import { isObject as isString } from '@stdlib/assert-is-string';\n*\n* var bool = isString( new String( 'beep' ) );\n* // returns true\n*\n* bool = isString( 'beep' );\n* // returns false\n*\n* @example\n* import { isPrimitive as isString } from '@stdlib/assert-is-string';\n*\n* var bool = isString( 'beep' );\n* // returns true\n*\n* bool = isString( new String( 'beep' ) );\n* // returns false\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'isPrimitive', isPrimitive );\nsetReadOnly( main, 'isObject', isObject );\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\nvar RE = /./;\n\n\n// EXPORTS //\n\nexport default RE;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Tests if a value is a boolean primitive.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a boolean primitive\n*\n* @example\n* var bool = isBoolean( true );\n* // returns true\n*\n* @example\n* var bool = isBoolean( false );\n* // returns true\n*\n* @example\n* import Boolean from '@stdlib/boolean-ctor';\n*\n* var bool = isBoolean( new Boolean( true ) );\n* // returns false\n*/\nfunction isBoolean( value ) {\n\treturn ( typeof value === 'boolean' );\n}\n\n\n// EXPORTS //\n\nexport default isBoolean;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Returns a boolean.\n*\n* @name Boolean\n* @constructor\n* @type {Function}\n* @param {*} value - input value\n* @returns {(boolean|Boolean)} boolean\n*\n* @example\n* var b = Boolean( null );\n* // returns false\n*\n* b = Boolean( [] );\n* // returns true\n*\n* b = Boolean( {} );\n* // returns true\n*\n* @example\n* var b = new Boolean( false );\n* // returns \n*/\nvar Bool = Boolean; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default Bool;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// eslint-disable-next-line stdlib/no-redeclare\nvar toString = Boolean.prototype.toString; // non-generic\n\n\n// EXPORTS //\n\nexport default toString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport hasToStringTag from '@stdlib/assert-has-tostringtag-support';\nimport nativeClass from '@stdlib/utils-native-class';\nimport Boolean from '@stdlib/boolean-ctor';\nimport test from './try2serialize.js';\n\n\n// VARIABLES //\n\nvar FLG = hasToStringTag();\n\n\n// MAIN //\n\n/**\n* Tests if a value is a boolean object.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a boolean object\n*\n* @example\n* var bool = isBoolean( true );\n* // returns false\n*\n* @example\n* import Boolean from '@stdlib/boolean-ctor';\n*\n* var bool = isBoolean( new Boolean( false ) );\n* // returns true\n*/\nfunction isBoolean( value ) {\n\tif ( typeof value === 'object' ) {\n\t\tif ( value instanceof Boolean ) {\n\t\t\treturn true;\n\t\t}\n\t\tif ( FLG ) {\n\t\t\treturn test( value );\n\t\t}\n\t\treturn ( nativeClass( value ) === '[object Boolean]' );\n\t}\n\treturn false;\n}\n\n\n// EXPORTS //\n\nexport default isBoolean;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport toString from './tostring.js'; // eslint-disable-line stdlib/no-redeclare\n\n\n// MAIN //\n\n/**\n* Attempts to serialize a value to a string.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value can be serialized\n*/\nfunction test( value ) {\n\ttry {\n\t\ttoString.call( value );\n\t\treturn true;\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\treturn false;\n\t}\n}\n\n\n// EXPORTS //\n\nexport default test;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a boolean.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a boolean\n*\n* @example\n* var bool = isBoolean( false );\n* // returns true\n*\n* @example\n* var bool = isBoolean( true );\n* // returns true\n*\n* @example\n* import Boolean from '@stdlib/boolean-ctor';\n*\n* var bool = isBoolean( new Boolean( false ) );\n* // returns true\n*\n* @example\n* import Boolean from '@stdlib/boolean-ctor';\n*\n* var bool = isBoolean( new Boolean( true ) );\n* // returns true\n*/\nfunction isBoolean( value ) {\n\treturn ( isPrimitive( value ) || isObject( value ) );\n}\n\n\n// EXPORTS //\n\nexport default isBoolean;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test if a value is a boolean.\n*\n* @module @stdlib/assert-is-boolean\n*\n* @example\n* import Boolean from '@stdlib/boolean-ctor';\n* import isBoolean from '@stdlib/assert-is-boolean';\n*\n* var bool = isBoolean( false );\n* // returns true\n*\n* bool = isBoolean( new Boolean( false ) );\n* // returns true\n*\n* @example\n* import Boolean from '@stdlib/boolean-ctor';\n* import { isPrimitive as isBoolean } from '@stdlib/assert-is-boolean';\n*\n* var bool = isBoolean( false );\n* // returns true\n*\n* bool = isBoolean( new Boolean( true ) );\n* // returns false\n*\n* @example\n* import Boolean from '@stdlib/boolean-ctor';\n* import { isObject as isBoolean } from '@stdlib/assert-is-boolean';\n*\n* var bool = isBoolean( true );\n* // returns false\n*\n* bool = isBoolean( new Boolean( false ) );\n* // returns true\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'isPrimitive', isPrimitive );\nsetReadOnly( main, 'isObject', isObject );\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar obj = ( typeof self === 'object' ) ? self : null;\n\n\n// EXPORTS //\n\nexport default obj;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar obj = ( typeof window === 'object' ) ? window : null;\n\n\n// EXPORTS //\n\nexport default obj;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar obj = ( typeof global === 'object' ) ? global : null;\n\n\n// EXPORTS //\n\nexport default obj;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar obj = ( typeof globalThis === 'object' ) ? globalThis : null; // eslint-disable-line no-undef\n\n\n// EXPORTS //\n\nexport default obj;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport getGlobal from '@stdlib/utils-global';\n\n\n// MAIN //\n\nvar root = getGlobal();\nvar nodeList = root.document && root.document.childNodes;\n\n\n// EXPORTS //\n\nexport default nodeList;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isBoolean } from '@stdlib/assert-is-boolean';\nimport format from '@stdlib/string-format';\nimport getThis from './codegen.js';\nimport Self from './self.js';\nimport Win from './window.js';\nimport Global from './global.js';\nimport GlobalThis from './global_this.js';\n\n\n// MAIN //\n\n/**\n* Returns the global object.\n*\n* ## Notes\n*\n* - Using code generation is the **most** reliable way to resolve the global object; however, doing so is likely to violate content security policies (CSPs) in, e.g., Chrome Apps and elsewhere.\n*\n* @param {boolean} [codegen=false] - boolean indicating whether to use code generation to resolve the global object\n* @throws {TypeError} must provide a boolean\n* @throws {Error} unable to resolve global object\n* @returns {Object} global object\n*\n* @example\n* var g = getGlobal();\n* // returns {...}\n*/\nfunction getGlobal( codegen ) {\n\tif ( arguments.length ) {\n\t\tif ( !isBoolean( codegen ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Must provide a boolean. Value: `%s`.', codegen ) );\n\t\t}\n\t\tif ( codegen ) {\n\t\t\treturn getThis();\n\t\t}\n\t\t// Fall through...\n\t}\n\t// Case: 2020 revision of ECMAScript standard\n\tif ( GlobalThis ) {\n\t\treturn GlobalThis;\n\t}\n\t// Case: browsers and web workers\n\tif ( Self ) {\n\t\treturn Self;\n\t}\n\t// Case: browsers\n\tif ( Win ) {\n\t\treturn Win;\n\t}\n\t// Case: Node.js\n\tif ( Global ) {\n\t\treturn Global;\n\t}\n\t// Case: unknown\n\tthrow new Error( 'unexpected error. Unable to resolve global object.' );\n}\n\n\n// EXPORTS //\n\nexport default getGlobal;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Returns the global object using code generation.\n*\n* @private\n* @returns {Object} global object\n*/\nfunction getGlobal() {\n\treturn new Function( 'return this;' )(); // eslint-disable-line no-new-func, stdlib/require-globals\n}\n\n\n// EXPORTS //\n\nexport default getGlobal;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\nvar typedarray = Int8Array; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default typedarray;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Returns a regular expression to capture everything that is not a space immediately after the `function` keyword and before the first left parenthesis.\n*\n* @returns {RegExp} regular expression\n*\n* @example\n* var RE_FUNCTION_NAME = reFunctionName();\n*\n* function fname( fcn ) {\n* return RE_FUNCTION_NAME.exec( fcn.toString() )[ 1 ];\n* }\n*\n* var fn = fname( Math.sqrt );\n* // returns 'sqrt'\n*\n* fn = fname( Int8Array );\n* // returns 'Int8Array'\n*\n* fn = fname( Object.prototype.toString );\n* // returns 'toString'\n*\n* fn = fname( function(){} );\n* // returns ''\n*/\nfunction reFunctionName() {\n\treturn /^\\s*function\\s*([^(]*)/i;\n}\n\n\n// EXPORTS //\n\nexport default reFunctionName;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport reFunctionName from './main.js';\n\n\n// MAIN //\n\n/**\n* Captures everything that is not a space immediately after the `function` keyword and before the first left parenthesis.\n*\n* Regular expression: `/^\\s*function\\s*([^(]*)/i`\n*\n* - `/^\\s*`\n* - Match zero or more spaces at beginning\n*\n* - `function`\n* - Match the word `function`\n*\n* - `\\s*`\n* - Match zero or more spaces after the word `function`\n*\n* - `()`\n* - Capture\n*\n* - `[^(]*`\n* - Match anything except a left parenthesis `(` zero or more times\n*\n* - `/i`\n* - ignore case\n*\n* @constant\n* @type {RegExp}\n* @default /^\\s*function\\s*([^(]*)/i\n*/\nvar RE_FUNCTION_NAME = reFunctionName();\n\n\n// EXPORTS //\n\nexport default RE_FUNCTION_NAME;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Tests if a value is object-like.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether a value is object-like\n*\n* @example\n* var bool = isObjectLike( {} );\n* // returns true\n*\n* @example\n* var bool = isObjectLike( [] );\n* // returns true\n*\n* @example\n* var bool = isObjectLike( null );\n* // returns false\n*/\nfunction isObjectLike( value ) {\n\treturn (\n\t\tvalue !== null &&\n\t\ttypeof value === 'object'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isObjectLike;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\nimport { REGEXP as RE } from '@stdlib/regexp-function-name';\nimport isBuffer from '@stdlib/assert-is-buffer';\n\n\n// MAIN //\n\n/**\n* Determines the name of a value's constructor.\n*\n* @param {*} v - input value\n* @returns {string} name of a value's constructor\n*\n* @example\n* var v = constructorName( 'a' );\n* // returns 'String'\n*\n* @example\n* var v = constructorName( 5 );\n* // returns 'Number'\n*\n* @example\n* var v = constructorName( null );\n* // returns 'Null'\n*\n* @example\n* var v = constructorName( undefined );\n* // returns 'Undefined'\n*\n* @example\n* var v = constructorName( function noop() {} );\n* // returns 'Function'\n*/\nfunction constructorName( v ) {\n\tvar match;\n\tvar name;\n\tvar ctor;\n\tname = nativeClass( v ).slice( 8, -1 );\n\tif ( (name === 'Object' || name === 'Error') && v.constructor ) {\n\t\tctor = v.constructor;\n\t\tif ( typeof ctor.name === 'string' ) {\n\t\t\treturn ctor.name;\n\t\t}\n\t\tmatch = RE.exec( ctor.toString() );\n\t\tif ( match ) {\n\t\t\treturn match[ 1 ];\n\t\t}\n\t}\n\tif ( isBuffer( v ) ) {\n\t\treturn 'Buffer';\n\t}\n\treturn name;\n}\n\n\n// EXPORTS //\n\nexport default constructorName;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isObjectLike from '@stdlib/assert-is-object-like';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Buffer instance.\n*\n* @param {*} value - value to validate\n* @returns {boolean} boolean indicating if a value is a Buffer instance\n*\n* @example\n* var v = isBuffer( new Buffer( 'beep' ) );\n* // returns true\n*\n* @example\n* var v = isBuffer( new Buffer( [1,2,3,4] ) );\n* // returns true\n*\n* @example\n* var v = isBuffer( {} );\n* // returns false\n*\n* @example\n* var v = isBuffer( [] );\n* // returns false\n*/\nfunction isBuffer( value ) {\n\treturn (\n\t\tisObjectLike( value ) &&\n\t\t(\n\t\t\t// eslint-disable-next-line no-underscore-dangle\n\t\t\tvalue._isBuffer || // for envs missing Object.prototype.constructor (e.g., Safari 5-7)\n\t\t\t(\n\t\t\t\tvalue.constructor &&\n\n\t\t\t\t// WARNING: `typeof` is not a foolproof check, as certain envs consider RegExp and NodeList instances to be functions\n\t\t\t\ttypeof value.constructor.isBuffer === 'function' &&\n\t\t\t\tvalue.constructor.isBuffer( value )\n\t\t\t)\n\t\t)\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isBuffer;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Regular expression to capture everything that is not a space immediately after the `function` keyword and before the first left parenthesis.\n*\n* @module @stdlib/regexp-function-name\n*\n* @example\n* import reFunctionName from '@stdlib/regexp-function-name';\n* var RE_FUNCTION_NAME = reFunctionName();\n*\n* function fname( fcn ) {\n* return RE_FUNCTION_NAME.exec( fcn.toString() )[ 1 ];\n* }\n*\n* var fn = fname( Math.sqrt );\n* // returns 'sqrt'\n*\n* fn = fname( Int8Array );\n* // returns 'Int8Array'\n*\n* fn = fname( Object.prototype.toString );\n* // returns 'toString'\n*\n* fn = fname( function(){} );\n* // returns ''\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport REGEXP from './regexp.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'REGEXP', REGEXP );\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test if a value is object-like.\n*\n* @module @stdlib/assert-is-object-like\n*\n* @example\n* import isObjectLike from '@stdlib/assert-is-object-like';\n*\n* var bool = isObjectLike( {} );\n* // returns true\n*\n* bool = isObjectLike( [] );\n* // returns true\n*\n* bool = isObjectLike( null );\n* // returns false\n*\n* @example\n* import { isObjectLikeArray as isObjectLike } from '@stdlib/assert-is-object-like';\n*\n* var bool = isObjectLike( [ {}, [] ] );\n* // returns true\n*\n* bool = isObjectLike( [ {}, '3.0' ] );\n* // returns false\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport arrayfun from '@stdlib/assert-tools-array-function';\nimport main from './main.js';\n\n\n// VARIABLES //\n\nvar isObjectLikeArray = arrayfun( main );\n\n\n// MAIN //\n\nsetReadOnly( main, 'isObjectLikeArray', isObjectLikeArray );\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isArray from '@stdlib/assert-is-array';\nimport format from '@stdlib/string-format';\n\n\n// MAIN //\n\n/**\n* Returns a function which tests if every element in an array passes a test condition.\n*\n* @param {Function} predicate - function to apply\n* @throws {TypeError} must provide a function\n* @returns {Function} an array function\n*\n* @example\n* import isOdd from '@stdlib/assert-is-odd';\n*\n* var arr1 = [ 1, 3, 5, 7 ];\n* var arr2 = [ 3, 5, 8 ];\n*\n* var validate = arrayfcn( isOdd );\n*\n* var bool = validate( arr1 );\n* // returns true\n*\n* bool = validate( arr2 );\n* // returns false\n*/\nfunction arrayfcn( predicate ) {\n\tif ( typeof predicate !== 'function' ) {\n\t\tthrow new TypeError( format( 'invalid argument. Must provide a function. Value: `%s`.', predicate ) );\n\t}\n\treturn every;\n\n\t/**\n\t* Tests if every element in an array passes a test condition.\n\t*\n\t* @private\n\t* @param {*} value - value to test\n\t* @returns {boolean} boolean indicating whether a value is an array for which all elements pass a test condition\n\t*/\n\tfunction every( value ) {\n\t\tvar len;\n\t\tvar i;\n\t\tif ( !isArray( value ) ) {\n\t\t\treturn false;\n\t\t}\n\t\tlen = value.length;\n\t\tif ( len === 0 ) {\n\t\t\treturn false;\n\t\t}\n\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\tif ( predicate( value[ i ] ) === false ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}\n}\n\n\n// EXPORTS //\n\nexport default arrayfcn;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Determine a value's type.\n*\n* @module @stdlib/utils-type-of\n*\n* @example\n* import typeOf from '@stdlib/utils-type-of';\n*\n* var str = typeOf( 'a' );\n* // returns 'string'\n*\n* str = typeOf( 5 );\n* // returns 'number'\n*/\n\n// MODULES //\n\nimport usePolyfill from './check.js';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar main = ( usePolyfill() ) ? polyfill : builtin;\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport RE from './fixtures/re.js';\nimport nodeList from './fixtures/nodelist.js';\nimport typedarray from './fixtures/typedarray.js';\n\n\n// MAIN //\n\n/**\n* Checks whether a polyfill is needed when using the `typeof` operator.\n*\n* @private\n* @returns {boolean} boolean indicating whether a polyfill is needed\n*/\nfunction check() {\n\tif (\n\t\t// Chrome 1-12 returns 'function' for regular expression instances (see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/typeof):\n\t\ttypeof RE === 'function' ||\n\n\t\t// Safari 8 returns 'object' for typed array and weak map constructors (underscore #1929):\n\t\ttypeof typedarray === 'object' ||\n\n\t\t// PhantomJS 1.9 returns 'function' for `NodeList` instances (underscore #2236):\n\t\ttypeof nodeList === 'function'\n\t) {\n\t\treturn true;\n\t}\n\treturn false;\n}\n\n\n// EXPORTS //\n\nexport default check;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport ctorName from '@stdlib/utils-constructor-name';\n\n\n// MAIN //\n\n/**\n* Determines a value's type.\n*\n* @param {*} v - input value\n* @returns {string} string indicating the value's type\n*/\nfunction typeOf( v ) {\n\treturn ctorName( v ).toLowerCase();\n}\n\n\n// EXPORTS //\n\nexport default typeOf;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport ctorName from '@stdlib/utils-constructor-name';\n\n\n// NOTES //\n\n/*\n* Built-in `typeof` operator behavior:\n*\n* ```text\n* typeof null => 'object'\n* typeof undefined => 'undefined'\n* typeof 'a' => 'string'\n* typeof 5 => 'number'\n* typeof NaN => 'number'\n* typeof true => 'boolean'\n* typeof false => 'boolean'\n* typeof {} => 'object'\n* typeof [] => 'object'\n* typeof function foo(){} => 'function'\n* typeof function* foo(){} => 'object'\n* typeof Symbol() => 'symbol'\n* ```\n*\n*/\n\n\n// MAIN //\n\n/**\n* Determines a value's type.\n*\n* @param {*} v - input value\n* @returns {string} string indicating the value's type\n*/\nfunction typeOf( v ) {\n\tvar type;\n\n\t// Address `typeof null` => `object` (see http://wiki.ecmascript.org/doku.php?id=harmony:typeof_null):\n\tif ( v === null ) {\n\t\treturn 'null';\n\t}\n\ttype = typeof v;\n\n\t// If the `typeof` operator returned something other than `object`, we are done. Otherwise, we need to check for an internal class name or search for a constructor.\n\tif ( type === 'object' ) {\n\t\treturn ctorName( v ).toLowerCase();\n\t}\n\treturn type;\n}\n\n\n// EXPORTS //\n\nexport default typeOf;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport typeOf from '@stdlib/utils-type-of';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a function.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a function\n*\n* @example\n* function beep() {\n* return 'beep';\n* }\n*\n* var bool = isFunction( beep );\n* // returns true\n*/\nfunction isFunction( value ) {\n\t// Note: cannot use `typeof` directly, as various browser engines incorrectly return `'function'` when operating on non-function objects, such as regular expressions and NodeLists.\n\treturn ( typeOf( value ) === 'function' );\n}\n\n\n// EXPORTS //\n\nexport default isFunction;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isNumber } from '@stdlib/assert-is-number';\nimport defineProperty from '@stdlib/utils-define-property';\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport format from '@stdlib/string-format';\nimport toStr from './tostring.js';\nimport toJSON from './tojson.js';\n\n\n// MAIN //\n\n/**\n* 128-bit complex number constructor.\n*\n* @constructor\n* @param {number} real - real component\n* @param {number} imag - imaginary component\n* @throws {TypeError} must invoke using the `new` keyword\n* @throws {TypeError} real component must be a number\n* @throws {TypeError} imaginary component must be a number\n* @returns {Complex128} 128-bit complex number\n*\n* @example\n* var z = new Complex128( 5.0, 3.0 );\n* // returns \n*/\nfunction Complex128( real, imag ) {\n\tif ( !( this instanceof Complex128 ) ) {\n\t\tthrow new TypeError( 'invalid invocation. Constructor must be called with the `new` keyword.' );\n\t}\n\tif ( !isNumber( real ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Real component must be a number. Value: `%s`.', real ) );\n\t}\n\tif ( !isNumber( imag ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Imaginary component must be a number. Value: `%s`.', imag ) );\n\t}\n\tdefineProperty( this, 're', {\n\t\t'configurable': false,\n\t\t'enumerable': true,\n\t\t'writable': false,\n\t\t'value': real\n\t});\n\tdefineProperty( this, 'im', {\n\t\t'configurable': false,\n\t\t'enumerable': true,\n\t\t'writable': false,\n\t\t'value': imag\n\t});\n\treturn this;\n}\n\n/**\n* Size (in bytes) of each component.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex128\n* @type {integer}\n* @returns {integer} size of each component\n*\n* @example\n* var nbytes = Complex128.BYTES_PER_ELEMENT;\n* // returns 8\n*/\nsetReadOnly( Complex128, 'BYTES_PER_ELEMENT', 8 );\n\n/**\n* Size (in bytes) of each component.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex128.prototype\n* @type {integer}\n* @returns {integer} size of each component\n*\n* @example\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var nbytes = z.BYTES_PER_ELEMENT;\n* // returns 8\n*/\nsetReadOnly( Complex128.prototype, 'BYTES_PER_ELEMENT', 8 );\n\n/**\n* Length (in bytes) of a complex number.\n*\n* @name byteLength\n* @memberof Complex128.prototype\n* @type {integer}\n* @returns {integer} byte length\n*\n* @example\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var nbytes = z.byteLength;\n* // returns 16\n*/\nsetReadOnly( Complex128.prototype, 'byteLength', 16 );\n\n/**\n* Serializes a complex number as a string.\n*\n* @name toString\n* @memberof Complex128.prototype\n* @type {Function}\n* @returns {string} serialized complex number\n*\n* @example\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var str = z.toString();\n* // returns '5 + 3i'\n*/\nsetReadOnly( Complex128.prototype, 'toString', toStr );\n\n/**\n* Serializes a complex number as a JSON object.\n*\n* ## Notes\n*\n* - `JSON.stringify()` implicitly calls this method when stringifying a `Complex128` instance.\n*\n* @name toJSON\n* @memberof Complex128.prototype\n* @type {Function}\n* @returns {Object} serialized complex number\n*\n* @example\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var obj = z.toJSON();\n* // returns { 'type': 'Complex128', 're': 5.0, 'im': 3.0 }\n*/\nsetReadOnly( Complex128.prototype, 'toJSON', toJSON );\n\n\n// EXPORTS //\n\nexport default Complex128;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Serializes a complex number as a string.\n*\n* @private\n* @returns {string} serialized complex number\n*/\nfunction toString() { // eslint-disable-line stdlib/no-redeclare\n\t/* eslint-disable no-invalid-this */\n\tvar str = '' + this.re;\n\tif ( this.im < 0 ) {\n\t\tstr += ' - ' + (-this.im);\n\t} else {\n\t\tstr += ' + ' + this.im;\n\t}\n\tstr += 'i';\n\treturn str;\n}\n\n\n// EXPORTS //\n\nexport default toString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Serializes a complex number as a JSON object.\n*\n* @private\n* @returns {Object} JSON representation\n*/\nfunction toJSON() {\n\t/* eslint-disable no-invalid-this */\n\tvar out = {};\n\tout.type = 'Complex128';\n\tout.re = this.re;\n\tout.im = this.im;\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default toJSON;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar fround = ( typeof Math.fround === 'function' ) ? Math.fround : null; // eslint-disable-line stdlib/no-builtin-math\n\n\n// EXPORTS //\n\nexport default fround;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport Float32Array from '@stdlib/array-float32';\n\n\n// VARIABLES //\n\nvar FLOAT32_VIEW = new Float32Array( 1 );\n\n\n// MAIN //\n\n/**\n* Converts a double-precision floating-point number to the nearest single-precision floating-point number.\n*\n* @param {number} x - double-precision floating-point number\n* @returns {number} nearest single-precision floating-point number\n*\n* @example\n* var y = float64ToFloat32( 1.337 );\n* // returns 1.3370000123977661\n*/\nfunction float64ToFloat32( x ) {\n\tFLOAT32_VIEW[ 0 ] = x;\n\treturn FLOAT32_VIEW[ 0 ];\n}\n\n\n// EXPORTS //\n\nexport default float64ToFloat32;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Convert a double-precision floating-point number to the nearest single-precision floating-point number.\n*\n* @module @stdlib/number-float64-base-to-float32\n*\n* @example\n* import float64ToFloat32 from '@stdlib/number-float64-base-to-float32';\n*\n* var y = float64ToFloat32( 1.337 );\n* // returns 1.3370000123977661\n*/\n\n// MODULES //\n\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar float64ToFloat32;\nif ( typeof builtin === 'function' ) {\n\tfloat64ToFloat32 = builtin;\n} else {\n\tfloat64ToFloat32 = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default float64ToFloat32;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isNumber } from '@stdlib/assert-is-number';\nimport defineProperty from '@stdlib/utils-define-property';\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport float64ToFloat32 from '@stdlib/number-float64-base-to-float32';\nimport format from '@stdlib/string-format';\nimport toStr from './tostring.js';\nimport toJSON from './tojson.js';\n\n\n// MAIN //\n\n/**\n* 64-bit complex number constructor.\n*\n* @constructor\n* @param {number} real - real component\n* @param {number} imag - imaginary component\n* @throws {TypeError} must invoke using the `new` keyword\n* @throws {TypeError} real component must be a number\n* @throws {TypeError} imaginary component must be a number\n* @returns {Complex64} 64-bit complex number\n*\n* @example\n* var z = new Complex64( 5.0, 3.0 );\n* // returns \n*/\nfunction Complex64( real, imag ) {\n\tif ( !( this instanceof Complex64 ) ) {\n\t\tthrow new TypeError( 'invalid invocation. Constructor must be called with the `new` keyword.' );\n\t}\n\tif ( !isNumber( real ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Real component must be a number. Value: `%s`.', real ) );\n\t}\n\tif ( !isNumber( imag ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Imaginary component must be a number. Value: `%s`.', imag ) );\n\t}\n\tdefineProperty( this, 're', {\n\t\t'configurable': false,\n\t\t'enumerable': true,\n\t\t'writable': false,\n\t\t'value': float64ToFloat32( real )\n\t});\n\tdefineProperty( this, 'im', {\n\t\t'configurable': false,\n\t\t'enumerable': true,\n\t\t'writable': false,\n\t\t'value': float64ToFloat32( imag )\n\t});\n\treturn this;\n}\n\n/**\n* Size (in bytes) of each component.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex64\n* @type {integer}\n* @returns {integer} size of each component\n*\n* @example\n* var nbytes = Complex64.BYTES_PER_ELEMENT;\n* // returns 4\n*/\nsetReadOnly( Complex64, 'BYTES_PER_ELEMENT', 4 );\n\n/**\n* Size (in bytes) of each component.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex64.prototype\n* @type {integer}\n* @returns {integer} size of each component\n*\n* @example\n* var z = new Complex64( 5.0, 3.0 );\n*\n* var nbytes = z.BYTES_PER_ELEMENT;\n* // returns 4\n*/\nsetReadOnly( Complex64.prototype, 'BYTES_PER_ELEMENT', 4 );\n\n/**\n* Length (in bytes) of a complex number.\n*\n* @name byteLength\n* @memberof Complex64.prototype\n* @type {integer}\n* @returns {integer} byte length\n*\n* @example\n* var z = new Complex64( 5.0, 3.0 );\n*\n* var nbytes = z.byteLength;\n* // returns 8\n*/\nsetReadOnly( Complex64.prototype, 'byteLength', 8 );\n\n/**\n* Serializes a complex number as a string.\n*\n* @name toString\n* @memberof Complex64.prototype\n* @type {Function}\n* @returns {string} serialized complex number\n*\n* @example\n* var z = new Complex64( 5.0, 3.0 );\n*\n* var str = z.toString();\n* // returns '5 + 3i'\n*/\nsetReadOnly( Complex64.prototype, 'toString', toStr );\n\n/**\n* Serializes a complex number as a JSON object.\n*\n* ## Notes\n*\n* - `JSON.stringify()` implicitly calls this method when stringifying a `Complex64` instance.\n*\n* @name toJSON\n* @memberof Complex64.prototype\n* @type {Function}\n* @returns {Object} serialized complex number\n*\n* @example\n* var z = new Complex64( 5.0, 3.0 );\n*\n* var obj = z.toJSON();\n* // returns { 'type': 'Complex64', 're': 5.0, 'im': 3.0 }\n*/\nsetReadOnly( Complex64.prototype, 'toJSON', toJSON );\n\n\n// EXPORTS //\n\nexport default Complex64;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport Complex128 from '@stdlib/complex-float64';\nimport Complex64 from '@stdlib/complex-float32';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a complex number-like object.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a complex number-like object.\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n* import Complex64 from '@stdlib/complex-float32';\n*\n* var x = new Complex128( 4.0, 2.0 );\n* var bool = isComplexLike( x );\n* // returns true\n*\n* x = new Complex64( 4.0, 2.0 );\n* bool = isComplexLike( x );\n* // returns true\n*/\nfunction isComplexLike( value ) {\n\tif ( value instanceof Complex128 || value instanceof Complex64 ) {\n\t\treturn true;\n\t}\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\ttypeof value.re === 'number' &&\n\t\ttypeof value.im === 'number'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isComplexLike;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isInteger from '@stdlib/math-base-assert-is-integer';\n\n\n// MAIN //\n\n/**\n* Tests if a finite numeric value is an even number.\n*\n* @param {number} x - value to test\n* @returns {boolean} boolean indicating whether the value is an even number\n*\n* @example\n* var bool = isEven( 5.0 );\n* // returns false\n*\n* @example\n* var bool = isEven( -2.0 );\n* // returns true\n*\n* @example\n* var bool = isEven( 0.0 );\n* // returns true\n*\n* @example\n* var bool = isEven( NaN );\n* // returns false\n*/\nfunction isEven( x ) {\n\treturn isInteger( x/2.0 );\n}\n\n\n// EXPORTS //\n\nexport default isEven;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Serializes a complex number as a string.\n*\n* @private\n* @returns {string} serialized complex number\n*/\nfunction toString() { // eslint-disable-line stdlib/no-redeclare\n\t/* eslint-disable no-invalid-this */\n\tvar str = '' + this.re;\n\tif ( this.im < 0 ) {\n\t\tstr += ' - ' + (-this.im);\n\t} else {\n\t\tstr += ' + ' + this.im;\n\t}\n\tstr += 'i';\n\treturn str;\n}\n\n\n// EXPORTS //\n\nexport default toString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Serializes a complex number as a JSON object.\n*\n* @private\n* @returns {Object} JSON representation\n*/\nfunction toJSON() {\n\t/* eslint-disable no-invalid-this */\n\tvar out = {};\n\tout.type = 'Complex64';\n\tout.re = this.re;\n\tout.im = this.im;\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default toJSON;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// VARIABLES //\n\nvar BYTES_PER_ELEMENT = 8; // 4 bytes per float32 x (1 real + 1 imag component)\n\n\n// MAIN //\n\n/**\n* Returns a boolean indicating if a value is a `Complex64Array`.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a `Complex64Array`\n*\n* @example\n* import Complex64Array from '@stdlib/array-complex64';\n*\n* var bool = isComplex64Array( new Complex64Array( 10 ) );\n* // returns true\n*\n* bool = isComplex64Array( [] );\n* // returns false\n*/\nfunction isComplex64Array( value ) {\n\t// Note: the following is not robust and that is intentional. In this case, we are seeking a lower cost way to reasonably determine whether an input value is a `Complex64Array` in order to avoid walking the prototype chain and resolving constructors, which is necessary for robust identification of cross-realm instances. For more robust validation, see `@stdlib/assert/is-complex64array`.\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\tvalue.constructor.name === 'Complex64Array' &&\n\t\tvalue.BYTES_PER_ELEMENT === BYTES_PER_ELEMENT\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isComplex64Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// VARIABLES //\n\nvar BYTES_PER_ELEMENT = 16; // 8 bytes per float64 x (1 real + 1 imag component)\n\n\n// MAIN //\n\n/**\n* Returns a boolean indicating if a value is a `Complex128Array`.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a `Complex128Array`\n*\n* @example\n* import Complex128Array from '@stdlib/array-complex128';\n*\n* var bool = isComplex128Array( new Complex128Array( 10 ) );\n* // returns true\n*\n* bool = isComplex128Array( [] );\n* // returns false\n*/\nfunction isComplex128Array( value ) {\n\t// Note: the following is not robust and that is intentional. In this case, we are seeking a lower cost way to reasonably determine whether an input value is a `Complex128Array` in order to avoid walking the prototype chain and resolving constructors, which is necessary for robust identification of cross-realm instances. For more robust validation, see `@stdlib/assert/is-complex128array`.\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\tvalue.constructor.name === 'Complex128Array' &&\n\t\tvalue.BYTES_PER_ELEMENT === BYTES_PER_ELEMENT\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isComplex128Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport hasOwnProp from '@stdlib/assert-has-own-property';\nimport Symbol from '@stdlib/symbol-ctor';\n\n\n// MAIN //\n\n/**\n* Tests for native `Symbol.iterator` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Symbol.iterator` support\n*\n* @example\n* var bool = hasIteratorSymbolSupport();\n* // returns \n*/\nfunction hasIteratorSymbolSupport() {\n\treturn (\n\t\ttypeof Symbol === 'function' &&\n\t\ttypeof Symbol( 'foo' ) === 'symbol' &&\n\t\thasOwnProp( Symbol, 'iterator' ) &&\n\t\ttypeof Symbol.iterator === 'symbol'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default hasIteratorSymbolSupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport hasIteratorSymbolSupport from '@stdlib/assert-has-iterator-symbol-support';\n\n\n// MAIN //\n\n/**\n* Iterator symbol.\n*\n* @name IteratorSymbol\n* @constant\n* @type {(symbol|null)}\n*\n* @example\n* function iterator() {\n* var it;\n* var i;\n*\n* i = -1;\n*\n* it = {};\n* it.next = next;\n* it.return = done;\n*\n* if ( IteratorSymbol ) {\n* it[ IteratorSymbol ] = iterator;\n* }\n* return it;\n*\n* function next() {\n* i += 1;\n* return {\n* 'value': i,\n* 'done': false\n* };\n* }\n*\n* function done( value ) {\n* if ( arguments.length === 0 ) {\n* return {\n* 'done': true\n* };\n* }\n* return {\n* 'value': value,\n* 'done': true\n* };\n* }\n* }\n*\n* var obj = iterator();\n*/\nvar IteratorSymbol = ( hasIteratorSymbolSupport() ) ? Symbol.iterator : null;\n\n\n// EXPORTS //\n\nexport default IteratorSymbol;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport defineProperty from '@stdlib/utils-define-property';\n\n\n// MAIN //\n\n/**\n* Defines a non-enumerable read-only accessor.\n*\n* @param {Object} obj - object on which to define the property\n* @param {(string|symbol)} prop - property name\n* @param {Function} getter - accessor\n*\n* @example\n* function getter() {\n* return 'bar';\n* }\n*\n* var obj = {};\n*\n* setNonEnumerableReadOnlyAccessor( obj, 'foo', getter );\n*\n* try {\n* obj.foo = 'boop';\n* } catch ( err ) {\n* console.error( err.message );\n* }\n*/\nfunction setNonEnumerableReadOnlyAccessor( obj, prop, getter ) { // eslint-disable-line id-length\n\tdefineProperty( obj, prop, {\n\t\t'configurable': false,\n\t\t'enumerable': false,\n\t\t'get': getter\n\t});\n}\n\n\n// EXPORTS //\n\nexport default setNonEnumerableReadOnlyAccessor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Returns the real component of a single-precision complex floating-point number.\n*\n* @param {Complex} z - complex number\n* @returns {number} real component\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n*\n* var z = new Complex64( 5.0, 3.0 );\n*\n* var re = realf( z );\n* // returns 5.0\n*/\nfunction realf( z ) {\n\treturn z.re;\n}\n\n\n// EXPORTS //\n\nexport default realf;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Returns the imaginary component of a single-precision complex floating-point number.\n*\n* @param {Complex} z - complex number\n* @returns {number} imaginary component\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n*\n* var z = new Complex64( 5.0, 3.0 );\n*\n* var im = imagf( z );\n* // returns 3.0\n*/\nfunction imagf( z ) {\n\treturn z.im;\n}\n\n\n// EXPORTS //\n\nexport default imagf;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport Float32Array from '@stdlib/array-float32';\n\n\n// MAIN //\n\n/**\n* Reinterprets a `Complex64Array` as a `Float32Array`.\n*\n* @param {Complex64Array} x - input array\n* @param {NonNegativeInteger} offset - starting index\n* @returns {Float32Array} `Float32Array` view\n*\n* @example\n* import Complex64Array from '@stdlib/array-complex64';\n*\n* var x = new Complex64Array( 10 );\n*\n* var out = reinterpret( x, 0 );\n* // returns \n*\n* var bool = ( out.buffer === x.buffer );\n* // returns true\n*/\nfunction reinterpret( x, offset ) {\n\treturn new Float32Array( x.buffer, x.byteOffset+(x.BYTES_PER_ELEMENT*offset), 2*(x.length-offset) ); // eslint-disable-line max-len\n}\n\n\n// EXPORTS //\n\nexport default reinterpret;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport Float64Array from '@stdlib/array-float64';\n\n\n// MAIN //\n\n/**\n* Reinterprets a `Complex128Array` as a `Float64Array`.\n*\n* @param {Complex128Array} x - input array\n* @param {NonNegativeInteger} offset - starting index\n* @returns {Float64Array} `Float64Array` view\n*\n* @example\n* import Complex128Array from '@stdlib/array-complex128';\n*\n* var x = new Complex128Array( 10 );\n*\n* var out = reinterpret( x, 0 );\n* // returns \n*\n* var bool = ( out.buffer === x.buffer );\n* // returns true\n*/\nfunction reinterpret( x, offset ) {\n\treturn new Float64Array( x.buffer, x.byteOffset+(x.BYTES_PER_ELEMENT*offset), 2*(x.length-offset) ); // eslint-disable-line max-len\n}\n\n\n// EXPORTS //\n\nexport default reinterpret;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// VARIABLES //\n\nvar GETTERS = {\n\t'float64': getFloat64,\n\t'float32': getFloat32,\n\t'int32': getInt32,\n\t'int16': getInt16,\n\t'int8': getInt8,\n\t'uint32': getUint32,\n\t'uint16': getUint16,\n\t'uint8': getUint8,\n\t'uint8c': getUint8c,\n\t'generic': getGeneric,\n\t'default': getArrayLike\n};\n\n\n// FUNCTIONS //\n\n/**\n* Returns an element from a `Float64Array`.\n*\n* @private\n* @param {Float64Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n*\n* var arr = new Float64Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getFloat64( arr, 2 );\n* // returns 3.0\n*/\nfunction getFloat64( arr, idx ) {\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from a `Float32Array`.\n*\n* @private\n* @param {Float32Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Float32Array from '@stdlib/array-float32';\n*\n* var arr = new Float32Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getFloat32( arr, 2 );\n* // returns 3.0\n*/\nfunction getFloat32( arr, idx ) {\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from an `Int32Array`.\n*\n* @private\n* @param {Int32Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Int32Array from '@stdlib/array-int32';\n*\n* var arr = new Int32Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getInt32( arr, 2 );\n* // returns 3\n*/\nfunction getInt32( arr, idx ) { // eslint-disable-line stdlib/jsdoc-doctest-decimal-point\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from an `Int16Array`.\n*\n* @private\n* @param {Int16Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Int16Array from '@stdlib/array-int16';\n*\n* var arr = new Int16Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getInt16( arr, 2 );\n* // returns 3\n*/\nfunction getInt16( arr, idx ) { // eslint-disable-line stdlib/jsdoc-doctest-decimal-point\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from an `Int8Array`.\n*\n* @private\n* @param {Int8Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Int8Array from '@stdlib/array-int8';\n*\n* var arr = new Int8Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getInt8( arr, 2 );\n* // returns 3\n*/\nfunction getInt8( arr, idx ) { // eslint-disable-line stdlib/jsdoc-doctest-decimal-point\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from a `Uint32Array`.\n*\n* @private\n* @param {Uint32Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Uint32Array from '@stdlib/array-uint32';\n*\n* var arr = new Uint32Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getUint32( arr, 2 );\n* // returns 3\n*/\nfunction getUint32( arr, idx ) { // eslint-disable-line stdlib/jsdoc-doctest-decimal-point\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from a `Uint16Array`.\n*\n* @private\n* @param {Uint16Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Uint16Array from '@stdlib/array-uint16';\n*\n* var arr = new Uint16Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getUint16( arr, 2 );\n* // returns 3\n*/\nfunction getUint16( arr, idx ) { // eslint-disable-line stdlib/jsdoc-doctest-decimal-point\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from a `Uint8Array`.\n*\n* @private\n* @param {Uint8Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Uint8Array from '@stdlib/array-uint8';\n*\n* var arr = new Uint8Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getUint8( arr, 2 );\n* // returns 3\n*/\nfunction getUint8( arr, idx ) { // eslint-disable-line stdlib/jsdoc-doctest-decimal-point\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from a `Uint8ClampedArray`.\n*\n* @private\n* @param {Uint8ClampedArray} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Uint8ClampedArray from '@stdlib/array-uint8c';\n*\n* var arr = new Uint8ClampedArray( [ 1, 2, 3, 4 ] );\n*\n* var v = getUint8c( arr, 2 );\n* // returns 3\n*/\nfunction getUint8c( arr, idx ) { // eslint-disable-line stdlib/jsdoc-doctest-decimal-point\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from a generic `Array`.\n*\n* @private\n* @param {Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {*} element value\n*\n* @example\n* var arr = [ 1, 2, 3, 4 ];\n*\n* var v = getGeneric( arr, 2 );\n* // returns 3\n*/\nfunction getGeneric( arr, idx ) {\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from an indexed array-like object.\n*\n* @private\n* @param {Collection} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {*} element value\n*\n* @example\n* var arr = [ 1, 2, 3, 4 ];\n*\n* var v = getArrayLike( arr, 2 );\n* // returns 3\n*/\nfunction getArrayLike( arr, idx ) {\n\treturn arr[ idx ];\n}\n\n\n// MAIN //\n\n/**\n* Returns an accessor function for retrieving an element from an indexed array-like object.\n*\n* @param {string} dtype - array dtype\n* @returns {Function} accessor\n*\n* @example\n* import dtype from '@stdlib/array-dtype';\n*\n* var arr = [ 1, 2, 3, 4 ];\n*\n* var get = getter( dtype( arr ) );\n* var v = get( arr, 2 );\n* // returns 3\n*/\nfunction getter( dtype ) {\n\tvar f = GETTERS[ dtype ];\n\tif ( typeof f === 'function' ) {\n\t\treturn f;\n\t}\n\treturn GETTERS.default;\n}\n\n\n// EXPORTS //\n\nexport default getter;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// VARIABLES //\n\nvar GETTERS = {\n\t'complex128': getComplex128,\n\t'complex64': getComplex64,\n\t'default': getArrayLike\n};\n\n\n// FUNCTIONS //\n\n/**\n* Returns an element from a `Complex128Array`.\n*\n* @private\n* @param {Complex128Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Complex128Array from '@stdlib/array-complex128';\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* var arr = new Complex128Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getComplex128( arr, 1 );\n* // returns \n*\n* var re = real( v );\n* // returns 3.0\n*\n* var im = imag( v );\n* // returns 4.0\n*/\nfunction getComplex128( arr, idx ) {\n\treturn arr.get( idx );\n}\n\n/**\n* Returns an element from a `Complex64Array`.\n*\n* @private\n* @param {Complex64Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Complex64Array from '@stdlib/array-complex64';\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* var arr = new Complex64Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getComplex64( arr, 1 );\n* // returns \n*\n* var re = realf( v );\n* // returns 3.0\n*\n* var im = imagf( v );\n* // returns 4.0\n*/\nfunction getComplex64( arr, idx ) {\n\treturn arr.get( idx );\n}\n\n/**\n* Returns an element from an array-like object supporting the get/set protocol.\n*\n* @private\n* @param {Collection} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {*} element value\n*\n* @example\n* var arr = [ 1, 2, 3, 4 ];\n*\n* function get( idx ) {\n* return arr[ idx ];\n* }\n*\n* function set( value, idx ) {\n* arr[ idx ] = value;\n* }\n*\n* arr.get = get;\n* arr.set = set;\n*\n* var v = getArrayLike( arr, 2 );\n* // returns 3\n*/\nfunction getArrayLike( arr, idx ) {\n\treturn arr.get( idx );\n}\n\n\n// MAIN //\n\n/**\n* Returns an accessor function for retrieving an element from an array-like object supporting the get/set protocol.\n*\n* @param {string} dtype - array dtype\n* @returns {Function} accessor\n*\n* @example\n* import Complex64Array from '@stdlib/array-complex64';\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n* import dtype from '@stdlib/array-dtype';\n*\n* var arr = new Complex64Array( [ 1, 2, 3, 4 ] );\n*\n* var get = getter( dtype( arr ) );\n* var v = get( arr, 1 );\n* // returns \n*\n* var re = realf( v );\n* // returns 3.0\n*\n* var im = imagf( v );\n* // returns 4.0\n*/\nfunction getter( dtype ) {\n\tvar f = GETTERS[ dtype ];\n\tif ( typeof f === 'function' ) {\n\t\treturn f;\n\t}\n\treturn GETTERS.default;\n}\n\n\n// EXPORTS //\n\nexport default getter;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isArrayLikeObject from '@stdlib/assert-is-array-like-object';\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport realf from '@stdlib/complex-realf';\nimport imagf from '@stdlib/complex-imagf';\nimport format from '@stdlib/string-format';\n\n\n// MAIN //\n\n/**\n* Returns an array of iterated values.\n*\n* @private\n* @param {Object} it - iterator\n* @returns {(Array|TypeError)} array or an error\n*/\nfunction fromIterator( it ) {\n\tvar out;\n\tvar v;\n\tvar z;\n\n\tout = [];\n\twhile ( true ) {\n\t\tv = it.next();\n\t\tif ( v.done ) {\n\t\t\tbreak;\n\t\t}\n\t\tz = v.value;\n\t\tif ( isArrayLikeObject( z ) && z.length >= 2 ) {\n\t\t\tout.push( z[ 0 ], z[ 1 ] );\n\t\t} else if ( isComplexLike( z ) ) {\n\t\t\tout.push( realf( z ), imagf( z ) );\n\t\t} else {\n\t\t\treturn new TypeError( format( 'invalid argument. An iterator must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', z ) );\n\t\t}\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default fromIterator;\n","/* eslint-disable no-restricted-syntax, max-lines, no-invalid-this */\n\n/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isNonNegativeInteger } from '@stdlib/assert-is-nonnegative-integer';\nimport isArrayLikeObject from '@stdlib/assert-is-array-like-object';\nimport isCollection from '@stdlib/assert-is-collection';\nimport isArrayBuffer from '@stdlib/assert-is-arraybuffer';\nimport isObject from '@stdlib/assert-is-object';\nimport isArray from '@stdlib/assert-is-array';\nimport { isPrimitive as isString } from '@stdlib/assert-is-string';\nimport isFunction from '@stdlib/assert-is-function';\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport isEven from '@stdlib/math-base-assert-is-even';\nimport isInteger from '@stdlib/math-base-assert-is-integer';\nimport isComplex64Array from '@stdlib/array-base-assert-is-complex64array';\nimport isComplex128Array from '@stdlib/array-base-assert-is-complex128array';\nimport hasIteratorSymbolSupport from '@stdlib/assert-has-iterator-symbol-support';\nimport ITERATOR_SYMBOL from '@stdlib/symbol-iterator';\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport setReadOnlyAccessor from '@stdlib/utils-define-nonenumerable-read-only-accessor';\nimport Float32Array from '@stdlib/array-float32';\nimport Complex64 from '@stdlib/complex-float32';\nimport format from '@stdlib/string-format';\nimport realf from '@stdlib/complex-realf';\nimport imagf from '@stdlib/complex-imagf';\nimport floor from '@stdlib/math-base-special-floor';\nimport reinterpret64 from '@stdlib/strided-base-reinterpret-complex64';\nimport reinterpret128 from '@stdlib/strided-base-reinterpret-complex128';\nimport getter from '@stdlib/array-base-getter';\nimport accessorGetter from '@stdlib/array-base-accessor-getter';\nimport fromIterator from './from_iterator.js';\nimport fromIteratorMap from './from_iterator_map.js';\nimport fromArray from './from_array.js';\n\n\n// VARIABLES //\n\nvar BYTES_PER_ELEMENT = Float32Array.BYTES_PER_ELEMENT * 2;\nvar HAS_ITERATOR_SYMBOL = hasIteratorSymbolSupport();\n\n\n// FUNCTIONS //\n\n/**\n* Returns a boolean indicating if a value is a complex typed array.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a complex typed array\n*/\nfunction isComplexArray( value ) {\n\treturn (\n\t\tvalue instanceof Complex64Array ||\n\t\t(\n\t\t\ttypeof value === 'object' &&\n\t\t\tvalue !== null &&\n\t\t\t(\n\t\t\t\tvalue.constructor.name === 'Complex64Array' ||\n\t\t\t\tvalue.constructor.name === 'Complex128Array'\n\t\t\t) &&\n\t\t\ttypeof value._length === 'number' && // eslint-disable-line no-underscore-dangle\n\n\t\t\t// NOTE: we don't perform a more rigorous test here for a typed array for performance reasons, as robustly checking for a typed array instance could require walking the prototype tree and performing relatively expensive constructor checks...\n\t\t\ttypeof value._buffer === 'object' // eslint-disable-line no-underscore-dangle\n\t\t)\n\t);\n}\n\n/**\n* Returns a boolean indicating if a value is a complex typed array constructor.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a complex typed array constructor\n*/\nfunction isComplexArrayConstructor( value ) {\n\treturn (\n\t\tvalue === Complex64Array ||\n\n\t\t// NOTE: weaker test in order to avoid a circular dependency with Complex128Array...\n\t\tvalue.name === 'Complex128Array'\n\t);\n}\n\n/**\n* Retrieves a complex number from a complex number array buffer.\n*\n* @private\n* @param {Float32Array} buf - array buffer\n* @param {NonNegativeInteger} idx - element index\n* @returns {Complex64} complex number\n*/\nfunction getComplex64( buf, idx ) {\n\tidx *= 2;\n\treturn new Complex64( buf[ idx ], buf[ idx+1 ] );\n}\n\n\n// MAIN //\n\n/**\n* 64-bit complex number array constructor.\n*\n* @constructor\n* @param {(NonNegativeInteger|Collection|ArrayBuffer|Iterable)} [arg] - length, typed array, array-like object, buffer, or an iterable\n* @param {NonNegativeInteger} [byteOffset=0] - byte offset\n* @param {NonNegativeInteger} [length] - view length\n* @throws {RangeError} ArrayBuffer byte length must be a multiple of `8`\n* @throws {RangeError} array-like object and typed array input arguments must have a length which is a multiple of two\n* @throws {TypeError} if provided only a single argument, must provide a valid argument\n* @throws {TypeError} byte offset must be a nonnegative integer\n* @throws {RangeError} byte offset must be a multiple of `8`\n* @throws {TypeError} view length must be a positive multiple of `8`\n* @throws {RangeError} must provide sufficient memory to accommodate byte offset and view length requirements\n* @throws {TypeError} an iterator must return either a two element array containing real and imaginary components or a complex number\n* @returns {Complex64Array} complex number array\n*\n* @example\n* var arr = new Complex64Array();\n* // returns \n*\n* var len = arr.length;\n* // returns 0\n*\n* @example\n* var arr = new Complex64Array( 2 );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*\n* @example\n* var arr = new Complex64Array( [ 1.0, -1.0 ] );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* import ArrayBuffer from '@stdlib/array-buffer';\n*\n* var buf = new ArrayBuffer( 16 );\n* var arr = new Complex64Array( buf );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*\n* @example\n* import ArrayBuffer from '@stdlib/array-buffer';\n*\n* var buf = new ArrayBuffer( 16 );\n* var arr = new Complex64Array( buf, 8 );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* import ArrayBuffer from '@stdlib/array-buffer';\n*\n* var buf = new ArrayBuffer( 32 );\n* var arr = new Complex64Array( buf, 8, 2 );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*/\nfunction Complex64Array() {\n\tvar byteOffset;\n\tvar nargs;\n\tvar buf;\n\tvar len;\n\n\tnargs = arguments.length;\n\tif ( !(this instanceof Complex64Array) ) {\n\t\tif ( nargs === 0 ) {\n\t\t\treturn new Complex64Array();\n\t\t}\n\t\tif ( nargs === 1 ) {\n\t\t\treturn new Complex64Array( arguments[0] );\n\t\t}\n\t\tif ( nargs === 2 ) {\n\t\t\treturn new Complex64Array( arguments[0], arguments[1] );\n\t\t}\n\t\treturn new Complex64Array( arguments[0], arguments[1], arguments[2] );\n\t}\n\t// Create the underlying data buffer...\n\tif ( nargs === 0 ) {\n\t\tbuf = new Float32Array( 0 ); // backward-compatibility\n\t} else if ( nargs === 1 ) {\n\t\tif ( isNonNegativeInteger( arguments[0] ) ) {\n\t\t\tbuf = new Float32Array( arguments[0]*2 );\n\t\t} else if ( isCollection( arguments[0] ) ) {\n\t\t\tbuf = arguments[ 0 ];\n\t\t\tlen = buf.length;\n\n\t\t\t// If provided a \"generic\" array, peak at the first value, and, if the value is a complex number, try to process as an array of complex numbers, falling back to \"normal\" typed array initialization if we fail and ensuring consistency if the first value had not been a complex number...\n\t\t\tif ( len && isArray( buf ) && isComplexLike( buf[0] ) ) {\n\t\t\t\tbuf = fromArray( new Float32Array( len*2 ), buf );\n\t\t\t\tif ( buf === null ) {\n\t\t\t\t\t// We failed and we are now forced to allocate a new array :-(\n\t\t\t\t\tif ( !isEven( len ) ) {\n\t\t\t\t\t\tthrow new RangeError( format( 'invalid argument. Array-like object arguments must have a length which is a multiple of two. Length: `%u`.', len ) );\n\t\t\t\t\t}\n\t\t\t\t\t// We failed, so fall back to directly setting values...\n\t\t\t\t\tbuf = new Float32Array( arguments[0] );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ( isComplex64Array( buf ) ) {\n\t\t\t\t\tbuf = reinterpret64( buf, 0 );\n\t\t\t\t} else if ( isComplex128Array( buf ) ) {\n\t\t\t\t\tbuf = reinterpret128( buf, 0 );\n\t\t\t\t} else if ( !isEven( len ) ) {\n\t\t\t\t\tthrow new RangeError( format( 'invalid argument. Array-like object and typed array arguments must have a length which is a multiple of two. Length: `%u`.', len ) );\n\t\t\t\t}\n\t\t\t\tbuf = new Float32Array( buf );\n\t\t\t}\n\t\t} else if ( isArrayBuffer( arguments[0] ) ) {\n\t\t\tbuf = arguments[ 0 ];\n\t\t\tif ( !isInteger( buf.byteLength/BYTES_PER_ELEMENT ) ) {\n\t\t\t\tthrow new RangeError( format( 'invalid argument. ArrayBuffer byte length must be a multiple of %u. Byte length: `%u`.', BYTES_PER_ELEMENT, buf.byteLength ) );\n\t\t\t}\n\t\t\tbuf = new Float32Array( buf );\n\t\t} else if ( isObject( arguments[0] ) ) {\n\t\t\tbuf = arguments[ 0 ];\n\t\t\tif ( HAS_ITERATOR_SYMBOL === false ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Environment lacks Symbol.iterator support. Must provide a length, ArrayBuffer, typed array, or array-like object. Value: `%s`.', buf ) );\n\t\t\t}\n\t\t\tif ( !isFunction( buf[ ITERATOR_SYMBOL ] ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.', buf ) );\n\t\t\t}\n\t\t\tbuf = buf[ ITERATOR_SYMBOL ]();\n\t\t\tif ( !isFunction( buf.next ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.', buf ) ); // FIXME: `buf` is what is returned from above, NOT the original value\n\t\t\t}\n\t\t\tbuf = fromIterator( buf );\n\t\t\tif ( buf instanceof Error ) {\n\t\t\t\tthrow buf;\n\t\t\t}\n\t\t\tbuf = new Float32Array( buf );\n\t\t} else {\n\t\t\tthrow new TypeError( format( 'invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.', arguments[0] ) );\n\t\t}\n\t} else {\n\t\tbuf = arguments[ 0 ];\n\t\tif ( !isArrayBuffer( buf ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. First argument must be an ArrayBuffer. Value: `%s`.', buf ) );\n\t\t}\n\t\tbyteOffset = arguments[ 1 ];\n\t\tif ( !isNonNegativeInteger( byteOffset ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Byte offset must be a nonnegative integer. Value: `%s`.', byteOffset ) );\n\t\t}\n\t\tif ( !isInteger( byteOffset/BYTES_PER_ELEMENT ) ) {\n\t\t\tthrow new RangeError( format( 'invalid argument. Byte offset must be a multiple of %u. Value: `%u`.', BYTES_PER_ELEMENT, byteOffset ) );\n\t\t}\n\t\tif ( nargs === 2 ) {\n\t\t\tlen = buf.byteLength - byteOffset;\n\t\t\tif ( !isInteger( len/BYTES_PER_ELEMENT ) ) {\n\t\t\t\tthrow new RangeError( format( 'invalid arguments. ArrayBuffer view byte length must be a multiple of %u. View byte length: `%u`.', BYTES_PER_ELEMENT, len ) );\n\t\t\t}\n\t\t\tbuf = new Float32Array( buf, byteOffset );\n\t\t} else {\n\t\t\tlen = arguments[ 2 ];\n\t\t\tif ( !isNonNegativeInteger( len ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Length must be a nonnegative integer. Value: `%s`.', len ) );\n\t\t\t}\n\t\t\tif ( (len*BYTES_PER_ELEMENT) > (buf.byteLength-byteOffset) ) {\n\t\t\t\tthrow new RangeError( format( 'invalid arguments. ArrayBuffer has insufficient capacity. Either decrease the array length or provide a bigger buffer. Minimum capacity: `%u`.', len*BYTES_PER_ELEMENT ) );\n\t\t\t}\n\t\t\tbuf = new Float32Array( buf, byteOffset, len*2 );\n\t\t}\n\t}\n\tsetReadOnly( this, '_buffer', buf );\n\tsetReadOnly( this, '_length', buf.length/2 );\n\n\treturn this;\n}\n\n/**\n* Size (in bytes) of each array element.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex64Array\n* @readonly\n* @type {PositiveInteger}\n* @default 8\n*\n* @example\n* var nbytes = Complex64Array.BYTES_PER_ELEMENT;\n* // returns 8\n*/\nsetReadOnly( Complex64Array, 'BYTES_PER_ELEMENT', BYTES_PER_ELEMENT );\n\n/**\n* Constructor name.\n*\n* @name name\n* @memberof Complex64Array\n* @readonly\n* @type {string}\n* @default 'Complex64Array'\n*\n* @example\n* var str = Complex64Array.name;\n* // returns 'Complex64Array'\n*/\nsetReadOnly( Complex64Array, 'name', 'Complex64Array' );\n\n/**\n* Creates a new 64-bit complex number array from an array-like object or an iterable.\n*\n* @name from\n* @memberof Complex64Array\n* @type {Function}\n* @param {(Collection|Iterable)} src - array-like object or iterable\n* @param {Function} [clbk] - callback to invoke for each source element\n* @param {*} [thisArg] - context\n* @throws {TypeError} `this` context must be a constructor\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be an array-like object or an iterable\n* @throws {TypeError} second argument must be a function\n* @throws {RangeError} array-like objects must have a length which is a multiple of two\n* @throws {TypeError} an iterator must return either a two element array containing real and imaginary components or a complex number\n* @throws {TypeError} when provided an iterator, a callback must return either a two element array containing real and imaginary components or a complex number\n* @returns {Complex64Array} 64-bit complex number array\n*\n* @example\n* var arr = Complex64Array.from( [ 1.0, -1.0 ] );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n*\n* var arr = Complex64Array.from( [ new Complex64( 1.0, 1.0 ) ] );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* function clbk( v ) {\n* return new Complex64( realf(v)*2.0, imagf(v)*2.0 );\n* }\n*\n* var arr = Complex64Array.from( [ new Complex64( 1.0, 1.0 ) ], clbk );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*/\nsetReadOnly( Complex64Array, 'from', function from( src ) {\n\tvar thisArg;\n\tvar nargs;\n\tvar clbk;\n\tvar out;\n\tvar buf;\n\tvar tmp;\n\tvar get;\n\tvar len;\n\tvar flg;\n\tvar v;\n\tvar i;\n\tvar j;\n\tif ( !isFunction( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` context must be a constructor.' );\n\t}\n\tif ( !isComplexArrayConstructor( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tnargs = arguments.length;\n\tif ( nargs > 1 ) {\n\t\tclbk = arguments[ 1 ];\n\t\tif ( !isFunction( clbk ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be a function. Value: `%s`.', clbk ) );\n\t\t}\n\t\tif ( nargs > 2 ) {\n\t\t\tthisArg = arguments[ 2 ];\n\t\t}\n\t}\n\tif ( isComplexArray( src ) ) {\n\t\tlen = src.length;\n\t\tif ( clbk ) {\n\t\t\tout = new this( len );\n\t\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\t\tj = 0;\n\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\tv = clbk.call( thisArg, src.get( i ), i );\n\t\t\t\tif ( isComplexLike( v ) ) {\n\t\t\t\t\tbuf[ j ] = realf( v );\n\t\t\t\t\tbuf[ j+1 ] = imagf( v );\n\t\t\t\t} else if ( isArrayLikeObject( v ) && v.length >= 2 ) {\n\t\t\t\t\tbuf[ j ] = v[ 0 ];\n\t\t\t\t\tbuf[ j+1 ] = v[ 1 ];\n\t\t\t\t} else {\n\t\t\t\t\tthrow new TypeError( format( 'invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', v ) );\n\t\t\t\t}\n\t\t\t\tj += 2; // stride\n\t\t\t}\n\t\t\treturn out;\n\t\t}\n\t\treturn new this( src );\n\t}\n\tif ( isCollection( src ) ) {\n\t\tif ( clbk ) {\n\t\t\t// Note: array contents affect how we iterate over a provided data source. If only complex number objects, we can extract real and imaginary components. Otherwise, for non-complex number arrays (e.g., `Float64Array`, etc), we assume a strided array where real and imaginary components are interleaved. In the former case, we expect a callback to return real and imaginary components (possibly as a complex number). In the latter case, we expect a callback to return *either* a real or imaginary component.\n\n\t\t\tlen = src.length;\n\t\t\tif ( src.get && src.set ) {\n\t\t\t\tget = accessorGetter( 'default' );\n\t\t\t} else {\n\t\t\t\tget = getter( 'default' );\n\t\t\t}\n\t\t\t// Detect whether we've been provided an array which returns complex number objects...\n\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\tif ( !isComplexLike( get( src, i ) ) ) {\n\t\t\t\t\tflg = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// If an array does not contain only complex number objects, then we assume interleaved real and imaginary components...\n\t\t\tif ( flg ) {\n\t\t\t\tif ( !isEven( len ) ) {\n\t\t\t\t\tthrow new RangeError( format( 'invalid argument. First argument must have a length which is a multiple of %u. Length: `%u`.', 2, len ) );\n\t\t\t\t}\n\t\t\t\tout = new this( len/2 );\n\t\t\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\t\tbuf[ i ] = clbk.call( thisArg, get( src, i ), i );\n\t\t\t\t}\n\t\t\t\treturn out;\n\t\t\t}\n\t\t\t// If an array contains only complex number objects, then we need to extract real and imaginary components...\n\t\t\tout = new this( len );\n\t\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\t\tj = 0;\n\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\tv = clbk.call( thisArg, get( src, i ), i );\n\t\t\t\tif ( isComplexLike( v ) ) {\n\t\t\t\t\tbuf[ j ] = realf( v );\n\t\t\t\t\tbuf[ j+1 ] = imagf( v );\n\t\t\t\t} else if ( isArrayLikeObject( v ) && v.length >= 2 ) {\n\t\t\t\t\tbuf[ j ] = v[ 0 ];\n\t\t\t\t\tbuf[ j+1 ] = v[ 1 ];\n\t\t\t\t} else {\n\t\t\t\t\tthrow new TypeError( format( 'invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', v ) );\n\t\t\t\t}\n\t\t\t\tj += 2; // stride\n\t\t\t}\n\t\t\treturn out;\n\t\t}\n\t\treturn new this( src );\n\t}\n\tif ( isObject( src ) && HAS_ITERATOR_SYMBOL && isFunction( src[ ITERATOR_SYMBOL ] ) ) { // eslint-disable-line max-len\n\t\tbuf = src[ ITERATOR_SYMBOL ]();\n\t\tif ( !isFunction( buf.next ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.', src ) );\n\t\t}\n\t\tif ( clbk ) {\n\t\t\ttmp = fromIteratorMap( buf, clbk, thisArg );\n\t\t} else {\n\t\t\ttmp = fromIterator( buf );\n\t\t}\n\t\tif ( tmp instanceof Error ) {\n\t\t\tthrow tmp;\n\t\t}\n\t\tlen = tmp.length / 2;\n\t\tout = new this( len );\n\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\tbuf[ i ] = tmp[ i ];\n\t\t}\n\t\treturn out;\n\t}\n\tthrow new TypeError( format( 'invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.', src ) );\n});\n\n/**\n* Creates a new 64-bit complex number array from a variable number of arguments.\n*\n* @name of\n* @memberof Complex64Array\n* @type {Function}\n* @param {...*} element - array elements\n* @throws {TypeError} `this` context must be a constructor\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Complex64Array} 64-bit complex number array\n*\n* @example\n* var arr = Complex64Array.of( 1.0, 1.0, 1.0, 1.0 );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*/\nsetReadOnly( Complex64Array, 'of', function of() {\n\tvar args;\n\tvar i;\n\tif ( !isFunction( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` context must be a constructor.' );\n\t}\n\tif ( !isComplexArrayConstructor( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\targs = [];\n\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\targs.push( arguments[ i ] );\n\t}\n\treturn new this( args );\n});\n\n/**\n* Returns an array element with support for both nonnegative and negative integer indices.\n*\n* @name at\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {integer} idx - element index\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} must provide an integer\n* @returns {(Complex64|void)} array element\n*\n* @example\n* var arr = new Complex64Array( 10 );\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* var z = arr.at( 0 );\n* // returns \n*\n* var re = realf( z );\n* // returns 0.0\n*\n* var im = imagf( z );\n* // returns 0.0\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 9.0, -9.0 ], 9 );\n*\n* z = arr.at( 0 );\n* // returns \n*\n* re = realf( z );\n* // returns 1.0\n*\n* im = imagf( z );\n* // returns -1.0\n*\n* z = arr.at( -1 );\n* // returns \n*\n* re = realf( z );\n* // returns 9.0\n*\n* im = imagf( z );\n* // returns -9.0\n*\n* z = arr.at( 100 );\n* // returns undefined\n*\n* z = arr.at( -100 );\n* // returns undefined\n*/\nsetReadOnly( Complex64Array.prototype, 'at', function at( idx ) {\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isInteger( idx ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Must provide an integer. Value: `%s`.', idx ) );\n\t}\n\tif ( idx < 0 ) {\n\t\tidx += this._length;\n\t}\n\tif ( idx < 0 || idx >= this._length ) {\n\t\treturn;\n\t}\n\treturn getComplex64( this._buffer, idx );\n});\n\n/**\n* Pointer to the underlying data buffer.\n*\n* @name buffer\n* @memberof Complex64Array.prototype\n* @readonly\n* @type {ArrayBuffer}\n*\n* @example\n* var arr = new Complex64Array( 10 );\n*\n* var buf = arr.buffer;\n* // returns \n*/\nsetReadOnlyAccessor( Complex64Array.prototype, 'buffer', function get() {\n\treturn this._buffer.buffer;\n});\n\n/**\n* Size (in bytes) of the array.\n*\n* @name byteLength\n* @memberof Complex64Array.prototype\n* @readonly\n* @type {NonNegativeInteger}\n*\n* @example\n* var arr = new Complex64Array( 10 );\n*\n* var byteLength = arr.byteLength;\n* // returns 80\n*/\nsetReadOnlyAccessor( Complex64Array.prototype, 'byteLength', function get() {\n\treturn this._buffer.byteLength;\n});\n\n/**\n* Offset (in bytes) of the array from the start of its underlying `ArrayBuffer`.\n*\n* @name byteOffset\n* @memberof Complex64Array.prototype\n* @readonly\n* @type {NonNegativeInteger}\n*\n* @example\n* var arr = new Complex64Array( 10 );\n*\n* var byteOffset = arr.byteOffset;\n* // returns 0\n*/\nsetReadOnlyAccessor( Complex64Array.prototype, 'byteOffset', function get() {\n\treturn this._buffer.byteOffset;\n});\n\n/**\n* Size (in bytes) of each array element.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex64Array.prototype\n* @readonly\n* @type {PositiveInteger}\n* @default 8\n*\n* @example\n* var arr = new Complex64Array( 10 );\n*\n* var nbytes = arr.BYTES_PER_ELEMENT;\n* // returns 8\n*/\nsetReadOnly( Complex64Array.prototype, 'BYTES_PER_ELEMENT', Complex64Array.BYTES_PER_ELEMENT );\n\n/**\n* Copies a sequence of elements within the array to the position starting at `target`.\n*\n* @name copyWithin\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {integer} target - index at which to start copying elements\n* @param {integer} start - source index at which to copy elements from\n* @param {integer} [end] - source index at which to stop copying elements from\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Complex64Array} modified array\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* var arr = new Complex64Array( 4 );\n*\n* // Set the array elements:\n* arr.set( new Complex64( 1.0, 1.0 ), 0 );\n* arr.set( new Complex64( 2.0, 2.0 ), 1 );\n* arr.set( new Complex64( 3.0, 3.0 ), 2 );\n* arr.set( new Complex64( 4.0, 4.0 ), 3 );\n*\n* // Copy the first two elements to the last two elements:\n* arr.copyWithin( 2, 0, 2 );\n*\n* // Get the last array element:\n* var z = arr.get( 3 );\n*\n* var re = realf( z );\n* // returns 2.0\n*\n* var im = imagf( z );\n* // returns 2.0\n*/\nsetReadOnly( Complex64Array.prototype, 'copyWithin', function copyWithin( target, start ) {\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\t// FIXME: prefer a functional `copyWithin` implementation which addresses lack of universal browser support (e.g., IE11 and Safari) or ensure that typed arrays are polyfilled\n\tif ( arguments.length === 2 ) {\n\t\tthis._buffer.copyWithin( target*2, start*2 );\n\t} else {\n\t\tthis._buffer.copyWithin( target*2, start*2, arguments[2]*2 );\n\t}\n\treturn this;\n});\n\n/**\n* Returns an iterator for iterating over array key-value pairs.\n*\n* @name entries\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Iterator} iterator\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n*\n* var arr = [\n* new Complex64( 1.0, 1.0 ),\n* new Complex64( 2.0, 2.0 ),\n* new Complex64( 3.0, 3.0 )\n* ];\n* arr = new Complex64Array( arr );\n*\n* // Create an iterator:\n* var it = arr.entries();\n*\n* // Iterate over the key-value pairs...\n* var v = it.next().value;\n* // returns [ 0, ]\n*\n* v = it.next().value;\n* // returns [ 1, ]\n*\n* v = it.next().value;\n* // returns [ 2, ]\n*\n* var bool = it.next().done;\n* // returns true\n*/\nsetReadOnly( Complex64Array.prototype, 'entries', function entries() {\n\tvar buffer;\n\tvar self;\n\tvar iter;\n\tvar len;\n\tvar FLG;\n\tvar i;\n\tvar j;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tself = this;\n\tbuffer = this._buffer;\n\tlen = this._length;\n\n\t// Initialize the iteration indices:\n\ti = -1;\n\tj = -2;\n\n\t// Create an iterator protocol-compliant object:\n\titer = {};\n\tsetReadOnly( iter, 'next', next );\n\tsetReadOnly( iter, 'return', end );\n\n\tif ( ITERATOR_SYMBOL ) {\n\t\tsetReadOnly( iter, ITERATOR_SYMBOL, factory );\n\t}\n\treturn iter;\n\n\t/**\n\t* Returns an iterator protocol-compliant object containing the next iterated value.\n\t*\n\t* @private\n\t* @returns {Object} iterator protocol-compliant object\n\t*/\n\tfunction next() {\n\t\tvar z;\n\t\ti += 1;\n\t\tif ( FLG || i >= len ) {\n\t\t\treturn {\n\t\t\t\t'done': true\n\t\t\t};\n\t\t}\n\t\tj += 2;\n\t\tz = new Complex64( buffer[ j ], buffer[ j+1 ] );\n\t\treturn {\n\t\t\t'value': [ i, z ],\n\t\t\t'done': false\n\t\t};\n\t}\n\n\t/**\n\t* Finishes an iterator.\n\t*\n\t* @private\n\t* @param {*} [value] - value to return\n\t* @returns {Object} iterator protocol-compliant object\n\t*/\n\tfunction end( value ) {\n\t\tFLG = true;\n\t\tif ( arguments.length ) {\n\t\t\treturn {\n\t\t\t\t'value': value,\n\t\t\t\t'done': true\n\t\t\t};\n\t\t}\n\t\treturn {\n\t\t\t'done': true\n\t\t};\n\t}\n\n\t/**\n\t* Returns a new iterator.\n\t*\n\t* @private\n\t* @returns {Iterator} iterator\n\t*/\n\tfunction factory() {\n\t\treturn self.entries();\n\t}\n});\n\n/**\n* Tests whether all elements in an array pass a test implemented by a predicate function.\n*\n* @name every\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {boolean} boolean indicating whether all elements pass a test\n*\n* @example\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* function predicate( v ) {\n* return ( realf( v ) === imagf( v ) );\n* }\n*\n* var arr = new Complex64Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var bool = arr.every( predicate );\n* // returns true\n*/\nsetReadOnly( Complex64Array.prototype, 'every', function every( predicate, thisArg ) {\n\tvar buf;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tif ( !predicate.call( thisArg, getComplex64( buf, i ), i, this ) ) {\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn true;\n});\n\n/**\n* Returns a modified typed array filled with a fill value.\n*\n* @name fill\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {ComplexLike} value - fill value\n* @param {integer} [start=0] - starting index (inclusive)\n* @param {integer} [end] - ending index (exclusive)\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a complex number\n* @throws {TypeError} second argument must be an integer\n* @throws {TypeError} third argument must be an integer\n*\n* @example\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* var arr = new Complex64Array( 3 );\n*\n* arr.fill( new Complex64( 1.0, 1.0 ), 1 );\n*\n* var z = arr.get( 1 );\n* // returns \n*\n* var re = realf( z );\n* // returns 1.0\n*\n* var im = imagf( z );\n* // returns 1.0\n*\n* z = arr.get( 1 );\n* // returns \n*\n* re = realf( z );\n* // returns 1.0\n*\n* im = imagf( z );\n* // returns 1.0\n*/\nsetReadOnly( Complex64Array.prototype, 'fill', function fill( value, start, end ) {\n\tvar buf;\n\tvar len;\n\tvar idx;\n\tvar re;\n\tvar im;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isComplexLike( value ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a complex number. Value: `%s`.', value ) );\n\t}\n\tbuf = this._buffer;\n\tlen = this._length;\n\tif ( arguments.length > 1 ) {\n\t\tif ( !isInteger( start ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be an integer. Value: `%s`.', start ) );\n\t\t}\n\t\tif ( start < 0 ) {\n\t\t\tstart += len;\n\t\t\tif ( start < 0 ) {\n\t\t\t\tstart = 0;\n\t\t\t}\n\t\t}\n\t\tif ( arguments.length > 2 ) {\n\t\t\tif ( !isInteger( end ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Third argument must be an integer. Value: `%s`.', end ) );\n\t\t\t}\n\t\t\tif ( end < 0 ) {\n\t\t\t\tend += len;\n\t\t\t\tif ( end < 0 ) {\n\t\t\t\t\tend = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( end > len ) {\n\t\t\t\tend = len;\n\t\t\t}\n\t\t} else {\n\t\t\tend = len;\n\t\t}\n\t} else {\n\t\tstart = 0;\n\t\tend = len;\n\t}\n\tre = realf( value );\n\tim = imagf( value );\n\tfor ( i = start; i < end; i++ ) {\n\t\tidx = 2*i;\n\t\tbuf[ idx ] = re;\n\t\tbuf[ idx+1 ] = im;\n\t}\n\treturn this;\n});\n\n/**\n* Returns a new array containing the elements of an array which pass a test implemented by a predicate function.\n*\n* @name filter\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {Complex64Array} complex number array\n*\n* @example\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* function predicate( v ) {\n* return ( realf( v ) === imagf( v ) );\n* }\n*\n* var arr = new Complex64Array( 3 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n*\n* var out = arr.filter( predicate );\n* // returns \n*\n* var len = out.length;\n* // returns 1\n*\n* var z = out.get( 0 );\n* // returns \n*\n* var re = realf( z );\n* // returns 2.0\n*\n* var im = imagf( z );\n* // returns 2.0\n*/\nsetReadOnly( Complex64Array.prototype, 'filter', function filter( predicate, thisArg ) {\n\tvar buf;\n\tvar out;\n\tvar i;\n\tvar z;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tout = [];\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tz = getComplex64( buf, i );\n\t\tif ( predicate.call( thisArg, z, i, this ) ) {\n\t\t\tout.push( z );\n\t\t}\n\t}\n\treturn new this.constructor( out );\n});\n\n/**\n* Returns the first element in an array for which a predicate function returns a truthy value.\n*\n* @name find\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {(Complex64|void)} array element or undefined\n*\n* @example\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n* import Complex64 from '@stdlib/complex-float32';\n*\n* function predicate( v ) {\n* return ( realf( v ) === imagf( v ) );\n* }\n*\n* var arr = new Complex64Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var z = arr.find( predicate );\n* // returns \n*\n* var re = realf( z );\n* // returns 1.0\n*\n* var im = imagf( z );\n* // returns 1.0\n*/\nsetReadOnly( Complex64Array.prototype, 'find', function find( predicate, thisArg ) {\n\tvar buf;\n\tvar i;\n\tvar z;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tz = getComplex64( buf, i );\n\t\tif ( predicate.call( thisArg, z, i, this ) ) {\n\t\t\treturn z;\n\t\t}\n\t}\n});\n\n/**\n* Returns the index of the first element in an array for which a predicate function returns a truthy value.\n*\n* @name findIndex\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {integer} index or -1\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* function predicate( v ) {\n* return ( realf( v ) === imagf( v ) );\n* }\n*\n* var arr = new Complex64Array( 3 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var idx = arr.findIndex( predicate );\n* // returns 2\n*/\nsetReadOnly( Complex64Array.prototype, 'findIndex', function findIndex( predicate, thisArg ) {\n\tvar buf;\n\tvar i;\n\tvar z;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tz = getComplex64( buf, i );\n\t\tif ( predicate.call( thisArg, z, i, this ) ) {\n\t\t\treturn i;\n\t\t}\n\t}\n\treturn -1;\n});\n\n/**\n* Returns the last element in an array for which a predicate function returns a truthy value.\n*\n* @name findLast\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {(Complex64|void)} array element or undefined\n*\n* @example\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n* import Complex64 from '@stdlib/complex-float32';\n*\n* function predicate( v ) {\n* return ( realf( v ) === imagf( v ) );\n* }\n*\n* var arr = new Complex64Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var z = arr.findLast( predicate );\n* // returns \n*\n* var re = realf( z );\n* // returns 3.0\n*\n* var im = imagf( z );\n* // returns 3.0\n*/\nsetReadOnly( Complex64Array.prototype, 'findLast', function findLast( predicate, thisArg ) {\n\tvar buf;\n\tvar i;\n\tvar z;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = this._length-1; i >= 0; i-- ) {\n\t\tz = getComplex64( buf, i );\n\t\tif ( predicate.call( thisArg, z, i, this ) ) {\n\t\t\treturn z;\n\t\t}\n\t}\n});\n\n/**\n* Returns the index of the last element in an array for which a predicate function returns a truthy value.\n*\n* @name findLastIndex\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {integer} index or -1\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* function predicate( v ) {\n* return ( realf( v ) === imagf( v ) );\n* }\n*\n* var arr = new Complex64Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n*\n* var idx = arr.findLastIndex( predicate );\n* // returns 1\n*/\nsetReadOnly( Complex64Array.prototype, 'findLastIndex', function findLastIndex( predicate, thisArg ) {\n\tvar buf;\n\tvar i;\n\tvar z;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = this._length-1; i >= 0; i-- ) {\n\t\tz = getComplex64( buf, i );\n\t\tif ( predicate.call( thisArg, z, i, this ) ) {\n\t\t\treturn i;\n\t\t}\n\t}\n\treturn -1;\n});\n\n/**\n* Invokes a function once for each array element.\n*\n* @name forEach\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {Function} fcn - function to invoke\n* @param {*} [thisArg] - function invocation context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n*\n* function log( v, i ) {\n* console.log( '%s: %s', i, v.toString() );\n* }\n*\n* var arr = new Complex64Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* arr.forEach( log );\n*/\nsetReadOnly( Complex64Array.prototype, 'forEach', function forEach( fcn, thisArg ) {\n\tvar buf;\n\tvar i;\n\tvar z;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( fcn ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', fcn ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tz = getComplex64( buf, i );\n\t\tfcn.call( thisArg, z, i, this );\n\t}\n});\n\n/**\n* Returns an array element.\n*\n* @name get\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {NonNegativeInteger} idx - element index\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} must provide a nonnegative integer\n* @returns {(Complex64|void)} array element\n*\n* @example\n* var arr = new Complex64Array( 10 );\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* var z = arr.get( 0 );\n* // returns \n*\n* var re = realf( z );\n* // returns 0.0\n*\n* var im = imagf( z );\n* // returns 0.0\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n*\n* z = arr.get( 0 );\n* // returns \n*\n* re = realf( z );\n* // returns 1.0\n*\n* im = imagf( z );\n* // returns -1.0\n*\n* z = arr.get( 100 );\n* // returns undefined\n*/\nsetReadOnly( Complex64Array.prototype, 'get', function get( idx ) {\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isNonNegativeInteger( idx ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Must provide a nonnegative integer. Value: `%s`.', idx ) );\n\t}\n\tif ( idx >= this._length ) {\n\t\treturn;\n\t}\n\treturn getComplex64( this._buffer, idx );\n});\n\n/**\n* Returns a boolean indicating whether an array includes a provided value.\n*\n* @name includes\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {ComplexLike} searchElement - search element\n* @param {integer} [fromIndex=0] - starting index (inclusive)\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a complex number\n* @throws {TypeError} second argument must be an integer\n* @returns {boolean} boolean indicating whether an array includes a provided value\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n*\n* var arr = new Complex64Array( 5 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n* arr.set( [ 4.0, -4.0 ], 3 );\n* arr.set( [ 5.0, -5.0 ], 4 );\n*\n* var bool = arr.includes( new Complex64( 3.0, -3.0 ) );\n* // returns true\n*\n* bool = arr.includes( new Complex64( 3.0, -3.0 ), 3 );\n* // returns false\n*\n* bool = arr.includes( new Complex64( 4.0, -4.0 ), -3 );\n* // returns true\n*/\nsetReadOnly( Complex64Array.prototype, 'includes', function includes( searchElement, fromIndex ) {\n\tvar buf;\n\tvar idx;\n\tvar re;\n\tvar im;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isComplexLike( searchElement ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a complex number. Value: `%s`.', searchElement ) );\n\t}\n\tif ( arguments.length > 1 ) {\n\t\tif ( !isInteger( fromIndex ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be an integer. Value: `%s`.', fromIndex ) );\n\t\t}\n\t\tif ( fromIndex < 0 ) {\n\t\t\tfromIndex += this._length;\n\t\t\tif ( fromIndex < 0 ) {\n\t\t\t\tfromIndex = 0;\n\t\t\t}\n\t\t}\n\t} else {\n\t\tfromIndex = 0;\n\t}\n\tre = realf( searchElement );\n\tim = imagf( searchElement );\n\tbuf = this._buffer;\n\tfor ( i = fromIndex; i < this._length; i++ ) {\n\t\tidx = 2 * i;\n\t\tif ( re === buf[ idx ] && im === buf[ idx+1 ] ) {\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n});\n\n/**\n* Returns the first index at which a given element can be found.\n*\n* @name indexOf\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {ComplexLike} searchElement - element to find\n* @param {integer} [fromIndex=0] - starting index (inclusive)\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a complex number\n* @throws {TypeError} second argument must be an integer\n* @returns {integer} index or -1\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n*\n* var arr = new Complex64Array( 10 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n* arr.set( [ 4.0, -4.0 ], 3 );\n* arr.set( [ 5.0, -5.0 ], 4 );\n*\n* var idx = arr.indexOf( new Complex64( 3.0, -3.0 ) );\n* // returns 2\n*\n* idx = arr.indexOf( new Complex64( 3.0, -3.0 ), 3 );\n* // returns -1\n*\n* idx = arr.indexOf( new Complex64( 4.0, -4.0 ), -3 );\n* // returns -1\n*/\nsetReadOnly( Complex64Array.prototype, 'indexOf', function indexOf( searchElement, fromIndex ) {\n\tvar buf;\n\tvar idx;\n\tvar re;\n\tvar im;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isComplexLike( searchElement ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a complex number. Value: `%s`.', searchElement ) );\n\t}\n\tif ( arguments.length > 1 ) {\n\t\tif ( !isInteger( fromIndex ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be an integer. Value: `%s`.', fromIndex ) );\n\t\t}\n\t\tif ( fromIndex < 0 ) {\n\t\t\tfromIndex += this._length;\n\t\t\tif ( fromIndex < 0 ) {\n\t\t\t\tfromIndex = 0;\n\t\t\t}\n\t\t}\n\t} else {\n\t\tfromIndex = 0;\n\t}\n\tre = realf( searchElement );\n\tim = imagf( searchElement );\n\tbuf = this._buffer;\n\tfor ( i = fromIndex; i < this._length; i++ ) {\n\t\tidx = 2 * i;\n\t\tif ( re === buf[ idx ] && im === buf[ idx+1 ] ) {\n\t\t\treturn i;\n\t\t}\n\t}\n\treturn -1;\n});\n\n/**\n* Returns a new string by concatenating all array elements.\n*\n* @name join\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {string} [separator=','] - element separator\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a string\n* @returns {string} string representation\n*\n* @example\n* var arr = new Complex64Array( 2 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n*\n* var str = arr.join();\n* // returns '1 + 1i,2 + 2i'\n*\n* str = arr.join( '/' );\n* // returns '1 + 1i/2 + 2i'\n*/\nsetReadOnly( Complex64Array.prototype, 'join', function join( separator ) {\n\tvar out;\n\tvar buf;\n\tvar sep;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( arguments.length === 0 ) {\n\t\tsep = ',';\n\t} else if ( isString( separator ) ) {\n\t\tsep = separator;\n\t} else {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a string. Value: `%s`.', separator ) );\n\t}\n\tout = [];\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tout.push( getComplex64( buf, i ).toString() );\n\t}\n\treturn out.join( sep );\n});\n\n/**\n* Returns the last index at which a given element can be found.\n*\n* @name lastIndexOf\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {ComplexLike} searchElement - element to find\n* @param {integer} [fromIndex] - index at which to start searching backward (inclusive)\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a complex number\n* @throws {TypeError} second argument must be an integer\n* @returns {integer} index or -1\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n*\n* var arr = new Complex64Array( 5 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n* arr.set( [ 4.0, -4.0 ], 3 );\n* arr.set( [ 3.0, -3.0 ], 4 );\n*\n* var idx = arr.lastIndexOf( new Complex64( 3.0, -3.0 ) );\n* // returns 4\n*\n* idx = arr.lastIndexOf( new Complex64( 3.0, -3.0 ), 3 );\n* // returns 2\n*\n* idx = arr.lastIndexOf( new Complex64( 5.0, -5.0 ), 3 );\n* // returns -1\n*\n* idx = arr.lastIndexOf( new Complex64( 2.0, -2.0 ), -3 );\n* // returns 1\n*/\nsetReadOnly( Complex64Array.prototype, 'lastIndexOf', function lastIndexOf( searchElement, fromIndex ) {\n\tvar buf;\n\tvar idx;\n\tvar re;\n\tvar im;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isComplexLike( searchElement ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a complex number. Value: `%s`.', searchElement ) );\n\t}\n\tif ( arguments.length > 1 ) {\n\t\tif ( !isInteger( fromIndex ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be an integer. Value: `%s`.', fromIndex ) );\n\t\t}\n\t\tif ( fromIndex >= this._length ) {\n\t\t\tfromIndex = this._length - 1;\n\t\t} else if ( fromIndex < 0 ) {\n\t\t\tfromIndex += this._length;\n\t\t}\n\t} else {\n\t\tfromIndex = this._length - 1;\n\t}\n\tre = realf( searchElement );\n\tim = imagf( searchElement );\n\tbuf = this._buffer;\n\tfor ( i = fromIndex; i >= 0; i-- ) {\n\t\tidx = 2 * i;\n\t\tif ( re === buf[ idx ] && im === buf[ idx+1 ] ) {\n\t\t\treturn i;\n\t\t}\n\t}\n\treturn -1;\n});\n\n/**\n* Number of array elements.\n*\n* @name length\n* @memberof Complex64Array.prototype\n* @readonly\n* @type {NonNegativeInteger}\n*\n* @example\n* var arr = new Complex64Array( 10 );\n*\n* var len = arr.length;\n* // returns 10\n*/\nsetReadOnlyAccessor( Complex64Array.prototype, 'length', function get() {\n\treturn this._length;\n});\n\n/**\n* Returns a new array with each element being the result of a provided callback function.\n*\n* @name map\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {Function} fcn - callback function\n* @param {*} [thisArg] - callback function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {Complex64Array} complex number array\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* function scale( v, i ) {\n* return new Complex64( 2.0*realf( v ), 2.0*imagf( v ) );\n* }\n*\n* var arr = new Complex64Array( 3 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n*\n* var out = arr.map( scale );\n* // returns \n*\n* var z = out.get( 0 );\n* // returns \n*\n* var re = realf( z );\n* // returns 2\n*\n* var im = imagf( z );\n* // returns -2\n*/\nsetReadOnly( Complex64Array.prototype, 'map', function map( fcn, thisArg ) {\n\tvar outbuf;\n\tvar buf;\n\tvar out;\n\tvar i;\n\tvar v;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( fcn ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', fcn ) );\n\t}\n\tbuf = this._buffer;\n\tout = new this.constructor( this._length );\n\toutbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tv = fcn.call( thisArg, getComplex64( buf, i ), i, this );\n\t\tif ( isComplexLike( v ) ) {\n\t\t\toutbuf[ 2*i ] = realf( v );\n\t\t\toutbuf[ (2*i)+1 ] = imagf( v );\n\t\t} else if ( isArrayLikeObject( v ) && v.length === 2 ) {\n\t\t\toutbuf[ 2*i ] = v[ 0 ];\n\t\t\toutbuf[ (2*i)+1 ] = v[ 1 ];\n\t\t} else {\n\t\t\tthrow new TypeError( format( 'invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', v ) );\n\t\t}\n\t}\n\treturn out;\n});\n\n/**\n* Applies a provided callback function to each element of the array, in order, passing in the return value from the calculation on the preceding element and returning the accumulated result upon completion.\n*\n* @name reduce\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {Function} reducer - callback function\n* @param {*} [initialValue] - initial value\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @throws {Error} if not provided an initial value, the array must have at least one element\n* @returns {*} accumulated result\n*\n* @example\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n* import caddf from '@stdlib/math-base-ops-caddf';\n*\n* var arr = new Complex64Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var z = arr.reduce( caddf );\n* // returns \n*\n* var re = realf( z );\n* // returns 6.0\n*\n* var im = imagf( z );\n* // returns 6.0\n*/\nsetReadOnly( Complex64Array.prototype, 'reduce', function reduce( reducer, initialValue ) {\n\tvar buf;\n\tvar acc;\n\tvar len;\n\tvar v;\n\tvar i;\n\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( reducer ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', reducer ) );\n\t}\n\tbuf = this._buffer;\n\tlen = this._length;\n\tif ( arguments.length > 1 ) {\n\t\tacc = initialValue;\n\t\ti = 0;\n\t} else {\n\t\tif ( len === 0 ) {\n\t\t\tthrow new Error( 'invalid operation. If not provided an initial value, an array must contain at least one element.' );\n\t\t}\n\t\tacc = getComplex64( buf, 0 );\n\t\ti = 1;\n\t}\n\tfor ( ; i < len; i++ ) {\n\t\tv = getComplex64( buf, i );\n\t\tacc = reducer( acc, v, i, this );\n\t}\n\treturn acc;\n});\n\n/**\n* Reverses an array in-place.\n*\n* @name reverse\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Complex64Array} reversed array\n*\n* @example\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* var arr = new Complex64Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var out = arr.reverse();\n* // returns \n*\n* var z = out.get( 0 );\n* // returns \n*\n* var re = realf( z );\n* // returns 3.0\n*\n* var im = imagf( z );\n* // returns 3.0\n*\n* z = out.get( 1 );\n* // returns \n*\n* re = realf( z );\n* // returns 2.0\n*\n* im = imagf( z );\n* // returns 2.0\n*\n* z = out.get( 2 );\n* // returns \n*\n* re = realf( z );\n* // returns 1.0\n*\n* im = imagf( z );\n* // returns 1.0\n*/\nsetReadOnly( Complex64Array.prototype, 'reverse', function reverse() {\n\tvar buf;\n\tvar tmp;\n\tvar len;\n\tvar N;\n\tvar i;\n\tvar j;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tlen = this._length;\n\tbuf = this._buffer;\n\tN = floor( len / 2 );\n\tfor ( i = 0; i < N; i++ ) {\n\t\tj = len - i - 1;\n\t\ttmp = buf[ (2*i) ];\n\t\tbuf[ (2*i) ] = buf[ (2*j) ];\n\t\tbuf[ (2*j) ] = tmp;\n\t\ttmp = buf[ (2*i)+1 ];\n\t\tbuf[ (2*i)+1 ] = buf[ (2*j)+1 ];\n\t\tbuf[ (2*j)+1 ] = tmp;\n\t}\n\treturn this;\n});\n\n/**\n* Sets an array element.\n*\n* ## Notes\n*\n* - When provided a typed array, real or complex, we must check whether the source array shares the same buffer as the target array and whether the underlying memory overlaps. In particular, we are concerned with the following scenario:\n*\n* ```text\n* buf: ---------------------\n* src: ---------------------\n* ```\n*\n* In the above, as we copy values from `src`, we will overwrite values in the `src` view, resulting in duplicated values copied into the end of `buf`, which is not intended. Hence, to avoid overwriting source values, we must **copy** source values to a temporary array.\n*\n* In the other overlapping scenario,\n*\n* ```text\n* buf: ---------------------\n* src: ---------------------\n* ```\n*\n* by the time we begin copying into the overlapping region, we are copying from the end of `src`, a non-overlapping region, which means we don't run the risk of copying copied values, rather than the original `src` values, as intended.\n*\n* @name set\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {(Collection|Complex|ComplexArray)} value - value(s)\n* @param {NonNegativeInteger} [i=0] - element index at which to start writing values\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be either a complex number, an array-like object, or a complex number array\n* @throws {TypeError} index argument must be a nonnegative integer\n* @throws {RangeError} array-like objects must have a length which is a multiple of two\n* @throws {RangeError} index argument is out-of-bounds\n* @throws {RangeError} target array lacks sufficient storage to accommodate source values\n* @returns {void}\n*\n* @example\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* var arr = new Complex64Array( 10 );\n*\n* var z = arr.get( 0 );\n* // returns \n*\n* var re = realf( z );\n* // returns 0.0\n*\n* var im = imagf( z );\n* // returns 0.0\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n*\n* z = arr.get( 0 );\n* // returns \n*\n* re = realf( z );\n* // returns 1.0\n*\n* im = imagf( z );\n* // returns -1.0\n*/\nsetReadOnly( Complex64Array.prototype, 'set', function set( value ) {\n\t/* eslint-disable no-underscore-dangle */\n\tvar sbuf;\n\tvar idx;\n\tvar buf;\n\tvar tmp;\n\tvar flg;\n\tvar N;\n\tvar v;\n\tvar i;\n\tvar j;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tbuf = this._buffer;\n\tif ( arguments.length > 1 ) {\n\t\tidx = arguments[ 1 ];\n\t\tif ( !isNonNegativeInteger( idx ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Index argument must be a nonnegative integer. Value: `%s`.', idx ) );\n\t\t}\n\t} else {\n\t\tidx = 0;\n\t}\n\tif ( isComplexLike( value ) ) {\n\t\tif ( idx >= this._length ) {\n\t\t\tthrow new RangeError( format( 'invalid argument. Index argument is out-of-bounds. Value: `%u`.', idx ) );\n\t\t}\n\t\tidx *= 2;\n\t\tbuf[ idx ] = realf( value );\n\t\tbuf[ idx+1 ] = imagf( value );\n\t\treturn;\n\t}\n\tif ( isComplexArray( value ) ) {\n\t\tN = value._length;\n\t\tif ( idx+N > this._length ) {\n\t\t\tthrow new RangeError( 'invalid arguments. Target array lacks sufficient storage to accommodate source values.' );\n\t\t}\n\t\tsbuf = value._buffer;\n\n\t\t// Check for overlapping memory...\n\t\tj = buf.byteOffset + (idx*BYTES_PER_ELEMENT);\n\t\tif (\n\t\t\tsbuf.buffer === buf.buffer &&\n\t\t\t(\n\t\t\t\tsbuf.byteOffset < j &&\n\t\t\t\tsbuf.byteOffset+sbuf.byteLength > j\n\t\t\t)\n\t\t) {\n\t\t\t// We need to copy source values...\n\t\t\ttmp = new Float32Array( sbuf.length );\n\t\t\tfor ( i = 0; i < sbuf.length; i++ ) {\n\t\t\t\ttmp[ i ] = sbuf[ i ];\n\t\t\t}\n\t\t\tsbuf = tmp;\n\t\t}\n\t\tidx *= 2;\n\t\tj = 0;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\tbuf[ idx ] = sbuf[ j ];\n\t\t\tbuf[ idx+1 ] = sbuf[ j+1 ];\n\t\t\tidx += 2; // stride\n\t\t\tj += 2; // stride\n\t\t}\n\t\treturn;\n\t}\n\tif ( isCollection( value ) ) {\n\t\t// Detect whether we've been provided an array of complex numbers...\n\t\tN = value.length;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\tif ( !isComplexLike( value[ i ] ) ) {\n\t\t\t\tflg = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t// If an array does not contain only complex numbers, then we assume interleaved real and imaginary components...\n\t\tif ( flg ) {\n\t\t\tif ( !isEven( N ) ) {\n\t\t\t\tthrow new RangeError( format( 'invalid argument. Array-like object arguments must have a length which is a multiple of two. Length: `%u`.', N ) );\n\t\t\t}\n\t\t\tif ( idx+(N/2) > this._length ) {\n\t\t\t\tthrow new RangeError( 'invalid arguments. Target array lacks sufficient storage to accommodate source values.' );\n\t\t\t}\n\t\t\tsbuf = value;\n\n\t\t\t// Check for overlapping memory...\n\t\t\tj = buf.byteOffset + (idx*BYTES_PER_ELEMENT);\n\t\t\tif (\n\t\t\t\tsbuf.buffer === buf.buffer &&\n\t\t\t\t(\n\t\t\t\t\tsbuf.byteOffset < j &&\n\t\t\t\t\tsbuf.byteOffset+sbuf.byteLength > j\n\t\t\t\t)\n\t\t\t) {\n\t\t\t\t// We need to copy source values...\n\t\t\t\ttmp = new Float32Array( N );\n\t\t\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\t\t\ttmp[ i ] = sbuf[ i ]; // TODO: handle accessor arrays\n\t\t\t\t}\n\t\t\t\tsbuf = tmp;\n\t\t\t}\n\t\t\tidx *= 2;\n\t\t\tN /= 2;\n\t\t\tj = 0;\n\t\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\t\tbuf[ idx ] = sbuf[ j ];\n\t\t\t\tbuf[ idx+1 ] = sbuf[ j+1 ];\n\t\t\t\tidx += 2; // stride\n\t\t\t\tj += 2; // stride\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\t// If an array contains only complex numbers, then we need to extract real and imaginary components...\n\t\tif ( idx+N > this._length ) {\n\t\t\tthrow new RangeError( 'invalid arguments. Target array lacks sufficient storage to accommodate source values.' );\n\t\t}\n\t\tidx *= 2;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\tv = value[ i ];\n\t\t\tbuf[ idx ] = realf( v );\n\t\t\tbuf[ idx+1 ] = imagf( v );\n\t\t\tidx += 2; // stride\n\t\t}\n\t\treturn;\n\t}\n\tthrow new TypeError( format( 'invalid argument. First argument must be either a complex number, an array-like object, or a complex number array. Value: `%s`.', value ) );\n\n\t/* eslint-enable no-underscore-dangle */\n});\n\n/**\n* Copies a portion of a typed array to a new typed array.\n*\n* @name slice\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {integer} [start=0] - starting index (inclusive)\n* @param {integer} [end] - ending index (exclusive)\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be an integer\n* @throws {TypeError} second argument must be an integer\n* @returns {Complex64Array} complex number array\n*\n* @example\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* var arr = new Complex64Array( 5 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n* arr.set( [ 4.0, -4.0 ], 3 );\n* arr.set( [ 5.0, -5.0 ], 4 );\n*\n* var out = arr.slice();\n* // returns \n*\n* var len = out.length;\n* // returns 5\n*\n* var z = out.get( 0 );\n* // returns \n*\n* var re = realf( z );\n* // returns 1.0\n*\n* var im = imagf( z );\n* // returns -1.0\n*\n* z = out.get( len-1 );\n* // returns \n*\n* re = realf( z );\n* // returns 5.0\n*\n* im = imagf( z );\n* // returns -5.0\n*\n* out = arr.slice( 1, -2 );\n* // returns \n*\n* len = out.length;\n* // returns 2\n*\n* z = out.get( 0 );\n* // returns \n*\n* re = realf( z );\n* // returns 2.0\n*\n* im = imagf( z );\n* // returns -2.0\n*\n* z = out.get( len-1 );\n* // returns \n*\n* re = realf( z );\n* // returns 3.0\n*\n* im = imagf( z );\n* // returns -3.0\n*/\nsetReadOnly( Complex64Array.prototype, 'slice', function slice( start, end ) {\n\tvar outlen;\n\tvar outbuf;\n\tvar out;\n\tvar idx;\n\tvar buf;\n\tvar len;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tbuf = this._buffer;\n\tlen = this._length;\n\tif ( arguments.length === 0 ) {\n\t\tstart = 0;\n\t\tend = len;\n\t} else {\n\t\tif ( !isInteger( start ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. First argument must be an integer. Value: `%s`.', start ) );\n\t\t}\n\t\tif ( start < 0 ) {\n\t\t\tstart += len;\n\t\t\tif ( start < 0 ) {\n\t\t\t\tstart = 0;\n\t\t\t}\n\t\t}\n\t\tif ( arguments.length === 1 ) {\n\t\t\tend = len;\n\t\t} else {\n\t\t\tif ( !isInteger( end ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be an integer. Value: `%s`.', end ) );\n\t\t\t}\n\t\t\tif ( end < 0 ) {\n\t\t\t\tend += len;\n\t\t\t\tif ( end < 0 ) {\n\t\t\t\t\tend = 0;\n\t\t\t\t}\n\t\t\t} else if ( end > len ) {\n\t\t\t\tend = len;\n\t\t\t}\n\t\t}\n\t}\n\tif ( start < end ) {\n\t\toutlen = end - start;\n\t} else {\n\t\toutlen = 0;\n\t}\n\tout = new this.constructor( outlen );\n\toutbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\tfor ( i = 0; i < outlen; i++ ) {\n\t\tidx = 2*(i+start);\n\t\toutbuf[ 2*i ] = buf[ idx ];\n\t\toutbuf[ (2*i)+1 ] = buf[ idx+1 ];\n\t}\n\treturn out;\n});\n\n/**\n* Tests whether at least one element in an array passes a test implemented by a predicate function.\n*\n* @name some\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {boolean} boolean indicating whether at least one element passes a test\n*\n* @example\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* function predicate( v ) {\n* return ( realf( v ) === imagf( v ) );\n* }\n*\n* var arr = new Complex64Array( 3 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n*\n* var bool = arr.some( predicate );\n* // returns true\n*/\nsetReadOnly( Complex64Array.prototype, 'some', function some( predicate, thisArg ) {\n\tvar buf;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tif ( predicate.call( thisArg, getComplex64( buf, i ), i, this ) ) {\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n});\n\n/**\n* Creates a new typed array view over the same underlying `ArrayBuffer` and with the same underlying data type as the host array.\n*\n* @name subarray\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {integer} [begin=0] - starting index (inclusive)\n* @param {integer} [end] - ending index (exclusive)\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be an integer\n* @throws {TypeError} second argument must be an integer\n* @returns {Complex64Array} subarray\n*\n* @example\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* var arr = new Complex64Array( 5 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n* arr.set( [ 4.0, -4.0 ], 3 );\n* arr.set( [ 5.0, -5.0 ], 4 );\n*\n* var subarr = arr.subarray();\n* // returns \n*\n* var len = subarr.length;\n* // returns 5\n*\n* var z = subarr.get( 0 );\n* // returns \n*\n* var re = realf( z );\n* // returns 1.0\n*\n* var im = imagf( z );\n* // returns -1.0\n*\n* z = subarr.get( len-1 );\n* // returns \n*\n* re = realf( z );\n* // returns 5.0\n*\n* im = imagf( z );\n* // returns -5.0\n*\n* subarr = arr.subarray( 1, -2 );\n* // returns \n*\n* len = subarr.length;\n* // returns 2\n*\n* z = subarr.get( 0 );\n* // returns \n*\n* re = realf( z );\n* // returns 2.0\n*\n* im = imagf( z );\n* // returns -2.0\n*\n* z = subarr.get( len-1 );\n* // returns \n*\n* re = realf( z );\n* // returns 3.0\n*\n* im = imagf( z );\n* // returns -3.0\n*/\nsetReadOnly( Complex64Array.prototype, 'subarray', function subarray( begin, end ) {\n\tvar offset;\n\tvar buf;\n\tvar len;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tbuf = this._buffer;\n\tlen = this._length;\n\tif ( arguments.length === 0 ) {\n\t\tbegin = 0;\n\t\tend = len;\n\t} else {\n\t\tif ( !isInteger( begin ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. First argument must be an integer. Value: `%s`.', begin ) );\n\t\t}\n\t\tif ( begin < 0 ) {\n\t\t\tbegin += len;\n\t\t\tif ( begin < 0 ) {\n\t\t\t\tbegin = 0;\n\t\t\t}\n\t\t}\n\t\tif ( arguments.length === 1 ) {\n\t\t\tend = len;\n\t\t} else {\n\t\t\tif ( !isInteger( end ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be an integer. Value: `%s`.', end ) );\n\t\t\t}\n\t\t\tif ( end < 0 ) {\n\t\t\t\tend += len;\n\t\t\t\tif ( end < 0 ) {\n\t\t\t\t\tend = 0;\n\t\t\t\t}\n\t\t\t} else if ( end > len ) {\n\t\t\t\tend = len;\n\t\t\t}\n\t\t}\n\t}\n\tif ( begin >= len ) {\n\t\tlen = 0;\n\t\toffset = buf.byteLength;\n\t} else if ( begin >= end ) {\n\t\tlen = 0;\n\t\toffset = buf.byteOffset + (begin*BYTES_PER_ELEMENT);\n\t} else {\n\t\tlen = end - begin;\n\t\toffset = buf.byteOffset + ( begin*BYTES_PER_ELEMENT );\n\t}\n\treturn new this.constructor( buf.buffer, offset, ( len < 0 ) ? 0 : len );\n});\n\n/**\n* Returns a new typed array containing the elements in reversed order.\n*\n* @name toReversed\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Complex64Array} reversed array\n*\n* @example\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* var arr = new Complex64Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var out = arr.toReversed();\n* // returns \n*\n* var z = out.get( 0 );\n* // returns \n*\n* var re = realf( z );\n* // returns 3.0\n*\n* var im = imagf( z );\n* // returns 3.0\n*\n* z = out.get( 1 );\n* // returns \n*\n* re = realf( z );\n* // returns 2.0\n*\n* im = imagf( z );\n* // returns 2.0\n*\n* z = out.get( 2 );\n* // returns \n*\n* re = realf( z );\n* // returns 1.0\n*\n* im = imagf( z );\n* // returns 1.0\n*/\nsetReadOnly( Complex64Array.prototype, 'toReversed', function toReversed() {\n\tvar outbuf;\n\tvar out;\n\tvar len;\n\tvar buf;\n\tvar i;\n\tvar j;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tlen = this._length;\n\tout = new this.constructor( len );\n\tbuf = this._buffer;\n\toutbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\tfor ( i = 0; i < len; i++ ) {\n\t\tj = len - i - 1;\n\t\toutbuf[ (2*i) ] = buf[ (2*j) ];\n\t\toutbuf[ (2*i)+1 ] = buf[ (2*j)+1 ];\n\t}\n\treturn out;\n});\n\n/**\n* Serializes an array as a string.\n*\n* @name toString\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @throws {TypeError} `this` must be a complex number array\n* @returns {string} string representation\n*\n* @example\n* var arr = new Complex64Array( 2 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n*\n* var str = arr.toString();\n* // returns '1 + 1i,2 + 2i'\n*/\nsetReadOnly( Complex64Array.prototype, 'toString', function toString() {\n\tvar out;\n\tvar buf;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tout = [];\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tout.push( getComplex64( buf, i ).toString() );\n\t}\n\treturn out.join( ',' );\n});\n\n/**\n* Returns a new typed array with the element at a provided index replaced with a provided value.\n*\n* @name with\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {integer} index - element index\n* @param {ComplexLike} value - new value\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be an integer\n* @throws {RangeError} index argument is out-of-bounds\n* @throws {TypeError} second argument must be a complex number\n* @returns {Complex64Array} new typed array\n*\n* @example\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n* import Complex64 from '@stdlib/complex-float32';\n*\n* var arr = new Complex64Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var out = arr.with( 0, new Complex64( 4.0, 4.0 ) );\n* // returns \n*\n* var z = out.get( 0 );\n* // returns \n*\n* var re = realf( z );\n* // returns 4.0\n*\n* var im = imagf( z );\n* // returns 4.0\n*/\nsetReadOnly( Complex64Array.prototype, 'with', function copyWith( index, value ) {\n\tvar buf;\n\tvar out;\n\tvar len;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isInteger( index ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be an integer. Value: `%s`.', index ) );\n\t}\n\tlen = this._length;\n\tif ( index < 0 ) {\n\t\tindex += len;\n\t}\n\tif ( index < 0 || index >= len ) {\n\t\tthrow new RangeError( format( 'invalid argument. Index argument is out-of-bounds. Value: `%s`.', index ) );\n\t}\n\tif ( !isComplexLike( value ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Second argument must be a complex number. Value: `%s`.', value ) );\n\t}\n\tout = new this.constructor( this._buffer );\n\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\tbuf[ 2*index ] = realf( value );\n\tbuf[ (2*index)+1 ] = imagf( value );\n\treturn out;\n});\n\n\n// EXPORTS //\n\nexport default Complex64Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport realf from '@stdlib/complex-realf';\nimport imagf from '@stdlib/complex-imagf';\n\n\n// MAIN //\n\n/**\n* Returns a strided array of real and imaginary components.\n*\n* @private\n* @param {Float32Array} buf - output array\n* @param {Array} arr - array containing complex numbers\n* @returns {(Float32Array|null)} output array or null\n*/\nfunction fromArray( buf, arr ) {\n\tvar len;\n\tvar v;\n\tvar i;\n\tvar j;\n\n\tlen = arr.length;\n\tj = 0;\n\tfor ( i = 0; i < len; i++ ) {\n\t\tv = arr[ i ];\n\t\tif ( !isComplexLike( v ) ) {\n\t\t\treturn null;\n\t\t}\n\t\tbuf[ j ] = realf( v );\n\t\tbuf[ j+1 ] = imagf( v );\n\t\tj += 2; // stride\n\t}\n\treturn buf;\n}\n\n\n// EXPORTS //\n\nexport default fromArray;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Returns the real component of a double-precision complex floating-point number.\n*\n* @param {Complex} z - complex number\n* @returns {number} real component\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n*\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var re = real( z );\n* // returns 5.0\n*/\nfunction real( z ) {\n\treturn z.re;\n}\n\n\n// EXPORTS //\n\nexport default real;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Returns the imaginary component of a double-precision complex floating-point number.\n*\n* @param {Complex} z - complex number\n* @returns {number} imaginary component\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n*\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var im = imag( z );\n* // returns 3.0\n*/\nfunction imag( z ) {\n\treturn z.im;\n}\n\n\n// EXPORTS //\n\nexport default imag;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isArrayLikeObject from '@stdlib/assert-is-array-like-object';\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport format from '@stdlib/string-format';\nimport real from '@stdlib/complex-real';\nimport imag from '@stdlib/complex-imag';\n\n\n// MAIN //\n\n/**\n* Returns an array of iterated values.\n*\n* @private\n* @param {Object} it - iterator\n* @returns {(Array|TypeError)} array or an error\n*/\nfunction fromIterator( it ) {\n\tvar out;\n\tvar v;\n\tvar z;\n\n\tout = [];\n\twhile ( true ) {\n\t\tv = it.next();\n\t\tif ( v.done ) {\n\t\t\tbreak;\n\t\t}\n\t\tz = v.value;\n\t\tif ( isArrayLikeObject( z ) && z.length >= 2 ) {\n\t\t\tout.push( z[ 0 ], z[ 1 ] );\n\t\t} else if ( isComplexLike( z ) ) {\n\t\t\tout.push( real( z ), imag( z ) );\n\t\t} else {\n\t\t\treturn new TypeError( format( 'invalid argument. An iterator must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', z ) );\n\t\t}\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default fromIterator;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isArrayLikeObject from '@stdlib/assert-is-array-like-object';\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport realf from '@stdlib/complex-realf';\nimport imagf from '@stdlib/complex-imagf';\nimport format from '@stdlib/string-format';\n\n\n// MAIN //\n\n/**\n* Returns an array of iterated values.\n*\n* @private\n* @param {Object} it - iterator\n* @param {Function} clbk - callback to invoke for each iterated value\n* @param {*} thisArg - invocation context\n* @returns {(Array|TypeError)} array or an error\n*/\nfunction fromIteratorMap( it, clbk, thisArg ) {\n\tvar out;\n\tvar v;\n\tvar z;\n\tvar i;\n\n\tout = [];\n\ti = -1;\n\twhile ( true ) {\n\t\tv = it.next();\n\t\tif ( v.done ) {\n\t\t\tbreak;\n\t\t}\n\t\ti += 1;\n\t\tz = clbk.call( thisArg, v.value, i );\n\t\tif ( isArrayLikeObject( z ) && z.length >= 2 ) {\n\t\t\tout.push( z[ 0 ], z[ 1 ] );\n\t\t} else if ( isComplexLike( z ) ) {\n\t\t\tout.push( realf( z ), imagf( z ) );\n\t\t} else {\n\t\t\treturn new TypeError( format( 'invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', z ) );\n\t\t}\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default fromIteratorMap;\n","/* eslint-disable no-restricted-syntax, max-lines, no-invalid-this */\n\n/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isNonNegativeInteger } from '@stdlib/assert-is-nonnegative-integer';\nimport isArrayLikeObject from '@stdlib/assert-is-array-like-object';\nimport isCollection from '@stdlib/assert-is-collection';\nimport isArrayBuffer from '@stdlib/assert-is-arraybuffer';\nimport isObject from '@stdlib/assert-is-object';\nimport isArray from '@stdlib/assert-is-array';\nimport isString from '@stdlib/assert-is-string';\nimport isFunction from '@stdlib/assert-is-function';\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport isEven from '@stdlib/math-base-assert-is-even';\nimport isInteger from '@stdlib/math-base-assert-is-integer';\nimport isComplex64Array from '@stdlib/array-base-assert-is-complex64array';\nimport isComplex128Array from '@stdlib/array-base-assert-is-complex128array';\nimport hasIteratorSymbolSupport from '@stdlib/assert-has-iterator-symbol-support';\nimport ITERATOR_SYMBOL from '@stdlib/symbol-iterator';\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport setReadOnlyAccessor from '@stdlib/utils-define-nonenumerable-read-only-accessor';\nimport Float64Array from '@stdlib/array-float64';\nimport Complex128 from '@stdlib/complex-float64';\nimport real from '@stdlib/complex-real';\nimport imag from '@stdlib/complex-imag';\nimport floor from '@stdlib/math-base-special-floor';\nimport reinterpret64 from '@stdlib/strided-base-reinterpret-complex64';\nimport reinterpret128 from '@stdlib/strided-base-reinterpret-complex128';\nimport getter from '@stdlib/array-base-getter';\nimport accessorGetter from '@stdlib/array-base-accessor-getter';\nimport format from '@stdlib/string-format';\nimport fromIterator from './from_iterator.js';\nimport fromIteratorMap from './from_iterator_map.js';\nimport fromArray from './from_array.js';\n\n\n// VARIABLES //\n\nvar BYTES_PER_ELEMENT = Float64Array.BYTES_PER_ELEMENT * 2;\nvar HAS_ITERATOR_SYMBOL = hasIteratorSymbolSupport();\n\n\n// FUNCTIONS //\n\n/**\n* Returns a boolean indicating if a value is a complex typed array.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a complex typed array\n*/\nfunction isComplexArray( value ) {\n\treturn (\n\t\tvalue instanceof Complex128Array ||\n\t\t(\n\t\t\ttypeof value === 'object' &&\n\t\t\tvalue !== null &&\n\t\t\t(\n\t\t\t\tvalue.constructor.name === 'Complex64Array' ||\n\t\t\t\tvalue.constructor.name === 'Complex128Array'\n\t\t\t) &&\n\t\t\ttypeof value._length === 'number' && // eslint-disable-line no-underscore-dangle\n\n\t\t\t// NOTE: we don't perform a more rigorous test here for a typed array for performance reasons, as robustly checking for a typed array instance could require walking the prototype tree and performing relatively expensive constructor checks...\n\t\t\ttypeof value._buffer === 'object' // eslint-disable-line no-underscore-dangle\n\t\t)\n\t);\n}\n\n/**\n* Returns a boolean indicating if a value is a complex typed array constructor.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a complex typed array constructor\n*/\nfunction isComplexArrayConstructor( value ) {\n\treturn (\n\t\tvalue === Complex128Array ||\n\n\t\t// NOTE: weaker test in order to avoid a circular dependency with Complex64Array...\n\t\tvalue.name === 'Complex64Array'\n\t);\n}\n\n/**\n* Retrieves a complex number from a complex number array buffer.\n*\n* @private\n* @param {Float64Array} buf - array buffer\n* @param {NonNegativeInteger} idx - element index\n* @returns {Complex128} complex number\n*/\nfunction getComplex128( buf, idx ) {\n\tidx *= 2;\n\treturn new Complex128( buf[ idx ], buf[ idx+1 ] );\n}\n\n\n// MAIN //\n\n/**\n* 128-bit complex number array constructor.\n*\n* @constructor\n* @param {(NonNegativeInteger|Collection|ArrayBuffer|Iterable)} [arg] - length, typed array, array-like object, buffer, or iterable\n* @param {NonNegativeInteger} [byteOffset=0] - byte offset\n* @param {NonNegativeInteger} [length] - view length\n* @throws {RangeError} ArrayBuffer byte length must be a multiple of `16`\n* @throws {RangeError} array-like object and typed array input arguments must have a length which is a multiple of two\n* @throws {TypeError} if provided only a single argument, must provide a valid argument\n* @throws {TypeError} byte offset must be a nonnegative integer\n* @throws {RangeError} byte offset must be a multiple of `16`\n* @throws {TypeError} view length must be a positive multiple of `16`\n* @throws {RangeError} must provide sufficient memory to accommodate byte offset and view length requirements\n* @throws {TypeError} an iterator must return either a two element array containing real and imaginary components or a complex number\n* @returns {Complex128Array} complex number array\n*\n* @example\n* var arr = new Complex128Array();\n* // returns \n*\n* var len = arr.length;\n* // returns 0\n*\n* @example\n* var arr = new Complex128Array( 2 );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*\n* @example\n* var arr = new Complex128Array( [ 1.0, -1.0 ] );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* import ArrayBuffer from '@stdlib/array-buffer';\n*\n* var buf = new ArrayBuffer( 32 );\n* var arr = new Complex128Array( buf );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*\n* @example\n* import ArrayBuffer from '@stdlib/array-buffer';\n*\n* var buf = new ArrayBuffer( 32 );\n* var arr = new Complex128Array( buf, 16 );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* import ArrayBuffer from '@stdlib/array-buffer';\n*\n* var buf = new ArrayBuffer( 64 );\n* var arr = new Complex128Array( buf, 16, 2 );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*/\nfunction Complex128Array() {\n\tvar byteOffset;\n\tvar nargs;\n\tvar buf;\n\tvar len;\n\n\tnargs = arguments.length;\n\tif ( !(this instanceof Complex128Array) ) {\n\t\tif ( nargs === 0 ) {\n\t\t\treturn new Complex128Array();\n\t\t}\n\t\tif ( nargs === 1 ) {\n\t\t\treturn new Complex128Array( arguments[0] );\n\t\t}\n\t\tif ( nargs === 2 ) {\n\t\t\treturn new Complex128Array( arguments[0], arguments[1] );\n\t\t}\n\t\treturn new Complex128Array( arguments[0], arguments[1], arguments[2] );\n\t}\n\t// Create the underlying data buffer...\n\tif ( nargs === 0 ) {\n\t\tbuf = new Float64Array( 0 ); // backward-compatibility\n\t} else if ( nargs === 1 ) {\n\t\tif ( isNonNegativeInteger( arguments[0] ) ) {\n\t\t\tbuf = new Float64Array( arguments[0]*2 );\n\t\t} else if ( isCollection( arguments[0] ) ) {\n\t\t\tbuf = arguments[ 0 ];\n\t\t\tlen = buf.length;\n\n\t\t\t// If provided a \"generic\" array, peak at the first value, and, if the value is a complex number, try to process as an array of complex numbers, falling back to \"normal\" typed array initialization if we fail and ensuring consistency if the first value had not been a complex number...\n\t\t\tif ( len && isArray( buf ) && isComplexLike( buf[0] ) ) {\n\t\t\t\tbuf = fromArray( new Float64Array( len*2 ), buf );\n\t\t\t\tif ( buf === null ) {\n\t\t\t\t\t// We failed and we are now forced to allocate a new array :-(\n\t\t\t\t\tif ( !isEven( len ) ) {\n\t\t\t\t\t\tthrow new RangeError( format( 'invalid argument. Array-like object arguments must have a length which is a multiple of two. Length: `%u`.', len ) );\n\t\t\t\t\t}\n\t\t\t\t\t// We failed, so fall back to directly setting values...\n\t\t\t\t\tbuf = new Float64Array( arguments[0] );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ( isComplex64Array( buf ) ) {\n\t\t\t\t\tbuf = reinterpret64( buf, 0 );\n\t\t\t\t} else if ( isComplex128Array( buf ) ) {\n\t\t\t\t\tbuf = reinterpret128( buf, 0 );\n\t\t\t\t} else if ( !isEven( len ) ) {\n\t\t\t\t\tthrow new RangeError( format( 'invalid argument. Array-like object and typed array arguments must have a length which is a multiple of two. Length: `%u`.', len ) );\n\t\t\t\t}\n\t\t\t\tbuf = new Float64Array( buf );\n\t\t\t}\n\t\t} else if ( isArrayBuffer( arguments[0] ) ) {\n\t\t\tbuf = arguments[ 0 ];\n\t\t\tif ( !isInteger( buf.byteLength/BYTES_PER_ELEMENT ) ) {\n\t\t\t\tthrow new RangeError( format( 'invalid argument. ArrayBuffer byte length must be a multiple of %u. Byte length: `%u`.', BYTES_PER_ELEMENT, buf.byteLength ) );\n\t\t\t}\n\t\t\tbuf = new Float64Array( buf );\n\t\t} else if ( isObject( arguments[0] ) ) {\n\t\t\tbuf = arguments[ 0 ];\n\t\t\tif ( HAS_ITERATOR_SYMBOL === false ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Environment lacks Symbol.iterator support. Must provide a length, ArrayBuffer, typed array, or array-like object. Value: `%s`.', buf ) );\n\t\t\t}\n\t\t\tif ( !isFunction( buf[ ITERATOR_SYMBOL ] ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.', buf ) );\n\t\t\t}\n\t\t\tbuf = buf[ ITERATOR_SYMBOL ]();\n\t\t\tif ( !isFunction( buf.next ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.', buf ) );\n\t\t\t}\n\t\t\tbuf = fromIterator( buf );\n\t\t\tif ( buf instanceof Error ) {\n\t\t\t\tthrow buf;\n\t\t\t}\n\t\t\tbuf = new Float64Array( buf );\n\t\t} else {\n\t\t\tthrow new TypeError( format( 'invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.', arguments[0] ) );\n\t\t}\n\t} else {\n\t\tbuf = arguments[ 0 ];\n\t\tif ( !isArrayBuffer( buf ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. First argument must be an ArrayBuffer. Value: `%s`.', buf ) );\n\t\t}\n\t\tbyteOffset = arguments[ 1 ];\n\t\tif ( !isNonNegativeInteger( byteOffset ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Byte offset must be a nonnegative integer. Value: `%s`.', byteOffset ) );\n\t\t}\n\t\tif ( !isInteger( byteOffset/BYTES_PER_ELEMENT ) ) {\n\t\t\tthrow new RangeError( format( 'invalid argument. Byte offset must be a multiple of %u. Value: `%u`.', BYTES_PER_ELEMENT, byteOffset ) );\n\t\t}\n\t\tif ( nargs === 2 ) {\n\t\t\tlen = buf.byteLength - byteOffset;\n\t\t\tif ( !isInteger( len/BYTES_PER_ELEMENT ) ) {\n\t\t\t\tthrow new RangeError( format( 'invalid arguments. ArrayBuffer view byte length must be a multiple of %u. View byte length: `%u`.', BYTES_PER_ELEMENT, len ) );\n\t\t\t}\n\t\t\tbuf = new Float64Array( buf, byteOffset );\n\t\t} else {\n\t\t\tlen = arguments[ 2 ];\n\t\t\tif ( !isNonNegativeInteger( len ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Length must be a nonnegative integer. Value: `%s`.', len ) );\n\t\t\t}\n\t\t\tif ( (len*BYTES_PER_ELEMENT) > (buf.byteLength-byteOffset) ) {\n\t\t\t\tthrow new RangeError( format( 'invalid arguments. ArrayBuffer has insufficient capacity. Either decrease the array length or provide a bigger buffer. Minimum capacity: `%u`.', len*BYTES_PER_ELEMENT ) );\n\t\t\t}\n\t\t\tbuf = new Float64Array( buf, byteOffset, len*2 );\n\t\t}\n\t}\n\tsetReadOnly( this, '_buffer', buf );\n\tsetReadOnly( this, '_length', buf.length/2 );\n\n\treturn this;\n}\n\n/**\n* Size (in bytes) of each array element.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex128Array\n* @readonly\n* @type {PositiveInteger}\n* @default 16\n*\n* @example\n* var nbytes = Complex128Array.BYTES_PER_ELEMENT;\n* // returns 16\n*/\nsetReadOnly( Complex128Array, 'BYTES_PER_ELEMENT', BYTES_PER_ELEMENT );\n\n/**\n* Constructor name.\n*\n* @name name\n* @memberof Complex128Array\n* @readonly\n* @type {string}\n* @default 'Complex128Array'\n*\n* @example\n* var name = Complex128Array.name;\n* // returns 'Complex128Array'\n*/\nsetReadOnly( Complex128Array, 'name', 'Complex128Array' );\n\n/**\n* Creates a new 128-bit complex number array from an array-like object or an iterable.\n*\n* @name from\n* @memberof Complex128Array\n* @type {Function}\n* @param {(Collection|Object)} src - array-like object or iterable\n* @param {Function} [clbk] - callback to invoke for each source element\n* @param {*} [thisArg] - context\n* @throws {TypeError} `this` context must be a constructor\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be an array-like object or an iterable\n* @throws {TypeError} second argument must be a function\n* @throws {RangeError} array-like objects must have a length which is a multiple of two\n* @throws {TypeError} an iterator must return either a two element array containing real and imaginary components or a complex number\n* @throws {TypeError} when provided an iterator, a callback must return either a two element array containing real and imaginary components or a complex number\n* @returns {Complex128Array} 128-bit complex number array\n*\n* @example\n* var arr = Complex128Array.from( [ 1.0, -1.0 ] );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n*\n* var arr = Complex128Array.from( [ new Complex128( 1.0, 1.0 ) ] );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* function clbk( v ) {\n* return new Complex128( real(v)*2.0, imag(v)*2.0 );\n* }\n*\n* var arr = Complex128Array.from( [ new Complex128( 1.0, 1.0 ) ], clbk );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*/\nsetReadOnly( Complex128Array, 'from', function from( src ) {\n\tvar thisArg;\n\tvar nargs;\n\tvar clbk;\n\tvar out;\n\tvar buf;\n\tvar tmp;\n\tvar get;\n\tvar len;\n\tvar flg;\n\tvar v;\n\tvar i;\n\tvar j;\n\tif ( !isFunction( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` context must be a constructor.' );\n\t}\n\tif ( !isComplexArrayConstructor( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tnargs = arguments.length;\n\tif ( nargs > 1 ) {\n\t\tclbk = arguments[ 1 ];\n\t\tif ( !isFunction( clbk ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be a function. Value: `%s`.', clbk ) );\n\t\t}\n\t\tif ( nargs > 2 ) {\n\t\t\tthisArg = arguments[ 2 ];\n\t\t}\n\t}\n\tif ( isComplexArray( src ) ) {\n\t\tlen = src.length;\n\t\tif ( clbk ) {\n\t\t\tout = new this( len );\n\t\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\t\tj = 0;\n\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\tv = clbk.call( thisArg, src.get( i ), i );\n\t\t\t\tif ( isComplexLike( v ) ) {\n\t\t\t\t\tbuf[ j ] = real( v );\n\t\t\t\t\tbuf[ j+1 ] = imag( v );\n\t\t\t\t} else if ( isArrayLikeObject( v ) && v.length >= 2 ) {\n\t\t\t\t\tbuf[ j ] = v[ 0 ];\n\t\t\t\t\tbuf[ j+1 ] = v[ 1 ];\n\t\t\t\t} else {\n\t\t\t\t\tthrow new TypeError( format( 'invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', v ) );\n\t\t\t\t}\n\t\t\t\tj += 2; // stride\n\t\t\t}\n\t\t\treturn out;\n\t\t}\n\t\treturn new this( src );\n\t}\n\tif ( isCollection( src ) ) {\n\t\tif ( clbk ) {\n\t\t\t// Note: array contents affect how we iterate over a provided data source. If only complex number objects, we can extract real and imaginary components. Otherwise, for non-complex number arrays (e.g., `Float64Array`, etc), we assume a strided array where real and imaginary components are interleaved. In the former case, we expect a callback to return real and imaginary components (possibly as a complex number). In the latter case, we expect a callback to return *either* a real or imaginary component.\n\n\t\t\tlen = src.length;\n\t\t\tif ( src.get && src.set ) {\n\t\t\t\tget = accessorGetter( 'default' );\n\t\t\t} else {\n\t\t\t\tget = getter( 'default' );\n\t\t\t}\n\t\t\t// Detect whether we've been provided an array which returns complex number objects...\n\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\tif ( !isComplexLike( get( src, i ) ) ) {\n\t\t\t\t\tflg = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// If an array does not contain only complex number objects, then we assume interleaved real and imaginary components...\n\t\t\tif ( flg ) {\n\t\t\t\tif ( !isEven( len ) ) {\n\t\t\t\t\tthrow new RangeError( format( 'invalid argument. First argument must have a length which is a multiple of two. Length: `%u`.', len ) );\n\t\t\t\t}\n\t\t\t\tout = new this( len/2 );\n\t\t\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\t\tbuf[ i ] = clbk.call( thisArg, get( src, i ), i );\n\t\t\t\t}\n\t\t\t\treturn out;\n\t\t\t}\n\t\t\t// If an array contains only complex number objects, then we need to extract real and imaginary components...\n\t\t\tout = new this( len );\n\t\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\t\tj = 0;\n\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\tv = clbk.call( thisArg, get( src, i ), i );\n\t\t\t\tif ( isComplexLike( v ) ) {\n\t\t\t\t\tbuf[ j ] = real( v );\n\t\t\t\t\tbuf[ j+1 ] = imag( v );\n\t\t\t\t} else if ( isArrayLikeObject( v ) && v.length >= 2 ) {\n\t\t\t\t\tbuf[ j ] = v[ 0 ];\n\t\t\t\t\tbuf[ j+1 ] = v[ 1 ];\n\t\t\t\t} else {\n\t\t\t\t\tthrow new TypeError( format( 'invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', v ) );\n\t\t\t\t}\n\t\t\t\tj += 2; // stride\n\t\t\t}\n\t\t\treturn out;\n\t\t}\n\t\treturn new this( src );\n\t}\n\tif ( isObject( src ) && HAS_ITERATOR_SYMBOL && isFunction( src[ ITERATOR_SYMBOL ] ) ) { // eslint-disable-line max-len\n\t\tbuf = src[ ITERATOR_SYMBOL ]();\n\t\tif ( !isFunction( buf.next ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.', src ) );\n\t\t}\n\t\tif ( clbk ) {\n\t\t\ttmp = fromIteratorMap( buf, clbk, thisArg );\n\t\t} else {\n\t\t\ttmp = fromIterator( buf );\n\t\t}\n\t\tif ( tmp instanceof Error ) {\n\t\t\tthrow tmp;\n\t\t}\n\t\tlen = tmp.length / 2;\n\t\tout = new this( len );\n\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\tbuf[ i ] = tmp[ i ];\n\t\t}\n\t\treturn out;\n\t}\n\tthrow new TypeError( format( 'invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.', src ) );\n});\n\n/**\n* Creates a new 128-bit complex number array from a variable number of arguments.\n*\n* @name of\n* @memberof Complex128Array\n* @type {Function}\n* @param {...*} element - array elements\n* @throws {TypeError} `this` context must be a constructor\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Complex128Array} 128-bit complex number array\n*\n* @example\n* var arr = Complex128Array.of( 1.0, 1.0, 1.0, 1.0 );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*/\nsetReadOnly( Complex128Array, 'of', function of() {\n\tvar args;\n\tvar i;\n\tif ( !isFunction( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` context must be a constructor.' );\n\t}\n\tif ( !isComplexArrayConstructor( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\targs = [];\n\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\targs.push( arguments[ i ] );\n\t}\n\treturn new this( args );\n});\n\n/**\n* Returns an array element with support for both nonnegative and negative integer indices.\n*\n* @name at\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {integer} idx - element index\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} must provide an integer\n* @returns {(Complex128|void)} array element\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* var arr = new Complex128Array( 10 );\n*\n* var z = arr.at( 0 );\n* // returns \n*\n* var re = real( z );\n* // returns 0.0\n*\n* var im = imag( z );\n* // returns 0.0\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 9.0, -9.0 ], 9 );\n*\n* z = arr.at( 0 );\n* // returns \n*\n* re = real( z );\n* // returns 1.0\n*\n* im = imag( z );\n* // returns -1.0\n*\n* z = arr.at( -1 );\n* // returns \n*\n* re = real( z );\n* // returns 9.0\n*\n* im = imag( z );\n* // returns -9.0\n*\n* z = arr.at( 100 );\n* // returns undefined\n*\n* z = arr.at( -100 );\n* // returns undefined\n*/\nsetReadOnly( Complex128Array.prototype, 'at', function at( idx ) {\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isInteger( idx ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Must provide an integer. Value: `%s`.', idx ) );\n\t}\n\tif ( idx < 0 ) {\n\t\tidx += this._length;\n\t}\n\tif ( idx < 0 || idx >= this._length ) {\n\t\treturn;\n\t}\n\treturn getComplex128( this._buffer, idx );\n});\n\n/**\n* Pointer to the underlying data buffer.\n*\n* @name buffer\n* @memberof Complex128Array.prototype\n* @readonly\n* @type {ArrayBuffer}\n*\n* @example\n* var arr = new Complex128Array( 10 );\n*\n* var buf = arr.buffer;\n* // returns \n*/\nsetReadOnlyAccessor( Complex128Array.prototype, 'buffer', function get() {\n\treturn this._buffer.buffer;\n});\n\n/**\n* Size (in bytes) of the array.\n*\n* @name byteLength\n* @memberof Complex128Array.prototype\n* @readonly\n* @type {NonNegativeInteger}\n*\n* @example\n* var arr = new Complex128Array( 10 );\n*\n* var byteLength = arr.byteLength;\n* // returns 160\n*/\nsetReadOnlyAccessor( Complex128Array.prototype, 'byteLength', function get() {\n\treturn this._buffer.byteLength;\n});\n\n/**\n* Offset (in bytes) of the array from the start of its underlying `ArrayBuffer`.\n*\n* @name byteOffset\n* @memberof Complex128Array.prototype\n* @readonly\n* @type {NonNegativeInteger}\n*\n* @example\n* var arr = new Complex128Array( 10 );\n*\n* var byteOffset = arr.byteOffset;\n* // returns 0\n*/\nsetReadOnlyAccessor( Complex128Array.prototype, 'byteOffset', function get() {\n\treturn this._buffer.byteOffset;\n});\n\n/**\n* Size (in bytes) of each array element.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex128Array.prototype\n* @readonly\n* @type {PositiveInteger}\n* @default 16\n*\n* @example\n* var arr = new Complex128Array( 10 );\n*\n* var nbytes = arr.BYTES_PER_ELEMENT;\n* // returns 16\n*/\nsetReadOnly( Complex128Array.prototype, 'BYTES_PER_ELEMENT', Complex128Array.BYTES_PER_ELEMENT );\n\n/**\n* Copies a sequence of elements within the array to the position starting at `target`.\n*\n* @name copyWithin\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {integer} target - index at which to start copying elements\n* @param {integer} start - source index at which to copy elements from\n* @param {integer} [end] - source index at which to stop copying elements from\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Complex128Array} modified array\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* var arr = new Complex128Array( 4 );\n*\n* // Set the array elements:\n* arr.set( new Complex128( 1.0, 1.0 ), 0 );\n* arr.set( new Complex128( 2.0, 2.0 ), 1 );\n* arr.set( new Complex128( 3.0, 3.0 ), 2 );\n* arr.set( new Complex128( 4.0, 4.0 ), 3 );\n*\n* // Copy the first two elements to the last two elements:\n* arr.copyWithin( 2, 0, 2 );\n*\n* // Get the last array element:\n* var z = arr.get( 3 );\n*\n* var re = real( z );\n* // returns 2.0\n*\n* var im = imag( z );\n* // returns 2.0\n*/\nsetReadOnly( Complex128Array.prototype, 'copyWithin', function copyWithin( target, start ) {\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\t// FIXME: prefer a functional `copyWithin` implementation which addresses lack of universal browser support (e.g., IE11 and Safari) or ensure that typed arrays are polyfilled\n\tif ( arguments.length === 2 ) {\n\t\tthis._buffer.copyWithin( target*2, start*2 );\n\t} else {\n\t\tthis._buffer.copyWithin( target*2, start*2, arguments[2]*2 );\n\t}\n\treturn this;\n});\n\n/**\n* Returns an iterator for iterating over array key-value pairs.\n*\n* @name entries\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Iterator} iterator\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n*\n* var arr = [\n* new Complex128( 1.0, 1.0 ),\n* new Complex128( 2.0, 2.0 ),\n* new Complex128( 3.0, 3.0 )\n* ];\n* arr = new Complex128Array( arr );\n*\n* // Create an iterator:\n* var it = arr.entries();\n*\n* // Iterate over the key-value pairs...\n* var v = it.next().value;\n* // returns [ 0, ]\n*\n* v = it.next().value;\n* // returns [ 1, ]\n*\n* v = it.next().value;\n* // returns [ 2, ]\n*\n* var bool = it.next().done;\n* // returns true\n*/\nsetReadOnly( Complex128Array.prototype, 'entries', function entries() {\n\tvar buffer;\n\tvar self;\n\tvar iter;\n\tvar len;\n\tvar FLG;\n\tvar i;\n\tvar j;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tself = this;\n\tbuffer = this._buffer;\n\tlen = this._length;\n\n\t// Initialize the iteration indices:\n\ti = -1;\n\tj = -2;\n\n\t// Create an iterator protocol-compliant object:\n\titer = {};\n\tsetReadOnly( iter, 'next', next );\n\tsetReadOnly( iter, 'return', end );\n\n\tif ( ITERATOR_SYMBOL ) {\n\t\tsetReadOnly( iter, ITERATOR_SYMBOL, factory );\n\t}\n\treturn iter;\n\n\t/**\n\t* Returns an iterator protocol-compliant object containing the next iterated value.\n\t*\n\t* @private\n\t* @returns {Object} iterator protocol-compliant object\n\t*/\n\tfunction next() {\n\t\tvar z;\n\t\ti += 1;\n\t\tif ( FLG || i >= len ) {\n\t\t\treturn {\n\t\t\t\t'done': true\n\t\t\t};\n\t\t}\n\t\tj += 2;\n\t\tz = new Complex128( buffer[ j ], buffer[ j+1 ] );\n\t\treturn {\n\t\t\t'value': [ i, z ],\n\t\t\t'done': false\n\t\t};\n\t}\n\n\t/**\n\t* Finishes an iterator.\n\t*\n\t* @private\n\t* @param {*} [value] - value to return\n\t* @returns {Object} iterator protocol-compliant object\n\t*/\n\tfunction end( value ) {\n\t\tFLG = true;\n\t\tif ( arguments.length ) {\n\t\t\treturn {\n\t\t\t\t'value': value,\n\t\t\t\t'done': true\n\t\t\t};\n\t\t}\n\t\treturn {\n\t\t\t'done': true\n\t\t};\n\t}\n\n\t/**\n\t* Returns a new iterator.\n\t*\n\t* @private\n\t* @returns {Iterator} iterator\n\t*/\n\tfunction factory() {\n\t\treturn self.entries();\n\t}\n});\n\n/**\n* Tests whether all elements in an array pass a test implemented by a predicate function.\n*\n* @name every\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {boolean} boolean indicating whether all elements pass a test\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* function predicate( v ) {\n* return ( real( v ) === imag( v ) );\n* }\n*\n* var arr = new Complex128Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var bool = arr.every( predicate );\n* // returns true\n*/\nsetReadOnly( Complex128Array.prototype, 'every', function every( predicate, thisArg ) {\n\tvar buf;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tif ( !predicate.call( thisArg, getComplex128( buf, i ), i, this ) ) {\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn true;\n});\n\n/**\n* Returns a modified typed array filled with a fill value.\n*\n* @name fill\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {ComplexLike} value - fill value\n* @param {integer} [start=0] - starting index (inclusive)\n* @param {integer} [end] - ending index (exclusive)\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a complex number\n* @throws {TypeError} second argument must be an integer\n* @throws {TypeError} third argument must be an integer\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* var arr = new Complex128Array( 3 );\n*\n* arr.fill( new Complex128( 1.0, 1.0 ), 1 );\n*\n* var z = arr.get( 1 );\n* // returns \n*\n* var re = real( z );\n* // returns 1.0\n*\n* var im = imag( z );\n* // returns 1.0\n*\n* z = arr.get( 1 );\n* // returns \n*\n* re = real( z );\n* // returns 1.0\n*\n* im = imag( z );\n* // returns 1.0\n*/\nsetReadOnly( Complex128Array.prototype, 'fill', function fill( value, start, end ) {\n\tvar buf;\n\tvar len;\n\tvar idx;\n\tvar re;\n\tvar im;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isComplexLike( value ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a complex number. Value: `%s`.', value ) );\n\t}\n\tbuf = this._buffer;\n\tlen = this._length;\n\tif ( arguments.length > 1 ) {\n\t\tif ( !isInteger( start ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be an integer. Value: `%s`.', start ) );\n\t\t}\n\t\tif ( start < 0 ) {\n\t\t\tstart += len;\n\t\t\tif ( start < 0 ) {\n\t\t\t\tstart = 0;\n\t\t\t}\n\t\t}\n\t\tif ( arguments.length > 2 ) {\n\t\t\tif ( !isInteger( end ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Third argument must be an integer. Value: `%s`.', end ) );\n\t\t\t}\n\t\t\tif ( end < 0 ) {\n\t\t\t\tend += len;\n\t\t\t\tif ( end < 0 ) {\n\t\t\t\t\tend = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( end > len ) {\n\t\t\t\tend = len;\n\t\t\t}\n\t\t} else {\n\t\t\tend = len;\n\t\t}\n\t} else {\n\t\tstart = 0;\n\t\tend = len;\n\t}\n\tre = real( value );\n\tim = imag( value );\n\tfor ( i = start; i < end; i++ ) {\n\t\tidx = 2*i;\n\t\tbuf[ idx ] = re;\n\t\tbuf[ idx+1 ] = im;\n\t}\n\treturn this;\n});\n\n/**\n* Returns a new array containing the elements of an array which pass a test implemented by a predicate function.\n*\n* @name filter\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {Complex128Array} complex number array\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* function predicate( v ) {\n* return ( real( v ) === imag( v ) );\n* }\n*\n* var arr = new Complex128Array( 3 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n*\n* var out = arr.filter( predicate );\n* // returns \n*\n* var len = out.length;\n* // returns 1\n*\n* var z = out.get( 0 );\n* // returns \n*\n* var re = real( z );\n* // returns 2.0\n*\n* var im = imag( z );\n* // returns 2.0\n*/\nsetReadOnly( Complex128Array.prototype, 'filter', function filter( predicate, thisArg ) {\n\tvar buf;\n\tvar out;\n\tvar i;\n\tvar z;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tout = [];\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tz = getComplex128( buf, i );\n\t\tif ( predicate.call( thisArg, z, i, this ) ) {\n\t\t\tout.push( z );\n\t\t}\n\t}\n\treturn new this.constructor( out );\n});\n\n/**\n* Returns the first element in an array for which a predicate function returns a truthy value.\n*\n* @name find\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {(Complex128|void)} array element or undefined\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* function predicate( v ) {\n* return ( real( v ) === imag( v ) );\n* }\n*\n* var arr = new Complex128Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var z = arr.find( predicate );\n* // returns \n*\n* var re = real( z );\n* // returns 1.0\n*\n* var im = imag( z );\n* // returns 1.0\n*/\nsetReadOnly( Complex128Array.prototype, 'find', function find( predicate, thisArg ) {\n\tvar buf;\n\tvar i;\n\tvar z;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tz = getComplex128( buf, i );\n\t\tif ( predicate.call( thisArg, z, i, this ) ) {\n\t\t\treturn z;\n\t\t}\n\t}\n});\n\n/**\n* Returns the index of the first element in an array for which a predicate function returns a truthy value.\n*\n* @name findIndex\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {integer} index or -1\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* function predicate( v ) {\n* return ( real( v ) === imag( v ) );\n* }\n*\n* var arr = new Complex128Array( 3 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var idx = arr.findIndex( predicate );\n* // returns 2\n*/\nsetReadOnly( Complex128Array.prototype, 'findIndex', function findIndex( predicate, thisArg ) {\n\tvar buf;\n\tvar i;\n\tvar z;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tz = getComplex128( buf, i );\n\t\tif ( predicate.call( thisArg, z, i, this ) ) {\n\t\t\treturn i;\n\t\t}\n\t}\n\treturn -1;\n});\n\n/**\n* Returns the last element in an array for which a predicate function returns a truthy value.\n*\n* @name findLast\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {(Complex128|void)} array element or undefined\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* function predicate( v ) {\n* return ( real( v ) === imag( v ) );\n* }\n*\n* var arr = new Complex128Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var z = arr.findLast( predicate );\n* // returns \n*\n* var re = real( z );\n* // returns 3.0\n*\n* var im = imag( z );\n* // returns 3.0\n*/\nsetReadOnly( Complex128Array.prototype, 'findLast', function findLast( predicate, thisArg ) {\n\tvar buf;\n\tvar i;\n\tvar z;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = this._length-1; i >= 0; i-- ) {\n\t\tz = getComplex128( buf, i );\n\t\tif ( predicate.call( thisArg, z, i, this ) ) {\n\t\t\treturn z;\n\t\t}\n\t}\n});\n\n/**\n* Returns the index of the last element in an array for which a predicate function returns a truthy value.\n*\n* @name findLastIndex\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {integer} index or -1\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* function predicate( v ) {\n* return ( real( v ) === imag( v ) );\n* }\n*\n* var arr = new Complex128Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n*\n* var idx = arr.findLastIndex( predicate );\n* // returns 1\n*/\nsetReadOnly( Complex128Array.prototype, 'findLastIndex', function findLastIndex( predicate, thisArg ) {\n\tvar buf;\n\tvar i;\n\tvar z;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = this._length-1; i >= 0; i-- ) {\n\t\tz = getComplex128( buf, i );\n\t\tif ( predicate.call( thisArg, z, i, this ) ) {\n\t\t\treturn i;\n\t\t}\n\t}\n\treturn -1;\n});\n\n/**\n* Invokes a function once for each array element.\n*\n* @name forEach\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {Function} fcn - function to invoke\n* @param {*} [thisArg] - function invocation context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n*\n* function log( v, i ) {\n* console.log( '%s: %s', i, v.toString() );\n* }\n*\n* var arr = new Complex128Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* arr.forEach( log );\n*/\nsetReadOnly( Complex128Array.prototype, 'forEach', function forEach( fcn, thisArg ) {\n\tvar buf;\n\tvar i;\n\tvar z;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( fcn ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', fcn ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tz = getComplex128( buf, i );\n\t\tfcn.call( thisArg, z, i, this );\n\t}\n});\n\n/**\n* Returns an array element.\n*\n* @name get\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {NonNegativeInteger} idx - element index\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} must provide a nonnegative integer\n* @returns {(Complex128|void)} array element\n*\n* @example\n* var arr = new Complex128Array( 10 );\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* var z = arr.get( 0 );\n* // returns \n*\n* var re = real( z );\n* // returns 0.0\n*\n* var im = imag( z );\n* // returns 0.0\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n*\n* z = arr.get( 0 );\n* // returns \n*\n* re = real( z );\n* // returns 1.0\n*\n* im = imag( z );\n* // returns -1.0\n*\n* z = arr.get( 100 );\n* // returns undefined\n*/\nsetReadOnly( Complex128Array.prototype, 'get', function get( idx ) {\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isNonNegativeInteger( idx ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Must provide a nonnegative integer. Value: `%s`.', idx ) );\n\t}\n\tif ( idx >= this._length ) {\n\t\treturn;\n\t}\n\treturn getComplex128( this._buffer, idx );\n});\n\n/**\n* Number of array elements.\n*\n* @name length\n* @memberof Complex128Array.prototype\n* @readonly\n* @type {NonNegativeInteger}\n*\n* @example\n* var arr = new Complex128Array( 10 );\n*\n* var len = arr.length;\n* // returns 10\n*/\nsetReadOnlyAccessor( Complex128Array.prototype, 'length', function get() {\n\treturn this._length;\n});\n\n/**\n* Returns a boolean indicating whether an array includes a provided value.\n*\n* @name includes\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {ComplexLike} searchElement - search element\n* @param {integer} [fromIndex=0] - starting index (inclusive)\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a complex number\n* @throws {TypeError} second argument must be an integer\n* @returns {boolean} boolean indicating whether an array includes a provided value\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n*\n* var arr = new Complex128Array( 5 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n* arr.set( [ 4.0, -4.0 ], 3 );\n* arr.set( [ 5.0, -5.0 ], 4 );\n*\n* var bool = arr.includes( new Complex128( 3.0, -3.0 ) );\n* // returns true\n*\n* bool = arr.includes( new Complex128( 3.0, -3.0 ), 3 );\n* // returns false\n*\n* bool = arr.includes( new Complex128( 4.0, -4.0 ), -3 );\n* // returns true\n*/\nsetReadOnly( Complex128Array.prototype, 'includes', function includes( searchElement, fromIndex ) {\n\tvar buf;\n\tvar idx;\n\tvar re;\n\tvar im;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isComplexLike( searchElement ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a complex number. Value: `%s`.', searchElement ) );\n\t}\n\tif ( arguments.length > 1 ) {\n\t\tif ( !isInteger( fromIndex ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be an integer. Value: `%s`.', fromIndex ) );\n\t\t}\n\t\tif ( fromIndex < 0 ) {\n\t\t\tfromIndex += this._length;\n\t\t\tif ( fromIndex < 0 ) {\n\t\t\t\tfromIndex = 0;\n\t\t\t}\n\t\t}\n\t} else {\n\t\tfromIndex = 0;\n\t}\n\tre = real( searchElement );\n\tim = imag( searchElement );\n\tbuf = this._buffer;\n\tfor ( i = fromIndex; i < this._length; i++ ) {\n\t\tidx = 2 * i;\n\t\tif ( re === buf[ idx ] && im === buf[ idx+1 ] ) {\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n});\n\n/**\n* Returns the first index at which a given element can be found.\n*\n* @name indexOf\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {ComplexLike} searchElement - element to find\n* @param {integer} [fromIndex=0] - starting index (inclusive)\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a complex number\n* @throws {TypeError} second argument must be an integer\n* @returns {integer} index or -1\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n*\n* var arr = new Complex128Array( 5 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n* arr.set( [ 4.0, -4.0 ], 3 );\n* arr.set( [ 5.0, -5.0 ], 4 );\n*\n* var idx = arr.indexOf( new Complex128( 3.0, -3.0 ) );\n* // returns 2\n*\n* idx = arr.indexOf( new Complex128( 3.0, -3.0 ), 3 );\n* // returns -1\n*\n* idx = arr.indexOf( new Complex128( 4.0, -4.0 ), -3 );\n* // returns 3\n*/\nsetReadOnly( Complex128Array.prototype, 'indexOf', function indexOf( searchElement, fromIndex ) {\n\tvar buf;\n\tvar idx;\n\tvar re;\n\tvar im;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isComplexLike( searchElement ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a complex number. Value: `%s`.', searchElement ) );\n\t}\n\tif ( arguments.length > 1 ) {\n\t\tif ( !isInteger( fromIndex ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be an integer. Value: `%s`.', fromIndex ) );\n\t\t}\n\t\tif ( fromIndex < 0 ) {\n\t\t\tfromIndex += this._length;\n\t\t\tif ( fromIndex < 0 ) {\n\t\t\t\tfromIndex = 0;\n\t\t\t}\n\t\t}\n\t} else {\n\t\tfromIndex = 0;\n\t}\n\tre = real( searchElement );\n\tim = imag( searchElement );\n\tbuf = this._buffer;\n\tfor ( i = fromIndex; i < this._length; i++ ) {\n\t\tidx = 2 * i;\n\t\tif ( re === buf[ idx ] && im === buf[ idx+1 ] ) {\n\t\t\treturn i;\n\t\t}\n\t}\n\treturn -1;\n});\n\n/**\n* Returns a new string by concatenating all array elements.\n*\n* @name join\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {string} [separator=','] - element separator\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a string\n* @returns {string} string representation\n*\n* @example\n* var arr = new Complex128Array( 2 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n*\n* var str = arr.join();\n* // returns '1 + 1i,2 + 2i'\n*\n* str = arr.join( '/' );\n* // returns '1 + 1i/2 + 2i'\n*/\nsetReadOnly( Complex128Array.prototype, 'join', function join( separator ) {\n\tvar out;\n\tvar buf;\n\tvar sep;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( arguments.length === 0 ) {\n\t\tsep = ',';\n\t} else if ( isString( separator ) ) {\n\t\tsep = separator;\n\t} else {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a string. Value: `%s`.', separator ) );\n\t}\n\tout = [];\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tout.push( getComplex128( buf, i ).toString() );\n\t}\n\treturn out.join( sep );\n});\n\n/**\n* Returns the last index at which a given element can be found.\n*\n* @name lastIndexOf\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {ComplexLike} searchElement - element to find\n* @param {integer} [fromIndex] - index at which to start searching backward (inclusive)\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a complex number\n* @throws {TypeError} second argument must be an integer\n* @returns {integer} index or -1\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n*\n* var arr = new Complex128Array( 5 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n* arr.set( [ 4.0, -4.0 ], 3 );\n* arr.set( [ 3.0, -3.0 ], 4 );\n*\n* var idx = arr.lastIndexOf( new Complex128( 3.0, -3.0 ) );\n* // returns 4\n*\n* idx = arr.lastIndexOf( new Complex128( 3.0, -3.0 ), 3 );\n* // returns 2\n*\n* idx = arr.lastIndexOf( new Complex128( 5.0, -5.0 ), 3 );\n* // returns -1\n*\n* idx = arr.lastIndexOf( new Complex128( 2.0, -2.0 ), -3 );\n* // returns 1\n*/\nsetReadOnly( Complex128Array.prototype, 'lastIndexOf', function lastIndexOf( searchElement, fromIndex ) {\n\tvar buf;\n\tvar idx;\n\tvar re;\n\tvar im;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isComplexLike( searchElement ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a complex number. Value: `%s`.', searchElement ) );\n\t}\n\tif ( arguments.length > 1 ) {\n\t\tif ( !isInteger( fromIndex ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be an integer. Value: `%s`.', fromIndex ) );\n\t\t}\n\t\tif ( fromIndex >= this._length ) {\n\t\t\tfromIndex = this._length - 1;\n\t\t} else if ( fromIndex < 0 ) {\n\t\t\tfromIndex += this._length;\n\t\t}\n\t} else {\n\t\tfromIndex = this._length - 1;\n\t}\n\tre = real( searchElement );\n\tim = imag( searchElement );\n\tbuf = this._buffer;\n\tfor ( i = fromIndex; i >= 0; i-- ) {\n\t\tidx = 2 * i;\n\t\tif ( re === buf[ idx ] && im === buf[ idx+1 ] ) {\n\t\t\treturn i;\n\t\t}\n\t}\n\treturn -1;\n});\n\n/**\n* Returns a new array with each element being the result of a provided callback function.\n*\n* @name map\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {Function} fcn - callback function\n* @param {*} [thisArg] - callback function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {Complex128Array} complex number array\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* function scale( v, i ) {\n* return new Complex128( 2.0*real( v ), 2.0*imag( v ) );\n* }\n*\n* var arr = new Complex128Array( 3 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n*\n* var out = arr.map( scale );\n* // returns \n*\n* var z = out.get( 0 );\n* // returns \n*\n* var re = real( z );\n* // returns 2.0\n*\n* var im = imag( z );\n* // returns -2.0\n*/\nsetReadOnly( Complex128Array.prototype, 'map', function map( fcn, thisArg ) {\n\tvar outbuf;\n\tvar buf;\n\tvar out;\n\tvar i;\n\tvar v;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( fcn ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', fcn ) );\n\t}\n\tbuf = this._buffer;\n\tout = new this.constructor( this._length );\n\toutbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tv = fcn.call( thisArg, getComplex128( buf, i ), i, this );\n\t\tif ( isComplexLike( v ) ) {\n\t\t\toutbuf[ 2*i ] = real( v );\n\t\t\toutbuf[ (2*i)+1 ] = imag( v );\n\t\t} else if ( isArrayLikeObject( v ) && v.length === 2 ) {\n\t\t\toutbuf[ 2*i ] = v[ 0 ];\n\t\t\toutbuf[ (2*i)+1 ] = v[ 1 ];\n\t\t} else {\n\t\t\tthrow new TypeError( format( 'invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', v ) );\n\t\t}\n\t}\n\treturn out;\n});\n\n/**\n* Applies a provided callback function to each element of the array, in order, passing in the return value from the calculation on the preceding element and returning the accumulated result upon completion.\n*\n* @name reduce\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {Function} reducer - callback function\n* @param {*} [initialValue] - initial value\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @throws {Error} if not provided an initial value, the array must have at least one element\n* @returns {*} accumulated result\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n* import cadd from '@stdlib/math-base-ops-cadd';\n*\n* var arr = new Complex128Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var z = arr.reduce( cadd );\n* // returns \n*\n* var re = real( z );\n* // returns 6.0\n*\n* var im = imag( z );\n* // returns 6.0\n*/\nsetReadOnly( Complex128Array.prototype, 'reduce', function reduce( reducer, initialValue ) {\n\tvar buf;\n\tvar acc;\n\tvar len;\n\tvar v;\n\tvar i;\n\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( reducer ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', reducer ) );\n\t}\n\tbuf = this._buffer;\n\tlen = this._length;\n\tif ( arguments.length > 1 ) {\n\t\tacc = initialValue;\n\t\ti = 0;\n\t} else {\n\t\tif ( len === 0 ) {\n\t\t\tthrow new Error( 'invalid operation. If not provided an initial value, an array must contain at least one element.' );\n\t\t}\n\t\tacc = getComplex128( buf, 0 );\n\t\ti = 1;\n\t}\n\tfor ( ; i < len; i++ ) {\n\t\tv = getComplex128( buf, i );\n\t\tacc = reducer( acc, v, i, this );\n\t}\n\treturn acc;\n});\n\n/**\n* Reverses an array in-place.\n*\n* @name reverse\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Complex128Array} reversed array\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* var arr = new Complex128Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var out = arr.reverse();\n* // returns \n*\n* var z = out.get( 0 );\n* // returns \n*\n* var re = real( z );\n* // returns 3.0\n*\n* var im = imag( z );\n* // returns 3.0\n*\n* z = out.get( 1 );\n* // returns \n*\n* re = real( z );\n* // returns 2.0\n*\n* im = imag( z );\n* // returns 2.0\n*\n* z = out.get( 2 );\n* // returns \n*\n* re = real( z );\n* // returns 1.0\n*\n* im = imag( z );\n* // returns 1.0\n*/\nsetReadOnly( Complex128Array.prototype, 'reverse', function reverse() {\n\tvar buf;\n\tvar tmp;\n\tvar len;\n\tvar N;\n\tvar i;\n\tvar j;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tlen = this._length;\n\tbuf = this._buffer;\n\tN = floor( len / 2 );\n\tfor ( i = 0; i < N; i++ ) {\n\t\tj = len - i - 1;\n\t\ttmp = buf[ (2*i) ];\n\t\tbuf[ (2*i) ] = buf[ (2*j) ];\n\t\tbuf[ (2*j) ] = tmp;\n\t\ttmp = buf[ (2*i)+1 ];\n\t\tbuf[ (2*i)+1 ] = buf[ (2*j)+1 ];\n\t\tbuf[ (2*j)+1 ] = tmp;\n\t}\n\treturn this;\n});\n\n/**\n* Sets an array element.\n*\n* ## Notes\n*\n* - When provided a typed array, real or complex, we must check whether the source array shares the same buffer as the target array and whether the underlying memory overlaps. In particular, we are concerned with the following scenario:\n*\n* ```text\n* buf: ---------------------\n* src: ---------------------\n* ```\n*\n* In the above, as we copy values from `src`, we will overwrite values in the `src` view, resulting in duplicated values copied into the end of `buf`, which is not intended. Hence, to avoid overwriting source values, we must **copy** source values to a temporary array.\n*\n* In the other overlapping scenario,\n*\n* ```text\n* buf: ---------------------\n* src: ---------------------\n* ```\n*\n* by the time we begin copying into the overlapping region, we are copying from the end of `src`, a non-overlapping region, which means we don't run the risk of copying copied values, rather than the original `src` values as intended.\n*\n* @name set\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {(Collection|Complex|ComplexArray)} value - value(s)\n* @param {NonNegativeInteger} [i=0] - element index at which to start writing values\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be either a complex number, an array-like object, or a complex number array\n* @throws {TypeError} index argument must be a nonnegative integer\n* @throws {RangeError} array-like objects must have a length which is a multiple of two\n* @throws {RangeError} index argument is out-of-bounds\n* @throws {RangeError} target array lacks sufficient storage to accommodate source values\n* @returns {void}\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* var arr = new Complex128Array( 10 );\n*\n* var z = arr.get( 0 );\n* // returns \n*\n* var re = real( z );\n* // returns 0.0\n*\n* var im = imag( z );\n* // returns 0.0\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n*\n* z = arr.get( 0 );\n* // returns \n*\n* re = real( z );\n* // returns 1.0\n*\n* im = imag( z );\n* // returns -1.0\n*/\nsetReadOnly( Complex128Array.prototype, 'set', function set( value ) {\n\t/* eslint-disable no-underscore-dangle */\n\tvar sbuf;\n\tvar idx;\n\tvar buf;\n\tvar tmp;\n\tvar flg;\n\tvar N;\n\tvar v;\n\tvar i;\n\tvar j;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tbuf = this._buffer;\n\tif ( arguments.length > 1 ) {\n\t\tidx = arguments[ 1 ];\n\t\tif ( !isNonNegativeInteger( idx ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Index argument must be a nonnegative integer. Value: `%s`.', idx ) );\n\t\t}\n\t} else {\n\t\tidx = 0;\n\t}\n\tif ( isComplexLike( value ) ) {\n\t\tif ( idx >= this._length ) {\n\t\t\tthrow new RangeError( format( 'invalid argument. Index argument is out-of-bounds. Value: `%u`.', idx ) );\n\t\t}\n\t\tidx *= 2;\n\t\tbuf[ idx ] = real( value );\n\t\tbuf[ idx+1 ] = imag( value );\n\t\treturn;\n\t}\n\tif ( isComplexArray( value ) ) {\n\t\tN = value._length;\n\t\tif ( idx+N > this._length ) {\n\t\t\tthrow new RangeError( 'invalid arguments. Target array lacks sufficient storage to accommodate source values.' );\n\t\t}\n\t\tsbuf = value._buffer;\n\n\t\t// Check for overlapping memory...\n\t\tj = buf.byteOffset + (idx*BYTES_PER_ELEMENT);\n\t\tif (\n\t\t\tsbuf.buffer === buf.buffer &&\n\t\t\t(\n\t\t\t\tsbuf.byteOffset < j &&\n\t\t\t\tsbuf.byteOffset+sbuf.byteLength > j\n\t\t\t)\n\t\t) {\n\t\t\t// We need to copy source values...\n\t\t\ttmp = new Float64Array( sbuf.length );\n\t\t\tfor ( i = 0; i < sbuf.length; i++ ) {\n\t\t\t\ttmp[ i ] = sbuf[ i ];\n\t\t\t}\n\t\t\tsbuf = tmp;\n\t\t}\n\t\tidx *= 2;\n\t\tj = 0;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\tbuf[ idx ] = sbuf[ j ];\n\t\t\tbuf[ idx+1 ] = sbuf[ j+1 ];\n\t\t\tidx += 2; // stride\n\t\t\tj += 2; // stride\n\t\t}\n\t\treturn;\n\t}\n\tif ( isCollection( value ) ) {\n\t\t// Detect whether we've been provided an array of complex numbers...\n\t\tN = value.length;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\tif ( !isComplexLike( value[ i ] ) ) {\n\t\t\t\tflg = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t// If an array does not contain only complex numbers, then we assume interleaved real and imaginary components...\n\t\tif ( flg ) {\n\t\t\tif ( !isEven( N ) ) {\n\t\t\t\tthrow new RangeError( format( 'invalid argument. Array-like object arguments must have a length which is a multiple of two. Length: `%u`.', N ) );\n\t\t\t}\n\t\t\tif ( idx+(N/2) > this._length ) {\n\t\t\t\tthrow new RangeError( 'invalid arguments. Target array lacks sufficient storage to accommodate source values.' );\n\t\t\t}\n\t\t\tsbuf = value;\n\n\t\t\t// Check for overlapping memory...\n\t\t\tj = buf.byteOffset + (idx*BYTES_PER_ELEMENT);\n\t\t\tif (\n\t\t\t\tsbuf.buffer === buf.buffer &&\n\t\t\t\t(\n\t\t\t\t\tsbuf.byteOffset < j &&\n\t\t\t\t\tsbuf.byteOffset+sbuf.byteLength > j\n\t\t\t\t)\n\t\t\t) {\n\t\t\t\t// We need to copy source values...\n\t\t\t\ttmp = new Float64Array( N );\n\t\t\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\t\t\ttmp[ i ] = sbuf[ i ];\n\t\t\t\t}\n\t\t\t\tsbuf = tmp;\n\t\t\t}\n\t\t\tidx *= 2;\n\t\t\tN /= 2;\n\t\t\tj = 0;\n\t\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\t\tbuf[ idx ] = sbuf[ j ];\n\t\t\t\tbuf[ idx+1 ] = sbuf[ j+1 ];\n\t\t\t\tidx += 2; // stride\n\t\t\t\tj += 2; // stride\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\t// If an array contains only complex numbers, then we need to extract real and imaginary components...\n\t\tif ( idx+N > this._length ) {\n\t\t\tthrow new RangeError( 'invalid arguments. Target array lacks sufficient storage to accommodate source values.' );\n\t\t}\n\t\tidx *= 2;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\tv = value[ i ];\n\t\t\tbuf[ idx ] = real( v );\n\t\t\tbuf[ idx+1 ] = imag( v );\n\t\t\tidx += 2; // stride\n\t\t}\n\t\treturn;\n\t}\n\tthrow new TypeError( format( 'invalid argument. First argument must be either a complex number, an array-like object, or a complex number array. Value: `%s`.', value ) );\n\n\t/* eslint-enable no-underscore-dangle */\n});\n\n/**\n* Copies a portion of a typed array to a new typed array.\n*\n* @name slice\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {integer} [start=0] - starting index (inclusive)\n* @param {integer} [end] - ending index (exclusive)\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be an integer\n* @throws {TypeError} second argument must be an integer\n* @returns {Complex128Array} complex number array\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* var arr = new Complex128Array( 5 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n* arr.set( [ 4.0, -4.0 ], 3 );\n* arr.set( [ 5.0, -5.0 ], 4 );\n*\n* var out = arr.slice();\n* // returns \n*\n* var len = out.length;\n* // returns 5\n*\n* var z = out.get( 0 );\n* // returns \n*\n* var re = real( z );\n* // returns 1.0\n*\n* var im = imag( z );\n* // returns -1.0\n*\n* z = out.get( len-1 );\n* // returns \n*\n* re = real( z );\n* // returns 5.0\n*\n* im = imag( z );\n* // returns -5.0\n*\n* out = arr.slice( 1, -2 );\n* // returns \n*\n* len = out.length;\n* // returns 2\n*\n* z = out.get( 0 );\n* // returns \n*\n* re = real( z );\n* // returns 2.0\n*\n* im = imag( z );\n* // returns -2.0\n*\n* z = out.get( len-1 );\n* // returns \n*\n* re = real( z );\n* // returns 3.0\n*\n* im = imag( z );\n* // returns -3.0\n*/\nsetReadOnly( Complex128Array.prototype, 'slice', function slice( start, end ) {\n\tvar outlen;\n\tvar outbuf;\n\tvar out;\n\tvar idx;\n\tvar buf;\n\tvar len;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tbuf = this._buffer;\n\tlen = this._length;\n\tif ( arguments.length === 0 ) {\n\t\tstart = 0;\n\t\tend = len;\n\t} else {\n\t\tif ( !isInteger( start ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. First argument must be an integer. Value: `%s`.', start ) );\n\t\t}\n\t\tif ( start < 0 ) {\n\t\t\tstart += len;\n\t\t\tif ( start < 0 ) {\n\t\t\t\tstart = 0;\n\t\t\t}\n\t\t}\n\t\tif ( arguments.length === 1 ) {\n\t\t\tend = len;\n\t\t} else {\n\t\t\tif ( !isInteger( end ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be an integer. Value: `%s`.', end ) );\n\t\t\t}\n\t\t\tif ( end < 0 ) {\n\t\t\t\tend += len;\n\t\t\t\tif ( end < 0 ) {\n\t\t\t\t\tend = 0;\n\t\t\t\t}\n\t\t\t} else if ( end > len ) {\n\t\t\t\tend = len;\n\t\t\t}\n\t\t}\n\t}\n\tif ( start < end ) {\n\t\toutlen = end - start;\n\t} else {\n\t\toutlen = 0;\n\t}\n\tout = new this.constructor( outlen );\n\toutbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\tfor ( i = 0; i < outlen; i++ ) {\n\t\tidx = 2*(i+start);\n\t\toutbuf[ 2*i ] = buf[ idx ];\n\t\toutbuf[ (2*i)+1 ] = buf[ idx+1 ];\n\t}\n\treturn out;\n});\n\n/**\n* Tests whether at least one element in an array passes a test implemented by a predicate function.\n*\n* @name some\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {boolean} boolean indicating whether at least one element passes a test\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* function predicate( v ) {\n* return ( real( v ) === imag( v ) );\n* }\n*\n* var arr = new Complex128Array( 3 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n*\n* var bool = arr.some( predicate );\n* // returns true\n*/\nsetReadOnly( Complex128Array.prototype, 'some', function some( predicate, thisArg ) {\n\tvar buf;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tif ( predicate.call( thisArg, getComplex128( buf, i ), i, this ) ) {\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n});\n\n/**\n* Creates a new typed array view over the same underlying `ArrayBuffer` and with the same underlying data type as the host array.\n*\n* @name subarray\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {integer} [begin=0] - starting index (inclusive)\n* @param {integer} [end] - ending index (exclusive)\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be an integer\n* @throws {TypeError} second argument must be an integer\n* @returns {Complex64Array} subarray\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* var arr = new Complex128Array( 5 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n* arr.set( [ 4.0, -4.0 ], 3 );\n* arr.set( [ 5.0, -5.0 ], 4 );\n*\n* var subarr = arr.subarray();\n* // returns \n*\n* var len = subarr.length;\n* // returns 5\n*\n* var z = subarr.get( 0 );\n* // returns \n*\n* var re = real( z );\n* // returns 1.0\n*\n* var im = imag( z );\n* // returns -1.0\n*\n* z = subarr.get( len-1 );\n* // returns \n*\n* re = real( z );\n* // returns 5.0\n*\n* im = imag( z );\n* // returns -5.0\n*\n* subarr = arr.subarray( 1, -2 );\n* // returns \n*\n* len = subarr.length;\n* // returns 2\n*\n* z = subarr.get( 0 );\n* // returns \n*\n* re = real( z );\n* // returns 2.0\n*\n* im = imag( z );\n* // returns -2.0\n*\n* z = subarr.get( len-1 );\n* // returns \n*\n* re = real( z );\n* // returns 3.0\n*\n* im = imag( z );\n* // returns -3.0\n*/\nsetReadOnly( Complex128Array.prototype, 'subarray', function subarray( begin, end ) {\n\tvar offset;\n\tvar buf;\n\tvar len;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tbuf = this._buffer;\n\tlen = this._length;\n\tif ( arguments.length === 0 ) {\n\t\tbegin = 0;\n\t\tend = len;\n\t} else {\n\t\tif ( !isInteger( begin ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. First argument must be an integer. Value: `%s`.', begin ) );\n\t\t}\n\t\tif ( begin < 0 ) {\n\t\t\tbegin += len;\n\t\t\tif ( begin < 0 ) {\n\t\t\t\tbegin = 0;\n\t\t\t}\n\t\t}\n\t\tif ( arguments.length === 1 ) {\n\t\t\tend = len;\n\t\t} else {\n\t\t\tif ( !isInteger( end ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be an integer. Value: `%s`.', end ) );\n\t\t\t}\n\t\t\tif ( end < 0 ) {\n\t\t\t\tend += len;\n\t\t\t\tif ( end < 0 ) {\n\t\t\t\t\tend = 0;\n\t\t\t\t}\n\t\t\t} else if ( end > len ) {\n\t\t\t\tend = len;\n\t\t\t}\n\t\t}\n\t}\n\tif ( begin >= len ) {\n\t\tlen = 0;\n\t\toffset = buf.byteLength;\n\t} else if ( begin >= end ) {\n\t\tlen = 0;\n\t\toffset = buf.byteOffset + ( begin*BYTES_PER_ELEMENT );\n\t} else {\n\t\tlen = end - begin;\n\t\toffset = buf.byteOffset + ( begin*BYTES_PER_ELEMENT );\n\t}\n\treturn new this.constructor( buf.buffer, offset, ( len < 0 ) ? 0 : len );\n});\n\n/**\n* Returns a new typed array containing the elements in reversed order.\n*\n* @name toReversed\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Complex128Array} reversed array\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* var arr = new Complex128Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var out = arr.toReversed();\n* // returns \n*\n* var z = out.get( 0 );\n* // returns \n*\n* var re = real( z );\n* // returns 3.0\n*\n* var im = imag( z );\n* // returns 3.0\n*\n* z = out.get( 1 );\n* // returns \n*\n* re = real( z );\n* // returns 2.0\n*\n* im = imag( z );\n* // returns 2.0\n*\n* z = out.get( 2 );\n* // returns \n*\n* re = real( z );\n* // returns 1.0\n*\n* im = imag( z );\n* // returns 1.0\n*/\nsetReadOnly( Complex128Array.prototype, 'toReversed', function toReversed() {\n\tvar outbuf;\n\tvar out;\n\tvar len;\n\tvar buf;\n\tvar i;\n\tvar j;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tlen = this._length;\n\tout = new this.constructor( len );\n\tbuf = this._buffer;\n\toutbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\tfor ( i = 0; i < len; i++ ) {\n\t\tj = len - i - 1;\n\t\toutbuf[ (2*i) ] = buf[ (2*j) ];\n\t\toutbuf[ (2*i)+1 ] = buf[ (2*j)+1 ];\n\t}\n\treturn out;\n});\n\n/**\n* Serializes an array as a string.\n*\n* @name toString\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @throws {TypeError} `this` must be a complex number array\n* @returns {string} string representation\n*\n* @example\n* var arr = new Complex128Array( 2 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n*\n* var str = arr.toString();\n* // returns '1 + 1i,2 + 2i'\n*/\nsetReadOnly( Complex128Array.prototype, 'toString', function toString() {\n\tvar out;\n\tvar buf;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tout = [];\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tout.push( getComplex128( buf, i ).toString() );\n\t}\n\treturn out.join( ',' );\n});\n\n/**\n* Returns a new typed array with the element at a provided index replaced with a provided value.\n*\n* @name with\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {integer} index - element index\n* @param {ComplexLike} value - new value\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be an integer\n* @throws {RangeError} index argument is out-of-bounds\n* @throws {TypeError} second argument must be a complex number\n* @returns {Complex128Array} new typed array\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n* import Complex128 from '@stdlib/complex-float64';\n*\n* var arr = new Complex128Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var out = arr.with( 0, new Complex128( 4.0, 4.0 ) );\n* // returns \n*\n* var z = out.get( 0 );\n* // returns \n*\n* var re = real( z );\n* // returns 4.0\n*\n* var im = imag( z );\n* // returns 4.0\n*/\nsetReadOnly( Complex128Array.prototype, 'with', function copyWith( index, value ) {\n\tvar buf;\n\tvar out;\n\tvar len;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isInteger( index ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be an integer. Value: `%s`.', index ) );\n\t}\n\tlen = this._length;\n\tif ( index < 0 ) {\n\t\tindex += len;\n\t}\n\tif ( index < 0 || index >= len ) {\n\t\tthrow new RangeError( format( 'invalid argument. Index argument is out-of-bounds. Value: `%s`.', index ) );\n\t}\n\tif ( !isComplexLike( value ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Second argument must be a complex number. Value: `%s`.', value ) );\n\t}\n\tout = new this.constructor( this._buffer );\n\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\tbuf[ 2*index ] = real( value );\n\tbuf[ (2*index)+1 ] = imag( value );\n\treturn out;\n});\n\n\n// EXPORTS //\n\nexport default Complex128Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport real from '@stdlib/complex-real';\nimport imag from '@stdlib/complex-imag';\n\n\n// MAIN //\n\n/**\n* Returns a strided array of real and imaginary components.\n*\n* @private\n* @param {Float64Array} buf - output array\n* @param {Array} arr - array containing complex numbers\n* @returns {(Float64Array|null)} output array or null\n*/\nfunction fromArray( buf, arr ) {\n\tvar len;\n\tvar v;\n\tvar i;\n\tvar j;\n\n\tlen = arr.length;\n\tj = 0;\n\tfor ( i = 0; i < len; i++ ) {\n\t\tv = arr[ i ];\n\t\tif ( !isComplexLike( v ) ) {\n\t\t\treturn null;\n\t\t}\n\t\tbuf[ j ] = real( v );\n\t\tbuf[ j+1 ] = imag( v );\n\t\tj += 2; // stride\n\t}\n\treturn buf;\n}\n\n\n// EXPORTS //\n\nexport default fromArray;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isArrayLikeObject from '@stdlib/assert-is-array-like-object';\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport format from '@stdlib/string-format';\nimport real from '@stdlib/complex-real';\nimport imag from '@stdlib/complex-imag';\n\n\n// MAIN //\n\n/**\n* Returns an array of iterated values.\n*\n* @private\n* @param {Object} it - iterator\n* @param {Function} clbk - callback to invoke for each iterated value\n* @param {*} thisArg - invocation context\n* @returns {(Array|TypeError)} array or an error\n*/\nfunction fromIteratorMap( it, clbk, thisArg ) {\n\tvar out;\n\tvar v;\n\tvar z;\n\tvar i;\n\n\tout = [];\n\ti = -1;\n\twhile ( true ) {\n\t\tv = it.next();\n\t\tif ( v.done ) {\n\t\t\tbreak;\n\t\t}\n\t\ti += 1;\n\t\tz = clbk.call( thisArg, v.value, i );\n\t\tif ( isArrayLikeObject( z ) && z.length >= 2 ) {\n\t\t\tout.push( z[ 0 ], z[ 1 ] );\n\t\t} else if ( isComplexLike( z ) ) {\n\t\t\tout.push( real( z ), imag( z ) );\n\t\t} else {\n\t\t\treturn new TypeError( format( 'invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', z ) );\n\t\t}\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default fromIteratorMap;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport Float64Array from '@stdlib/array-float64';\nimport Float32Array from '@stdlib/array-float32';\nimport Int16Array from '@stdlib/array-int16';\nimport Int32Array from '@stdlib/array-int32';\nimport Int8Array from '@stdlib/array-int8';\nimport Uint16Array from '@stdlib/array-uint16';\nimport Uint32Array from '@stdlib/array-uint32';\nimport Uint8Array from '@stdlib/array-uint8';\nimport Uint8ClampedArray from '@stdlib/array-uint8c';\nimport Complex64Array from '@stdlib/array-complex64';\nimport Complex128Array from '@stdlib/array-complex128';\n\n\n// MAIN //\n\n// Mapping from data types to constructors...\nvar ctors = {\n\t'float64': Float64Array,\n\t'float32': Float32Array,\n\t'generic': Array, // TODO: replace with `stdlib` pkg\n\t'int16': Int16Array,\n\t'int32': Int32Array,\n\t'int8': Int8Array,\n\t'uint16': Uint16Array,\n\t'uint32': Uint32Array,\n\t'uint8': Uint8Array,\n\t'uint8c': Uint8ClampedArray,\n\t'complex64': Complex64Array,\n\t'complex128': Complex128Array\n};\n\n\n// EXPORTS //\n\nexport default ctors;\n","/**\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// MAIN //\n\n/**\n* Returns default array settings.\n*\n* @returns {Object} defaults\n*\n* @example\n* var o = defaults();\n* // returns {...}\n*/\nfunction defaults() {\n\treturn {\n\t\t// Data types:\n\t\t'dtypes': {\n\t\t\t'default': 'float64',\n\t\t\t'numeric': 'float64',\n\t\t\t'real': 'float64',\n\t\t\t'floating_point': 'float64',\n\t\t\t'real_floating_point': 'float64',\n\t\t\t'complex_floating_point': 'complex128',\n\t\t\t'integer': 'int32',\n\t\t\t'signed_integer': 'int32',\n\t\t\t'unsigned_integer': 'uint32'\n\t\t}\n\t};\n}\n\n\n// EXPORTS //\n\nexport default defaults;\n","/**\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// MODULES //\n\nimport defaults from './main.js';\n\n\n// VARIABLES //\n\nvar DEFAULTS = defaults();\nvar HASH = {\n\t'dtypes.default': DEFAULTS.dtypes.default,\n\t'dtypes.numeric': DEFAULTS.dtypes.numeric,\n\t'dtypes.real': DEFAULTS.dtypes.real,\n\t'dtypes.floating_point': DEFAULTS.dtypes.floating_point,\n\t'dtypes.real_floating_point': DEFAULTS.dtypes.real_floating_point,\n\t'dtypes.complex_floating_point': DEFAULTS.dtypes.complex_floating_point,\n\t'dtypes.integer': DEFAULTS.dtypes.integer,\n\t'dtypes.signed_integer': DEFAULTS.dtypes.signed_integer,\n\t'dtypes.unsigned_integer': DEFAULTS.dtypes.unsigned_integer\n};\n\n\n// MAIN //\n\n/**\n* Returns a default array setting.\n*\n* @param {string} name - setting name\n* @returns {*} default setting or null\n*\n* @example\n* var v = get( 'dtypes.default' );\n* // returns \n*/\nfunction get( name ) {\n\tvar v = HASH[ name ];\n\treturn ( v === void 0 ) ? null : v;\n}\n\n\n// EXPORTS //\n\nexport default get;\n","/**\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* Return default array settings.\n*\n* @module @stdlib/array-defaults\n*\n* @example\n* import defaults from '@stdlib/array-defaults';\n*\n* var o = defaults();\n* // returns {...}\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport get from './get.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'get', get );\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isNonNegativeInteger } from '@stdlib/assert-is-nonnegative-integer';\nimport ctors from '@stdlib/array-ctors';\nimport gzeros from '@stdlib/array-base-zeros';\nimport defaults from '@stdlib/array-defaults';\nimport format from '@stdlib/string-format';\n\n\n// VARIABLES //\n\nvar DEFAULT_DTYPE = defaults.get( 'dtypes.default' );\n\n\n// MAIN //\n\n/**\n* Creates a zero-filled array having a specified length.\n*\n* @param {NonNegativeInteger} length - array length\n* @param {string} [dtype=\"float64\"] - data type\n* @throws {TypeError} first argument must be a nonnegative integer\n* @throws {TypeError} second argument must be a recognized data type\n* @returns {(TypedArray|Array|ComplexArray)} array or typed array\n*\n* @example\n* var arr = zeros( 2 );\n* // returns [ 0.0, 0.0 ]\n*\n* @example\n* var arr = zeros( 2, 'float32' );\n* // returns [ 0.0, 0.0 ]\n*/\nfunction zeros( length ) {\n\tvar dtype;\n\tvar ctor;\n\tif ( !isNonNegativeInteger( length ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a nonnegative integer. Value: `%s`.', length ) );\n\t}\n\tif ( arguments.length > 1 ) {\n\t\tdtype = arguments[ 1 ];\n\t} else {\n\t\tdtype = DEFAULT_DTYPE;\n\t}\n\tif ( dtype === 'generic' ) {\n\t\treturn gzeros( length );\n\t}\n\tctor = ctors( dtype );\n\tif ( ctor === null ) {\n\t\tthrow new TypeError( format( 'invalid argument. Second argument must be a recognized data type. Value: `%s`.', dtype ) );\n\t}\n\treturn new ctor( length ); // WARNING: we assume that, apart from 'generic', the constructors for supported array data types are zero-filled by default\n}\n\n\n// EXPORTS //\n\nexport default zeros;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Returns a filled \"generic\" array.\n*\n* @param {*} value - fill value\n* @param {NonNegativeInteger} len - array length\n* @returns {Array} filled array\n*\n* @example\n* var out = filled( 0.0, 3 );\n* // returns [ 0.0, 0.0, 0.0 ]\n*\n* @example\n* var out = filled( 'beep', 3 );\n* // returns [ 'beep', 'beep', 'beep' ]\n*/\nfunction filled( value, len ) {\n\tvar arr;\n\tvar i;\n\n\t// Manually push elements in order to ensure \"fast\" elements...\n\tarr = [];\n\tfor ( i = 0; i < len; i++ ) {\n\t\tarr.push( value );\n\t}\n\treturn arr;\n}\n\n\n// EXPORTS //\n\nexport default filled;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport filled from '@stdlib/array-base-filled';\n\n\n// MAIN //\n\n/**\n* Returns a zero-filled \"generic\" array.\n*\n* @param {NonNegativeInteger} len - array length\n* @returns {Array} output array\n*\n* @example\n* var out = zeros( 3 );\n* // returns [ 0.0, 0.0, 0.0 ]\n*/\nfunction zeros( len ) {\n\treturn filled( 0.0, len );\n}\n\n\n// EXPORTS //\n\nexport default zeros;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport table from './ctors.js';\n\n\n// MAIN //\n\n/**\n* Returns an array constructor.\n*\n* @param {string} dtype - data type\n* @returns {(Function|null)} constructor or null\n*\n* @example\n* var ctor = ctors( 'float64' );\n* // returns \n*\n* @example\n* var ctor = ctors( 'float' );\n* // returns null\n*/\nfunction ctors( dtype ) {\n\treturn table[ dtype ] || null;\n}\n\n\n// EXPORTS //\n\nexport default ctors;\n","/**\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// MODULES //\n\nimport zeros from '@stdlib/array-zeros';\n\n\n// MAIN //\n\n/**\n* Creates an uninitialized array having a specified length.\n*\n* @private\n* @param {NonNegativeInteger} length - array length\n* @param {string} [dtype=\"float64\"] - data type\n* @throws {TypeError} first argument must be a nonnegative integer\n* @throws {TypeError} second argument must be a recognized data type\n* @returns {(TypedArray|Array|ComplexArray)} array or typed array\n*\n* @example\n* var arr = empty( 2 );\n* // returns \n*\n* @example\n* var arr = empty( 2, 'float32' );\n* // returns \n*/\nfunction empty( length ) {\n\tif ( arguments.length > 1 ) {\n\t\treturn zeros( length, arguments[ 1 ] );\n\t}\n\treturn zeros( length );\n}\n\n\n// EXPORTS //\n\nexport default empty;\n"],"names":["main","Object","defineProperty","isNumber","value","zeros","n","i","out","zeroPad","str","width","right","negative","pad","length","startsWithMinus","substr","lowercase","String","prototype","toLowerCase","uppercase","toUpperCase","formatInteger","token","base","specifier","arg","parseInt","isFinite","Error","toString","precision","padRight","sign","alternate","call","charAt","abs","Math","replace","RE_EXP_POS_DIGITS","RE_EXP_NEG_DIGITS","RE_ONLY_DIGITS","RE_DIGITS_BEFORE_EXP","RE_TRAILING_PERIOD_ZERO","RE_PERIOD_ZERO_EXP","RE_ZERO_BEFORE_EXP","formatDouble","digits","f","parseFloat","toExponential","toFixed","toPrecision","spaces","fromCharCode","isnan","isNaN","isArray","Array","initialize","flags","mapping","formatInterpolate","tokens","hasPeriod","flag","num","pos","j","TypeError","padZeros","indexOf","arguments","maxWidth","substring","RE","parse","match","formatTokenize","content","prev","exec","slice","lastIndex","push","format","args","tokenize","interpolate","apply","objectProtoype","toStr","defineGetter","__defineGetter__","defineSetter","__defineSetter__","lookupGetter","__lookupGetter__","lookupSetter","__lookupSetter__","err","hasDefinePropertySupport","builtin","obj","prop","descriptor","hasValue","hasGet","hasSet","__proto__","get","set","defineProperty$1","setNonEnumerableReadOnly","configurable","enumerable","writable","FLG","Symbol","hasToStringTagSupport","toStringTag","has","hasOwnProperty","hasOwnProp","property","Sym","toStrTag","nativeClass","hasToStringTag","v","isOwn","tag","main$b","Number","test","isPrimitive","isObject","setReadOnly","FLOAT64_PINF","POSITIVE_INFINITY","FLOAT64_NINF","NEGATIVE_INFINITY","floor","isInteger","x","PINF","NINF","isInt","valueOf","isNonNegativeInteger","hasFloat64Array","Float64Array","ctor","Float64Array$1","bool","arr","GlobalFloat64Array","NaN","hasFloat64ArraySupport","hasFloat32Array","Float32Array","Float32Array$1","GlobalFloat32Array","hasFloat32ArraySupport","hasInt16Array","Int16Array","Int16Array$1","GlobalInt16Array","INT16_MAX","hasInt16ArraySupport","hasInt32Array","Int32Array","Int32Array$1","GlobalInt32Array","INT32_MAX","hasInt32ArraySupport","hasInt8Array","Int8Array","Int8Array$1","GlobalInt8Array","INT8_MAX","hasInt8ArraySupport","hasUint16Array","Uint16Array","Uint16Array$1","GlobalUint16Array","UINT16_MAX","hasUint16ArraySupport","hasUint32Array","Uint32Array","Uint32Array$1","GlobalUint32Array","UINT32_MAX","hasUint32ArraySupport","hasUint8Array","Uint8Array","Uint8Array$1","GlobalUint8Array","UINT8_MAX","hasUint8ArraySupport","hasUint8ClampedArray","Uint8ClampedArray","Uint8ClampedArray$1","GlobalUint8ClampedArray","hasUint8ClampedArraySupport","MAX_ARRAY_LENGTH","isArrayLikeObject","MAX_LENGTH","MAX_TYPED_ARRAY_LENGTH","isCollection","hasArrayBuffer","ArrayBuffer","isArrayBuffer","main$1","isString","isBoolean","Bool","Boolean","self","window","global","globalThis","root","codegen","Function","GlobalThis","Self","Win","Global","getGlobal","nodeList","document","childNodes","typedarray","reFunctionName","RE_FUNCTION_NAME","isObjectLike","constructorName","name","constructor","_isBuffer","isBuffer","REGEXP","predicate","len","arrayfun","ctorName","type","isFunction","typeOf","Complex128","real","imag","this","re","im","fround","FLOAT32_VIEW","float64ToFloat32$1","Complex64","float64ToFloat32","isComplexLike","isEven","BYTES_PER_ELEMENT","isComplex64Array","isComplex128Array","hasIteratorSymbolSupport","iterator","IteratorSymbol","setNonEnumerableReadOnlyAccessor","getter","realf","z","imagf","reinterpret","offset","buffer","byteOffset","GETTERS","float64","idx","float32","int32","int16","int8","uint32","uint16","uint8","uint8c","generic","default","dtype","complex128","complex64","fromIterator","it","next","done","HAS_ITERATOR_SYMBOL","isComplexArray","Complex64Array","_length","_buffer","isComplexArrayConstructor","getComplex64","buf","nargs","fromArray","RangeError","reinterpret64","reinterpret128","byteLength","ITERATOR_SYMBOL","src","thisArg","clbk","tmp","flg","accessorGetter","fromIteratorMap","setReadOnlyAccessor","target","start","copyWithin","iter","entries","end","fcn","searchElement","fromIndex","separator","sep","join","outbuf","reducer","initialValue","acc","N","sbuf","outlen","begin","index","Complex128Array","getComplex128","ctors","defaults","dtypes","numeric","floating_point","real_floating_point","complex_floating_point","integer","signed_integer","unsigned_integer","DEFAULTS","HASH","DEFAULT_DTYPE","filled","table","empty"],"mappings":";;AAsBA,IAAIA,EAA0C,mBAA1BC,OAAOC,eAAkCD,OAAOC,eAAiB,KCiCrF,IAAIA,EAAiBD,OAAOC,eCjB5B,SAASC,EAAUC,GAClB,MAA0B,iBAAVA,CACjB,CCAA,SAASC,EAAOC,GACf,IACIC,EADAC,EAAM,GAEV,IAAMD,EAAI,EAAGA,EAAID,EAAGC,IACnBC,GAAO,IAER,OAAOA,CACR,CAcA,SAASC,EAASC,EAAKC,EAAOC,GAC7B,IAAIC,GAAW,EACXC,EAAMH,EAAQD,EAAIK,OACtB,OAAKD,EAAM,IAnCZ,SAA0BJ,GACzB,MAAoB,MAAbA,EAAK,EACb,CAoCMM,CAAiBN,KACrBG,GAAW,EACXH,EAAMA,EAAIO,OAAQ,IAEnBP,EAAM,EACLA,EAAML,EAAOS,GACbT,EAAOS,GAAQJ,EACXG,IACJH,EAAM,IAAMA,IAVLA,CAaT,CCpDA,IAAIQ,EAAYC,OAAOC,UAAUC,YAC7BC,EAAYH,OAAOC,UAAUG,YAajC,SAASC,EAAeC,GACvB,IAAIC,EACAlB,EACAD,EAEJ,OAASkB,EAAME,WACf,IAAK,IA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37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189]} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index ed5a549..0000000 --- a/stats.html +++ /dev/null @@ -1,4842 +0,0 @@ - - - - - - - - Rollup Visualizer - - - -
- - - - - From abe35abea66ee69cf80e487e8bc092ebb28ff18f Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Wed, 26 Jun 2024 23:12:48 +0000 Subject: [PATCH 64/75] Auto-generated commit --- .editorconfig | 181 - .eslintrc.js | 1 - .gitattributes | 66 - .github/PULL_REQUEST_TEMPLATE.md | 7 - .github/workflows/benchmark.yml | 64 - .github/workflows/cancel.yml | 57 - .github/workflows/close_pull_requests.yml | 54 - .github/workflows/examples.yml | 64 - .github/workflows/npm_downloads.yml | 112 - .github/workflows/productionize.yml | 794 ---- .github/workflows/publish.yml | 252 -- .github/workflows/test.yml | 99 - .github/workflows/test_bundles.yml | 186 - .github/workflows/test_coverage.yml | 133 - .github/workflows/test_install.yml | 85 - .gitignore | 188 - .npmignore | 229 - .npmrc | 31 - CHANGELOG.md | 126 - CITATION.cff | 30 - CODE_OF_CONDUCT.md | 3 - CONTRIBUTING.md | 3 - Makefile | 534 --- README.md | 38 +- SECURITY.md | 5 - benchmark/benchmark.js | 282 -- benchmark/benchmark.length.bool.js | 93 - benchmark/benchmark.length.complex128.js | 93 - benchmark/benchmark.length.complex64.js | 93 - benchmark/benchmark.length.float32.js | 93 - benchmark/benchmark.length.float64.js | 93 - benchmark/benchmark.length.generic.js | 93 - benchmark/benchmark.length.int16.js | 93 - benchmark/benchmark.length.int32.js | 93 - benchmark/benchmark.length.int8.js | 93 - benchmark/benchmark.length.uint16.js | 93 - benchmark/benchmark.length.uint32.js | 93 - benchmark/benchmark.length.uint8.js | 93 - benchmark/benchmark.length.uint8c.js | 93 - branches.md | 56 - dist/index.d.ts | 3 - dist/index.js | 9 - dist/index.js.map | 7 - docs/repl.txt | 35 - docs/types/test.ts | 78 - examples/index.js | 33 - lib/index.js | 58 - lib/is_buffer_uint8array.js | 47 - lib/main.js | 107 - lib/polyfill.js | 56 - docs/types/index.d.ts => mod.d.ts | 2 +- mod.js | 4 + mod.js.map | 1 + package.json | 84 +- stats.html | 4842 +++++++++++++++++++++ test/dist/test.js | 33 - test/test.js | 60 - test/test.main.js | 285 -- test/test.polyfill.js | 340 -- 59 files changed, 4860 insertions(+), 6113 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 benchmark/benchmark.js delete mode 100644 benchmark/benchmark.length.bool.js delete mode 100644 benchmark/benchmark.length.complex128.js delete mode 100644 benchmark/benchmark.length.complex64.js delete mode 100644 benchmark/benchmark.length.float32.js delete mode 100644 benchmark/benchmark.length.float64.js delete mode 100644 benchmark/benchmark.length.generic.js delete mode 100644 benchmark/benchmark.length.int16.js delete mode 100644 benchmark/benchmark.length.int32.js delete mode 100644 benchmark/benchmark.length.int8.js delete mode 100644 benchmark/benchmark.length.uint16.js delete mode 100644 benchmark/benchmark.length.uint32.js delete mode 100644 benchmark/benchmark.length.uint8.js delete mode 100644 benchmark/benchmark.length.uint8c.js 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/repl.txt delete mode 100644 docs/types/test.ts delete mode 100644 examples/index.js delete mode 100644 lib/index.js delete mode 100644 lib/is_buffer_uint8array.js delete mode 100644 lib/main.js delete mode 100644 lib/polyfill.js rename docs/types/index.d.ts => mod.d.ts (94%) create mode 100644 mod.js create mode 100644 mod.js.map create mode 100644 stats.html delete mode 100644 test/dist/test.js delete mode 100644 test/test.js delete mode 100644 test/test.main.js delete mode 100644 test/test.polyfill.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 96f81a8..0000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,7 +0,0 @@ - - -We are excited about your pull request, but unfortunately we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/empty) 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 ddb353e..0000000 --- a/.github/workflows/close_pull_requests.yml +++ /dev/null @@ -1,54 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: close_pull_requests - -# Workflow triggers: -on: - pull_request_target: - types: [opened] - -# Workflow jobs: -jobs: - - # Define job to close all pull requests: - run: - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Close pull request - - name: 'Close pull request' - # Pin action to full length commit SHA corresponding to v3.1.2 - uses: superbrothers/close-pull-request@9c18513d320d7b2c7185fb93396d0c664d5d8448 - with: - comment: | - Thank you for submitting a pull request. :raised_hands: - - We greatly appreciate your willingness to submit a contribution. However, we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). - - We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/empty) 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 8376c30..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: '49 1 * * 5' - - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job for retrieving npm download counts... - npm_downloads: - - # Define display name: - name: 'Retrieve npm download counts' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - timeout-minutes: 10 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Resolve package name: - - name: 'Resolve package name' - id: package_name - run: | - name=`node -e 'console.log(require("./package.json").name)' | tr -d '\n'` - echo "package_name=$name" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Fetch download data: - - name: 'Fetch data' - id: download_data - run: | - url="https://api.npmjs.org/downloads/range/$(date --date='1 year ago' '+%Y-%m-%d'):$(date '+%Y-%m-%d')/${{ steps.package_name.outputs.package_name }}" - echo "$url" - data=$(curl "$url") - mkdir ./tmp - echo "$data" > ./tmp/npm_downloads.json - echo "data=$data" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Print summary of download data: - - name: 'Print summary' - run: | - echo "| Date | Downloads |" >> $GITHUB_STEP_SUMMARY - echo "|------|------------|" >> $GITHUB_STEP_SUMMARY - cat ./tmp/npm_downloads.json | jq -r ".downloads | .[-14:] | to_entries | map(\"| \(.value.day) | \(.value.downloads) |\") |.[]" >> $GITHUB_STEP_SUMMARY - - # Upload the download data: - - name: 'Upload data' - # Pin action to full length commit SHA - uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1 - with: - # Define a name for the uploaded artifact (ensuring a unique name for each job): - name: npm_downloads - - # Specify the path to the file to upload: - path: ./tmp/npm_downloads.json - - # Specify the number of days to retain the artifact (default is 90 days): - retention-days: 90 - timeout-minutes: 10 - if: success() - - # Send data to events server: - - name: 'Post data' - # Pin action to full length commit SHA - uses: distributhor/workflow-webhook@48a40b380ce4593b6a6676528cd005986ae56629 # v3.0.3 - env: - webhook_url: ${{ secrets.STDLIB_NPM_DOWNLOADS_URL }} - webhook_secret: ${{ secrets.STDLIB_WEBHOOK_SECRET }} - data: '{ "downloads": ${{ steps.download_data.outputs.data }} }' - timeout-minutes: 5 - if: success() diff --git a/.github/workflows/productionize.yml b/.github/workflows/productionize.yml deleted file mode 100644 index f92a6c5..0000000 --- a/.github/workflows/productionize.yml +++ /dev/null @@ -1,794 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: productionize - -# Workflow triggers: -on: - # Run workflow when a new commit is pushed to the main branch: - push: - branches: - - main - - # Allow the workflow to be manually run: - workflow_dispatch: - inputs: - require-passing-tests: - description: 'Require passing tests for creating bundles' - type: boolean - default: true - - # Run workflow upon completion of `publish` workflow run: - workflow_run: - workflows: ["publish"] - types: [completed] - - -# Concurrency group to prevent multiple concurrent executions: -concurrency: - group: productionize - cancel-in-progress: true - -# Workflow jobs: -jobs: - - # Define a job to create a production build... - productionize: - - # Define display name: - name: 'Productionize' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - # Checkout main branch of repository: - - name: 'Checkout main branch' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - with: - ref: main - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Create production branch: - - name: 'Create production branch' - run: | - git checkout -b production - - # Transform error messages: - - name: 'Transform error messages' - id: transform-error-messages - uses: stdlib-js/transform-errors-action@main - - # Change `@stdlib/string-format` to `@stdlib/error-tools-fmtprodmsg` in package.json if the former is a dependency, otherwise insert it as a dependency: - - name: 'Update dependencies in package.json' - run: | - PKG_VERSION=$(npm view @stdlib/error-tools-fmtprodmsg version) - if grep -q '"@stdlib/string-format"' package.json; then - sed -i "s/\"@stdlib\/string-format\": \"^.*\"/\"@stdlib\/error-tools-fmtprodmsg\": \"^$PKG_VERSION\"/g" package.json - else - node -e "var pkg = require( './package.json' ); pkg.dependencies[ '@stdlib/error-tools-fmtprodmsg' ] = '^$PKG_VERSION'; require( 'fs' ).writeFileSync( 'package.json', JSON.stringify( pkg, null, 2 ) );" - fi - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Transform error messages" - - # Push changes: - - name: 'Push changes' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" production --force - - # Define a job for running tests of the productionized code... - test: - - # Define a display name: - name: 'Run Tests' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Indicate that this job depends on the prior job finishing: - needs: productionize - - # Run this job regardless of the outcome of the prior job: - if: always() - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - with: - # Use the `production` branch: - ref: production - - # Install Node.js: - - name: 'Install Node.js' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Build native add-on if present: - - name: 'Build native add-on (if present)' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - run: | - if [ -f "binding.gyp" ]; then - npm install node-gyp --no-save && ./node_modules/.bin/node-gyp rebuild - fi - - # Run tests: - - name: 'Run tests' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: tests - run: | - npm test || npm test || npm test - - # Define job to create a bundle for use in Deno... - deno: - - # Define display name: - name: 'Create Deno bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `deno` branch exists: - - name: 'Check if remote `deno` branch exists' - id: deno-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin deno - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `deno` exists, delete everything in branch and merge `production` into it - - name: 'If `deno` exists, delete everything in branch and merge `production` into it' - if: steps.deno-branch-exists.outputs.remote-exists - run: | - git checkout -b deno origin/deno - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `deno` does not exist, create `deno` branch: - - name: 'If `deno` does not exist, create `deno` branch' - if: ${{ steps.deno-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b deno - - # Copy files to deno directory: - - name: 'Copy files to deno directory' - run: | - mkdir -p deno - cp README.md LICENSE CONTRIBUTORS NOTICE ./deno - - # Copy TypeScript definitions to deno directory: - if [ -d index.d.ts ]; then - cp index.d.ts ./deno/index.d.ts - fi - if [ -e ./docs/types/index.d.ts ]; then - cp ./docs/types/index.d.ts ./deno/mod.d.ts - fi - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: Install production and development dependencies - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Bundle package for use in Deno: - - name: 'Bundle package for Deno' - id: deno-bundle - uses: stdlib-js/bundle-action@main - with: - target: 'deno' - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - # Replace links to other packages with links to the deno branch: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/deno/"; - - # Replace reference to `@stdlib/types` with CDN link: - find ./deno -type f -name '*.ts' -print0 | xargs -0 -r sed -Ei "s/\/\/\/ /\/\/\/ /g" - - # Change wording of project description to avoid reference to JavaScript and Node.js: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "s/a standard library for JavaScript and Node.js, /a standard library /g" - - # Rewrite all `require()`s to use jsDelivr links: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/require\( '@stdlib\// { - s/(var|let|const)\s+([a-z0-9_]+)\s+=\s*require\( '([^']+)' \);/import \2 from \'\3\';/i - s/@stdlib/https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js/ - s/';/@deno\/mod.js';/ - }" - - # Rewrite first `import` to show importing of named exports if available: - exports=$(cat lib/index.js | \ - grep -E 'setReadOnly\(.*,.*,.*\)' | \ - sed -E 's/setReadOnly\((.*),(.*),(.*)\);/\2/' | \ - sed -E "s/'//g" | \ - sort) - if [ -n "$exports" ]; then - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\nimport\s+([a-zA-Z0-9_]+)\s+from\s*'([^']+)';\n\`\`\`/\`\`\`javascript\nimport \1 from '\2';\n\`\`\`\n\nYou can also import the following named exports from the package:\n\n\`\`\`javascript\nimport { $(echo $exports | sed -E 's/ /, /g') } from '\2';\n\`\`\`/" - fi - - # Remove `installation`, `cli`, and `c` sections: - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Create package.json file for deno branch: - jq --indent 2 '{"name": .name, "version": .version, "description": .description, "license": .license, "type": "module", "main": "./mod.js", "homepage": .homepage, "repository": .repository, "bugs": .bugs, "keywords": .keywords, "funding": .funding}' package.json > ./deno/package.json - - # Delete everything in current directory aside from deno folder: - - name: 'Delete everything in current directory aside from deno folder' - run: | - find . -type 'f' | grep -v -e "deno" -e ".git/" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e "deno" -e ".git" | xargs -r rm -rf - - # Move deno directory to root: - - name: 'Move deno directory to root' - run: | - mv ./deno/* . - rmdir ./deno - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Auto-generated commit" - - # Push changes to `deno` branch: - - name: 'Push changes to `deno` branch' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" deno - - # Send status to Slack channel if job fails: - - name: 'Send status to Slack channel in case of failure' - # Pin action to full length commit SHA - uses: 8398a7/action-slack@28ba43ae48961b90635b50953d216767a6bea486 # v3.16.2 - with: - status: ${{ job.status }} - channel: '#npm-ci' - if: failure() - - # Define job to create a UMD bundle... - umd: - - # Define display name: - name: 'Create UMD bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `umd` branch exists: - - name: 'Check if remote `umd` branch exists' - id: umd-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin umd - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `umd` exists, delete everything in branch and merge `production` into it - - name: 'If `umd` exists, delete everything in branch and merge `production` into it' - if: steps.umd-branch-exists.outputs.remote-exists - run: | - git checkout -b umd origin/umd - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `umd` does not exist, create `umd` branch: - - name: 'If `umd` does not exist, create `umd` branch' - if: ${{ steps.umd-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b umd - - # Copy files to umd directory: - - name: 'Copy files to umd directory' - run: | - mkdir -p umd - cp README.md LICENSE CONTRIBUTORS NOTICE ./umd - - # Install Node.js - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Extract alias: - - name: 'Extract alias' - id: extract-alias - run: | - alias=$(grep -E 'require\(' README.md | head -n 1 | sed -E 's/^var ([a-zA-Z0-9_]+) = .+/\1/') - echo "alias=${alias}" >> $GITHUB_OUTPUT - - # Create Universal Module Definition (UMD) Node.js bundle: - - name: 'Create Universal Module Definition (UMD) Node.js bundle' - id: umd-bundle-node - uses: stdlib-js/bundle-action@main - with: - target: 'umd-node' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Create Universal Module Definition (UMD) browser bundle: - - name: 'Create Universal Module Definition (UMD) browser bundle' - id: umd-bundle-browser - uses: stdlib-js/bundle-action@main - with: - target: 'umd-browser' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - - # Replace links to other packages with links to the umd branch: - find ./umd -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/umd/"; - - # Remove `installation`, `cli`, and `c` sections: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Rewrite first `require()` to show consumption of the UMD bundle in Observable and via a `script` tag: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\n(var|let|const)\s+([a-zA-Z0-9_]+)\s+=\s*require\( '\@stdlib\/([^']+)' \);\n\`\`\`/To use in Observable,\n\n\`\`\`javascript\n\2 = require\( 'https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js\/\3\@umd\/browser.js' \)\n\`\`\`\n\nTo vendor stdlib functionality and avoid installing dependency trees for Node.js, you can use the UMD server build:\n\n\`\`\`javascript\nvar \2 = require\( 'path\/to\/vendor\/umd\/\3\/index.js' \)\n\`\`\`\n\nTo include the bundle in a webpage,\n\n\`\`\`html\n + + + + 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 8e62cb8..0000000 --- a/test/test.js +++ /dev/null @@ -1,60 +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 proxyquire = require( 'proxyquire' ); -var main = require( './../lib/main.js' ); -var polyfill = require( './../lib/polyfill.js' ); -var empty = require( './../lib' ); - - -// TESTS // - -tape( 'main export is a function', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof empty, 'function', 'main export is a function' ); - t.end(); -}); - -tape( 'if an environment supports Node.js buffer instances inheriting from Uint8Array, the main export supports returning arrays having uninitialized memory', function test( t ) { - var empty = proxyquire( './../lib', { - './is_buffer_uint8array.js': mock - }); - t.strictEqual( empty, main, 'returns expected value' ); - t.end(); - - function mock() { - return true; - } -}); - -tape( 'if an environment does not support Node.js buffer instances inheriting from Uint8Array, the main export supports returning zero-filled arrays', function test( t ) { - var empty = proxyquire( './../lib', { - './is_buffer_uint8array.js': mock - }); - t.strictEqual( empty, polyfill, 'returns expected value' ); - t.end(); - - function mock() { - return false; - } -}); diff --git a/test/test.main.js b/test/test.main.js deleted file mode 100644 index 73fce24..0000000 --- a/test/test.main.js +++ /dev/null @@ -1,285 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2024 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR 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 Float64Array = require( '@stdlib/array-float64' ); -var Float32Array = require( '@stdlib/array-float32' ); -var Int32Array = require( '@stdlib/array-int32' ); -var Uint32Array = require( '@stdlib/array-uint32' ); -var Int16Array = require( '@stdlib/array-int16' ); -var Uint16Array = require( '@stdlib/array-uint16' ); -var Int8Array = require( '@stdlib/array-int8' ); -var Uint8Array = require( '@stdlib/array-uint8' ); -var Uint8ClampedArray = require( '@stdlib/array-uint8c' ); -var Complex64Array = require( '@stdlib/array-complex64' ); -var Complex128Array = require( '@stdlib/array-complex128' ); -var BooleanArray = require( '@stdlib/array-bool' ); -var instanceOf = require( '@stdlib/assert-instance-of' ); -var empty = require( './../lib/main.js' ); - - -// TESTS // - -tape( 'main export is a function', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof empty, 'function', 'main export is a function' ); - t.end(); -}); - -tape( 'the function throws an error if provided a value other than a nonnegative integer for the first argument', function test( t ) { - var values; - var i; - - values = [ - '5', - -3, - 3.14, - NaN, - true, - false, - null, - void 0, - [], - {}, - function noop() {} - ]; - - for ( i = 0; i < values.length; i++ ) { - t.throws( badValue( values[i] ), TypeError, 'throws an error when provided '+values[i] ); - } - t.end(); - - function badValue( value ) { - return function badValue() { - empty( value ); - }; - } -}); - -tape( 'the function throws an error if provided a value other than a nonnegative integer for the first argument (dtype)', function test( t ) { - var values; - var i; - - values = [ - '5', - -3, - 3.14, - NaN, - true, - false, - null, - void 0, - [], - {}, - function noop() {} - ]; - - for ( i = 0; i < values.length; i++ ) { - t.throws( badValue( values[i] ), TypeError, 'throws an error when provided '+values[i] ); - } - t.end(); - - function badValue( value ) { - return function badValue() { - empty( value, 'float32' ); - }; - } -}); - -tape( 'the function throws an error if provided an unrecognized data type', function test( t ) { - var values; - var i; - - values = [ - '5', - 'beep', - 'empty', - 'Int32', - 'Uint32', - 'Int16', - 'Uint16', - 'Int8', - 'Uint8', - 'Uint8c', - 'uint8_clamped', - 'Float64', - 'Float32', - 'FLOAT64', - 'FLOAT32', - 'GENERIC' - ]; - - for ( i = 0; i < values.length; i++ ) { - t.throws( badValue( values[i] ), TypeError, 'throws an error when provided '+values[i] ); - } - t.end(); - - function badValue( value ) { - return function badValue() { - empty( 10, value ); - }; - } -}); - -tape( 'the function returns an empty array (default)', function test( t ) { - var arr; - - arr = empty( 5 ); - t.strictEqual( instanceOf( arr, Float64Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=float64)', function test( t ) { - var arr; - - arr = empty( 5, 'float64' ); - t.strictEqual( instanceOf( arr, Float64Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=float32)', function test( t ) { - var arr; - - arr = empty( 5, 'float32' ); - t.strictEqual( instanceOf( arr, Float32Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=bool)', function test( t ) { - var arr; - - arr = empty( 5, 'bool' ); - t.strictEqual( instanceOf( arr, BooleanArray ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=complex128)', function test( t ) { - var arr; - - arr = empty( 5, 'complex128' ); - t.strictEqual( instanceOf( arr, Complex128Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=complex64)', function test( t ) { - var arr; - - arr = empty( 5, 'complex64' ); - t.strictEqual( instanceOf( arr, Complex64Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=int32)', function test( t ) { - var arr; - - arr = empty( 5, 'int32' ); - t.strictEqual( instanceOf( arr, Int32Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=uint32)', function test( t ) { - var arr; - - arr = empty( 5, 'uint32' ); - t.strictEqual( instanceOf( arr, Uint32Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=int16)', function test( t ) { - var arr; - - arr = empty( 5, 'int16' ); - t.strictEqual( instanceOf( arr, Int16Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=uint16)', function test( t ) { - var arr; - - arr = empty( 5, 'uint16' ); - t.strictEqual( instanceOf( arr, Uint16Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=int8)', function test( t ) { - var arr; - - arr = empty( 5, 'int8' ); - t.strictEqual( instanceOf( arr, Int8Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=uint8)', function test( t ) { - var arr; - - arr = empty( 5, 'uint8' ); - t.strictEqual( instanceOf( arr, Uint8Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=uint8c)', function test( t ) { - var arr; - - arr = empty( 5, 'uint8c' ); - t.strictEqual( instanceOf( arr, Uint8ClampedArray ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=generic)', function test( t ) { - var expected; - var arr; - - expected = [ 0, 0, 0, 0, 0 ]; - - arr = empty( 5, 'generic' ); - t.strictEqual( instanceOf( arr, Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); diff --git a/test/test.polyfill.js b/test/test.polyfill.js deleted file mode 100644 index 4fc9472..0000000 --- a/test/test.polyfill.js +++ /dev/null @@ -1,340 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2024 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR 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 Float64Array = require( '@stdlib/array-float64' ); -var Float32Array = require( '@stdlib/array-float32' ); -var Int32Array = require( '@stdlib/array-int32' ); -var Uint32Array = require( '@stdlib/array-uint32' ); -var Int16Array = require( '@stdlib/array-int16' ); -var Uint16Array = require( '@stdlib/array-uint16' ); -var Int8Array = require( '@stdlib/array-int8' ); -var Uint8Array = require( '@stdlib/array-uint8' ); -var Uint8ClampedArray = require( '@stdlib/array-uint8c' ); -var Complex64Array = require( '@stdlib/array-complex64' ); -var Complex128Array = require( '@stdlib/array-complex128' ); -var BooleanArray = require( '@stdlib/array-bool' ); -var reinterpret64 = require( '@stdlib/strided-base-reinterpret-complex64' ); -var reinterpret128 = require( '@stdlib/strided-base-reinterpret-complex128' ); -var reinterpretBoolean = require( '@stdlib/strided-base-reinterpret-boolean' ); -var instanceOf = require( '@stdlib/assert-instance-of' ); -var empty = require( './../lib/polyfill.js' ); - - -// TESTS // - -tape( 'main export is a function', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof empty, 'function', 'main export is a function' ); - t.end(); -}); - -tape( 'the function throws an error if provided a value other than a nonnegative integer for the first argument', function test( t ) { - var values; - var i; - - values = [ - '5', - -3, - 3.14, - NaN, - true, - false, - null, - void 0, - [], - {}, - function noop() {} - ]; - - for ( i = 0; i < values.length; i++ ) { - t.throws( badValue( values[i] ), TypeError, 'throws an error when provided '+values[i] ); - } - t.end(); - - function badValue( value ) { - return function badValue() { - empty( value ); - }; - } -}); - -tape( 'the function throws an error if provided a value other than a nonnegative integer for the first argument (dtype)', function test( t ) { - var values; - var i; - - values = [ - '5', - -3, - 3.14, - NaN, - true, - false, - null, - void 0, - [], - {}, - function noop() {} - ]; - - for ( i = 0; i < values.length; i++ ) { - t.throws( badValue( values[i] ), TypeError, 'throws an error when provided '+values[i] ); - } - t.end(); - - function badValue( value ) { - return function badValue() { - empty( value, 'float32' ); - }; - } -}); - -tape( 'the function throws an error if provided an unrecognized data type', function test( t ) { - var values; - var i; - - values = [ - '5', - 'beep', - 'empty', - 'Int32', - 'Uint32', - 'Int16', - 'Uint16', - 'Int8', - 'Uint8', - 'Uint8c', - 'uint8_clamped', - 'Float64', - 'Float32', - 'FLOAT64', - 'FLOAT32', - 'GENERIC' - ]; - - for ( i = 0; i < values.length; i++ ) { - t.throws( badValue( values[i] ), TypeError, 'throws an error when provided '+values[i] ); - } - t.end(); - - function badValue( value ) { - return function badValue() { - empty( 10, value ); - }; - } -}); - -tape( 'the function returns a zero-filled array (default)', function test( t ) { - var expected; - var arr; - - expected = new Float64Array( [ 0.0, 0.0, 0.0, 0.0, 0.0 ] ); - - arr = empty( 5 ); - t.strictEqual( instanceOf( arr, Float64Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=float64)', function test( t ) { - var expected; - var arr; - - expected = new Float64Array( [ 0.0, 0.0, 0.0, 0.0, 0.0 ] ); - - arr = empty( 5, 'float64' ); - t.strictEqual( instanceOf( arr, Float64Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=float32)', function test( t ) { - var expected; - var arr; - - expected = new Float32Array( [ 0.0, 0.0, 0.0, 0.0, 0.0 ] ); - - arr = empty( 5, 'float32' ); - t.strictEqual( instanceOf( arr, Float32Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=bool)', function test( t ) { - var expected; - var arr; - - expected = new Uint8Array( [ 0, 0, 0, 0 ] ); - - arr = empty( 4, 'bool' ); - t.strictEqual( instanceOf( arr, BooleanArray ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( reinterpretBoolean( arr, 0 ), expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=complex128)', function test( t ) { - var expected; - var arr; - - expected = new Float64Array( [ 0.0, 0.0, 0.0, 0.0 ] ); - - arr = empty( 2, 'complex128' ); - t.strictEqual( instanceOf( arr, Complex128Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length/2, 'returns expected value' ); - t.deepEqual( reinterpret128( arr, 0 ), expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=complex64)', function test( t ) { - var expected; - var arr; - - expected = new Float32Array( [ 0.0, 0.0, 0.0, 0.0 ] ); - - arr = empty( 2, 'complex64' ); - t.strictEqual( instanceOf( arr, Complex64Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length/2, 'returns expected value' ); - t.deepEqual( reinterpret64( arr, 0 ), expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=int32)', function test( t ) { - var expected; - var arr; - - expected = new Int32Array( [ 0, 0, 0, 0, 0 ] ); - - arr = empty( 5, 'int32' ); - t.strictEqual( instanceOf( arr, Int32Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=uint32)', function test( t ) { - var expected; - var arr; - - expected = new Uint32Array( [ 0, 0, 0, 0, 0 ] ); - - arr = empty( 5, 'uint32' ); - t.strictEqual( instanceOf( arr, Uint32Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=int16)', function test( t ) { - var expected; - var arr; - - expected = new Int16Array( [ 0, 0, 0, 0, 0 ] ); - - arr = empty( 5, 'int16' ); - t.strictEqual( instanceOf( arr, Int16Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=uint16)', function test( t ) { - var expected; - var arr; - - expected = new Uint16Array( [ 0, 0, 0, 0, 0 ] ); - - arr = empty( 5, 'uint16' ); - t.strictEqual( instanceOf( arr, Uint16Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=int8)', function test( t ) { - var expected; - var arr; - - expected = new Int8Array( [ 0, 0, 0, 0, 0 ] ); - - arr = empty( 5, 'int8' ); - t.strictEqual( instanceOf( arr, Int8Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=uint8)', function test( t ) { - var expected; - var arr; - - expected = new Uint8Array( [ 0, 0, 0, 0, 0 ] ); - - arr = empty( 5, 'uint8' ); - t.strictEqual( instanceOf( arr, Uint8Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=uint8c)', function test( t ) { - var expected; - var arr; - - expected = new Uint8ClampedArray( [ 0, 0, 0, 0, 0 ] ); - - arr = empty( 5, 'uint8c' ); - t.strictEqual( instanceOf( arr, Uint8ClampedArray ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=generic)', function test( t ) { - var expected; - var arr; - - expected = [ 0, 0, 0, 0, 0 ]; - - arr = empty( 5, 'generic' ); - t.strictEqual( instanceOf( arr, Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); From 96074c6350fc7b3b603fa59183850a712dfc7b64 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Mon, 29 Jul 2024 03:10:20 +0000 Subject: [PATCH 65/75] Transform error messages --- lib/main.js | 6 +++--- package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/main.js b/lib/main.js index 33d8392..44eb4a4 100644 --- a/lib/main.js +++ b/lib/main.js @@ -26,7 +26,7 @@ var ctors = require( '@stdlib/array-typed-ctors' ); var zeros = require( '@stdlib/array-base-zeros' ); var bytesPerElement = require( '@stdlib/ndarray-base-bytes-per-element' ); var defaults = require( '@stdlib/array-defaults' ); -var format = require( '@stdlib/string-format' ); +var format = require( '@stdlib/error-tools-fmtprodmsg' ); // VARIABLES // @@ -63,7 +63,7 @@ function empty( length ) { var nb; if ( !isNonNegativeInteger( length ) ) { - throw new TypeError( format( 'invalid argument. First argument must be a nonnegative integer. Value: `%s`.', length ) ); + throw new TypeError( format( '1Zj2d', length ) ); } if ( arguments.length > 1 ) { dtype = arguments[ 1 ]; @@ -75,7 +75,7 @@ function empty( length ) { } nbytes = bytesPerElement( dtype ); if ( nbytes === null ) { - throw new TypeError( format( 'invalid argument. Second argument must be a supported data type. Value: `%s`.', dtype ) ); + throw new TypeError( format( '1ZjEC', dtype ) ); } // Resolve typed array constructor: ctor = ctors( dtype ); diff --git a/package.json b/package.json index 54bc5c3..3135a08 100644 --- a/package.json +++ b/package.json @@ -46,7 +46,7 @@ "@stdlib/assert-is-uint8array": "^0.2.2", "@stdlib/buffer-alloc-unsafe": "^0.2.2", "@stdlib/ndarray-base-bytes-per-element": "^0.2.2", - "@stdlib/string-format": "^0.2.2", + "@stdlib/error-tools-fmtprodmsg": "^0.2.2", "@stdlib/types": "^0.3.2", "@stdlib/error-tools-fmtprodmsg": "^0.2.2" }, From 09aea19905d851fe59b76772133bec6bf7cccaaf Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Mon, 29 Jul 2024 03:33:12 +0000 Subject: [PATCH 66/75] Remove files --- mod.d.ts | 51 - mod.js | 4 - mod.js.map | 1 - stats.html | 4842 ---------------------------------------------------- 4 files changed, 4898 deletions(-) delete mode 100644 mod.d.ts delete mode 100644 mod.js delete mode 100644 mod.js.map delete mode 100644 stats.html diff --git a/mod.d.ts b/mod.d.ts deleted file mode 100644 index e22b893..0000000 --- a/mod.d.ts +++ /dev/null @@ -1,51 +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 - -/// - -import { DataTypeMap } from '@stdlib/types/array'; - -/** -* Creates an uninitialized array having a specified length. -* -* ## Notes -* -* - In browser environments, the function always returns zero-filled arrays. -* - If `dtype` is `'generic'`, the function always returns a zero-filled array. -* - In Node.js versions `>=3.0.0`, the underlying memory of returned typed arrays is **not** initialized. Memory contents are unknown and may contain **sensitive** data. -* -* @param length - array length -* @param dtype - data type (default: 'float64') -* @returns empty array -* -* @example -* var arr = empty( 2 ); -* // returns -* -* @example -* var arr = empty( 2, 'float32' ); -* // returns -*/ -declare function empty = 'float64'>( length: number, dtype?: T ): DataTypeMap[T]; - - -// EXPORTS // - -export = empty; diff --git a/mod.js b/mod.js deleted file mode 100644 index 8ffb56d..0000000 --- a/mod.js +++ /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 -/// -var r="function"==typeof Object.defineProperty?Object.defineProperty:null;var e=Object.defineProperty;function t(r){return"number"==typeof r}function n(r){var e,t="";for(e=0;e0&&(e-=1),n=i.toExponential(e)):n=i.toPrecision(r.precision),r.alternate||(n=h.call(n,v,"$1e"),n=h.call(n,w,"e"),n=h.call(n,g,""));break;default:throw new Error("invalid double notation. Value: "+r.specifier)}return n=h.call(n,c,"e+0$1"),n=h.call(n,p,"e-0$1"),r.alternate&&(n=h.call(n,y,"$1."),n=h.call(n,m,"$1.e")),i>=0&&r.sign&&(n=r.sign+n),n=r.specifier===s.call(r.specifier)?s.call(n):l.call(n)}function d(r){var e,t="";for(e=0;e127)throw new Error("invalid character code. Value: "+n.arg);n.arg=_(a)?String(n.arg):E(a)}break;case"e":case"E":case"f":case"F":case"g":case"G":e||(n.precision=6),n.arg=b(n);break;default:throw new Error("invalid specifier: "+n.specifier)}n.maxWidth>=0&&n.arg.length>n.maxWidth&&(n.arg=n.arg.substring(0,n.maxWidth)),n.padZeros?n.arg=i(n.arg,n.width||n.precision,n.padRight):n.width&&(n.arg=(c=n.arg,p=n.width,y=n.padRight,m=void 0,(m=p-c.length)<0?c:c=y?c+d(m):d(m)+c)),f+=n.arg||"",l+=1}return f}var A=/%(?:([1-9]\d*)\$)?([0 +\-#]*)(\*|\d+)?(?:(\.)(\*|\d+)?)?[hlL]?([%A-Za-z])/g;function j(r){var e={mapping:r[1]?parseInt(r[1],10):void 0,flags:r[2],width:r[3],precision:r[5],specifier:r[6]};return"."===r[4]&&void 0===r[5]&&(e.precision="1"),e}function F(r){var e,t,n,i;for(t=[],i=0,n=A.exec(r);n;)(e=r.slice(i,A.lastIndex-n[0].length)).length&&t.push(e),t.push(j(n)),i=A.lastIndex,n=A.exec(r);return(e=r.slice(i)).length&&t.push(e),t}function S(r){var e,t;if("string"!=typeof r)throw new TypeError(S("invalid argument. First argument must be a string. Value: `%s`.",r));for(e=[F(r)],t=1;trr&&tr(r)}function ir(r){return U(r)&&nr(r)}function or(r){return H(r)&&nr(r.valueOf())}function ar(r){return ir(r)||or(r)}function ur(r){return ir(r)&&r>=0}function fr(r){return or(r)&&r.valueOf()>=0}function lr(r){return ur(r)||fr(r)}N(ar,"isPrimitive",ir),N(ar,"isObject",or),N(lr,"isPrimitive",ur),N(lr,"isObject",fr);var sr="function"==typeof Float64Array;var hr="function"==typeof Float64Array?Float64Array:null;var cr="function"==typeof Float64Array?Float64Array:void 0;var pr=function(){var r,e,t;if("function"!=typeof hr)return!1;try{e=new hr([1,3.14,-3.14,NaN]),t=e,r=(sr&&t instanceof Float64Array||"[object Float64Array]"===z(t))&&1===e[0]&&3.14===e[1]&&-3.14===e[2]&&e[3]!=e[3]}catch(e){r=!1}return r}()?cr:function(){throw new Error("not implemented")},yr="function"==typeof Float32Array;var mr="function"==typeof Float32Array?Float32Array:null;var gr="function"==typeof Float32Array?Float32Array:void 0;var wr=function(){var r,e,t;if("function"!=typeof mr)return!1;try{e=new mr([1,3.14,-3.14,5e40]),t=e,r=(yr&&t instanceof Float32Array||"[object Float32Array]"===z(t))&&1===e[0]&&3.140000104904175===e[1]&&-3.140000104904175===e[2]&&e[3]===Q}catch(e){r=!1}return r}()?gr:function(){throw new Error("not implemented")},vr="function"==typeof Int16Array;var br="function"==typeof Int16Array?Int16Array:null;var dr="function"==typeof Int16Array?Int16Array:void 0;var Er=function(){var r,e,t;if("function"!=typeof br)return!1;try{e=new br([1,3.14,-3.14,32768]),t=e,r=(vr&&t instanceof Int16Array||"[object Int16Array]"===z(t))&&1===e[0]&&3===e[1]&&-3===e[2]&&-32768===e[3]}catch(e){r=!1}return r}()?dr:function(){throw new Error("not implemented")},_r="function"==typeof Int32Array;var Tr="function"==typeof Int32Array?Int32Array:null;var xr="function"==typeof Int32Array?Int32Array:void 0;var Vr=function(){var r,e,t;if("function"!=typeof Tr)return!1;try{e=new Tr([1,3.14,-3.14,2147483648]),t=e,r=(_r&&t instanceof Int32Array||"[object Int32Array]"===z(t))&&1===e[0]&&3===e[1]&&-3===e[2]&&-2147483648===e[3]}catch(e){r=!1}return r}()?xr:function(){throw new Error("not implemented")},Ar="function"==typeof Int8Array;var jr="function"==typeof Int8Array?Int8Array:null;var Fr="function"==typeof Int8Array?Int8Array:void 0;var Sr=function(){var r,e,t;if("function"!=typeof jr)return!1;try{e=new jr([1,3.14,-3.14,128]),t=e,r=(Ar&&t instanceof Int8Array||"[object Int8Array]"===z(t))&&1===e[0]&&3===e[1]&&-3===e[2]&&-128===e[3]}catch(e){r=!1}return r}()?Fr:function(){throw new Error("not implemented")},kr="function"==typeof Uint16Array;var Lr="function"==typeof Uint16Array?Uint16Array:null;var Ir="function"==typeof Uint16Array?Uint16Array:void 0;var Rr=function(){var r,e,t;if("function"!=typeof Lr)return!1;try{e=new Lr(e=[1,3.14,-3.14,65536,65537]),t=e,r=(kr&&t instanceof Uint16Array||"[object Uint16Array]"===z(t))&&1===e[0]&&3===e[1]&&65533===e[2]&&0===e[3]&&1===e[4]}catch(e){r=!1}return r}()?Ir:function(){throw new Error("not implemented")},Br="function"==typeof Uint32Array;var Or="function"==typeof Uint32Array?Uint32Array:null;var Cr="function"==typeof Uint32Array?Uint32Array:void 0;var Mr=function(){var r,e,t;if("function"!=typeof Or)return!1;try{e=new Or(e=[1,3.14,-3.14,4294967296,4294967297]),t=e,r=(Br&&t instanceof Uint32Array||"[object Uint32Array]"===z(t))&&1===e[0]&&3===e[1]&&4294967293===e[2]&&0===e[3]&&1===e[4]}catch(e){r=!1}return r}()?Cr:function(){throw new Error("not implemented")},Nr="function"==typeof Uint8Array;var Ur="function"==typeof Uint8Array?Uint8Array:null;var Pr="function"==typeof Uint8Array?Uint8Array:void 0;var Yr=function(){var r,e,t;if("function"!=typeof Ur)return!1;try{e=new Ur(e=[1,3.14,-3.14,256,257]),t=e,r=(Nr&&t instanceof Uint8Array||"[object Uint8Array]"===z(t))&&1===e[0]&&3===e[1]&&253===e[2]&&0===e[3]&&1===e[4]}catch(e){r=!1}return r}()?Pr:function(){throw new Error("not implemented")},Wr="function"==typeof Uint8ClampedArray;var $r="function"==typeof Uint8ClampedArray?Uint8ClampedArray:null;var Gr="function"==typeof Uint8ClampedArray?Uint8ClampedArray:void 0;var Zr=function(){var r,e,t;if("function"!=typeof $r)return!1;try{e=new $r([-1,0,1,3.14,4.99,255,256]),t=e,r=(Wr&&t instanceof Uint8ClampedArray||"[object Uint8ClampedArray]"===z(t))&&0===e[0]&&0===e[1]&&1===e[2]&&3===e[3]&&5===e[4]&&255===e[5]&&255===e[6]}catch(e){r=!1}return r}()?Gr:function(){throw new Error("not implemented")},Xr=4294967295;function zr(r){return"object"==typeof r&&null!==r&&"number"==typeof r.length&&tr(r.length)&&r.length>=0&&r.length<=Xr}var Jr=9007199254740991;function qr(r){return"object"==typeof r&&null!==r&&"number"==typeof r.length&&tr(r.length)&&r.length>=0&&r.length<=Jr}var Dr="function"==typeof ArrayBuffer;function Hr(r){return Dr&&r instanceof ArrayBuffer||"[object ArrayBuffer]"===z(r)}var Kr=Array.isArray?Array.isArray:function(r){return"[object Array]"===z(r)};function Qr(r){return"object"==typeof r&&null!==r&&!Kr(r)}function re(r){return"string"==typeof r}var ee=String.prototype.valueOf;var te=Y();function ne(r){return"object"==typeof r&&(r instanceof String||(te?function(r){try{return ee.call(r),!0}catch(r){return!1}}(r):"[object String]"===z(r)))}function ie(r){return re(r)||ne(r)}N(ie,"isPrimitive",re),N(ie,"isObject",ne);var oe=/./;function ae(r){return"boolean"==typeof r}var ue=Boolean,fe=Boolean.prototype.toString;var le=Y();function se(r){return"object"==typeof r&&(r instanceof ue||(le?function(r){try{return fe.call(r),!0}catch(r){return!1}}(r):"[object Boolean]"===z(r)))}function he(r){return ae(r)||se(r)}N(he,"isPrimitive",ae),N(he,"isObject",se);var ce="object"==typeof self?self:null,pe="object"==typeof window?window:null,ye="undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},me="object"==typeof ye?ye:null,ge="object"==typeof globalThis?globalThis:null;var we=function(r){if(arguments.length){if(!ae(r))throw new TypeError(S("invalid argument. Must provide a boolean. Value: `%s`.",r));if(r)return new Function("return this;")()}if(ge)return ge;if(ce)return ce;if(pe)return pe;if(me)return me;throw new Error("unexpected error. Unable to resolve global object.")}(),ve=we.document&&we.document.childNodes,be=Int8Array;function de(){return/^\s*function\s*([^(]*)/i}var Ee=/^\s*function\s*([^(]*)/i;function _e(r){return null!==r&&"object"==typeof r}function Te(r){var e,t,n,i;if(("Object"===(t=z(r).slice(8,-1))||"Error"===t)&&r.constructor){if("string"==typeof(n=r.constructor).name)return n.name;if(e=Ee.exec(n.toString()))return e[1]}return _e(i=r)&&(i._isBuffer||i.constructor&&"function"==typeof i.constructor.isBuffer&&i.constructor.isBuffer(i))?"Buffer":t}N(de,"REGEXP",Ee),N(_e,"isObjectLikeArray",function(r){if("function"!=typeof r)throw new TypeError(S("invalid argument. Must provide a function. Value: `%s`.",r));return function(e){var t,n;if(!Kr(e))return!1;if(0===(t=e.length))return!1;for(n=0;n=2)e.push(n[0],n[1]);else{if(!Le(n))return new TypeError(S("invalid argument. An iterator must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",n));e.push(Pe(n),Ye(n))}return e}var qe=2*wr.BYTES_PER_ELEMENT,De=Me();function He(r){return r instanceof rt||"object"==typeof r&&null!==r&&("Complex64Array"===r.constructor.name||"Complex128Array"===r.constructor.name)&&"number"==typeof r._length&&"object"==typeof r._buffer}function Ke(r){return r===rt||"Complex128Array"===r.name}function Qe(r,e){return new ke(r[e*=2],r[e+1])}function rt(){var r,e,t,n;if(e=arguments.length,!(this instanceof rt))return 0===e?new rt:1===e?new rt(arguments[0]):2===e?new rt(arguments[0],arguments[1]):new rt(arguments[0],arguments[1],arguments[2]);if(0===e)t=new wr(0);else if(1===e)if(ur(arguments[0]))t=new wr(2*arguments[0]);else if(qr(arguments[0]))if((n=(t=arguments[0]).length)&&Kr(t)&&Le(t[0])){if(t=function(r,e){var t,n,i,o;for(t=e.length,o=0,i=0;it.byteLength-r)throw new RangeError(S("invalid arguments. ArrayBuffer has insufficient capacity. Either decrease the array length or provide a bigger buffer. Minimum capacity: `%u`.",n*qe));t=new wr(t,r,2*n)}}return N(this,"_buffer",t),N(this,"_length",t.length/2),this}function et(r){return r.re}function tt(r){return r.im}function nt(r){var e,t,n;for(e=[];!(t=r.next()).done;)if(zr(n=t.value)&&n.length>=2)e.push(n[0],n[1]);else{if(!Le(n))return new TypeError(S("invalid argument. An iterator must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",n));e.push(et(n),tt(n))}return e}N(rt,"BYTES_PER_ELEMENT",qe),N(rt,"name","Complex64Array"),N(rt,"from",(function(r){var e,t,n,i,o,a,u,f,l,s,h,c;if(!Ve(this))throw new TypeError("invalid invocation. `this` context must be a constructor.");if(!Ke(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if((t=arguments.length)>1){if(!Ve(n=arguments[1]))throw new TypeError(S("invalid argument. Second argument must be a function. Value: `%s`.",n));t>2&&(e=arguments[2])}if(He(r)){if(f=r.length,n){for(o=(i=new this(f))._buffer,c=0,h=0;h=2))throw new TypeError(S("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",s));o[c]=s[0],o[c+1]=s[1]}c+=2}return i}return new this(r)}if(qr(r)){if(n){for(f=r.length,u=r.get&&r.set?ze("default"):Ze("default"),h=0;h=2))throw new TypeError(S("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",s));o[c]=s[0],o[c+1]=s[1]}c+=2}return i}return new this(r)}if(Qr(r)&&De&&Ve(r[Ne])){if(!Ve((o=r[Ne]()).next))throw new TypeError(S("invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.",r));if(a=n?function(r,e,t){var n,i,o,a;for(n=[],a=-1;!(i=r.next()).done;)if(a+=1,zr(o=e.call(t,i.value,a))&&o.length>=2)n.push(o[0],o[1]);else{if(!Le(o))return new TypeError(S("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",o));n.push(Pe(o),Ye(o))}return n}(o,n,e):Je(o),a instanceof Error)throw a;for(o=(i=new this(f=a.length/2))._buffer,h=0;h=this._length))return Qe(this._buffer,r)})),Ue(rt.prototype,"buffer",(function(){return this._buffer.buffer})),Ue(rt.prototype,"byteLength",(function(){return this._buffer.byteLength})),Ue(rt.prototype,"byteOffset",(function(){return this._buffer.byteOffset})),N(rt.prototype,"BYTES_PER_ELEMENT",rt.BYTES_PER_ELEMENT),N(rt.prototype,"copyWithin",(function(r,e){if(!He(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");return 2===arguments.length?this._buffer.copyWithin(2*r,2*e):this._buffer.copyWithin(2*r,2*e,2*arguments[2]),this})),N(rt.prototype,"entries",(function(){var r,e,t,n,i,o,a;if(!He(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");return e=this,r=this._buffer,n=this._length,o=-1,a=-2,N(t={},"next",(function(){var e;if(o+=1,i||o>=n)return{done:!0};return e=new ke(r[a+=2],r[a+1]),{value:[o,e],done:!1}})),N(t,"return",(function(r){if(i=!0,arguments.length)return{value:r,done:!0};return{done:!0}})),Ne&&N(t,Ne,(function(){return e.entries()})),t})),N(rt.prototype,"every",(function(r,e){var t,n;if(!He(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Ve(r))throw new TypeError(S("invalid argument. First argument must be a function. Value: `%s`.",r));for(t=this._buffer,n=0;n1){if(!tr(e))throw new TypeError(S("invalid argument. Second argument must be an integer. Value: `%s`.",e));if(e<0&&(e+=i)<0&&(e=0),arguments.length>2){if(!tr(t))throw new TypeError(S("invalid argument. Third argument must be an integer. Value: `%s`.",t));t<0&&(t+=i)<0&&(t=0),t>i&&(t=i)}else t=i}else e=0,t=i;for(a=Pe(r),u=Ye(r),f=e;f=0;n--)if(i=Qe(t,n),r.call(e,i,n,this))return i})),N(rt.prototype,"findLastIndex",(function(r,e){var t,n,i;if(!He(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Ve(r))throw new TypeError(S("invalid argument. First argument must be a function. Value: `%s`.",r));for(t=this._buffer,n=this._length-1;n>=0;n--)if(i=Qe(t,n),r.call(e,i,n,this))return n;return-1})),N(rt.prototype,"forEach",(function(r,e){var t,n,i;if(!He(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Ve(r))throw new TypeError(S("invalid argument. First argument must be a function. Value: `%s`.",r));for(t=this._buffer,n=0;n=this._length))return Qe(this._buffer,r)})),N(rt.prototype,"includes",(function(r,e){var t,n,i,o,a;if(!He(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Le(r))throw new TypeError(S("invalid argument. First argument must be a complex number. Value: `%s`.",r));if(arguments.length>1){if(!tr(e))throw new TypeError(S("invalid argument. Second argument must be an integer. Value: `%s`.",e));e<0&&(e+=this._length)<0&&(e=0)}else e=0;for(i=Pe(r),o=Ye(r),t=this._buffer,a=e;a1){if(!tr(e))throw new TypeError(S("invalid argument. Second argument must be an integer. Value: `%s`.",e));e<0&&(e+=this._length)<0&&(e=0)}else e=0;for(i=Pe(r),o=Ye(r),t=this._buffer,a=e;a1){if(!tr(e))throw new TypeError(S("invalid argument. Second argument must be an integer. Value: `%s`.",e));e>=this._length?e=this._length-1:e<0&&(e+=this._length)}else e=this._length-1;for(i=Pe(r),o=Ye(r),t=this._buffer,a=e;a>=0;a--)if(i===t[n=2*a]&&o===t[n+1])return a;return-1})),Ue(rt.prototype,"length",(function(){return this._length})),N(rt.prototype,"map",(function(r,e){var t,n,i,o,a;if(!He(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Ve(r))throw new TypeError(S("invalid argument. First argument must be a function. Value: `%s`.",r));for(n=this._buffer,t=(i=new this.constructor(this._length))._buffer,o=0;o1)n=e,o=0;else{if(0===i)throw new Error("invalid operation. If not provided an initial value, an array must contain at least one element.");n=Qe(t,0),o=1}for(;o1){if(!ur(t=arguments[1]))throw new TypeError(S("invalid argument. Index argument must be a nonnegative integer. Value: `%s`.",t))}else t=0;if(Le(r)){if(t>=this._length)throw new RangeError(S("invalid argument. Index argument is out-of-bounds. Value: `%u`.",t));return n[t*=2]=Pe(r),void(n[t+1]=Ye(r))}if(He(r)){if(t+(a=r._length)>this._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");if(e=r._buffer,l=n.byteOffset+t*qe,e.buffer===n.buffer&&e.byteOffsetl){for(i=new wr(e.length),f=0;fthis._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");if(e=r,l=n.byteOffset+t*qe,e.buffer===n.buffer&&e.byteOffsetl){for(i=new wr(a),f=0;fthis._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");for(t*=2,f=0;fu&&(e=u)}}for(t=ri&&(e=i)}}return r>=i?(i=0,t=n.byteLength):r>=e?(i=0,t=n.byteOffset+r*qe):(i=e-r,t=n.byteOffset+r*qe),new this.constructor(n.buffer,t,i<0?0:i)})),N(rt.prototype,"toReversed",(function(){var r,e,t,n,i,o;if(!He(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");for(t=this._length,e=new this.constructor(t),n=this._buffer,r=e._buffer,i=0;i=i)throw new RangeError(S("invalid argument. Index argument is out-of-bounds. Value: `%s`.",r));if(!Le(e))throw new TypeError(S("invalid argument. Second argument must be a complex number. Value: `%s`.",e));return(t=(n=new this.constructor(this._buffer))._buffer)[2*r]=Pe(e),t[2*r+1]=Ye(e),n}));var it=2*pr.BYTES_PER_ELEMENT,ot=Me();function at(r){return r instanceof lt||"object"==typeof r&&null!==r&&("Complex64Array"===r.constructor.name||"Complex128Array"===r.constructor.name)&&"number"==typeof r._length&&"object"==typeof r._buffer}function ut(r){return r===lt||"Complex64Array"===r.name}function ft(r,e){return new Ae(r[e*=2],r[e+1])}function lt(){var r,e,t,n;if(e=arguments.length,!(this instanceof lt))return 0===e?new lt:1===e?new lt(arguments[0]):2===e?new lt(arguments[0],arguments[1]):new lt(arguments[0],arguments[1],arguments[2]);if(0===e)t=new pr(0);else if(1===e)if(ur(arguments[0]))t=new pr(2*arguments[0]);else if(qr(arguments[0]))if((n=(t=arguments[0]).length)&&Kr(t)&&Le(t[0])){if(t=function(r,e){var t,n,i,o;for(t=e.length,o=0,i=0;it.byteLength-r)throw new RangeError(S("invalid arguments. ArrayBuffer has insufficient capacity. Either decrease the array length or provide a bigger buffer. Minimum capacity: `%u`.",n*it));t=new pr(t,r,2*n)}}return N(this,"_buffer",t),N(this,"_length",t.length/2),this}N(lt,"BYTES_PER_ELEMENT",it),N(lt,"name","Complex128Array"),N(lt,"from",(function(r){var e,t,n,i,o,a,u,f,l,s,h,c;if(!Ve(this))throw new TypeError("invalid invocation. `this` context must be a constructor.");if(!ut(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if((t=arguments.length)>1){if(!Ve(n=arguments[1]))throw new TypeError(S("invalid argument. Second argument must be a function. Value: `%s`.",n));t>2&&(e=arguments[2])}if(at(r)){if(f=r.length,n){for(o=(i=new this(f))._buffer,c=0,h=0;h=2))throw new TypeError(S("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",s));o[c]=s[0],o[c+1]=s[1]}c+=2}return i}return new this(r)}if(qr(r)){if(n){for(f=r.length,u=r.get&&r.set?ze("default"):Ze("default"),h=0;h=2))throw new TypeError(S("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",s));o[c]=s[0],o[c+1]=s[1]}c+=2}return i}return new this(r)}if(Qr(r)&&ot&&Ve(r[Ne])){if(!Ve((o=r[Ne]()).next))throw new TypeError(S("invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.",r));if(a=n?function(r,e,t){var n,i,o,a;for(n=[],a=-1;!(i=r.next()).done;)if(a+=1,zr(o=e.call(t,i.value,a))&&o.length>=2)n.push(o[0],o[1]);else{if(!Le(o))return new TypeError(S("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",o));n.push(et(o),tt(o))}return n}(o,n,e):nt(o),a instanceof Error)throw a;for(o=(i=new this(f=a.length/2))._buffer,h=0;h=this._length))return ft(this._buffer,r)})),Ue(lt.prototype,"buffer",(function(){return this._buffer.buffer})),Ue(lt.prototype,"byteLength",(function(){return this._buffer.byteLength})),Ue(lt.prototype,"byteOffset",(function(){return this._buffer.byteOffset})),N(lt.prototype,"BYTES_PER_ELEMENT",lt.BYTES_PER_ELEMENT),N(lt.prototype,"copyWithin",(function(r,e){if(!at(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");return 2===arguments.length?this._buffer.copyWithin(2*r,2*e):this._buffer.copyWithin(2*r,2*e,2*arguments[2]),this})),N(lt.prototype,"entries",(function(){var r,e,t,n,i,o,a;if(!at(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");return e=this,r=this._buffer,n=this._length,o=-1,a=-2,N(t={},"next",(function(){var e;if(o+=1,i||o>=n)return{done:!0};return e=new Ae(r[a+=2],r[a+1]),{value:[o,e],done:!1}})),N(t,"return",(function(r){if(i=!0,arguments.length)return{value:r,done:!0};return{done:!0}})),Ne&&N(t,Ne,(function(){return e.entries()})),t})),N(lt.prototype,"every",(function(r,e){var t,n;if(!at(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Ve(r))throw new TypeError(S("invalid argument. First argument must be a function. Value: `%s`.",r));for(t=this._buffer,n=0;n1){if(!tr(e))throw new TypeError(S("invalid argument. Second argument must be an integer. Value: `%s`.",e));if(e<0&&(e+=i)<0&&(e=0),arguments.length>2){if(!tr(t))throw new TypeError(S("invalid argument. Third argument must be an integer. Value: `%s`.",t));t<0&&(t+=i)<0&&(t=0),t>i&&(t=i)}else t=i}else e=0,t=i;for(a=et(r),u=tt(r),f=e;f=0;n--)if(i=ft(t,n),r.call(e,i,n,this))return i})),N(lt.prototype,"findLastIndex",(function(r,e){var t,n,i;if(!at(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Ve(r))throw new TypeError(S("invalid argument. First argument must be a function. Value: `%s`.",r));for(t=this._buffer,n=this._length-1;n>=0;n--)if(i=ft(t,n),r.call(e,i,n,this))return n;return-1})),N(lt.prototype,"forEach",(function(r,e){var t,n,i;if(!at(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Ve(r))throw new TypeError(S("invalid argument. First argument must be a function. Value: `%s`.",r));for(t=this._buffer,n=0;n=this._length))return ft(this._buffer,r)})),Ue(lt.prototype,"length",(function(){return this._length})),N(lt.prototype,"includes",(function(r,e){var t,n,i,o,a;if(!at(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Le(r))throw new TypeError(S("invalid argument. First argument must be a complex number. Value: `%s`.",r));if(arguments.length>1){if(!tr(e))throw new TypeError(S("invalid argument. Second argument must be an integer. Value: `%s`.",e));e<0&&(e+=this._length)<0&&(e=0)}else e=0;for(i=et(r),o=tt(r),t=this._buffer,a=e;a1){if(!tr(e))throw new TypeError(S("invalid argument. Second argument must be an integer. Value: `%s`.",e));e<0&&(e+=this._length)<0&&(e=0)}else e=0;for(i=et(r),o=tt(r),t=this._buffer,a=e;a1){if(!tr(e))throw new TypeError(S("invalid argument. Second argument must be an integer. Value: `%s`.",e));e>=this._length?e=this._length-1:e<0&&(e+=this._length)}else e=this._length-1;for(i=et(r),o=tt(r),t=this._buffer,a=e;a>=0;a--)if(i===t[n=2*a]&&o===t[n+1])return a;return-1})),N(lt.prototype,"map",(function(r,e){var t,n,i,o,a;if(!at(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Ve(r))throw new TypeError(S("invalid argument. First argument must be a function. Value: `%s`.",r));for(n=this._buffer,t=(i=new this.constructor(this._length))._buffer,o=0;o1)n=e,o=0;else{if(0===i)throw new Error("invalid operation. If not provided an initial value, an array must contain at least one element.");n=ft(t,0),o=1}for(;o1){if(!ur(t=arguments[1]))throw new TypeError(S("invalid argument. Index argument must be a nonnegative integer. Value: `%s`.",t))}else t=0;if(Le(r)){if(t>=this._length)throw new RangeError(S("invalid argument. Index argument is out-of-bounds. Value: `%u`.",t));return n[t*=2]=et(r),void(n[t+1]=tt(r))}if(at(r)){if(t+(a=r._length)>this._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");if(e=r._buffer,l=n.byteOffset+t*it,e.buffer===n.buffer&&e.byteOffsetl){for(i=new pr(e.length),f=0;fthis._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");if(e=r,l=n.byteOffset+t*it,e.buffer===n.buffer&&e.byteOffsetl){for(i=new pr(a),f=0;fthis._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");for(t*=2,f=0;fu&&(e=u)}}for(t=ri&&(e=i)}}return r>=i?(i=0,t=n.byteLength):r>=e?(i=0,t=n.byteOffset+r*it):(i=e-r,t=n.byteOffset+r*it),new this.constructor(n.buffer,t,i<0?0:i)})),N(lt.prototype,"toReversed",(function(){var r,e,t,n,i,o;if(!at(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");for(t=this._length,e=new this.constructor(t),n=this._buffer,r=e._buffer,i=0;i=i)throw new RangeError(S("invalid argument. Index argument is out-of-bounds. Value: `%s`.",r));if(!Le(e))throw new TypeError(S("invalid argument. Second argument must be a complex number. Value: `%s`.",e));return(t=(n=new this.constructor(this._buffer))._buffer)[2*r]=et(e),t[2*r+1]=tt(e),n}));var st={float64:pr,float32:wr,generic:Array,int16:Er,int32:Vr,int8:Sr,uint16:Rr,uint32:Mr,uint8:Yr,uint8c:Zr,complex64:rt,complex128:lt};function ht(){return{dtypes:{default:"float64",numeric:"float64",real:"float64",floating_point:"float64",real_floating_point:"float64",complex_floating_point:"complex128",integer:"int32",signed_integer:"int32",unsigned_integer:"uint32"}}}var ct={dtypes:{default:"float64",numeric:"float64",real:"float64",floating_point:"float64",real_floating_point:"float64",complex_floating_point:"complex128",integer:"int32",signed_integer:"int32",unsigned_integer:"uint32"}},pt={"dtypes.default":ct.dtypes.default,"dtypes.numeric":ct.dtypes.numeric,"dtypes.real":ct.dtypes.real,"dtypes.floating_point":ct.dtypes.floating_point,"dtypes.real_floating_point":ct.dtypes.real_floating_point,"dtypes.complex_floating_point":ct.dtypes.complex_floating_point,"dtypes.integer":ct.dtypes.integer,"dtypes.signed_integer":ct.dtypes.signed_integer,"dtypes.unsigned_integer":ct.dtypes.unsigned_integer};N(ht,"get",(function(r){var e=pt[r];return void 0===e?null:e}));var yt=ht.get("dtypes.default");function mt(r){var e,t;if(!ur(r))throw new TypeError(S("invalid argument. First argument must be a nonnegative integer. Value: `%s`.",r));if("generic"===(e=arguments.length>1?arguments[1]:yt))return function(r,e){var t,n;for(t=[],n=0;n1?mt(r,arguments[1]):mt(r)}export{gt as default}; -//# sourceMappingURL=mod.js.map diff --git a/mod.js.map b/mod.js.map deleted file mode 100644 index 7b2fd54..0000000 --- a/mod.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"mod.js","sources":["../node_modules/@stdlib/utils-define-property/lib/define_property.js","../node_modules/@stdlib/utils-define-property/lib/builtin.js","../node_modules/@stdlib/string-base-format-interpolate/lib/is_number.js","../node_modules/@stdlib/string-base-format-interpolate/lib/zero_pad.js","../node_modules/@stdlib/string-base-format-interpolate/lib/format_integer.js","../node_modules/@stdlib/string-base-format-interpolate/lib/format_double.js","../node_modules/@stdlib/string-base-format-interpolate/lib/space_pad.js","../node_modules/@stdlib/string-base-format-interpolate/lib/main.js","../node_modules/@stdlib/string-base-format-interpolate/lib/is_string.js","../node_modules/@stdlib/string-base-format-tokenize/lib/main.js","../node_modules/@stdlib/string-format/lib/main.js","../node_modules/@stdlib/string-format/lib/is_string.js","../node_modules/@stdlib/utils-define-property/lib/polyfill.js","../node_modules/@stdlib/utils-define-property/lib/index.js","../node_modules/@stdlib/utils-define-property/lib/has_define_property_support.js","../node_modules/@stdlib/utils-define-nonenumerable-read-only-property/lib/main.js","../node_modules/@stdlib/assert-is-number/lib/primitive.js","../node_modules/@stdlib/assert-has-tostringtag-support/lib/main.js","../node_modules/@stdlib/assert-has-symbol-support/lib/main.js","../node_modules/@stdlib/utils-native-class/lib/tostring.js","../node_modules/@stdlib/assert-has-own-property/lib/main.js","../node_modules/@stdlib/symbol-ctor/lib/main.js","../node_modules/@stdlib/utils-native-class/lib/tostringtag.js","../node_modules/@stdlib/utils-native-class/lib/index.js","../node_modules/@stdlib/utils-native-class/lib/polyfill.js","../node_modules/@stdlib/utils-native-class/lib/main.js","../node_modules/@stdlib/number-ctor/lib/main.js","../node_modules/@stdlib/assert-is-number/lib/tostring.js","../node_modules/@stdlib/assert-is-number/lib/object.js","../node_modules/@stdlib/assert-is-number/lib/try2serialize.js","../node_modules/@stdlib/assert-is-number/lib/main.js","../node_modules/@stdlib/assert-is-number/lib/index.js","../node_modules/@stdlib/constants-float64-pinf/lib/index.js","../node_modules/@stdlib/constants-float64-ninf/lib/index.js","../node_modules/@stdlib/math-base-special-floor/lib/main.js","../node_modules/@stdlib/math-base-assert-is-integer/lib/main.js","../node_modules/@stdlib/assert-is-integer/lib/integer.js","../node_modules/@stdlib/assert-is-integer/lib/primitive.js","../node_modules/@stdlib/assert-is-integer/lib/object.js","../node_modules/@stdlib/assert-is-integer/lib/main.js","../node_modules/@stdlib/assert-is-nonnegative-integer/lib/primitive.js","../node_modules/@stdlib/assert-is-nonnegative-integer/lib/object.js","../node_modules/@stdlib/assert-is-nonnegative-integer/lib/main.js","../node_modules/@stdlib/assert-is-integer/lib/index.js","../node_modules/@stdlib/assert-is-nonnegative-integer/lib/index.js","../node_modules/@stdlib/assert-is-float64array/lib/main.js","../node_modules/@stdlib/assert-has-float64array-support/lib/float64array.js","../node_modules/@stdlib/array-float64/lib/main.js","../node_modules/@stdlib/array-float64/lib/index.js","../node_modules/@stdlib/assert-has-float64array-support/lib/main.js","../node_modules/@stdlib/array-float64/lib/polyfill.js","../node_modules/@stdlib/assert-is-float32array/lib/main.js","../node_modules/@stdlib/assert-has-float32array-support/lib/float32array.js","../node_modules/@stdlib/array-float32/lib/main.js","../node_modules/@stdlib/array-float32/lib/index.js","../node_modules/@stdlib/assert-has-float32array-support/lib/main.js","../node_modules/@stdlib/array-float32/lib/polyfill.js","../node_modules/@stdlib/assert-is-int16array/lib/main.js","../node_modules/@stdlib/constants-int16-max/lib/index.js","../node_modules/@stdlib/assert-has-int16array-support/lib/int16array.js","../node_modules/@stdlib/array-int16/lib/main.js","../node_modules/@stdlib/array-int16/lib/index.js","../node_modules/@stdlib/assert-has-int16array-support/lib/main.js","../node_modules/@stdlib/constants-int16-min/lib/index.js","../node_modules/@stdlib/array-int16/lib/polyfill.js","../node_modules/@stdlib/assert-is-int32array/lib/main.js","../node_modules/@stdlib/constants-int32-max/lib/index.js","../node_modules/@stdlib/assert-has-int32array-support/lib/int32array.js","../node_modules/@stdlib/array-int32/lib/main.js","../node_modules/@stdlib/array-int32/lib/index.js","../node_modules/@stdlib/assert-has-int32array-support/lib/main.js","../node_modules/@stdlib/constants-int32-min/lib/index.js","../node_modules/@stdlib/array-int32/lib/polyfill.js","../node_modules/@stdlib/assert-is-int8array/lib/main.js","../node_modules/@stdlib/constants-int8-max/lib/index.js","../node_modules/@stdlib/assert-has-int8array-support/lib/int8array.js","../node_modules/@stdlib/array-int8/lib/main.js","../node_modules/@stdlib/array-int8/lib/index.js","../node_modules/@stdlib/assert-has-int8array-support/lib/main.js","../node_modules/@stdlib/constants-int8-min/lib/index.js","../node_modules/@stdlib/array-int8/lib/polyfill.js","../node_modules/@stdlib/assert-is-uint16array/lib/main.js","../node_modules/@stdlib/constants-uint16-max/lib/index.js","../node_modules/@stdlib/assert-has-uint16array-support/lib/uint16array.js","../node_modules/@stdlib/array-uint16/lib/main.js","../node_modules/@stdlib/array-uint16/lib/index.js","../node_modules/@stdlib/assert-has-uint16array-support/lib/main.js","../node_modules/@stdlib/array-uint16/lib/polyfill.js","../node_modules/@stdlib/assert-is-uint32array/lib/main.js","../node_modules/@stdlib/constants-uint32-max/lib/index.js","../node_modules/@stdlib/assert-has-uint32array-support/lib/uint32array.js","../node_modules/@stdlib/array-uint32/lib/main.js","../node_modules/@stdlib/array-uint32/lib/index.js","../node_modules/@stdlib/assert-has-uint32array-support/lib/main.js","../node_modules/@stdlib/array-uint32/lib/polyfill.js","../node_modules/@stdlib/assert-is-uint8array/lib/main.js","../node_modules/@stdlib/constants-uint8-max/lib/index.js","../node_modules/@stdlib/assert-has-uint8array-support/lib/uint8array.js","../node_modules/@stdlib/array-uint8/lib/main.js","../node_modules/@stdlib/array-uint8/lib/index.js","../node_modules/@stdlib/assert-has-uint8array-support/lib/main.js","../node_modules/@stdlib/array-uint8/lib/polyfill.js","../node_modules/@stdlib/assert-is-uint8clampedarray/lib/main.js","../node_modules/@stdlib/assert-has-uint8clampedarray-support/lib/uint8clampedarray.js","../node_modules/@stdlib/array-uint8c/lib/main.js","../node_modules/@stdlib/array-uint8c/lib/index.js","../node_modules/@stdlib/assert-has-uint8clampedarray-support/lib/main.js","../node_modules/@stdlib/array-uint8c/lib/polyfill.js","../node_modules/@stdlib/constants-array-max-array-length/lib/index.js","../node_modules/@stdlib/assert-is-array-like-object/lib/main.js","../node_modules/@stdlib/constants-array-max-typed-array-length/lib/index.js","../node_modules/@stdlib/assert-is-collection/lib/main.js","../node_modules/@stdlib/assert-is-arraybuffer/lib/main.js","../node_modules/@stdlib/assert-is-array/lib/main.js","../node_modules/@stdlib/assert-is-object/lib/main.js","../node_modules/@stdlib/assert-is-string/lib/primitive.js","../node_modules/@stdlib/assert-is-string/lib/valueof.js","../node_modules/@stdlib/assert-is-string/lib/object.js","../node_modules/@stdlib/assert-is-string/lib/try2valueof.js","../node_modules/@stdlib/assert-is-string/lib/main.js","../node_modules/@stdlib/assert-is-string/lib/index.js","../node_modules/@stdlib/utils-type-of/lib/fixtures/re.js","../node_modules/@stdlib/assert-is-boolean/lib/primitive.js","../node_modules/@stdlib/boolean-ctor/lib/main.js","../node_modules/@stdlib/assert-is-boolean/lib/tostring.js","../node_modules/@stdlib/assert-is-boolean/lib/object.js","../node_modules/@stdlib/assert-is-boolean/lib/try2serialize.js","../node_modules/@stdlib/assert-is-boolean/lib/main.js","../node_modules/@stdlib/assert-is-boolean/lib/index.js","../node_modules/@stdlib/utils-global/lib/self.js","../node_modules/@stdlib/utils-global/lib/window.js","../node_modules/@stdlib/utils-global/lib/global.js","../node_modules/@stdlib/utils-global/lib/global_this.js","../node_modules/@stdlib/utils-type-of/lib/fixtures/nodelist.js","../node_modules/@stdlib/utils-global/lib/main.js","../node_modules/@stdlib/utils-global/lib/codegen.js","../node_modules/@stdlib/utils-type-of/lib/fixtures/typedarray.js","../node_modules/@stdlib/regexp-function-name/lib/main.js","../node_modules/@stdlib/regexp-function-name/lib/regexp.js","../node_modules/@stdlib/assert-is-object-like/lib/main.js","../node_modules/@stdlib/utils-constructor-name/lib/main.js","../node_modules/@stdlib/assert-is-buffer/lib/main.js","../node_modules/@stdlib/regexp-function-name/lib/index.js","../node_modules/@stdlib/assert-is-object-like/lib/index.js","../node_modules/@stdlib/assert-tools-array-function/lib/main.js","../node_modules/@stdlib/utils-type-of/lib/index.js","../node_modules/@stdlib/utils-type-of/lib/check.js","../node_modules/@stdlib/utils-type-of/lib/polyfill.js","../node_modules/@stdlib/utils-type-of/lib/main.js","../node_modules/@stdlib/assert-is-function/lib/main.js","../node_modules/@stdlib/complex-float64/lib/main.js","../node_modules/@stdlib/complex-float64/lib/tostring.js","../node_modules/@stdlib/complex-float64/lib/tojson.js","../node_modules/@stdlib/number-float64-base-to-float32/lib/main.js","../node_modules/@stdlib/number-float64-base-to-float32/lib/polyfill.js","../node_modules/@stdlib/number-float64-base-to-float32/lib/index.js","../node_modules/@stdlib/complex-float32/lib/main.js","../node_modules/@stdlib/assert-is-complex-like/lib/main.js","../node_modules/@stdlib/math-base-assert-is-even/lib/main.js","../node_modules/@stdlib/complex-float32/lib/tostring.js","../node_modules/@stdlib/complex-float32/lib/tojson.js","../node_modules/@stdlib/array-base-assert-is-complex64array/lib/main.js","../node_modules/@stdlib/array-base-assert-is-complex128array/lib/main.js","../node_modules/@stdlib/assert-has-iterator-symbol-support/lib/main.js","../node_modules/@stdlib/symbol-iterator/lib/main.js","../node_modules/@stdlib/utils-define-nonenumerable-read-only-accessor/lib/main.js","../node_modules/@stdlib/complex-realf/lib/main.js","../node_modules/@stdlib/complex-imagf/lib/main.js","../node_modules/@stdlib/strided-base-reinterpret-complex64/lib/main.js","../node_modules/@stdlib/strided-base-reinterpret-complex128/lib/main.js","../node_modules/@stdlib/array-base-getter/lib/main.js","../node_modules/@stdlib/array-base-accessor-getter/lib/main.js","../node_modules/@stdlib/array-complex64/lib/from_iterator.js","../node_modules/@stdlib/array-complex64/lib/main.js","../node_modules/@stdlib/array-complex64/lib/from_array.js","../node_modules/@stdlib/complex-real/lib/main.js","../node_modules/@stdlib/complex-imag/lib/main.js","../node_modules/@stdlib/array-complex128/lib/from_iterator.js","../node_modules/@stdlib/array-complex64/lib/from_iterator_map.js","../node_modules/@stdlib/array-complex128/lib/main.js","../node_modules/@stdlib/array-complex128/lib/from_array.js","../node_modules/@stdlib/array-complex128/lib/from_iterator_map.js","../node_modules/@stdlib/array-ctors/lib/ctors.js","../node_modules/@stdlib/array-defaults/lib/main.js","../node_modules/@stdlib/array-defaults/lib/get.js","../node_modules/@stdlib/array-defaults/lib/index.js","../node_modules/@stdlib/array-zeros/lib/main.js","../node_modules/@stdlib/array-base-filled/lib/main.js","../node_modules/@stdlib/array-base-zeros/lib/main.js","../node_modules/@stdlib/array-ctors/lib/main.js","../lib/polyfill.js"],"sourcesContent":["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Object.defineProperty === 'function' ) ? Object.defineProperty : null;\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Defines (or modifies) an object property.\n*\n* ## Notes\n*\n* - Property descriptors come in two flavors: **data descriptors** and **accessor descriptors**. A data descriptor is a property that has a value, which may or may not be writable. An accessor descriptor is a property described by a getter-setter function pair. A descriptor must be one of these two flavors and cannot be both.\n*\n* @name defineProperty\n* @type {Function}\n* @param {Object} obj - object on which to define the property\n* @param {(string|symbol)} prop - property name\n* @param {Object} descriptor - property descriptor\n* @param {boolean} [descriptor.configurable=false] - boolean indicating if property descriptor can be changed and if the property can be deleted from the provided object\n* @param {boolean} [descriptor.enumerable=false] - boolean indicating if the property shows up when enumerating object properties\n* @param {boolean} [descriptor.writable=false] - boolean indicating if the value associated with the property can be changed with an assignment operator\n* @param {*} [descriptor.value] - property value\n* @param {(Function|void)} [descriptor.get=undefined] - function which serves as a getter for the property, or, if no getter, undefined. When the property is accessed, a getter function is called without arguments and with the `this` context set to the object through which the property is accessed (which may not be the object on which the property is defined due to inheritance). The return value will be used as the property value.\n* @param {(Function|void)} [descriptor.set=undefined] - function which serves as a setter for the property, or, if no setter, undefined. When assigning a property value, a setter function is called with one argument (the value being assigned to the property) and with the `this` context set to the object through which the property is assigned.\n* @throws {TypeError} first argument must be an object\n* @throws {TypeError} third argument must be an object\n* @throws {Error} property descriptor cannot have both a value and a setter and/or getter\n* @returns {Object} object with added property\n*\n* @example\n* var obj = {};\n*\n* defineProperty( obj, 'foo', {\n* 'value': 'bar'\n* });\n*\n* var str = obj.foo;\n* // returns 'bar'\n*/\nvar defineProperty = Object.defineProperty;\n\n\n// EXPORTS //\n\nexport default defineProperty;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Tests if a value is a number primitive.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number primitive\n*\n* @example\n* var bool = isNumber( 3.14 );\n* // returns true\n*\n* @example\n* var bool = isNumber( NaN );\n* // returns true\n*\n* @example\n* var bool = isNumber( new Number( 3.14 ) );\n* // returns false\n*/\nfunction isNumber( value ) {\n\treturn ( typeof value === 'number' ); // NOTE: we inline the `isNumber.isPrimitive` function from `@stdlib/assert/is-number` in order to avoid circular dependencies.\n}\n\n\n// EXPORTS //\n\nexport default isNumber;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// FUNCTIONS //\n\n/**\n* Tests if a string starts with a minus sign (`-`).\n*\n* @private\n* @param {string} str - input string\n* @returns {boolean} boolean indicating if a string starts with a minus sign (`-`)\n*/\nfunction startsWithMinus( str ) {\n\treturn str[ 0 ] === '-';\n}\n\n/**\n* Returns a string of `n` zeros.\n*\n* @private\n* @param {number} n - number of zeros\n* @returns {string} string of zeros\n*/\nfunction zeros( n ) {\n\tvar out = '';\n\tvar i;\n\tfor ( i = 0; i < n; i++ ) {\n\t\tout += '0';\n\t}\n\treturn out;\n}\n\n\n// MAIN //\n\n/**\n* Pads a token with zeros to the specified width.\n*\n* @private\n* @param {string} str - token argument\n* @param {number} width - token width\n* @param {boolean} [right=false] - boolean indicating whether to pad to the right\n* @returns {string} padded token argument\n*/\nfunction zeroPad( str, width, right ) {\n\tvar negative = false;\n\tvar pad = width - str.length;\n\tif ( pad < 0 ) {\n\t\treturn str;\n\t}\n\tif ( startsWithMinus( str ) ) {\n\t\tnegative = true;\n\t\tstr = str.substr( 1 );\n\t}\n\tstr = ( right ) ?\n\t\tstr + zeros( pad ) :\n\t\tzeros( pad ) + str;\n\tif ( negative ) {\n\t\tstr = '-' + str;\n\t}\n\treturn str;\n}\n\n\n// EXPORTS //\n\nexport default zeroPad;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isNumber from './is_number.js';\nimport zeroPad from './zero_pad.js';\n\n// NOTE: for the following, we explicitly avoid using stdlib packages in this particular package in order to avoid circular dependencies.\nvar lowercase = String.prototype.toLowerCase;\nvar uppercase = String.prototype.toUpperCase;\n\n\n// MAIN //\n\n/**\n* Formats a token object argument as an integer.\n*\n* @private\n* @param {Object} token - token object\n* @throws {Error} must provide a valid integer\n* @returns {string} formatted token argument\n*/\nfunction formatInteger( token ) {\n\tvar base;\n\tvar out;\n\tvar i;\n\n\tswitch ( token.specifier ) {\n\tcase 'b':\n\t\t// Case: %b (binary)\n\t\tbase = 2;\n\t\tbreak;\n\tcase 'o':\n\t\t// Case: %o (octal)\n\t\tbase = 8;\n\t\tbreak;\n\tcase 'x':\n\tcase 'X':\n\t\t// Case: %x, %X (hexadecimal)\n\t\tbase = 16;\n\t\tbreak;\n\tcase 'd':\n\tcase 'i':\n\tcase 'u':\n\tdefault:\n\t\t// Case: %d, %i, %u (decimal)\n\t\tbase = 10;\n\t\tbreak;\n\t}\n\tout = token.arg;\n\ti = parseInt( out, 10 );\n\tif ( !isFinite( i ) ) { // NOTE: We use the global `isFinite` function here instead of `@stdlib/math/base/assert/is-finite` in order to avoid circular dependencies.\n\t\tif ( !isNumber( out ) ) {\n\t\t\tthrow new Error( 'invalid integer. Value: ' + out );\n\t\t}\n\t\ti = 0;\n\t}\n\tif ( i < 0 && ( token.specifier === 'u' || base !== 10 ) ) {\n\t\ti = 0xffffffff + i + 1;\n\t}\n\tif ( i < 0 ) {\n\t\tout = ( -i ).toString( base );\n\t\tif ( token.precision ) {\n\t\t\tout = zeroPad( out, token.precision, token.padRight );\n\t\t}\n\t\tout = '-' + out;\n\t} else {\n\t\tout = i.toString( base );\n\t\tif ( !i && !token.precision ) {\n\t\t\tout = '';\n\t\t} else if ( token.precision ) {\n\t\t\tout = zeroPad( out, token.precision, token.padRight );\n\t\t}\n\t\tif ( token.sign ) {\n\t\t\tout = token.sign + out;\n\t\t}\n\t}\n\tif ( base === 16 ) {\n\t\tif ( token.alternate ) {\n\t\t\tout = '0x' + out;\n\t\t}\n\t\tout = ( token.specifier === uppercase.call( token.specifier ) ) ?\n\t\t\tuppercase.call( out ) :\n\t\t\tlowercase.call( out );\n\t}\n\tif ( base === 8 ) {\n\t\tif ( token.alternate && out.charAt( 0 ) !== '0' ) {\n\t\t\tout = '0' + out;\n\t\t}\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default formatInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isNumber from './is_number.js';\n\n// NOTE: for the following, we explicitly avoid using stdlib packages in this particular package in order to avoid circular dependencies.\nvar abs = Math.abs; // eslint-disable-line stdlib/no-builtin-math\nvar lowercase = String.prototype.toLowerCase;\nvar uppercase = String.prototype.toUpperCase;\nvar replace = String.prototype.replace;\n\n\n// VARIABLES //\n\nvar RE_EXP_POS_DIGITS = /e\\+(\\d)$/;\nvar RE_EXP_NEG_DIGITS = /e-(\\d)$/;\nvar RE_ONLY_DIGITS = /^(\\d+)$/;\nvar RE_DIGITS_BEFORE_EXP = /^(\\d+)e/;\nvar RE_TRAILING_PERIOD_ZERO = /\\.0$/;\nvar RE_PERIOD_ZERO_EXP = /\\.0*e/;\nvar RE_ZERO_BEFORE_EXP = /(\\..*[^0])0*e/;\n\n\n// MAIN //\n\n/**\n* Formats a token object argument as a floating-point number.\n*\n* @private\n* @param {Object} token - token object\n* @throws {Error} must provide a valid floating-point number\n* @returns {string} formatted token argument\n*/\nfunction formatDouble( token ) {\n\tvar digits;\n\tvar out;\n\tvar f = parseFloat( token.arg );\n\tif ( !isFinite( f ) ) { // NOTE: We use the global `isFinite` function here instead of `@stdlib/math/base/assert/is-finite` in order to avoid circular dependencies.\n\t\tif ( !isNumber( token.arg ) ) {\n\t\t\tthrow new Error( 'invalid floating-point number. Value: ' + out );\n\t\t}\n\t\t// Case: NaN, Infinity, or -Infinity\n\t\tf = token.arg;\n\t}\n\tswitch ( token.specifier ) {\n\tcase 'e':\n\tcase 'E':\n\t\tout = f.toExponential( token.precision );\n\t\tbreak;\n\tcase 'f':\n\tcase 'F':\n\t\tout = f.toFixed( token.precision );\n\t\tbreak;\n\tcase 'g':\n\tcase 'G':\n\t\tif ( abs( f ) < 0.0001 ) {\n\t\t\tdigits = token.precision;\n\t\t\tif ( digits > 0 ) {\n\t\t\t\tdigits -= 1;\n\t\t\t}\n\t\t\tout = f.toExponential( digits );\n\t\t} else {\n\t\t\tout = f.toPrecision( token.precision );\n\t\t}\n\t\tif ( !token.alternate ) {\n\t\t\tout = replace.call( out, RE_ZERO_BEFORE_EXP, '$1e' );\n\t\t\tout = replace.call( out, RE_PERIOD_ZERO_EXP, 'e');\n\t\t\tout = replace.call( out, RE_TRAILING_PERIOD_ZERO, '' );\n\t\t}\n\t\tbreak;\n\tdefault:\n\t\tthrow new Error( 'invalid double notation. Value: ' + token.specifier );\n\t}\n\tout = replace.call( out, RE_EXP_POS_DIGITS, 'e+0$1' );\n\tout = replace.call( out, RE_EXP_NEG_DIGITS, 'e-0$1' );\n\tif ( token.alternate ) {\n\t\tout = replace.call( out, RE_ONLY_DIGITS, '$1.' );\n\t\tout = replace.call( out, RE_DIGITS_BEFORE_EXP, '$1.e' );\n\t}\n\tif ( f >= 0 && token.sign ) {\n\t\tout = token.sign + out;\n\t}\n\tout = ( token.specifier === uppercase.call( token.specifier ) ) ?\n\t\tuppercase.call( out ) :\n\t\tlowercase.call( out );\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default formatDouble;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// FUNCTIONS //\n\n/**\n* Returns `n` spaces.\n*\n* @private\n* @param {number} n - number of spaces\n* @returns {string} string of spaces\n*/\nfunction spaces( n ) {\n\tvar out = '';\n\tvar i;\n\tfor ( i = 0; i < n; i++ ) {\n\t\tout += ' ';\n\t}\n\treturn out;\n}\n\n\n// MAIN //\n\n/**\n* Pads a token with spaces to the specified width.\n*\n* @private\n* @param {string} str - token argument\n* @param {number} width - token width\n* @param {boolean} [right=false] - boolean indicating whether to pad to the right\n* @returns {string} padded token argument\n*/\nfunction spacePad( str, width, right ) {\n\tvar pad = width - str.length;\n\tif ( pad < 0 ) {\n\t\treturn str;\n\t}\n\tstr = ( right ) ?\n\t\tstr + spaces( pad ) :\n\t\tspaces( pad ) + str;\n\treturn str;\n}\n\n\n// EXPORTS //\n\nexport default spacePad;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport formatInteger from './format_integer.js';\nimport isString from './is_string.js';\nimport formatDouble from './format_double.js';\nimport spacePad from './space_pad.js';\nimport zeroPad from './zero_pad.js';\n\n\n// VARIABLES //\n\nvar fromCharCode = String.fromCharCode;\nvar isnan = isNaN; // NOTE: We use the global `isNaN` function here instead of `@stdlib/math/base/assert/is-nan` to avoid circular dependencies.\nvar isArray = Array.isArray; // NOTE: We use the global `Array.isArray` function here instead of `@stdlib/assert/is-array` to avoid circular dependencies.\n\n\n// FUNCTIONS //\n\n/**\n* Initializes token object with properties of supplied format identifier object or default values if not present.\n*\n* @private\n* @param {Object} token - format identifier object\n* @returns {Object} token object\n*/\nfunction initialize( token ) {\n\tvar out = {};\n\tout.specifier = token.specifier;\n\tout.precision = ( token.precision === void 0 ) ? 1 : token.precision;\n\tout.width = token.width;\n\tout.flags = token.flags || '';\n\tout.mapping = token.mapping;\n\treturn out;\n}\n\n\n// MAIN //\n\n/**\n* Generates string from a token array by interpolating values.\n*\n* @param {Array} tokens - string parts and format identifier objects\n* @param {Array} ...args - variable values\n* @throws {TypeError} first argument must be an array\n* @throws {Error} invalid flags\n* @returns {string} formatted string\n*\n* @example\n* var tokens = [ 'beep ', { 'specifier': 's' } ];\n* var out = formatInterpolate( tokens, 'boop' );\n* // returns 'beep boop'\n*/\nfunction formatInterpolate( tokens ) {\n\tvar hasPeriod;\n\tvar flags;\n\tvar token;\n\tvar flag;\n\tvar num;\n\tvar out;\n\tvar pos;\n\tvar i;\n\tvar j;\n\n\tif ( !isArray( tokens ) ) {\n\t\tthrow new TypeError( 'invalid argument. First argument must be an array. Value: `' + tokens + '`.' );\n\t}\n\tout = '';\n\tpos = 1;\n\tfor ( i = 0; i < tokens.length; i++ ) {\n\t\ttoken = tokens[ i ];\n\t\tif ( isString( token ) ) {\n\t\t\tout += token;\n\t\t} else {\n\t\t\thasPeriod = token.precision !== void 0;\n\t\t\ttoken = initialize( token );\n\t\t\tif ( !token.specifier ) {\n\t\t\t\tthrow new TypeError( 'invalid argument. Token is missing `specifier` property. Index: `'+ i +'`. Value: `' + token + '`.' );\n\t\t\t}\n\t\t\tif ( token.mapping ) {\n\t\t\t\tpos = token.mapping;\n\t\t\t}\n\t\t\tflags = token.flags;\n\t\t\tfor ( j = 0; j < flags.length; j++ ) {\n\t\t\t\tflag = flags.charAt( j );\n\t\t\t\tswitch ( flag ) {\n\t\t\t\tcase ' ':\n\t\t\t\t\ttoken.sign = ' ';\n\t\t\t\t\tbreak;\n\t\t\t\tcase '+':\n\t\t\t\t\ttoken.sign = '+';\n\t\t\t\t\tbreak;\n\t\t\t\tcase '-':\n\t\t\t\t\ttoken.padRight = true;\n\t\t\t\t\ttoken.padZeros = false;\n\t\t\t\t\tbreak;\n\t\t\t\tcase '0':\n\t\t\t\t\ttoken.padZeros = flags.indexOf( '-' ) < 0; // NOTE: We use built-in `Array.prototype.indexOf` here instead of `@stdlib/assert/contains` in order to avoid circular dependencies.\n\t\t\t\t\tbreak;\n\t\t\t\tcase '#':\n\t\t\t\t\ttoken.alternate = true;\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tthrow new Error( 'invalid flag: ' + flag );\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( token.width === '*' ) {\n\t\t\t\ttoken.width = parseInt( arguments[ pos ], 10 );\n\t\t\t\tpos += 1;\n\t\t\t\tif ( isnan( token.width ) ) {\n\t\t\t\t\tthrow new TypeError( 'the argument for * width at position ' + pos + ' is not a number. Value: `' + token.width + '`.' );\n\t\t\t\t}\n\t\t\t\tif ( token.width < 0 ) {\n\t\t\t\t\ttoken.padRight = true;\n\t\t\t\t\ttoken.width = -token.width;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( hasPeriod ) {\n\t\t\t\tif ( token.precision === '*' ) {\n\t\t\t\t\ttoken.precision = parseInt( arguments[ pos ], 10 );\n\t\t\t\t\tpos += 1;\n\t\t\t\t\tif ( isnan( token.precision ) ) {\n\t\t\t\t\t\tthrow new TypeError( 'the argument for * precision at position ' + pos + ' is not a number. Value: `' + token.precision + '`.' );\n\t\t\t\t\t}\n\t\t\t\t\tif ( token.precision < 0 ) {\n\t\t\t\t\t\ttoken.precision = 1;\n\t\t\t\t\t\thasPeriod = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\ttoken.arg = arguments[ pos ];\n\t\t\tswitch ( token.specifier ) {\n\t\t\tcase 'b':\n\t\t\tcase 'o':\n\t\t\tcase 'x':\n\t\t\tcase 'X':\n\t\t\tcase 'd':\n\t\t\tcase 'i':\n\t\t\tcase 'u':\n\t\t\t\t// Case: %b (binary), %o (octal), %x, %X (hexadecimal), %d, %i (decimal), %u (unsigned decimal)\n\t\t\t\tif ( hasPeriod ) {\n\t\t\t\t\ttoken.padZeros = false;\n\t\t\t\t}\n\t\t\t\ttoken.arg = formatInteger( token );\n\t\t\t\tbreak;\n\t\t\tcase 's':\n\t\t\t\t// Case: %s (string)\n\t\t\t\ttoken.maxWidth = ( hasPeriod ) ? token.precision : -1;\n\t\t\t\tbreak;\n\t\t\tcase 'c':\n\t\t\t\t// Case: %c (character)\n\t\t\t\tif ( !isnan( token.arg ) ) {\n\t\t\t\t\tnum = parseInt( token.arg, 10 );\n\t\t\t\t\tif ( num < 0 || num > 127 ) {\n\t\t\t\t\t\tthrow new Error( 'invalid character code. Value: ' + token.arg );\n\t\t\t\t\t}\n\t\t\t\t\ttoken.arg = ( isnan( num ) ) ?\n\t\t\t\t\t\tString( token.arg ) :\n\t\t\t\t\t\tfromCharCode( num );\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'e':\n\t\t\tcase 'E':\n\t\t\tcase 'f':\n\t\t\tcase 'F':\n\t\t\tcase 'g':\n\t\t\tcase 'G':\n\t\t\t\t// Case: %e, %E (scientific notation), %f, %F (decimal floating point), %g, %G (uses the shorter of %e/E or %f/F)\n\t\t\t\tif ( !hasPeriod ) {\n\t\t\t\t\ttoken.precision = 6;\n\t\t\t\t}\n\t\t\t\ttoken.arg = formatDouble( token );\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tthrow new Error( 'invalid specifier: ' + token.specifier );\n\t\t\t}\n\t\t\t// Fit argument into field width...\n\t\t\tif ( token.maxWidth >= 0 && token.arg.length > token.maxWidth ) {\n\t\t\t\ttoken.arg = token.arg.substring( 0, token.maxWidth );\n\t\t\t}\n\t\t\tif ( token.padZeros ) {\n\t\t\t\ttoken.arg = zeroPad( token.arg, token.width || token.precision, token.padRight ); // eslint-disable-line max-len\n\t\t\t} else if ( token.width ) {\n\t\t\t\ttoken.arg = spacePad( token.arg, token.width, token.padRight );\n\t\t\t}\n\t\t\tout += token.arg || '';\n\t\t\tpos += 1;\n\t\t}\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default formatInterpolate;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Tests if a value is a string primitive.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a string primitive\n*\n* @example\n* var bool = isString( 'beep' );\n* // returns true\n*\n* @example\n* var bool = isString( new String( 'beep' ) );\n* // returns false\n*/\nfunction isString( value ) {\n\treturn ( typeof value === 'string' ); // NOTE: we inline the `isString.isPrimitive` function from `@stdlib/assert/is-string` in order to avoid circular dependencies.\n}\n\n\n// EXPORTS //\n\nexport default isString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// VARIABLES //\n\nvar RE = /%(?:([1-9]\\d*)\\$)?([0 +\\-#]*)(\\*|\\d+)?(?:(\\.)(\\*|\\d+)?)?[hlL]?([%A-Za-z])/g;\n\n\n// FUNCTIONS //\n\n/**\n* Parses a delimiter.\n*\n* @private\n* @param {Array} match - regular expression match\n* @returns {Object} delimiter token object\n*/\nfunction parse( match ) {\n\tvar token = {\n\t\t'mapping': ( match[ 1 ] ) ? parseInt( match[ 1 ], 10 ) : void 0,\n\t\t'flags': match[ 2 ],\n\t\t'width': match[ 3 ],\n\t\t'precision': match[ 5 ],\n\t\t'specifier': match[ 6 ]\n\t};\n\tif ( match[ 4 ] === '.' && match[ 5 ] === void 0 ) {\n\t\ttoken.precision = '1';\n\t}\n\treturn token;\n}\n\n\n// MAIN //\n\n/**\n* Tokenizes a string into an array of string parts and format identifier objects.\n*\n* @param {string} str - input string\n* @returns {Array} tokens\n*\n* @example\n* var tokens = formatTokenize( 'Hello %s!' );\n* // returns [ 'Hello ', {...}, '!' ]\n*/\nfunction formatTokenize( str ) {\n\tvar content;\n\tvar tokens;\n\tvar match;\n\tvar prev;\n\n\ttokens = [];\n\tprev = 0;\n\tmatch = RE.exec( str );\n\twhile ( match ) {\n\t\tcontent = str.slice( prev, RE.lastIndex - match[ 0 ].length );\n\t\tif ( content.length ) {\n\t\t\ttokens.push( content );\n\t\t}\n\t\ttokens.push( parse( match ) );\n\t\tprev = RE.lastIndex;\n\t\tmatch = RE.exec( str );\n\t}\n\tcontent = str.slice( prev );\n\tif ( content.length ) {\n\t\ttokens.push( content );\n\t}\n\treturn tokens;\n}\n\n\n// EXPORTS //\n\nexport default formatTokenize;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport interpolate from '@stdlib/string-base-format-interpolate';\nimport tokenize from '@stdlib/string-base-format-tokenize';\nimport isString from './is_string.js';\n\n\n// MAIN //\n\n/**\n* Inserts supplied variable values into a format string.\n*\n* @param {string} str - input string\n* @param {Array} ...args - variable values\n* @throws {TypeError} first argument must be a string\n* @throws {Error} invalid flags\n* @returns {string} formatted string\n*\n* @example\n* var str = format( 'Hello %s!', 'world' );\n* // returns 'Hello world!'\n*\n* @example\n* var str = format( 'Pi: ~%.2f', 3.141592653589793 );\n* // returns 'Pi: ~3.14'\n*/\nfunction format( str ) {\n\tvar args;\n\tvar i;\n\n\tif ( !isString( str ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a string. Value: `%s`.', str ) );\n\t}\n\targs = [ tokenize( str ) ];\n\tfor ( i = 1; i < arguments.length; i++ ) {\n\t\targs.push( arguments[ i ] );\n\t}\n\treturn interpolate.apply( null, args );\n}\n\n\n// EXPORTS //\n\nexport default format;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Tests if a value is a string primitive.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a string primitive\n*\n* @example\n* var bool = isString( 'beep' );\n* // returns true\n*\n* @example\n* var bool = isString( new String( 'beep' ) );\n* // returns false\n*/\nfunction isString( value ) {\n\treturn ( typeof value === 'string' ); // NOTE: we inline the `isString.isPrimitive` function from `@stdlib/assert/is-string` in order to avoid circular dependencies.\n}\n\n\n// EXPORTS //\n\nexport default isString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable no-underscore-dangle, no-proto */\n\n'use strict';\n\n// MODULES //\n\nimport format from '@stdlib/string-format';\n\n\n// VARIABLES //\n\nvar objectProtoype = Object.prototype;\nvar toStr = objectProtoype.toString;\nvar defineGetter = objectProtoype.__defineGetter__;\nvar defineSetter = objectProtoype.__defineSetter__;\nvar lookupGetter = objectProtoype.__lookupGetter__;\nvar lookupSetter = objectProtoype.__lookupSetter__;\n\n\n// MAIN //\n\n/**\n* Defines (or modifies) an object property.\n*\n* ## Notes\n*\n* - Property descriptors come in two flavors: **data descriptors** and **accessor descriptors**. A data descriptor is a property that has a value, which may or may not be writable. An accessor descriptor is a property described by a getter-setter function pair. A descriptor must be one of these two flavors and cannot be both.\n*\n* @param {Object} obj - object on which to define the property\n* @param {string} prop - property name\n* @param {Object} descriptor - property descriptor\n* @param {boolean} [descriptor.configurable=false] - boolean indicating if property descriptor can be changed and if the property can be deleted from the provided object\n* @param {boolean} [descriptor.enumerable=false] - boolean indicating if the property shows up when enumerating object properties\n* @param {boolean} [descriptor.writable=false] - boolean indicating if the value associated with the property can be changed with an assignment operator\n* @param {*} [descriptor.value] - property value\n* @param {(Function|void)} [descriptor.get=undefined] - function which serves as a getter for the property, or, if no getter, undefined. When the property is accessed, a getter function is called without arguments and with the `this` context set to the object through which the property is accessed (which may not be the object on which the property is defined due to inheritance). The return value will be used as the property value.\n* @param {(Function|void)} [descriptor.set=undefined] - function which serves as a setter for the property, or, if no setter, undefined. When assigning a property value, a setter function is called with one argument (the value being assigned to the property) and with the `this` context set to the object through which the property is assigned.\n* @throws {TypeError} first argument must be an object\n* @throws {TypeError} third argument must be an object\n* @throws {Error} property descriptor cannot have both a value and a setter and/or getter\n* @returns {Object} object with added property\n*\n* @example\n* var obj = {};\n*\n* defineProperty( obj, 'foo', {\n* 'value': 'bar'\n* });\n*\n* var str = obj.foo;\n* // returns 'bar'\n*/\nfunction defineProperty( obj, prop, descriptor ) {\n\tvar prototype;\n\tvar hasValue;\n\tvar hasGet;\n\tvar hasSet;\n\n\tif ( typeof obj !== 'object' || obj === null || toStr.call( obj ) === '[object Array]' ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be an object. Value: `%s`.', obj ) );\n\t}\n\tif ( typeof descriptor !== 'object' || descriptor === null || toStr.call( descriptor ) === '[object Array]' ) {\n\t\tthrow new TypeError( format( 'invalid argument. Property descriptor must be an object. Value: `%s`.', descriptor ) );\n\t}\n\thasValue = ( 'value' in descriptor );\n\tif ( hasValue ) {\n\t\tif (\n\t\t\tlookupGetter.call( obj, prop ) ||\n\t\t\tlookupSetter.call( obj, prop )\n\t\t) {\n\t\t\t// Override `__proto__` to avoid touching inherited accessors:\n\t\t\tprototype = obj.__proto__;\n\t\t\tobj.__proto__ = objectProtoype;\n\n\t\t\t// Delete property as existing getters/setters prevent assigning value to specified property:\n\t\t\tdelete obj[ prop ];\n\t\t\tobj[ prop ] = descriptor.value;\n\n\t\t\t// Restore original prototype:\n\t\t\tobj.__proto__ = prototype;\n\t\t} else {\n\t\t\tobj[ prop ] = descriptor.value;\n\t\t}\n\t}\n\thasGet = ( 'get' in descriptor );\n\thasSet = ( 'set' in descriptor );\n\n\tif ( hasValue && ( hasGet || hasSet ) ) {\n\t\tthrow new Error( 'invalid argument. Cannot specify one or more accessors and a value or writable attribute in the property descriptor.' );\n\t}\n\n\tif ( hasGet && defineGetter ) {\n\t\tdefineGetter.call( obj, prop, descriptor.get );\n\t}\n\tif ( hasSet && defineSetter ) {\n\t\tdefineSetter.call( obj, prop, descriptor.set );\n\t}\n\treturn obj;\n}\n\n\n// EXPORTS //\n\nexport default defineProperty;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Define (or modify) an object property.\n*\n* @module @stdlib/utils-define-property\n*\n* @example\n* import defineProperty from '@stdlib/utils-define-property';\n*\n* var obj = {};\n* defineProperty( obj, 'foo', {\n* 'value': 'bar',\n* 'writable': false,\n* 'configurable': false,\n* 'enumerable': false\n* });\n* obj.foo = 'boop'; // => throws\n*/\n\n// MODULES //\n\nimport hasDefinePropertySupport from './has_define_property_support.js';\nimport builtin from './builtin.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar defineProperty;\nif ( hasDefinePropertySupport() ) {\n\tdefineProperty = builtin;\n} else {\n\tdefineProperty = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default defineProperty;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport defineProperty from './define_property.js';\n\n\n// MAIN //\n\n/**\n* Tests for `Object.defineProperty` support.\n*\n* @private\n* @returns {boolean} boolean indicating if an environment has `Object.defineProperty` support\n*\n* @example\n* var bool = hasDefinePropertySupport();\n* // returns \n*/\nfunction hasDefinePropertySupport() {\n\t// Test basic support...\n\ttry {\n\t\tdefineProperty( {}, 'x', {} );\n\t\treturn true;\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\treturn false;\n\t}\n}\n\n\n// EXPORTS //\n\nexport default hasDefinePropertySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport defineProperty from '@stdlib/utils-define-property';\n\n\n// MAIN //\n\n/**\n* Defines a non-enumerable read-only property.\n*\n* @param {Object} obj - object on which to define the property\n* @param {(string|symbol)} prop - property name\n* @param {*} value - value to set\n*\n* @example\n* var obj = {};\n*\n* setNonEnumerableReadOnly( obj, 'foo', 'bar' );\n*\n* try {\n* obj.foo = 'boop';\n* } catch ( err ) {\n* console.error( err.message );\n* }\n*/\nfunction setNonEnumerableReadOnly( obj, prop, value ) {\n\tdefineProperty( obj, prop, {\n\t\t'configurable': false,\n\t\t'enumerable': false,\n\t\t'writable': false,\n\t\t'value': value\n\t});\n}\n\n\n// EXPORTS //\n\nexport default setNonEnumerableReadOnly;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Tests if a value is a number primitive.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number primitive\n*\n* @example\n* var bool = isNumber( 3.14 );\n* // returns true\n*\n* @example\n* var bool = isNumber( NaN );\n* // returns true\n*\n* @example\n* var bool = isNumber( new Number( 3.14 ) );\n* // returns false\n*/\nfunction isNumber( value ) {\n\treturn ( typeof value === 'number' );\n}\n\n\n// EXPORTS //\n\nexport default isNumber;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport hasSymbols from '@stdlib/assert-has-symbol-support';\n\n\n// VARIABLES //\n\nvar FLG = hasSymbols();\n\n\n// MAIN //\n\n/**\n* Tests for native `toStringTag` support.\n*\n* @returns {boolean} boolean indicating if an environment has `toStringTag` support\n*\n* @example\n* var bool = hasToStringTagSupport();\n* // returns \n*/\nfunction hasToStringTagSupport() {\n\treturn ( FLG && typeof Symbol.toStringTag === 'symbol' );\n}\n\n\n// EXPORTS //\n\nexport default hasToStringTagSupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Tests for native `Symbol` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Symbol` support\n*\n* @example\n* var bool = hasSymbolSupport();\n* // returns \n*/\nfunction hasSymbolSupport() {\n\treturn (\n\t\ttypeof Symbol === 'function' &&\n\t\ttypeof Symbol( 'foo' ) === 'symbol'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default hasSymbolSupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar toStr = Object.prototype.toString;\n\n\n// EXPORTS //\n\nexport default toStr;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// FUNCTIONS //\n\nvar has = Object.prototype.hasOwnProperty;\n\n\n// MAIN //\n\n/**\n* Tests if an object has a specified property.\n*\n* @param {*} value - value to test\n* @param {*} property - property to test\n* @returns {boolean} boolean indicating if an object has a specified property\n*\n* @example\n* var beep = {\n* 'boop': true\n* };\n*\n* var bool = hasOwnProp( beep, 'boop' );\n* // returns true\n*\n* @example\n* var beep = {\n* 'boop': true\n* };\n*\n* var bool = hasOwnProp( beep, 'bap' );\n* // returns false\n*/\nfunction hasOwnProp( value, property ) {\n\tif (\n\t\tvalue === void 0 ||\n\t\tvalue === null\n\t) {\n\t\treturn false;\n\t}\n\treturn has.call( value, property );\n}\n\n\n// EXPORTS //\n\nexport default hasOwnProp;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar Sym = ( typeof Symbol === 'function' ) ? Symbol : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default Sym;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport Symbol from '@stdlib/symbol-ctor';\n\n\n// MAIN //\n\nvar toStrTag = ( typeof Symbol === 'function' ) ? Symbol.toStringTag : '';\n\n\n// EXPORTS //\n\nexport default toStrTag;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Return a string value indicating a specification defined classification of an object.\n*\n* @module @stdlib/utils-native-class\n*\n* @example\n* import nativeClass from '@stdlib/utils-native-class';\n*\n* var str = nativeClass( 'a' );\n* // returns '[object String]'\n*\n* str = nativeClass( 5 );\n* // returns '[object Number]'\n*\n* function Beep() {\n* return this;\n* }\n* str = nativeClass( new Beep() );\n* // returns '[object Object]'\n*/\n\n// MODULES //\n\nimport hasToStringTag from '@stdlib/assert-has-tostringtag-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar main;\nif ( hasToStringTag() ) {\n\tmain = polyfill;\n} else {\n\tmain = builtin;\n}\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport hasOwnProp from '@stdlib/assert-has-own-property';\nimport toStringTag from './tostringtag.js';\nimport toStr from './tostring.js';\n\n\n// MAIN //\n\n/**\n* Returns a string value indicating a specification defined classification of an object in environments supporting `Symbol.toStringTag`.\n*\n* @param {*} v - input value\n* @returns {string} string value indicating a specification defined classification of the input value\n*\n* @example\n* var str = nativeClass( 'a' );\n* // returns '[object String]'\n*\n* @example\n* var str = nativeClass( 5 );\n* // returns '[object Number]'\n*\n* @example\n* function Beep() {\n* return this;\n* }\n* var str = nativeClass( new Beep() );\n* // returns '[object Object]'\n*/\nfunction nativeClass( v ) {\n\tvar isOwn;\n\tvar tag;\n\tvar out;\n\n\tif ( v === null || v === void 0 ) {\n\t\treturn toStr.call( v );\n\t}\n\ttag = v[ toStringTag ];\n\tisOwn = hasOwnProp( v, toStringTag );\n\n\t// Attempt to override the `toStringTag` property. For built-ins having a `Symbol.toStringTag` property (e.g., `JSON`, `Math`, etc), the `Symbol.toStringTag` property is read-only (e.g., , so we need to wrap in a `try/catch`.\n\ttry {\n\t\tv[ toStringTag ] = void 0;\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\treturn toStr.call( v );\n\t}\n\tout = toStr.call( v );\n\n\tif ( isOwn ) {\n\t\tv[ toStringTag ] = tag;\n\t} else {\n\t\tdelete v[ toStringTag ];\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default nativeClass;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport toStr from './tostring.js';\n\n\n// MAIN //\n\n/**\n* Returns a string value indicating a specification defined classification (via the internal property `[[Class]]`) of an object.\n*\n* @param {*} v - input value\n* @returns {string} string value indicating a specification defined classification of the input value\n*\n* @example\n* var str = nativeClass( 'a' );\n* // returns '[object String]'\n*\n* @example\n* var str = nativeClass( 5 );\n* // returns '[object Number]'\n*\n* @example\n* function Beep() {\n* return this;\n* }\n* var str = nativeClass( new Beep() );\n* // returns '[object Object]'\n*/\nfunction nativeClass( v ) {\n\treturn toStr.call( v );\n}\n\n\n// EXPORTS //\n\nexport default nativeClass;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// EXPORTS //\n\nexport default Number; // eslint-disable-line stdlib/require-globals\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport Number from '@stdlib/number-ctor';\n\n\n// MAIN //\n\n// eslint-disable-next-line stdlib/no-redeclare\nvar toString = Number.prototype.toString; // non-generic\n\n\n// EXPORTS //\n\nexport default toString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport hasToStringTag from '@stdlib/assert-has-tostringtag-support';\nimport nativeClass from '@stdlib/utils-native-class';\nimport Number from '@stdlib/number-ctor';\nimport test from './try2serialize.js';\n\n\n// VARIABLES //\n\nvar FLG = hasToStringTag();\n\n\n// MAIN //\n\n/**\n* Tests if a value is a number object.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number object\n*\n* @example\n* var bool = isNumber( 3.14 );\n* // returns false\n*\n* @example\n* var bool = isNumber( new Number( 3.14 ) );\n* // returns true\n*/\nfunction isNumber( value ) {\n\tif ( typeof value === 'object' ) {\n\t\tif ( value instanceof Number ) {\n\t\t\treturn true;\n\t\t}\n\t\tif ( FLG ) {\n\t\t\treturn test( value );\n\t\t}\n\t\treturn ( nativeClass( value ) === '[object Number]' );\n\t}\n\treturn false;\n}\n\n\n// EXPORTS //\n\nexport default isNumber;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport toString from './tostring.js'; // eslint-disable-line stdlib/no-redeclare\n\n\n// MAIN //\n\n/**\n* Attempts to serialize a value to a string.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value can be serialized\n*/\nfunction test( value ) {\n\ttry {\n\t\ttoString.call( value );\n\t\treturn true;\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\treturn false;\n\t}\n}\n\n\n// EXPORTS //\n\nexport default test;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a number.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a number\n*\n* @example\n* var bool = isNumber( 3.14 );\n* // returns true\n*\n* @example\n* var bool = isNumber( new Number( 3.14 ) );\n* // returns true\n*\n* @example\n* var bool = isNumber( NaN );\n* // returns true\n*\n* @example\n* var bool = isNumber( null );\n* // returns false\n*/\nfunction isNumber( value ) {\n\treturn ( isPrimitive( value ) || isObject( value ) );\n}\n\n\n// EXPORTS //\n\nexport default isNumber;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test if a value is a number.\n*\n* @module @stdlib/assert-is-number\n*\n* @example\n* import isNumber from '@stdlib/assert-is-number';\n*\n* var bool = isNumber( 3.14 );\n* // returns true\n*\n* bool = isNumber( new Number( 3.14 ) );\n* // returns true\n*\n* bool = isNumber( NaN );\n* // returns true\n*\n* bool = isNumber( null );\n* // returns false\n*\n* @example\n* import { isPrimitive as isNumber } from '@stdlib/assert-is-number';\n*\n* var bool = isNumber( 3.14 );\n* // returns true\n*\n* bool = isNumber( NaN );\n* // returns true\n*\n* bool = isNumber( new Number( 3.14 ) );\n* // returns false\n*\n* @example\n* import { isObject as isNumber } from '@stdlib/assert-is-number';\n*\n* var bool = isNumber( 3.14 );\n* // returns false\n*\n* bool = isNumber( new Number( 3.14 ) );\n* // returns true\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'isPrimitive', isPrimitive );\nsetReadOnly( main, 'isObject', isObject );\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Double-precision floating-point positive infinity.\n*\n* @module @stdlib/constants-float64-pinf\n* @type {number}\n*\n* @example\n* import FLOAT64_PINF from '@stdlib/constants-float64-pinf';\n* // returns Infinity\n*/\n\n\n// MAIN //\n\n/**\n* Double-precision floating-point positive infinity.\n*\n* ## Notes\n*\n* Double-precision floating-point positive infinity has the bit sequence\n*\n* ```binarystring\n* 0 11111111111 00000000000000000000 00000000000000000000000000000000\n* ```\n*\n* @constant\n* @type {number}\n* @default Number.POSITIVE_INFINITY\n* @see [IEEE 754]{@link https://en.wikipedia.org/wiki/IEEE_754-1985}\n*/\nvar FLOAT64_PINF = Number.POSITIVE_INFINITY; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default FLOAT64_PINF;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Double-precision floating-point negative infinity.\n*\n* @module @stdlib/constants-float64-ninf\n* @type {number}\n*\n* @example\n* import FLOAT64_NINF from '@stdlib/constants-float64-ninf';\n* // returns -Infinity\n*/\n\n// MODULES //\n\nimport Number from '@stdlib/number-ctor';\n\n\n// MAIN //\n\n/**\n* Double-precision floating-point negative infinity.\n*\n* ## Notes\n*\n* Double-precision floating-point negative infinity has the bit sequence\n*\n* ```binarystring\n* 1 11111111111 00000000000000000000 00000000000000000000000000000000\n* ```\n*\n* @constant\n* @type {number}\n* @default Number.NEGATIVE_INFINITY\n* @see [IEEE 754]{@link https://en.wikipedia.org/wiki/IEEE_754-1985}\n*/\nvar FLOAT64_NINF = Number.NEGATIVE_INFINITY;\n\n\n// EXPORTS //\n\nexport default FLOAT64_NINF;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: implementation (?)\n\n/**\n* Rounds a double-precision floating-point number toward negative infinity.\n*\n* @param {number} x - input value\n* @returns {number} rounded value\n*\n* @example\n* var v = floor( -4.2 );\n* // returns -5.0\n*\n* @example\n* var v = floor( 9.99999 );\n* // returns 9.0\n*\n* @example\n* var v = floor( 0.0 );\n* // returns 0.0\n*\n* @example\n* var v = floor( NaN );\n* // returns NaN\n*/\nvar floor = Math.floor; // eslint-disable-line stdlib/no-builtin-math\n\n\n// EXPORTS //\n\nexport default floor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport floor from '@stdlib/math-base-special-floor';\n\n\n// MAIN //\n\n/**\n* Tests if a finite double-precision floating-point number is an integer.\n*\n* @param {number} x - value to test\n* @returns {boolean} boolean indicating whether the value is an integer\n*\n* @example\n* var bool = isInteger( 1.0 );\n* // returns true\n*\n* @example\n* var bool = isInteger( 3.14 );\n* // returns false\n*/\nfunction isInteger( x ) {\n\treturn (floor(x) === x);\n}\n\n\n// EXPORTS //\n\nexport default isInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport PINF from '@stdlib/constants-float64-pinf';\nimport NINF from '@stdlib/constants-float64-ninf';\nimport isInt from '@stdlib/math-base-assert-is-integer';\n\n\n// MAIN //\n\n/**\n* Tests if a number primitive is an integer value.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a number primitive is an integer value\n*/\nfunction isInteger( value ) {\n\treturn (\n\t\tvalue < PINF &&\n\t\tvalue > NINF &&\n\t\tisInt( value )\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isNumber } from '@stdlib/assert-is-number';\nimport isInt from './integer.js';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a number primitive having an integer value.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number primitive having an integer value\n*\n* @example\n* var bool = isInteger( -3.0 );\n* // returns true\n*\n* @example\n* var bool = isInteger( new Number( -3.0 ) );\n* // returns false\n*/\nfunction isInteger( value ) {\n\treturn (\n\t\tisNumber( value ) &&\n\t\tisInt( value )\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isObject as isNumber } from '@stdlib/assert-is-number';\nimport isInt from './integer.js';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a number object having an integer value.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number object having an integer value\n*\n* @example\n* var bool = isInteger( 3.0 );\n* // returns false\n*\n* @example\n* var bool = isInteger( new Number( 3.0 ) );\n* // returns true\n*/\nfunction isInteger( value ) {\n\treturn (\n\t\tisNumber( value ) &&\n\t\tisInt( value.valueOf() )\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\n/**\n* Tests if a value is an integer.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an integer\n*\n* @example\n* var bool = isInteger( 5.0 );\n* // returns true\n*\n* @example\n* var bool = isInteger( new Number( 5.0 ) );\n* // returns true\n*\n* @example\n* var bool = isInteger( -3.14 );\n* // returns false\n*\n* @example\n* var bool = isInteger( null );\n* // returns false\n*/\nfunction isInteger( value ) {\n\treturn ( isPrimitive( value ) || isObject( value ) );\n}\n\n\n// EXPORTS //\n\nexport default isInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isInteger } from '@stdlib/assert-is-integer';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a number primitive having a nonnegative integer value.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number primitive having a nonnegative integer value\n*\n* @example\n* var bool = isNonNegativeInteger( 3.0 );\n* // returns true\n*\n* @example\n* var bool = isNonNegativeInteger( new Number( 3.0 ) );\n* // returns false\n*/\nfunction isNonNegativeInteger( value ) {\n\treturn (\n\t\tisInteger( value ) &&\n\t\tvalue >= 0\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isNonNegativeInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isObject as isInteger } from '@stdlib/assert-is-integer';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a number object having a nonnegative integer value.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number object having a nonnegative integer value\n*\n* @example\n* var bool = isNonNegativeInteger( 3.0 );\n* // returns false\n*\n* @example\n* var bool = isNonNegativeInteger( new Number( 3.0 ) );\n* // returns true\n*/\nfunction isNonNegativeInteger( value ) {\n\treturn (\n\t\tisInteger( value ) &&\n\t\tvalue.valueOf() >= 0\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isNonNegativeInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a nonnegative integer.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a nonnegative integer\n*\n* @example\n* var bool = isNonNegativeInteger( 5.0 );\n* // returns true\n*\n* @example\n* var bool = isNonNegativeInteger( new Number( 5.0 ) );\n* // returns true\n*\n* @example\n* var bool = isNonNegativeInteger( -5.0 );\n* // returns false\n*\n* @example\n* var bool = isNonNegativeInteger( 3.14 );\n* // returns false\n*\n* @example\n* var bool = isNonNegativeInteger( null );\n* // returns false\n*/\nfunction isNonNegativeInteger( value ) {\n\treturn ( isPrimitive( value ) || isObject( value ) );\n}\n\n\n// EXPORTS //\n\nexport default isNonNegativeInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test if a value is an integer.\n*\n* @module @stdlib/assert-is-integer\n*\n* @example\n* import isInteger from '@stdlib/assert-is-integer';\n*\n* var bool = isInteger( 5.0 );\n* // returns true\n*\n* bool = isInteger( new Number( 5.0 ) );\n* // returns true\n*\n* bool = isInteger( -3.14 );\n* // returns false\n*\n* bool = isInteger( null );\n* // returns false\n*\n* @example\n* // Use interface to check for integer primitives...\n* import { isPrimitive as isInteger } from '@stdlib/assert-is-integer';\n*\n* var bool = isInteger( -3.0 );\n* // returns true\n*\n* bool = isInteger( new Number( -3.0 ) );\n* // returns false\n*\n* @example\n* // Use interface to check for integer objects...\n* import { isObject as isInteger } from '@stdlib/assert-is-integer';\n*\n* var bool = isInteger( 3.0 );\n* // returns false\n*\n* bool = isInteger( new Number( 3.0 ) );\n* // returns true\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'isPrimitive', isPrimitive );\nsetReadOnly( main, 'isObject', isObject );\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test if a value is a nonnegative integer.\n*\n* @module @stdlib/assert-is-nonnegative-integer\n*\n* @example\n* import isNonNegativeInteger from '@stdlib/assert-is-nonnegative-integer';\n*\n* var bool = isNonNegativeInteger( 5.0 );\n* // returns true\n*\n* bool = isNonNegativeInteger( new Number( 5.0 ) );\n* // returns true\n*\n* bool = isNonNegativeInteger( -5.0 );\n* // returns false\n*\n* bool = isNonNegativeInteger( 3.14 );\n* // returns false\n*\n* bool = isNonNegativeInteger( null );\n* // returns false\n*\n* @example\n* import { isPrimitive as isNonNegativeInteger } from '@stdlib/assert-is-nonnegative-integer';\n*\n* var bool = isNonNegativeInteger( 3.0 );\n* // returns true\n*\n* bool = isNonNegativeInteger( new Number( 3.0 ) );\n* // returns false\n*\n* @example\n* import { isObject as isNonNegativeInteger } from '@stdlib/assert-is-nonnegative-integer';\n*\n* var bool = isNonNegativeInteger( 3.0 );\n* // returns false\n*\n* bool = isNonNegativeInteger( new Number( 3.0 ) );\n* // returns true\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'isPrimitive', isPrimitive );\nsetReadOnly( main, 'isObject', isObject );\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasFloat64Array = ( typeof Float64Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Float64Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a Float64Array\n*\n* @example\n* var bool = isFloat64Array( new Float64Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isFloat64Array( [] );\n* // returns false\n*/\nfunction isFloat64Array( value ) {\n\treturn (\n\t\t( hasFloat64Array && value instanceof Float64Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Float64Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isFloat64Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Float64Array === 'function' ) ? Float64Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Float64Array === 'function' ) ? Float64Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of double-precision floating-point numbers in the platform byte order.\n*\n* @module @stdlib/array-float64\n*\n* @example\n* import ctor from '@stdlib/array-float64';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasFloat64ArraySupport from '@stdlib/assert-has-float64array-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasFloat64ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isFloat64Array from '@stdlib/assert-is-float64array';\nimport GlobalFloat64Array from './float64array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Float64Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Float64Array` support\n*\n* @example\n* var bool = hasFloat64ArraySupport();\n* // returns \n*/\nfunction hasFloat64ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalFloat64Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = new GlobalFloat64Array( [ 1.0, 3.14, -3.14, NaN ] );\n\t\tbool = (\n\t\t\tisFloat64Array( arr ) &&\n\t\t\tarr[ 0 ] === 1.0 &&\n\t\t\tarr[ 1 ] === 3.14 &&\n\t\t\tarr[ 2 ] === -3.14 &&\n\t\t\tarr[ 3 ] !== arr[ 3 ]\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasFloat64ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of double-precision floating-point numbers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasFloat32Array = ( typeof Float32Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Float32Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a Float32Array\n*\n* @example\n* var bool = isFloat32Array( new Float32Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isFloat32Array( [] );\n* // returns false\n*/\nfunction isFloat32Array( value ) {\n\treturn (\n\t\t( hasFloat32Array && value instanceof Float32Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Float32Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isFloat32Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Float32Array === 'function' ) ? Float32Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Float32Array === 'function' ) ? Float32Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of single-precision floating-point numbers in the platform byte order.\n*\n* @module @stdlib/array-float32\n*\n* @example\n* import ctor from '@stdlib/array-float32';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasFloat32ArraySupport from '@stdlib/assert-has-float32array-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasFloat32ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isFloat32Array from '@stdlib/assert-is-float32array';\nimport PINF from '@stdlib/constants-float64-pinf';\nimport GlobalFloat32Array from './float32array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Float32Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Float32Array` support\n*\n* @example\n* var bool = hasFloat32ArraySupport();\n* // returns \n*/\nfunction hasFloat32ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalFloat32Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = new GlobalFloat32Array( [ 1.0, 3.14, -3.14, 5.0e40 ] );\n\t\tbool = (\n\t\t\tisFloat32Array( arr ) &&\n\t\t\tarr[ 0 ] === 1.0 &&\n\t\t\tarr[ 1 ] === 3.140000104904175 &&\n\t\t\tarr[ 2 ] === -3.140000104904175 &&\n\t\t\tarr[ 3 ] === PINF\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasFloat32ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of single-precision floating-point numbers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasInt16Array = ( typeof Int16Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is an Int16Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an Int16Array\n*\n* @example\n* var bool = isInt16Array( new Int16Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isInt16Array( [] );\n* // returns false\n*/\nfunction isInt16Array( value ) {\n\treturn (\n\t\t( hasInt16Array && value instanceof Int16Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Int16Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isInt16Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum signed 16-bit integer.\n*\n* @module @stdlib/constants-int16-max\n* @type {integer32}\n*\n* @example\n* import INT16_MAX from '@stdlib/constants-int16-max';\n* // returns 32767\n*/\n\n\n// MAIN //\n\n/**\n* Maximum signed 16-bit integer.\n*\n* ## Notes\n*\n* The number has the value\n*\n* ```tex\n* 2^{15} - 1\n* ```\n*\n* which corresponds to the bit sequence\n*\n* ```binarystring\n* 0111111111111111\n* ```\n*\n* @constant\n* @type {integer32}\n* @default 32767\n*/\nvar INT16_MAX = 32767|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default INT16_MAX;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Int16Array === 'function' ) ? Int16Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Int16Array === 'function' ) ? Int16Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of twos-complement 16-bit signed integers in the platform byte order.\n*\n* @module @stdlib/array-int16\n*\n* @example\n* import ctor from '@stdlib/array-int16';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasInt16ArraySupport from '@stdlib/assert-has-int16array-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasInt16ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isInt16Array from '@stdlib/assert-is-int16array';\nimport INT16_MAX from '@stdlib/constants-int16-max';\nimport INT16_MIN from '@stdlib/constants-int16-min';\nimport GlobalInt16Array from './int16array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Int16Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Int16Array` support\n*\n* @example\n* var bool = hasInt16ArraySupport();\n* // returns \n*/\nfunction hasInt16ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalInt16Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = new GlobalInt16Array( [ 1, 3.14, -3.14, INT16_MAX+1 ] );\n\t\tbool = (\n\t\t\tisInt16Array( arr ) &&\n\t\t\tarr[ 0 ] === 1 &&\n\t\t\tarr[ 1 ] === 3 && // truncation\n\t\t\tarr[ 2 ] === -3 && // truncation\n\t\t\tarr[ 3 ] === INT16_MIN // wrap around\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasInt16ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Minimum signed 16-bit integer.\n*\n* @module @stdlib/constants-int16-min\n* @type {integer32}\n*\n* @example\n* import INT16_MIN from '@stdlib/constants-int16-min';\n* // returns -32768\n*/\n\n\n// MAIN //\n\n/**\n* Minimum signed 16-bit integer.\n*\n* ## Notes\n*\n* The number has the value\n*\n* ```tex\n* -(2^{15})\n* ```\n*\n* which corresponds to the two's complement bit sequence\n*\n* ```binarystring\n* 1000000000000000\n* ```\n*\n* @constant\n* @type {integer32}\n* @default -32768\n*/\nvar INT16_MIN = -32768|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default INT16_MIN;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of twos-complement 16-bit signed integers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasInt32Array = ( typeof Int32Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is an Int32Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an Int32Array\n*\n* @example\n* var bool = isInt32Array( new Int32Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isInt32Array( [] );\n* // returns false\n*/\nfunction isInt32Array( value ) {\n\treturn (\n\t\t( hasInt32Array && value instanceof Int32Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Int32Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isInt32Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum signed 32-bit integer.\n*\n* @module @stdlib/constants-int32-max\n* @type {integer32}\n*\n* @example\n* import INT32_MAX from '@stdlib/constants-int32-max';\n* // returns 2147483647\n*/\n\n\n// MAIN //\n\n/**\n* Maximum signed 32-bit integer.\n*\n* ## Notes\n*\n* The number has the value\n*\n* ```tex\n* 2^{31} - 1\n* ```\n*\n* which corresponds to the bit sequence\n*\n* ```binarystring\n* 01111111111111111111111111111111\n* ```\n*\n* @constant\n* @type {integer32}\n* @default 2147483647\n*/\nvar INT32_MAX = 2147483647|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default INT32_MAX;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Int32Array === 'function' ) ? Int32Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Int32Array === 'function' ) ? Int32Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of twos-complement 32-bit signed integers in the platform byte order.\n*\n* @module @stdlib/array-int32\n*\n* @example\n* import ctor from '@stdlib/array-int32';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasInt32ArraySupport from '@stdlib/assert-has-int32array-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasInt32ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isInt32Array from '@stdlib/assert-is-int32array';\nimport INT32_MAX from '@stdlib/constants-int32-max';\nimport INT32_MIN from '@stdlib/constants-int32-min';\nimport GlobalInt32Array from './int32array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Int32Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Int32Array` support\n*\n* @example\n* var bool = hasInt32ArraySupport();\n* // returns \n*/\nfunction hasInt32ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalInt32Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = new GlobalInt32Array( [ 1, 3.14, -3.14, INT32_MAX+1 ] );\n\t\tbool = (\n\t\t\tisInt32Array( arr ) &&\n\t\t\tarr[ 0 ] === 1 &&\n\t\t\tarr[ 1 ] === 3 && // truncation\n\t\t\tarr[ 2 ] === -3 && // truncation\n\t\t\tarr[ 3 ] === INT32_MIN // wrap around\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasInt32ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Minimum signed 32-bit integer.\n*\n* @module @stdlib/constants-int32-min\n* @type {integer32}\n*\n* @example\n* import INT32_MIN from '@stdlib/constants-int32-min';\n* // returns -2147483648\n*/\n\n\n// MAIN //\n\n/**\n* Minimum signed 32-bit integer.\n*\n* ## Notes\n*\n* The number has the value\n*\n* ```tex\n* -(2^{31})\n* ```\n*\n* which corresponds to the two's complement bit sequence\n*\n* ```binarystring\n* 10000000000000000000000000000000\n* ```\n*\n* @constant\n* @type {integer32}\n* @default -2147483648\n*/\nvar INT32_MIN = -2147483648|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default INT32_MIN;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of twos-complement 32-bit signed integers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasInt8Array = ( typeof Int8Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is an Int8Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an Int8Array\n*\n* @example\n* var bool = isInt8Array( new Int8Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isInt8Array( [] );\n* // returns false\n*/\nfunction isInt8Array( value ) {\n\treturn (\n\t\t( hasInt8Array && value instanceof Int8Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Int8Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isInt8Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum signed 8-bit integer.\n*\n* @module @stdlib/constants-int8-max\n* @type {integer32}\n*\n* @example\n* import INT8_MAX from '@stdlib/constants-int8-max';\n* // returns 127\n*/\n\n\n// MAIN //\n\n/**\n* Maximum signed 8-bit integer.\n*\n* ## Notes\n*\n* The number is given by\n*\n* ```tex\n* 2^{7} - 1\n* ```\n*\n* which corresponds to the bit sequence\n*\n* ```binarystring\n* 01111111\n* ```\n*\n* @constant\n* @type {integer32}\n* @default 127\n*/\nvar INT8_MAX = 127|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default INT8_MAX;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Int8Array === 'function' ) ? Int8Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Int8Array === 'function' ) ? Int8Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of twos-complement 8-bit signed integers in the platform byte order.\n*\n* @module @stdlib/array-int8\n*\n* @example\n* import ctor from '@stdlib/array-int8';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasInt8ArraySupport from '@stdlib/assert-has-int8array-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasInt8ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isInt8Array from '@stdlib/assert-is-int8array';\nimport INT8_MAX from '@stdlib/constants-int8-max';\nimport INT8_MIN from '@stdlib/constants-int8-min';\nimport GlobalInt8Array from './int8array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Int8Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Int8Array` support\n*\n* @example\n* var bool = hasInt8ArraySupport();\n* // returns \n*/\nfunction hasInt8ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalInt8Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = new GlobalInt8Array( [ 1, 3.14, -3.14, INT8_MAX+1 ] );\n\t\tbool = (\n\t\t\tisInt8Array( arr ) &&\n\t\t\tarr[ 0 ] === 1 &&\n\t\t\tarr[ 1 ] === 3 && // truncation\n\t\t\tarr[ 2 ] === -3 && // truncation\n\t\t\tarr[ 3 ] === INT8_MIN // wrap around\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasInt8ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Minimum signed 8-bit integer.\n*\n* @module @stdlib/constants-int8-min\n* @type {integer32}\n*\n* @example\n* import INT8_MIN from '@stdlib/constants-int8-min';\n* // returns -128\n*/\n\n\n// MAIN //\n\n/**\n* Minimum signed 8-bit integer.\n*\n* ## Notes\n*\n* The number is given by\n*\n* ```tex\n* -(2^{7})\n* ```\n*\n* which corresponds to the two's complement bit sequence\n*\n* ```binarystring\n* 10000000\n* ```\n*\n* @constant\n* @type {integer32}\n* @default -128\n*/\nvar INT8_MIN = -128|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default INT8_MIN;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of twos-complement 8-bit signed integers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasUint16Array = ( typeof Uint16Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Uint16Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a Uint16Array\n*\n* @example\n* var bool = isUint16Array( new Uint16Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isUint16Array( [] );\n* // returns false\n*/\nfunction isUint16Array( value ) {\n\treturn (\n\t\t( hasUint16Array && value instanceof Uint16Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Uint16Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isUint16Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum unsigned 16-bit integer.\n*\n* @module @stdlib/constants-uint16-max\n* @type {integer32}\n*\n* @example\n* import UINT16_MAX from '@stdlib/constants-uint16-max';\n* // returns 65535\n*/\n\n\n// MAIN //\n\n/**\n* Maximum unsigned 16-bit integer.\n*\n* ## Notes\n*\n* The number has the value\n*\n* ```tex\n* 2^{16} - 1\n* ```\n*\n* which corresponds to the bit sequence\n*\n* ```binarystring\n* 1111111111111111\n* ```\n*\n* @constant\n* @type {integer32}\n* @default 65535\n*/\nvar UINT16_MAX = 65535|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default UINT16_MAX;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Uint16Array === 'function' ) ? Uint16Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Uint16Array === 'function' ) ? Uint16Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of 16-bit unsigned integers in the platform byte order.\n*\n* @module @stdlib/array-uint16\n*\n* @example\n* import ctor from '@stdlib/array-uint16';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasUint16ArraySupport from '@stdlib/assert-has-uint16array-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasUint16ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isUint16Array from '@stdlib/assert-is-uint16array';\nimport UINT16_MAX from '@stdlib/constants-uint16-max';\nimport GlobalUint16Array from './uint16array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Uint16Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Uint16Array` support\n*\n* @example\n* var bool = hasUint16ArraySupport();\n* // returns \n*/\nfunction hasUint16ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalUint16Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = [ 1, 3.14, -3.14, UINT16_MAX+1, UINT16_MAX+2 ];\n\t\tarr = new GlobalUint16Array( arr );\n\t\tbool = (\n\t\t\tisUint16Array( arr ) &&\n\t\t\tarr[ 0 ] === 1 &&\n\t\t\tarr[ 1 ] === 3 && // truncation\n\t\t\tarr[ 2 ] === UINT16_MAX-2 && // truncation and wrap around\n\t\t\tarr[ 3 ] === 0 && // wrap around\n\t\t\tarr[ 4 ] === 1 // wrap around\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasUint16ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of 16-bit unsigned integers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasUint32Array = ( typeof Uint32Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Uint32Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a Uint32Array\n*\n* @example\n* var bool = isUint32Array( new Uint32Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isUint32Array( [] );\n* // returns false\n*/\nfunction isUint32Array( value ) {\n\treturn (\n\t\t( hasUint32Array && value instanceof Uint32Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Uint32Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isUint32Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum unsigned 32-bit integer.\n*\n* @module @stdlib/constants-uint32-max\n* @type {uinteger32}\n*\n* @example\n* import UINT32_MAX from '@stdlib/constants-uint32-max';\n* // returns 4294967295\n*/\n\n\n// MAIN //\n\n/**\n* Maximum unsigned 32-bit integer.\n*\n* ## Notes\n*\n* The number has the value\n*\n* ```tex\n* 2^{32} - 1\n* ```\n*\n* which corresponds to the bit sequence\n*\n* ```binarystring\n* 11111111111111111111111111111111\n* ```\n*\n* @constant\n* @type {uinteger32}\n* @default 4294967295\n*/\nvar UINT32_MAX = 4294967295;\n\n\n// EXPORTS //\n\nexport default UINT32_MAX;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Uint32Array === 'function' ) ? Uint32Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Uint32Array === 'function' ) ? Uint32Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of 32-bit unsigned integers in the platform byte order.\n*\n* @module @stdlib/array-uint32\n*\n* @example\n* import ctor from '@stdlib/array-uint32';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasUint32ArraySupport from '@stdlib/assert-has-uint32array-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasUint32ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isUint32Array from '@stdlib/assert-is-uint32array';\nimport UINT32_MAX from '@stdlib/constants-uint32-max';\nimport GlobalUint32Array from './uint32array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Uint32Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Uint32Array` support\n*\n* @example\n* var bool = hasUint32ArraySupport();\n* // returns \n*/\nfunction hasUint32ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalUint32Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = [ 1, 3.14, -3.14, UINT32_MAX+1, UINT32_MAX+2 ];\n\t\tarr = new GlobalUint32Array( arr );\n\t\tbool = (\n\t\t\tisUint32Array( arr ) &&\n\t\t\tarr[ 0 ] === 1 &&\n\t\t\tarr[ 1 ] === 3 && // truncation\n\t\t\tarr[ 2 ] === UINT32_MAX-2 && // truncation and wrap around\n\t\t\tarr[ 3 ] === 0 && // wrap around\n\t\t\tarr[ 4 ] === 1 // wrap around\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasUint32ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of 32-bit unsigned integers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasUint8Array = ( typeof Uint8Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Uint8Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a Uint8Array\n*\n* @example\n* var bool = isUint8Array( new Uint8Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isUint8Array( [] );\n* // returns false\n*/\nfunction isUint8Array( value ) {\n\treturn (\n\t\t( hasUint8Array && value instanceof Uint8Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Uint8Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isUint8Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum unsigned 8-bit integer.\n*\n* @module @stdlib/constants-uint8-max\n* @type {integer32}\n*\n* @example\n* import UINT8_MAX from '@stdlib/constants-uint8-max';\n* // returns 255\n*/\n\n\n// MAIN //\n\n/**\n* Maximum unsigned 8-bit integer.\n*\n* ## Notes\n*\n* The number has the value\n*\n* ```tex\n* 2^{8} - 1\n* ```\n*\n* which corresponds to the bit sequence\n*\n* ```binarystring\n* 11111111\n* ```\n*\n* @constant\n* @type {integer32}\n* @default 255\n*/\nvar UINT8_MAX = 255|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default UINT8_MAX;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Uint8Array === 'function' ) ? Uint8Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Uint8Array === 'function' ) ? Uint8Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of 8-bit unsigned integers in the platform byte order.\n*\n* @module @stdlib/array-uint8\n*\n* @example\n* import ctor from '@stdlib/array-uint8';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasUint8ArraySupport from '@stdlib/assert-has-uint8array-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasUint8ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isUint8Array from '@stdlib/assert-is-uint8array';\nimport UINT8_MAX from '@stdlib/constants-uint8-max';\nimport GlobalUint8Array from './uint8array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Uint8Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Uint8Array` support\n*\n* @example\n* var bool = hasUint8ArraySupport();\n* // returns \n*/\nfunction hasUint8ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalUint8Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = [ 1, 3.14, -3.14, UINT8_MAX+1, UINT8_MAX+2 ];\n\t\tarr = new GlobalUint8Array( arr );\n\t\tbool = (\n\t\t\tisUint8Array( arr ) &&\n\t\t\tarr[ 0 ] === 1 &&\n\t\t\tarr[ 1 ] === 3 && // truncation\n\t\t\tarr[ 2 ] === UINT8_MAX-2 && // truncation and wrap around\n\t\t\tarr[ 3 ] === 0 && // wrap around\n\t\t\tarr[ 4 ] === 1 // wrap around\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasUint8ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of 8-bit unsigned integers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasUint8ClampedArray = ( typeof Uint8ClampedArray === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Uint8ClampedArray.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a Uint8ClampedArray\n*\n* @example\n* var bool = isUint8ClampedArray( new Uint8ClampedArray( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isUint8ClampedArray( [] );\n* // returns false\n*/\nfunction isUint8ClampedArray( value ) {\n\treturn (\n\t\t( hasUint8ClampedArray && value instanceof Uint8ClampedArray ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Uint8ClampedArray]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isUint8ClampedArray;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Uint8ClampedArray === 'function' ) ? Uint8ClampedArray : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Uint8ClampedArray === 'function' ) ? Uint8ClampedArray : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of 8-bit unsigned integers in the platform byte order clamped to 0-255.\n*\n* @module @stdlib/array-uint8c\n*\n* @example\n* import ctor from '@stdlib/array-uint8c';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasUint8ClampedArraySupport from '@stdlib/assert-has-uint8clampedarray-support'; // eslint-disable-line id-length\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasUint8ClampedArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isUint8ClampedArray from '@stdlib/assert-is-uint8clampedarray';\nimport GlobalUint8ClampedArray from './uint8clampedarray.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Uint8ClampedArray` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Uint8ClampedArray` support\n*\n* @example\n* var bool = hasUint8ClampedArraySupport();\n* // returns \n*/\nfunction hasUint8ClampedArraySupport() { // eslint-disable-line id-length\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalUint8ClampedArray !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = new GlobalUint8ClampedArray( [ -1, 0, 1, 3.14, 4.99, 255, 256 ] );\n\t\tbool = (\n\t\t\tisUint8ClampedArray( arr ) &&\n\t\t\tarr[ 0 ] === 0 && // clamped\n\t\t\tarr[ 1 ] === 0 &&\n\t\t\tarr[ 2 ] === 1 &&\n\t\t\tarr[ 3 ] === 3 && // round to nearest\n\t\t\tarr[ 4 ] === 5 && // round to nearest\n\t\t\tarr[ 5 ] === 255 &&\n\t\t\tarr[ 6 ] === 255 // clamped\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasUint8ClampedArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of 8-bit unsigned integers in the platform byte order clamped to 0-255.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum length of a generic array.\n*\n* @module @stdlib/constants-array-max-array-length\n*\n* @example\n* import MAX_ARRAY_LENGTH from '@stdlib/constants-array-max-array-length';\n* // returns 4294967295\n*/\n\n// MAIN //\n\n/**\n* Maximum length of a generic array.\n*\n* ```tex\n* 2^{32} - 1\n* ```\n*\n* @constant\n* @type {uinteger32}\n* @default 4294967295\n*/\nvar MAX_ARRAY_LENGTH = 4294967295>>>0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default MAX_ARRAY_LENGTH;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isInteger from '@stdlib/math-base-assert-is-integer';\nimport MAX_LENGTH from '@stdlib/constants-array-max-array-length';\n\n\n// MAIN //\n\n/**\n* Tests if a value is an array-like object.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is an array-like object\n*\n* @example\n* var bool = isArrayLikeObject( [] );\n* // returns true\n*\n* @example\n* var bool = isArrayLikeObject( { 'length':10 } );\n* // returns true\n*\n* @example\n* var bool = isArrayLikeObject( 'beep' );\n* // returns false\n*/\nfunction isArrayLikeObject( value ) {\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\ttypeof value.length === 'number' &&\n\t\tisInteger( value.length ) &&\n\t\tvalue.length >= 0 &&\n\t\tvalue.length <= MAX_LENGTH\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isArrayLikeObject;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum length of a typed array.\n*\n* @module @stdlib/constants-array-max-typed-array-length\n*\n* @example\n* import MAX_TYPED_ARRAY_LENGTH from '@stdlib/constants-array-max-typed-array-length';\n* // returns 9007199254740991\n*/\n\n// MAIN //\n\n/**\n* Maximum length of a typed array.\n*\n* ```tex\n* 2^{53} - 1\n* ```\n*\n* @constant\n* @type {number}\n* @default 9007199254740991\n*/\nvar MAX_TYPED_ARRAY_LENGTH = 9007199254740991;\n\n\n// EXPORTS //\n\nexport default MAX_TYPED_ARRAY_LENGTH;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isInteger from '@stdlib/math-base-assert-is-integer';\nimport MAX_LENGTH from '@stdlib/constants-array-max-typed-array-length';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a collection.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether a value is a collection\n*\n* @example\n* var bool = isCollection( [] );\n* // returns true\n*\n* @example\n* var bool = isCollection( {} );\n* // returns false\n*/\nfunction isCollection( value ) {\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\ttypeof value.length === 'number' &&\n\t\tisInteger( value.length ) &&\n\t\tvalue.length >= 0 &&\n\t\tvalue.length <= MAX_LENGTH\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isCollection;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasArrayBuffer = ( typeof ArrayBuffer === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is an ArrayBuffer.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an ArrayBuffer\n*\n* @example\n* import ArrayBuffer from '@stdlib/array-buffer';\n*\n* var bool = isArrayBuffer( new ArrayBuffer( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isArrayBuffer( [] );\n* // returns false\n*/\nfunction isArrayBuffer( value ) {\n\treturn (\n\t\t( hasArrayBuffer && value instanceof ArrayBuffer ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object ArrayBuffer]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isArrayBuffer;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar f;\n\n\n// FUNCTIONS //\n\n/**\n* Tests if a value is an array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an array\n*\n* @example\n* var bool = isArray( [] );\n* // returns true\n*\n* @example\n* var bool = isArray( {} );\n* // returns false\n*/\nfunction isArray( value ) {\n\treturn ( nativeClass( value ) === '[object Array]' );\n}\n\n\n// MAIN //\n\nif ( Array.isArray ) {\n\tf = Array.isArray;\n} else {\n\tf = isArray;\n}\n\n\n// EXPORTS //\n\nexport default f;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isArray from '@stdlib/assert-is-array';\n\n\n// MAIN //\n\n/**\n* Tests if a value is an object; e.g., `{}`.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an object\n*\n* @example\n* var bool = isObject( {} );\n* // returns true\n*\n* @example\n* var bool = isObject( null );\n* // returns false\n*/\nfunction isObject( value ) {\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\t!isArray( value )\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isObject;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Tests if a value is a string primitive.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a string primitive\n*\n* @example\n* var bool = isString( 'beep' );\n* // returns true\n*\n* @example\n* var bool = isString( new String( 'beep' ) );\n* // returns false\n*/\nfunction isString( value ) {\n\treturn ( typeof value === 'string' );\n}\n\n\n// EXPORTS //\n\nexport default isString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// eslint-disable-next-line stdlib/no-redeclare\nvar valueOf = String.prototype.valueOf; // non-generic\n\n\n// EXPORTS //\n\nexport default valueOf;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport hasToStringTag from '@stdlib/assert-has-tostringtag-support';\nimport nativeClass from '@stdlib/utils-native-class';\nimport test from './try2valueof.js';\n\n\n// VARIABLES //\n\nvar FLG = hasToStringTag();\n\n\n// MAIN //\n\n/**\n* Tests if a value is a string object.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a string object\n*\n* @example\n* var bool = isString( new String( 'beep' ) );\n* // returns true\n*\n* @example\n* var bool = isString( 'beep' );\n* // returns false\n*/\nfunction isString( value ) {\n\tif ( typeof value === 'object' ) {\n\t\tif ( value instanceof String ) {\n\t\t\treturn true;\n\t\t}\n\t\tif ( FLG ) {\n\t\t\treturn test( value );\n\t\t}\n\t\treturn ( nativeClass( value ) === '[object String]' );\n\t}\n\treturn false;\n}\n\n\n// EXPORTS //\n\nexport default isString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport valueOf from './valueof.js'; // eslint-disable-line stdlib/no-redeclare\n\n\n// MAIN //\n\n/**\n* Attempts to extract a string value.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a string can be extracted\n*/\nfunction test( value ) {\n\ttry {\n\t\tvalueOf.call( value );\n\t\treturn true;\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\treturn false;\n\t}\n}\n\n\n// EXPORTS //\n\nexport default test;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a string.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a string\n*\n* @example\n* var bool = isString( new String( 'beep' ) );\n* // returns true\n*\n* @example\n* var bool = isString( 'beep' );\n* // returns true\n*/\nfunction isString( value ) {\n\treturn ( isPrimitive( value ) || isObject( value ) );\n}\n\n\n// EXPORTS //\n\nexport default isString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test if a value is a string.\n*\n* @module @stdlib/assert-is-string\n*\n* @example\n* import isString from '@stdlib/assert-is-string';\n*\n* var bool = isString( 'beep' );\n* // returns true\n*\n* bool = isString( new String( 'beep' ) );\n* // returns true\n*\n* bool = isString( 5 );\n* // returns false\n*\n* @example\n* import { isObject as isString } from '@stdlib/assert-is-string';\n*\n* var bool = isString( new String( 'beep' ) );\n* // returns true\n*\n* bool = isString( 'beep' );\n* // returns false\n*\n* @example\n* import { isPrimitive as isString } from '@stdlib/assert-is-string';\n*\n* var bool = isString( 'beep' );\n* // returns true\n*\n* bool = isString( new String( 'beep' ) );\n* // returns false\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'isPrimitive', isPrimitive );\nsetReadOnly( main, 'isObject', isObject );\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\nvar RE = /./;\n\n\n// EXPORTS //\n\nexport default RE;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Tests if a value is a boolean primitive.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a boolean primitive\n*\n* @example\n* var bool = isBoolean( true );\n* // returns true\n*\n* @example\n* var bool = isBoolean( false );\n* // returns true\n*\n* @example\n* import Boolean from '@stdlib/boolean-ctor';\n*\n* var bool = isBoolean( new Boolean( true ) );\n* // returns false\n*/\nfunction isBoolean( value ) {\n\treturn ( typeof value === 'boolean' );\n}\n\n\n// EXPORTS //\n\nexport default isBoolean;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Returns a boolean.\n*\n* @name Boolean\n* @constructor\n* @type {Function}\n* @param {*} value - input value\n* @returns {(boolean|Boolean)} boolean\n*\n* @example\n* var b = Boolean( null );\n* // returns false\n*\n* b = Boolean( [] );\n* // returns true\n*\n* b = Boolean( {} );\n* // returns true\n*\n* @example\n* var b = new Boolean( false );\n* // returns \n*/\nvar Bool = Boolean; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default Bool;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// eslint-disable-next-line stdlib/no-redeclare\nvar toString = Boolean.prototype.toString; // non-generic\n\n\n// EXPORTS //\n\nexport default toString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport hasToStringTag from '@stdlib/assert-has-tostringtag-support';\nimport nativeClass from '@stdlib/utils-native-class';\nimport Boolean from '@stdlib/boolean-ctor';\nimport test from './try2serialize.js';\n\n\n// VARIABLES //\n\nvar FLG = hasToStringTag();\n\n\n// MAIN //\n\n/**\n* Tests if a value is a boolean object.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a boolean object\n*\n* @example\n* var bool = isBoolean( true );\n* // returns false\n*\n* @example\n* import Boolean from '@stdlib/boolean-ctor';\n*\n* var bool = isBoolean( new Boolean( false ) );\n* // returns true\n*/\nfunction isBoolean( value ) {\n\tif ( typeof value === 'object' ) {\n\t\tif ( value instanceof Boolean ) {\n\t\t\treturn true;\n\t\t}\n\t\tif ( FLG ) {\n\t\t\treturn test( value );\n\t\t}\n\t\treturn ( nativeClass( value ) === '[object Boolean]' );\n\t}\n\treturn false;\n}\n\n\n// EXPORTS //\n\nexport default isBoolean;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport toString from './tostring.js'; // eslint-disable-line stdlib/no-redeclare\n\n\n// MAIN //\n\n/**\n* Attempts to serialize a value to a string.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value can be serialized\n*/\nfunction test( value ) {\n\ttry {\n\t\ttoString.call( value );\n\t\treturn true;\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\treturn false;\n\t}\n}\n\n\n// EXPORTS //\n\nexport default test;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a boolean.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a boolean\n*\n* @example\n* var bool = isBoolean( false );\n* // returns true\n*\n* @example\n* var bool = isBoolean( true );\n* // returns true\n*\n* @example\n* import Boolean from '@stdlib/boolean-ctor';\n*\n* var bool = isBoolean( new Boolean( false ) );\n* // returns true\n*\n* @example\n* import Boolean from '@stdlib/boolean-ctor';\n*\n* var bool = isBoolean( new Boolean( true ) );\n* // returns true\n*/\nfunction isBoolean( value ) {\n\treturn ( isPrimitive( value ) || isObject( value ) );\n}\n\n\n// EXPORTS //\n\nexport default isBoolean;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test if a value is a boolean.\n*\n* @module @stdlib/assert-is-boolean\n*\n* @example\n* import Boolean from '@stdlib/boolean-ctor';\n* import isBoolean from '@stdlib/assert-is-boolean';\n*\n* var bool = isBoolean( false );\n* // returns true\n*\n* bool = isBoolean( new Boolean( false ) );\n* // returns true\n*\n* @example\n* import Boolean from '@stdlib/boolean-ctor';\n* import { isPrimitive as isBoolean } from '@stdlib/assert-is-boolean';\n*\n* var bool = isBoolean( false );\n* // returns true\n*\n* bool = isBoolean( new Boolean( true ) );\n* // returns false\n*\n* @example\n* import Boolean from '@stdlib/boolean-ctor';\n* import { isObject as isBoolean } from '@stdlib/assert-is-boolean';\n*\n* var bool = isBoolean( true );\n* // returns false\n*\n* bool = isBoolean( new Boolean( false ) );\n* // returns true\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'isPrimitive', isPrimitive );\nsetReadOnly( main, 'isObject', isObject );\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar obj = ( typeof self === 'object' ) ? self : null;\n\n\n// EXPORTS //\n\nexport default obj;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar obj = ( typeof window === 'object' ) ? window : null;\n\n\n// EXPORTS //\n\nexport default obj;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar obj = ( typeof global === 'object' ) ? global : null;\n\n\n// EXPORTS //\n\nexport default obj;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar obj = ( typeof globalThis === 'object' ) ? globalThis : null; // eslint-disable-line no-undef\n\n\n// EXPORTS //\n\nexport default obj;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport getGlobal from '@stdlib/utils-global';\n\n\n// MAIN //\n\nvar root = getGlobal();\nvar nodeList = root.document && root.document.childNodes;\n\n\n// EXPORTS //\n\nexport default nodeList;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isBoolean } from '@stdlib/assert-is-boolean';\nimport format from '@stdlib/string-format';\nimport getThis from './codegen.js';\nimport Self from './self.js';\nimport Win from './window.js';\nimport Global from './global.js';\nimport GlobalThis from './global_this.js';\n\n\n// MAIN //\n\n/**\n* Returns the global object.\n*\n* ## Notes\n*\n* - Using code generation is the **most** reliable way to resolve the global object; however, doing so is likely to violate content security policies (CSPs) in, e.g., Chrome Apps and elsewhere.\n*\n* @param {boolean} [codegen=false] - boolean indicating whether to use code generation to resolve the global object\n* @throws {TypeError} must provide a boolean\n* @throws {Error} unable to resolve global object\n* @returns {Object} global object\n*\n* @example\n* var g = getGlobal();\n* // returns {...}\n*/\nfunction getGlobal( codegen ) {\n\tif ( arguments.length ) {\n\t\tif ( !isBoolean( codegen ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Must provide a boolean. Value: `%s`.', codegen ) );\n\t\t}\n\t\tif ( codegen ) {\n\t\t\treturn getThis();\n\t\t}\n\t\t// Fall through...\n\t}\n\t// Case: 2020 revision of ECMAScript standard\n\tif ( GlobalThis ) {\n\t\treturn GlobalThis;\n\t}\n\t// Case: browsers and web workers\n\tif ( Self ) {\n\t\treturn Self;\n\t}\n\t// Case: browsers\n\tif ( Win ) {\n\t\treturn Win;\n\t}\n\t// Case: Node.js\n\tif ( Global ) {\n\t\treturn Global;\n\t}\n\t// Case: unknown\n\tthrow new Error( 'unexpected error. Unable to resolve global object.' );\n}\n\n\n// EXPORTS //\n\nexport default getGlobal;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Returns the global object using code generation.\n*\n* @private\n* @returns {Object} global object\n*/\nfunction getGlobal() {\n\treturn new Function( 'return this;' )(); // eslint-disable-line no-new-func, stdlib/require-globals\n}\n\n\n// EXPORTS //\n\nexport default getGlobal;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\nvar typedarray = Int8Array; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default typedarray;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Returns a regular expression to capture everything that is not a space immediately after the `function` keyword and before the first left parenthesis.\n*\n* @returns {RegExp} regular expression\n*\n* @example\n* var RE_FUNCTION_NAME = reFunctionName();\n*\n* function fname( fcn ) {\n* return RE_FUNCTION_NAME.exec( fcn.toString() )[ 1 ];\n* }\n*\n* var fn = fname( Math.sqrt );\n* // returns 'sqrt'\n*\n* fn = fname( Int8Array );\n* // returns 'Int8Array'\n*\n* fn = fname( Object.prototype.toString );\n* // returns 'toString'\n*\n* fn = fname( function(){} );\n* // returns ''\n*/\nfunction reFunctionName() {\n\treturn /^\\s*function\\s*([^(]*)/i;\n}\n\n\n// EXPORTS //\n\nexport default reFunctionName;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport reFunctionName from './main.js';\n\n\n// MAIN //\n\n/**\n* Captures everything that is not a space immediately after the `function` keyword and before the first left parenthesis.\n*\n* Regular expression: `/^\\s*function\\s*([^(]*)/i`\n*\n* - `/^\\s*`\n* - Match zero or more spaces at beginning\n*\n* - `function`\n* - Match the word `function`\n*\n* - `\\s*`\n* - Match zero or more spaces after the word `function`\n*\n* - `()`\n* - Capture\n*\n* - `[^(]*`\n* - Match anything except a left parenthesis `(` zero or more times\n*\n* - `/i`\n* - ignore case\n*\n* @constant\n* @type {RegExp}\n* @default /^\\s*function\\s*([^(]*)/i\n*/\nvar RE_FUNCTION_NAME = reFunctionName();\n\n\n// EXPORTS //\n\nexport default RE_FUNCTION_NAME;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Tests if a value is object-like.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether a value is object-like\n*\n* @example\n* var bool = isObjectLike( {} );\n* // returns true\n*\n* @example\n* var bool = isObjectLike( [] );\n* // returns true\n*\n* @example\n* var bool = isObjectLike( null );\n* // returns false\n*/\nfunction isObjectLike( value ) {\n\treturn (\n\t\tvalue !== null &&\n\t\ttypeof value === 'object'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isObjectLike;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\nimport { REGEXP as RE } from '@stdlib/regexp-function-name';\nimport isBuffer from '@stdlib/assert-is-buffer';\n\n\n// MAIN //\n\n/**\n* Determines the name of a value's constructor.\n*\n* @param {*} v - input value\n* @returns {string} name of a value's constructor\n*\n* @example\n* var v = constructorName( 'a' );\n* // returns 'String'\n*\n* @example\n* var v = constructorName( 5 );\n* // returns 'Number'\n*\n* @example\n* var v = constructorName( null );\n* // returns 'Null'\n*\n* @example\n* var v = constructorName( undefined );\n* // returns 'Undefined'\n*\n* @example\n* var v = constructorName( function noop() {} );\n* // returns 'Function'\n*/\nfunction constructorName( v ) {\n\tvar match;\n\tvar name;\n\tvar ctor;\n\tname = nativeClass( v ).slice( 8, -1 );\n\tif ( (name === 'Object' || name === 'Error') && v.constructor ) {\n\t\tctor = v.constructor;\n\t\tif ( typeof ctor.name === 'string' ) {\n\t\t\treturn ctor.name;\n\t\t}\n\t\tmatch = RE.exec( ctor.toString() );\n\t\tif ( match ) {\n\t\t\treturn match[ 1 ];\n\t\t}\n\t}\n\tif ( isBuffer( v ) ) {\n\t\treturn 'Buffer';\n\t}\n\treturn name;\n}\n\n\n// EXPORTS //\n\nexport default constructorName;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isObjectLike from '@stdlib/assert-is-object-like';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Buffer instance.\n*\n* @param {*} value - value to validate\n* @returns {boolean} boolean indicating if a value is a Buffer instance\n*\n* @example\n* var v = isBuffer( new Buffer( 'beep' ) );\n* // returns true\n*\n* @example\n* var v = isBuffer( new Buffer( [1,2,3,4] ) );\n* // returns true\n*\n* @example\n* var v = isBuffer( {} );\n* // returns false\n*\n* @example\n* var v = isBuffer( [] );\n* // returns false\n*/\nfunction isBuffer( value ) {\n\treturn (\n\t\tisObjectLike( value ) &&\n\t\t(\n\t\t\t// eslint-disable-next-line no-underscore-dangle\n\t\t\tvalue._isBuffer || // for envs missing Object.prototype.constructor (e.g., Safari 5-7)\n\t\t\t(\n\t\t\t\tvalue.constructor &&\n\n\t\t\t\t// WARNING: `typeof` is not a foolproof check, as certain envs consider RegExp and NodeList instances to be functions\n\t\t\t\ttypeof value.constructor.isBuffer === 'function' &&\n\t\t\t\tvalue.constructor.isBuffer( value )\n\t\t\t)\n\t\t)\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isBuffer;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Regular expression to capture everything that is not a space immediately after the `function` keyword and before the first left parenthesis.\n*\n* @module @stdlib/regexp-function-name\n*\n* @example\n* import reFunctionName from '@stdlib/regexp-function-name';\n* var RE_FUNCTION_NAME = reFunctionName();\n*\n* function fname( fcn ) {\n* return RE_FUNCTION_NAME.exec( fcn.toString() )[ 1 ];\n* }\n*\n* var fn = fname( Math.sqrt );\n* // returns 'sqrt'\n*\n* fn = fname( Int8Array );\n* // returns 'Int8Array'\n*\n* fn = fname( Object.prototype.toString );\n* // returns 'toString'\n*\n* fn = fname( function(){} );\n* // returns ''\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport REGEXP from './regexp.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'REGEXP', REGEXP );\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test if a value is object-like.\n*\n* @module @stdlib/assert-is-object-like\n*\n* @example\n* import isObjectLike from '@stdlib/assert-is-object-like';\n*\n* var bool = isObjectLike( {} );\n* // returns true\n*\n* bool = isObjectLike( [] );\n* // returns true\n*\n* bool = isObjectLike( null );\n* // returns false\n*\n* @example\n* import { isObjectLikeArray as isObjectLike } from '@stdlib/assert-is-object-like';\n*\n* var bool = isObjectLike( [ {}, [] ] );\n* // returns true\n*\n* bool = isObjectLike( [ {}, '3.0' ] );\n* // returns false\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport arrayfun from '@stdlib/assert-tools-array-function';\nimport main from './main.js';\n\n\n// VARIABLES //\n\nvar isObjectLikeArray = arrayfun( main );\n\n\n// MAIN //\n\nsetReadOnly( main, 'isObjectLikeArray', isObjectLikeArray );\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isArray from '@stdlib/assert-is-array';\nimport format from '@stdlib/string-format';\n\n\n// MAIN //\n\n/**\n* Returns a function which tests if every element in an array passes a test condition.\n*\n* @param {Function} predicate - function to apply\n* @throws {TypeError} must provide a function\n* @returns {Function} an array function\n*\n* @example\n* import isOdd from '@stdlib/assert-is-odd';\n*\n* var arr1 = [ 1, 3, 5, 7 ];\n* var arr2 = [ 3, 5, 8 ];\n*\n* var validate = arrayfcn( isOdd );\n*\n* var bool = validate( arr1 );\n* // returns true\n*\n* bool = validate( arr2 );\n* // returns false\n*/\nfunction arrayfcn( predicate ) {\n\tif ( typeof predicate !== 'function' ) {\n\t\tthrow new TypeError( format( 'invalid argument. Must provide a function. Value: `%s`.', predicate ) );\n\t}\n\treturn every;\n\n\t/**\n\t* Tests if every element in an array passes a test condition.\n\t*\n\t* @private\n\t* @param {*} value - value to test\n\t* @returns {boolean} boolean indicating whether a value is an array for which all elements pass a test condition\n\t*/\n\tfunction every( value ) {\n\t\tvar len;\n\t\tvar i;\n\t\tif ( !isArray( value ) ) {\n\t\t\treturn false;\n\t\t}\n\t\tlen = value.length;\n\t\tif ( len === 0 ) {\n\t\t\treturn false;\n\t\t}\n\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\tif ( predicate( value[ i ] ) === false ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}\n}\n\n\n// EXPORTS //\n\nexport default arrayfcn;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Determine a value's type.\n*\n* @module @stdlib/utils-type-of\n*\n* @example\n* import typeOf from '@stdlib/utils-type-of';\n*\n* var str = typeOf( 'a' );\n* // returns 'string'\n*\n* str = typeOf( 5 );\n* // returns 'number'\n*/\n\n// MODULES //\n\nimport usePolyfill from './check.js';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar main = ( usePolyfill() ) ? polyfill : builtin;\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport RE from './fixtures/re.js';\nimport nodeList from './fixtures/nodelist.js';\nimport typedarray from './fixtures/typedarray.js';\n\n\n// MAIN //\n\n/**\n* Checks whether a polyfill is needed when using the `typeof` operator.\n*\n* @private\n* @returns {boolean} boolean indicating whether a polyfill is needed\n*/\nfunction check() {\n\tif (\n\t\t// Chrome 1-12 returns 'function' for regular expression instances (see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/typeof):\n\t\ttypeof RE === 'function' ||\n\n\t\t// Safari 8 returns 'object' for typed array and weak map constructors (underscore #1929):\n\t\ttypeof typedarray === 'object' ||\n\n\t\t// PhantomJS 1.9 returns 'function' for `NodeList` instances (underscore #2236):\n\t\ttypeof nodeList === 'function'\n\t) {\n\t\treturn true;\n\t}\n\treturn false;\n}\n\n\n// EXPORTS //\n\nexport default check;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport ctorName from '@stdlib/utils-constructor-name';\n\n\n// MAIN //\n\n/**\n* Determines a value's type.\n*\n* @param {*} v - input value\n* @returns {string} string indicating the value's type\n*/\nfunction typeOf( v ) {\n\treturn ctorName( v ).toLowerCase();\n}\n\n\n// EXPORTS //\n\nexport default typeOf;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport ctorName from '@stdlib/utils-constructor-name';\n\n\n// NOTES //\n\n/*\n* Built-in `typeof` operator behavior:\n*\n* ```text\n* typeof null => 'object'\n* typeof undefined => 'undefined'\n* typeof 'a' => 'string'\n* typeof 5 => 'number'\n* typeof NaN => 'number'\n* typeof true => 'boolean'\n* typeof false => 'boolean'\n* typeof {} => 'object'\n* typeof [] => 'object'\n* typeof function foo(){} => 'function'\n* typeof function* foo(){} => 'object'\n* typeof Symbol() => 'symbol'\n* ```\n*\n*/\n\n\n// MAIN //\n\n/**\n* Determines a value's type.\n*\n* @param {*} v - input value\n* @returns {string} string indicating the value's type\n*/\nfunction typeOf( v ) {\n\tvar type;\n\n\t// Address `typeof null` => `object` (see http://wiki.ecmascript.org/doku.php?id=harmony:typeof_null):\n\tif ( v === null ) {\n\t\treturn 'null';\n\t}\n\ttype = typeof v;\n\n\t// If the `typeof` operator returned something other than `object`, we are done. Otherwise, we need to check for an internal class name or search for a constructor.\n\tif ( type === 'object' ) {\n\t\treturn ctorName( v ).toLowerCase();\n\t}\n\treturn type;\n}\n\n\n// EXPORTS //\n\nexport default typeOf;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport typeOf from '@stdlib/utils-type-of';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a function.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a function\n*\n* @example\n* function beep() {\n* return 'beep';\n* }\n*\n* var bool = isFunction( beep );\n* // returns true\n*/\nfunction isFunction( value ) {\n\t// Note: cannot use `typeof` directly, as various browser engines incorrectly return `'function'` when operating on non-function objects, such as regular expressions and NodeLists.\n\treturn ( typeOf( value ) === 'function' );\n}\n\n\n// EXPORTS //\n\nexport default isFunction;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isNumber } from '@stdlib/assert-is-number';\nimport defineProperty from '@stdlib/utils-define-property';\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport format from '@stdlib/string-format';\nimport toStr from './tostring.js';\nimport toJSON from './tojson.js';\n\n\n// MAIN //\n\n/**\n* 128-bit complex number constructor.\n*\n* @constructor\n* @param {number} real - real component\n* @param {number} imag - imaginary component\n* @throws {TypeError} must invoke using the `new` keyword\n* @throws {TypeError} real component must be a number\n* @throws {TypeError} imaginary component must be a number\n* @returns {Complex128} 128-bit complex number\n*\n* @example\n* var z = new Complex128( 5.0, 3.0 );\n* // returns \n*/\nfunction Complex128( real, imag ) {\n\tif ( !( this instanceof Complex128 ) ) {\n\t\tthrow new TypeError( 'invalid invocation. Constructor must be called with the `new` keyword.' );\n\t}\n\tif ( !isNumber( real ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Real component must be a number. Value: `%s`.', real ) );\n\t}\n\tif ( !isNumber( imag ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Imaginary component must be a number. Value: `%s`.', imag ) );\n\t}\n\tdefineProperty( this, 're', {\n\t\t'configurable': false,\n\t\t'enumerable': true,\n\t\t'writable': false,\n\t\t'value': real\n\t});\n\tdefineProperty( this, 'im', {\n\t\t'configurable': false,\n\t\t'enumerable': true,\n\t\t'writable': false,\n\t\t'value': imag\n\t});\n\treturn this;\n}\n\n/**\n* Size (in bytes) of each component.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex128\n* @type {integer}\n* @returns {integer} size of each component\n*\n* @example\n* var nbytes = Complex128.BYTES_PER_ELEMENT;\n* // returns 8\n*/\nsetReadOnly( Complex128, 'BYTES_PER_ELEMENT', 8 );\n\n/**\n* Size (in bytes) of each component.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex128.prototype\n* @type {integer}\n* @returns {integer} size of each component\n*\n* @example\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var nbytes = z.BYTES_PER_ELEMENT;\n* // returns 8\n*/\nsetReadOnly( Complex128.prototype, 'BYTES_PER_ELEMENT', 8 );\n\n/**\n* Length (in bytes) of a complex number.\n*\n* @name byteLength\n* @memberof Complex128.prototype\n* @type {integer}\n* @returns {integer} byte length\n*\n* @example\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var nbytes = z.byteLength;\n* // returns 16\n*/\nsetReadOnly( Complex128.prototype, 'byteLength', 16 );\n\n/**\n* Serializes a complex number as a string.\n*\n* @name toString\n* @memberof Complex128.prototype\n* @type {Function}\n* @returns {string} serialized complex number\n*\n* @example\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var str = z.toString();\n* // returns '5 + 3i'\n*/\nsetReadOnly( Complex128.prototype, 'toString', toStr );\n\n/**\n* Serializes a complex number as a JSON object.\n*\n* ## Notes\n*\n* - `JSON.stringify()` implicitly calls this method when stringifying a `Complex128` instance.\n*\n* @name toJSON\n* @memberof Complex128.prototype\n* @type {Function}\n* @returns {Object} serialized complex number\n*\n* @example\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var obj = z.toJSON();\n* // returns { 'type': 'Complex128', 're': 5.0, 'im': 3.0 }\n*/\nsetReadOnly( Complex128.prototype, 'toJSON', toJSON );\n\n\n// EXPORTS //\n\nexport default Complex128;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Serializes a complex number as a string.\n*\n* @private\n* @returns {string} serialized complex number\n*/\nfunction toString() { // eslint-disable-line stdlib/no-redeclare\n\t/* eslint-disable no-invalid-this */\n\tvar str = '' + this.re;\n\tif ( this.im < 0 ) {\n\t\tstr += ' - ' + (-this.im);\n\t} else {\n\t\tstr += ' + ' + this.im;\n\t}\n\tstr += 'i';\n\treturn str;\n}\n\n\n// EXPORTS //\n\nexport default toString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Serializes a complex number as a JSON object.\n*\n* @private\n* @returns {Object} JSON representation\n*/\nfunction toJSON() {\n\t/* eslint-disable no-invalid-this */\n\tvar out = {};\n\tout.type = 'Complex128';\n\tout.re = this.re;\n\tout.im = this.im;\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default toJSON;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar fround = ( typeof Math.fround === 'function' ) ? Math.fround : null; // eslint-disable-line stdlib/no-builtin-math\n\n\n// EXPORTS //\n\nexport default fround;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport Float32Array from '@stdlib/array-float32';\n\n\n// VARIABLES //\n\nvar FLOAT32_VIEW = new Float32Array( 1 );\n\n\n// MAIN //\n\n/**\n* Converts a double-precision floating-point number to the nearest single-precision floating-point number.\n*\n* @param {number} x - double-precision floating-point number\n* @returns {number} nearest single-precision floating-point number\n*\n* @example\n* var y = float64ToFloat32( 1.337 );\n* // returns 1.3370000123977661\n*/\nfunction float64ToFloat32( x ) {\n\tFLOAT32_VIEW[ 0 ] = x;\n\treturn FLOAT32_VIEW[ 0 ];\n}\n\n\n// EXPORTS //\n\nexport default float64ToFloat32;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Convert a double-precision floating-point number to the nearest single-precision floating-point number.\n*\n* @module @stdlib/number-float64-base-to-float32\n*\n* @example\n* import float64ToFloat32 from '@stdlib/number-float64-base-to-float32';\n*\n* var y = float64ToFloat32( 1.337 );\n* // returns 1.3370000123977661\n*/\n\n// MODULES //\n\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar float64ToFloat32;\nif ( typeof builtin === 'function' ) {\n\tfloat64ToFloat32 = builtin;\n} else {\n\tfloat64ToFloat32 = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default float64ToFloat32;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isNumber } from '@stdlib/assert-is-number';\nimport defineProperty from '@stdlib/utils-define-property';\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport float64ToFloat32 from '@stdlib/number-float64-base-to-float32';\nimport format from '@stdlib/string-format';\nimport toStr from './tostring.js';\nimport toJSON from './tojson.js';\n\n\n// MAIN //\n\n/**\n* 64-bit complex number constructor.\n*\n* @constructor\n* @param {number} real - real component\n* @param {number} imag - imaginary component\n* @throws {TypeError} must invoke using the `new` keyword\n* @throws {TypeError} real component must be a number\n* @throws {TypeError} imaginary component must be a number\n* @returns {Complex64} 64-bit complex number\n*\n* @example\n* var z = new Complex64( 5.0, 3.0 );\n* // returns \n*/\nfunction Complex64( real, imag ) {\n\tif ( !( this instanceof Complex64 ) ) {\n\t\tthrow new TypeError( 'invalid invocation. Constructor must be called with the `new` keyword.' );\n\t}\n\tif ( !isNumber( real ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Real component must be a number. Value: `%s`.', real ) );\n\t}\n\tif ( !isNumber( imag ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Imaginary component must be a number. Value: `%s`.', imag ) );\n\t}\n\tdefineProperty( this, 're', {\n\t\t'configurable': false,\n\t\t'enumerable': true,\n\t\t'writable': false,\n\t\t'value': float64ToFloat32( real )\n\t});\n\tdefineProperty( this, 'im', {\n\t\t'configurable': false,\n\t\t'enumerable': true,\n\t\t'writable': false,\n\t\t'value': float64ToFloat32( imag )\n\t});\n\treturn this;\n}\n\n/**\n* Size (in bytes) of each component.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex64\n* @type {integer}\n* @returns {integer} size of each component\n*\n* @example\n* var nbytes = Complex64.BYTES_PER_ELEMENT;\n* // returns 4\n*/\nsetReadOnly( Complex64, 'BYTES_PER_ELEMENT', 4 );\n\n/**\n* Size (in bytes) of each component.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex64.prototype\n* @type {integer}\n* @returns {integer} size of each component\n*\n* @example\n* var z = new Complex64( 5.0, 3.0 );\n*\n* var nbytes = z.BYTES_PER_ELEMENT;\n* // returns 4\n*/\nsetReadOnly( Complex64.prototype, 'BYTES_PER_ELEMENT', 4 );\n\n/**\n* Length (in bytes) of a complex number.\n*\n* @name byteLength\n* @memberof Complex64.prototype\n* @type {integer}\n* @returns {integer} byte length\n*\n* @example\n* var z = new Complex64( 5.0, 3.0 );\n*\n* var nbytes = z.byteLength;\n* // returns 8\n*/\nsetReadOnly( Complex64.prototype, 'byteLength', 8 );\n\n/**\n* Serializes a complex number as a string.\n*\n* @name toString\n* @memberof Complex64.prototype\n* @type {Function}\n* @returns {string} serialized complex number\n*\n* @example\n* var z = new Complex64( 5.0, 3.0 );\n*\n* var str = z.toString();\n* // returns '5 + 3i'\n*/\nsetReadOnly( Complex64.prototype, 'toString', toStr );\n\n/**\n* Serializes a complex number as a JSON object.\n*\n* ## Notes\n*\n* - `JSON.stringify()` implicitly calls this method when stringifying a `Complex64` instance.\n*\n* @name toJSON\n* @memberof Complex64.prototype\n* @type {Function}\n* @returns {Object} serialized complex number\n*\n* @example\n* var z = new Complex64( 5.0, 3.0 );\n*\n* var obj = z.toJSON();\n* // returns { 'type': 'Complex64', 're': 5.0, 'im': 3.0 }\n*/\nsetReadOnly( Complex64.prototype, 'toJSON', toJSON );\n\n\n// EXPORTS //\n\nexport default Complex64;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport Complex128 from '@stdlib/complex-float64';\nimport Complex64 from '@stdlib/complex-float32';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a complex number-like object.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a complex number-like object.\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n* import Complex64 from '@stdlib/complex-float32';\n*\n* var x = new Complex128( 4.0, 2.0 );\n* var bool = isComplexLike( x );\n* // returns true\n*\n* x = new Complex64( 4.0, 2.0 );\n* bool = isComplexLike( x );\n* // returns true\n*/\nfunction isComplexLike( value ) {\n\tif ( value instanceof Complex128 || value instanceof Complex64 ) {\n\t\treturn true;\n\t}\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\ttypeof value.re === 'number' &&\n\t\ttypeof value.im === 'number'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isComplexLike;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isInteger from '@stdlib/math-base-assert-is-integer';\n\n\n// MAIN //\n\n/**\n* Tests if a finite numeric value is an even number.\n*\n* @param {number} x - value to test\n* @returns {boolean} boolean indicating whether the value is an even number\n*\n* @example\n* var bool = isEven( 5.0 );\n* // returns false\n*\n* @example\n* var bool = isEven( -2.0 );\n* // returns true\n*\n* @example\n* var bool = isEven( 0.0 );\n* // returns true\n*\n* @example\n* var bool = isEven( NaN );\n* // returns false\n*/\nfunction isEven( x ) {\n\treturn isInteger( x/2.0 );\n}\n\n\n// EXPORTS //\n\nexport default isEven;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Serializes a complex number as a string.\n*\n* @private\n* @returns {string} serialized complex number\n*/\nfunction toString() { // eslint-disable-line stdlib/no-redeclare\n\t/* eslint-disable no-invalid-this */\n\tvar str = '' + this.re;\n\tif ( this.im < 0 ) {\n\t\tstr += ' - ' + (-this.im);\n\t} else {\n\t\tstr += ' + ' + this.im;\n\t}\n\tstr += 'i';\n\treturn str;\n}\n\n\n// EXPORTS //\n\nexport default toString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Serializes a complex number as a JSON object.\n*\n* @private\n* @returns {Object} JSON representation\n*/\nfunction toJSON() {\n\t/* eslint-disable no-invalid-this */\n\tvar out = {};\n\tout.type = 'Complex64';\n\tout.re = this.re;\n\tout.im = this.im;\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default toJSON;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// VARIABLES //\n\nvar BYTES_PER_ELEMENT = 8; // 4 bytes per float32 x (1 real + 1 imag component)\n\n\n// MAIN //\n\n/**\n* Returns a boolean indicating if a value is a `Complex64Array`.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a `Complex64Array`\n*\n* @example\n* import Complex64Array from '@stdlib/array-complex64';\n*\n* var bool = isComplex64Array( new Complex64Array( 10 ) );\n* // returns true\n*\n* bool = isComplex64Array( [] );\n* // returns false\n*/\nfunction isComplex64Array( value ) {\n\t// Note: the following is not robust and that is intentional. In this case, we are seeking a lower cost way to reasonably determine whether an input value is a `Complex64Array` in order to avoid walking the prototype chain and resolving constructors, which is necessary for robust identification of cross-realm instances. For more robust validation, see `@stdlib/assert/is-complex64array`.\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\tvalue.constructor.name === 'Complex64Array' &&\n\t\tvalue.BYTES_PER_ELEMENT === BYTES_PER_ELEMENT\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isComplex64Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// VARIABLES //\n\nvar BYTES_PER_ELEMENT = 16; // 8 bytes per float64 x (1 real + 1 imag component)\n\n\n// MAIN //\n\n/**\n* Returns a boolean indicating if a value is a `Complex128Array`.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a `Complex128Array`\n*\n* @example\n* import Complex128Array from '@stdlib/array-complex128';\n*\n* var bool = isComplex128Array( new Complex128Array( 10 ) );\n* // returns true\n*\n* bool = isComplex128Array( [] );\n* // returns false\n*/\nfunction isComplex128Array( value ) {\n\t// Note: the following is not robust and that is intentional. In this case, we are seeking a lower cost way to reasonably determine whether an input value is a `Complex128Array` in order to avoid walking the prototype chain and resolving constructors, which is necessary for robust identification of cross-realm instances. For more robust validation, see `@stdlib/assert/is-complex128array`.\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\tvalue.constructor.name === 'Complex128Array' &&\n\t\tvalue.BYTES_PER_ELEMENT === BYTES_PER_ELEMENT\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isComplex128Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport hasOwnProp from '@stdlib/assert-has-own-property';\nimport Symbol from '@stdlib/symbol-ctor';\n\n\n// MAIN //\n\n/**\n* Tests for native `Symbol.iterator` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Symbol.iterator` support\n*\n* @example\n* var bool = hasIteratorSymbolSupport();\n* // returns \n*/\nfunction hasIteratorSymbolSupport() {\n\treturn (\n\t\ttypeof Symbol === 'function' &&\n\t\ttypeof Symbol( 'foo' ) === 'symbol' &&\n\t\thasOwnProp( Symbol, 'iterator' ) &&\n\t\ttypeof Symbol.iterator === 'symbol'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default hasIteratorSymbolSupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport hasIteratorSymbolSupport from '@stdlib/assert-has-iterator-symbol-support';\n\n\n// MAIN //\n\n/**\n* Iterator symbol.\n*\n* @name IteratorSymbol\n* @constant\n* @type {(symbol|null)}\n*\n* @example\n* function iterator() {\n* var it;\n* var i;\n*\n* i = -1;\n*\n* it = {};\n* it.next = next;\n* it.return = done;\n*\n* if ( IteratorSymbol ) {\n* it[ IteratorSymbol ] = iterator;\n* }\n* return it;\n*\n* function next() {\n* i += 1;\n* return {\n* 'value': i,\n* 'done': false\n* };\n* }\n*\n* function done( value ) {\n* if ( arguments.length === 0 ) {\n* return {\n* 'done': true\n* };\n* }\n* return {\n* 'value': value,\n* 'done': true\n* };\n* }\n* }\n*\n* var obj = iterator();\n*/\nvar IteratorSymbol = ( hasIteratorSymbolSupport() ) ? Symbol.iterator : null;\n\n\n// EXPORTS //\n\nexport default IteratorSymbol;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport defineProperty from '@stdlib/utils-define-property';\n\n\n// MAIN //\n\n/**\n* Defines a non-enumerable read-only accessor.\n*\n* @param {Object} obj - object on which to define the property\n* @param {(string|symbol)} prop - property name\n* @param {Function} getter - accessor\n*\n* @example\n* function getter() {\n* return 'bar';\n* }\n*\n* var obj = {};\n*\n* setNonEnumerableReadOnlyAccessor( obj, 'foo', getter );\n*\n* try {\n* obj.foo = 'boop';\n* } catch ( err ) {\n* console.error( err.message );\n* }\n*/\nfunction setNonEnumerableReadOnlyAccessor( obj, prop, getter ) { // eslint-disable-line id-length\n\tdefineProperty( obj, prop, {\n\t\t'configurable': false,\n\t\t'enumerable': false,\n\t\t'get': getter\n\t});\n}\n\n\n// EXPORTS //\n\nexport default setNonEnumerableReadOnlyAccessor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Returns the real component of a single-precision complex floating-point number.\n*\n* @param {Complex} z - complex number\n* @returns {number} real component\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n*\n* var z = new Complex64( 5.0, 3.0 );\n*\n* var re = realf( z );\n* // returns 5.0\n*/\nfunction realf( z ) {\n\treturn z.re;\n}\n\n\n// EXPORTS //\n\nexport default realf;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Returns the imaginary component of a single-precision complex floating-point number.\n*\n* @param {Complex} z - complex number\n* @returns {number} imaginary component\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n*\n* var z = new Complex64( 5.0, 3.0 );\n*\n* var im = imagf( z );\n* // returns 3.0\n*/\nfunction imagf( z ) {\n\treturn z.im;\n}\n\n\n// EXPORTS //\n\nexport default imagf;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport Float32Array from '@stdlib/array-float32';\n\n\n// MAIN //\n\n/**\n* Reinterprets a `Complex64Array` as a `Float32Array`.\n*\n* @param {Complex64Array} x - input array\n* @param {NonNegativeInteger} offset - starting index\n* @returns {Float32Array} `Float32Array` view\n*\n* @example\n* import Complex64Array from '@stdlib/array-complex64';\n*\n* var x = new Complex64Array( 10 );\n*\n* var out = reinterpret( x, 0 );\n* // returns \n*\n* var bool = ( out.buffer === x.buffer );\n* // returns true\n*/\nfunction reinterpret( x, offset ) {\n\treturn new Float32Array( x.buffer, x.byteOffset+(x.BYTES_PER_ELEMENT*offset), 2*(x.length-offset) ); // eslint-disable-line max-len\n}\n\n\n// EXPORTS //\n\nexport default reinterpret;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport Float64Array from '@stdlib/array-float64';\n\n\n// MAIN //\n\n/**\n* Reinterprets a `Complex128Array` as a `Float64Array`.\n*\n* @param {Complex128Array} x - input array\n* @param {NonNegativeInteger} offset - starting index\n* @returns {Float64Array} `Float64Array` view\n*\n* @example\n* import Complex128Array from '@stdlib/array-complex128';\n*\n* var x = new Complex128Array( 10 );\n*\n* var out = reinterpret( x, 0 );\n* // returns \n*\n* var bool = ( out.buffer === x.buffer );\n* // returns true\n*/\nfunction reinterpret( x, offset ) {\n\treturn new Float64Array( x.buffer, x.byteOffset+(x.BYTES_PER_ELEMENT*offset), 2*(x.length-offset) ); // eslint-disable-line max-len\n}\n\n\n// EXPORTS //\n\nexport default reinterpret;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// VARIABLES //\n\nvar GETTERS = {\n\t'float64': getFloat64,\n\t'float32': getFloat32,\n\t'int32': getInt32,\n\t'int16': getInt16,\n\t'int8': getInt8,\n\t'uint32': getUint32,\n\t'uint16': getUint16,\n\t'uint8': getUint8,\n\t'uint8c': getUint8c,\n\t'generic': getGeneric,\n\t'default': getArrayLike\n};\n\n\n// FUNCTIONS //\n\n/**\n* Returns an element from a `Float64Array`.\n*\n* @private\n* @param {Float64Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n*\n* var arr = new Float64Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getFloat64( arr, 2 );\n* // returns 3.0\n*/\nfunction getFloat64( arr, idx ) {\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from a `Float32Array`.\n*\n* @private\n* @param {Float32Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Float32Array from '@stdlib/array-float32';\n*\n* var arr = new Float32Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getFloat32( arr, 2 );\n* // returns 3.0\n*/\nfunction getFloat32( arr, idx ) {\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from an `Int32Array`.\n*\n* @private\n* @param {Int32Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Int32Array from '@stdlib/array-int32';\n*\n* var arr = new Int32Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getInt32( arr, 2 );\n* // returns 3\n*/\nfunction getInt32( arr, idx ) { // eslint-disable-line stdlib/jsdoc-doctest-decimal-point\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from an `Int16Array`.\n*\n* @private\n* @param {Int16Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Int16Array from '@stdlib/array-int16';\n*\n* var arr = new Int16Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getInt16( arr, 2 );\n* // returns 3\n*/\nfunction getInt16( arr, idx ) { // eslint-disable-line stdlib/jsdoc-doctest-decimal-point\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from an `Int8Array`.\n*\n* @private\n* @param {Int8Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Int8Array from '@stdlib/array-int8';\n*\n* var arr = new Int8Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getInt8( arr, 2 );\n* // returns 3\n*/\nfunction getInt8( arr, idx ) { // eslint-disable-line stdlib/jsdoc-doctest-decimal-point\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from a `Uint32Array`.\n*\n* @private\n* @param {Uint32Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Uint32Array from '@stdlib/array-uint32';\n*\n* var arr = new Uint32Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getUint32( arr, 2 );\n* // returns 3\n*/\nfunction getUint32( arr, idx ) { // eslint-disable-line stdlib/jsdoc-doctest-decimal-point\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from a `Uint16Array`.\n*\n* @private\n* @param {Uint16Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Uint16Array from '@stdlib/array-uint16';\n*\n* var arr = new Uint16Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getUint16( arr, 2 );\n* // returns 3\n*/\nfunction getUint16( arr, idx ) { // eslint-disable-line stdlib/jsdoc-doctest-decimal-point\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from a `Uint8Array`.\n*\n* @private\n* @param {Uint8Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Uint8Array from '@stdlib/array-uint8';\n*\n* var arr = new Uint8Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getUint8( arr, 2 );\n* // returns 3\n*/\nfunction getUint8( arr, idx ) { // eslint-disable-line stdlib/jsdoc-doctest-decimal-point\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from a `Uint8ClampedArray`.\n*\n* @private\n* @param {Uint8ClampedArray} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Uint8ClampedArray from '@stdlib/array-uint8c';\n*\n* var arr = new Uint8ClampedArray( [ 1, 2, 3, 4 ] );\n*\n* var v = getUint8c( arr, 2 );\n* // returns 3\n*/\nfunction getUint8c( arr, idx ) { // eslint-disable-line stdlib/jsdoc-doctest-decimal-point\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from a generic `Array`.\n*\n* @private\n* @param {Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {*} element value\n*\n* @example\n* var arr = [ 1, 2, 3, 4 ];\n*\n* var v = getGeneric( arr, 2 );\n* // returns 3\n*/\nfunction getGeneric( arr, idx ) {\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from an indexed array-like object.\n*\n* @private\n* @param {Collection} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {*} element value\n*\n* @example\n* var arr = [ 1, 2, 3, 4 ];\n*\n* var v = getArrayLike( arr, 2 );\n* // returns 3\n*/\nfunction getArrayLike( arr, idx ) {\n\treturn arr[ idx ];\n}\n\n\n// MAIN //\n\n/**\n* Returns an accessor function for retrieving an element from an indexed array-like object.\n*\n* @param {string} dtype - array dtype\n* @returns {Function} accessor\n*\n* @example\n* import dtype from '@stdlib/array-dtype';\n*\n* var arr = [ 1, 2, 3, 4 ];\n*\n* var get = getter( dtype( arr ) );\n* var v = get( arr, 2 );\n* // returns 3\n*/\nfunction getter( dtype ) {\n\tvar f = GETTERS[ dtype ];\n\tif ( typeof f === 'function' ) {\n\t\treturn f;\n\t}\n\treturn GETTERS.default;\n}\n\n\n// EXPORTS //\n\nexport default getter;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// VARIABLES //\n\nvar GETTERS = {\n\t'complex128': getComplex128,\n\t'complex64': getComplex64,\n\t'default': getArrayLike\n};\n\n\n// FUNCTIONS //\n\n/**\n* Returns an element from a `Complex128Array`.\n*\n* @private\n* @param {Complex128Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Complex128Array from '@stdlib/array-complex128';\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* var arr = new Complex128Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getComplex128( arr, 1 );\n* // returns \n*\n* var re = real( v );\n* // returns 3.0\n*\n* var im = imag( v );\n* // returns 4.0\n*/\nfunction getComplex128( arr, idx ) {\n\treturn arr.get( idx );\n}\n\n/**\n* Returns an element from a `Complex64Array`.\n*\n* @private\n* @param {Complex64Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Complex64Array from '@stdlib/array-complex64';\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* var arr = new Complex64Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getComplex64( arr, 1 );\n* // returns \n*\n* var re = realf( v );\n* // returns 3.0\n*\n* var im = imagf( v );\n* // returns 4.0\n*/\nfunction getComplex64( arr, idx ) {\n\treturn arr.get( idx );\n}\n\n/**\n* Returns an element from an array-like object supporting the get/set protocol.\n*\n* @private\n* @param {Collection} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {*} element value\n*\n* @example\n* var arr = [ 1, 2, 3, 4 ];\n*\n* function get( idx ) {\n* return arr[ idx ];\n* }\n*\n* function set( value, idx ) {\n* arr[ idx ] = value;\n* }\n*\n* arr.get = get;\n* arr.set = set;\n*\n* var v = getArrayLike( arr, 2 );\n* // returns 3\n*/\nfunction getArrayLike( arr, idx ) {\n\treturn arr.get( idx );\n}\n\n\n// MAIN //\n\n/**\n* Returns an accessor function for retrieving an element from an array-like object supporting the get/set protocol.\n*\n* @param {string} dtype - array dtype\n* @returns {Function} accessor\n*\n* @example\n* import Complex64Array from '@stdlib/array-complex64';\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n* import dtype from '@stdlib/array-dtype';\n*\n* var arr = new Complex64Array( [ 1, 2, 3, 4 ] );\n*\n* var get = getter( dtype( arr ) );\n* var v = get( arr, 1 );\n* // returns \n*\n* var re = realf( v );\n* // returns 3.0\n*\n* var im = imagf( v );\n* // returns 4.0\n*/\nfunction getter( dtype ) {\n\tvar f = GETTERS[ dtype ];\n\tif ( typeof f === 'function' ) {\n\t\treturn f;\n\t}\n\treturn GETTERS.default;\n}\n\n\n// EXPORTS //\n\nexport default getter;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isArrayLikeObject from '@stdlib/assert-is-array-like-object';\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport realf from '@stdlib/complex-realf';\nimport imagf from '@stdlib/complex-imagf';\nimport format from '@stdlib/string-format';\n\n\n// MAIN //\n\n/**\n* Returns an array of iterated values.\n*\n* @private\n* @param {Object} it - iterator\n* @returns {(Array|TypeError)} array or an error\n*/\nfunction fromIterator( it ) {\n\tvar out;\n\tvar v;\n\tvar z;\n\n\tout = [];\n\twhile ( true ) {\n\t\tv = it.next();\n\t\tif ( v.done ) {\n\t\t\tbreak;\n\t\t}\n\t\tz = v.value;\n\t\tif ( isArrayLikeObject( z ) && z.length >= 2 ) {\n\t\t\tout.push( z[ 0 ], z[ 1 ] );\n\t\t} else if ( isComplexLike( z ) ) {\n\t\t\tout.push( realf( z ), imagf( z ) );\n\t\t} else {\n\t\t\treturn new TypeError( format( 'invalid argument. An iterator must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', z ) );\n\t\t}\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default fromIterator;\n","/* eslint-disable no-restricted-syntax, max-lines, no-invalid-this */\n\n/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isNonNegativeInteger } from '@stdlib/assert-is-nonnegative-integer';\nimport isArrayLikeObject from '@stdlib/assert-is-array-like-object';\nimport isCollection from '@stdlib/assert-is-collection';\nimport isArrayBuffer from '@stdlib/assert-is-arraybuffer';\nimport isObject from '@stdlib/assert-is-object';\nimport isArray from '@stdlib/assert-is-array';\nimport { isPrimitive as isString } from '@stdlib/assert-is-string';\nimport isFunction from '@stdlib/assert-is-function';\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport isEven from '@stdlib/math-base-assert-is-even';\nimport isInteger from '@stdlib/math-base-assert-is-integer';\nimport isComplex64Array from '@stdlib/array-base-assert-is-complex64array';\nimport isComplex128Array from '@stdlib/array-base-assert-is-complex128array';\nimport hasIteratorSymbolSupport from '@stdlib/assert-has-iterator-symbol-support';\nimport ITERATOR_SYMBOL from '@stdlib/symbol-iterator';\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport setReadOnlyAccessor from '@stdlib/utils-define-nonenumerable-read-only-accessor';\nimport Float32Array from '@stdlib/array-float32';\nimport Complex64 from '@stdlib/complex-float32';\nimport format from '@stdlib/string-format';\nimport realf from '@stdlib/complex-realf';\nimport imagf from '@stdlib/complex-imagf';\nimport floor from '@stdlib/math-base-special-floor';\nimport reinterpret64 from '@stdlib/strided-base-reinterpret-complex64';\nimport reinterpret128 from '@stdlib/strided-base-reinterpret-complex128';\nimport getter from '@stdlib/array-base-getter';\nimport accessorGetter from '@stdlib/array-base-accessor-getter';\nimport fromIterator from './from_iterator.js';\nimport fromIteratorMap from './from_iterator_map.js';\nimport fromArray from './from_array.js';\n\n\n// VARIABLES //\n\nvar BYTES_PER_ELEMENT = Float32Array.BYTES_PER_ELEMENT * 2;\nvar HAS_ITERATOR_SYMBOL = hasIteratorSymbolSupport();\n\n\n// FUNCTIONS //\n\n/**\n* Returns a boolean indicating if a value is a complex typed array.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a complex typed array\n*/\nfunction isComplexArray( value ) {\n\treturn (\n\t\tvalue instanceof Complex64Array ||\n\t\t(\n\t\t\ttypeof value === 'object' &&\n\t\t\tvalue !== null &&\n\t\t\t(\n\t\t\t\tvalue.constructor.name === 'Complex64Array' ||\n\t\t\t\tvalue.constructor.name === 'Complex128Array'\n\t\t\t) &&\n\t\t\ttypeof value._length === 'number' && // eslint-disable-line no-underscore-dangle\n\n\t\t\t// NOTE: we don't perform a more rigorous test here for a typed array for performance reasons, as robustly checking for a typed array instance could require walking the prototype tree and performing relatively expensive constructor checks...\n\t\t\ttypeof value._buffer === 'object' // eslint-disable-line no-underscore-dangle\n\t\t)\n\t);\n}\n\n/**\n* Returns a boolean indicating if a value is a complex typed array constructor.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a complex typed array constructor\n*/\nfunction isComplexArrayConstructor( value ) {\n\treturn (\n\t\tvalue === Complex64Array ||\n\n\t\t// NOTE: weaker test in order to avoid a circular dependency with Complex128Array...\n\t\tvalue.name === 'Complex128Array'\n\t);\n}\n\n/**\n* Retrieves a complex number from a complex number array buffer.\n*\n* @private\n* @param {Float32Array} buf - array buffer\n* @param {NonNegativeInteger} idx - element index\n* @returns {Complex64} complex number\n*/\nfunction getComplex64( buf, idx ) {\n\tidx *= 2;\n\treturn new Complex64( buf[ idx ], buf[ idx+1 ] );\n}\n\n\n// MAIN //\n\n/**\n* 64-bit complex number array constructor.\n*\n* @constructor\n* @param {(NonNegativeInteger|Collection|ArrayBuffer|Iterable)} [arg] - length, typed array, array-like object, buffer, or an iterable\n* @param {NonNegativeInteger} [byteOffset=0] - byte offset\n* @param {NonNegativeInteger} [length] - view length\n* @throws {RangeError} ArrayBuffer byte length must be a multiple of `8`\n* @throws {RangeError} array-like object and typed array input arguments must have a length which is a multiple of two\n* @throws {TypeError} if provided only a single argument, must provide a valid argument\n* @throws {TypeError} byte offset must be a nonnegative integer\n* @throws {RangeError} byte offset must be a multiple of `8`\n* @throws {TypeError} view length must be a positive multiple of `8`\n* @throws {RangeError} must provide sufficient memory to accommodate byte offset and view length requirements\n* @throws {TypeError} an iterator must return either a two element array containing real and imaginary components or a complex number\n* @returns {Complex64Array} complex number array\n*\n* @example\n* var arr = new Complex64Array();\n* // returns \n*\n* var len = arr.length;\n* // returns 0\n*\n* @example\n* var arr = new Complex64Array( 2 );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*\n* @example\n* var arr = new Complex64Array( [ 1.0, -1.0 ] );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* import ArrayBuffer from '@stdlib/array-buffer';\n*\n* var buf = new ArrayBuffer( 16 );\n* var arr = new Complex64Array( buf );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*\n* @example\n* import ArrayBuffer from '@stdlib/array-buffer';\n*\n* var buf = new ArrayBuffer( 16 );\n* var arr = new Complex64Array( buf, 8 );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* import ArrayBuffer from '@stdlib/array-buffer';\n*\n* var buf = new ArrayBuffer( 32 );\n* var arr = new Complex64Array( buf, 8, 2 );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*/\nfunction Complex64Array() {\n\tvar byteOffset;\n\tvar nargs;\n\tvar buf;\n\tvar len;\n\n\tnargs = arguments.length;\n\tif ( !(this instanceof Complex64Array) ) {\n\t\tif ( nargs === 0 ) {\n\t\t\treturn new Complex64Array();\n\t\t}\n\t\tif ( nargs === 1 ) {\n\t\t\treturn new Complex64Array( arguments[0] );\n\t\t}\n\t\tif ( nargs === 2 ) {\n\t\t\treturn new Complex64Array( arguments[0], arguments[1] );\n\t\t}\n\t\treturn new Complex64Array( arguments[0], arguments[1], arguments[2] );\n\t}\n\t// Create the underlying data buffer...\n\tif ( nargs === 0 ) {\n\t\tbuf = new Float32Array( 0 ); // backward-compatibility\n\t} else if ( nargs === 1 ) {\n\t\tif ( isNonNegativeInteger( arguments[0] ) ) {\n\t\t\tbuf = new Float32Array( arguments[0]*2 );\n\t\t} else if ( isCollection( arguments[0] ) ) {\n\t\t\tbuf = arguments[ 0 ];\n\t\t\tlen = buf.length;\n\n\t\t\t// If provided a \"generic\" array, peak at the first value, and, if the value is a complex number, try to process as an array of complex numbers, falling back to \"normal\" typed array initialization if we fail and ensuring consistency if the first value had not been a complex number...\n\t\t\tif ( len && isArray( buf ) && isComplexLike( buf[0] ) ) {\n\t\t\t\tbuf = fromArray( new Float32Array( len*2 ), buf );\n\t\t\t\tif ( buf === null ) {\n\t\t\t\t\t// We failed and we are now forced to allocate a new array :-(\n\t\t\t\t\tif ( !isEven( len ) ) {\n\t\t\t\t\t\tthrow new RangeError( format( 'invalid argument. Array-like object arguments must have a length which is a multiple of two. Length: `%u`.', len ) );\n\t\t\t\t\t}\n\t\t\t\t\t// We failed, so fall back to directly setting values...\n\t\t\t\t\tbuf = new Float32Array( arguments[0] );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ( isComplex64Array( buf ) ) {\n\t\t\t\t\tbuf = reinterpret64( buf, 0 );\n\t\t\t\t} else if ( isComplex128Array( buf ) ) {\n\t\t\t\t\tbuf = reinterpret128( buf, 0 );\n\t\t\t\t} else if ( !isEven( len ) ) {\n\t\t\t\t\tthrow new RangeError( format( 'invalid argument. Array-like object and typed array arguments must have a length which is a multiple of two. Length: `%u`.', len ) );\n\t\t\t\t}\n\t\t\t\tbuf = new Float32Array( buf );\n\t\t\t}\n\t\t} else if ( isArrayBuffer( arguments[0] ) ) {\n\t\t\tbuf = arguments[ 0 ];\n\t\t\tif ( !isInteger( buf.byteLength/BYTES_PER_ELEMENT ) ) {\n\t\t\t\tthrow new RangeError( format( 'invalid argument. ArrayBuffer byte length must be a multiple of %u. Byte length: `%u`.', BYTES_PER_ELEMENT, buf.byteLength ) );\n\t\t\t}\n\t\t\tbuf = new Float32Array( buf );\n\t\t} else if ( isObject( arguments[0] ) ) {\n\t\t\tbuf = arguments[ 0 ];\n\t\t\tif ( HAS_ITERATOR_SYMBOL === false ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Environment lacks Symbol.iterator support. Must provide a length, ArrayBuffer, typed array, or array-like object. Value: `%s`.', buf ) );\n\t\t\t}\n\t\t\tif ( !isFunction( buf[ ITERATOR_SYMBOL ] ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.', buf ) );\n\t\t\t}\n\t\t\tbuf = buf[ ITERATOR_SYMBOL ]();\n\t\t\tif ( !isFunction( buf.next ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.', buf ) ); // FIXME: `buf` is what is returned from above, NOT the original value\n\t\t\t}\n\t\t\tbuf = fromIterator( buf );\n\t\t\tif ( buf instanceof Error ) {\n\t\t\t\tthrow buf;\n\t\t\t}\n\t\t\tbuf = new Float32Array( buf );\n\t\t} else {\n\t\t\tthrow new TypeError( format( 'invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.', arguments[0] ) );\n\t\t}\n\t} else {\n\t\tbuf = arguments[ 0 ];\n\t\tif ( !isArrayBuffer( buf ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. First argument must be an ArrayBuffer. Value: `%s`.', buf ) );\n\t\t}\n\t\tbyteOffset = arguments[ 1 ];\n\t\tif ( !isNonNegativeInteger( byteOffset ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Byte offset must be a nonnegative integer. Value: `%s`.', byteOffset ) );\n\t\t}\n\t\tif ( !isInteger( byteOffset/BYTES_PER_ELEMENT ) ) {\n\t\t\tthrow new RangeError( format( 'invalid argument. Byte offset must be a multiple of %u. Value: `%u`.', BYTES_PER_ELEMENT, byteOffset ) );\n\t\t}\n\t\tif ( nargs === 2 ) {\n\t\t\tlen = buf.byteLength - byteOffset;\n\t\t\tif ( !isInteger( len/BYTES_PER_ELEMENT ) ) {\n\t\t\t\tthrow new RangeError( format( 'invalid arguments. ArrayBuffer view byte length must be a multiple of %u. View byte length: `%u`.', BYTES_PER_ELEMENT, len ) );\n\t\t\t}\n\t\t\tbuf = new Float32Array( buf, byteOffset );\n\t\t} else {\n\t\t\tlen = arguments[ 2 ];\n\t\t\tif ( !isNonNegativeInteger( len ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Length must be a nonnegative integer. Value: `%s`.', len ) );\n\t\t\t}\n\t\t\tif ( (len*BYTES_PER_ELEMENT) > (buf.byteLength-byteOffset) ) {\n\t\t\t\tthrow new RangeError( format( 'invalid arguments. ArrayBuffer has insufficient capacity. Either decrease the array length or provide a bigger buffer. Minimum capacity: `%u`.', len*BYTES_PER_ELEMENT ) );\n\t\t\t}\n\t\t\tbuf = new Float32Array( buf, byteOffset, len*2 );\n\t\t}\n\t}\n\tsetReadOnly( this, '_buffer', buf );\n\tsetReadOnly( this, '_length', buf.length/2 );\n\n\treturn this;\n}\n\n/**\n* Size (in bytes) of each array element.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex64Array\n* @readonly\n* @type {PositiveInteger}\n* @default 8\n*\n* @example\n* var nbytes = Complex64Array.BYTES_PER_ELEMENT;\n* // returns 8\n*/\nsetReadOnly( Complex64Array, 'BYTES_PER_ELEMENT', BYTES_PER_ELEMENT );\n\n/**\n* Constructor name.\n*\n* @name name\n* @memberof Complex64Array\n* @readonly\n* @type {string}\n* @default 'Complex64Array'\n*\n* @example\n* var str = Complex64Array.name;\n* // returns 'Complex64Array'\n*/\nsetReadOnly( Complex64Array, 'name', 'Complex64Array' );\n\n/**\n* Creates a new 64-bit complex number array from an array-like object or an iterable.\n*\n* @name from\n* @memberof Complex64Array\n* @type {Function}\n* @param {(Collection|Iterable)} src - array-like object or iterable\n* @param {Function} [clbk] - callback to invoke for each source element\n* @param {*} [thisArg] - context\n* @throws {TypeError} `this` context must be a constructor\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be an array-like object or an iterable\n* @throws {TypeError} second argument must be a function\n* @throws {RangeError} array-like objects must have a length which is a multiple of two\n* @throws {TypeError} an iterator must return either a two element array containing real and imaginary components or a complex number\n* @throws {TypeError} when provided an iterator, a callback must return either a two element array containing real and imaginary components or a complex number\n* @returns {Complex64Array} 64-bit complex number array\n*\n* @example\n* var arr = Complex64Array.from( [ 1.0, -1.0 ] );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n*\n* var arr = Complex64Array.from( [ new Complex64( 1.0, 1.0 ) ] );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* function clbk( v ) {\n* return new Complex64( realf(v)*2.0, imagf(v)*2.0 );\n* }\n*\n* var arr = Complex64Array.from( [ new Complex64( 1.0, 1.0 ) ], clbk );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*/\nsetReadOnly( Complex64Array, 'from', function from( src ) {\n\tvar thisArg;\n\tvar nargs;\n\tvar clbk;\n\tvar out;\n\tvar buf;\n\tvar tmp;\n\tvar get;\n\tvar len;\n\tvar flg;\n\tvar v;\n\tvar i;\n\tvar j;\n\tif ( !isFunction( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` context must be a constructor.' );\n\t}\n\tif ( !isComplexArrayConstructor( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tnargs = arguments.length;\n\tif ( nargs > 1 ) {\n\t\tclbk = arguments[ 1 ];\n\t\tif ( !isFunction( clbk ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be a function. Value: `%s`.', clbk ) );\n\t\t}\n\t\tif ( nargs > 2 ) {\n\t\t\tthisArg = arguments[ 2 ];\n\t\t}\n\t}\n\tif ( isComplexArray( src ) ) {\n\t\tlen = src.length;\n\t\tif ( clbk ) {\n\t\t\tout = new this( len );\n\t\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\t\tj = 0;\n\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\tv = clbk.call( thisArg, src.get( i ), i );\n\t\t\t\tif ( isComplexLike( v ) ) {\n\t\t\t\t\tbuf[ j ] = realf( v );\n\t\t\t\t\tbuf[ j+1 ] = imagf( v );\n\t\t\t\t} else if ( isArrayLikeObject( v ) && v.length >= 2 ) {\n\t\t\t\t\tbuf[ j ] = v[ 0 ];\n\t\t\t\t\tbuf[ j+1 ] = v[ 1 ];\n\t\t\t\t} else {\n\t\t\t\t\tthrow new TypeError( format( 'invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', v ) );\n\t\t\t\t}\n\t\t\t\tj += 2; // stride\n\t\t\t}\n\t\t\treturn out;\n\t\t}\n\t\treturn new this( src );\n\t}\n\tif ( isCollection( src ) ) {\n\t\tif ( clbk ) {\n\t\t\t// Note: array contents affect how we iterate over a provided data source. If only complex number objects, we can extract real and imaginary components. Otherwise, for non-complex number arrays (e.g., `Float64Array`, etc), we assume a strided array where real and imaginary components are interleaved. In the former case, we expect a callback to return real and imaginary components (possibly as a complex number). In the latter case, we expect a callback to return *either* a real or imaginary component.\n\n\t\t\tlen = src.length;\n\t\t\tif ( src.get && src.set ) {\n\t\t\t\tget = accessorGetter( 'default' );\n\t\t\t} else {\n\t\t\t\tget = getter( 'default' );\n\t\t\t}\n\t\t\t// Detect whether we've been provided an array which returns complex number objects...\n\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\tif ( !isComplexLike( get( src, i ) ) ) {\n\t\t\t\t\tflg = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// If an array does not contain only complex number objects, then we assume interleaved real and imaginary components...\n\t\t\tif ( flg ) {\n\t\t\t\tif ( !isEven( len ) ) {\n\t\t\t\t\tthrow new RangeError( format( 'invalid argument. First argument must have a length which is a multiple of %u. Length: `%u`.', 2, len ) );\n\t\t\t\t}\n\t\t\t\tout = new this( len/2 );\n\t\t\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\t\tbuf[ i ] = clbk.call( thisArg, get( src, i ), i );\n\t\t\t\t}\n\t\t\t\treturn out;\n\t\t\t}\n\t\t\t// If an array contains only complex number objects, then we need to extract real and imaginary components...\n\t\t\tout = new this( len );\n\t\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\t\tj = 0;\n\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\tv = clbk.call( thisArg, get( src, i ), i );\n\t\t\t\tif ( isComplexLike( v ) ) {\n\t\t\t\t\tbuf[ j ] = realf( v );\n\t\t\t\t\tbuf[ j+1 ] = imagf( v );\n\t\t\t\t} else if ( isArrayLikeObject( v ) && v.length >= 2 ) {\n\t\t\t\t\tbuf[ j ] = v[ 0 ];\n\t\t\t\t\tbuf[ j+1 ] = v[ 1 ];\n\t\t\t\t} else {\n\t\t\t\t\tthrow new TypeError( format( 'invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', v ) );\n\t\t\t\t}\n\t\t\t\tj += 2; // stride\n\t\t\t}\n\t\t\treturn out;\n\t\t}\n\t\treturn new this( src );\n\t}\n\tif ( isObject( src ) && HAS_ITERATOR_SYMBOL && isFunction( src[ ITERATOR_SYMBOL ] ) ) { // eslint-disable-line max-len\n\t\tbuf = src[ ITERATOR_SYMBOL ]();\n\t\tif ( !isFunction( buf.next ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.', src ) );\n\t\t}\n\t\tif ( clbk ) {\n\t\t\ttmp = fromIteratorMap( buf, clbk, thisArg );\n\t\t} else {\n\t\t\ttmp = fromIterator( buf );\n\t\t}\n\t\tif ( tmp instanceof Error ) {\n\t\t\tthrow tmp;\n\t\t}\n\t\tlen = tmp.length / 2;\n\t\tout = new this( len );\n\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\tbuf[ i ] = tmp[ i ];\n\t\t}\n\t\treturn out;\n\t}\n\tthrow new TypeError( format( 'invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.', src ) );\n});\n\n/**\n* Creates a new 64-bit complex number array from a variable number of arguments.\n*\n* @name of\n* @memberof Complex64Array\n* @type {Function}\n* @param {...*} element - array elements\n* @throws {TypeError} `this` context must be a constructor\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Complex64Array} 64-bit complex number array\n*\n* @example\n* var arr = Complex64Array.of( 1.0, 1.0, 1.0, 1.0 );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*/\nsetReadOnly( Complex64Array, 'of', function of() {\n\tvar args;\n\tvar i;\n\tif ( !isFunction( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` context must be a constructor.' );\n\t}\n\tif ( !isComplexArrayConstructor( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\targs = [];\n\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\targs.push( arguments[ i ] );\n\t}\n\treturn new this( args );\n});\n\n/**\n* Returns an array element with support for both nonnegative and negative integer indices.\n*\n* @name at\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {integer} idx - element index\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} must provide an integer\n* @returns {(Complex64|void)} array element\n*\n* @example\n* var arr = new Complex64Array( 10 );\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* var z = arr.at( 0 );\n* // returns \n*\n* var re = realf( z );\n* // returns 0.0\n*\n* var im = imagf( z );\n* // returns 0.0\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 9.0, -9.0 ], 9 );\n*\n* z = arr.at( 0 );\n* // returns \n*\n* re = realf( z );\n* // returns 1.0\n*\n* im = imagf( z );\n* // returns -1.0\n*\n* z = arr.at( -1 );\n* // returns \n*\n* re = realf( z );\n* // returns 9.0\n*\n* im = imagf( z );\n* // returns -9.0\n*\n* z = arr.at( 100 );\n* // returns undefined\n*\n* z = arr.at( -100 );\n* // returns undefined\n*/\nsetReadOnly( Complex64Array.prototype, 'at', function at( idx ) {\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isInteger( idx ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Must provide an integer. Value: `%s`.', idx ) );\n\t}\n\tif ( idx < 0 ) {\n\t\tidx += this._length;\n\t}\n\tif ( idx < 0 || idx >= this._length ) {\n\t\treturn;\n\t}\n\treturn getComplex64( this._buffer, idx );\n});\n\n/**\n* Pointer to the underlying data buffer.\n*\n* @name buffer\n* @memberof Complex64Array.prototype\n* @readonly\n* @type {ArrayBuffer}\n*\n* @example\n* var arr = new Complex64Array( 10 );\n*\n* var buf = arr.buffer;\n* // returns \n*/\nsetReadOnlyAccessor( Complex64Array.prototype, 'buffer', function get() {\n\treturn this._buffer.buffer;\n});\n\n/**\n* Size (in bytes) of the array.\n*\n* @name byteLength\n* @memberof Complex64Array.prototype\n* @readonly\n* @type {NonNegativeInteger}\n*\n* @example\n* var arr = new Complex64Array( 10 );\n*\n* var byteLength = arr.byteLength;\n* // returns 80\n*/\nsetReadOnlyAccessor( Complex64Array.prototype, 'byteLength', function get() {\n\treturn this._buffer.byteLength;\n});\n\n/**\n* Offset (in bytes) of the array from the start of its underlying `ArrayBuffer`.\n*\n* @name byteOffset\n* @memberof Complex64Array.prototype\n* @readonly\n* @type {NonNegativeInteger}\n*\n* @example\n* var arr = new Complex64Array( 10 );\n*\n* var byteOffset = arr.byteOffset;\n* // returns 0\n*/\nsetReadOnlyAccessor( Complex64Array.prototype, 'byteOffset', function get() {\n\treturn this._buffer.byteOffset;\n});\n\n/**\n* Size (in bytes) of each array element.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex64Array.prototype\n* @readonly\n* @type {PositiveInteger}\n* @default 8\n*\n* @example\n* var arr = new Complex64Array( 10 );\n*\n* var nbytes = arr.BYTES_PER_ELEMENT;\n* // returns 8\n*/\nsetReadOnly( Complex64Array.prototype, 'BYTES_PER_ELEMENT', Complex64Array.BYTES_PER_ELEMENT );\n\n/**\n* Copies a sequence of elements within the array to the position starting at `target`.\n*\n* @name copyWithin\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {integer} target - index at which to start copying elements\n* @param {integer} start - source index at which to copy elements from\n* @param {integer} [end] - source index at which to stop copying elements from\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Complex64Array} modified array\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* var arr = new Complex64Array( 4 );\n*\n* // Set the array elements:\n* arr.set( new Complex64( 1.0, 1.0 ), 0 );\n* arr.set( new Complex64( 2.0, 2.0 ), 1 );\n* arr.set( new Complex64( 3.0, 3.0 ), 2 );\n* arr.set( new Complex64( 4.0, 4.0 ), 3 );\n*\n* // Copy the first two elements to the last two elements:\n* arr.copyWithin( 2, 0, 2 );\n*\n* // Get the last array element:\n* var z = arr.get( 3 );\n*\n* var re = realf( z );\n* // returns 2.0\n*\n* var im = imagf( z );\n* // returns 2.0\n*/\nsetReadOnly( Complex64Array.prototype, 'copyWithin', function copyWithin( target, start ) {\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\t// FIXME: prefer a functional `copyWithin` implementation which addresses lack of universal browser support (e.g., IE11 and Safari) or ensure that typed arrays are polyfilled\n\tif ( arguments.length === 2 ) {\n\t\tthis._buffer.copyWithin( target*2, start*2 );\n\t} else {\n\t\tthis._buffer.copyWithin( target*2, start*2, arguments[2]*2 );\n\t}\n\treturn this;\n});\n\n/**\n* Returns an iterator for iterating over array key-value pairs.\n*\n* @name entries\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Iterator} iterator\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n*\n* var arr = [\n* new Complex64( 1.0, 1.0 ),\n* new Complex64( 2.0, 2.0 ),\n* new Complex64( 3.0, 3.0 )\n* ];\n* arr = new Complex64Array( arr );\n*\n* // Create an iterator:\n* var it = arr.entries();\n*\n* // Iterate over the key-value pairs...\n* var v = it.next().value;\n* // returns [ 0, ]\n*\n* v = it.next().value;\n* // returns [ 1, ]\n*\n* v = it.next().value;\n* // returns [ 2, ]\n*\n* var bool = it.next().done;\n* // returns true\n*/\nsetReadOnly( Complex64Array.prototype, 'entries', function entries() {\n\tvar buffer;\n\tvar self;\n\tvar iter;\n\tvar len;\n\tvar FLG;\n\tvar i;\n\tvar j;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tself = this;\n\tbuffer = this._buffer;\n\tlen = this._length;\n\n\t// Initialize the iteration indices:\n\ti = -1;\n\tj = -2;\n\n\t// Create an iterator protocol-compliant object:\n\titer = {};\n\tsetReadOnly( iter, 'next', next );\n\tsetReadOnly( iter, 'return', end );\n\n\tif ( ITERATOR_SYMBOL ) {\n\t\tsetReadOnly( iter, ITERATOR_SYMBOL, factory );\n\t}\n\treturn iter;\n\n\t/**\n\t* Returns an iterator protocol-compliant object containing the next iterated value.\n\t*\n\t* @private\n\t* @returns {Object} iterator protocol-compliant object\n\t*/\n\tfunction next() {\n\t\tvar z;\n\t\ti += 1;\n\t\tif ( FLG || i >= len ) {\n\t\t\treturn {\n\t\t\t\t'done': true\n\t\t\t};\n\t\t}\n\t\tj += 2;\n\t\tz = new Complex64( buffer[ j ], buffer[ j+1 ] );\n\t\treturn {\n\t\t\t'value': [ i, z ],\n\t\t\t'done': false\n\t\t};\n\t}\n\n\t/**\n\t* Finishes an iterator.\n\t*\n\t* @private\n\t* @param {*} [value] - value to return\n\t* @returns {Object} iterator protocol-compliant object\n\t*/\n\tfunction end( value ) {\n\t\tFLG = true;\n\t\tif ( arguments.length ) {\n\t\t\treturn {\n\t\t\t\t'value': value,\n\t\t\t\t'done': true\n\t\t\t};\n\t\t}\n\t\treturn {\n\t\t\t'done': true\n\t\t};\n\t}\n\n\t/**\n\t* Returns a new iterator.\n\t*\n\t* @private\n\t* @returns {Iterator} iterator\n\t*/\n\tfunction factory() {\n\t\treturn self.entries();\n\t}\n});\n\n/**\n* Tests whether all elements in an array pass a test implemented by a predicate function.\n*\n* @name every\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {boolean} boolean indicating whether all elements pass a test\n*\n* @example\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* function predicate( v ) {\n* return ( realf( v ) === imagf( v ) );\n* }\n*\n* var arr = new Complex64Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var bool = arr.every( predicate );\n* // returns true\n*/\nsetReadOnly( Complex64Array.prototype, 'every', function every( predicate, thisArg ) {\n\tvar buf;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tif ( !predicate.call( thisArg, getComplex64( buf, i ), i, this ) ) {\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn true;\n});\n\n/**\n* Returns a modified typed array filled with a fill value.\n*\n* @name fill\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {ComplexLike} value - fill value\n* @param {integer} [start=0] - starting index (inclusive)\n* @param {integer} [end] - ending index (exclusive)\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a complex number\n* @throws {TypeError} second argument must be an integer\n* @throws {TypeError} third argument must be an integer\n*\n* @example\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* var arr = new Complex64Array( 3 );\n*\n* arr.fill( new Complex64( 1.0, 1.0 ), 1 );\n*\n* var z = arr.get( 1 );\n* // returns \n*\n* var re = realf( z );\n* // returns 1.0\n*\n* var im = imagf( z );\n* // returns 1.0\n*\n* z = arr.get( 1 );\n* // returns \n*\n* re = realf( z );\n* // returns 1.0\n*\n* im = imagf( z );\n* // returns 1.0\n*/\nsetReadOnly( Complex64Array.prototype, 'fill', function fill( value, start, end ) {\n\tvar buf;\n\tvar len;\n\tvar idx;\n\tvar re;\n\tvar im;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isComplexLike( value ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a complex number. Value: `%s`.', value ) );\n\t}\n\tbuf = this._buffer;\n\tlen = this._length;\n\tif ( arguments.length > 1 ) {\n\t\tif ( !isInteger( start ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be an integer. Value: `%s`.', start ) );\n\t\t}\n\t\tif ( start < 0 ) {\n\t\t\tstart += len;\n\t\t\tif ( start < 0 ) {\n\t\t\t\tstart = 0;\n\t\t\t}\n\t\t}\n\t\tif ( arguments.length > 2 ) {\n\t\t\tif ( !isInteger( end ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Third argument must be an integer. Value: `%s`.', end ) );\n\t\t\t}\n\t\t\tif ( end < 0 ) {\n\t\t\t\tend += len;\n\t\t\t\tif ( end < 0 ) {\n\t\t\t\t\tend = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( end > len ) {\n\t\t\t\tend = len;\n\t\t\t}\n\t\t} else {\n\t\t\tend = len;\n\t\t}\n\t} else {\n\t\tstart = 0;\n\t\tend = len;\n\t}\n\tre = realf( value );\n\tim = imagf( value );\n\tfor ( i = start; i < end; i++ ) {\n\t\tidx = 2*i;\n\t\tbuf[ idx ] = re;\n\t\tbuf[ idx+1 ] = im;\n\t}\n\treturn this;\n});\n\n/**\n* Returns a new array containing the elements of an array which pass a test implemented by a predicate function.\n*\n* @name filter\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {Complex64Array} complex number array\n*\n* @example\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* function predicate( v ) {\n* return ( realf( v ) === imagf( v ) );\n* }\n*\n* var arr = new Complex64Array( 3 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n*\n* var out = arr.filter( predicate );\n* // returns \n*\n* var len = out.length;\n* // returns 1\n*\n* var z = out.get( 0 );\n* // returns \n*\n* var re = realf( z );\n* // returns 2.0\n*\n* var im = imagf( z );\n* // returns 2.0\n*/\nsetReadOnly( Complex64Array.prototype, 'filter', function filter( predicate, thisArg ) {\n\tvar buf;\n\tvar out;\n\tvar i;\n\tvar z;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tout = [];\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tz = getComplex64( buf, i );\n\t\tif ( predicate.call( thisArg, z, i, this ) ) {\n\t\t\tout.push( z );\n\t\t}\n\t}\n\treturn new this.constructor( out );\n});\n\n/**\n* Returns the first element in an array for which a predicate function returns a truthy value.\n*\n* @name find\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {(Complex64|void)} array element or undefined\n*\n* @example\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n* import Complex64 from '@stdlib/complex-float32';\n*\n* function predicate( v ) {\n* return ( realf( v ) === imagf( v ) );\n* }\n*\n* var arr = new Complex64Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var z = arr.find( predicate );\n* // returns \n*\n* var re = realf( z );\n* // returns 1.0\n*\n* var im = imagf( z );\n* // returns 1.0\n*/\nsetReadOnly( Complex64Array.prototype, 'find', function find( predicate, thisArg ) {\n\tvar buf;\n\tvar i;\n\tvar z;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tz = getComplex64( buf, i );\n\t\tif ( predicate.call( thisArg, z, i, this ) ) {\n\t\t\treturn z;\n\t\t}\n\t}\n});\n\n/**\n* Returns the index of the first element in an array for which a predicate function returns a truthy value.\n*\n* @name findIndex\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {integer} index or -1\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* function predicate( v ) {\n* return ( realf( v ) === imagf( v ) );\n* }\n*\n* var arr = new Complex64Array( 3 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var idx = arr.findIndex( predicate );\n* // returns 2\n*/\nsetReadOnly( Complex64Array.prototype, 'findIndex', function findIndex( predicate, thisArg ) {\n\tvar buf;\n\tvar i;\n\tvar z;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tz = getComplex64( buf, i );\n\t\tif ( predicate.call( thisArg, z, i, this ) ) {\n\t\t\treturn i;\n\t\t}\n\t}\n\treturn -1;\n});\n\n/**\n* Returns the last element in an array for which a predicate function returns a truthy value.\n*\n* @name findLast\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {(Complex64|void)} array element or undefined\n*\n* @example\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n* import Complex64 from '@stdlib/complex-float32';\n*\n* function predicate( v ) {\n* return ( realf( v ) === imagf( v ) );\n* }\n*\n* var arr = new Complex64Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var z = arr.findLast( predicate );\n* // returns \n*\n* var re = realf( z );\n* // returns 3.0\n*\n* var im = imagf( z );\n* // returns 3.0\n*/\nsetReadOnly( Complex64Array.prototype, 'findLast', function findLast( predicate, thisArg ) {\n\tvar buf;\n\tvar i;\n\tvar z;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = this._length-1; i >= 0; i-- ) {\n\t\tz = getComplex64( buf, i );\n\t\tif ( predicate.call( thisArg, z, i, this ) ) {\n\t\t\treturn z;\n\t\t}\n\t}\n});\n\n/**\n* Returns the index of the last element in an array for which a predicate function returns a truthy value.\n*\n* @name findLastIndex\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {integer} index or -1\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* function predicate( v ) {\n* return ( realf( v ) === imagf( v ) );\n* }\n*\n* var arr = new Complex64Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n*\n* var idx = arr.findLastIndex( predicate );\n* // returns 1\n*/\nsetReadOnly( Complex64Array.prototype, 'findLastIndex', function findLastIndex( predicate, thisArg ) {\n\tvar buf;\n\tvar i;\n\tvar z;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = this._length-1; i >= 0; i-- ) {\n\t\tz = getComplex64( buf, i );\n\t\tif ( predicate.call( thisArg, z, i, this ) ) {\n\t\t\treturn i;\n\t\t}\n\t}\n\treturn -1;\n});\n\n/**\n* Invokes a function once for each array element.\n*\n* @name forEach\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {Function} fcn - function to invoke\n* @param {*} [thisArg] - function invocation context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n*\n* function log( v, i ) {\n* console.log( '%s: %s', i, v.toString() );\n* }\n*\n* var arr = new Complex64Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* arr.forEach( log );\n*/\nsetReadOnly( Complex64Array.prototype, 'forEach', function forEach( fcn, thisArg ) {\n\tvar buf;\n\tvar i;\n\tvar z;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( fcn ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', fcn ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tz = getComplex64( buf, i );\n\t\tfcn.call( thisArg, z, i, this );\n\t}\n});\n\n/**\n* Returns an array element.\n*\n* @name get\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {NonNegativeInteger} idx - element index\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} must provide a nonnegative integer\n* @returns {(Complex64|void)} array element\n*\n* @example\n* var arr = new Complex64Array( 10 );\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* var z = arr.get( 0 );\n* // returns \n*\n* var re = realf( z );\n* // returns 0.0\n*\n* var im = imagf( z );\n* // returns 0.0\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n*\n* z = arr.get( 0 );\n* // returns \n*\n* re = realf( z );\n* // returns 1.0\n*\n* im = imagf( z );\n* // returns -1.0\n*\n* z = arr.get( 100 );\n* // returns undefined\n*/\nsetReadOnly( Complex64Array.prototype, 'get', function get( idx ) {\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isNonNegativeInteger( idx ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Must provide a nonnegative integer. Value: `%s`.', idx ) );\n\t}\n\tif ( idx >= this._length ) {\n\t\treturn;\n\t}\n\treturn getComplex64( this._buffer, idx );\n});\n\n/**\n* Returns a boolean indicating whether an array includes a provided value.\n*\n* @name includes\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {ComplexLike} searchElement - search element\n* @param {integer} [fromIndex=0] - starting index (inclusive)\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a complex number\n* @throws {TypeError} second argument must be an integer\n* @returns {boolean} boolean indicating whether an array includes a provided value\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n*\n* var arr = new Complex64Array( 5 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n* arr.set( [ 4.0, -4.0 ], 3 );\n* arr.set( [ 5.0, -5.0 ], 4 );\n*\n* var bool = arr.includes( new Complex64( 3.0, -3.0 ) );\n* // returns true\n*\n* bool = arr.includes( new Complex64( 3.0, -3.0 ), 3 );\n* // returns false\n*\n* bool = arr.includes( new Complex64( 4.0, -4.0 ), -3 );\n* // returns true\n*/\nsetReadOnly( Complex64Array.prototype, 'includes', function includes( searchElement, fromIndex ) {\n\tvar buf;\n\tvar idx;\n\tvar re;\n\tvar im;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isComplexLike( searchElement ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a complex number. Value: `%s`.', searchElement ) );\n\t}\n\tif ( arguments.length > 1 ) {\n\t\tif ( !isInteger( fromIndex ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be an integer. Value: `%s`.', fromIndex ) );\n\t\t}\n\t\tif ( fromIndex < 0 ) {\n\t\t\tfromIndex += this._length;\n\t\t\tif ( fromIndex < 0 ) {\n\t\t\t\tfromIndex = 0;\n\t\t\t}\n\t\t}\n\t} else {\n\t\tfromIndex = 0;\n\t}\n\tre = realf( searchElement );\n\tim = imagf( searchElement );\n\tbuf = this._buffer;\n\tfor ( i = fromIndex; i < this._length; i++ ) {\n\t\tidx = 2 * i;\n\t\tif ( re === buf[ idx ] && im === buf[ idx+1 ] ) {\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n});\n\n/**\n* Returns the first index at which a given element can be found.\n*\n* @name indexOf\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {ComplexLike} searchElement - element to find\n* @param {integer} [fromIndex=0] - starting index (inclusive)\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a complex number\n* @throws {TypeError} second argument must be an integer\n* @returns {integer} index or -1\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n*\n* var arr = new Complex64Array( 10 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n* arr.set( [ 4.0, -4.0 ], 3 );\n* arr.set( [ 5.0, -5.0 ], 4 );\n*\n* var idx = arr.indexOf( new Complex64( 3.0, -3.0 ) );\n* // returns 2\n*\n* idx = arr.indexOf( new Complex64( 3.0, -3.0 ), 3 );\n* // returns -1\n*\n* idx = arr.indexOf( new Complex64( 4.0, -4.0 ), -3 );\n* // returns -1\n*/\nsetReadOnly( Complex64Array.prototype, 'indexOf', function indexOf( searchElement, fromIndex ) {\n\tvar buf;\n\tvar idx;\n\tvar re;\n\tvar im;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isComplexLike( searchElement ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a complex number. Value: `%s`.', searchElement ) );\n\t}\n\tif ( arguments.length > 1 ) {\n\t\tif ( !isInteger( fromIndex ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be an integer. Value: `%s`.', fromIndex ) );\n\t\t}\n\t\tif ( fromIndex < 0 ) {\n\t\t\tfromIndex += this._length;\n\t\t\tif ( fromIndex < 0 ) {\n\t\t\t\tfromIndex = 0;\n\t\t\t}\n\t\t}\n\t} else {\n\t\tfromIndex = 0;\n\t}\n\tre = realf( searchElement );\n\tim = imagf( searchElement );\n\tbuf = this._buffer;\n\tfor ( i = fromIndex; i < this._length; i++ ) {\n\t\tidx = 2 * i;\n\t\tif ( re === buf[ idx ] && im === buf[ idx+1 ] ) {\n\t\t\treturn i;\n\t\t}\n\t}\n\treturn -1;\n});\n\n/**\n* Returns a new string by concatenating all array elements.\n*\n* @name join\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {string} [separator=','] - element separator\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a string\n* @returns {string} string representation\n*\n* @example\n* var arr = new Complex64Array( 2 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n*\n* var str = arr.join();\n* // returns '1 + 1i,2 + 2i'\n*\n* str = arr.join( '/' );\n* // returns '1 + 1i/2 + 2i'\n*/\nsetReadOnly( Complex64Array.prototype, 'join', function join( separator ) {\n\tvar out;\n\tvar buf;\n\tvar sep;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( arguments.length === 0 ) {\n\t\tsep = ',';\n\t} else if ( isString( separator ) ) {\n\t\tsep = separator;\n\t} else {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a string. Value: `%s`.', separator ) );\n\t}\n\tout = [];\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tout.push( getComplex64( buf, i ).toString() );\n\t}\n\treturn out.join( sep );\n});\n\n/**\n* Returns the last index at which a given element can be found.\n*\n* @name lastIndexOf\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {ComplexLike} searchElement - element to find\n* @param {integer} [fromIndex] - index at which to start searching backward (inclusive)\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a complex number\n* @throws {TypeError} second argument must be an integer\n* @returns {integer} index or -1\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n*\n* var arr = new Complex64Array( 5 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n* arr.set( [ 4.0, -4.0 ], 3 );\n* arr.set( [ 3.0, -3.0 ], 4 );\n*\n* var idx = arr.lastIndexOf( new Complex64( 3.0, -3.0 ) );\n* // returns 4\n*\n* idx = arr.lastIndexOf( new Complex64( 3.0, -3.0 ), 3 );\n* // returns 2\n*\n* idx = arr.lastIndexOf( new Complex64( 5.0, -5.0 ), 3 );\n* // returns -1\n*\n* idx = arr.lastIndexOf( new Complex64( 2.0, -2.0 ), -3 );\n* // returns 1\n*/\nsetReadOnly( Complex64Array.prototype, 'lastIndexOf', function lastIndexOf( searchElement, fromIndex ) {\n\tvar buf;\n\tvar idx;\n\tvar re;\n\tvar im;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isComplexLike( searchElement ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a complex number. Value: `%s`.', searchElement ) );\n\t}\n\tif ( arguments.length > 1 ) {\n\t\tif ( !isInteger( fromIndex ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be an integer. Value: `%s`.', fromIndex ) );\n\t\t}\n\t\tif ( fromIndex >= this._length ) {\n\t\t\tfromIndex = this._length - 1;\n\t\t} else if ( fromIndex < 0 ) {\n\t\t\tfromIndex += this._length;\n\t\t}\n\t} else {\n\t\tfromIndex = this._length - 1;\n\t}\n\tre = realf( searchElement );\n\tim = imagf( searchElement );\n\tbuf = this._buffer;\n\tfor ( i = fromIndex; i >= 0; i-- ) {\n\t\tidx = 2 * i;\n\t\tif ( re === buf[ idx ] && im === buf[ idx+1 ] ) {\n\t\t\treturn i;\n\t\t}\n\t}\n\treturn -1;\n});\n\n/**\n* Number of array elements.\n*\n* @name length\n* @memberof Complex64Array.prototype\n* @readonly\n* @type {NonNegativeInteger}\n*\n* @example\n* var arr = new Complex64Array( 10 );\n*\n* var len = arr.length;\n* // returns 10\n*/\nsetReadOnlyAccessor( Complex64Array.prototype, 'length', function get() {\n\treturn this._length;\n});\n\n/**\n* Returns a new array with each element being the result of a provided callback function.\n*\n* @name map\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {Function} fcn - callback function\n* @param {*} [thisArg] - callback function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {Complex64Array} complex number array\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* function scale( v, i ) {\n* return new Complex64( 2.0*realf( v ), 2.0*imagf( v ) );\n* }\n*\n* var arr = new Complex64Array( 3 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n*\n* var out = arr.map( scale );\n* // returns \n*\n* var z = out.get( 0 );\n* // returns \n*\n* var re = realf( z );\n* // returns 2\n*\n* var im = imagf( z );\n* // returns -2\n*/\nsetReadOnly( Complex64Array.prototype, 'map', function map( fcn, thisArg ) {\n\tvar outbuf;\n\tvar buf;\n\tvar out;\n\tvar i;\n\tvar v;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( fcn ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', fcn ) );\n\t}\n\tbuf = this._buffer;\n\tout = new this.constructor( this._length );\n\toutbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tv = fcn.call( thisArg, getComplex64( buf, i ), i, this );\n\t\tif ( isComplexLike( v ) ) {\n\t\t\toutbuf[ 2*i ] = realf( v );\n\t\t\toutbuf[ (2*i)+1 ] = imagf( v );\n\t\t} else if ( isArrayLikeObject( v ) && v.length === 2 ) {\n\t\t\toutbuf[ 2*i ] = v[ 0 ];\n\t\t\toutbuf[ (2*i)+1 ] = v[ 1 ];\n\t\t} else {\n\t\t\tthrow new TypeError( format( 'invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', v ) );\n\t\t}\n\t}\n\treturn out;\n});\n\n/**\n* Applies a provided callback function to each element of the array, in order, passing in the return value from the calculation on the preceding element and returning the accumulated result upon completion.\n*\n* @name reduce\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {Function} reducer - callback function\n* @param {*} [initialValue] - initial value\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @throws {Error} if not provided an initial value, the array must have at least one element\n* @returns {*} accumulated result\n*\n* @example\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n* import caddf from '@stdlib/math-base-ops-caddf';\n*\n* var arr = new Complex64Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var z = arr.reduce( caddf );\n* // returns \n*\n* var re = realf( z );\n* // returns 6.0\n*\n* var im = imagf( z );\n* // returns 6.0\n*/\nsetReadOnly( Complex64Array.prototype, 'reduce', function reduce( reducer, initialValue ) {\n\tvar buf;\n\tvar acc;\n\tvar len;\n\tvar v;\n\tvar i;\n\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( reducer ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', reducer ) );\n\t}\n\tbuf = this._buffer;\n\tlen = this._length;\n\tif ( arguments.length > 1 ) {\n\t\tacc = initialValue;\n\t\ti = 0;\n\t} else {\n\t\tif ( len === 0 ) {\n\t\t\tthrow new Error( 'invalid operation. If not provided an initial value, an array must contain at least one element.' );\n\t\t}\n\t\tacc = getComplex64( buf, 0 );\n\t\ti = 1;\n\t}\n\tfor ( ; i < len; i++ ) {\n\t\tv = getComplex64( buf, i );\n\t\tacc = reducer( acc, v, i, this );\n\t}\n\treturn acc;\n});\n\n/**\n* Reverses an array in-place.\n*\n* @name reverse\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Complex64Array} reversed array\n*\n* @example\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* var arr = new Complex64Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var out = arr.reverse();\n* // returns \n*\n* var z = out.get( 0 );\n* // returns \n*\n* var re = realf( z );\n* // returns 3.0\n*\n* var im = imagf( z );\n* // returns 3.0\n*\n* z = out.get( 1 );\n* // returns \n*\n* re = realf( z );\n* // returns 2.0\n*\n* im = imagf( z );\n* // returns 2.0\n*\n* z = out.get( 2 );\n* // returns \n*\n* re = realf( z );\n* // returns 1.0\n*\n* im = imagf( z );\n* // returns 1.0\n*/\nsetReadOnly( Complex64Array.prototype, 'reverse', function reverse() {\n\tvar buf;\n\tvar tmp;\n\tvar len;\n\tvar N;\n\tvar i;\n\tvar j;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tlen = this._length;\n\tbuf = this._buffer;\n\tN = floor( len / 2 );\n\tfor ( i = 0; i < N; i++ ) {\n\t\tj = len - i - 1;\n\t\ttmp = buf[ (2*i) ];\n\t\tbuf[ (2*i) ] = buf[ (2*j) ];\n\t\tbuf[ (2*j) ] = tmp;\n\t\ttmp = buf[ (2*i)+1 ];\n\t\tbuf[ (2*i)+1 ] = buf[ (2*j)+1 ];\n\t\tbuf[ (2*j)+1 ] = tmp;\n\t}\n\treturn this;\n});\n\n/**\n* Sets an array element.\n*\n* ## Notes\n*\n* - When provided a typed array, real or complex, we must check whether the source array shares the same buffer as the target array and whether the underlying memory overlaps. In particular, we are concerned with the following scenario:\n*\n* ```text\n* buf: ---------------------\n* src: ---------------------\n* ```\n*\n* In the above, as we copy values from `src`, we will overwrite values in the `src` view, resulting in duplicated values copied into the end of `buf`, which is not intended. Hence, to avoid overwriting source values, we must **copy** source values to a temporary array.\n*\n* In the other overlapping scenario,\n*\n* ```text\n* buf: ---------------------\n* src: ---------------------\n* ```\n*\n* by the time we begin copying into the overlapping region, we are copying from the end of `src`, a non-overlapping region, which means we don't run the risk of copying copied values, rather than the original `src` values, as intended.\n*\n* @name set\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {(Collection|Complex|ComplexArray)} value - value(s)\n* @param {NonNegativeInteger} [i=0] - element index at which to start writing values\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be either a complex number, an array-like object, or a complex number array\n* @throws {TypeError} index argument must be a nonnegative integer\n* @throws {RangeError} array-like objects must have a length which is a multiple of two\n* @throws {RangeError} index argument is out-of-bounds\n* @throws {RangeError} target array lacks sufficient storage to accommodate source values\n* @returns {void}\n*\n* @example\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* var arr = new Complex64Array( 10 );\n*\n* var z = arr.get( 0 );\n* // returns \n*\n* var re = realf( z );\n* // returns 0.0\n*\n* var im = imagf( z );\n* // returns 0.0\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n*\n* z = arr.get( 0 );\n* // returns \n*\n* re = realf( z );\n* // returns 1.0\n*\n* im = imagf( z );\n* // returns -1.0\n*/\nsetReadOnly( Complex64Array.prototype, 'set', function set( value ) {\n\t/* eslint-disable no-underscore-dangle */\n\tvar sbuf;\n\tvar idx;\n\tvar buf;\n\tvar tmp;\n\tvar flg;\n\tvar N;\n\tvar v;\n\tvar i;\n\tvar j;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tbuf = this._buffer;\n\tif ( arguments.length > 1 ) {\n\t\tidx = arguments[ 1 ];\n\t\tif ( !isNonNegativeInteger( idx ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Index argument must be a nonnegative integer. Value: `%s`.', idx ) );\n\t\t}\n\t} else {\n\t\tidx = 0;\n\t}\n\tif ( isComplexLike( value ) ) {\n\t\tif ( idx >= this._length ) {\n\t\t\tthrow new RangeError( format( 'invalid argument. Index argument is out-of-bounds. Value: `%u`.', idx ) );\n\t\t}\n\t\tidx *= 2;\n\t\tbuf[ idx ] = realf( value );\n\t\tbuf[ idx+1 ] = imagf( value );\n\t\treturn;\n\t}\n\tif ( isComplexArray( value ) ) {\n\t\tN = value._length;\n\t\tif ( idx+N > this._length ) {\n\t\t\tthrow new RangeError( 'invalid arguments. Target array lacks sufficient storage to accommodate source values.' );\n\t\t}\n\t\tsbuf = value._buffer;\n\n\t\t// Check for overlapping memory...\n\t\tj = buf.byteOffset + (idx*BYTES_PER_ELEMENT);\n\t\tif (\n\t\t\tsbuf.buffer === buf.buffer &&\n\t\t\t(\n\t\t\t\tsbuf.byteOffset < j &&\n\t\t\t\tsbuf.byteOffset+sbuf.byteLength > j\n\t\t\t)\n\t\t) {\n\t\t\t// We need to copy source values...\n\t\t\ttmp = new Float32Array( sbuf.length );\n\t\t\tfor ( i = 0; i < sbuf.length; i++ ) {\n\t\t\t\ttmp[ i ] = sbuf[ i ];\n\t\t\t}\n\t\t\tsbuf = tmp;\n\t\t}\n\t\tidx *= 2;\n\t\tj = 0;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\tbuf[ idx ] = sbuf[ j ];\n\t\t\tbuf[ idx+1 ] = sbuf[ j+1 ];\n\t\t\tidx += 2; // stride\n\t\t\tj += 2; // stride\n\t\t}\n\t\treturn;\n\t}\n\tif ( isCollection( value ) ) {\n\t\t// Detect whether we've been provided an array of complex numbers...\n\t\tN = value.length;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\tif ( !isComplexLike( value[ i ] ) ) {\n\t\t\t\tflg = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t// If an array does not contain only complex numbers, then we assume interleaved real and imaginary components...\n\t\tif ( flg ) {\n\t\t\tif ( !isEven( N ) ) {\n\t\t\t\tthrow new RangeError( format( 'invalid argument. Array-like object arguments must have a length which is a multiple of two. Length: `%u`.', N ) );\n\t\t\t}\n\t\t\tif ( idx+(N/2) > this._length ) {\n\t\t\t\tthrow new RangeError( 'invalid arguments. Target array lacks sufficient storage to accommodate source values.' );\n\t\t\t}\n\t\t\tsbuf = value;\n\n\t\t\t// Check for overlapping memory...\n\t\t\tj = buf.byteOffset + (idx*BYTES_PER_ELEMENT);\n\t\t\tif (\n\t\t\t\tsbuf.buffer === buf.buffer &&\n\t\t\t\t(\n\t\t\t\t\tsbuf.byteOffset < j &&\n\t\t\t\t\tsbuf.byteOffset+sbuf.byteLength > j\n\t\t\t\t)\n\t\t\t) {\n\t\t\t\t// We need to copy source values...\n\t\t\t\ttmp = new Float32Array( N );\n\t\t\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\t\t\ttmp[ i ] = sbuf[ i ]; // TODO: handle accessor arrays\n\t\t\t\t}\n\t\t\t\tsbuf = tmp;\n\t\t\t}\n\t\t\tidx *= 2;\n\t\t\tN /= 2;\n\t\t\tj = 0;\n\t\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\t\tbuf[ idx ] = sbuf[ j ];\n\t\t\t\tbuf[ idx+1 ] = sbuf[ j+1 ];\n\t\t\t\tidx += 2; // stride\n\t\t\t\tj += 2; // stride\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\t// If an array contains only complex numbers, then we need to extract real and imaginary components...\n\t\tif ( idx+N > this._length ) {\n\t\t\tthrow new RangeError( 'invalid arguments. Target array lacks sufficient storage to accommodate source values.' );\n\t\t}\n\t\tidx *= 2;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\tv = value[ i ];\n\t\t\tbuf[ idx ] = realf( v );\n\t\t\tbuf[ idx+1 ] = imagf( v );\n\t\t\tidx += 2; // stride\n\t\t}\n\t\treturn;\n\t}\n\tthrow new TypeError( format( 'invalid argument. First argument must be either a complex number, an array-like object, or a complex number array. Value: `%s`.', value ) );\n\n\t/* eslint-enable no-underscore-dangle */\n});\n\n/**\n* Copies a portion of a typed array to a new typed array.\n*\n* @name slice\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {integer} [start=0] - starting index (inclusive)\n* @param {integer} [end] - ending index (exclusive)\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be an integer\n* @throws {TypeError} second argument must be an integer\n* @returns {Complex64Array} complex number array\n*\n* @example\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* var arr = new Complex64Array( 5 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n* arr.set( [ 4.0, -4.0 ], 3 );\n* arr.set( [ 5.0, -5.0 ], 4 );\n*\n* var out = arr.slice();\n* // returns \n*\n* var len = out.length;\n* // returns 5\n*\n* var z = out.get( 0 );\n* // returns \n*\n* var re = realf( z );\n* // returns 1.0\n*\n* var im = imagf( z );\n* // returns -1.0\n*\n* z = out.get( len-1 );\n* // returns \n*\n* re = realf( z );\n* // returns 5.0\n*\n* im = imagf( z );\n* // returns -5.0\n*\n* out = arr.slice( 1, -2 );\n* // returns \n*\n* len = out.length;\n* // returns 2\n*\n* z = out.get( 0 );\n* // returns \n*\n* re = realf( z );\n* // returns 2.0\n*\n* im = imagf( z );\n* // returns -2.0\n*\n* z = out.get( len-1 );\n* // returns \n*\n* re = realf( z );\n* // returns 3.0\n*\n* im = imagf( z );\n* // returns -3.0\n*/\nsetReadOnly( Complex64Array.prototype, 'slice', function slice( start, end ) {\n\tvar outlen;\n\tvar outbuf;\n\tvar out;\n\tvar idx;\n\tvar buf;\n\tvar len;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tbuf = this._buffer;\n\tlen = this._length;\n\tif ( arguments.length === 0 ) {\n\t\tstart = 0;\n\t\tend = len;\n\t} else {\n\t\tif ( !isInteger( start ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. First argument must be an integer. Value: `%s`.', start ) );\n\t\t}\n\t\tif ( start < 0 ) {\n\t\t\tstart += len;\n\t\t\tif ( start < 0 ) {\n\t\t\t\tstart = 0;\n\t\t\t}\n\t\t}\n\t\tif ( arguments.length === 1 ) {\n\t\t\tend = len;\n\t\t} else {\n\t\t\tif ( !isInteger( end ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be an integer. Value: `%s`.', end ) );\n\t\t\t}\n\t\t\tif ( end < 0 ) {\n\t\t\t\tend += len;\n\t\t\t\tif ( end < 0 ) {\n\t\t\t\t\tend = 0;\n\t\t\t\t}\n\t\t\t} else if ( end > len ) {\n\t\t\t\tend = len;\n\t\t\t}\n\t\t}\n\t}\n\tif ( start < end ) {\n\t\toutlen = end - start;\n\t} else {\n\t\toutlen = 0;\n\t}\n\tout = new this.constructor( outlen );\n\toutbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\tfor ( i = 0; i < outlen; i++ ) {\n\t\tidx = 2*(i+start);\n\t\toutbuf[ 2*i ] = buf[ idx ];\n\t\toutbuf[ (2*i)+1 ] = buf[ idx+1 ];\n\t}\n\treturn out;\n});\n\n/**\n* Tests whether at least one element in an array passes a test implemented by a predicate function.\n*\n* @name some\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {boolean} boolean indicating whether at least one element passes a test\n*\n* @example\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* function predicate( v ) {\n* return ( realf( v ) === imagf( v ) );\n* }\n*\n* var arr = new Complex64Array( 3 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n*\n* var bool = arr.some( predicate );\n* // returns true\n*/\nsetReadOnly( Complex64Array.prototype, 'some', function some( predicate, thisArg ) {\n\tvar buf;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tif ( predicate.call( thisArg, getComplex64( buf, i ), i, this ) ) {\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n});\n\n/**\n* Creates a new typed array view over the same underlying `ArrayBuffer` and with the same underlying data type as the host array.\n*\n* @name subarray\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {integer} [begin=0] - starting index (inclusive)\n* @param {integer} [end] - ending index (exclusive)\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be an integer\n* @throws {TypeError} second argument must be an integer\n* @returns {Complex64Array} subarray\n*\n* @example\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* var arr = new Complex64Array( 5 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n* arr.set( [ 4.0, -4.0 ], 3 );\n* arr.set( [ 5.0, -5.0 ], 4 );\n*\n* var subarr = arr.subarray();\n* // returns \n*\n* var len = subarr.length;\n* // returns 5\n*\n* var z = subarr.get( 0 );\n* // returns \n*\n* var re = realf( z );\n* // returns 1.0\n*\n* var im = imagf( z );\n* // returns -1.0\n*\n* z = subarr.get( len-1 );\n* // returns \n*\n* re = realf( z );\n* // returns 5.0\n*\n* im = imagf( z );\n* // returns -5.0\n*\n* subarr = arr.subarray( 1, -2 );\n* // returns \n*\n* len = subarr.length;\n* // returns 2\n*\n* z = subarr.get( 0 );\n* // returns \n*\n* re = realf( z );\n* // returns 2.0\n*\n* im = imagf( z );\n* // returns -2.0\n*\n* z = subarr.get( len-1 );\n* // returns \n*\n* re = realf( z );\n* // returns 3.0\n*\n* im = imagf( z );\n* // returns -3.0\n*/\nsetReadOnly( Complex64Array.prototype, 'subarray', function subarray( begin, end ) {\n\tvar offset;\n\tvar buf;\n\tvar len;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tbuf = this._buffer;\n\tlen = this._length;\n\tif ( arguments.length === 0 ) {\n\t\tbegin = 0;\n\t\tend = len;\n\t} else {\n\t\tif ( !isInteger( begin ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. First argument must be an integer. Value: `%s`.', begin ) );\n\t\t}\n\t\tif ( begin < 0 ) {\n\t\t\tbegin += len;\n\t\t\tif ( begin < 0 ) {\n\t\t\t\tbegin = 0;\n\t\t\t}\n\t\t}\n\t\tif ( arguments.length === 1 ) {\n\t\t\tend = len;\n\t\t} else {\n\t\t\tif ( !isInteger( end ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be an integer. Value: `%s`.', end ) );\n\t\t\t}\n\t\t\tif ( end < 0 ) {\n\t\t\t\tend += len;\n\t\t\t\tif ( end < 0 ) {\n\t\t\t\t\tend = 0;\n\t\t\t\t}\n\t\t\t} else if ( end > len ) {\n\t\t\t\tend = len;\n\t\t\t}\n\t\t}\n\t}\n\tif ( begin >= len ) {\n\t\tlen = 0;\n\t\toffset = buf.byteLength;\n\t} else if ( begin >= end ) {\n\t\tlen = 0;\n\t\toffset = buf.byteOffset + (begin*BYTES_PER_ELEMENT);\n\t} else {\n\t\tlen = end - begin;\n\t\toffset = buf.byteOffset + ( begin*BYTES_PER_ELEMENT );\n\t}\n\treturn new this.constructor( buf.buffer, offset, ( len < 0 ) ? 0 : len );\n});\n\n/**\n* Returns a new typed array containing the elements in reversed order.\n*\n* @name toReversed\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Complex64Array} reversed array\n*\n* @example\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* var arr = new Complex64Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var out = arr.toReversed();\n* // returns \n*\n* var z = out.get( 0 );\n* // returns \n*\n* var re = realf( z );\n* // returns 3.0\n*\n* var im = imagf( z );\n* // returns 3.0\n*\n* z = out.get( 1 );\n* // returns \n*\n* re = realf( z );\n* // returns 2.0\n*\n* im = imagf( z );\n* // returns 2.0\n*\n* z = out.get( 2 );\n* // returns \n*\n* re = realf( z );\n* // returns 1.0\n*\n* im = imagf( z );\n* // returns 1.0\n*/\nsetReadOnly( Complex64Array.prototype, 'toReversed', function toReversed() {\n\tvar outbuf;\n\tvar out;\n\tvar len;\n\tvar buf;\n\tvar i;\n\tvar j;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tlen = this._length;\n\tout = new this.constructor( len );\n\tbuf = this._buffer;\n\toutbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\tfor ( i = 0; i < len; i++ ) {\n\t\tj = len - i - 1;\n\t\toutbuf[ (2*i) ] = buf[ (2*j) ];\n\t\toutbuf[ (2*i)+1 ] = buf[ (2*j)+1 ];\n\t}\n\treturn out;\n});\n\n/**\n* Serializes an array as a string.\n*\n* @name toString\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @throws {TypeError} `this` must be a complex number array\n* @returns {string} string representation\n*\n* @example\n* var arr = new Complex64Array( 2 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n*\n* var str = arr.toString();\n* // returns '1 + 1i,2 + 2i'\n*/\nsetReadOnly( Complex64Array.prototype, 'toString', function toString() {\n\tvar out;\n\tvar buf;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tout = [];\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tout.push( getComplex64( buf, i ).toString() );\n\t}\n\treturn out.join( ',' );\n});\n\n/**\n* Returns a new typed array with the element at a provided index replaced with a provided value.\n*\n* @name with\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {integer} index - element index\n* @param {ComplexLike} value - new value\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be an integer\n* @throws {RangeError} index argument is out-of-bounds\n* @throws {TypeError} second argument must be a complex number\n* @returns {Complex64Array} new typed array\n*\n* @example\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n* import Complex64 from '@stdlib/complex-float32';\n*\n* var arr = new Complex64Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var out = arr.with( 0, new Complex64( 4.0, 4.0 ) );\n* // returns \n*\n* var z = out.get( 0 );\n* // returns \n*\n* var re = realf( z );\n* // returns 4.0\n*\n* var im = imagf( z );\n* // returns 4.0\n*/\nsetReadOnly( Complex64Array.prototype, 'with', function copyWith( index, value ) {\n\tvar buf;\n\tvar out;\n\tvar len;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isInteger( index ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be an integer. Value: `%s`.', index ) );\n\t}\n\tlen = this._length;\n\tif ( index < 0 ) {\n\t\tindex += len;\n\t}\n\tif ( index < 0 || index >= len ) {\n\t\tthrow new RangeError( format( 'invalid argument. Index argument is out-of-bounds. Value: `%s`.', index ) );\n\t}\n\tif ( !isComplexLike( value ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Second argument must be a complex number. Value: `%s`.', value ) );\n\t}\n\tout = new this.constructor( this._buffer );\n\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\tbuf[ 2*index ] = realf( value );\n\tbuf[ (2*index)+1 ] = imagf( value );\n\treturn out;\n});\n\n\n// EXPORTS //\n\nexport default Complex64Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport realf from '@stdlib/complex-realf';\nimport imagf from '@stdlib/complex-imagf';\n\n\n// MAIN //\n\n/**\n* Returns a strided array of real and imaginary components.\n*\n* @private\n* @param {Float32Array} buf - output array\n* @param {Array} arr - array containing complex numbers\n* @returns {(Float32Array|null)} output array or null\n*/\nfunction fromArray( buf, arr ) {\n\tvar len;\n\tvar v;\n\tvar i;\n\tvar j;\n\n\tlen = arr.length;\n\tj = 0;\n\tfor ( i = 0; i < len; i++ ) {\n\t\tv = arr[ i ];\n\t\tif ( !isComplexLike( v ) ) {\n\t\t\treturn null;\n\t\t}\n\t\tbuf[ j ] = realf( v );\n\t\tbuf[ j+1 ] = imagf( v );\n\t\tj += 2; // stride\n\t}\n\treturn buf;\n}\n\n\n// EXPORTS //\n\nexport default fromArray;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Returns the real component of a double-precision complex floating-point number.\n*\n* @param {Complex} z - complex number\n* @returns {number} real component\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n*\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var re = real( z );\n* // returns 5.0\n*/\nfunction real( z ) {\n\treturn z.re;\n}\n\n\n// EXPORTS //\n\nexport default real;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Returns the imaginary component of a double-precision complex floating-point number.\n*\n* @param {Complex} z - complex number\n* @returns {number} imaginary component\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n*\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var im = imag( z );\n* // returns 3.0\n*/\nfunction imag( z ) {\n\treturn z.im;\n}\n\n\n// EXPORTS //\n\nexport default imag;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isArrayLikeObject from '@stdlib/assert-is-array-like-object';\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport format from '@stdlib/string-format';\nimport real from '@stdlib/complex-real';\nimport imag from '@stdlib/complex-imag';\n\n\n// MAIN //\n\n/**\n* Returns an array of iterated values.\n*\n* @private\n* @param {Object} it - iterator\n* @returns {(Array|TypeError)} array or an error\n*/\nfunction fromIterator( it ) {\n\tvar out;\n\tvar v;\n\tvar z;\n\n\tout = [];\n\twhile ( true ) {\n\t\tv = it.next();\n\t\tif ( v.done ) {\n\t\t\tbreak;\n\t\t}\n\t\tz = v.value;\n\t\tif ( isArrayLikeObject( z ) && z.length >= 2 ) {\n\t\t\tout.push( z[ 0 ], z[ 1 ] );\n\t\t} else if ( isComplexLike( z ) ) {\n\t\t\tout.push( real( z ), imag( z ) );\n\t\t} else {\n\t\t\treturn new TypeError( format( 'invalid argument. An iterator must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', z ) );\n\t\t}\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default fromIterator;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isArrayLikeObject from '@stdlib/assert-is-array-like-object';\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport realf from '@stdlib/complex-realf';\nimport imagf from '@stdlib/complex-imagf';\nimport format from '@stdlib/string-format';\n\n\n// MAIN //\n\n/**\n* Returns an array of iterated values.\n*\n* @private\n* @param {Object} it - iterator\n* @param {Function} clbk - callback to invoke for each iterated value\n* @param {*} thisArg - invocation context\n* @returns {(Array|TypeError)} array or an error\n*/\nfunction fromIteratorMap( it, clbk, thisArg ) {\n\tvar out;\n\tvar v;\n\tvar z;\n\tvar i;\n\n\tout = [];\n\ti = -1;\n\twhile ( true ) {\n\t\tv = it.next();\n\t\tif ( v.done ) {\n\t\t\tbreak;\n\t\t}\n\t\ti += 1;\n\t\tz = clbk.call( thisArg, v.value, i );\n\t\tif ( isArrayLikeObject( z ) && z.length >= 2 ) {\n\t\t\tout.push( z[ 0 ], z[ 1 ] );\n\t\t} else if ( isComplexLike( z ) ) {\n\t\t\tout.push( realf( z ), imagf( z ) );\n\t\t} else {\n\t\t\treturn new TypeError( format( 'invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', z ) );\n\t\t}\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default fromIteratorMap;\n","/* eslint-disable no-restricted-syntax, max-lines, no-invalid-this */\n\n/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isNonNegativeInteger } from '@stdlib/assert-is-nonnegative-integer';\nimport isArrayLikeObject from '@stdlib/assert-is-array-like-object';\nimport isCollection from '@stdlib/assert-is-collection';\nimport isArrayBuffer from '@stdlib/assert-is-arraybuffer';\nimport isObject from '@stdlib/assert-is-object';\nimport isArray from '@stdlib/assert-is-array';\nimport isString from '@stdlib/assert-is-string';\nimport isFunction from '@stdlib/assert-is-function';\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport isEven from '@stdlib/math-base-assert-is-even';\nimport isInteger from '@stdlib/math-base-assert-is-integer';\nimport isComplex64Array from '@stdlib/array-base-assert-is-complex64array';\nimport isComplex128Array from '@stdlib/array-base-assert-is-complex128array';\nimport hasIteratorSymbolSupport from '@stdlib/assert-has-iterator-symbol-support';\nimport ITERATOR_SYMBOL from '@stdlib/symbol-iterator';\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport setReadOnlyAccessor from '@stdlib/utils-define-nonenumerable-read-only-accessor';\nimport Float64Array from '@stdlib/array-float64';\nimport Complex128 from '@stdlib/complex-float64';\nimport real from '@stdlib/complex-real';\nimport imag from '@stdlib/complex-imag';\nimport floor from '@stdlib/math-base-special-floor';\nimport reinterpret64 from '@stdlib/strided-base-reinterpret-complex64';\nimport reinterpret128 from '@stdlib/strided-base-reinterpret-complex128';\nimport getter from '@stdlib/array-base-getter';\nimport accessorGetter from '@stdlib/array-base-accessor-getter';\nimport format from '@stdlib/string-format';\nimport fromIterator from './from_iterator.js';\nimport fromIteratorMap from './from_iterator_map.js';\nimport fromArray from './from_array.js';\n\n\n// VARIABLES //\n\nvar BYTES_PER_ELEMENT = Float64Array.BYTES_PER_ELEMENT * 2;\nvar HAS_ITERATOR_SYMBOL = hasIteratorSymbolSupport();\n\n\n// FUNCTIONS //\n\n/**\n* Returns a boolean indicating if a value is a complex typed array.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a complex typed array\n*/\nfunction isComplexArray( value ) {\n\treturn (\n\t\tvalue instanceof Complex128Array ||\n\t\t(\n\t\t\ttypeof value === 'object' &&\n\t\t\tvalue !== null &&\n\t\t\t(\n\t\t\t\tvalue.constructor.name === 'Complex64Array' ||\n\t\t\t\tvalue.constructor.name === 'Complex128Array'\n\t\t\t) &&\n\t\t\ttypeof value._length === 'number' && // eslint-disable-line no-underscore-dangle\n\n\t\t\t// NOTE: we don't perform a more rigorous test here for a typed array for performance reasons, as robustly checking for a typed array instance could require walking the prototype tree and performing relatively expensive constructor checks...\n\t\t\ttypeof value._buffer === 'object' // eslint-disable-line no-underscore-dangle\n\t\t)\n\t);\n}\n\n/**\n* Returns a boolean indicating if a value is a complex typed array constructor.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a complex typed array constructor\n*/\nfunction isComplexArrayConstructor( value ) {\n\treturn (\n\t\tvalue === Complex128Array ||\n\n\t\t// NOTE: weaker test in order to avoid a circular dependency with Complex64Array...\n\t\tvalue.name === 'Complex64Array'\n\t);\n}\n\n/**\n* Retrieves a complex number from a complex number array buffer.\n*\n* @private\n* @param {Float64Array} buf - array buffer\n* @param {NonNegativeInteger} idx - element index\n* @returns {Complex128} complex number\n*/\nfunction getComplex128( buf, idx ) {\n\tidx *= 2;\n\treturn new Complex128( buf[ idx ], buf[ idx+1 ] );\n}\n\n\n// MAIN //\n\n/**\n* 128-bit complex number array constructor.\n*\n* @constructor\n* @param {(NonNegativeInteger|Collection|ArrayBuffer|Iterable)} [arg] - length, typed array, array-like object, buffer, or iterable\n* @param {NonNegativeInteger} [byteOffset=0] - byte offset\n* @param {NonNegativeInteger} [length] - view length\n* @throws {RangeError} ArrayBuffer byte length must be a multiple of `16`\n* @throws {RangeError} array-like object and typed array input arguments must have a length which is a multiple of two\n* @throws {TypeError} if provided only a single argument, must provide a valid argument\n* @throws {TypeError} byte offset must be a nonnegative integer\n* @throws {RangeError} byte offset must be a multiple of `16`\n* @throws {TypeError} view length must be a positive multiple of `16`\n* @throws {RangeError} must provide sufficient memory to accommodate byte offset and view length requirements\n* @throws {TypeError} an iterator must return either a two element array containing real and imaginary components or a complex number\n* @returns {Complex128Array} complex number array\n*\n* @example\n* var arr = new Complex128Array();\n* // returns \n*\n* var len = arr.length;\n* // returns 0\n*\n* @example\n* var arr = new Complex128Array( 2 );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*\n* @example\n* var arr = new Complex128Array( [ 1.0, -1.0 ] );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* import ArrayBuffer from '@stdlib/array-buffer';\n*\n* var buf = new ArrayBuffer( 32 );\n* var arr = new Complex128Array( buf );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*\n* @example\n* import ArrayBuffer from '@stdlib/array-buffer';\n*\n* var buf = new ArrayBuffer( 32 );\n* var arr = new Complex128Array( buf, 16 );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* import ArrayBuffer from '@stdlib/array-buffer';\n*\n* var buf = new ArrayBuffer( 64 );\n* var arr = new Complex128Array( buf, 16, 2 );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*/\nfunction Complex128Array() {\n\tvar byteOffset;\n\tvar nargs;\n\tvar buf;\n\tvar len;\n\n\tnargs = arguments.length;\n\tif ( !(this instanceof Complex128Array) ) {\n\t\tif ( nargs === 0 ) {\n\t\t\treturn new Complex128Array();\n\t\t}\n\t\tif ( nargs === 1 ) {\n\t\t\treturn new Complex128Array( arguments[0] );\n\t\t}\n\t\tif ( nargs === 2 ) {\n\t\t\treturn new Complex128Array( arguments[0], arguments[1] );\n\t\t}\n\t\treturn new Complex128Array( arguments[0], arguments[1], arguments[2] );\n\t}\n\t// Create the underlying data buffer...\n\tif ( nargs === 0 ) {\n\t\tbuf = new Float64Array( 0 ); // backward-compatibility\n\t} else if ( nargs === 1 ) {\n\t\tif ( isNonNegativeInteger( arguments[0] ) ) {\n\t\t\tbuf = new Float64Array( arguments[0]*2 );\n\t\t} else if ( isCollection( arguments[0] ) ) {\n\t\t\tbuf = arguments[ 0 ];\n\t\t\tlen = buf.length;\n\n\t\t\t// If provided a \"generic\" array, peak at the first value, and, if the value is a complex number, try to process as an array of complex numbers, falling back to \"normal\" typed array initialization if we fail and ensuring consistency if the first value had not been a complex number...\n\t\t\tif ( len && isArray( buf ) && isComplexLike( buf[0] ) ) {\n\t\t\t\tbuf = fromArray( new Float64Array( len*2 ), buf );\n\t\t\t\tif ( buf === null ) {\n\t\t\t\t\t// We failed and we are now forced to allocate a new array :-(\n\t\t\t\t\tif ( !isEven( len ) ) {\n\t\t\t\t\t\tthrow new RangeError( format( 'invalid argument. Array-like object arguments must have a length which is a multiple of two. Length: `%u`.', len ) );\n\t\t\t\t\t}\n\t\t\t\t\t// We failed, so fall back to directly setting values...\n\t\t\t\t\tbuf = new Float64Array( arguments[0] );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ( isComplex64Array( buf ) ) {\n\t\t\t\t\tbuf = reinterpret64( buf, 0 );\n\t\t\t\t} else if ( isComplex128Array( buf ) ) {\n\t\t\t\t\tbuf = reinterpret128( buf, 0 );\n\t\t\t\t} else if ( !isEven( len ) ) {\n\t\t\t\t\tthrow new RangeError( format( 'invalid argument. Array-like object and typed array arguments must have a length which is a multiple of two. Length: `%u`.', len ) );\n\t\t\t\t}\n\t\t\t\tbuf = new Float64Array( buf );\n\t\t\t}\n\t\t} else if ( isArrayBuffer( arguments[0] ) ) {\n\t\t\tbuf = arguments[ 0 ];\n\t\t\tif ( !isInteger( buf.byteLength/BYTES_PER_ELEMENT ) ) {\n\t\t\t\tthrow new RangeError( format( 'invalid argument. ArrayBuffer byte length must be a multiple of %u. Byte length: `%u`.', BYTES_PER_ELEMENT, buf.byteLength ) );\n\t\t\t}\n\t\t\tbuf = new Float64Array( buf );\n\t\t} else if ( isObject( arguments[0] ) ) {\n\t\t\tbuf = arguments[ 0 ];\n\t\t\tif ( HAS_ITERATOR_SYMBOL === false ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Environment lacks Symbol.iterator support. Must provide a length, ArrayBuffer, typed array, or array-like object. Value: `%s`.', buf ) );\n\t\t\t}\n\t\t\tif ( !isFunction( buf[ ITERATOR_SYMBOL ] ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.', buf ) );\n\t\t\t}\n\t\t\tbuf = buf[ ITERATOR_SYMBOL ]();\n\t\t\tif ( !isFunction( buf.next ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.', buf ) );\n\t\t\t}\n\t\t\tbuf = fromIterator( buf );\n\t\t\tif ( buf instanceof Error ) {\n\t\t\t\tthrow buf;\n\t\t\t}\n\t\t\tbuf = new Float64Array( buf );\n\t\t} else {\n\t\t\tthrow new TypeError( format( 'invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.', arguments[0] ) );\n\t\t}\n\t} else {\n\t\tbuf = arguments[ 0 ];\n\t\tif ( !isArrayBuffer( buf ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. First argument must be an ArrayBuffer. Value: `%s`.', buf ) );\n\t\t}\n\t\tbyteOffset = arguments[ 1 ];\n\t\tif ( !isNonNegativeInteger( byteOffset ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Byte offset must be a nonnegative integer. Value: `%s`.', byteOffset ) );\n\t\t}\n\t\tif ( !isInteger( byteOffset/BYTES_PER_ELEMENT ) ) {\n\t\t\tthrow new RangeError( format( 'invalid argument. Byte offset must be a multiple of %u. Value: `%u`.', BYTES_PER_ELEMENT, byteOffset ) );\n\t\t}\n\t\tif ( nargs === 2 ) {\n\t\t\tlen = buf.byteLength - byteOffset;\n\t\t\tif ( !isInteger( len/BYTES_PER_ELEMENT ) ) {\n\t\t\t\tthrow new RangeError( format( 'invalid arguments. ArrayBuffer view byte length must be a multiple of %u. View byte length: `%u`.', BYTES_PER_ELEMENT, len ) );\n\t\t\t}\n\t\t\tbuf = new Float64Array( buf, byteOffset );\n\t\t} else {\n\t\t\tlen = arguments[ 2 ];\n\t\t\tif ( !isNonNegativeInteger( len ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Length must be a nonnegative integer. Value: `%s`.', len ) );\n\t\t\t}\n\t\t\tif ( (len*BYTES_PER_ELEMENT) > (buf.byteLength-byteOffset) ) {\n\t\t\t\tthrow new RangeError( format( 'invalid arguments. ArrayBuffer has insufficient capacity. Either decrease the array length or provide a bigger buffer. Minimum capacity: `%u`.', len*BYTES_PER_ELEMENT ) );\n\t\t\t}\n\t\t\tbuf = new Float64Array( buf, byteOffset, len*2 );\n\t\t}\n\t}\n\tsetReadOnly( this, '_buffer', buf );\n\tsetReadOnly( this, '_length', buf.length/2 );\n\n\treturn this;\n}\n\n/**\n* Size (in bytes) of each array element.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex128Array\n* @readonly\n* @type {PositiveInteger}\n* @default 16\n*\n* @example\n* var nbytes = Complex128Array.BYTES_PER_ELEMENT;\n* // returns 16\n*/\nsetReadOnly( Complex128Array, 'BYTES_PER_ELEMENT', BYTES_PER_ELEMENT );\n\n/**\n* Constructor name.\n*\n* @name name\n* @memberof Complex128Array\n* @readonly\n* @type {string}\n* @default 'Complex128Array'\n*\n* @example\n* var name = Complex128Array.name;\n* // returns 'Complex128Array'\n*/\nsetReadOnly( Complex128Array, 'name', 'Complex128Array' );\n\n/**\n* Creates a new 128-bit complex number array from an array-like object or an iterable.\n*\n* @name from\n* @memberof Complex128Array\n* @type {Function}\n* @param {(Collection|Object)} src - array-like object or iterable\n* @param {Function} [clbk] - callback to invoke for each source element\n* @param {*} [thisArg] - context\n* @throws {TypeError} `this` context must be a constructor\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be an array-like object or an iterable\n* @throws {TypeError} second argument must be a function\n* @throws {RangeError} array-like objects must have a length which is a multiple of two\n* @throws {TypeError} an iterator must return either a two element array containing real and imaginary components or a complex number\n* @throws {TypeError} when provided an iterator, a callback must return either a two element array containing real and imaginary components or a complex number\n* @returns {Complex128Array} 128-bit complex number array\n*\n* @example\n* var arr = Complex128Array.from( [ 1.0, -1.0 ] );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n*\n* var arr = Complex128Array.from( [ new Complex128( 1.0, 1.0 ) ] );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* function clbk( v ) {\n* return new Complex128( real(v)*2.0, imag(v)*2.0 );\n* }\n*\n* var arr = Complex128Array.from( [ new Complex128( 1.0, 1.0 ) ], clbk );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*/\nsetReadOnly( Complex128Array, 'from', function from( src ) {\n\tvar thisArg;\n\tvar nargs;\n\tvar clbk;\n\tvar out;\n\tvar buf;\n\tvar tmp;\n\tvar get;\n\tvar len;\n\tvar flg;\n\tvar v;\n\tvar i;\n\tvar j;\n\tif ( !isFunction( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` context must be a constructor.' );\n\t}\n\tif ( !isComplexArrayConstructor( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tnargs = arguments.length;\n\tif ( nargs > 1 ) {\n\t\tclbk = arguments[ 1 ];\n\t\tif ( !isFunction( clbk ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be a function. Value: `%s`.', clbk ) );\n\t\t}\n\t\tif ( nargs > 2 ) {\n\t\t\tthisArg = arguments[ 2 ];\n\t\t}\n\t}\n\tif ( isComplexArray( src ) ) {\n\t\tlen = src.length;\n\t\tif ( clbk ) {\n\t\t\tout = new this( len );\n\t\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\t\tj = 0;\n\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\tv = clbk.call( thisArg, src.get( i ), i );\n\t\t\t\tif ( isComplexLike( v ) ) {\n\t\t\t\t\tbuf[ j ] = real( v );\n\t\t\t\t\tbuf[ j+1 ] = imag( v );\n\t\t\t\t} else if ( isArrayLikeObject( v ) && v.length >= 2 ) {\n\t\t\t\t\tbuf[ j ] = v[ 0 ];\n\t\t\t\t\tbuf[ j+1 ] = v[ 1 ];\n\t\t\t\t} else {\n\t\t\t\t\tthrow new TypeError( format( 'invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', v ) );\n\t\t\t\t}\n\t\t\t\tj += 2; // stride\n\t\t\t}\n\t\t\treturn out;\n\t\t}\n\t\treturn new this( src );\n\t}\n\tif ( isCollection( src ) ) {\n\t\tif ( clbk ) {\n\t\t\t// Note: array contents affect how we iterate over a provided data source. If only complex number objects, we can extract real and imaginary components. Otherwise, for non-complex number arrays (e.g., `Float64Array`, etc), we assume a strided array where real and imaginary components are interleaved. In the former case, we expect a callback to return real and imaginary components (possibly as a complex number). In the latter case, we expect a callback to return *either* a real or imaginary component.\n\n\t\t\tlen = src.length;\n\t\t\tif ( src.get && src.set ) {\n\t\t\t\tget = accessorGetter( 'default' );\n\t\t\t} else {\n\t\t\t\tget = getter( 'default' );\n\t\t\t}\n\t\t\t// Detect whether we've been provided an array which returns complex number objects...\n\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\tif ( !isComplexLike( get( src, i ) ) ) {\n\t\t\t\t\tflg = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// If an array does not contain only complex number objects, then we assume interleaved real and imaginary components...\n\t\t\tif ( flg ) {\n\t\t\t\tif ( !isEven( len ) ) {\n\t\t\t\t\tthrow new RangeError( format( 'invalid argument. First argument must have a length which is a multiple of two. Length: `%u`.', len ) );\n\t\t\t\t}\n\t\t\t\tout = new this( len/2 );\n\t\t\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\t\tbuf[ i ] = clbk.call( thisArg, get( src, i ), i );\n\t\t\t\t}\n\t\t\t\treturn out;\n\t\t\t}\n\t\t\t// If an array contains only complex number objects, then we need to extract real and imaginary components...\n\t\t\tout = new this( len );\n\t\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\t\tj = 0;\n\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\tv = clbk.call( thisArg, get( src, i ), i );\n\t\t\t\tif ( isComplexLike( v ) ) {\n\t\t\t\t\tbuf[ j ] = real( v );\n\t\t\t\t\tbuf[ j+1 ] = imag( v );\n\t\t\t\t} else if ( isArrayLikeObject( v ) && v.length >= 2 ) {\n\t\t\t\t\tbuf[ j ] = v[ 0 ];\n\t\t\t\t\tbuf[ j+1 ] = v[ 1 ];\n\t\t\t\t} else {\n\t\t\t\t\tthrow new TypeError( format( 'invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', v ) );\n\t\t\t\t}\n\t\t\t\tj += 2; // stride\n\t\t\t}\n\t\t\treturn out;\n\t\t}\n\t\treturn new this( src );\n\t}\n\tif ( isObject( src ) && HAS_ITERATOR_SYMBOL && isFunction( src[ ITERATOR_SYMBOL ] ) ) { // eslint-disable-line max-len\n\t\tbuf = src[ ITERATOR_SYMBOL ]();\n\t\tif ( !isFunction( buf.next ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.', src ) );\n\t\t}\n\t\tif ( clbk ) {\n\t\t\ttmp = fromIteratorMap( buf, clbk, thisArg );\n\t\t} else {\n\t\t\ttmp = fromIterator( buf );\n\t\t}\n\t\tif ( tmp instanceof Error ) {\n\t\t\tthrow tmp;\n\t\t}\n\t\tlen = tmp.length / 2;\n\t\tout = new this( len );\n\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\tbuf[ i ] = tmp[ i ];\n\t\t}\n\t\treturn out;\n\t}\n\tthrow new TypeError( format( 'invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.', src ) );\n});\n\n/**\n* Creates a new 128-bit complex number array from a variable number of arguments.\n*\n* @name of\n* @memberof Complex128Array\n* @type {Function}\n* @param {...*} element - array elements\n* @throws {TypeError} `this` context must be a constructor\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Complex128Array} 128-bit complex number array\n*\n* @example\n* var arr = Complex128Array.of( 1.0, 1.0, 1.0, 1.0 );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*/\nsetReadOnly( Complex128Array, 'of', function of() {\n\tvar args;\n\tvar i;\n\tif ( !isFunction( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` context must be a constructor.' );\n\t}\n\tif ( !isComplexArrayConstructor( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\targs = [];\n\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\targs.push( arguments[ i ] );\n\t}\n\treturn new this( args );\n});\n\n/**\n* Returns an array element with support for both nonnegative and negative integer indices.\n*\n* @name at\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {integer} idx - element index\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} must provide an integer\n* @returns {(Complex128|void)} array element\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* var arr = new Complex128Array( 10 );\n*\n* var z = arr.at( 0 );\n* // returns \n*\n* var re = real( z );\n* // returns 0.0\n*\n* var im = imag( z );\n* // returns 0.0\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 9.0, -9.0 ], 9 );\n*\n* z = arr.at( 0 );\n* // returns \n*\n* re = real( z );\n* // returns 1.0\n*\n* im = imag( z );\n* // returns -1.0\n*\n* z = arr.at( -1 );\n* // returns \n*\n* re = real( z );\n* // returns 9.0\n*\n* im = imag( z );\n* // returns -9.0\n*\n* z = arr.at( 100 );\n* // returns undefined\n*\n* z = arr.at( -100 );\n* // returns undefined\n*/\nsetReadOnly( Complex128Array.prototype, 'at', function at( idx ) {\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isInteger( idx ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Must provide an integer. Value: `%s`.', idx ) );\n\t}\n\tif ( idx < 0 ) {\n\t\tidx += this._length;\n\t}\n\tif ( idx < 0 || idx >= this._length ) {\n\t\treturn;\n\t}\n\treturn getComplex128( this._buffer, idx );\n});\n\n/**\n* Pointer to the underlying data buffer.\n*\n* @name buffer\n* @memberof Complex128Array.prototype\n* @readonly\n* @type {ArrayBuffer}\n*\n* @example\n* var arr = new Complex128Array( 10 );\n*\n* var buf = arr.buffer;\n* // returns \n*/\nsetReadOnlyAccessor( Complex128Array.prototype, 'buffer', function get() {\n\treturn this._buffer.buffer;\n});\n\n/**\n* Size (in bytes) of the array.\n*\n* @name byteLength\n* @memberof Complex128Array.prototype\n* @readonly\n* @type {NonNegativeInteger}\n*\n* @example\n* var arr = new Complex128Array( 10 );\n*\n* var byteLength = arr.byteLength;\n* // returns 160\n*/\nsetReadOnlyAccessor( Complex128Array.prototype, 'byteLength', function get() {\n\treturn this._buffer.byteLength;\n});\n\n/**\n* Offset (in bytes) of the array from the start of its underlying `ArrayBuffer`.\n*\n* @name byteOffset\n* @memberof Complex128Array.prototype\n* @readonly\n* @type {NonNegativeInteger}\n*\n* @example\n* var arr = new Complex128Array( 10 );\n*\n* var byteOffset = arr.byteOffset;\n* // returns 0\n*/\nsetReadOnlyAccessor( Complex128Array.prototype, 'byteOffset', function get() {\n\treturn this._buffer.byteOffset;\n});\n\n/**\n* Size (in bytes) of each array element.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex128Array.prototype\n* @readonly\n* @type {PositiveInteger}\n* @default 16\n*\n* @example\n* var arr = new Complex128Array( 10 );\n*\n* var nbytes = arr.BYTES_PER_ELEMENT;\n* // returns 16\n*/\nsetReadOnly( Complex128Array.prototype, 'BYTES_PER_ELEMENT', Complex128Array.BYTES_PER_ELEMENT );\n\n/**\n* Copies a sequence of elements within the array to the position starting at `target`.\n*\n* @name copyWithin\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {integer} target - index at which to start copying elements\n* @param {integer} start - source index at which to copy elements from\n* @param {integer} [end] - source index at which to stop copying elements from\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Complex128Array} modified array\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* var arr = new Complex128Array( 4 );\n*\n* // Set the array elements:\n* arr.set( new Complex128( 1.0, 1.0 ), 0 );\n* arr.set( new Complex128( 2.0, 2.0 ), 1 );\n* arr.set( new Complex128( 3.0, 3.0 ), 2 );\n* arr.set( new Complex128( 4.0, 4.0 ), 3 );\n*\n* // Copy the first two elements to the last two elements:\n* arr.copyWithin( 2, 0, 2 );\n*\n* // Get the last array element:\n* var z = arr.get( 3 );\n*\n* var re = real( z );\n* // returns 2.0\n*\n* var im = imag( z );\n* // returns 2.0\n*/\nsetReadOnly( Complex128Array.prototype, 'copyWithin', function copyWithin( target, start ) {\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\t// FIXME: prefer a functional `copyWithin` implementation which addresses lack of universal browser support (e.g., IE11 and Safari) or ensure that typed arrays are polyfilled\n\tif ( arguments.length === 2 ) {\n\t\tthis._buffer.copyWithin( target*2, start*2 );\n\t} else {\n\t\tthis._buffer.copyWithin( target*2, start*2, arguments[2]*2 );\n\t}\n\treturn this;\n});\n\n/**\n* Returns an iterator for iterating over array key-value pairs.\n*\n* @name entries\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Iterator} iterator\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n*\n* var arr = [\n* new Complex128( 1.0, 1.0 ),\n* new Complex128( 2.0, 2.0 ),\n* new Complex128( 3.0, 3.0 )\n* ];\n* arr = new Complex128Array( arr );\n*\n* // Create an iterator:\n* var it = arr.entries();\n*\n* // Iterate over the key-value pairs...\n* var v = it.next().value;\n* // returns [ 0, ]\n*\n* v = it.next().value;\n* // returns [ 1, ]\n*\n* v = it.next().value;\n* // returns [ 2, ]\n*\n* var bool = it.next().done;\n* // returns true\n*/\nsetReadOnly( Complex128Array.prototype, 'entries', function entries() {\n\tvar buffer;\n\tvar self;\n\tvar iter;\n\tvar len;\n\tvar FLG;\n\tvar i;\n\tvar j;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tself = this;\n\tbuffer = this._buffer;\n\tlen = this._length;\n\n\t// Initialize the iteration indices:\n\ti = -1;\n\tj = -2;\n\n\t// Create an iterator protocol-compliant object:\n\titer = {};\n\tsetReadOnly( iter, 'next', next );\n\tsetReadOnly( iter, 'return', end );\n\n\tif ( ITERATOR_SYMBOL ) {\n\t\tsetReadOnly( iter, ITERATOR_SYMBOL, factory );\n\t}\n\treturn iter;\n\n\t/**\n\t* Returns an iterator protocol-compliant object containing the next iterated value.\n\t*\n\t* @private\n\t* @returns {Object} iterator protocol-compliant object\n\t*/\n\tfunction next() {\n\t\tvar z;\n\t\ti += 1;\n\t\tif ( FLG || i >= len ) {\n\t\t\treturn {\n\t\t\t\t'done': true\n\t\t\t};\n\t\t}\n\t\tj += 2;\n\t\tz = new Complex128( buffer[ j ], buffer[ j+1 ] );\n\t\treturn {\n\t\t\t'value': [ i, z ],\n\t\t\t'done': false\n\t\t};\n\t}\n\n\t/**\n\t* Finishes an iterator.\n\t*\n\t* @private\n\t* @param {*} [value] - value to return\n\t* @returns {Object} iterator protocol-compliant object\n\t*/\n\tfunction end( value ) {\n\t\tFLG = true;\n\t\tif ( arguments.length ) {\n\t\t\treturn {\n\t\t\t\t'value': value,\n\t\t\t\t'done': true\n\t\t\t};\n\t\t}\n\t\treturn {\n\t\t\t'done': true\n\t\t};\n\t}\n\n\t/**\n\t* Returns a new iterator.\n\t*\n\t* @private\n\t* @returns {Iterator} iterator\n\t*/\n\tfunction factory() {\n\t\treturn self.entries();\n\t}\n});\n\n/**\n* Tests whether all elements in an array pass a test implemented by a predicate function.\n*\n* @name every\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {boolean} boolean indicating whether all elements pass a test\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* function predicate( v ) {\n* return ( real( v ) === imag( v ) );\n* }\n*\n* var arr = new Complex128Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var bool = arr.every( predicate );\n* // returns true\n*/\nsetReadOnly( Complex128Array.prototype, 'every', function every( predicate, thisArg ) {\n\tvar buf;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tif ( !predicate.call( thisArg, getComplex128( buf, i ), i, this ) ) {\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn true;\n});\n\n/**\n* Returns a modified typed array filled with a fill value.\n*\n* @name fill\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {ComplexLike} value - fill value\n* @param {integer} [start=0] - starting index (inclusive)\n* @param {integer} [end] - ending index (exclusive)\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a complex number\n* @throws {TypeError} second argument must be an integer\n* @throws {TypeError} third argument must be an integer\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* var arr = new Complex128Array( 3 );\n*\n* arr.fill( new Complex128( 1.0, 1.0 ), 1 );\n*\n* var z = arr.get( 1 );\n* // returns \n*\n* var re = real( z );\n* // returns 1.0\n*\n* var im = imag( z );\n* // returns 1.0\n*\n* z = arr.get( 1 );\n* // returns \n*\n* re = real( z );\n* // returns 1.0\n*\n* im = imag( z );\n* // returns 1.0\n*/\nsetReadOnly( Complex128Array.prototype, 'fill', function fill( value, start, end ) {\n\tvar buf;\n\tvar len;\n\tvar idx;\n\tvar re;\n\tvar im;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isComplexLike( value ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a complex number. Value: `%s`.', value ) );\n\t}\n\tbuf = this._buffer;\n\tlen = this._length;\n\tif ( arguments.length > 1 ) {\n\t\tif ( !isInteger( start ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be an integer. Value: `%s`.', start ) );\n\t\t}\n\t\tif ( start < 0 ) {\n\t\t\tstart += len;\n\t\t\tif ( start < 0 ) {\n\t\t\t\tstart = 0;\n\t\t\t}\n\t\t}\n\t\tif ( arguments.length > 2 ) {\n\t\t\tif ( !isInteger( end ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Third argument must be an integer. Value: `%s`.', end ) );\n\t\t\t}\n\t\t\tif ( end < 0 ) {\n\t\t\t\tend += len;\n\t\t\t\tif ( end < 0 ) {\n\t\t\t\t\tend = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( end > len ) {\n\t\t\t\tend = len;\n\t\t\t}\n\t\t} else {\n\t\t\tend = len;\n\t\t}\n\t} else {\n\t\tstart = 0;\n\t\tend = len;\n\t}\n\tre = real( value );\n\tim = imag( value );\n\tfor ( i = start; i < end; i++ ) {\n\t\tidx = 2*i;\n\t\tbuf[ idx ] = re;\n\t\tbuf[ idx+1 ] = im;\n\t}\n\treturn this;\n});\n\n/**\n* Returns a new array containing the elements of an array which pass a test implemented by a predicate function.\n*\n* @name filter\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {Complex128Array} complex number array\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* function predicate( v ) {\n* return ( real( v ) === imag( v ) );\n* }\n*\n* var arr = new Complex128Array( 3 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n*\n* var out = arr.filter( predicate );\n* // returns \n*\n* var len = out.length;\n* // returns 1\n*\n* var z = out.get( 0 );\n* // returns \n*\n* var re = real( z );\n* // returns 2.0\n*\n* var im = imag( z );\n* // returns 2.0\n*/\nsetReadOnly( Complex128Array.prototype, 'filter', function filter( predicate, thisArg ) {\n\tvar buf;\n\tvar out;\n\tvar i;\n\tvar z;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tout = [];\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tz = getComplex128( buf, i );\n\t\tif ( predicate.call( thisArg, z, i, this ) ) {\n\t\t\tout.push( z );\n\t\t}\n\t}\n\treturn new this.constructor( out );\n});\n\n/**\n* Returns the first element in an array for which a predicate function returns a truthy value.\n*\n* @name find\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {(Complex128|void)} array element or undefined\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* function predicate( v ) {\n* return ( real( v ) === imag( v ) );\n* }\n*\n* var arr = new Complex128Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var z = arr.find( predicate );\n* // returns \n*\n* var re = real( z );\n* // returns 1.0\n*\n* var im = imag( z );\n* // returns 1.0\n*/\nsetReadOnly( Complex128Array.prototype, 'find', function find( predicate, thisArg ) {\n\tvar buf;\n\tvar i;\n\tvar z;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tz = getComplex128( buf, i );\n\t\tif ( predicate.call( thisArg, z, i, this ) ) {\n\t\t\treturn z;\n\t\t}\n\t}\n});\n\n/**\n* Returns the index of the first element in an array for which a predicate function returns a truthy value.\n*\n* @name findIndex\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {integer} index or -1\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* function predicate( v ) {\n* return ( real( v ) === imag( v ) );\n* }\n*\n* var arr = new Complex128Array( 3 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var idx = arr.findIndex( predicate );\n* // returns 2\n*/\nsetReadOnly( Complex128Array.prototype, 'findIndex', function findIndex( predicate, thisArg ) {\n\tvar buf;\n\tvar i;\n\tvar z;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tz = getComplex128( buf, i );\n\t\tif ( predicate.call( thisArg, z, i, this ) ) {\n\t\t\treturn i;\n\t\t}\n\t}\n\treturn -1;\n});\n\n/**\n* Returns the last element in an array for which a predicate function returns a truthy value.\n*\n* @name findLast\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {(Complex128|void)} array element or undefined\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* function predicate( v ) {\n* return ( real( v ) === imag( v ) );\n* }\n*\n* var arr = new Complex128Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var z = arr.findLast( predicate );\n* // returns \n*\n* var re = real( z );\n* // returns 3.0\n*\n* var im = imag( z );\n* // returns 3.0\n*/\nsetReadOnly( Complex128Array.prototype, 'findLast', function findLast( predicate, thisArg ) {\n\tvar buf;\n\tvar i;\n\tvar z;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = this._length-1; i >= 0; i-- ) {\n\t\tz = getComplex128( buf, i );\n\t\tif ( predicate.call( thisArg, z, i, this ) ) {\n\t\t\treturn z;\n\t\t}\n\t}\n});\n\n/**\n* Returns the index of the last element in an array for which a predicate function returns a truthy value.\n*\n* @name findLastIndex\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {integer} index or -1\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* function predicate( v ) {\n* return ( real( v ) === imag( v ) );\n* }\n*\n* var arr = new Complex128Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n*\n* var idx = arr.findLastIndex( predicate );\n* // returns 1\n*/\nsetReadOnly( Complex128Array.prototype, 'findLastIndex', function findLastIndex( predicate, thisArg ) {\n\tvar buf;\n\tvar i;\n\tvar z;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = this._length-1; i >= 0; i-- ) {\n\t\tz = getComplex128( buf, i );\n\t\tif ( predicate.call( thisArg, z, i, this ) ) {\n\t\t\treturn i;\n\t\t}\n\t}\n\treturn -1;\n});\n\n/**\n* Invokes a function once for each array element.\n*\n* @name forEach\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {Function} fcn - function to invoke\n* @param {*} [thisArg] - function invocation context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n*\n* function log( v, i ) {\n* console.log( '%s: %s', i, v.toString() );\n* }\n*\n* var arr = new Complex128Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* arr.forEach( log );\n*/\nsetReadOnly( Complex128Array.prototype, 'forEach', function forEach( fcn, thisArg ) {\n\tvar buf;\n\tvar i;\n\tvar z;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( fcn ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', fcn ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tz = getComplex128( buf, i );\n\t\tfcn.call( thisArg, z, i, this );\n\t}\n});\n\n/**\n* Returns an array element.\n*\n* @name get\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {NonNegativeInteger} idx - element index\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} must provide a nonnegative integer\n* @returns {(Complex128|void)} array element\n*\n* @example\n* var arr = new Complex128Array( 10 );\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* var z = arr.get( 0 );\n* // returns \n*\n* var re = real( z );\n* // returns 0.0\n*\n* var im = imag( z );\n* // returns 0.0\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n*\n* z = arr.get( 0 );\n* // returns \n*\n* re = real( z );\n* // returns 1.0\n*\n* im = imag( z );\n* // returns -1.0\n*\n* z = arr.get( 100 );\n* // returns undefined\n*/\nsetReadOnly( Complex128Array.prototype, 'get', function get( idx ) {\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isNonNegativeInteger( idx ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Must provide a nonnegative integer. Value: `%s`.', idx ) );\n\t}\n\tif ( idx >= this._length ) {\n\t\treturn;\n\t}\n\treturn getComplex128( this._buffer, idx );\n});\n\n/**\n* Number of array elements.\n*\n* @name length\n* @memberof Complex128Array.prototype\n* @readonly\n* @type {NonNegativeInteger}\n*\n* @example\n* var arr = new Complex128Array( 10 );\n*\n* var len = arr.length;\n* // returns 10\n*/\nsetReadOnlyAccessor( Complex128Array.prototype, 'length', function get() {\n\treturn this._length;\n});\n\n/**\n* Returns a boolean indicating whether an array includes a provided value.\n*\n* @name includes\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {ComplexLike} searchElement - search element\n* @param {integer} [fromIndex=0] - starting index (inclusive)\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a complex number\n* @throws {TypeError} second argument must be an integer\n* @returns {boolean} boolean indicating whether an array includes a provided value\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n*\n* var arr = new Complex128Array( 5 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n* arr.set( [ 4.0, -4.0 ], 3 );\n* arr.set( [ 5.0, -5.0 ], 4 );\n*\n* var bool = arr.includes( new Complex128( 3.0, -3.0 ) );\n* // returns true\n*\n* bool = arr.includes( new Complex128( 3.0, -3.0 ), 3 );\n* // returns false\n*\n* bool = arr.includes( new Complex128( 4.0, -4.0 ), -3 );\n* // returns true\n*/\nsetReadOnly( Complex128Array.prototype, 'includes', function includes( searchElement, fromIndex ) {\n\tvar buf;\n\tvar idx;\n\tvar re;\n\tvar im;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isComplexLike( searchElement ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a complex number. Value: `%s`.', searchElement ) );\n\t}\n\tif ( arguments.length > 1 ) {\n\t\tif ( !isInteger( fromIndex ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be an integer. Value: `%s`.', fromIndex ) );\n\t\t}\n\t\tif ( fromIndex < 0 ) {\n\t\t\tfromIndex += this._length;\n\t\t\tif ( fromIndex < 0 ) {\n\t\t\t\tfromIndex = 0;\n\t\t\t}\n\t\t}\n\t} else {\n\t\tfromIndex = 0;\n\t}\n\tre = real( searchElement );\n\tim = imag( searchElement );\n\tbuf = this._buffer;\n\tfor ( i = fromIndex; i < this._length; i++ ) {\n\t\tidx = 2 * i;\n\t\tif ( re === buf[ idx ] && im === buf[ idx+1 ] ) {\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n});\n\n/**\n* Returns the first index at which a given element can be found.\n*\n* @name indexOf\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {ComplexLike} searchElement - element to find\n* @param {integer} [fromIndex=0] - starting index (inclusive)\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a complex number\n* @throws {TypeError} second argument must be an integer\n* @returns {integer} index or -1\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n*\n* var arr = new Complex128Array( 5 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n* arr.set( [ 4.0, -4.0 ], 3 );\n* arr.set( [ 5.0, -5.0 ], 4 );\n*\n* var idx = arr.indexOf( new Complex128( 3.0, -3.0 ) );\n* // returns 2\n*\n* idx = arr.indexOf( new Complex128( 3.0, -3.0 ), 3 );\n* // returns -1\n*\n* idx = arr.indexOf( new Complex128( 4.0, -4.0 ), -3 );\n* // returns 3\n*/\nsetReadOnly( Complex128Array.prototype, 'indexOf', function indexOf( searchElement, fromIndex ) {\n\tvar buf;\n\tvar idx;\n\tvar re;\n\tvar im;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isComplexLike( searchElement ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a complex number. Value: `%s`.', searchElement ) );\n\t}\n\tif ( arguments.length > 1 ) {\n\t\tif ( !isInteger( fromIndex ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be an integer. Value: `%s`.', fromIndex ) );\n\t\t}\n\t\tif ( fromIndex < 0 ) {\n\t\t\tfromIndex += this._length;\n\t\t\tif ( fromIndex < 0 ) {\n\t\t\t\tfromIndex = 0;\n\t\t\t}\n\t\t}\n\t} else {\n\t\tfromIndex = 0;\n\t}\n\tre = real( searchElement );\n\tim = imag( searchElement );\n\tbuf = this._buffer;\n\tfor ( i = fromIndex; i < this._length; i++ ) {\n\t\tidx = 2 * i;\n\t\tif ( re === buf[ idx ] && im === buf[ idx+1 ] ) {\n\t\t\treturn i;\n\t\t}\n\t}\n\treturn -1;\n});\n\n/**\n* Returns a new string by concatenating all array elements.\n*\n* @name join\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {string} [separator=','] - element separator\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a string\n* @returns {string} string representation\n*\n* @example\n* var arr = new Complex128Array( 2 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n*\n* var str = arr.join();\n* // returns '1 + 1i,2 + 2i'\n*\n* str = arr.join( '/' );\n* // returns '1 + 1i/2 + 2i'\n*/\nsetReadOnly( Complex128Array.prototype, 'join', function join( separator ) {\n\tvar out;\n\tvar buf;\n\tvar sep;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( arguments.length === 0 ) {\n\t\tsep = ',';\n\t} else if ( isString( separator ) ) {\n\t\tsep = separator;\n\t} else {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a string. Value: `%s`.', separator ) );\n\t}\n\tout = [];\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tout.push( getComplex128( buf, i ).toString() );\n\t}\n\treturn out.join( sep );\n});\n\n/**\n* Returns the last index at which a given element can be found.\n*\n* @name lastIndexOf\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {ComplexLike} searchElement - element to find\n* @param {integer} [fromIndex] - index at which to start searching backward (inclusive)\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a complex number\n* @throws {TypeError} second argument must be an integer\n* @returns {integer} index or -1\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n*\n* var arr = new Complex128Array( 5 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n* arr.set( [ 4.0, -4.0 ], 3 );\n* arr.set( [ 3.0, -3.0 ], 4 );\n*\n* var idx = arr.lastIndexOf( new Complex128( 3.0, -3.0 ) );\n* // returns 4\n*\n* idx = arr.lastIndexOf( new Complex128( 3.0, -3.0 ), 3 );\n* // returns 2\n*\n* idx = arr.lastIndexOf( new Complex128( 5.0, -5.0 ), 3 );\n* // returns -1\n*\n* idx = arr.lastIndexOf( new Complex128( 2.0, -2.0 ), -3 );\n* // returns 1\n*/\nsetReadOnly( Complex128Array.prototype, 'lastIndexOf', function lastIndexOf( searchElement, fromIndex ) {\n\tvar buf;\n\tvar idx;\n\tvar re;\n\tvar im;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isComplexLike( searchElement ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a complex number. Value: `%s`.', searchElement ) );\n\t}\n\tif ( arguments.length > 1 ) {\n\t\tif ( !isInteger( fromIndex ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be an integer. Value: `%s`.', fromIndex ) );\n\t\t}\n\t\tif ( fromIndex >= this._length ) {\n\t\t\tfromIndex = this._length - 1;\n\t\t} else if ( fromIndex < 0 ) {\n\t\t\tfromIndex += this._length;\n\t\t}\n\t} else {\n\t\tfromIndex = this._length - 1;\n\t}\n\tre = real( searchElement );\n\tim = imag( searchElement );\n\tbuf = this._buffer;\n\tfor ( i = fromIndex; i >= 0; i-- ) {\n\t\tidx = 2 * i;\n\t\tif ( re === buf[ idx ] && im === buf[ idx+1 ] ) {\n\t\t\treturn i;\n\t\t}\n\t}\n\treturn -1;\n});\n\n/**\n* Returns a new array with each element being the result of a provided callback function.\n*\n* @name map\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {Function} fcn - callback function\n* @param {*} [thisArg] - callback function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {Complex128Array} complex number array\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* function scale( v, i ) {\n* return new Complex128( 2.0*real( v ), 2.0*imag( v ) );\n* }\n*\n* var arr = new Complex128Array( 3 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n*\n* var out = arr.map( scale );\n* // returns \n*\n* var z = out.get( 0 );\n* // returns \n*\n* var re = real( z );\n* // returns 2.0\n*\n* var im = imag( z );\n* // returns -2.0\n*/\nsetReadOnly( Complex128Array.prototype, 'map', function map( fcn, thisArg ) {\n\tvar outbuf;\n\tvar buf;\n\tvar out;\n\tvar i;\n\tvar v;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( fcn ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', fcn ) );\n\t}\n\tbuf = this._buffer;\n\tout = new this.constructor( this._length );\n\toutbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tv = fcn.call( thisArg, getComplex128( buf, i ), i, this );\n\t\tif ( isComplexLike( v ) ) {\n\t\t\toutbuf[ 2*i ] = real( v );\n\t\t\toutbuf[ (2*i)+1 ] = imag( v );\n\t\t} else if ( isArrayLikeObject( v ) && v.length === 2 ) {\n\t\t\toutbuf[ 2*i ] = v[ 0 ];\n\t\t\toutbuf[ (2*i)+1 ] = v[ 1 ];\n\t\t} else {\n\t\t\tthrow new TypeError( format( 'invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', v ) );\n\t\t}\n\t}\n\treturn out;\n});\n\n/**\n* Applies a provided callback function to each element of the array, in order, passing in the return value from the calculation on the preceding element and returning the accumulated result upon completion.\n*\n* @name reduce\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {Function} reducer - callback function\n* @param {*} [initialValue] - initial value\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @throws {Error} if not provided an initial value, the array must have at least one element\n* @returns {*} accumulated result\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n* import cadd from '@stdlib/math-base-ops-cadd';\n*\n* var arr = new Complex128Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var z = arr.reduce( cadd );\n* // returns \n*\n* var re = real( z );\n* // returns 6.0\n*\n* var im = imag( z );\n* // returns 6.0\n*/\nsetReadOnly( Complex128Array.prototype, 'reduce', function reduce( reducer, initialValue ) {\n\tvar buf;\n\tvar acc;\n\tvar len;\n\tvar v;\n\tvar i;\n\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( reducer ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', reducer ) );\n\t}\n\tbuf = this._buffer;\n\tlen = this._length;\n\tif ( arguments.length > 1 ) {\n\t\tacc = initialValue;\n\t\ti = 0;\n\t} else {\n\t\tif ( len === 0 ) {\n\t\t\tthrow new Error( 'invalid operation. If not provided an initial value, an array must contain at least one element.' );\n\t\t}\n\t\tacc = getComplex128( buf, 0 );\n\t\ti = 1;\n\t}\n\tfor ( ; i < len; i++ ) {\n\t\tv = getComplex128( buf, i );\n\t\tacc = reducer( acc, v, i, this );\n\t}\n\treturn acc;\n});\n\n/**\n* Reverses an array in-place.\n*\n* @name reverse\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Complex128Array} reversed array\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* var arr = new Complex128Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var out = arr.reverse();\n* // returns \n*\n* var z = out.get( 0 );\n* // returns \n*\n* var re = real( z );\n* // returns 3.0\n*\n* var im = imag( z );\n* // returns 3.0\n*\n* z = out.get( 1 );\n* // returns \n*\n* re = real( z );\n* // returns 2.0\n*\n* im = imag( z );\n* // returns 2.0\n*\n* z = out.get( 2 );\n* // returns \n*\n* re = real( z );\n* // returns 1.0\n*\n* im = imag( z );\n* // returns 1.0\n*/\nsetReadOnly( Complex128Array.prototype, 'reverse', function reverse() {\n\tvar buf;\n\tvar tmp;\n\tvar len;\n\tvar N;\n\tvar i;\n\tvar j;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tlen = this._length;\n\tbuf = this._buffer;\n\tN = floor( len / 2 );\n\tfor ( i = 0; i < N; i++ ) {\n\t\tj = len - i - 1;\n\t\ttmp = buf[ (2*i) ];\n\t\tbuf[ (2*i) ] = buf[ (2*j) ];\n\t\tbuf[ (2*j) ] = tmp;\n\t\ttmp = buf[ (2*i)+1 ];\n\t\tbuf[ (2*i)+1 ] = buf[ (2*j)+1 ];\n\t\tbuf[ (2*j)+1 ] = tmp;\n\t}\n\treturn this;\n});\n\n/**\n* Sets an array element.\n*\n* ## Notes\n*\n* - When provided a typed array, real or complex, we must check whether the source array shares the same buffer as the target array and whether the underlying memory overlaps. In particular, we are concerned with the following scenario:\n*\n* ```text\n* buf: ---------------------\n* src: ---------------------\n* ```\n*\n* In the above, as we copy values from `src`, we will overwrite values in the `src` view, resulting in duplicated values copied into the end of `buf`, which is not intended. Hence, to avoid overwriting source values, we must **copy** source values to a temporary array.\n*\n* In the other overlapping scenario,\n*\n* ```text\n* buf: ---------------------\n* src: ---------------------\n* ```\n*\n* by the time we begin copying into the overlapping region, we are copying from the end of `src`, a non-overlapping region, which means we don't run the risk of copying copied values, rather than the original `src` values as intended.\n*\n* @name set\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {(Collection|Complex|ComplexArray)} value - value(s)\n* @param {NonNegativeInteger} [i=0] - element index at which to start writing values\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be either a complex number, an array-like object, or a complex number array\n* @throws {TypeError} index argument must be a nonnegative integer\n* @throws {RangeError} array-like objects must have a length which is a multiple of two\n* @throws {RangeError} index argument is out-of-bounds\n* @throws {RangeError} target array lacks sufficient storage to accommodate source values\n* @returns {void}\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* var arr = new Complex128Array( 10 );\n*\n* var z = arr.get( 0 );\n* // returns \n*\n* var re = real( z );\n* // returns 0.0\n*\n* var im = imag( z );\n* // returns 0.0\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n*\n* z = arr.get( 0 );\n* // returns \n*\n* re = real( z );\n* // returns 1.0\n*\n* im = imag( z );\n* // returns -1.0\n*/\nsetReadOnly( Complex128Array.prototype, 'set', function set( value ) {\n\t/* eslint-disable no-underscore-dangle */\n\tvar sbuf;\n\tvar idx;\n\tvar buf;\n\tvar tmp;\n\tvar flg;\n\tvar N;\n\tvar v;\n\tvar i;\n\tvar j;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tbuf = this._buffer;\n\tif ( arguments.length > 1 ) {\n\t\tidx = arguments[ 1 ];\n\t\tif ( !isNonNegativeInteger( idx ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Index argument must be a nonnegative integer. Value: `%s`.', idx ) );\n\t\t}\n\t} else {\n\t\tidx = 0;\n\t}\n\tif ( isComplexLike( value ) ) {\n\t\tif ( idx >= this._length ) {\n\t\t\tthrow new RangeError( format( 'invalid argument. Index argument is out-of-bounds. Value: `%u`.', idx ) );\n\t\t}\n\t\tidx *= 2;\n\t\tbuf[ idx ] = real( value );\n\t\tbuf[ idx+1 ] = imag( value );\n\t\treturn;\n\t}\n\tif ( isComplexArray( value ) ) {\n\t\tN = value._length;\n\t\tif ( idx+N > this._length ) {\n\t\t\tthrow new RangeError( 'invalid arguments. Target array lacks sufficient storage to accommodate source values.' );\n\t\t}\n\t\tsbuf = value._buffer;\n\n\t\t// Check for overlapping memory...\n\t\tj = buf.byteOffset + (idx*BYTES_PER_ELEMENT);\n\t\tif (\n\t\t\tsbuf.buffer === buf.buffer &&\n\t\t\t(\n\t\t\t\tsbuf.byteOffset < j &&\n\t\t\t\tsbuf.byteOffset+sbuf.byteLength > j\n\t\t\t)\n\t\t) {\n\t\t\t// We need to copy source values...\n\t\t\ttmp = new Float64Array( sbuf.length );\n\t\t\tfor ( i = 0; i < sbuf.length; i++ ) {\n\t\t\t\ttmp[ i ] = sbuf[ i ];\n\t\t\t}\n\t\t\tsbuf = tmp;\n\t\t}\n\t\tidx *= 2;\n\t\tj = 0;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\tbuf[ idx ] = sbuf[ j ];\n\t\t\tbuf[ idx+1 ] = sbuf[ j+1 ];\n\t\t\tidx += 2; // stride\n\t\t\tj += 2; // stride\n\t\t}\n\t\treturn;\n\t}\n\tif ( isCollection( value ) ) {\n\t\t// Detect whether we've been provided an array of complex numbers...\n\t\tN = value.length;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\tif ( !isComplexLike( value[ i ] ) ) {\n\t\t\t\tflg = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t// If an array does not contain only complex numbers, then we assume interleaved real and imaginary components...\n\t\tif ( flg ) {\n\t\t\tif ( !isEven( N ) ) {\n\t\t\t\tthrow new RangeError( format( 'invalid argument. Array-like object arguments must have a length which is a multiple of two. Length: `%u`.', N ) );\n\t\t\t}\n\t\t\tif ( idx+(N/2) > this._length ) {\n\t\t\t\tthrow new RangeError( 'invalid arguments. Target array lacks sufficient storage to accommodate source values.' );\n\t\t\t}\n\t\t\tsbuf = value;\n\n\t\t\t// Check for overlapping memory...\n\t\t\tj = buf.byteOffset + (idx*BYTES_PER_ELEMENT);\n\t\t\tif (\n\t\t\t\tsbuf.buffer === buf.buffer &&\n\t\t\t\t(\n\t\t\t\t\tsbuf.byteOffset < j &&\n\t\t\t\t\tsbuf.byteOffset+sbuf.byteLength > j\n\t\t\t\t)\n\t\t\t) {\n\t\t\t\t// We need to copy source values...\n\t\t\t\ttmp = new Float64Array( N );\n\t\t\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\t\t\ttmp[ i ] = sbuf[ i ];\n\t\t\t\t}\n\t\t\t\tsbuf = tmp;\n\t\t\t}\n\t\t\tidx *= 2;\n\t\t\tN /= 2;\n\t\t\tj = 0;\n\t\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\t\tbuf[ idx ] = sbuf[ j ];\n\t\t\t\tbuf[ idx+1 ] = sbuf[ j+1 ];\n\t\t\t\tidx += 2; // stride\n\t\t\t\tj += 2; // stride\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\t// If an array contains only complex numbers, then we need to extract real and imaginary components...\n\t\tif ( idx+N > this._length ) {\n\t\t\tthrow new RangeError( 'invalid arguments. Target array lacks sufficient storage to accommodate source values.' );\n\t\t}\n\t\tidx *= 2;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\tv = value[ i ];\n\t\t\tbuf[ idx ] = real( v );\n\t\t\tbuf[ idx+1 ] = imag( v );\n\t\t\tidx += 2; // stride\n\t\t}\n\t\treturn;\n\t}\n\tthrow new TypeError( format( 'invalid argument. First argument must be either a complex number, an array-like object, or a complex number array. Value: `%s`.', value ) );\n\n\t/* eslint-enable no-underscore-dangle */\n});\n\n/**\n* Copies a portion of a typed array to a new typed array.\n*\n* @name slice\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {integer} [start=0] - starting index (inclusive)\n* @param {integer} [end] - ending index (exclusive)\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be an integer\n* @throws {TypeError} second argument must be an integer\n* @returns {Complex128Array} complex number array\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* var arr = new Complex128Array( 5 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n* arr.set( [ 4.0, -4.0 ], 3 );\n* arr.set( [ 5.0, -5.0 ], 4 );\n*\n* var out = arr.slice();\n* // returns \n*\n* var len = out.length;\n* // returns 5\n*\n* var z = out.get( 0 );\n* // returns \n*\n* var re = real( z );\n* // returns 1.0\n*\n* var im = imag( z );\n* // returns -1.0\n*\n* z = out.get( len-1 );\n* // returns \n*\n* re = real( z );\n* // returns 5.0\n*\n* im = imag( z );\n* // returns -5.0\n*\n* out = arr.slice( 1, -2 );\n* // returns \n*\n* len = out.length;\n* // returns 2\n*\n* z = out.get( 0 );\n* // returns \n*\n* re = real( z );\n* // returns 2.0\n*\n* im = imag( z );\n* // returns -2.0\n*\n* z = out.get( len-1 );\n* // returns \n*\n* re = real( z );\n* // returns 3.0\n*\n* im = imag( z );\n* // returns -3.0\n*/\nsetReadOnly( Complex128Array.prototype, 'slice', function slice( start, end ) {\n\tvar outlen;\n\tvar outbuf;\n\tvar out;\n\tvar idx;\n\tvar buf;\n\tvar len;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tbuf = this._buffer;\n\tlen = this._length;\n\tif ( arguments.length === 0 ) {\n\t\tstart = 0;\n\t\tend = len;\n\t} else {\n\t\tif ( !isInteger( start ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. First argument must be an integer. Value: `%s`.', start ) );\n\t\t}\n\t\tif ( start < 0 ) {\n\t\t\tstart += len;\n\t\t\tif ( start < 0 ) {\n\t\t\t\tstart = 0;\n\t\t\t}\n\t\t}\n\t\tif ( arguments.length === 1 ) {\n\t\t\tend = len;\n\t\t} else {\n\t\t\tif ( !isInteger( end ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be an integer. Value: `%s`.', end ) );\n\t\t\t}\n\t\t\tif ( end < 0 ) {\n\t\t\t\tend += len;\n\t\t\t\tif ( end < 0 ) {\n\t\t\t\t\tend = 0;\n\t\t\t\t}\n\t\t\t} else if ( end > len ) {\n\t\t\t\tend = len;\n\t\t\t}\n\t\t}\n\t}\n\tif ( start < end ) {\n\t\toutlen = end - start;\n\t} else {\n\t\toutlen = 0;\n\t}\n\tout = new this.constructor( outlen );\n\toutbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\tfor ( i = 0; i < outlen; i++ ) {\n\t\tidx = 2*(i+start);\n\t\toutbuf[ 2*i ] = buf[ idx ];\n\t\toutbuf[ (2*i)+1 ] = buf[ idx+1 ];\n\t}\n\treturn out;\n});\n\n/**\n* Tests whether at least one element in an array passes a test implemented by a predicate function.\n*\n* @name some\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {boolean} boolean indicating whether at least one element passes a test\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* function predicate( v ) {\n* return ( real( v ) === imag( v ) );\n* }\n*\n* var arr = new Complex128Array( 3 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n*\n* var bool = arr.some( predicate );\n* // returns true\n*/\nsetReadOnly( Complex128Array.prototype, 'some', function some( predicate, thisArg ) {\n\tvar buf;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tif ( predicate.call( thisArg, getComplex128( buf, i ), i, this ) ) {\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n});\n\n/**\n* Creates a new typed array view over the same underlying `ArrayBuffer` and with the same underlying data type as the host array.\n*\n* @name subarray\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {integer} [begin=0] - starting index (inclusive)\n* @param {integer} [end] - ending index (exclusive)\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be an integer\n* @throws {TypeError} second argument must be an integer\n* @returns {Complex64Array} subarray\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* var arr = new Complex128Array( 5 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n* arr.set( [ 4.0, -4.0 ], 3 );\n* arr.set( [ 5.0, -5.0 ], 4 );\n*\n* var subarr = arr.subarray();\n* // returns \n*\n* var len = subarr.length;\n* // returns 5\n*\n* var z = subarr.get( 0 );\n* // returns \n*\n* var re = real( z );\n* // returns 1.0\n*\n* var im = imag( z );\n* // returns -1.0\n*\n* z = subarr.get( len-1 );\n* // returns \n*\n* re = real( z );\n* // returns 5.0\n*\n* im = imag( z );\n* // returns -5.0\n*\n* subarr = arr.subarray( 1, -2 );\n* // returns \n*\n* len = subarr.length;\n* // returns 2\n*\n* z = subarr.get( 0 );\n* // returns \n*\n* re = real( z );\n* // returns 2.0\n*\n* im = imag( z );\n* // returns -2.0\n*\n* z = subarr.get( len-1 );\n* // returns \n*\n* re = real( z );\n* // returns 3.0\n*\n* im = imag( z );\n* // returns -3.0\n*/\nsetReadOnly( Complex128Array.prototype, 'subarray', function subarray( begin, end ) {\n\tvar offset;\n\tvar buf;\n\tvar len;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tbuf = this._buffer;\n\tlen = this._length;\n\tif ( arguments.length === 0 ) {\n\t\tbegin = 0;\n\t\tend = len;\n\t} else {\n\t\tif ( !isInteger( begin ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. First argument must be an integer. Value: `%s`.', begin ) );\n\t\t}\n\t\tif ( begin < 0 ) {\n\t\t\tbegin += len;\n\t\t\tif ( begin < 0 ) {\n\t\t\t\tbegin = 0;\n\t\t\t}\n\t\t}\n\t\tif ( arguments.length === 1 ) {\n\t\t\tend = len;\n\t\t} else {\n\t\t\tif ( !isInteger( end ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be an integer. Value: `%s`.', end ) );\n\t\t\t}\n\t\t\tif ( end < 0 ) {\n\t\t\t\tend += len;\n\t\t\t\tif ( end < 0 ) {\n\t\t\t\t\tend = 0;\n\t\t\t\t}\n\t\t\t} else if ( end > len ) {\n\t\t\t\tend = len;\n\t\t\t}\n\t\t}\n\t}\n\tif ( begin >= len ) {\n\t\tlen = 0;\n\t\toffset = buf.byteLength;\n\t} else if ( begin >= end ) {\n\t\tlen = 0;\n\t\toffset = buf.byteOffset + ( begin*BYTES_PER_ELEMENT );\n\t} else {\n\t\tlen = end - begin;\n\t\toffset = buf.byteOffset + ( begin*BYTES_PER_ELEMENT );\n\t}\n\treturn new this.constructor( buf.buffer, offset, ( len < 0 ) ? 0 : len );\n});\n\n/**\n* Returns a new typed array containing the elements in reversed order.\n*\n* @name toReversed\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Complex128Array} reversed array\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* var arr = new Complex128Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var out = arr.toReversed();\n* // returns \n*\n* var z = out.get( 0 );\n* // returns \n*\n* var re = real( z );\n* // returns 3.0\n*\n* var im = imag( z );\n* // returns 3.0\n*\n* z = out.get( 1 );\n* // returns \n*\n* re = real( z );\n* // returns 2.0\n*\n* im = imag( z );\n* // returns 2.0\n*\n* z = out.get( 2 );\n* // returns \n*\n* re = real( z );\n* // returns 1.0\n*\n* im = imag( z );\n* // returns 1.0\n*/\nsetReadOnly( Complex128Array.prototype, 'toReversed', function toReversed() {\n\tvar outbuf;\n\tvar out;\n\tvar len;\n\tvar buf;\n\tvar i;\n\tvar j;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tlen = this._length;\n\tout = new this.constructor( len );\n\tbuf = this._buffer;\n\toutbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\tfor ( i = 0; i < len; i++ ) {\n\t\tj = len - i - 1;\n\t\toutbuf[ (2*i) ] = buf[ (2*j) ];\n\t\toutbuf[ (2*i)+1 ] = buf[ (2*j)+1 ];\n\t}\n\treturn out;\n});\n\n/**\n* Serializes an array as a string.\n*\n* @name toString\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @throws {TypeError} `this` must be a complex number array\n* @returns {string} string representation\n*\n* @example\n* var arr = new Complex128Array( 2 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n*\n* var str = arr.toString();\n* // returns '1 + 1i,2 + 2i'\n*/\nsetReadOnly( Complex128Array.prototype, 'toString', function toString() {\n\tvar out;\n\tvar buf;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tout = [];\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tout.push( getComplex128( buf, i ).toString() );\n\t}\n\treturn out.join( ',' );\n});\n\n/**\n* Returns a new typed array with the element at a provided index replaced with a provided value.\n*\n* @name with\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {integer} index - element index\n* @param {ComplexLike} value - new value\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be an integer\n* @throws {RangeError} index argument is out-of-bounds\n* @throws {TypeError} second argument must be a complex number\n* @returns {Complex128Array} new typed array\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n* import Complex128 from '@stdlib/complex-float64';\n*\n* var arr = new Complex128Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var out = arr.with( 0, new Complex128( 4.0, 4.0 ) );\n* // returns \n*\n* var z = out.get( 0 );\n* // returns \n*\n* var re = real( z );\n* // returns 4.0\n*\n* var im = imag( z );\n* // returns 4.0\n*/\nsetReadOnly( Complex128Array.prototype, 'with', function copyWith( index, value ) {\n\tvar buf;\n\tvar out;\n\tvar len;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isInteger( index ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be an integer. Value: `%s`.', index ) );\n\t}\n\tlen = this._length;\n\tif ( index < 0 ) {\n\t\tindex += len;\n\t}\n\tif ( index < 0 || index >= len ) {\n\t\tthrow new RangeError( format( 'invalid argument. Index argument is out-of-bounds. Value: `%s`.', index ) );\n\t}\n\tif ( !isComplexLike( value ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Second argument must be a complex number. Value: `%s`.', value ) );\n\t}\n\tout = new this.constructor( this._buffer );\n\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\tbuf[ 2*index ] = real( value );\n\tbuf[ (2*index)+1 ] = imag( value );\n\treturn out;\n});\n\n\n// EXPORTS //\n\nexport default Complex128Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport real from '@stdlib/complex-real';\nimport imag from '@stdlib/complex-imag';\n\n\n// MAIN //\n\n/**\n* Returns a strided array of real and imaginary components.\n*\n* @private\n* @param {Float64Array} buf - output array\n* @param {Array} arr - array containing complex numbers\n* @returns {(Float64Array|null)} output array or null\n*/\nfunction fromArray( buf, arr ) {\n\tvar len;\n\tvar v;\n\tvar i;\n\tvar j;\n\n\tlen = arr.length;\n\tj = 0;\n\tfor ( i = 0; i < len; i++ ) {\n\t\tv = arr[ i ];\n\t\tif ( !isComplexLike( v ) ) {\n\t\t\treturn null;\n\t\t}\n\t\tbuf[ j ] = real( v );\n\t\tbuf[ j+1 ] = imag( v );\n\t\tj += 2; // stride\n\t}\n\treturn buf;\n}\n\n\n// EXPORTS //\n\nexport default fromArray;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isArrayLikeObject from '@stdlib/assert-is-array-like-object';\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport format from '@stdlib/string-format';\nimport real from '@stdlib/complex-real';\nimport imag from '@stdlib/complex-imag';\n\n\n// MAIN //\n\n/**\n* Returns an array of iterated values.\n*\n* @private\n* @param {Object} it - iterator\n* @param {Function} clbk - callback to invoke for each iterated value\n* @param {*} thisArg - invocation context\n* @returns {(Array|TypeError)} array or an error\n*/\nfunction fromIteratorMap( it, clbk, thisArg ) {\n\tvar out;\n\tvar v;\n\tvar z;\n\tvar i;\n\n\tout = [];\n\ti = -1;\n\twhile ( true ) {\n\t\tv = it.next();\n\t\tif ( v.done ) {\n\t\t\tbreak;\n\t\t}\n\t\ti += 1;\n\t\tz = clbk.call( thisArg, v.value, i );\n\t\tif ( isArrayLikeObject( z ) && z.length >= 2 ) {\n\t\t\tout.push( z[ 0 ], z[ 1 ] );\n\t\t} else if ( isComplexLike( z ) ) {\n\t\t\tout.push( real( z ), imag( z ) );\n\t\t} else {\n\t\t\treturn new TypeError( format( 'invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', z ) );\n\t\t}\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default fromIteratorMap;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport Float64Array from '@stdlib/array-float64';\nimport Float32Array from '@stdlib/array-float32';\nimport Int16Array from '@stdlib/array-int16';\nimport Int32Array from '@stdlib/array-int32';\nimport Int8Array from '@stdlib/array-int8';\nimport Uint16Array from '@stdlib/array-uint16';\nimport Uint32Array from '@stdlib/array-uint32';\nimport Uint8Array from '@stdlib/array-uint8';\nimport Uint8ClampedArray from '@stdlib/array-uint8c';\nimport Complex64Array from '@stdlib/array-complex64';\nimport Complex128Array from '@stdlib/array-complex128';\n\n\n// MAIN //\n\n// Mapping from data types to constructors...\nvar ctors = {\n\t'float64': Float64Array,\n\t'float32': Float32Array,\n\t'generic': Array, // TODO: replace with `stdlib` pkg\n\t'int16': Int16Array,\n\t'int32': Int32Array,\n\t'int8': Int8Array,\n\t'uint16': Uint16Array,\n\t'uint32': Uint32Array,\n\t'uint8': Uint8Array,\n\t'uint8c': Uint8ClampedArray,\n\t'complex64': Complex64Array,\n\t'complex128': Complex128Array\n};\n\n\n// EXPORTS //\n\nexport default ctors;\n","/**\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// MAIN //\n\n/**\n* Returns default array settings.\n*\n* @returns {Object} defaults\n*\n* @example\n* var o = defaults();\n* // returns {...}\n*/\nfunction defaults() {\n\treturn {\n\t\t// Data types:\n\t\t'dtypes': {\n\t\t\t'default': 'float64',\n\t\t\t'numeric': 'float64',\n\t\t\t'real': 'float64',\n\t\t\t'floating_point': 'float64',\n\t\t\t'real_floating_point': 'float64',\n\t\t\t'complex_floating_point': 'complex128',\n\t\t\t'integer': 'int32',\n\t\t\t'signed_integer': 'int32',\n\t\t\t'unsigned_integer': 'uint32'\n\t\t}\n\t};\n}\n\n\n// EXPORTS //\n\nexport default defaults;\n","/**\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// MODULES //\n\nimport defaults from './main.js';\n\n\n// VARIABLES //\n\nvar DEFAULTS = defaults();\nvar HASH = {\n\t'dtypes.default': DEFAULTS.dtypes.default,\n\t'dtypes.numeric': DEFAULTS.dtypes.numeric,\n\t'dtypes.real': DEFAULTS.dtypes.real,\n\t'dtypes.floating_point': DEFAULTS.dtypes.floating_point,\n\t'dtypes.real_floating_point': DEFAULTS.dtypes.real_floating_point,\n\t'dtypes.complex_floating_point': DEFAULTS.dtypes.complex_floating_point,\n\t'dtypes.integer': DEFAULTS.dtypes.integer,\n\t'dtypes.signed_integer': DEFAULTS.dtypes.signed_integer,\n\t'dtypes.unsigned_integer': DEFAULTS.dtypes.unsigned_integer\n};\n\n\n// MAIN //\n\n/**\n* Returns a default array setting.\n*\n* @param {string} name - setting name\n* @returns {*} default setting or null\n*\n* @example\n* var v = get( 'dtypes.default' );\n* // returns \n*/\nfunction get( name ) {\n\tvar v = HASH[ name ];\n\treturn ( v === void 0 ) ? null : v;\n}\n\n\n// EXPORTS //\n\nexport default get;\n","/**\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* Return default array settings.\n*\n* @module @stdlib/array-defaults\n*\n* @example\n* import defaults from '@stdlib/array-defaults';\n*\n* var o = defaults();\n* // returns {...}\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport get from './get.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'get', get );\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isNonNegativeInteger } from '@stdlib/assert-is-nonnegative-integer';\nimport ctors from '@stdlib/array-ctors';\nimport gzeros from '@stdlib/array-base-zeros';\nimport defaults from '@stdlib/array-defaults';\nimport format from '@stdlib/string-format';\n\n\n// VARIABLES //\n\nvar DEFAULT_DTYPE = defaults.get( 'dtypes.default' );\n\n\n// MAIN //\n\n/**\n* Creates a zero-filled array having a specified length.\n*\n* @param {NonNegativeInteger} length - array length\n* @param {string} [dtype=\"float64\"] - data type\n* @throws {TypeError} first argument must be a nonnegative integer\n* @throws {TypeError} second argument must be a recognized data type\n* @returns {(TypedArray|Array|ComplexArray)} array or typed array\n*\n* @example\n* var arr = zeros( 2 );\n* // returns [ 0.0, 0.0 ]\n*\n* @example\n* var arr = zeros( 2, 'float32' );\n* // returns [ 0.0, 0.0 ]\n*/\nfunction zeros( length ) {\n\tvar dtype;\n\tvar ctor;\n\tif ( !isNonNegativeInteger( length ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a nonnegative integer. Value: `%s`.', length ) );\n\t}\n\tif ( arguments.length > 1 ) {\n\t\tdtype = arguments[ 1 ];\n\t} else {\n\t\tdtype = DEFAULT_DTYPE;\n\t}\n\tif ( dtype === 'generic' ) {\n\t\treturn gzeros( length );\n\t}\n\tctor = ctors( dtype );\n\tif ( ctor === null ) {\n\t\tthrow new TypeError( format( 'invalid argument. Second argument must be a recognized data type. Value: `%s`.', dtype ) );\n\t}\n\treturn new ctor( length ); // WARNING: we assume that, apart from 'generic', the constructors for supported array data types are zero-filled by default\n}\n\n\n// EXPORTS //\n\nexport default zeros;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Returns a filled \"generic\" array.\n*\n* @param {*} value - fill value\n* @param {NonNegativeInteger} len - array length\n* @returns {Array} filled array\n*\n* @example\n* var out = filled( 0.0, 3 );\n* // returns [ 0.0, 0.0, 0.0 ]\n*\n* @example\n* var out = filled( 'beep', 3 );\n* // returns [ 'beep', 'beep', 'beep' ]\n*/\nfunction filled( value, len ) {\n\tvar arr;\n\tvar i;\n\n\t// Manually push elements in order to ensure \"fast\" elements...\n\tarr = [];\n\tfor ( i = 0; i < len; i++ ) {\n\t\tarr.push( value );\n\t}\n\treturn arr;\n}\n\n\n// EXPORTS //\n\nexport default filled;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport filled from '@stdlib/array-base-filled';\n\n\n// MAIN //\n\n/**\n* Returns a zero-filled \"generic\" array.\n*\n* @param {NonNegativeInteger} len - array length\n* @returns {Array} output array\n*\n* @example\n* var out = zeros( 3 );\n* // returns [ 0.0, 0.0, 0.0 ]\n*/\nfunction zeros( len ) {\n\treturn filled( 0.0, len );\n}\n\n\n// EXPORTS //\n\nexport default zeros;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport table from './ctors.js';\n\n\n// MAIN //\n\n/**\n* Returns an array constructor.\n*\n* @param {string} dtype - data type\n* @returns {(Function|null)} constructor or null\n*\n* @example\n* var ctor = ctors( 'float64' );\n* // returns \n*\n* @example\n* var ctor = ctors( 'float' );\n* // returns null\n*/\nfunction ctors( dtype ) {\n\treturn table[ dtype ] || null;\n}\n\n\n// EXPORTS //\n\nexport default ctors;\n","/**\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// MODULES //\n\nimport zeros from '@stdlib/array-zeros';\n\n\n// MAIN //\n\n/**\n* Creates an uninitialized array having a specified length.\n*\n* @private\n* @param {NonNegativeInteger} length - array length\n* @param {string} [dtype=\"float64\"] - data type\n* @throws {TypeError} first argument must be a nonnegative integer\n* @throws {TypeError} second argument must be a recognized data type\n* @returns {(TypedArray|Array|ComplexArray)} array or typed array\n*\n* @example\n* var arr = empty( 2 );\n* // returns \n*\n* @example\n* var arr = empty( 2, 'float32' );\n* // returns \n*/\nfunction empty( length ) {\n\tif ( arguments.length > 1 ) {\n\t\treturn zeros( length, arguments[ 1 ] );\n\t}\n\treturn zeros( length );\n}\n\n\n// EXPORTS //\n\nexport default empty;\n"],"names":["main","Object","defineProperty","isNumber","value","zeros","n","i","out","zeroPad","str","width","right","negative","pad","length","startsWithMinus","substr","lowercase","String","prototype","toLowerCase","uppercase","toUpperCase","formatInteger","token","base","specifier","arg","parseInt","isFinite","Error","toString","precision","padRight","sign","alternate","call","charAt","abs","Math","replace","RE_EXP_POS_DIGITS","RE_EXP_NEG_DIGITS","RE_ONLY_DIGITS","RE_DIGITS_BEFORE_EXP","RE_TRAILING_PERIOD_ZERO","RE_PERIOD_ZERO_EXP","RE_ZERO_BEFORE_EXP","formatDouble","digits","f","parseFloat","toExponential","toFixed","toPrecision","spaces","fromCharCode","isnan","isNaN","isArray","Array","initialize","flags","mapping","formatInterpolate","tokens","hasPeriod","flag","num","pos","j","TypeError","padZeros","indexOf","arguments","maxWidth","substring","RE","parse","match","formatTokenize","content","prev","exec","slice","lastIndex","push","format","args","tokenize","interpolate","apply","objectProtoype","toStr","defineGetter","__defineGetter__","defineSetter","__defineSetter__","lookupGetter","__lookupGetter__","lookupSetter","__lookupSetter__","err","hasDefinePropertySupport","builtin","obj","prop","descriptor","hasValue","hasGet","hasSet","__proto__","get","set","defineProperty$1","setNonEnumerableReadOnly","configurable","enumerable","writable","FLG","Symbol","hasToStringTagSupport","toStringTag","has","hasOwnProperty","hasOwnProp","property","Sym","toStrTag","nativeClass","hasToStringTag","v","isOwn","tag","main$b","Number","test","isPrimitive","isObject","setReadOnly","FLOAT64_PINF","POSITIVE_INFINITY","FLOAT64_NINF","NEGATIVE_INFINITY","floor","isInteger","x","PINF","NINF","isInt","valueOf","isNonNegativeInteger","hasFloat64Array","Float64Array","ctor","Float64Array$1","bool","arr","GlobalFloat64Array","NaN","hasFloat64ArraySupport","hasFloat32Array","Float32Array","Float32Array$1","GlobalFloat32Array","hasFloat32ArraySupport","hasInt16Array","Int16Array","Int16Array$1","GlobalInt16Array","INT16_MAX","hasInt16ArraySupport","hasInt32Array","Int32Array","Int32Array$1","GlobalInt32Array","INT32_MAX","hasInt32ArraySupport","hasInt8Array","Int8Array","Int8Array$1","GlobalInt8Array","INT8_MAX","hasInt8ArraySupport","hasUint16Array","Uint16Array","Uint16Array$1","GlobalUint16Array","UINT16_MAX","hasUint16ArraySupport","hasUint32Array","Uint32Array","Uint32Array$1","GlobalUint32Array","UINT32_MAX","hasUint32ArraySupport","hasUint8Array","Uint8Array","Uint8Array$1","GlobalUint8Array","UINT8_MAX","hasUint8ArraySupport","hasUint8ClampedArray","Uint8ClampedArray","Uint8ClampedArray$1","GlobalUint8ClampedArray","hasUint8ClampedArraySupport","MAX_ARRAY_LENGTH","isArrayLikeObject","MAX_LENGTH","MAX_TYPED_ARRAY_LENGTH","isCollection","hasArrayBuffer","ArrayBuffer","isArrayBuffer","main$1","isString","isBoolean","Bool","Boolean","self","window","global","globalThis","root","codegen","Function","GlobalThis","Self","Win","Global","getGlobal","nodeList","document","childNodes","typedarray","reFunctionName","RE_FUNCTION_NAME","isObjectLike","constructorName","name","constructor","_isBuffer","isBuffer","REGEXP","predicate","len","arrayfun","ctorName","type","isFunction","typeOf","Complex128","real","imag","this","re","im","fround","FLOAT32_VIEW","float64ToFloat32$1","Complex64","float64ToFloat32","isComplexLike","isEven","BYTES_PER_ELEMENT","isComplex64Array","isComplex128Array","hasIteratorSymbolSupport","iterator","IteratorSymbol","setNonEnumerableReadOnlyAccessor","getter","realf","z","imagf","reinterpret","offset","buffer","byteOffset","GETTERS","float64","idx","float32","int32","int16","int8","uint32","uint16","uint8","uint8c","generic","default","dtype","complex128","complex64","fromIterator","it","next","done","HAS_ITERATOR_SYMBOL","isComplexArray","Complex64Array","_length","_buffer","isComplexArrayConstructor","getComplex64","buf","nargs","fromArray","RangeError","reinterpret64","reinterpret128","byteLength","ITERATOR_SYMBOL","src","thisArg","clbk","tmp","flg","accessorGetter","fromIteratorMap","setReadOnlyAccessor","target","start","copyWithin","iter","entries","end","fcn","searchElement","fromIndex","separator","sep","join","outbuf","reducer","initialValue","acc","N","sbuf","outlen","begin","index","Complex128Array","getComplex128","ctors","defaults","dtypes","numeric","floating_point","real_floating_point","complex_floating_point","integer","signed_integer","unsigned_integer","DEFAULTS","HASH","DEFAULT_DTYPE","filled","table","empty"],"mappings":";;AAsBA,IAAIA,EAA0C,mBAA1BC,OAAOC,eAAkCD,OAAOC,eAAiB,KCiCrF,IAAIA,EAAiBD,OAAOC,eCjB5B,SAASC,EAAUC,GAClB,MAA0B,iBAAVA,CACjB,CCAA,SAASC,EAAOC,GACf,IACIC,EADAC,EAAM,GAEV,IAAMD,EAAI,EAAGA,EAAID,EAAGC,IACnBC,GAAO,IAER,OAAOA,CACR,CAcA,SAASC,EAASC,EAAKC,EAAOC,GAC7B,IAAIC,GAAW,EACXC,EAAMH,EAAQD,EAAIK,OACtB,OAAKD,EAAM,IAnCZ,SAA0BJ,GACzB,MAAoB,MAAbA,EAAK,EACb,CAoCMM,CAAiBN,KACrBG,GAAW,EACXH,EAAMA,EAAIO,OAAQ,IAEnBP,EAAM,EACLA,EAAML,EAAOS,GACbT,EAAOS,GAAQJ,EACXG,IACJH,EAAM,IAAMA,IAVLA,CAaT,CCpDA,IAAIQ,EAAYC,OAAOC,UAAUC,YAC7BC,EAAYH,OAAOC,UAAUG,YAajC,SAASC,EAAeC,GACvB,IAAIC,EACAlB,EACAD,EAEJ,OAASkB,EAAME,WACf,IAAK,IAEJD,EAAO,EACP,MACD,IAAK,IAEJA,EAAO,EACP,MACD,IAAK,IACL,IAAK,IAEJA,EAAO,GACP,MAID,QAECA,EAAO,GAKR,GAFAlB,EAAMiB,EAAMG,IACZrB,EAAIsB,SAAUrB,EAAK,KACbsB,SAAUvB,GAAM,CACrB,IAAMJ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AA8BM,GAASR,OAAOG,oBAC9C,gCAAiCK,GAASR,OAAOI,uBACjD,iBAAkBI,GAASR,OAAOK,QAClC,wBAAyBG,GAASR,OAAOM,eACzC,0BAA2BE,GAASR,OAAOO,kBCI5CxN,EAAA5I,GAAA,ODYA,SAAciP,GACb,IAAI7G,EAAIkO,GAAMrH,GACd,YAAe,IAAN7G,EAAiB,KAAOA,CAClC,IEzBA,IAAImO,GAAgBX,GAAS3O,IAAK,kBAsBlC,SAAS5G,GAAOU,GACf,IAAIuR,EACA3I,EACJ,IAAMH,GAAsBzI,GAC3B,MAAM,IAAIyD,UAAWgB,EAAQ,+EAAgFzE,IAO9G,GAAe,aAJduR,EADI3N,UAAU5D,OAAS,EACf4D,UAAW,GAEX4R,IAGR,OC5BF,SAAiBnW,EAAOmP,GACvB,IAAIzF,EACAvJ,EAIJ,IADAuJ,EAAM,GACAvJ,EAAI,EAAGA,EAAIgP,EAAKhP,IACrBuJ,EAAIvE,KAAMnF,GAEX,OAAO0J,CACR,CCTQ0M,CAAQ,EF2BCzV,GAGhB,GADA4I,EG1BD,SAAgB2I,GACf,OAAOmE,GAAOnE,IAAW,IAC1B,CHwBQqD,CAAOrD,GACA,OAAT3I,EACJ,MAAM,IAAInF,UAAWgB,EAAQ,iFAAkF8M,IAEhH,OAAO,IAAI3I,EAAM5I,EAClB,CI3BA,SAAS2V,GAAO3V,GACf,OAAK4D,UAAU5D,OAAS,EAChBV,GAAOU,EAAQ4D,UAAW,IAE3BtE,GAAOU,EACf","x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189]} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index ed5a549..0000000 --- a/stats.html +++ /dev/null @@ -1,4842 +0,0 @@ - - - - - - - - Rollup Visualizer - - - -
- - - - - From 6f6bd5053f43c68664e0d390828849e15dec19f5 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Mon, 29 Jul 2024 03:33:33 +0000 Subject: [PATCH 67/75] 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 | 243 -- CITATION.cff | 30 - CODE_OF_CONDUCT.md | 3 - CONTRIBUTING.md | 3 - Makefile | 534 --- README.md | 38 +- SECURITY.md | 5 - benchmark/benchmark.js | 282 -- benchmark/benchmark.length.bool.js | 93 - benchmark/benchmark.length.complex128.js | 93 - benchmark/benchmark.length.complex64.js | 93 - benchmark/benchmark.length.float32.js | 93 - benchmark/benchmark.length.float64.js | 93 - benchmark/benchmark.length.generic.js | 93 - benchmark/benchmark.length.int16.js | 93 - benchmark/benchmark.length.int32.js | 93 - benchmark/benchmark.length.int8.js | 93 - benchmark/benchmark.length.uint16.js | 93 - benchmark/benchmark.length.uint32.js | 93 - benchmark/benchmark.length.uint8.js | 93 - benchmark/benchmark.length.uint8c.js | 93 - branches.md | 56 - dist/index.d.ts | 3 - dist/index.js | 9 - dist/index.js.map | 7 - docs/repl.txt | 35 - docs/types/test.ts | 78 - examples/index.js | 33 - lib/index.js | 58 - lib/is_buffer_uint8array.js | 47 - lib/main.js | 107 - lib/polyfill.js | 56 - docs/types/index.d.ts => mod.d.ts | 2 +- mod.js | 4 + mod.js.map | 1 + package.json | 84 +- stats.html | 4842 +++++++++++++++++++++ test/dist/test.js | 33 - test/test.js | 60 - test/test.main.js | 285 -- test/test.polyfill.js | 340 -- 59 files changed, 4860 insertions(+), 6232 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 benchmark/benchmark.js delete mode 100644 benchmark/benchmark.length.bool.js delete mode 100644 benchmark/benchmark.length.complex128.js delete mode 100644 benchmark/benchmark.length.complex64.js delete mode 100644 benchmark/benchmark.length.float32.js delete mode 100644 benchmark/benchmark.length.float64.js delete mode 100644 benchmark/benchmark.length.generic.js delete mode 100644 benchmark/benchmark.length.int16.js delete mode 100644 benchmark/benchmark.length.int32.js delete mode 100644 benchmark/benchmark.length.int8.js delete mode 100644 benchmark/benchmark.length.uint16.js delete mode 100644 benchmark/benchmark.length.uint32.js delete mode 100644 benchmark/benchmark.length.uint8.js delete mode 100644 benchmark/benchmark.length.uint8c.js 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/repl.txt delete mode 100644 docs/types/test.ts delete mode 100644 examples/index.js delete mode 100644 lib/index.js delete mode 100644 lib/is_buffer_uint8array.js delete mode 100644 lib/main.js delete mode 100644 lib/polyfill.js rename docs/types/index.d.ts => mod.d.ts (94%) create mode 100644 mod.js create mode 100644 mod.js.map create mode 100644 stats.html delete mode 100644 test/dist/test.js delete mode 100644 test/test.js delete mode 100644 test/test.main.js delete mode 100644 test/test.polyfill.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 96f81a8..0000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,7 +0,0 @@ - - -We are excited about your pull request, but unfortunately we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/empty) 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 ddb353e..0000000 --- a/.github/workflows/close_pull_requests.yml +++ /dev/null @@ -1,54 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: close_pull_requests - -# Workflow triggers: -on: - pull_request_target: - types: [opened] - -# Workflow jobs: -jobs: - - # Define job to close all pull requests: - run: - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Close pull request - - name: 'Close pull request' - # Pin action to full length commit SHA corresponding to v3.1.2 - uses: superbrothers/close-pull-request@9c18513d320d7b2c7185fb93396d0c664d5d8448 - with: - comment: | - Thank you for submitting a pull request. :raised_hands: - - We greatly appreciate your willingness to submit a contribution. However, we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). - - We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/empty) 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 8376c30..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: '49 1 * * 5' - - # 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 + + + + 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 8e62cb8..0000000 --- a/test/test.js +++ /dev/null @@ -1,60 +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 proxyquire = require( 'proxyquire' ); -var main = require( './../lib/main.js' ); -var polyfill = require( './../lib/polyfill.js' ); -var empty = require( './../lib' ); - - -// TESTS // - -tape( 'main export is a function', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof empty, 'function', 'main export is a function' ); - t.end(); -}); - -tape( 'if an environment supports Node.js buffer instances inheriting from Uint8Array, the main export supports returning arrays having uninitialized memory', function test( t ) { - var empty = proxyquire( './../lib', { - './is_buffer_uint8array.js': mock - }); - t.strictEqual( empty, main, 'returns expected value' ); - t.end(); - - function mock() { - return true; - } -}); - -tape( 'if an environment does not support Node.js buffer instances inheriting from Uint8Array, the main export supports returning zero-filled arrays', function test( t ) { - var empty = proxyquire( './../lib', { - './is_buffer_uint8array.js': mock - }); - t.strictEqual( empty, polyfill, 'returns expected value' ); - t.end(); - - function mock() { - return false; - } -}); diff --git a/test/test.main.js b/test/test.main.js deleted file mode 100644 index 73fce24..0000000 --- a/test/test.main.js +++ /dev/null @@ -1,285 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2024 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR 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 Float64Array = require( '@stdlib/array-float64' ); -var Float32Array = require( '@stdlib/array-float32' ); -var Int32Array = require( '@stdlib/array-int32' ); -var Uint32Array = require( '@stdlib/array-uint32' ); -var Int16Array = require( '@stdlib/array-int16' ); -var Uint16Array = require( '@stdlib/array-uint16' ); -var Int8Array = require( '@stdlib/array-int8' ); -var Uint8Array = require( '@stdlib/array-uint8' ); -var Uint8ClampedArray = require( '@stdlib/array-uint8c' ); -var Complex64Array = require( '@stdlib/array-complex64' ); -var Complex128Array = require( '@stdlib/array-complex128' ); -var BooleanArray = require( '@stdlib/array-bool' ); -var instanceOf = require( '@stdlib/assert-instance-of' ); -var empty = require( './../lib/main.js' ); - - -// TESTS // - -tape( 'main export is a function', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof empty, 'function', 'main export is a function' ); - t.end(); -}); - -tape( 'the function throws an error if provided a value other than a nonnegative integer for the first argument', function test( t ) { - var values; - var i; - - values = [ - '5', - -3, - 3.14, - NaN, - true, - false, - null, - void 0, - [], - {}, - function noop() {} - ]; - - for ( i = 0; i < values.length; i++ ) { - t.throws( badValue( values[i] ), TypeError, 'throws an error when provided '+values[i] ); - } - t.end(); - - function badValue( value ) { - return function badValue() { - empty( value ); - }; - } -}); - -tape( 'the function throws an error if provided a value other than a nonnegative integer for the first argument (dtype)', function test( t ) { - var values; - var i; - - values = [ - '5', - -3, - 3.14, - NaN, - true, - false, - null, - void 0, - [], - {}, - function noop() {} - ]; - - for ( i = 0; i < values.length; i++ ) { - t.throws( badValue( values[i] ), TypeError, 'throws an error when provided '+values[i] ); - } - t.end(); - - function badValue( value ) { - return function badValue() { - empty( value, 'float32' ); - }; - } -}); - -tape( 'the function throws an error if provided an unrecognized data type', function test( t ) { - var values; - var i; - - values = [ - '5', - 'beep', - 'empty', - 'Int32', - 'Uint32', - 'Int16', - 'Uint16', - 'Int8', - 'Uint8', - 'Uint8c', - 'uint8_clamped', - 'Float64', - 'Float32', - 'FLOAT64', - 'FLOAT32', - 'GENERIC' - ]; - - for ( i = 0; i < values.length; i++ ) { - t.throws( badValue( values[i] ), TypeError, 'throws an error when provided '+values[i] ); - } - t.end(); - - function badValue( value ) { - return function badValue() { - empty( 10, value ); - }; - } -}); - -tape( 'the function returns an empty array (default)', function test( t ) { - var arr; - - arr = empty( 5 ); - t.strictEqual( instanceOf( arr, Float64Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=float64)', function test( t ) { - var arr; - - arr = empty( 5, 'float64' ); - t.strictEqual( instanceOf( arr, Float64Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=float32)', function test( t ) { - var arr; - - arr = empty( 5, 'float32' ); - t.strictEqual( instanceOf( arr, Float32Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=bool)', function test( t ) { - var arr; - - arr = empty( 5, 'bool' ); - t.strictEqual( instanceOf( arr, BooleanArray ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=complex128)', function test( t ) { - var arr; - - arr = empty( 5, 'complex128' ); - t.strictEqual( instanceOf( arr, Complex128Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=complex64)', function test( t ) { - var arr; - - arr = empty( 5, 'complex64' ); - t.strictEqual( instanceOf( arr, Complex64Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=int32)', function test( t ) { - var arr; - - arr = empty( 5, 'int32' ); - t.strictEqual( instanceOf( arr, Int32Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=uint32)', function test( t ) { - var arr; - - arr = empty( 5, 'uint32' ); - t.strictEqual( instanceOf( arr, Uint32Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=int16)', function test( t ) { - var arr; - - arr = empty( 5, 'int16' ); - t.strictEqual( instanceOf( arr, Int16Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=uint16)', function test( t ) { - var arr; - - arr = empty( 5, 'uint16' ); - t.strictEqual( instanceOf( arr, Uint16Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=int8)', function test( t ) { - var arr; - - arr = empty( 5, 'int8' ); - t.strictEqual( instanceOf( arr, Int8Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=uint8)', function test( t ) { - var arr; - - arr = empty( 5, 'uint8' ); - t.strictEqual( instanceOf( arr, Uint8Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=uint8c)', function test( t ) { - var arr; - - arr = empty( 5, 'uint8c' ); - t.strictEqual( instanceOf( arr, Uint8ClampedArray ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=generic)', function test( t ) { - var expected; - var arr; - - expected = [ 0, 0, 0, 0, 0 ]; - - arr = empty( 5, 'generic' ); - t.strictEqual( instanceOf( arr, Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); diff --git a/test/test.polyfill.js b/test/test.polyfill.js deleted file mode 100644 index 4fc9472..0000000 --- a/test/test.polyfill.js +++ /dev/null @@ -1,340 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2024 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR 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 Float64Array = require( '@stdlib/array-float64' ); -var Float32Array = require( '@stdlib/array-float32' ); -var Int32Array = require( '@stdlib/array-int32' ); -var Uint32Array = require( '@stdlib/array-uint32' ); -var Int16Array = require( '@stdlib/array-int16' ); -var Uint16Array = require( '@stdlib/array-uint16' ); -var Int8Array = require( '@stdlib/array-int8' ); -var Uint8Array = require( '@stdlib/array-uint8' ); -var Uint8ClampedArray = require( '@stdlib/array-uint8c' ); -var Complex64Array = require( '@stdlib/array-complex64' ); -var Complex128Array = require( '@stdlib/array-complex128' ); -var BooleanArray = require( '@stdlib/array-bool' ); -var reinterpret64 = require( '@stdlib/strided-base-reinterpret-complex64' ); -var reinterpret128 = require( '@stdlib/strided-base-reinterpret-complex128' ); -var reinterpretBoolean = require( '@stdlib/strided-base-reinterpret-boolean' ); -var instanceOf = require( '@stdlib/assert-instance-of' ); -var empty = require( './../lib/polyfill.js' ); - - -// TESTS // - -tape( 'main export is a function', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof empty, 'function', 'main export is a function' ); - t.end(); -}); - -tape( 'the function throws an error if provided a value other than a nonnegative integer for the first argument', function test( t ) { - var values; - var i; - - values = [ - '5', - -3, - 3.14, - NaN, - true, - false, - null, - void 0, - [], - {}, - function noop() {} - ]; - - for ( i = 0; i < values.length; i++ ) { - t.throws( badValue( values[i] ), TypeError, 'throws an error when provided '+values[i] ); - } - t.end(); - - function badValue( value ) { - return function badValue() { - empty( value ); - }; - } -}); - -tape( 'the function throws an error if provided a value other than a nonnegative integer for the first argument (dtype)', function test( t ) { - var values; - var i; - - values = [ - '5', - -3, - 3.14, - NaN, - true, - false, - null, - void 0, - [], - {}, - function noop() {} - ]; - - for ( i = 0; i < values.length; i++ ) { - t.throws( badValue( values[i] ), TypeError, 'throws an error when provided '+values[i] ); - } - t.end(); - - function badValue( value ) { - return function badValue() { - empty( value, 'float32' ); - }; - } -}); - -tape( 'the function throws an error if provided an unrecognized data type', function test( t ) { - var values; - var i; - - values = [ - '5', - 'beep', - 'empty', - 'Int32', - 'Uint32', - 'Int16', - 'Uint16', - 'Int8', - 'Uint8', - 'Uint8c', - 'uint8_clamped', - 'Float64', - 'Float32', - 'FLOAT64', - 'FLOAT32', - 'GENERIC' - ]; - - for ( i = 0; i < values.length; i++ ) { - t.throws( badValue( values[i] ), TypeError, 'throws an error when provided '+values[i] ); - } - t.end(); - - function badValue( value ) { - return function badValue() { - empty( 10, value ); - }; - } -}); - -tape( 'the function returns a zero-filled array (default)', function test( t ) { - var expected; - var arr; - - expected = new Float64Array( [ 0.0, 0.0, 0.0, 0.0, 0.0 ] ); - - arr = empty( 5 ); - t.strictEqual( instanceOf( arr, Float64Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=float64)', function test( t ) { - var expected; - var arr; - - expected = new Float64Array( [ 0.0, 0.0, 0.0, 0.0, 0.0 ] ); - - arr = empty( 5, 'float64' ); - t.strictEqual( instanceOf( arr, Float64Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=float32)', function test( t ) { - var expected; - var arr; - - expected = new Float32Array( [ 0.0, 0.0, 0.0, 0.0, 0.0 ] ); - - arr = empty( 5, 'float32' ); - t.strictEqual( instanceOf( arr, Float32Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=bool)', function test( t ) { - var expected; - var arr; - - expected = new Uint8Array( [ 0, 0, 0, 0 ] ); - - arr = empty( 4, 'bool' ); - t.strictEqual( instanceOf( arr, BooleanArray ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( reinterpretBoolean( arr, 0 ), expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=complex128)', function test( t ) { - var expected; - var arr; - - expected = new Float64Array( [ 0.0, 0.0, 0.0, 0.0 ] ); - - arr = empty( 2, 'complex128' ); - t.strictEqual( instanceOf( arr, Complex128Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length/2, 'returns expected value' ); - t.deepEqual( reinterpret128( arr, 0 ), expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=complex64)', function test( t ) { - var expected; - var arr; - - expected = new Float32Array( [ 0.0, 0.0, 0.0, 0.0 ] ); - - arr = empty( 2, 'complex64' ); - t.strictEqual( instanceOf( arr, Complex64Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length/2, 'returns expected value' ); - t.deepEqual( reinterpret64( arr, 0 ), expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=int32)', function test( t ) { - var expected; - var arr; - - expected = new Int32Array( [ 0, 0, 0, 0, 0 ] ); - - arr = empty( 5, 'int32' ); - t.strictEqual( instanceOf( arr, Int32Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=uint32)', function test( t ) { - var expected; - var arr; - - expected = new Uint32Array( [ 0, 0, 0, 0, 0 ] ); - - arr = empty( 5, 'uint32' ); - t.strictEqual( instanceOf( arr, Uint32Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=int16)', function test( t ) { - var expected; - var arr; - - expected = new Int16Array( [ 0, 0, 0, 0, 0 ] ); - - arr = empty( 5, 'int16' ); - t.strictEqual( instanceOf( arr, Int16Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=uint16)', function test( t ) { - var expected; - var arr; - - expected = new Uint16Array( [ 0, 0, 0, 0, 0 ] ); - - arr = empty( 5, 'uint16' ); - t.strictEqual( instanceOf( arr, Uint16Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=int8)', function test( t ) { - var expected; - var arr; - - expected = new Int8Array( [ 0, 0, 0, 0, 0 ] ); - - arr = empty( 5, 'int8' ); - t.strictEqual( instanceOf( arr, Int8Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=uint8)', function test( t ) { - var expected; - var arr; - - expected = new Uint8Array( [ 0, 0, 0, 0, 0 ] ); - - arr = empty( 5, 'uint8' ); - t.strictEqual( instanceOf( arr, Uint8Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=uint8c)', function test( t ) { - var expected; - var arr; - - expected = new Uint8ClampedArray( [ 0, 0, 0, 0, 0 ] ); - - arr = empty( 5, 'uint8c' ); - t.strictEqual( instanceOf( arr, Uint8ClampedArray ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=generic)', function test( t ) { - var expected; - var arr; - - expected = [ 0, 0, 0, 0, 0 ]; - - arr = empty( 5, 'generic' ); - t.strictEqual( instanceOf( arr, Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); From 99a713c68cc80f1c384723cc0856c296cf898eb6 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Mon, 29 Jul 2024 03:44:19 +0000 Subject: [PATCH 68/75] Update README.md for Deno bundle v0.3.0 --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 3efe395..9109f7e 100644 --- a/README.md +++ b/README.md @@ -52,7 +52,7 @@ limitations under the License. ## Usage ```javascript -import empty from 'https://cdn.jsdelivr.net/gh/stdlib-js/array-empty@deno/mod.js'; +import empty from 'https://cdn.jsdelivr.net/gh/stdlib-js/array-empty@v0.3.0-deno/mod.js'; ``` #### empty( length\[, dtype] ) @@ -99,7 +99,7 @@ var arr = empty( 2, 'int32' ); ```javascript import dtypes from 'https://cdn.jsdelivr.net/gh/stdlib-js/array-dtypes@deno/mod.js'; -import empty from 'https://cdn.jsdelivr.net/gh/stdlib-js/array-empty@deno/mod.js'; +import empty from 'https://cdn.jsdelivr.net/gh/stdlib-js/array-empty@v0.3.0-deno/mod.js'; // Get a list of array data types: var dt = dtypes(); From 4dfca119ec61bccf042e8ca90bfa9f55f321c8e5 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Mon, 29 Jul 2024 03:44:20 +0000 Subject: [PATCH 69/75] Auto-generated commit --- README.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 9109f7e..fa6ec52 100644 --- a/README.md +++ b/README.md @@ -51,6 +51,11 @@ limitations under the License. ## Usage +```javascript +import empty from 'https://cdn.jsdelivr.net/gh/stdlib-js/array-empty@deno/mod.js'; +``` +The previous example will load the latest bundled code from the deno branch. Alternatively, you may load a specific version by loading the file from one of the [tagged bundles](https://github.com/stdlib-js/array-empty/tags). For example, + ```javascript import empty from 'https://cdn.jsdelivr.net/gh/stdlib-js/array-empty@v0.3.0-deno/mod.js'; ``` @@ -99,7 +104,7 @@ var arr = empty( 2, 'int32' ); ```javascript import dtypes from 'https://cdn.jsdelivr.net/gh/stdlib-js/array-dtypes@deno/mod.js'; -import empty from 'https://cdn.jsdelivr.net/gh/stdlib-js/array-empty@v0.3.0-deno/mod.js'; +import empty from 'https://cdn.jsdelivr.net/gh/stdlib-js/array-empty@deno/mod.js'; // Get a list of array data types: var dt = dtypes(); From eb86269b6f9e73267c22293c60c63f38f98b7655 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Thu, 1 Aug 2024 08:19:43 +0000 Subject: [PATCH 70/75] Transform error messages --- lib/main.js | 6 +++--- package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/main.js b/lib/main.js index 33d8392..44eb4a4 100644 --- a/lib/main.js +++ b/lib/main.js @@ -26,7 +26,7 @@ var ctors = require( '@stdlib/array-typed-ctors' ); var zeros = require( '@stdlib/array-base-zeros' ); var bytesPerElement = require( '@stdlib/ndarray-base-bytes-per-element' ); var defaults = require( '@stdlib/array-defaults' ); -var format = require( '@stdlib/string-format' ); +var format = require( '@stdlib/error-tools-fmtprodmsg' ); // VARIABLES // @@ -63,7 +63,7 @@ function empty( length ) { var nb; if ( !isNonNegativeInteger( length ) ) { - throw new TypeError( format( 'invalid argument. First argument must be a nonnegative integer. Value: `%s`.', length ) ); + throw new TypeError( format( '1Zj2d', length ) ); } if ( arguments.length > 1 ) { dtype = arguments[ 1 ]; @@ -75,7 +75,7 @@ function empty( length ) { } nbytes = bytesPerElement( dtype ); if ( nbytes === null ) { - throw new TypeError( format( 'invalid argument. Second argument must be a supported data type. Value: `%s`.', dtype ) ); + throw new TypeError( format( '1ZjEC', dtype ) ); } // Resolve typed array constructor: ctor = ctors( dtype ); diff --git a/package.json b/package.json index 9b0b2e5..0b8b825 100644 --- a/package.json +++ b/package.json @@ -46,7 +46,7 @@ "@stdlib/assert-is-uint8array": "^0.2.2", "@stdlib/buffer-alloc-unsafe": "^0.2.2", "@stdlib/ndarray-base-bytes-per-element": "^0.2.2", - "@stdlib/string-format": "^0.2.2", + "@stdlib/error-tools-fmtprodmsg": "^0.2.2", "@stdlib/types": "^0.3.2", "@stdlib/error-tools-fmtprodmsg": "^0.2.2" }, From e3b01e6dd796349af5990c19d426663233fb285f Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Thu, 1 Aug 2024 13:14:59 +0000 Subject: [PATCH 71/75] Remove files --- mod.d.ts | 51 - mod.js | 4 - mod.js.map | 1 - stats.html | 4842 ---------------------------------------------------- 4 files changed, 4898 deletions(-) delete mode 100644 mod.d.ts delete mode 100644 mod.js delete mode 100644 mod.js.map delete mode 100644 stats.html diff --git a/mod.d.ts b/mod.d.ts deleted file mode 100644 index e22b893..0000000 --- a/mod.d.ts +++ /dev/null @@ -1,51 +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 - -/// - -import { DataTypeMap } from '@stdlib/types/array'; - -/** -* Creates an uninitialized array having a specified length. -* -* ## Notes -* -* - In browser environments, the function always returns zero-filled arrays. -* - If `dtype` is `'generic'`, the function always returns a zero-filled array. -* - In Node.js versions `>=3.0.0`, the underlying memory of returned typed arrays is **not** initialized. Memory contents are unknown and may contain **sensitive** data. -* -* @param length - array length -* @param dtype - data type (default: 'float64') -* @returns empty array -* -* @example -* var arr = empty( 2 ); -* // returns -* -* @example -* var arr = empty( 2, 'float32' ); -* // returns -*/ -declare function empty = 'float64'>( length: number, dtype?: T ): DataTypeMap[T]; - - -// EXPORTS // - -export = empty; diff --git a/mod.js b/mod.js deleted file mode 100644 index 0ce0bcf..0000000 --- a/mod.js +++ /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 -/// -var r="function"==typeof Object.defineProperty?Object.defineProperty:null;var e=Object.defineProperty;function t(r){return"number"==typeof r}function n(r){var e,t="";for(e=0;e0&&(e-=1),n=i.toExponential(e)):n=i.toPrecision(r.precision),r.alternate||(n=h.call(n,v,"$1e"),n=h.call(n,w,"e"),n=h.call(n,g,""));break;default:throw new Error("invalid double notation. Value: "+r.specifier)}return n=h.call(n,c,"e+0$1"),n=h.call(n,p,"e-0$1"),r.alternate&&(n=h.call(n,m,"$1."),n=h.call(n,y,"$1.e")),i>=0&&r.sign&&(n=r.sign+n),n=r.specifier===s.call(r.specifier)?s.call(n):l.call(n)}function d(r){var e,t="";for(e=0;e127)throw new Error("invalid character code. Value: "+n.arg);n.arg=T(a)?String(n.arg):E(a)}break;case"e":case"E":case"f":case"F":case"g":case"G":e||(n.precision=6),n.arg=b(n);break;default:throw new Error("invalid specifier: "+n.specifier)}n.maxWidth>=0&&n.arg.length>n.maxWidth&&(n.arg=n.arg.substring(0,n.maxWidth)),n.padZeros?n.arg=i(n.arg,n.width||n.precision,n.padRight):n.width&&(n.arg=(c=n.arg,p=n.width,m=n.padRight,y=void 0,(y=p-c.length)<0?c:c=m?c+d(y):d(y)+c)),f+=n.arg||"",l+=1}return f}var A=/%(?:([1-9]\d*)\$)?([0 +\-#]*)(\*|\d+)?(?:(\.)(\*|\d+)?)?[hlL]?([%A-Za-z])/g;function S(r){var e={mapping:r[1]?parseInt(r[1],10):void 0,flags:r[2],width:r[3],precision:r[5],specifier:r[6]};return"."===r[4]&&void 0===r[5]&&(e.precision="1"),e}function j(r){var e,t,n,i;for(t=[],i=0,n=A.exec(r);n;)(e=r.slice(i,A.lastIndex-n[0].length)).length&&t.push(e),t.push(S(n)),i=A.lastIndex,n=A.exec(r);return(e=r.slice(i)).length&&t.push(e),t}function F(r){var e,t;if("string"!=typeof r)throw new TypeError(F("invalid argument. First argument must be a string. Value: `%s`.",r));for(e=[j(r)],t=1;trr&&tr(r)}function ir(r){return P(r)&&nr(r)}function or(r){return H(r)&&nr(r.valueOf())}function ar(r){return ir(r)||or(r)}function ur(r){return ir(r)&&r>=0}function fr(r){return or(r)&&r.valueOf()>=0}function lr(r){return ur(r)||fr(r)}N(ar,"isPrimitive",ir),N(ar,"isObject",or),N(lr,"isPrimitive",ur),N(lr,"isObject",fr);var sr="function"==typeof Float64Array;var hr="function"==typeof Float64Array?Float64Array:null;var cr="function"==typeof Float64Array?Float64Array:void 0;var pr=function(){var r,e,t;if("function"!=typeof hr)return!1;try{e=new hr([1,3.14,-3.14,NaN]),t=e,r=(sr&&t instanceof Float64Array||"[object Float64Array]"===X(t))&&1===e[0]&&3.14===e[1]&&-3.14===e[2]&&e[3]!=e[3]}catch(e){r=!1}return r}()?cr:function(){throw new Error("not implemented")},mr="function"==typeof Float32Array;var yr="function"==typeof Float32Array?Float32Array:null;var gr="function"==typeof Float32Array?Float32Array:void 0;var wr=function(){var r,e,t;if("function"!=typeof yr)return!1;try{e=new yr([1,3.14,-3.14,5e40]),t=e,r=(mr&&t instanceof Float32Array||"[object Float32Array]"===X(t))&&1===e[0]&&3.140000104904175===e[1]&&-3.140000104904175===e[2]&&e[3]===Q}catch(e){r=!1}return r}()?gr:function(){throw new Error("not implemented")},vr="function"==typeof Int16Array;var br="function"==typeof Int16Array?Int16Array:null;var dr="function"==typeof Int16Array?Int16Array:void 0;var Er=function(){var r,e,t;if("function"!=typeof br)return!1;try{e=new br([1,3.14,-3.14,32768]),t=e,r=(vr&&t instanceof Int16Array||"[object Int16Array]"===X(t))&&1===e[0]&&3===e[1]&&-3===e[2]&&-32768===e[3]}catch(e){r=!1}return r}()?dr:function(){throw new Error("not implemented")},_r="function"==typeof Int32Array;var Tr="function"==typeof Int32Array?Int32Array:null;var xr="function"==typeof Int32Array?Int32Array:void 0;var Vr=function(){var r,e,t;if("function"!=typeof Tr)return!1;try{e=new Tr([1,3.14,-3.14,2147483648]),t=e,r=(_r&&t instanceof Int32Array||"[object Int32Array]"===X(t))&&1===e[0]&&3===e[1]&&-3===e[2]&&-2147483648===e[3]}catch(e){r=!1}return r}()?xr:function(){throw new Error("not implemented")},Ar="function"==typeof Int8Array;var Sr="function"==typeof Int8Array?Int8Array:null;var jr="function"==typeof Int8Array?Int8Array:void 0;var Fr=function(){var r,e,t;if("function"!=typeof Sr)return!1;try{e=new Sr([1,3.14,-3.14,128]),t=e,r=(Ar&&t instanceof Int8Array||"[object Int8Array]"===X(t))&&1===e[0]&&3===e[1]&&-3===e[2]&&-128===e[3]}catch(e){r=!1}return r}()?jr:function(){throw new Error("not implemented")},kr="function"==typeof Uint16Array;var Lr="function"==typeof Uint16Array?Uint16Array:null;var Rr="function"==typeof Uint16Array?Uint16Array:void 0;var Ir=function(){var r,e,t;if("function"!=typeof Lr)return!1;try{e=new Lr(e=[1,3.14,-3.14,65536,65537]),t=e,r=(kr&&t instanceof Uint16Array||"[object Uint16Array]"===X(t))&&1===e[0]&&3===e[1]&&65533===e[2]&&0===e[3]&&1===e[4]}catch(e){r=!1}return r}()?Rr:function(){throw new Error("not implemented")},Br="function"==typeof Uint32Array;var Or="function"==typeof Uint32Array?Uint32Array:null;var Cr="function"==typeof Uint32Array?Uint32Array:void 0;var Mr=function(){var r,e,t;if("function"!=typeof Or)return!1;try{e=new Or(e=[1,3.14,-3.14,4294967296,4294967297]),t=e,r=(Br&&t instanceof Uint32Array||"[object Uint32Array]"===X(t))&&1===e[0]&&3===e[1]&&4294967293===e[2]&&0===e[3]&&1===e[4]}catch(e){r=!1}return r}()?Cr:function(){throw new Error("not implemented")},Nr="function"==typeof Uint8Array;var Pr="function"==typeof Uint8Array?Uint8Array:null;var Ur="function"==typeof Uint8Array?Uint8Array:void 0;var Yr=function(){var r,e,t;if("function"!=typeof Pr)return!1;try{e=new Pr(e=[1,3.14,-3.14,256,257]),t=e,r=(Nr&&t instanceof Uint8Array||"[object Uint8Array]"===X(t))&&1===e[0]&&3===e[1]&&253===e[2]&&0===e[3]&&1===e[4]}catch(e){r=!1}return r}()?Ur:function(){throw new Error("not implemented")},Wr="function"==typeof Uint8ClampedArray;var $r="function"==typeof Uint8ClampedArray?Uint8ClampedArray:null;var Gr="function"==typeof Uint8ClampedArray?Uint8ClampedArray:void 0;var Zr=function(){var r,e,t;if("function"!=typeof $r)return!1;try{e=new $r([-1,0,1,3.14,4.99,255,256]),t=e,r=(Wr&&t instanceof Uint8ClampedArray||"[object Uint8ClampedArray]"===X(t))&&0===e[0]&&0===e[1]&&1===e[2]&&3===e[3]&&5===e[4]&&255===e[5]&&255===e[6]}catch(e){r=!1}return r}()?Gr:function(){throw new Error("not implemented")},Jr=4294967295;function Xr(r){return"object"==typeof r&&null!==r&&"number"==typeof r.length&&tr(r.length)&&r.length>=0&&r.length<=Jr}var zr=9007199254740991;function qr(r){return"object"==typeof r&&null!==r&&"number"==typeof r.length&&tr(r.length)&&r.length>=0&&r.length<=zr}var Dr="function"==typeof ArrayBuffer;function Hr(r){return Dr&&r instanceof ArrayBuffer||"[object ArrayBuffer]"===X(r)}var Kr=Array.isArray?Array.isArray:function(r){return"[object Array]"===X(r)};function Qr(r){return"object"==typeof r&&null!==r&&!Kr(r)}function re(r){return"string"==typeof r}var ee=String.prototype.valueOf;var te=Y();function ne(r){return"object"==typeof r&&(r instanceof String||(te?function(r){try{return ee.call(r),!0}catch(r){return!1}}(r):"[object String]"===X(r)))}function ie(r){return re(r)||ne(r)}N(ie,"isPrimitive",re),N(ie,"isObject",ne);var oe=/./;function ae(r){return"boolean"==typeof r}var ue=Boolean,fe=Boolean.prototype.toString;var le=Y();function se(r){return"object"==typeof r&&(r instanceof ue||(le?function(r){try{return fe.call(r),!0}catch(r){return!1}}(r):"[object Boolean]"===X(r)))}function he(r){return ae(r)||se(r)}N(he,"isPrimitive",ae),N(he,"isObject",se);var ce="object"==typeof self?self:null,pe="object"==typeof window?window:null,me="undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},ye="object"==typeof me?me:null,ge="object"==typeof globalThis?globalThis:null;var we=function(r){if(arguments.length){if(!ae(r))throw new TypeError(F("invalid argument. Must provide a boolean. Value: `%s`.",r));if(r)return new Function("return this;")()}if(ge)return ge;if(ce)return ce;if(pe)return pe;if(ye)return ye;throw new Error("unexpected error. Unable to resolve global object.")}(),ve=we.document&&we.document.childNodes,be=Int8Array;function de(){return/^\s*function\s*([^(]*)/i}var Ee=/^\s*function\s*([^(]*)/i;function _e(r){return null!==r&&"object"==typeof r}function Te(r){var e,t,n,i;if(("Object"===(t=X(r).slice(8,-1))||"Error"===t)&&r.constructor){if("string"==typeof(n=r.constructor).name)return n.name;if(e=Ee.exec(n.toString()))return e[1]}return _e(i=r)&&(i._isBuffer||i.constructor&&"function"==typeof i.constructor.isBuffer&&i.constructor.isBuffer(i))?"Buffer":t}N(de,"REGEXP",Ee),N(_e,"isObjectLikeArray",function(r){if("function"!=typeof r)throw new TypeError(F("invalid argument. Must provide a function. Value: `%s`.",r));return function(e){var t,n;if(!Kr(e))return!1;if(0===(t=e.length))return!1;for(n=0;n=2)e.push(n[0],n[1]);else{if(!Le(n))return new TypeError(F("invalid argument. An iterator must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",n));e.push(Ye(n),We(n))}return e}var De=2*wr.BYTES_PER_ELEMENT,He=Me();function Ke(r){return r instanceof et||"object"==typeof r&&null!==r&&("Complex64Array"===r.constructor.name||"Complex128Array"===r.constructor.name)&&"number"==typeof r._length&&"object"==typeof r._buffer}function Qe(r){return r===et||"Complex128Array"===r.name}function rt(r,e){return new Ue(r[e*=2],r[e+1])}function et(){var r,e,t,n;if(e=arguments.length,!(this instanceof et))return 0===e?new et:1===e?new et(arguments[0]):2===e?new et(arguments[0],arguments[1]):new et(arguments[0],arguments[1],arguments[2]);if(0===e)t=new wr(0);else if(1===e)if(ur(arguments[0]))t=new wr(2*arguments[0]);else if(qr(arguments[0]))if((n=(t=arguments[0]).length)&&Kr(t)&&Le(t[0])){if(t=function(r,e){var t,n,i,o;for(t=e.length,o=0,i=0;it.byteLength-r)throw new RangeError(F("invalid arguments. ArrayBuffer has insufficient capacity. Either decrease the array length or provide a bigger buffer. Minimum capacity: `%u`.",n*De));t=new wr(t,r,2*n)}}return N(this,"_buffer",t),N(this,"_length",t.length/2),this}function tt(r,e){if(!(this instanceof tt))throw new TypeError("invalid invocation. Constructor must be called with the `new` keyword.");if(!P(r))throw new TypeError(F("invalid argument. Real component must be a number. Value: `%s`.",r));if(!P(e))throw new TypeError(F("invalid argument. Imaginary component must be a number. Value: `%s`.",e));return M(this,"re",{configurable:!1,enumerable:!0,writable:!1,value:r}),M(this,"im",{configurable:!1,enumerable:!0,writable:!1,value:e}),this}function nt(r){return r.re}function it(r){return r.im}function ot(r){var e,t,n;for(e=[];!(t=r.next()).done;)if(Xr(n=t.value)&&n.length>=2)e.push(n[0],n[1]);else{if(!Le(n))return new TypeError(F("invalid argument. An iterator must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",n));e.push(nt(n),it(n))}return e}N(et,"BYTES_PER_ELEMENT",De),N(et,"name","Complex64Array"),N(et,"from",(function(r){var e,t,n,i,o,a,u,f,l,s,h,c;if(!Ve(this))throw new TypeError("invalid invocation. `this` context must be a constructor.");if(!Qe(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if((t=arguments.length)>1){if(!Ve(n=arguments[1]))throw new TypeError(F("invalid argument. Second argument must be a function. Value: `%s`.",n));t>2&&(e=arguments[2])}if(Ke(r)){if(f=r.length,n){for(o=(i=new this(f))._buffer,c=0,h=0;h=2))throw new TypeError(F("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",s));o[c]=s[0],o[c+1]=s[1]}c+=2}return i}return new this(r)}if(qr(r)){if(n){for(f=r.length,u=r.get&&r.set?ze("default"):Je("default"),h=0;h=2))throw new TypeError(F("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",s));o[c]=s[0],o[c+1]=s[1]}c+=2}return i}return new this(r)}if(Qr(r)&&He&&Ve(r[Ne])){if(!Ve((o=r[Ne]()).next))throw new TypeError(F("invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.",r));if(a=n?function(r,e,t){var n,i,o,a;for(n=[],a=-1;!(i=r.next()).done;)if(a+=1,Xr(o=e.call(t,i.value,a))&&o.length>=2)n.push(o[0],o[1]);else{if(!Le(o))return new TypeError(F("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",o));n.push(Ye(o),We(o))}return n}(o,n,e):qe(o),a instanceof Error)throw a;for(o=(i=new this(f=a.length/2))._buffer,h=0;h=this._length))return rt(this._buffer,r)})),Pe(et.prototype,"buffer",(function(){return this._buffer.buffer})),Pe(et.prototype,"byteLength",(function(){return this._buffer.byteLength})),Pe(et.prototype,"byteOffset",(function(){return this._buffer.byteOffset})),N(et.prototype,"BYTES_PER_ELEMENT",et.BYTES_PER_ELEMENT),N(et.prototype,"copyWithin",(function(r,e){if(!Ke(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");return 2===arguments.length?this._buffer.copyWithin(2*r,2*e):this._buffer.copyWithin(2*r,2*e,2*arguments[2]),this})),N(et.prototype,"entries",(function(){var r,e,t,n,i,o,a;if(!Ke(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");return e=this,r=this._buffer,n=this._length,o=-1,a=-2,N(t={},"next",(function(){var e;if(o+=1,i||o>=n)return{done:!0};return e=new Ue(r[a+=2],r[a+1]),{value:[o,e],done:!1}})),N(t,"return",(function(r){if(i=!0,arguments.length)return{value:r,done:!0};return{done:!0}})),Ne&&N(t,Ne,(function(){return e.entries()})),t})),N(et.prototype,"every",(function(r,e){var t,n;if(!Ke(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Ve(r))throw new TypeError(F("invalid argument. First argument must be a function. Value: `%s`.",r));for(t=this._buffer,n=0;n1){if(!tr(e))throw new TypeError(F("invalid argument. Second argument must be an integer. Value: `%s`.",e));if(e<0&&(e+=i)<0&&(e=0),arguments.length>2){if(!tr(t))throw new TypeError(F("invalid argument. Third argument must be an integer. Value: `%s`.",t));t<0&&(t+=i)<0&&(t=0),t>i&&(t=i)}else t=i}else e=0,t=i;for(a=Ye(r),u=We(r),f=e;f=0;n--)if(i=rt(t,n),r.call(e,i,n,this))return i})),N(et.prototype,"findLastIndex",(function(r,e){var t,n,i;if(!Ke(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Ve(r))throw new TypeError(F("invalid argument. First argument must be a function. Value: `%s`.",r));for(t=this._buffer,n=this._length-1;n>=0;n--)if(i=rt(t,n),r.call(e,i,n,this))return n;return-1})),N(et.prototype,"forEach",(function(r,e){var t,n,i;if(!Ke(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Ve(r))throw new TypeError(F("invalid argument. First argument must be a function. Value: `%s`.",r));for(t=this._buffer,n=0;n=this._length))return rt(this._buffer,r)})),N(et.prototype,"includes",(function(r,e){var t,n,i,o,a;if(!Ke(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Le(r))throw new TypeError(F("invalid argument. First argument must be a complex number. Value: `%s`.",r));if(arguments.length>1){if(!tr(e))throw new TypeError(F("invalid argument. Second argument must be an integer. Value: `%s`.",e));e<0&&(e+=this._length)<0&&(e=0)}else e=0;for(i=Ye(r),o=We(r),t=this._buffer,a=e;a1){if(!tr(e))throw new TypeError(F("invalid argument. Second argument must be an integer. Value: `%s`.",e));e<0&&(e+=this._length)<0&&(e=0)}else e=0;for(i=Ye(r),o=We(r),t=this._buffer,a=e;a1){if(!tr(e))throw new TypeError(F("invalid argument. Second argument must be an integer. Value: `%s`.",e));e>=this._length?e=this._length-1:e<0&&(e+=this._length)}else e=this._length-1;for(i=Ye(r),o=We(r),t=this._buffer,a=e;a>=0;a--)if(i===t[n=2*a]&&o===t[n+1])return a;return-1})),Pe(et.prototype,"length",(function(){return this._length})),N(et.prototype,"map",(function(r,e){var t,n,i,o,a;if(!Ke(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Ve(r))throw new TypeError(F("invalid argument. First argument must be a function. Value: `%s`.",r));for(n=this._buffer,t=(i=new this.constructor(this._length))._buffer,o=0;o1)n=e,o=0;else{if(0===i)throw new Error("invalid operation. If not provided an initial value, an array must contain at least one element.");n=rt(t,0),o=1}for(;o1){if(!ur(t=arguments[1]))throw new TypeError(F("invalid argument. Index argument must be a nonnegative integer. Value: `%s`.",t))}else t=0;if(Le(r)){if(t>=this._length)throw new RangeError(F("invalid argument. Index argument is out-of-bounds. Value: `%u`.",t));return n[t*=2]=Ye(r),void(n[t+1]=We(r))}if(Ke(r)){if(t+(a=r._length)>this._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");if(e=r._buffer,l=n.byteOffset+t*De,e.buffer===n.buffer&&e.byteOffsetl){for(i=new wr(e.length),f=0;fthis._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");if(e=r,l=n.byteOffset+t*De,e.buffer===n.buffer&&e.byteOffsetl){for(i=new wr(a),f=0;fthis._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");for(t*=2,f=0;fu&&(e=u)}}for(t=ri&&(e=i)}}return r>=i?(i=0,t=n.byteLength):r>=e?(i=0,t=n.byteOffset+r*De):(i=e-r,t=n.byteOffset+r*De),new this.constructor(n.buffer,t,i<0?0:i)})),N(et.prototype,"toReversed",(function(){var r,e,t,n,i,o;if(!Ke(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");for(t=this._length,e=new this.constructor(t),n=this._buffer,r=e._buffer,i=0;i=i)throw new RangeError(F("invalid argument. Index argument is out-of-bounds. Value: `%s`.",r));if(!Le(e))throw new TypeError(F("invalid argument. Second argument must be a complex number. Value: `%s`.",e));return(t=(n=new this.constructor(this._buffer))._buffer)[2*r]=Ye(e),t[2*r+1]=We(e),n})),N(tt,"BYTES_PER_ELEMENT",8),N(tt.prototype,"BYTES_PER_ELEMENT",8),N(tt.prototype,"byteLength",16),N(tt.prototype,"toString",(function(){var r=""+this.re;return this.im<0?r+=" - "+-this.im:r+=" + "+this.im,r+="i"})),N(tt.prototype,"toJSON",(function(){var r={type:"Complex128"};return r.re=this.re,r.im=this.im,r}));var at=2*pr.BYTES_PER_ELEMENT,ut=Me();function ft(r){return r instanceof ht||"object"==typeof r&&null!==r&&("Complex64Array"===r.constructor.name||"Complex128Array"===r.constructor.name)&&"number"==typeof r._length&&"object"==typeof r._buffer}function lt(r){return r===ht||"Complex64Array"===r.name}function st(r,e){return new tt(r[e*=2],r[e+1])}function ht(){var r,e,t,n;if(e=arguments.length,!(this instanceof ht))return 0===e?new ht:1===e?new ht(arguments[0]):2===e?new ht(arguments[0],arguments[1]):new ht(arguments[0],arguments[1],arguments[2]);if(0===e)t=new pr(0);else if(1===e)if(ur(arguments[0]))t=new pr(2*arguments[0]);else if(qr(arguments[0]))if((n=(t=arguments[0]).length)&&Kr(t)&&Le(t[0])){if(t=function(r,e){var t,n,i,o;for(t=e.length,o=0,i=0;it.byteLength-r)throw new RangeError(F("invalid arguments. ArrayBuffer has insufficient capacity. Either decrease the array length or provide a bigger buffer. Minimum capacity: `%u`.",n*at));t=new pr(t,r,2*n)}}return N(this,"_buffer",t),N(this,"_length",t.length/2),this}N(ht,"BYTES_PER_ELEMENT",at),N(ht,"name","Complex128Array"),N(ht,"from",(function(r){var e,t,n,i,o,a,u,f,l,s,h,c;if(!Ve(this))throw new TypeError("invalid invocation. `this` context must be a constructor.");if(!lt(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if((t=arguments.length)>1){if(!Ve(n=arguments[1]))throw new TypeError(F("invalid argument. Second argument must be a function. Value: `%s`.",n));t>2&&(e=arguments[2])}if(ft(r)){if(f=r.length,n){for(o=(i=new this(f))._buffer,c=0,h=0;h=2))throw new TypeError(F("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",s));o[c]=s[0],o[c+1]=s[1]}c+=2}return i}return new this(r)}if(qr(r)){if(n){for(f=r.length,u=r.get&&r.set?ze("default"):Je("default"),h=0;h=2))throw new TypeError(F("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",s));o[c]=s[0],o[c+1]=s[1]}c+=2}return i}return new this(r)}if(Qr(r)&&ut&&Ve(r[Ne])){if(!Ve((o=r[Ne]()).next))throw new TypeError(F("invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.",r));if(a=n?function(r,e,t){var n,i,o,a;for(n=[],a=-1;!(i=r.next()).done;)if(a+=1,Xr(o=e.call(t,i.value,a))&&o.length>=2)n.push(o[0],o[1]);else{if(!Le(o))return new TypeError(F("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",o));n.push(nt(o),it(o))}return n}(o,n,e):ot(o),a instanceof Error)throw a;for(o=(i=new this(f=a.length/2))._buffer,h=0;h=this._length))return st(this._buffer,r)})),Pe(ht.prototype,"buffer",(function(){return this._buffer.buffer})),Pe(ht.prototype,"byteLength",(function(){return this._buffer.byteLength})),Pe(ht.prototype,"byteOffset",(function(){return this._buffer.byteOffset})),N(ht.prototype,"BYTES_PER_ELEMENT",ht.BYTES_PER_ELEMENT),N(ht.prototype,"copyWithin",(function(r,e){if(!ft(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");return 2===arguments.length?this._buffer.copyWithin(2*r,2*e):this._buffer.copyWithin(2*r,2*e,2*arguments[2]),this})),N(ht.prototype,"entries",(function(){var r,e,t,n,i,o,a;if(!ft(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");return e=this,r=this._buffer,n=this._length,o=-1,a=-2,N(t={},"next",(function(){var e;if(o+=1,i||o>=n)return{done:!0};return e=new tt(r[a+=2],r[a+1]),{value:[o,e],done:!1}})),N(t,"return",(function(r){if(i=!0,arguments.length)return{value:r,done:!0};return{done:!0}})),Ne&&N(t,Ne,(function(){return e.entries()})),t})),N(ht.prototype,"every",(function(r,e){var t,n;if(!ft(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Ve(r))throw new TypeError(F("invalid argument. First argument must be a function. Value: `%s`.",r));for(t=this._buffer,n=0;n1){if(!tr(e))throw new TypeError(F("invalid argument. Second argument must be an integer. Value: `%s`.",e));if(e<0&&(e+=i)<0&&(e=0),arguments.length>2){if(!tr(t))throw new TypeError(F("invalid argument. Third argument must be an integer. Value: `%s`.",t));t<0&&(t+=i)<0&&(t=0),t>i&&(t=i)}else t=i}else e=0,t=i;for(a=nt(r),u=it(r),f=e;f=0;n--)if(i=st(t,n),r.call(e,i,n,this))return i})),N(ht.prototype,"findLastIndex",(function(r,e){var t,n,i;if(!ft(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Ve(r))throw new TypeError(F("invalid argument. First argument must be a function. Value: `%s`.",r));for(t=this._buffer,n=this._length-1;n>=0;n--)if(i=st(t,n),r.call(e,i,n,this))return n;return-1})),N(ht.prototype,"forEach",(function(r,e){var t,n,i;if(!ft(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Ve(r))throw new TypeError(F("invalid argument. First argument must be a function. Value: `%s`.",r));for(t=this._buffer,n=0;n=this._length))return st(this._buffer,r)})),Pe(ht.prototype,"length",(function(){return this._length})),N(ht.prototype,"includes",(function(r,e){var t,n,i,o,a;if(!ft(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Le(r))throw new TypeError(F("invalid argument. First argument must be a complex number. Value: `%s`.",r));if(arguments.length>1){if(!tr(e))throw new TypeError(F("invalid argument. Second argument must be an integer. Value: `%s`.",e));e<0&&(e+=this._length)<0&&(e=0)}else e=0;for(i=nt(r),o=it(r),t=this._buffer,a=e;a1){if(!tr(e))throw new TypeError(F("invalid argument. Second argument must be an integer. Value: `%s`.",e));e<0&&(e+=this._length)<0&&(e=0)}else e=0;for(i=nt(r),o=it(r),t=this._buffer,a=e;a1){if(!tr(e))throw new TypeError(F("invalid argument. Second argument must be an integer. Value: `%s`.",e));e>=this._length?e=this._length-1:e<0&&(e+=this._length)}else e=this._length-1;for(i=nt(r),o=it(r),t=this._buffer,a=e;a>=0;a--)if(i===t[n=2*a]&&o===t[n+1])return a;return-1})),N(ht.prototype,"map",(function(r,e){var t,n,i,o,a;if(!ft(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Ve(r))throw new TypeError(F("invalid argument. First argument must be a function. Value: `%s`.",r));for(n=this._buffer,t=(i=new this.constructor(this._length))._buffer,o=0;o1)n=e,o=0;else{if(0===i)throw new Error("invalid operation. If not provided an initial value, an array must contain at least one element.");n=st(t,0),o=1}for(;o1){if(!ur(t=arguments[1]))throw new TypeError(F("invalid argument. Index argument must be a nonnegative integer. Value: `%s`.",t))}else t=0;if(Le(r)){if(t>=this._length)throw new RangeError(F("invalid argument. Index argument is out-of-bounds. Value: `%u`.",t));return n[t*=2]=nt(r),void(n[t+1]=it(r))}if(ft(r)){if(t+(a=r._length)>this._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");if(e=r._buffer,l=n.byteOffset+t*at,e.buffer===n.buffer&&e.byteOffsetl){for(i=new pr(e.length),f=0;fthis._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");if(e=r,l=n.byteOffset+t*at,e.buffer===n.buffer&&e.byteOffsetl){for(i=new pr(a),f=0;fthis._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");for(t*=2,f=0;fu&&(e=u)}}for(t=ri&&(e=i)}}return r>=i?(i=0,t=n.byteLength):r>=e?(i=0,t=n.byteOffset+r*at):(i=e-r,t=n.byteOffset+r*at),new this.constructor(n.buffer,t,i<0?0:i)})),N(ht.prototype,"toReversed",(function(){var r,e,t,n,i,o;if(!ft(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");for(t=this._length,e=new this.constructor(t),n=this._buffer,r=e._buffer,i=0;i=i)throw new RangeError(F("invalid argument. Index argument is out-of-bounds. Value: `%s`.",r));if(!Le(e))throw new TypeError(F("invalid argument. Second argument must be a complex number. Value: `%s`.",e));return(t=(n=new this.constructor(this._buffer))._buffer)[2*r]=nt(e),t[2*r+1]=it(e),n}));var ct={float64:pr,float32:wr,generic:Array,int16:Er,int32:Vr,int8:Fr,uint16:Ir,uint32:Mr,uint8:Yr,uint8c:Zr,complex64:et,complex128:ht};function pt(){return{dtypes:{default:"float64",numeric:"float64",real:"float64",floating_point:"float64",real_floating_point:"float64",complex_floating_point:"complex128",boolean:"bool",integer:"int32",signed_integer:"int32",unsigned_integer:"uint32"}}}var mt={dtypes:{default:"float64",numeric:"float64",real:"float64",floating_point:"float64",real_floating_point:"float64",complex_floating_point:"complex128",boolean:"bool",integer:"int32",signed_integer:"int32",unsigned_integer:"uint32"}},yt={"dtypes.default":mt.dtypes.default,"dtypes.numeric":mt.dtypes.numeric,"dtypes.real":mt.dtypes.real,"dtypes.floating_point":mt.dtypes.floating_point,"dtypes.real_floating_point":mt.dtypes.real_floating_point,"dtypes.complex_floating_point":mt.dtypes.complex_floating_point,"dtypes.boolean":mt.dtypes.boolean,"dtypes.integer":mt.dtypes.integer,"dtypes.signed_integer":mt.dtypes.signed_integer,"dtypes.unsigned_integer":mt.dtypes.unsigned_integer};N(pt,"get",(function(r){var e=yt[r];return void 0===e?null:e}));var gt=pt.get("dtypes.default");function wt(r){var e,t;if(!ur(r))throw new TypeError(F("invalid argument. First argument must be a nonnegative integer. Value: `%s`.",r));if("generic"===(e=arguments.length>1?arguments[1]:gt))return function(r,e){var t,n;for(t=[],n=0;n1?wt(r,arguments[1]):wt(r)}export{vt as default}; -//# sourceMappingURL=mod.js.map diff --git a/mod.js.map b/mod.js.map deleted file mode 100644 index 1b58bf9..0000000 --- a/mod.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"mod.js","sources":["../node_modules/@stdlib/utils-define-property/lib/define_property.js","../node_modules/@stdlib/utils-define-property/lib/builtin.js","../node_modules/@stdlib/string-base-format-interpolate/lib/is_number.js","../node_modules/@stdlib/string-base-format-interpolate/lib/zero_pad.js","../node_modules/@stdlib/string-base-format-interpolate/lib/format_integer.js","../node_modules/@stdlib/string-base-format-interpolate/lib/format_double.js","../node_modules/@stdlib/string-base-format-interpolate/lib/space_pad.js","../node_modules/@stdlib/string-base-format-interpolate/lib/main.js","../node_modules/@stdlib/string-base-format-interpolate/lib/is_string.js","../node_modules/@stdlib/string-base-format-tokenize/lib/main.js","../node_modules/@stdlib/string-format/lib/main.js","../node_modules/@stdlib/string-format/lib/is_string.js","../node_modules/@stdlib/utils-define-property/lib/polyfill.js","../node_modules/@stdlib/utils-define-property/lib/index.js","../node_modules/@stdlib/utils-define-property/lib/has_define_property_support.js","../node_modules/@stdlib/utils-define-nonenumerable-read-only-property/lib/main.js","../node_modules/@stdlib/assert-is-number/lib/primitive.js","../node_modules/@stdlib/assert-has-tostringtag-support/lib/main.js","../node_modules/@stdlib/assert-has-symbol-support/lib/main.js","../node_modules/@stdlib/utils-native-class/lib/tostring.js","../node_modules/@stdlib/assert-has-own-property/lib/main.js","../node_modules/@stdlib/symbol-ctor/lib/main.js","../node_modules/@stdlib/utils-native-class/lib/tostringtag.js","../node_modules/@stdlib/utils-native-class/lib/index.js","../node_modules/@stdlib/utils-native-class/lib/polyfill.js","../node_modules/@stdlib/utils-native-class/lib/main.js","../node_modules/@stdlib/number-ctor/lib/main.js","../node_modules/@stdlib/assert-is-number/lib/tostring.js","../node_modules/@stdlib/assert-is-number/lib/object.js","../node_modules/@stdlib/assert-is-number/lib/try2serialize.js","../node_modules/@stdlib/assert-is-number/lib/main.js","../node_modules/@stdlib/assert-is-number/lib/index.js","../node_modules/@stdlib/constants-float64-pinf/lib/index.js","../node_modules/@stdlib/constants-float64-ninf/lib/index.js","../node_modules/@stdlib/math-base-special-floor/lib/main.js","../node_modules/@stdlib/math-base-assert-is-integer/lib/main.js","../node_modules/@stdlib/assert-is-integer/lib/integer.js","../node_modules/@stdlib/assert-is-integer/lib/primitive.js","../node_modules/@stdlib/assert-is-integer/lib/object.js","../node_modules/@stdlib/assert-is-integer/lib/main.js","../node_modules/@stdlib/assert-is-nonnegative-integer/lib/primitive.js","../node_modules/@stdlib/assert-is-nonnegative-integer/lib/object.js","../node_modules/@stdlib/assert-is-nonnegative-integer/lib/main.js","../node_modules/@stdlib/assert-is-integer/lib/index.js","../node_modules/@stdlib/assert-is-nonnegative-integer/lib/index.js","../node_modules/@stdlib/assert-is-float64array/lib/main.js","../node_modules/@stdlib/assert-has-float64array-support/lib/float64array.js","../node_modules/@stdlib/array-float64/lib/main.js","../node_modules/@stdlib/array-float64/lib/index.js","../node_modules/@stdlib/assert-has-float64array-support/lib/main.js","../node_modules/@stdlib/array-float64/lib/polyfill.js","../node_modules/@stdlib/assert-is-float32array/lib/main.js","../node_modules/@stdlib/assert-has-float32array-support/lib/float32array.js","../node_modules/@stdlib/array-float32/lib/main.js","../node_modules/@stdlib/array-float32/lib/index.js","../node_modules/@stdlib/assert-has-float32array-support/lib/main.js","../node_modules/@stdlib/array-float32/lib/polyfill.js","../node_modules/@stdlib/assert-is-int16array/lib/main.js","../node_modules/@stdlib/constants-int16-max/lib/index.js","../node_modules/@stdlib/assert-has-int16array-support/lib/int16array.js","../node_modules/@stdlib/array-int16/lib/main.js","../node_modules/@stdlib/array-int16/lib/index.js","../node_modules/@stdlib/assert-has-int16array-support/lib/main.js","../node_modules/@stdlib/constants-int16-min/lib/index.js","../node_modules/@stdlib/array-int16/lib/polyfill.js","../node_modules/@stdlib/assert-is-int32array/lib/main.js","../node_modules/@stdlib/constants-int32-max/lib/index.js","../node_modules/@stdlib/assert-has-int32array-support/lib/int32array.js","../node_modules/@stdlib/array-int32/lib/main.js","../node_modules/@stdlib/array-int32/lib/index.js","../node_modules/@stdlib/assert-has-int32array-support/lib/main.js","../node_modules/@stdlib/constants-int32-min/lib/index.js","../node_modules/@stdlib/array-int32/lib/polyfill.js","../node_modules/@stdlib/assert-is-int8array/lib/main.js","../node_modules/@stdlib/constants-int8-max/lib/index.js","../node_modules/@stdlib/assert-has-int8array-support/lib/int8array.js","../node_modules/@stdlib/array-int8/lib/main.js","../node_modules/@stdlib/array-int8/lib/index.js","../node_modules/@stdlib/assert-has-int8array-support/lib/main.js","../node_modules/@stdlib/constants-int8-min/lib/index.js","../node_modules/@stdlib/array-int8/lib/polyfill.js","../node_modules/@stdlib/assert-is-uint16array/lib/main.js","../node_modules/@stdlib/constants-uint16-max/lib/index.js","../node_modules/@stdlib/assert-has-uint16array-support/lib/uint16array.js","../node_modules/@stdlib/array-uint16/lib/main.js","../node_modules/@stdlib/array-uint16/lib/index.js","../node_modules/@stdlib/assert-has-uint16array-support/lib/main.js","../node_modules/@stdlib/array-uint16/lib/polyfill.js","../node_modules/@stdlib/assert-is-uint32array/lib/main.js","../node_modules/@stdlib/constants-uint32-max/lib/index.js","../node_modules/@stdlib/assert-has-uint32array-support/lib/uint32array.js","../node_modules/@stdlib/array-uint32/lib/main.js","../node_modules/@stdlib/array-uint32/lib/index.js","../node_modules/@stdlib/assert-has-uint32array-support/lib/main.js","../node_modules/@stdlib/array-uint32/lib/polyfill.js","../node_modules/@stdlib/assert-is-uint8array/lib/main.js","../node_modules/@stdlib/constants-uint8-max/lib/index.js","../node_modules/@stdlib/assert-has-uint8array-support/lib/uint8array.js","../node_modules/@stdlib/array-uint8/lib/main.js","../node_modules/@stdlib/array-uint8/lib/index.js","../node_modules/@stdlib/assert-has-uint8array-support/lib/main.js","../node_modules/@stdlib/array-uint8/lib/polyfill.js","../node_modules/@stdlib/assert-is-uint8clampedarray/lib/main.js","../node_modules/@stdlib/assert-has-uint8clampedarray-support/lib/uint8clampedarray.js","../node_modules/@stdlib/array-uint8c/lib/main.js","../node_modules/@stdlib/array-uint8c/lib/index.js","../node_modules/@stdlib/assert-has-uint8clampedarray-support/lib/main.js","../node_modules/@stdlib/array-uint8c/lib/polyfill.js","../node_modules/@stdlib/constants-array-max-array-length/lib/index.js","../node_modules/@stdlib/assert-is-array-like-object/lib/main.js","../node_modules/@stdlib/constants-array-max-typed-array-length/lib/index.js","../node_modules/@stdlib/assert-is-collection/lib/main.js","../node_modules/@stdlib/assert-is-arraybuffer/lib/main.js","../node_modules/@stdlib/assert-is-array/lib/main.js","../node_modules/@stdlib/assert-is-object/lib/main.js","../node_modules/@stdlib/assert-is-string/lib/primitive.js","../node_modules/@stdlib/assert-is-string/lib/valueof.js","../node_modules/@stdlib/assert-is-string/lib/object.js","../node_modules/@stdlib/assert-is-string/lib/try2valueof.js","../node_modules/@stdlib/assert-is-string/lib/main.js","../node_modules/@stdlib/assert-is-string/lib/index.js","../node_modules/@stdlib/utils-type-of/lib/fixtures/re.js","../node_modules/@stdlib/assert-is-boolean/lib/primitive.js","../node_modules/@stdlib/boolean-ctor/lib/main.js","../node_modules/@stdlib/assert-is-boolean/lib/tostring.js","../node_modules/@stdlib/assert-is-boolean/lib/object.js","../node_modules/@stdlib/assert-is-boolean/lib/try2serialize.js","../node_modules/@stdlib/assert-is-boolean/lib/main.js","../node_modules/@stdlib/assert-is-boolean/lib/index.js","../node_modules/@stdlib/utils-global/lib/self.js","../node_modules/@stdlib/utils-global/lib/window.js","../node_modules/@stdlib/utils-global/lib/global.js","../node_modules/@stdlib/utils-global/lib/global_this.js","../node_modules/@stdlib/utils-type-of/lib/fixtures/nodelist.js","../node_modules/@stdlib/utils-global/lib/main.js","../node_modules/@stdlib/utils-global/lib/codegen.js","../node_modules/@stdlib/utils-type-of/lib/fixtures/typedarray.js","../node_modules/@stdlib/regexp-function-name/lib/main.js","../node_modules/@stdlib/regexp-function-name/lib/regexp.js","../node_modules/@stdlib/assert-is-object-like/lib/main.js","../node_modules/@stdlib/utils-constructor-name/lib/main.js","../node_modules/@stdlib/assert-is-buffer/lib/main.js","../node_modules/@stdlib/regexp-function-name/lib/index.js","../node_modules/@stdlib/assert-is-object-like/lib/index.js","../node_modules/@stdlib/assert-tools-array-function/lib/main.js","../node_modules/@stdlib/utils-type-of/lib/index.js","../node_modules/@stdlib/utils-type-of/lib/check.js","../node_modules/@stdlib/utils-type-of/lib/polyfill.js","../node_modules/@stdlib/utils-type-of/lib/main.js","../node_modules/@stdlib/assert-is-function/lib/main.js","../node_modules/@stdlib/complex-float64-ctor/lib/main.js","../node_modules/@stdlib/complex-float64-ctor/lib/tostring.js","../node_modules/@stdlib/complex-float64-ctor/lib/tojson.js","../node_modules/@stdlib/number-float64-base-to-float32/lib/main.js","../node_modules/@stdlib/number-float64-base-to-float32/lib/polyfill.js","../node_modules/@stdlib/number-float64-base-to-float32/lib/index.js","../node_modules/@stdlib/complex-float32-ctor/lib/main.js","../node_modules/@stdlib/assert-is-complex-like/lib/main.js","../node_modules/@stdlib/math-base-assert-is-even/lib/main.js","../node_modules/@stdlib/complex-float32-ctor/lib/tostring.js","../node_modules/@stdlib/complex-float32-ctor/lib/tojson.js","../node_modules/@stdlib/array-base-assert-is-complex64array/lib/main.js","../node_modules/@stdlib/array-base-assert-is-complex128array/lib/main.js","../node_modules/@stdlib/assert-has-iterator-symbol-support/lib/main.js","../node_modules/@stdlib/symbol-iterator/lib/main.js","../node_modules/@stdlib/utils-define-nonenumerable-read-only-accessor/lib/main.js","../node_modules/@stdlib/complex-float32/lib/main.js","../node_modules/@stdlib/complex-realf/lib/main.js","../node_modules/@stdlib/complex-imagf/lib/main.js","../node_modules/@stdlib/strided-base-reinterpret-complex64/lib/main.js","../node_modules/@stdlib/strided-base-reinterpret-complex128/lib/main.js","../node_modules/@stdlib/complex-float32/lib/tostring.js","../node_modules/@stdlib/complex-float32/lib/tojson.js","../node_modules/@stdlib/array-base-getter/lib/main.js","../node_modules/@stdlib/array-base-accessor-getter/lib/main.js","../node_modules/@stdlib/array-complex64/lib/from_iterator.js","../node_modules/@stdlib/array-complex64/lib/main.js","../node_modules/@stdlib/array-complex64/lib/from_array.js","../node_modules/@stdlib/complex-float64/lib/main.js","../node_modules/@stdlib/complex-real/lib/main.js","../node_modules/@stdlib/complex-imag/lib/main.js","../node_modules/@stdlib/array-complex128/lib/from_iterator.js","../node_modules/@stdlib/array-complex64/lib/from_iterator_map.js","../node_modules/@stdlib/complex-float64/lib/tostring.js","../node_modules/@stdlib/complex-float64/lib/tojson.js","../node_modules/@stdlib/array-complex128/lib/main.js","../node_modules/@stdlib/array-complex128/lib/from_array.js","../node_modules/@stdlib/array-complex128/lib/from_iterator_map.js","../node_modules/@stdlib/array-ctors/lib/ctors.js","../node_modules/@stdlib/array-defaults/lib/main.js","../node_modules/@stdlib/array-defaults/lib/get.js","../node_modules/@stdlib/array-defaults/lib/index.js","../node_modules/@stdlib/array-zeros/lib/main.js","../node_modules/@stdlib/array-base-filled/lib/main.js","../node_modules/@stdlib/array-base-zeros/lib/main.js","../node_modules/@stdlib/array-ctors/lib/main.js","../lib/polyfill.js"],"sourcesContent":["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Object.defineProperty === 'function' ) ? Object.defineProperty : null;\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Defines (or modifies) an object property.\n*\n* ## Notes\n*\n* - Property descriptors come in two flavors: **data descriptors** and **accessor descriptors**. A data descriptor is a property that has a value, which may or may not be writable. An accessor descriptor is a property described by a getter-setter function pair. A descriptor must be one of these two flavors and cannot be both.\n*\n* @name defineProperty\n* @type {Function}\n* @param {Object} obj - object on which to define the property\n* @param {(string|symbol)} prop - property name\n* @param {Object} descriptor - property descriptor\n* @param {boolean} [descriptor.configurable=false] - boolean indicating if property descriptor can be changed and if the property can be deleted from the provided object\n* @param {boolean} [descriptor.enumerable=false] - boolean indicating if the property shows up when enumerating object properties\n* @param {boolean} [descriptor.writable=false] - boolean indicating if the value associated with the property can be changed with an assignment operator\n* @param {*} [descriptor.value] - property value\n* @param {(Function|void)} [descriptor.get=undefined] - function which serves as a getter for the property, or, if no getter, undefined. When the property is accessed, a getter function is called without arguments and with the `this` context set to the object through which the property is accessed (which may not be the object on which the property is defined due to inheritance). The return value will be used as the property value.\n* @param {(Function|void)} [descriptor.set=undefined] - function which serves as a setter for the property, or, if no setter, undefined. When assigning a property value, a setter function is called with one argument (the value being assigned to the property) and with the `this` context set to the object through which the property is assigned.\n* @throws {TypeError} first argument must be an object\n* @throws {TypeError} third argument must be an object\n* @throws {Error} property descriptor cannot have both a value and a setter and/or getter\n* @returns {Object} object with added property\n*\n* @example\n* var obj = {};\n*\n* defineProperty( obj, 'foo', {\n* 'value': 'bar'\n* });\n*\n* var str = obj.foo;\n* // returns 'bar'\n*/\nvar defineProperty = Object.defineProperty;\n\n\n// EXPORTS //\n\nexport default defineProperty;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Tests if a value is a number primitive.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number primitive\n*\n* @example\n* var bool = isNumber( 3.14 );\n* // returns true\n*\n* @example\n* var bool = isNumber( NaN );\n* // returns true\n*\n* @example\n* var bool = isNumber( new Number( 3.14 ) );\n* // returns false\n*/\nfunction isNumber( value ) {\n\treturn ( typeof value === 'number' ); // NOTE: we inline the `isNumber.isPrimitive` function from `@stdlib/assert/is-number` in order to avoid circular dependencies.\n}\n\n\n// EXPORTS //\n\nexport default isNumber;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// FUNCTIONS //\n\n/**\n* Tests if a string starts with a minus sign (`-`).\n*\n* @private\n* @param {string} str - input string\n* @returns {boolean} boolean indicating if a string starts with a minus sign (`-`)\n*/\nfunction startsWithMinus( str ) {\n\treturn str[ 0 ] === '-';\n}\n\n/**\n* Returns a string of `n` zeros.\n*\n* @private\n* @param {number} n - number of zeros\n* @returns {string} string of zeros\n*/\nfunction zeros( n ) {\n\tvar out = '';\n\tvar i;\n\tfor ( i = 0; i < n; i++ ) {\n\t\tout += '0';\n\t}\n\treturn out;\n}\n\n\n// MAIN //\n\n/**\n* Pads a token with zeros to the specified width.\n*\n* @private\n* @param {string} str - token argument\n* @param {number} width - token width\n* @param {boolean} [right=false] - boolean indicating whether to pad to the right\n* @returns {string} padded token argument\n*/\nfunction zeroPad( str, width, right ) {\n\tvar negative = false;\n\tvar pad = width - str.length;\n\tif ( pad < 0 ) {\n\t\treturn str;\n\t}\n\tif ( startsWithMinus( str ) ) {\n\t\tnegative = true;\n\t\tstr = str.substr( 1 );\n\t}\n\tstr = ( right ) ?\n\t\tstr + zeros( pad ) :\n\t\tzeros( pad ) + str;\n\tif ( negative ) {\n\t\tstr = '-' + str;\n\t}\n\treturn str;\n}\n\n\n// EXPORTS //\n\nexport default zeroPad;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isNumber from './is_number.js';\nimport zeroPad from './zero_pad.js';\n\n// NOTE: for the following, we explicitly avoid using stdlib packages in this particular package in order to avoid circular dependencies.\nvar lowercase = String.prototype.toLowerCase;\nvar uppercase = String.prototype.toUpperCase;\n\n\n// MAIN //\n\n/**\n* Formats a token object argument as an integer.\n*\n* @private\n* @param {Object} token - token object\n* @throws {Error} must provide a valid integer\n* @returns {string} formatted token argument\n*/\nfunction formatInteger( token ) {\n\tvar base;\n\tvar out;\n\tvar i;\n\n\tswitch ( token.specifier ) {\n\tcase 'b':\n\t\t// Case: %b (binary)\n\t\tbase = 2;\n\t\tbreak;\n\tcase 'o':\n\t\t// Case: %o (octal)\n\t\tbase = 8;\n\t\tbreak;\n\tcase 'x':\n\tcase 'X':\n\t\t// Case: %x, %X (hexadecimal)\n\t\tbase = 16;\n\t\tbreak;\n\tcase 'd':\n\tcase 'i':\n\tcase 'u':\n\tdefault:\n\t\t// Case: %d, %i, %u (decimal)\n\t\tbase = 10;\n\t\tbreak;\n\t}\n\tout = token.arg;\n\ti = parseInt( out, 10 );\n\tif ( !isFinite( i ) ) { // NOTE: We use the global `isFinite` function here instead of `@stdlib/math/base/assert/is-finite` in order to avoid circular dependencies.\n\t\tif ( !isNumber( out ) ) {\n\t\t\tthrow new Error( 'invalid integer. Value: ' + out );\n\t\t}\n\t\ti = 0;\n\t}\n\tif ( i < 0 && ( token.specifier === 'u' || base !== 10 ) ) {\n\t\ti = 0xffffffff + i + 1;\n\t}\n\tif ( i < 0 ) {\n\t\tout = ( -i ).toString( base );\n\t\tif ( token.precision ) {\n\t\t\tout = zeroPad( out, token.precision, token.padRight );\n\t\t}\n\t\tout = '-' + out;\n\t} else {\n\t\tout = i.toString( base );\n\t\tif ( !i && !token.precision ) {\n\t\t\tout = '';\n\t\t} else if ( token.precision ) {\n\t\t\tout = zeroPad( out, token.precision, token.padRight );\n\t\t}\n\t\tif ( token.sign ) {\n\t\t\tout = token.sign + out;\n\t\t}\n\t}\n\tif ( base === 16 ) {\n\t\tif ( token.alternate ) {\n\t\t\tout = '0x' + out;\n\t\t}\n\t\tout = ( token.specifier === uppercase.call( token.specifier ) ) ?\n\t\t\tuppercase.call( out ) :\n\t\t\tlowercase.call( out );\n\t}\n\tif ( base === 8 ) {\n\t\tif ( token.alternate && out.charAt( 0 ) !== '0' ) {\n\t\t\tout = '0' + out;\n\t\t}\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default formatInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isNumber from './is_number.js';\n\n// NOTE: for the following, we explicitly avoid using stdlib packages in this particular package in order to avoid circular dependencies.\nvar abs = Math.abs; // eslint-disable-line stdlib/no-builtin-math\nvar lowercase = String.prototype.toLowerCase;\nvar uppercase = String.prototype.toUpperCase;\nvar replace = String.prototype.replace;\n\n\n// VARIABLES //\n\nvar RE_EXP_POS_DIGITS = /e\\+(\\d)$/;\nvar RE_EXP_NEG_DIGITS = /e-(\\d)$/;\nvar RE_ONLY_DIGITS = /^(\\d+)$/;\nvar RE_DIGITS_BEFORE_EXP = /^(\\d+)e/;\nvar RE_TRAILING_PERIOD_ZERO = /\\.0$/;\nvar RE_PERIOD_ZERO_EXP = /\\.0*e/;\nvar RE_ZERO_BEFORE_EXP = /(\\..*[^0])0*e/;\n\n\n// MAIN //\n\n/**\n* Formats a token object argument as a floating-point number.\n*\n* @private\n* @param {Object} token - token object\n* @throws {Error} must provide a valid floating-point number\n* @returns {string} formatted token argument\n*/\nfunction formatDouble( token ) {\n\tvar digits;\n\tvar out;\n\tvar f = parseFloat( token.arg );\n\tif ( !isFinite( f ) ) { // NOTE: We use the global `isFinite` function here instead of `@stdlib/math/base/assert/is-finite` in order to avoid circular dependencies.\n\t\tif ( !isNumber( token.arg ) ) {\n\t\t\tthrow new Error( 'invalid floating-point number. Value: ' + out );\n\t\t}\n\t\t// Case: NaN, Infinity, or -Infinity\n\t\tf = token.arg;\n\t}\n\tswitch ( token.specifier ) {\n\tcase 'e':\n\tcase 'E':\n\t\tout = f.toExponential( token.precision );\n\t\tbreak;\n\tcase 'f':\n\tcase 'F':\n\t\tout = f.toFixed( token.precision );\n\t\tbreak;\n\tcase 'g':\n\tcase 'G':\n\t\tif ( abs( f ) < 0.0001 ) {\n\t\t\tdigits = token.precision;\n\t\t\tif ( digits > 0 ) {\n\t\t\t\tdigits -= 1;\n\t\t\t}\n\t\t\tout = f.toExponential( digits );\n\t\t} else {\n\t\t\tout = f.toPrecision( token.precision );\n\t\t}\n\t\tif ( !token.alternate ) {\n\t\t\tout = replace.call( out, RE_ZERO_BEFORE_EXP, '$1e' );\n\t\t\tout = replace.call( out, RE_PERIOD_ZERO_EXP, 'e' );\n\t\t\tout = replace.call( out, RE_TRAILING_PERIOD_ZERO, '' );\n\t\t}\n\t\tbreak;\n\tdefault:\n\t\tthrow new Error( 'invalid double notation. Value: ' + token.specifier );\n\t}\n\tout = replace.call( out, RE_EXP_POS_DIGITS, 'e+0$1' );\n\tout = replace.call( out, RE_EXP_NEG_DIGITS, 'e-0$1' );\n\tif ( token.alternate ) {\n\t\tout = replace.call( out, RE_ONLY_DIGITS, '$1.' );\n\t\tout = replace.call( out, RE_DIGITS_BEFORE_EXP, '$1.e' );\n\t}\n\tif ( f >= 0 && token.sign ) {\n\t\tout = token.sign + out;\n\t}\n\tout = ( token.specifier === uppercase.call( token.specifier ) ) ?\n\t\tuppercase.call( out ) :\n\t\tlowercase.call( out );\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default formatDouble;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// FUNCTIONS //\n\n/**\n* Returns `n` spaces.\n*\n* @private\n* @param {number} n - number of spaces\n* @returns {string} string of spaces\n*/\nfunction spaces( n ) {\n\tvar out = '';\n\tvar i;\n\tfor ( i = 0; i < n; i++ ) {\n\t\tout += ' ';\n\t}\n\treturn out;\n}\n\n\n// MAIN //\n\n/**\n* Pads a token with spaces to the specified width.\n*\n* @private\n* @param {string} str - token argument\n* @param {number} width - token width\n* @param {boolean} [right=false] - boolean indicating whether to pad to the right\n* @returns {string} padded token argument\n*/\nfunction spacePad( str, width, right ) {\n\tvar pad = width - str.length;\n\tif ( pad < 0 ) {\n\t\treturn str;\n\t}\n\tstr = ( right ) ?\n\t\tstr + spaces( pad ) :\n\t\tspaces( pad ) + str;\n\treturn str;\n}\n\n\n// EXPORTS //\n\nexport default spacePad;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport formatInteger from './format_integer.js';\nimport isString from './is_string.js';\nimport formatDouble from './format_double.js';\nimport spacePad from './space_pad.js';\nimport zeroPad from './zero_pad.js';\n\n\n// VARIABLES //\n\nvar fromCharCode = String.fromCharCode;\nvar isArray = Array.isArray; // NOTE: We use the global `Array.isArray` function here instead of `@stdlib/assert/is-array` to avoid circular dependencies.\n\n\n// FUNCTIONS //\n\n/**\n* Returns a boolean indicating whether a value is `NaN`.\n*\n* @private\n* @param {*} value - input value\n* @returns {boolean} boolean indicating whether a value is `NaN`\n*\n* @example\n* var bool = isnan( NaN );\n* // returns true\n*\n* @example\n* var bool = isnan( 4 );\n* // returns false\n*/\nfunction isnan( value ) { // explicitly define a function here instead of `@stdlib/math/base/assert/is-nan` in order to avoid circular dependencies\n\treturn ( value !== value );\n}\n\n/**\n* Initializes token object with properties of supplied format identifier object or default values if not present.\n*\n* @private\n* @param {Object} token - format identifier object\n* @returns {Object} token object\n*/\nfunction initialize( token ) {\n\tvar out = {};\n\tout.specifier = token.specifier;\n\tout.precision = ( token.precision === void 0 ) ? 1 : token.precision;\n\tout.width = token.width;\n\tout.flags = token.flags || '';\n\tout.mapping = token.mapping;\n\treturn out;\n}\n\n\n// MAIN //\n\n/**\n* Generates string from a token array by interpolating values.\n*\n* @param {Array} tokens - string parts and format identifier objects\n* @param {Array} ...args - variable values\n* @throws {TypeError} first argument must be an array\n* @throws {Error} invalid flags\n* @returns {string} formatted string\n*\n* @example\n* var tokens = [ 'beep ', { 'specifier': 's' } ];\n* var out = formatInterpolate( tokens, 'boop' );\n* // returns 'beep boop'\n*/\nfunction formatInterpolate( tokens ) {\n\tvar hasPeriod;\n\tvar flags;\n\tvar token;\n\tvar flag;\n\tvar num;\n\tvar out;\n\tvar pos;\n\tvar i;\n\tvar j;\n\n\tif ( !isArray( tokens ) ) {\n\t\tthrow new TypeError( 'invalid argument. First argument must be an array. Value: `' + tokens + '`.' );\n\t}\n\tout = '';\n\tpos = 1;\n\tfor ( i = 0; i < tokens.length; i++ ) {\n\t\ttoken = tokens[ i ];\n\t\tif ( isString( token ) ) {\n\t\t\tout += token;\n\t\t} else {\n\t\t\thasPeriod = token.precision !== void 0;\n\t\t\ttoken = initialize( token );\n\t\t\tif ( !token.specifier ) {\n\t\t\t\tthrow new TypeError( 'invalid argument. Token is missing `specifier` property. Index: `'+ i +'`. Value: `' + token + '`.' );\n\t\t\t}\n\t\t\tif ( token.mapping ) {\n\t\t\t\tpos = token.mapping;\n\t\t\t}\n\t\t\tflags = token.flags;\n\t\t\tfor ( j = 0; j < flags.length; j++ ) {\n\t\t\t\tflag = flags.charAt( j );\n\t\t\t\tswitch ( flag ) {\n\t\t\t\tcase ' ':\n\t\t\t\t\ttoken.sign = ' ';\n\t\t\t\t\tbreak;\n\t\t\t\tcase '+':\n\t\t\t\t\ttoken.sign = '+';\n\t\t\t\t\tbreak;\n\t\t\t\tcase '-':\n\t\t\t\t\ttoken.padRight = true;\n\t\t\t\t\ttoken.padZeros = false;\n\t\t\t\t\tbreak;\n\t\t\t\tcase '0':\n\t\t\t\t\ttoken.padZeros = flags.indexOf( '-' ) < 0; // NOTE: We use built-in `Array.prototype.indexOf` here instead of `@stdlib/assert/contains` in order to avoid circular dependencies.\n\t\t\t\t\tbreak;\n\t\t\t\tcase '#':\n\t\t\t\t\ttoken.alternate = true;\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tthrow new Error( 'invalid flag: ' + flag );\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( token.width === '*' ) {\n\t\t\t\ttoken.width = parseInt( arguments[ pos ], 10 );\n\t\t\t\tpos += 1;\n\t\t\t\tif ( isnan( token.width ) ) {\n\t\t\t\t\tthrow new TypeError( 'the argument for * width at position ' + pos + ' is not a number. Value: `' + token.width + '`.' );\n\t\t\t\t}\n\t\t\t\tif ( token.width < 0 ) {\n\t\t\t\t\ttoken.padRight = true;\n\t\t\t\t\ttoken.width = -token.width;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( hasPeriod ) {\n\t\t\t\tif ( token.precision === '*' ) {\n\t\t\t\t\ttoken.precision = parseInt( arguments[ pos ], 10 );\n\t\t\t\t\tpos += 1;\n\t\t\t\t\tif ( isnan( token.precision ) ) {\n\t\t\t\t\t\tthrow new TypeError( 'the argument for * precision at position ' + pos + ' is not a number. Value: `' + token.precision + '`.' );\n\t\t\t\t\t}\n\t\t\t\t\tif ( token.precision < 0 ) {\n\t\t\t\t\t\ttoken.precision = 1;\n\t\t\t\t\t\thasPeriod = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\ttoken.arg = arguments[ pos ];\n\t\t\tswitch ( token.specifier ) {\n\t\t\tcase 'b':\n\t\t\tcase 'o':\n\t\t\tcase 'x':\n\t\t\tcase 'X':\n\t\t\tcase 'd':\n\t\t\tcase 'i':\n\t\t\tcase 'u':\n\t\t\t\t// Case: %b (binary), %o (octal), %x, %X (hexadecimal), %d, %i (decimal), %u (unsigned decimal)\n\t\t\t\tif ( hasPeriod ) {\n\t\t\t\t\ttoken.padZeros = false;\n\t\t\t\t}\n\t\t\t\ttoken.arg = formatInteger( token );\n\t\t\t\tbreak;\n\t\t\tcase 's':\n\t\t\t\t// Case: %s (string)\n\t\t\t\ttoken.maxWidth = ( hasPeriod ) ? token.precision : -1;\n\t\t\t\ttoken.arg = String( token.arg );\n\t\t\t\tbreak;\n\t\t\tcase 'c':\n\t\t\t\t// Case: %c (character)\n\t\t\t\tif ( !isnan( token.arg ) ) {\n\t\t\t\t\tnum = parseInt( token.arg, 10 );\n\t\t\t\t\tif ( num < 0 || num > 127 ) {\n\t\t\t\t\t\tthrow new Error( 'invalid character code. Value: ' + token.arg );\n\t\t\t\t\t}\n\t\t\t\t\ttoken.arg = ( isnan( num ) ) ? String( token.arg ) : fromCharCode( num ); // eslint-disable-line max-len\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'e':\n\t\t\tcase 'E':\n\t\t\tcase 'f':\n\t\t\tcase 'F':\n\t\t\tcase 'g':\n\t\t\tcase 'G':\n\t\t\t\t// Case: %e, %E (scientific notation), %f, %F (decimal floating point), %g, %G (uses the shorter of %e/E or %f/F)\n\t\t\t\tif ( !hasPeriod ) {\n\t\t\t\t\ttoken.precision = 6;\n\t\t\t\t}\n\t\t\t\ttoken.arg = formatDouble( token );\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tthrow new Error( 'invalid specifier: ' + token.specifier );\n\t\t\t}\n\t\t\t// Fit argument into field width...\n\t\t\tif ( token.maxWidth >= 0 && token.arg.length > token.maxWidth ) {\n\t\t\t\ttoken.arg = token.arg.substring( 0, token.maxWidth );\n\t\t\t}\n\t\t\tif ( token.padZeros ) {\n\t\t\t\ttoken.arg = zeroPad( token.arg, token.width || token.precision, token.padRight ); // eslint-disable-line max-len\n\t\t\t} else if ( token.width ) {\n\t\t\t\ttoken.arg = spacePad( token.arg, token.width, token.padRight );\n\t\t\t}\n\t\t\tout += token.arg || '';\n\t\t\tpos += 1;\n\t\t}\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default formatInterpolate;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Tests if a value is a string primitive.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a string primitive\n*\n* @example\n* var bool = isString( 'beep' );\n* // returns true\n*\n* @example\n* var bool = isString( new String( 'beep' ) );\n* // returns false\n*/\nfunction isString( value ) {\n\treturn ( typeof value === 'string' ); // NOTE: we inline the `isString.isPrimitive` function from `@stdlib/assert/is-string` in order to avoid circular dependencies.\n}\n\n\n// EXPORTS //\n\nexport default isString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// VARIABLES //\n\nvar RE = /%(?:([1-9]\\d*)\\$)?([0 +\\-#]*)(\\*|\\d+)?(?:(\\.)(\\*|\\d+)?)?[hlL]?([%A-Za-z])/g;\n\n\n// FUNCTIONS //\n\n/**\n* Parses a delimiter.\n*\n* @private\n* @param {Array} match - regular expression match\n* @returns {Object} delimiter token object\n*/\nfunction parse( match ) {\n\tvar token = {\n\t\t'mapping': ( match[ 1 ] ) ? parseInt( match[ 1 ], 10 ) : void 0,\n\t\t'flags': match[ 2 ],\n\t\t'width': match[ 3 ],\n\t\t'precision': match[ 5 ],\n\t\t'specifier': match[ 6 ]\n\t};\n\tif ( match[ 4 ] === '.' && match[ 5 ] === void 0 ) {\n\t\ttoken.precision = '1';\n\t}\n\treturn token;\n}\n\n\n// MAIN //\n\n/**\n* Tokenizes a string into an array of string parts and format identifier objects.\n*\n* @param {string} str - input string\n* @returns {Array} tokens\n*\n* @example\n* var tokens = formatTokenize( 'Hello %s!' );\n* // returns [ 'Hello ', {...}, '!' ]\n*/\nfunction formatTokenize( str ) {\n\tvar content;\n\tvar tokens;\n\tvar match;\n\tvar prev;\n\n\ttokens = [];\n\tprev = 0;\n\tmatch = RE.exec( str );\n\twhile ( match ) {\n\t\tcontent = str.slice( prev, RE.lastIndex - match[ 0 ].length );\n\t\tif ( content.length ) {\n\t\t\ttokens.push( content );\n\t\t}\n\t\ttokens.push( parse( match ) );\n\t\tprev = RE.lastIndex;\n\t\tmatch = RE.exec( str );\n\t}\n\tcontent = str.slice( prev );\n\tif ( content.length ) {\n\t\ttokens.push( content );\n\t}\n\treturn tokens;\n}\n\n\n// EXPORTS //\n\nexport default formatTokenize;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport interpolate from '@stdlib/string-base-format-interpolate';\nimport tokenize from '@stdlib/string-base-format-tokenize';\nimport isString from './is_string.js';\n\n\n// MAIN //\n\n/**\n* Inserts supplied variable values into a format string.\n*\n* @param {string} str - input string\n* @param {Array} ...args - variable values\n* @throws {TypeError} first argument must be a string\n* @throws {Error} invalid flags\n* @returns {string} formatted string\n*\n* @example\n* var str = format( 'Hello %s!', 'world' );\n* // returns 'Hello world!'\n*\n* @example\n* var str = format( 'Pi: ~%.2f', 3.141592653589793 );\n* // returns 'Pi: ~3.14'\n*/\nfunction format( str ) {\n\tvar args;\n\tvar i;\n\n\tif ( !isString( str ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a string. Value: `%s`.', str ) );\n\t}\n\targs = [ tokenize( str ) ];\n\tfor ( i = 1; i < arguments.length; i++ ) {\n\t\targs.push( arguments[ i ] );\n\t}\n\treturn interpolate.apply( null, args );\n}\n\n\n// EXPORTS //\n\nexport default format;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Tests if a value is a string primitive.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a string primitive\n*\n* @example\n* var bool = isString( 'beep' );\n* // returns true\n*\n* @example\n* var bool = isString( new String( 'beep' ) );\n* // returns false\n*/\nfunction isString( value ) {\n\treturn ( typeof value === 'string' ); // NOTE: we inline the `isString.isPrimitive` function from `@stdlib/assert/is-string` in order to avoid circular dependencies.\n}\n\n\n// EXPORTS //\n\nexport default isString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable no-underscore-dangle, no-proto */\n\n'use strict';\n\n// MODULES //\n\nimport format from '@stdlib/string-format';\n\n\n// VARIABLES //\n\nvar objectProtoype = Object.prototype;\nvar toStr = objectProtoype.toString;\nvar defineGetter = objectProtoype.__defineGetter__;\nvar defineSetter = objectProtoype.__defineSetter__;\nvar lookupGetter = objectProtoype.__lookupGetter__;\nvar lookupSetter = objectProtoype.__lookupSetter__;\n\n\n// MAIN //\n\n/**\n* Defines (or modifies) an object property.\n*\n* ## Notes\n*\n* - Property descriptors come in two flavors: **data descriptors** and **accessor descriptors**. A data descriptor is a property that has a value, which may or may not be writable. An accessor descriptor is a property described by a getter-setter function pair. A descriptor must be one of these two flavors and cannot be both.\n*\n* @param {Object} obj - object on which to define the property\n* @param {string} prop - property name\n* @param {Object} descriptor - property descriptor\n* @param {boolean} [descriptor.configurable=false] - boolean indicating if property descriptor can be changed and if the property can be deleted from the provided object\n* @param {boolean} [descriptor.enumerable=false] - boolean indicating if the property shows up when enumerating object properties\n* @param {boolean} [descriptor.writable=false] - boolean indicating if the value associated with the property can be changed with an assignment operator\n* @param {*} [descriptor.value] - property value\n* @param {(Function|void)} [descriptor.get=undefined] - function which serves as a getter for the property, or, if no getter, undefined. When the property is accessed, a getter function is called without arguments and with the `this` context set to the object through which the property is accessed (which may not be the object on which the property is defined due to inheritance). The return value will be used as the property value.\n* @param {(Function|void)} [descriptor.set=undefined] - function which serves as a setter for the property, or, if no setter, undefined. When assigning a property value, a setter function is called with one argument (the value being assigned to the property) and with the `this` context set to the object through which the property is assigned.\n* @throws {TypeError} first argument must be an object\n* @throws {TypeError} third argument must be an object\n* @throws {Error} property descriptor cannot have both a value and a setter and/or getter\n* @returns {Object} object with added property\n*\n* @example\n* var obj = {};\n*\n* defineProperty( obj, 'foo', {\n* 'value': 'bar'\n* });\n*\n* var str = obj.foo;\n* // returns 'bar'\n*/\nfunction defineProperty( obj, prop, descriptor ) {\n\tvar prototype;\n\tvar hasValue;\n\tvar hasGet;\n\tvar hasSet;\n\n\tif ( typeof obj !== 'object' || obj === null || toStr.call( obj ) === '[object Array]' ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be an object. Value: `%s`.', obj ) );\n\t}\n\tif ( typeof descriptor !== 'object' || descriptor === null || toStr.call( descriptor ) === '[object Array]' ) {\n\t\tthrow new TypeError( format( 'invalid argument. Property descriptor must be an object. Value: `%s`.', descriptor ) );\n\t}\n\thasValue = ( 'value' in descriptor );\n\tif ( hasValue ) {\n\t\tif (\n\t\t\tlookupGetter.call( obj, prop ) ||\n\t\t\tlookupSetter.call( obj, prop )\n\t\t) {\n\t\t\t// Override `__proto__` to avoid touching inherited accessors:\n\t\t\tprototype = obj.__proto__;\n\t\t\tobj.__proto__ = objectProtoype;\n\n\t\t\t// Delete property as existing getters/setters prevent assigning value to specified property:\n\t\t\tdelete obj[ prop ];\n\t\t\tobj[ prop ] = descriptor.value;\n\n\t\t\t// Restore original prototype:\n\t\t\tobj.__proto__ = prototype;\n\t\t} else {\n\t\t\tobj[ prop ] = descriptor.value;\n\t\t}\n\t}\n\thasGet = ( 'get' in descriptor );\n\thasSet = ( 'set' in descriptor );\n\n\tif ( hasValue && ( hasGet || hasSet ) ) {\n\t\tthrow new Error( 'invalid argument. Cannot specify one or more accessors and a value or writable attribute in the property descriptor.' );\n\t}\n\n\tif ( hasGet && defineGetter ) {\n\t\tdefineGetter.call( obj, prop, descriptor.get );\n\t}\n\tif ( hasSet && defineSetter ) {\n\t\tdefineSetter.call( obj, prop, descriptor.set );\n\t}\n\treturn obj;\n}\n\n\n// EXPORTS //\n\nexport default defineProperty;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Define (or modify) an object property.\n*\n* @module @stdlib/utils-define-property\n*\n* @example\n* import defineProperty from '@stdlib/utils-define-property';\n*\n* var obj = {};\n* defineProperty( obj, 'foo', {\n* 'value': 'bar',\n* 'writable': false,\n* 'configurable': false,\n* 'enumerable': false\n* });\n* obj.foo = 'boop'; // => throws\n*/\n\n// MODULES //\n\nimport hasDefinePropertySupport from './has_define_property_support.js';\nimport builtin from './builtin.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar defineProperty;\nif ( hasDefinePropertySupport() ) {\n\tdefineProperty = builtin;\n} else {\n\tdefineProperty = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default defineProperty;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport defineProperty from './define_property.js';\n\n\n// MAIN //\n\n/**\n* Tests for `Object.defineProperty` support.\n*\n* @private\n* @returns {boolean} boolean indicating if an environment has `Object.defineProperty` support\n*\n* @example\n* var bool = hasDefinePropertySupport();\n* // returns \n*/\nfunction hasDefinePropertySupport() {\n\t// Test basic support...\n\ttry {\n\t\tdefineProperty( {}, 'x', {} );\n\t\treturn true;\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\treturn false;\n\t}\n}\n\n\n// EXPORTS //\n\nexport default hasDefinePropertySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport defineProperty from '@stdlib/utils-define-property';\n\n\n// MAIN //\n\n/**\n* Defines a non-enumerable read-only property.\n*\n* @param {Object} obj - object on which to define the property\n* @param {(string|symbol)} prop - property name\n* @param {*} value - value to set\n*\n* @example\n* var obj = {};\n*\n* setNonEnumerableReadOnly( obj, 'foo', 'bar' );\n*\n* try {\n* obj.foo = 'boop';\n* } catch ( err ) {\n* console.error( err.message );\n* }\n*/\nfunction setNonEnumerableReadOnly( obj, prop, value ) {\n\tdefineProperty( obj, prop, {\n\t\t'configurable': false,\n\t\t'enumerable': false,\n\t\t'writable': false,\n\t\t'value': value\n\t});\n}\n\n\n// EXPORTS //\n\nexport default setNonEnumerableReadOnly;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Tests if a value is a number primitive.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number primitive\n*\n* @example\n* var bool = isNumber( 3.14 );\n* // returns true\n*\n* @example\n* var bool = isNumber( NaN );\n* // returns true\n*\n* @example\n* var bool = isNumber( new Number( 3.14 ) );\n* // returns false\n*/\nfunction isNumber( value ) {\n\treturn ( typeof value === 'number' );\n}\n\n\n// EXPORTS //\n\nexport default isNumber;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport hasSymbols from '@stdlib/assert-has-symbol-support';\n\n\n// VARIABLES //\n\nvar FLG = hasSymbols();\n\n\n// MAIN //\n\n/**\n* Tests for native `toStringTag` support.\n*\n* @returns {boolean} boolean indicating if an environment has `toStringTag` support\n*\n* @example\n* var bool = hasToStringTagSupport();\n* // returns \n*/\nfunction hasToStringTagSupport() {\n\treturn ( FLG && typeof Symbol.toStringTag === 'symbol' );\n}\n\n\n// EXPORTS //\n\nexport default hasToStringTagSupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Tests for native `Symbol` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Symbol` support\n*\n* @example\n* var bool = hasSymbolSupport();\n* // returns \n*/\nfunction hasSymbolSupport() {\n\treturn (\n\t\ttypeof Symbol === 'function' &&\n\t\ttypeof Symbol( 'foo' ) === 'symbol'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default hasSymbolSupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar toStr = Object.prototype.toString;\n\n\n// EXPORTS //\n\nexport default toStr;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// FUNCTIONS //\n\nvar has = Object.prototype.hasOwnProperty;\n\n\n// MAIN //\n\n/**\n* Tests if an object has a specified property.\n*\n* @param {*} value - value to test\n* @param {*} property - property to test\n* @returns {boolean} boolean indicating if an object has a specified property\n*\n* @example\n* var beep = {\n* 'boop': true\n* };\n*\n* var bool = hasOwnProp( beep, 'boop' );\n* // returns true\n*\n* @example\n* var beep = {\n* 'boop': true\n* };\n*\n* var bool = hasOwnProp( beep, 'bap' );\n* // returns false\n*/\nfunction hasOwnProp( value, property ) {\n\tif (\n\t\tvalue === void 0 ||\n\t\tvalue === null\n\t) {\n\t\treturn false;\n\t}\n\treturn has.call( value, property );\n}\n\n\n// EXPORTS //\n\nexport default hasOwnProp;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar Sym = ( typeof Symbol === 'function' ) ? Symbol : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default Sym;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport Symbol from '@stdlib/symbol-ctor';\n\n\n// MAIN //\n\nvar toStrTag = ( typeof Symbol === 'function' ) ? Symbol.toStringTag : '';\n\n\n// EXPORTS //\n\nexport default toStrTag;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Return a string value indicating a specification defined classification of an object.\n*\n* @module @stdlib/utils-native-class\n*\n* @example\n* import nativeClass from '@stdlib/utils-native-class';\n*\n* var str = nativeClass( 'a' );\n* // returns '[object String]'\n*\n* str = nativeClass( 5 );\n* // returns '[object Number]'\n*\n* function Beep() {\n* return this;\n* }\n* str = nativeClass( new Beep() );\n* // returns '[object Object]'\n*/\n\n// MODULES //\n\nimport hasToStringTag from '@stdlib/assert-has-tostringtag-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar main;\nif ( hasToStringTag() ) {\n\tmain = polyfill;\n} else {\n\tmain = builtin;\n}\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport hasOwnProp from '@stdlib/assert-has-own-property';\nimport toStringTag from './tostringtag.js';\nimport toStr from './tostring.js';\n\n\n// MAIN //\n\n/**\n* Returns a string value indicating a specification defined classification of an object in environments supporting `Symbol.toStringTag`.\n*\n* @param {*} v - input value\n* @returns {string} string value indicating a specification defined classification of the input value\n*\n* @example\n* var str = nativeClass( 'a' );\n* // returns '[object String]'\n*\n* @example\n* var str = nativeClass( 5 );\n* // returns '[object Number]'\n*\n* @example\n* function Beep() {\n* return this;\n* }\n* var str = nativeClass( new Beep() );\n* // returns '[object Object]'\n*/\nfunction nativeClass( v ) {\n\tvar isOwn;\n\tvar tag;\n\tvar out;\n\n\tif ( v === null || v === void 0 ) {\n\t\treturn toStr.call( v );\n\t}\n\ttag = v[ toStringTag ];\n\tisOwn = hasOwnProp( v, toStringTag );\n\n\t// Attempt to override the `toStringTag` property. For built-ins having a `Symbol.toStringTag` property (e.g., `JSON`, `Math`, etc), the `Symbol.toStringTag` property is read-only (e.g., , so we need to wrap in a `try/catch`.\n\ttry {\n\t\tv[ toStringTag ] = void 0;\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\treturn toStr.call( v );\n\t}\n\tout = toStr.call( v );\n\n\tif ( isOwn ) {\n\t\tv[ toStringTag ] = tag;\n\t} else {\n\t\tdelete v[ toStringTag ];\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default nativeClass;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport toStr from './tostring.js';\n\n\n// MAIN //\n\n/**\n* Returns a string value indicating a specification defined classification (via the internal property `[[Class]]`) of an object.\n*\n* @param {*} v - input value\n* @returns {string} string value indicating a specification defined classification of the input value\n*\n* @example\n* var str = nativeClass( 'a' );\n* // returns '[object String]'\n*\n* @example\n* var str = nativeClass( 5 );\n* // returns '[object Number]'\n*\n* @example\n* function Beep() {\n* return this;\n* }\n* var str = nativeClass( new Beep() );\n* // returns '[object Object]'\n*/\nfunction nativeClass( v ) {\n\treturn toStr.call( v );\n}\n\n\n// EXPORTS //\n\nexport default nativeClass;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// EXPORTS //\n\nexport default Number; // eslint-disable-line stdlib/require-globals\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport Number from '@stdlib/number-ctor';\n\n\n// MAIN //\n\n// eslint-disable-next-line stdlib/no-redeclare\nvar toString = Number.prototype.toString; // non-generic\n\n\n// EXPORTS //\n\nexport default toString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport hasToStringTag from '@stdlib/assert-has-tostringtag-support';\nimport nativeClass from '@stdlib/utils-native-class';\nimport Number from '@stdlib/number-ctor';\nimport test from './try2serialize.js';\n\n\n// VARIABLES //\n\nvar FLG = hasToStringTag();\n\n\n// MAIN //\n\n/**\n* Tests if a value is a number object.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number object\n*\n* @example\n* var bool = isNumber( 3.14 );\n* // returns false\n*\n* @example\n* var bool = isNumber( new Number( 3.14 ) );\n* // returns true\n*/\nfunction isNumber( value ) {\n\tif ( typeof value === 'object' ) {\n\t\tif ( value instanceof Number ) {\n\t\t\treturn true;\n\t\t}\n\t\tif ( FLG ) {\n\t\t\treturn test( value );\n\t\t}\n\t\treturn ( nativeClass( value ) === '[object Number]' );\n\t}\n\treturn false;\n}\n\n\n// EXPORTS //\n\nexport default isNumber;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport toString from './tostring.js'; // eslint-disable-line stdlib/no-redeclare\n\n\n// MAIN //\n\n/**\n* Attempts to serialize a value to a string.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value can be serialized\n*/\nfunction test( value ) {\n\ttry {\n\t\ttoString.call( value );\n\t\treturn true;\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\treturn false;\n\t}\n}\n\n\n// EXPORTS //\n\nexport default test;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a number.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a number\n*\n* @example\n* var bool = isNumber( 3.14 );\n* // returns true\n*\n* @example\n* var bool = isNumber( new Number( 3.14 ) );\n* // returns true\n*\n* @example\n* var bool = isNumber( NaN );\n* // returns true\n*\n* @example\n* var bool = isNumber( null );\n* // returns false\n*/\nfunction isNumber( value ) {\n\treturn ( isPrimitive( value ) || isObject( value ) );\n}\n\n\n// EXPORTS //\n\nexport default isNumber;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test if a value is a number.\n*\n* @module @stdlib/assert-is-number\n*\n* @example\n* import isNumber from '@stdlib/assert-is-number';\n*\n* var bool = isNumber( 3.14 );\n* // returns true\n*\n* bool = isNumber( new Number( 3.14 ) );\n* // returns true\n*\n* bool = isNumber( NaN );\n* // returns true\n*\n* bool = isNumber( null );\n* // returns false\n*\n* @example\n* import { isPrimitive as isNumber } from '@stdlib/assert-is-number';\n*\n* var bool = isNumber( 3.14 );\n* // returns true\n*\n* bool = isNumber( NaN );\n* // returns true\n*\n* bool = isNumber( new Number( 3.14 ) );\n* // returns false\n*\n* @example\n* import { isObject as isNumber } from '@stdlib/assert-is-number';\n*\n* var bool = isNumber( 3.14 );\n* // returns false\n*\n* bool = isNumber( new Number( 3.14 ) );\n* // returns true\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'isPrimitive', isPrimitive );\nsetReadOnly( main, 'isObject', isObject );\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Double-precision floating-point positive infinity.\n*\n* @module @stdlib/constants-float64-pinf\n* @type {number}\n*\n* @example\n* import FLOAT64_PINF from '@stdlib/constants-float64-pinf';\n* // returns Infinity\n*/\n\n\n// MAIN //\n\n/**\n* Double-precision floating-point positive infinity.\n*\n* ## Notes\n*\n* Double-precision floating-point positive infinity has the bit sequence\n*\n* ```binarystring\n* 0 11111111111 00000000000000000000 00000000000000000000000000000000\n* ```\n*\n* @constant\n* @type {number}\n* @default Number.POSITIVE_INFINITY\n* @see [IEEE 754]{@link https://en.wikipedia.org/wiki/IEEE_754-1985}\n*/\nvar FLOAT64_PINF = Number.POSITIVE_INFINITY; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default FLOAT64_PINF;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Double-precision floating-point negative infinity.\n*\n* @module @stdlib/constants-float64-ninf\n* @type {number}\n*\n* @example\n* import FLOAT64_NINF from '@stdlib/constants-float64-ninf';\n* // returns -Infinity\n*/\n\n// MODULES //\n\nimport Number from '@stdlib/number-ctor';\n\n\n// MAIN //\n\n/**\n* Double-precision floating-point negative infinity.\n*\n* ## Notes\n*\n* Double-precision floating-point negative infinity has the bit sequence\n*\n* ```binarystring\n* 1 11111111111 00000000000000000000 00000000000000000000000000000000\n* ```\n*\n* @constant\n* @type {number}\n* @default Number.NEGATIVE_INFINITY\n* @see [IEEE 754]{@link https://en.wikipedia.org/wiki/IEEE_754-1985}\n*/\nvar FLOAT64_NINF = Number.NEGATIVE_INFINITY;\n\n\n// EXPORTS //\n\nexport default FLOAT64_NINF;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: implementation (?)\n\n/**\n* Rounds a double-precision floating-point number toward negative infinity.\n*\n* @param {number} x - input value\n* @returns {number} rounded value\n*\n* @example\n* var v = floor( -4.2 );\n* // returns -5.0\n*\n* @example\n* var v = floor( 9.99999 );\n* // returns 9.0\n*\n* @example\n* var v = floor( 0.0 );\n* // returns 0.0\n*\n* @example\n* var v = floor( NaN );\n* // returns NaN\n*/\nvar floor = Math.floor; // eslint-disable-line stdlib/no-builtin-math\n\n\n// EXPORTS //\n\nexport default floor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport floor from '@stdlib/math-base-special-floor';\n\n\n// MAIN //\n\n/**\n* Tests if a finite double-precision floating-point number is an integer.\n*\n* @param {number} x - value to test\n* @returns {boolean} boolean indicating whether the value is an integer\n*\n* @example\n* var bool = isInteger( 1.0 );\n* // returns true\n*\n* @example\n* var bool = isInteger( 3.14 );\n* // returns false\n*/\nfunction isInteger( x ) {\n\treturn (floor(x) === x);\n}\n\n\n// EXPORTS //\n\nexport default isInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport PINF from '@stdlib/constants-float64-pinf';\nimport NINF from '@stdlib/constants-float64-ninf';\nimport isInt from '@stdlib/math-base-assert-is-integer';\n\n\n// MAIN //\n\n/**\n* Tests if a number primitive is an integer value.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a number primitive is an integer value\n*/\nfunction isInteger( value ) {\n\treturn (\n\t\tvalue < PINF &&\n\t\tvalue > NINF &&\n\t\tisInt( value )\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isNumber } from '@stdlib/assert-is-number';\nimport isInt from './integer.js';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a number primitive having an integer value.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number primitive having an integer value\n*\n* @example\n* var bool = isInteger( -3.0 );\n* // returns true\n*\n* @example\n* var bool = isInteger( new Number( -3.0 ) );\n* // returns false\n*/\nfunction isInteger( value ) {\n\treturn (\n\t\tisNumber( value ) &&\n\t\tisInt( value )\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isObject as isNumber } from '@stdlib/assert-is-number';\nimport isInt from './integer.js';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a number object having an integer value.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number object having an integer value\n*\n* @example\n* var bool = isInteger( 3.0 );\n* // returns false\n*\n* @example\n* var bool = isInteger( new Number( 3.0 ) );\n* // returns true\n*/\nfunction isInteger( value ) {\n\treturn (\n\t\tisNumber( value ) &&\n\t\tisInt( value.valueOf() )\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\n/**\n* Tests if a value is an integer.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an integer\n*\n* @example\n* var bool = isInteger( 5.0 );\n* // returns true\n*\n* @example\n* var bool = isInteger( new Number( 5.0 ) );\n* // returns true\n*\n* @example\n* var bool = isInteger( -3.14 );\n* // returns false\n*\n* @example\n* var bool = isInteger( null );\n* // returns false\n*/\nfunction isInteger( value ) {\n\treturn ( isPrimitive( value ) || isObject( value ) );\n}\n\n\n// EXPORTS //\n\nexport default isInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isInteger } from '@stdlib/assert-is-integer';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a number primitive having a nonnegative integer value.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number primitive having a nonnegative integer value\n*\n* @example\n* var bool = isNonNegativeInteger( 3.0 );\n* // returns true\n*\n* @example\n* var bool = isNonNegativeInteger( new Number( 3.0 ) );\n* // returns false\n*/\nfunction isNonNegativeInteger( value ) {\n\treturn (\n\t\tisInteger( value ) &&\n\t\tvalue >= 0\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isNonNegativeInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isObject as isInteger } from '@stdlib/assert-is-integer';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a number object having a nonnegative integer value.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number object having a nonnegative integer value\n*\n* @example\n* var bool = isNonNegativeInteger( 3.0 );\n* // returns false\n*\n* @example\n* var bool = isNonNegativeInteger( new Number( 3.0 ) );\n* // returns true\n*/\nfunction isNonNegativeInteger( value ) {\n\treturn (\n\t\tisInteger( value ) &&\n\t\tvalue.valueOf() >= 0\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isNonNegativeInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a nonnegative integer.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a nonnegative integer\n*\n* @example\n* var bool = isNonNegativeInteger( 5.0 );\n* // returns true\n*\n* @example\n* var bool = isNonNegativeInteger( new Number( 5.0 ) );\n* // returns true\n*\n* @example\n* var bool = isNonNegativeInteger( -5.0 );\n* // returns false\n*\n* @example\n* var bool = isNonNegativeInteger( 3.14 );\n* // returns false\n*\n* @example\n* var bool = isNonNegativeInteger( null );\n* // returns false\n*/\nfunction isNonNegativeInteger( value ) {\n\treturn ( isPrimitive( value ) || isObject( value ) );\n}\n\n\n// EXPORTS //\n\nexport default isNonNegativeInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test if a value is an integer.\n*\n* @module @stdlib/assert-is-integer\n*\n* @example\n* import isInteger from '@stdlib/assert-is-integer';\n*\n* var bool = isInteger( 5.0 );\n* // returns true\n*\n* bool = isInteger( new Number( 5.0 ) );\n* // returns true\n*\n* bool = isInteger( -3.14 );\n* // returns false\n*\n* bool = isInteger( null );\n* // returns false\n*\n* @example\n* // Use interface to check for integer primitives...\n* import { isPrimitive as isInteger } from '@stdlib/assert-is-integer';\n*\n* var bool = isInteger( -3.0 );\n* // returns true\n*\n* bool = isInteger( new Number( -3.0 ) );\n* // returns false\n*\n* @example\n* // Use interface to check for integer objects...\n* import { isObject as isInteger } from '@stdlib/assert-is-integer';\n*\n* var bool = isInteger( 3.0 );\n* // returns false\n*\n* bool = isInteger( new Number( 3.0 ) );\n* // returns true\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'isPrimitive', isPrimitive );\nsetReadOnly( main, 'isObject', isObject );\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test if a value is a nonnegative integer.\n*\n* @module @stdlib/assert-is-nonnegative-integer\n*\n* @example\n* import isNonNegativeInteger from '@stdlib/assert-is-nonnegative-integer';\n*\n* var bool = isNonNegativeInteger( 5.0 );\n* // returns true\n*\n* bool = isNonNegativeInteger( new Number( 5.0 ) );\n* // returns true\n*\n* bool = isNonNegativeInteger( -5.0 );\n* // returns false\n*\n* bool = isNonNegativeInteger( 3.14 );\n* // returns false\n*\n* bool = isNonNegativeInteger( null );\n* // returns false\n*\n* @example\n* import { isPrimitive as isNonNegativeInteger } from '@stdlib/assert-is-nonnegative-integer';\n*\n* var bool = isNonNegativeInteger( 3.0 );\n* // returns true\n*\n* bool = isNonNegativeInteger( new Number( 3.0 ) );\n* // returns false\n*\n* @example\n* import { isObject as isNonNegativeInteger } from '@stdlib/assert-is-nonnegative-integer';\n*\n* var bool = isNonNegativeInteger( 3.0 );\n* // returns false\n*\n* bool = isNonNegativeInteger( new Number( 3.0 ) );\n* // returns true\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'isPrimitive', isPrimitive );\nsetReadOnly( main, 'isObject', isObject );\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasFloat64Array = ( typeof Float64Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Float64Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a Float64Array\n*\n* @example\n* var bool = isFloat64Array( new Float64Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isFloat64Array( [] );\n* // returns false\n*/\nfunction isFloat64Array( value ) {\n\treturn (\n\t\t( hasFloat64Array && value instanceof Float64Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Float64Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isFloat64Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Float64Array === 'function' ) ? Float64Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Float64Array === 'function' ) ? Float64Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of double-precision floating-point numbers in the platform byte order.\n*\n* @module @stdlib/array-float64\n*\n* @example\n* import ctor from '@stdlib/array-float64';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasFloat64ArraySupport from '@stdlib/assert-has-float64array-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasFloat64ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isFloat64Array from '@stdlib/assert-is-float64array';\nimport GlobalFloat64Array from './float64array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Float64Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Float64Array` support\n*\n* @example\n* var bool = hasFloat64ArraySupport();\n* // returns \n*/\nfunction hasFloat64ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalFloat64Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = new GlobalFloat64Array( [ 1.0, 3.14, -3.14, NaN ] );\n\t\tbool = (\n\t\t\tisFloat64Array( arr ) &&\n\t\t\tarr[ 0 ] === 1.0 &&\n\t\t\tarr[ 1 ] === 3.14 &&\n\t\t\tarr[ 2 ] === -3.14 &&\n\t\t\tarr[ 3 ] !== arr[ 3 ]\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasFloat64ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of double-precision floating-point numbers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasFloat32Array = ( typeof Float32Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Float32Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a Float32Array\n*\n* @example\n* var bool = isFloat32Array( new Float32Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isFloat32Array( [] );\n* // returns false\n*/\nfunction isFloat32Array( value ) {\n\treturn (\n\t\t( hasFloat32Array && value instanceof Float32Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Float32Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isFloat32Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Float32Array === 'function' ) ? Float32Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Float32Array === 'function' ) ? Float32Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of single-precision floating-point numbers in the platform byte order.\n*\n* @module @stdlib/array-float32\n*\n* @example\n* import ctor from '@stdlib/array-float32';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasFloat32ArraySupport from '@stdlib/assert-has-float32array-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasFloat32ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isFloat32Array from '@stdlib/assert-is-float32array';\nimport PINF from '@stdlib/constants-float64-pinf';\nimport GlobalFloat32Array from './float32array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Float32Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Float32Array` support\n*\n* @example\n* var bool = hasFloat32ArraySupport();\n* // returns \n*/\nfunction hasFloat32ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalFloat32Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = new GlobalFloat32Array( [ 1.0, 3.14, -3.14, 5.0e40 ] );\n\t\tbool = (\n\t\t\tisFloat32Array( arr ) &&\n\t\t\tarr[ 0 ] === 1.0 &&\n\t\t\tarr[ 1 ] === 3.140000104904175 &&\n\t\t\tarr[ 2 ] === -3.140000104904175 &&\n\t\t\tarr[ 3 ] === PINF\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasFloat32ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of single-precision floating-point numbers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasInt16Array = ( typeof Int16Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is an Int16Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an Int16Array\n*\n* @example\n* var bool = isInt16Array( new Int16Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isInt16Array( [] );\n* // returns false\n*/\nfunction isInt16Array( value ) {\n\treturn (\n\t\t( hasInt16Array && value instanceof Int16Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Int16Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isInt16Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum signed 16-bit integer.\n*\n* @module @stdlib/constants-int16-max\n* @type {integer32}\n*\n* @example\n* import INT16_MAX from '@stdlib/constants-int16-max';\n* // returns 32767\n*/\n\n\n// MAIN //\n\n/**\n* Maximum signed 16-bit integer.\n*\n* ## Notes\n*\n* The number has the value\n*\n* ```tex\n* 2^{15} - 1\n* ```\n*\n* which corresponds to the bit sequence\n*\n* ```binarystring\n* 0111111111111111\n* ```\n*\n* @constant\n* @type {integer32}\n* @default 32767\n*/\nvar INT16_MAX = 32767|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default INT16_MAX;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Int16Array === 'function' ) ? Int16Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Int16Array === 'function' ) ? Int16Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of twos-complement 16-bit signed integers in the platform byte order.\n*\n* @module @stdlib/array-int16\n*\n* @example\n* import ctor from '@stdlib/array-int16';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasInt16ArraySupport from '@stdlib/assert-has-int16array-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasInt16ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isInt16Array from '@stdlib/assert-is-int16array';\nimport INT16_MAX from '@stdlib/constants-int16-max';\nimport INT16_MIN from '@stdlib/constants-int16-min';\nimport GlobalInt16Array from './int16array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Int16Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Int16Array` support\n*\n* @example\n* var bool = hasInt16ArraySupport();\n* // returns \n*/\nfunction hasInt16ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalInt16Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = new GlobalInt16Array( [ 1, 3.14, -3.14, INT16_MAX+1 ] );\n\t\tbool = (\n\t\t\tisInt16Array( arr ) &&\n\t\t\tarr[ 0 ] === 1 &&\n\t\t\tarr[ 1 ] === 3 && // truncation\n\t\t\tarr[ 2 ] === -3 && // truncation\n\t\t\tarr[ 3 ] === INT16_MIN // wrap around\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasInt16ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Minimum signed 16-bit integer.\n*\n* @module @stdlib/constants-int16-min\n* @type {integer32}\n*\n* @example\n* import INT16_MIN from '@stdlib/constants-int16-min';\n* // returns -32768\n*/\n\n\n// MAIN //\n\n/**\n* Minimum signed 16-bit integer.\n*\n* ## Notes\n*\n* The number has the value\n*\n* ```tex\n* -(2^{15})\n* ```\n*\n* which corresponds to the two's complement bit sequence\n*\n* ```binarystring\n* 1000000000000000\n* ```\n*\n* @constant\n* @type {integer32}\n* @default -32768\n*/\nvar INT16_MIN = -32768|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default INT16_MIN;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of twos-complement 16-bit signed integers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasInt32Array = ( typeof Int32Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is an Int32Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an Int32Array\n*\n* @example\n* var bool = isInt32Array( new Int32Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isInt32Array( [] );\n* // returns false\n*/\nfunction isInt32Array( value ) {\n\treturn (\n\t\t( hasInt32Array && value instanceof Int32Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Int32Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isInt32Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum signed 32-bit integer.\n*\n* @module @stdlib/constants-int32-max\n* @type {integer32}\n*\n* @example\n* import INT32_MAX from '@stdlib/constants-int32-max';\n* // returns 2147483647\n*/\n\n\n// MAIN //\n\n/**\n* Maximum signed 32-bit integer.\n*\n* ## Notes\n*\n* The number has the value\n*\n* ```tex\n* 2^{31} - 1\n* ```\n*\n* which corresponds to the bit sequence\n*\n* ```binarystring\n* 01111111111111111111111111111111\n* ```\n*\n* @constant\n* @type {integer32}\n* @default 2147483647\n*/\nvar INT32_MAX = 2147483647|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default INT32_MAX;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Int32Array === 'function' ) ? Int32Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Int32Array === 'function' ) ? Int32Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of twos-complement 32-bit signed integers in the platform byte order.\n*\n* @module @stdlib/array-int32\n*\n* @example\n* import ctor from '@stdlib/array-int32';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasInt32ArraySupport from '@stdlib/assert-has-int32array-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasInt32ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isInt32Array from '@stdlib/assert-is-int32array';\nimport INT32_MAX from '@stdlib/constants-int32-max';\nimport INT32_MIN from '@stdlib/constants-int32-min';\nimport GlobalInt32Array from './int32array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Int32Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Int32Array` support\n*\n* @example\n* var bool = hasInt32ArraySupport();\n* // returns \n*/\nfunction hasInt32ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalInt32Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = new GlobalInt32Array( [ 1, 3.14, -3.14, INT32_MAX+1 ] );\n\t\tbool = (\n\t\t\tisInt32Array( arr ) &&\n\t\t\tarr[ 0 ] === 1 &&\n\t\t\tarr[ 1 ] === 3 && // truncation\n\t\t\tarr[ 2 ] === -3 && // truncation\n\t\t\tarr[ 3 ] === INT32_MIN // wrap around\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasInt32ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Minimum signed 32-bit integer.\n*\n* @module @stdlib/constants-int32-min\n* @type {integer32}\n*\n* @example\n* import INT32_MIN from '@stdlib/constants-int32-min';\n* // returns -2147483648\n*/\n\n\n// MAIN //\n\n/**\n* Minimum signed 32-bit integer.\n*\n* ## Notes\n*\n* The number has the value\n*\n* ```tex\n* -(2^{31})\n* ```\n*\n* which corresponds to the two's complement bit sequence\n*\n* ```binarystring\n* 10000000000000000000000000000000\n* ```\n*\n* @constant\n* @type {integer32}\n* @default -2147483648\n*/\nvar INT32_MIN = -2147483648|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default INT32_MIN;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of twos-complement 32-bit signed integers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasInt8Array = ( typeof Int8Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is an Int8Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an Int8Array\n*\n* @example\n* var bool = isInt8Array( new Int8Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isInt8Array( [] );\n* // returns false\n*/\nfunction isInt8Array( value ) {\n\treturn (\n\t\t( hasInt8Array && value instanceof Int8Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Int8Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isInt8Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum signed 8-bit integer.\n*\n* @module @stdlib/constants-int8-max\n* @type {integer32}\n*\n* @example\n* import INT8_MAX from '@stdlib/constants-int8-max';\n* // returns 127\n*/\n\n\n// MAIN //\n\n/**\n* Maximum signed 8-bit integer.\n*\n* ## Notes\n*\n* The number is given by\n*\n* ```tex\n* 2^{7} - 1\n* ```\n*\n* which corresponds to the bit sequence\n*\n* ```binarystring\n* 01111111\n* ```\n*\n* @constant\n* @type {integer32}\n* @default 127\n*/\nvar INT8_MAX = 127|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default INT8_MAX;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Int8Array === 'function' ) ? Int8Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Int8Array === 'function' ) ? Int8Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of twos-complement 8-bit signed integers in the platform byte order.\n*\n* @module @stdlib/array-int8\n*\n* @example\n* import ctor from '@stdlib/array-int8';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasInt8ArraySupport from '@stdlib/assert-has-int8array-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasInt8ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isInt8Array from '@stdlib/assert-is-int8array';\nimport INT8_MAX from '@stdlib/constants-int8-max';\nimport INT8_MIN from '@stdlib/constants-int8-min';\nimport GlobalInt8Array from './int8array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Int8Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Int8Array` support\n*\n* @example\n* var bool = hasInt8ArraySupport();\n* // returns \n*/\nfunction hasInt8ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalInt8Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = new GlobalInt8Array( [ 1, 3.14, -3.14, INT8_MAX+1 ] );\n\t\tbool = (\n\t\t\tisInt8Array( arr ) &&\n\t\t\tarr[ 0 ] === 1 &&\n\t\t\tarr[ 1 ] === 3 && // truncation\n\t\t\tarr[ 2 ] === -3 && // truncation\n\t\t\tarr[ 3 ] === INT8_MIN // wrap around\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasInt8ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Minimum signed 8-bit integer.\n*\n* @module @stdlib/constants-int8-min\n* @type {integer32}\n*\n* @example\n* import INT8_MIN from '@stdlib/constants-int8-min';\n* // returns -128\n*/\n\n\n// MAIN //\n\n/**\n* Minimum signed 8-bit integer.\n*\n* ## Notes\n*\n* The number is given by\n*\n* ```tex\n* -(2^{7})\n* ```\n*\n* which corresponds to the two's complement bit sequence\n*\n* ```binarystring\n* 10000000\n* ```\n*\n* @constant\n* @type {integer32}\n* @default -128\n*/\nvar INT8_MIN = -128|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default INT8_MIN;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of twos-complement 8-bit signed integers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasUint16Array = ( typeof Uint16Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Uint16Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a Uint16Array\n*\n* @example\n* var bool = isUint16Array( new Uint16Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isUint16Array( [] );\n* // returns false\n*/\nfunction isUint16Array( value ) {\n\treturn (\n\t\t( hasUint16Array && value instanceof Uint16Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Uint16Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isUint16Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum unsigned 16-bit integer.\n*\n* @module @stdlib/constants-uint16-max\n* @type {integer32}\n*\n* @example\n* import UINT16_MAX from '@stdlib/constants-uint16-max';\n* // returns 65535\n*/\n\n\n// MAIN //\n\n/**\n* Maximum unsigned 16-bit integer.\n*\n* ## Notes\n*\n* The number has the value\n*\n* ```tex\n* 2^{16} - 1\n* ```\n*\n* which corresponds to the bit sequence\n*\n* ```binarystring\n* 1111111111111111\n* ```\n*\n* @constant\n* @type {integer32}\n* @default 65535\n*/\nvar UINT16_MAX = 65535|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default UINT16_MAX;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Uint16Array === 'function' ) ? Uint16Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Uint16Array === 'function' ) ? Uint16Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of 16-bit unsigned integers in the platform byte order.\n*\n* @module @stdlib/array-uint16\n*\n* @example\n* import ctor from '@stdlib/array-uint16';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasUint16ArraySupport from '@stdlib/assert-has-uint16array-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasUint16ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isUint16Array from '@stdlib/assert-is-uint16array';\nimport UINT16_MAX from '@stdlib/constants-uint16-max';\nimport GlobalUint16Array from './uint16array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Uint16Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Uint16Array` support\n*\n* @example\n* var bool = hasUint16ArraySupport();\n* // returns \n*/\nfunction hasUint16ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalUint16Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = [ 1, 3.14, -3.14, UINT16_MAX+1, UINT16_MAX+2 ];\n\t\tarr = new GlobalUint16Array( arr );\n\t\tbool = (\n\t\t\tisUint16Array( arr ) &&\n\t\t\tarr[ 0 ] === 1 &&\n\t\t\tarr[ 1 ] === 3 && // truncation\n\t\t\tarr[ 2 ] === UINT16_MAX-2 && // truncation and wrap around\n\t\t\tarr[ 3 ] === 0 && // wrap around\n\t\t\tarr[ 4 ] === 1 // wrap around\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasUint16ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of 16-bit unsigned integers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasUint32Array = ( typeof Uint32Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Uint32Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a Uint32Array\n*\n* @example\n* var bool = isUint32Array( new Uint32Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isUint32Array( [] );\n* // returns false\n*/\nfunction isUint32Array( value ) {\n\treturn (\n\t\t( hasUint32Array && value instanceof Uint32Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Uint32Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isUint32Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum unsigned 32-bit integer.\n*\n* @module @stdlib/constants-uint32-max\n* @type {uinteger32}\n*\n* @example\n* import UINT32_MAX from '@stdlib/constants-uint32-max';\n* // returns 4294967295\n*/\n\n\n// MAIN //\n\n/**\n* Maximum unsigned 32-bit integer.\n*\n* ## Notes\n*\n* The number has the value\n*\n* ```tex\n* 2^{32} - 1\n* ```\n*\n* which corresponds to the bit sequence\n*\n* ```binarystring\n* 11111111111111111111111111111111\n* ```\n*\n* @constant\n* @type {uinteger32}\n* @default 4294967295\n*/\nvar UINT32_MAX = 4294967295;\n\n\n// EXPORTS //\n\nexport default UINT32_MAX;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Uint32Array === 'function' ) ? Uint32Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Uint32Array === 'function' ) ? Uint32Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of 32-bit unsigned integers in the platform byte order.\n*\n* @module @stdlib/array-uint32\n*\n* @example\n* import ctor from '@stdlib/array-uint32';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasUint32ArraySupport from '@stdlib/assert-has-uint32array-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasUint32ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isUint32Array from '@stdlib/assert-is-uint32array';\nimport UINT32_MAX from '@stdlib/constants-uint32-max';\nimport GlobalUint32Array from './uint32array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Uint32Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Uint32Array` support\n*\n* @example\n* var bool = hasUint32ArraySupport();\n* // returns \n*/\nfunction hasUint32ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalUint32Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = [ 1, 3.14, -3.14, UINT32_MAX+1, UINT32_MAX+2 ];\n\t\tarr = new GlobalUint32Array( arr );\n\t\tbool = (\n\t\t\tisUint32Array( arr ) &&\n\t\t\tarr[ 0 ] === 1 &&\n\t\t\tarr[ 1 ] === 3 && // truncation\n\t\t\tarr[ 2 ] === UINT32_MAX-2 && // truncation and wrap around\n\t\t\tarr[ 3 ] === 0 && // wrap around\n\t\t\tarr[ 4 ] === 1 // wrap around\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasUint32ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of 32-bit unsigned integers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasUint8Array = ( typeof Uint8Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Uint8Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a Uint8Array\n*\n* @example\n* var bool = isUint8Array( new Uint8Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isUint8Array( [] );\n* // returns false\n*/\nfunction isUint8Array( value ) {\n\treturn (\n\t\t( hasUint8Array && value instanceof Uint8Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Uint8Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isUint8Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum unsigned 8-bit integer.\n*\n* @module @stdlib/constants-uint8-max\n* @type {integer32}\n*\n* @example\n* import UINT8_MAX from '@stdlib/constants-uint8-max';\n* // returns 255\n*/\n\n\n// MAIN //\n\n/**\n* Maximum unsigned 8-bit integer.\n*\n* ## Notes\n*\n* The number has the value\n*\n* ```tex\n* 2^{8} - 1\n* ```\n*\n* which corresponds to the bit sequence\n*\n* ```binarystring\n* 11111111\n* ```\n*\n* @constant\n* @type {integer32}\n* @default 255\n*/\nvar UINT8_MAX = 255|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default UINT8_MAX;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Uint8Array === 'function' ) ? Uint8Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Uint8Array === 'function' ) ? Uint8Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of 8-bit unsigned integers in the platform byte order.\n*\n* @module @stdlib/array-uint8\n*\n* @example\n* import ctor from '@stdlib/array-uint8';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasUint8ArraySupport from '@stdlib/assert-has-uint8array-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasUint8ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isUint8Array from '@stdlib/assert-is-uint8array';\nimport UINT8_MAX from '@stdlib/constants-uint8-max';\nimport GlobalUint8Array from './uint8array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Uint8Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Uint8Array` support\n*\n* @example\n* var bool = hasUint8ArraySupport();\n* // returns \n*/\nfunction hasUint8ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalUint8Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = [ 1, 3.14, -3.14, UINT8_MAX+1, UINT8_MAX+2 ];\n\t\tarr = new GlobalUint8Array( arr );\n\t\tbool = (\n\t\t\tisUint8Array( arr ) &&\n\t\t\tarr[ 0 ] === 1 &&\n\t\t\tarr[ 1 ] === 3 && // truncation\n\t\t\tarr[ 2 ] === UINT8_MAX-2 && // truncation and wrap around\n\t\t\tarr[ 3 ] === 0 && // wrap around\n\t\t\tarr[ 4 ] === 1 // wrap around\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasUint8ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of 8-bit unsigned integers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasUint8ClampedArray = ( typeof Uint8ClampedArray === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Uint8ClampedArray.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a Uint8ClampedArray\n*\n* @example\n* var bool = isUint8ClampedArray( new Uint8ClampedArray( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isUint8ClampedArray( [] );\n* // returns false\n*/\nfunction isUint8ClampedArray( value ) {\n\treturn (\n\t\t( hasUint8ClampedArray && value instanceof Uint8ClampedArray ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Uint8ClampedArray]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isUint8ClampedArray;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Uint8ClampedArray === 'function' ) ? Uint8ClampedArray : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Uint8ClampedArray === 'function' ) ? Uint8ClampedArray : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of 8-bit unsigned integers in the platform byte order clamped to 0-255.\n*\n* @module @stdlib/array-uint8c\n*\n* @example\n* import ctor from '@stdlib/array-uint8c';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasUint8ClampedArraySupport from '@stdlib/assert-has-uint8clampedarray-support'; // eslint-disable-line id-length\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasUint8ClampedArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isUint8ClampedArray from '@stdlib/assert-is-uint8clampedarray';\nimport GlobalUint8ClampedArray from './uint8clampedarray.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Uint8ClampedArray` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Uint8ClampedArray` support\n*\n* @example\n* var bool = hasUint8ClampedArraySupport();\n* // returns \n*/\nfunction hasUint8ClampedArraySupport() { // eslint-disable-line id-length\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalUint8ClampedArray !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = new GlobalUint8ClampedArray( [ -1, 0, 1, 3.14, 4.99, 255, 256 ] );\n\t\tbool = (\n\t\t\tisUint8ClampedArray( arr ) &&\n\t\t\tarr[ 0 ] === 0 && // clamped\n\t\t\tarr[ 1 ] === 0 &&\n\t\t\tarr[ 2 ] === 1 &&\n\t\t\tarr[ 3 ] === 3 && // round to nearest\n\t\t\tarr[ 4 ] === 5 && // round to nearest\n\t\t\tarr[ 5 ] === 255 &&\n\t\t\tarr[ 6 ] === 255 // clamped\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasUint8ClampedArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of 8-bit unsigned integers in the platform byte order clamped to 0-255.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum length of a generic array.\n*\n* @module @stdlib/constants-array-max-array-length\n*\n* @example\n* import MAX_ARRAY_LENGTH from '@stdlib/constants-array-max-array-length';\n* // returns 4294967295\n*/\n\n// MAIN //\n\n/**\n* Maximum length of a generic array.\n*\n* ```tex\n* 2^{32} - 1\n* ```\n*\n* @constant\n* @type {uinteger32}\n* @default 4294967295\n*/\nvar MAX_ARRAY_LENGTH = 4294967295>>>0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default MAX_ARRAY_LENGTH;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isInteger from '@stdlib/math-base-assert-is-integer';\nimport MAX_LENGTH from '@stdlib/constants-array-max-array-length';\n\n\n// MAIN //\n\n/**\n* Tests if a value is an array-like object.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is an array-like object\n*\n* @example\n* var bool = isArrayLikeObject( [] );\n* // returns true\n*\n* @example\n* var bool = isArrayLikeObject( { 'length':10 } );\n* // returns true\n*\n* @example\n* var bool = isArrayLikeObject( 'beep' );\n* // returns false\n*/\nfunction isArrayLikeObject( value ) {\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\ttypeof value.length === 'number' &&\n\t\tisInteger( value.length ) &&\n\t\tvalue.length >= 0 &&\n\t\tvalue.length <= MAX_LENGTH\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isArrayLikeObject;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum length of a typed array.\n*\n* @module @stdlib/constants-array-max-typed-array-length\n*\n* @example\n* import MAX_TYPED_ARRAY_LENGTH from '@stdlib/constants-array-max-typed-array-length';\n* // returns 9007199254740991\n*/\n\n// MAIN //\n\n/**\n* Maximum length of a typed array.\n*\n* ```tex\n* 2^{53} - 1\n* ```\n*\n* @constant\n* @type {number}\n* @default 9007199254740991\n*/\nvar MAX_TYPED_ARRAY_LENGTH = 9007199254740991;\n\n\n// EXPORTS //\n\nexport default MAX_TYPED_ARRAY_LENGTH;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isInteger from '@stdlib/math-base-assert-is-integer';\nimport MAX_LENGTH from '@stdlib/constants-array-max-typed-array-length';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a collection.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether a value is a collection\n*\n* @example\n* var bool = isCollection( [] );\n* // returns true\n*\n* @example\n* var bool = isCollection( {} );\n* // returns false\n*/\nfunction isCollection( value ) {\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\ttypeof value.length === 'number' &&\n\t\tisInteger( value.length ) &&\n\t\tvalue.length >= 0 &&\n\t\tvalue.length <= MAX_LENGTH\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isCollection;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasArrayBuffer = ( typeof ArrayBuffer === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is an ArrayBuffer.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an ArrayBuffer\n*\n* @example\n* import ArrayBuffer from '@stdlib/array-buffer';\n*\n* var bool = isArrayBuffer( new ArrayBuffer( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isArrayBuffer( [] );\n* // returns false\n*/\nfunction isArrayBuffer( value ) {\n\treturn (\n\t\t( hasArrayBuffer && value instanceof ArrayBuffer ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object ArrayBuffer]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isArrayBuffer;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar f;\n\n\n// FUNCTIONS //\n\n/**\n* Tests if a value is an array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an array\n*\n* @example\n* var bool = isArray( [] );\n* // returns true\n*\n* @example\n* var bool = isArray( {} );\n* // returns false\n*/\nfunction isArray( value ) {\n\treturn ( nativeClass( value ) === '[object Array]' );\n}\n\n\n// MAIN //\n\nif ( Array.isArray ) {\n\tf = Array.isArray;\n} else {\n\tf = isArray;\n}\n\n\n// EXPORTS //\n\nexport default f;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isArray from '@stdlib/assert-is-array';\n\n\n// MAIN //\n\n/**\n* Tests if a value is an object; e.g., `{}`.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an object\n*\n* @example\n* var bool = isObject( {} );\n* // returns true\n*\n* @example\n* var bool = isObject( null );\n* // returns false\n*/\nfunction isObject( value ) {\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\t!isArray( value )\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isObject;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Tests if a value is a string primitive.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a string primitive\n*\n* @example\n* var bool = isString( 'beep' );\n* // returns true\n*\n* @example\n* var bool = isString( new String( 'beep' ) );\n* // returns false\n*/\nfunction isString( value ) {\n\treturn ( typeof value === 'string' );\n}\n\n\n// EXPORTS //\n\nexport default isString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// eslint-disable-next-line stdlib/no-redeclare\nvar valueOf = String.prototype.valueOf; // non-generic\n\n\n// EXPORTS //\n\nexport default valueOf;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport hasToStringTag from '@stdlib/assert-has-tostringtag-support';\nimport nativeClass from '@stdlib/utils-native-class';\nimport test from './try2valueof.js';\n\n\n// VARIABLES //\n\nvar FLG = hasToStringTag();\n\n\n// MAIN //\n\n/**\n* Tests if a value is a string object.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a string object\n*\n* @example\n* var bool = isString( new String( 'beep' ) );\n* // returns true\n*\n* @example\n* var bool = isString( 'beep' );\n* // returns false\n*/\nfunction isString( value ) {\n\tif ( typeof value === 'object' ) {\n\t\tif ( value instanceof String ) {\n\t\t\treturn true;\n\t\t}\n\t\tif ( FLG ) {\n\t\t\treturn test( value );\n\t\t}\n\t\treturn ( nativeClass( value ) === '[object String]' );\n\t}\n\treturn false;\n}\n\n\n// EXPORTS //\n\nexport default isString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport valueOf from './valueof.js'; // eslint-disable-line stdlib/no-redeclare\n\n\n// MAIN //\n\n/**\n* Attempts to extract a string value.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a string can be extracted\n*/\nfunction test( value ) {\n\ttry {\n\t\tvalueOf.call( value );\n\t\treturn true;\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\treturn false;\n\t}\n}\n\n\n// EXPORTS //\n\nexport default test;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a string.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a string\n*\n* @example\n* var bool = isString( new String( 'beep' ) );\n* // returns true\n*\n* @example\n* var bool = isString( 'beep' );\n* // returns true\n*/\nfunction isString( value ) {\n\treturn ( isPrimitive( value ) || isObject( value ) );\n}\n\n\n// EXPORTS //\n\nexport default isString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test if a value is a string.\n*\n* @module @stdlib/assert-is-string\n*\n* @example\n* import isString from '@stdlib/assert-is-string';\n*\n* var bool = isString( 'beep' );\n* // returns true\n*\n* bool = isString( new String( 'beep' ) );\n* // returns true\n*\n* bool = isString( 5 );\n* // returns false\n*\n* @example\n* import { isObject as isString } from '@stdlib/assert-is-string';\n*\n* var bool = isString( new String( 'beep' ) );\n* // returns true\n*\n* bool = isString( 'beep' );\n* // returns false\n*\n* @example\n* import { isPrimitive as isString } from '@stdlib/assert-is-string';\n*\n* var bool = isString( 'beep' );\n* // returns true\n*\n* bool = isString( new String( 'beep' ) );\n* // returns false\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'isPrimitive', isPrimitive );\nsetReadOnly( main, 'isObject', isObject );\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\nvar RE = /./;\n\n\n// EXPORTS //\n\nexport default RE;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Tests if a value is a boolean primitive.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a boolean primitive\n*\n* @example\n* var bool = isBoolean( true );\n* // returns true\n*\n* @example\n* var bool = isBoolean( false );\n* // returns true\n*\n* @example\n* import Boolean from '@stdlib/boolean-ctor';\n*\n* var bool = isBoolean( new Boolean( true ) );\n* // returns false\n*/\nfunction isBoolean( value ) {\n\treturn ( typeof value === 'boolean' );\n}\n\n\n// EXPORTS //\n\nexport default isBoolean;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Returns a boolean.\n*\n* @name Boolean\n* @constructor\n* @type {Function}\n* @param {*} value - input value\n* @returns {(boolean|Boolean)} boolean\n*\n* @example\n* var b = Boolean( null );\n* // returns false\n*\n* b = Boolean( [] );\n* // returns true\n*\n* b = Boolean( {} );\n* // returns true\n*\n* @example\n* var b = new Boolean( false );\n* // returns \n*/\nvar Bool = Boolean; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default Bool;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// eslint-disable-next-line stdlib/no-redeclare\nvar toString = Boolean.prototype.toString; // non-generic\n\n\n// EXPORTS //\n\nexport default toString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport hasToStringTag from '@stdlib/assert-has-tostringtag-support';\nimport nativeClass from '@stdlib/utils-native-class';\nimport Boolean from '@stdlib/boolean-ctor';\nimport test from './try2serialize.js';\n\n\n// VARIABLES //\n\nvar FLG = hasToStringTag();\n\n\n// MAIN //\n\n/**\n* Tests if a value is a boolean object.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a boolean object\n*\n* @example\n* var bool = isBoolean( true );\n* // returns false\n*\n* @example\n* import Boolean from '@stdlib/boolean-ctor';\n*\n* var bool = isBoolean( new Boolean( false ) );\n* // returns true\n*/\nfunction isBoolean( value ) {\n\tif ( typeof value === 'object' ) {\n\t\tif ( value instanceof Boolean ) {\n\t\t\treturn true;\n\t\t}\n\t\tif ( FLG ) {\n\t\t\treturn test( value );\n\t\t}\n\t\treturn ( nativeClass( value ) === '[object Boolean]' );\n\t}\n\treturn false;\n}\n\n\n// EXPORTS //\n\nexport default isBoolean;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport toString from './tostring.js'; // eslint-disable-line stdlib/no-redeclare\n\n\n// MAIN //\n\n/**\n* Attempts to serialize a value to a string.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value can be serialized\n*/\nfunction test( value ) {\n\ttry {\n\t\ttoString.call( value );\n\t\treturn true;\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\treturn false;\n\t}\n}\n\n\n// EXPORTS //\n\nexport default test;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a boolean.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a boolean\n*\n* @example\n* var bool = isBoolean( false );\n* // returns true\n*\n* @example\n* var bool = isBoolean( true );\n* // returns true\n*\n* @example\n* import Boolean from '@stdlib/boolean-ctor';\n*\n* var bool = isBoolean( new Boolean( false ) );\n* // returns true\n*\n* @example\n* import Boolean from '@stdlib/boolean-ctor';\n*\n* var bool = isBoolean( new Boolean( true ) );\n* // returns true\n*/\nfunction isBoolean( value ) {\n\treturn ( isPrimitive( value ) || isObject( value ) );\n}\n\n\n// EXPORTS //\n\nexport default isBoolean;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test if a value is a boolean.\n*\n* @module @stdlib/assert-is-boolean\n*\n* @example\n* import Boolean from '@stdlib/boolean-ctor';\n* import isBoolean from '@stdlib/assert-is-boolean';\n*\n* var bool = isBoolean( false );\n* // returns true\n*\n* bool = isBoolean( new Boolean( false ) );\n* // returns true\n*\n* @example\n* import Boolean from '@stdlib/boolean-ctor';\n* import { isPrimitive as isBoolean } from '@stdlib/assert-is-boolean';\n*\n* var bool = isBoolean( false );\n* // returns true\n*\n* bool = isBoolean( new Boolean( true ) );\n* // returns false\n*\n* @example\n* import Boolean from '@stdlib/boolean-ctor';\n* import { isObject as isBoolean } from '@stdlib/assert-is-boolean';\n*\n* var bool = isBoolean( true );\n* // returns false\n*\n* bool = isBoolean( new Boolean( false ) );\n* // returns true\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'isPrimitive', isPrimitive );\nsetReadOnly( main, 'isObject', isObject );\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar obj = ( typeof self === 'object' ) ? self : null;\n\n\n// EXPORTS //\n\nexport default obj;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar obj = ( typeof window === 'object' ) ? window : null;\n\n\n// EXPORTS //\n\nexport default obj;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar obj = ( typeof global === 'object' ) ? global : null;\n\n\n// EXPORTS //\n\nexport default obj;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar obj = ( typeof globalThis === 'object' ) ? globalThis : null; // eslint-disable-line no-undef\n\n\n// EXPORTS //\n\nexport default obj;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport getGlobal from '@stdlib/utils-global';\n\n\n// MAIN //\n\nvar root = getGlobal();\nvar nodeList = root.document && root.document.childNodes;\n\n\n// EXPORTS //\n\nexport default nodeList;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isBoolean } from '@stdlib/assert-is-boolean';\nimport format from '@stdlib/string-format';\nimport getThis from './codegen.js';\nimport Self from './self.js';\nimport Win from './window.js';\nimport Global from './global.js';\nimport GlobalThis from './global_this.js';\n\n\n// MAIN //\n\n/**\n* Returns the global object.\n*\n* ## Notes\n*\n* - Using code generation is the **most** reliable way to resolve the global object; however, doing so is likely to violate content security policies (CSPs) in, e.g., Chrome Apps and elsewhere.\n*\n* @param {boolean} [codegen=false] - boolean indicating whether to use code generation to resolve the global object\n* @throws {TypeError} must provide a boolean\n* @throws {Error} unable to resolve global object\n* @returns {Object} global object\n*\n* @example\n* var g = getGlobal();\n* // returns {...}\n*/\nfunction getGlobal( codegen ) {\n\tif ( arguments.length ) {\n\t\tif ( !isBoolean( codegen ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Must provide a boolean. Value: `%s`.', codegen ) );\n\t\t}\n\t\tif ( codegen ) {\n\t\t\treturn getThis();\n\t\t}\n\t\t// Fall through...\n\t}\n\t// Case: 2020 revision of ECMAScript standard\n\tif ( GlobalThis ) {\n\t\treturn GlobalThis;\n\t}\n\t// Case: browsers and web workers\n\tif ( Self ) {\n\t\treturn Self;\n\t}\n\t// Case: browsers\n\tif ( Win ) {\n\t\treturn Win;\n\t}\n\t// Case: Node.js\n\tif ( Global ) {\n\t\treturn Global;\n\t}\n\t// Case: unknown\n\tthrow new Error( 'unexpected error. Unable to resolve global object.' );\n}\n\n\n// EXPORTS //\n\nexport default getGlobal;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Returns the global object using code generation.\n*\n* @private\n* @returns {Object} global object\n*/\nfunction getGlobal() {\n\treturn new Function( 'return this;' )(); // eslint-disable-line no-new-func, stdlib/require-globals\n}\n\n\n// EXPORTS //\n\nexport default getGlobal;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\nvar typedarray = Int8Array; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default typedarray;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Returns a regular expression to capture everything that is not a space immediately after the `function` keyword and before the first left parenthesis.\n*\n* @returns {RegExp} regular expression\n*\n* @example\n* var RE_FUNCTION_NAME = reFunctionName();\n*\n* function fname( fcn ) {\n* return RE_FUNCTION_NAME.exec( fcn.toString() )[ 1 ];\n* }\n*\n* var fn = fname( Math.sqrt );\n* // returns 'sqrt'\n*\n* fn = fname( Int8Array );\n* // returns 'Int8Array'\n*\n* fn = fname( Object.prototype.toString );\n* // returns 'toString'\n*\n* fn = fname( function(){} );\n* // returns ''\n*/\nfunction reFunctionName() {\n\treturn /^\\s*function\\s*([^(]*)/i;\n}\n\n\n// EXPORTS //\n\nexport default reFunctionName;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport reFunctionName from './main.js';\n\n\n// MAIN //\n\n/**\n* Captures everything that is not a space immediately after the `function` keyword and before the first left parenthesis.\n*\n* Regular expression: `/^\\s*function\\s*([^(]*)/i`\n*\n* - `/^\\s*`\n* - Match zero or more spaces at beginning\n*\n* - `function`\n* - Match the word `function`\n*\n* - `\\s*`\n* - Match zero or more spaces after the word `function`\n*\n* - `()`\n* - Capture\n*\n* - `[^(]*`\n* - Match anything except a left parenthesis `(` zero or more times\n*\n* - `/i`\n* - ignore case\n*\n* @constant\n* @type {RegExp}\n* @default /^\\s*function\\s*([^(]*)/i\n*/\nvar RE_FUNCTION_NAME = reFunctionName();\n\n\n// EXPORTS //\n\nexport default RE_FUNCTION_NAME;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Tests if a value is object-like.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether a value is object-like\n*\n* @example\n* var bool = isObjectLike( {} );\n* // returns true\n*\n* @example\n* var bool = isObjectLike( [] );\n* // returns true\n*\n* @example\n* var bool = isObjectLike( null );\n* // returns false\n*/\nfunction isObjectLike( value ) {\n\treturn (\n\t\tvalue !== null &&\n\t\ttypeof value === 'object'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isObjectLike;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\nimport { REGEXP as RE } from '@stdlib/regexp-function-name';\nimport isBuffer from '@stdlib/assert-is-buffer';\n\n\n// MAIN //\n\n/**\n* Determines the name of a value's constructor.\n*\n* @param {*} v - input value\n* @returns {string} name of a value's constructor\n*\n* @example\n* var v = constructorName( 'a' );\n* // returns 'String'\n*\n* @example\n* var v = constructorName( 5 );\n* // returns 'Number'\n*\n* @example\n* var v = constructorName( null );\n* // returns 'Null'\n*\n* @example\n* var v = constructorName( undefined );\n* // returns 'Undefined'\n*\n* @example\n* var v = constructorName( function noop() {} );\n* // returns 'Function'\n*/\nfunction constructorName( v ) {\n\tvar match;\n\tvar name;\n\tvar ctor;\n\tname = nativeClass( v ).slice( 8, -1 );\n\tif ( (name === 'Object' || name === 'Error') && v.constructor ) {\n\t\tctor = v.constructor;\n\t\tif ( typeof ctor.name === 'string' ) {\n\t\t\treturn ctor.name;\n\t\t}\n\t\tmatch = RE.exec( ctor.toString() );\n\t\tif ( match ) {\n\t\t\treturn match[ 1 ];\n\t\t}\n\t}\n\tif ( isBuffer( v ) ) {\n\t\treturn 'Buffer';\n\t}\n\treturn name;\n}\n\n\n// EXPORTS //\n\nexport default constructorName;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isObjectLike from '@stdlib/assert-is-object-like';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Buffer instance.\n*\n* @param {*} value - value to validate\n* @returns {boolean} boolean indicating if a value is a Buffer instance\n*\n* @example\n* var v = isBuffer( new Buffer( 'beep' ) );\n* // returns true\n*\n* @example\n* var v = isBuffer( new Buffer( [1,2,3,4] ) );\n* // returns true\n*\n* @example\n* var v = isBuffer( {} );\n* // returns false\n*\n* @example\n* var v = isBuffer( [] );\n* // returns false\n*/\nfunction isBuffer( value ) {\n\treturn (\n\t\tisObjectLike( value ) &&\n\t\t(\n\t\t\t// eslint-disable-next-line no-underscore-dangle\n\t\t\tvalue._isBuffer || // for envs missing Object.prototype.constructor (e.g., Safari 5-7)\n\t\t\t(\n\t\t\t\tvalue.constructor &&\n\n\t\t\t\t// WARNING: `typeof` is not a foolproof check, as certain envs consider RegExp and NodeList instances to be functions\n\t\t\t\ttypeof value.constructor.isBuffer === 'function' &&\n\t\t\t\tvalue.constructor.isBuffer( value )\n\t\t\t)\n\t\t)\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isBuffer;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Regular expression to capture everything that is not a space immediately after the `function` keyword and before the first left parenthesis.\n*\n* @module @stdlib/regexp-function-name\n*\n* @example\n* import reFunctionName from '@stdlib/regexp-function-name';\n* var RE_FUNCTION_NAME = reFunctionName();\n*\n* function fname( fcn ) {\n* return RE_FUNCTION_NAME.exec( fcn.toString() )[ 1 ];\n* }\n*\n* var fn = fname( Math.sqrt );\n* // returns 'sqrt'\n*\n* fn = fname( Int8Array );\n* // returns 'Int8Array'\n*\n* fn = fname( Object.prototype.toString );\n* // returns 'toString'\n*\n* fn = fname( function(){} );\n* // returns ''\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport REGEXP from './regexp.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'REGEXP', REGEXP );\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test if a value is object-like.\n*\n* @module @stdlib/assert-is-object-like\n*\n* @example\n* import isObjectLike from '@stdlib/assert-is-object-like';\n*\n* var bool = isObjectLike( {} );\n* // returns true\n*\n* bool = isObjectLike( [] );\n* // returns true\n*\n* bool = isObjectLike( null );\n* // returns false\n*\n* @example\n* import { isObjectLikeArray as isObjectLike } from '@stdlib/assert-is-object-like';\n*\n* var bool = isObjectLike( [ {}, [] ] );\n* // returns true\n*\n* bool = isObjectLike( [ {}, '3.0' ] );\n* // returns false\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport arrayfun from '@stdlib/assert-tools-array-function';\nimport main from './main.js';\n\n\n// VARIABLES //\n\nvar isObjectLikeArray = arrayfun( main );\n\n\n// MAIN //\n\nsetReadOnly( main, 'isObjectLikeArray', isObjectLikeArray );\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isArray from '@stdlib/assert-is-array';\nimport format from '@stdlib/string-format';\n\n\n// MAIN //\n\n/**\n* Returns a function which tests if every element in an array passes a test condition.\n*\n* @param {Function} predicate - function to apply\n* @throws {TypeError} must provide a function\n* @returns {Function} an array function\n*\n* @example\n* import isOdd from '@stdlib/assert-is-odd';\n*\n* var arr1 = [ 1, 3, 5, 7 ];\n* var arr2 = [ 3, 5, 8 ];\n*\n* var validate = arrayfcn( isOdd );\n*\n* var bool = validate( arr1 );\n* // returns true\n*\n* bool = validate( arr2 );\n* // returns false\n*/\nfunction arrayfcn( predicate ) {\n\tif ( typeof predicate !== 'function' ) {\n\t\tthrow new TypeError( format( 'invalid argument. Must provide a function. Value: `%s`.', predicate ) );\n\t}\n\treturn every;\n\n\t/**\n\t* Tests if every element in an array passes a test condition.\n\t*\n\t* @private\n\t* @param {*} value - value to test\n\t* @returns {boolean} boolean indicating whether a value is an array for which all elements pass a test condition\n\t*/\n\tfunction every( value ) {\n\t\tvar len;\n\t\tvar i;\n\t\tif ( !isArray( value ) ) {\n\t\t\treturn false;\n\t\t}\n\t\tlen = value.length;\n\t\tif ( len === 0 ) {\n\t\t\treturn false;\n\t\t}\n\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\tif ( predicate( value[ i ] ) === false ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}\n}\n\n\n// EXPORTS //\n\nexport default arrayfcn;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Determine a value's type.\n*\n* @module @stdlib/utils-type-of\n*\n* @example\n* import typeOf from '@stdlib/utils-type-of';\n*\n* var str = typeOf( 'a' );\n* // returns 'string'\n*\n* str = typeOf( 5 );\n* // returns 'number'\n*/\n\n// MODULES //\n\nimport usePolyfill from './check.js';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar main = ( usePolyfill() ) ? polyfill : builtin;\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport RE from './fixtures/re.js';\nimport nodeList from './fixtures/nodelist.js';\nimport typedarray from './fixtures/typedarray.js';\n\n\n// MAIN //\n\n/**\n* Checks whether a polyfill is needed when using the `typeof` operator.\n*\n* @private\n* @returns {boolean} boolean indicating whether a polyfill is needed\n*/\nfunction check() {\n\tif (\n\t\t// Chrome 1-12 returns 'function' for regular expression instances (see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/typeof):\n\t\ttypeof RE === 'function' ||\n\n\t\t// Safari 8 returns 'object' for typed array and weak map constructors (underscore #1929):\n\t\ttypeof typedarray === 'object' ||\n\n\t\t// PhantomJS 1.9 returns 'function' for `NodeList` instances (underscore #2236):\n\t\ttypeof nodeList === 'function'\n\t) {\n\t\treturn true;\n\t}\n\treturn false;\n}\n\n\n// EXPORTS //\n\nexport default check;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport ctorName from '@stdlib/utils-constructor-name';\n\n\n// MAIN //\n\n/**\n* Determines a value's type.\n*\n* @param {*} v - input value\n* @returns {string} string indicating the value's type\n*/\nfunction typeOf( v ) {\n\treturn ctorName( v ).toLowerCase();\n}\n\n\n// EXPORTS //\n\nexport default typeOf;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport ctorName from '@stdlib/utils-constructor-name';\n\n\n// NOTES //\n\n/*\n* Built-in `typeof` operator behavior:\n*\n* ```text\n* typeof null => 'object'\n* typeof undefined => 'undefined'\n* typeof 'a' => 'string'\n* typeof 5 => 'number'\n* typeof NaN => 'number'\n* typeof true => 'boolean'\n* typeof false => 'boolean'\n* typeof {} => 'object'\n* typeof [] => 'object'\n* typeof function foo(){} => 'function'\n* typeof function* foo(){} => 'object'\n* typeof Symbol() => 'symbol'\n* ```\n*\n*/\n\n\n// MAIN //\n\n/**\n* Determines a value's type.\n*\n* @param {*} v - input value\n* @returns {string} string indicating the value's type\n*/\nfunction typeOf( v ) {\n\tvar type;\n\n\t// Address `typeof null` => `object` (see http://wiki.ecmascript.org/doku.php?id=harmony:typeof_null):\n\tif ( v === null ) {\n\t\treturn 'null';\n\t}\n\ttype = typeof v;\n\n\t// If the `typeof` operator returned something other than `object`, we are done. Otherwise, we need to check for an internal class name or search for a constructor.\n\tif ( type === 'object' ) {\n\t\treturn ctorName( v ).toLowerCase();\n\t}\n\treturn type;\n}\n\n\n// EXPORTS //\n\nexport default typeOf;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport typeOf from '@stdlib/utils-type-of';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a function.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a function\n*\n* @example\n* function beep() {\n* return 'beep';\n* }\n*\n* var bool = isFunction( beep );\n* // returns true\n*/\nfunction isFunction( value ) {\n\t// Note: cannot use `typeof` directly, as various browser engines incorrectly return `'function'` when operating on non-function objects, such as regular expressions and NodeLists.\n\treturn ( typeOf( value ) === 'function' );\n}\n\n\n// EXPORTS //\n\nexport default isFunction;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isNumber } from '@stdlib/assert-is-number';\nimport defineProperty from '@stdlib/utils-define-property';\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport format from '@stdlib/string-format';\nimport toStr from './tostring.js';\nimport toJSON from './tojson.js';\n\n\n// MAIN //\n\n/**\n* 128-bit complex number constructor.\n*\n* @constructor\n* @param {number} real - real component\n* @param {number} imag - imaginary component\n* @throws {TypeError} must invoke using the `new` keyword\n* @throws {TypeError} real component must be a number\n* @throws {TypeError} imaginary component must be a number\n* @returns {Complex128} 128-bit complex number\n*\n* @example\n* var z = new Complex128( 5.0, 3.0 );\n* // returns \n*/\nfunction Complex128( real, imag ) {\n\tif ( !( this instanceof Complex128 ) ) {\n\t\tthrow new TypeError( 'invalid invocation. Constructor must be called with the `new` keyword.' );\n\t}\n\tif ( !isNumber( real ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Real component must be a number. Value: `%s`.', real ) );\n\t}\n\tif ( !isNumber( imag ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Imaginary component must be a number. Value: `%s`.', imag ) );\n\t}\n\tdefineProperty( this, 're', {\n\t\t'configurable': false,\n\t\t'enumerable': true,\n\t\t'writable': false,\n\t\t'value': real\n\t});\n\tdefineProperty( this, 'im', {\n\t\t'configurable': false,\n\t\t'enumerable': true,\n\t\t'writable': false,\n\t\t'value': imag\n\t});\n\treturn this;\n}\n\n/**\n* Size (in bytes) of each component.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex128\n* @type {integer}\n* @returns {integer} size of each component\n*\n* @example\n* var nbytes = Complex128.BYTES_PER_ELEMENT;\n* // returns 8\n*/\nsetReadOnly( Complex128, 'BYTES_PER_ELEMENT', 8 );\n\n/**\n* Size (in bytes) of each component.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex128.prototype\n* @type {integer}\n* @returns {integer} size of each component\n*\n* @example\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var nbytes = z.BYTES_PER_ELEMENT;\n* // returns 8\n*/\nsetReadOnly( Complex128.prototype, 'BYTES_PER_ELEMENT', 8 );\n\n/**\n* Length (in bytes) of a complex number.\n*\n* @name byteLength\n* @memberof Complex128.prototype\n* @type {integer}\n* @returns {integer} byte length\n*\n* @example\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var nbytes = z.byteLength;\n* // returns 16\n*/\nsetReadOnly( Complex128.prototype, 'byteLength', 16 );\n\n/**\n* Serializes a complex number as a string.\n*\n* @name toString\n* @memberof Complex128.prototype\n* @type {Function}\n* @returns {string} serialized complex number\n*\n* @example\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var str = z.toString();\n* // returns '5 + 3i'\n*/\nsetReadOnly( Complex128.prototype, 'toString', toStr );\n\n/**\n* Serializes a complex number as a JSON object.\n*\n* ## Notes\n*\n* - `JSON.stringify()` implicitly calls this method when stringifying a `Complex128` instance.\n*\n* @name toJSON\n* @memberof Complex128.prototype\n* @type {Function}\n* @returns {Object} serialized complex number\n*\n* @example\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var obj = z.toJSON();\n* // returns { 'type': 'Complex128', 're': 5.0, 'im': 3.0 }\n*/\nsetReadOnly( Complex128.prototype, 'toJSON', toJSON );\n\n\n// EXPORTS //\n\nexport default Complex128;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Serializes a complex number as a string.\n*\n* @private\n* @returns {string} serialized complex number\n*/\nfunction toString() { // eslint-disable-line stdlib/no-redeclare\n\t/* eslint-disable no-invalid-this */\n\tvar str = '' + this.re;\n\tif ( this.im < 0 ) {\n\t\tstr += ' - ' + (-this.im);\n\t} else {\n\t\tstr += ' + ' + this.im;\n\t}\n\tstr += 'i';\n\treturn str;\n}\n\n\n// EXPORTS //\n\nexport default toString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Serializes a complex number as a JSON object.\n*\n* @private\n* @returns {Object} JSON representation\n*/\nfunction toJSON() {\n\t/* eslint-disable no-invalid-this */\n\tvar out = {};\n\tout.type = 'Complex128';\n\tout.re = this.re;\n\tout.im = this.im;\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default toJSON;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar fround = ( typeof Math.fround === 'function' ) ? Math.fround : null; // eslint-disable-line stdlib/no-builtin-math\n\n\n// EXPORTS //\n\nexport default fround;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport Float32Array from '@stdlib/array-float32';\n\n\n// VARIABLES //\n\nvar FLOAT32_VIEW = new Float32Array( 1 );\n\n\n// MAIN //\n\n/**\n* Converts a double-precision floating-point number to the nearest single-precision floating-point number.\n*\n* @param {number} x - double-precision floating-point number\n* @returns {number} nearest single-precision floating-point number\n*\n* @example\n* var y = float64ToFloat32( 1.337 );\n* // returns 1.3370000123977661\n*/\nfunction float64ToFloat32( x ) {\n\tFLOAT32_VIEW[ 0 ] = x;\n\treturn FLOAT32_VIEW[ 0 ];\n}\n\n\n// EXPORTS //\n\nexport default float64ToFloat32;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Convert a double-precision floating-point number to the nearest single-precision floating-point number.\n*\n* @module @stdlib/number-float64-base-to-float32\n*\n* @example\n* import float64ToFloat32 from '@stdlib/number-float64-base-to-float32';\n*\n* var y = float64ToFloat32( 1.337 );\n* // returns 1.3370000123977661\n*/\n\n// MODULES //\n\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar float64ToFloat32;\nif ( typeof builtin === 'function' ) {\n\tfloat64ToFloat32 = builtin;\n} else {\n\tfloat64ToFloat32 = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default float64ToFloat32;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isNumber } from '@stdlib/assert-is-number';\nimport defineProperty from '@stdlib/utils-define-property';\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport float64ToFloat32 from '@stdlib/number-float64-base-to-float32';\nimport format from '@stdlib/string-format';\nimport toStr from './tostring.js';\nimport toJSON from './tojson.js';\n\n\n// MAIN //\n\n/**\n* 64-bit complex number constructor.\n*\n* @constructor\n* @param {number} real - real component\n* @param {number} imag - imaginary component\n* @throws {TypeError} must invoke using the `new` keyword\n* @throws {TypeError} real component must be a number\n* @throws {TypeError} imaginary component must be a number\n* @returns {Complex64} 64-bit complex number\n*\n* @example\n* var z = new Complex64( 5.0, 3.0 );\n* // returns \n*/\nfunction Complex64( real, imag ) {\n\tif ( !( this instanceof Complex64 ) ) {\n\t\tthrow new TypeError( 'invalid invocation. Constructor must be called with the `new` keyword.' );\n\t}\n\tif ( !isNumber( real ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Real component must be a number. Value: `%s`.', real ) );\n\t}\n\tif ( !isNumber( imag ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Imaginary component must be a number. Value: `%s`.', imag ) );\n\t}\n\tdefineProperty( this, 're', {\n\t\t'configurable': false,\n\t\t'enumerable': true,\n\t\t'writable': false,\n\t\t'value': float64ToFloat32( real )\n\t});\n\tdefineProperty( this, 'im', {\n\t\t'configurable': false,\n\t\t'enumerable': true,\n\t\t'writable': false,\n\t\t'value': float64ToFloat32( imag )\n\t});\n\treturn this;\n}\n\n/**\n* Size (in bytes) of each component.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex64\n* @type {integer}\n* @returns {integer} size of each component\n*\n* @example\n* var nbytes = Complex64.BYTES_PER_ELEMENT;\n* // returns 4\n*/\nsetReadOnly( Complex64, 'BYTES_PER_ELEMENT', 4 );\n\n/**\n* Size (in bytes) of each component.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex64.prototype\n* @type {integer}\n* @returns {integer} size of each component\n*\n* @example\n* var z = new Complex64( 5.0, 3.0 );\n*\n* var nbytes = z.BYTES_PER_ELEMENT;\n* // returns 4\n*/\nsetReadOnly( Complex64.prototype, 'BYTES_PER_ELEMENT', 4 );\n\n/**\n* Length (in bytes) of a complex number.\n*\n* @name byteLength\n* @memberof Complex64.prototype\n* @type {integer}\n* @returns {integer} byte length\n*\n* @example\n* var z = new Complex64( 5.0, 3.0 );\n*\n* var nbytes = z.byteLength;\n* // returns 8\n*/\nsetReadOnly( Complex64.prototype, 'byteLength', 8 );\n\n/**\n* Serializes a complex number as a string.\n*\n* @name toString\n* @memberof Complex64.prototype\n* @type {Function}\n* @returns {string} serialized complex number\n*\n* @example\n* var z = new Complex64( 5.0, 3.0 );\n*\n* var str = z.toString();\n* // returns '5 + 3i'\n*/\nsetReadOnly( Complex64.prototype, 'toString', toStr );\n\n/**\n* Serializes a complex number as a JSON object.\n*\n* ## Notes\n*\n* - `JSON.stringify()` implicitly calls this method when stringifying a `Complex64` instance.\n*\n* @name toJSON\n* @memberof Complex64.prototype\n* @type {Function}\n* @returns {Object} serialized complex number\n*\n* @example\n* var z = new Complex64( 5.0, 3.0 );\n*\n* var obj = z.toJSON();\n* // returns { 'type': 'Complex64', 're': 5.0, 'im': 3.0 }\n*/\nsetReadOnly( Complex64.prototype, 'toJSON', toJSON );\n\n\n// EXPORTS //\n\nexport default Complex64;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport Complex128 from '@stdlib/complex-float64-ctor';\nimport Complex64 from '@stdlib/complex-float32-ctor';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a complex number-like object.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a complex number-like object.\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64-ctor';\n* import Complex64 from '@stdlib/complex-float32-ctor';\n*\n* var x = new Complex128( 4.0, 2.0 );\n* var bool = isComplexLike( x );\n* // returns true\n*\n* x = new Complex64( 4.0, 2.0 );\n* bool = isComplexLike( x );\n* // returns true\n*/\nfunction isComplexLike( value ) {\n\tif ( value instanceof Complex128 || value instanceof Complex64 ) {\n\t\treturn true;\n\t}\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\ttypeof value.re === 'number' &&\n\t\ttypeof value.im === 'number'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isComplexLike;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isInteger from '@stdlib/math-base-assert-is-integer';\n\n\n// MAIN //\n\n/**\n* Tests if a finite numeric value is an even number.\n*\n* @param {number} x - value to test\n* @returns {boolean} boolean indicating whether the value is an even number\n*\n* @example\n* var bool = isEven( 5.0 );\n* // returns false\n*\n* @example\n* var bool = isEven( -2.0 );\n* // returns true\n*\n* @example\n* var bool = isEven( 0.0 );\n* // returns true\n*\n* @example\n* var bool = isEven( NaN );\n* // returns false\n*/\nfunction isEven( x ) {\n\treturn isInteger( x/2.0 );\n}\n\n\n// EXPORTS //\n\nexport default isEven;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Serializes a complex number as a string.\n*\n* @private\n* @returns {string} serialized complex number\n*/\nfunction toString() { // eslint-disable-line stdlib/no-redeclare\n\t/* eslint-disable no-invalid-this */\n\tvar str = '' + this.re;\n\tif ( this.im < 0 ) {\n\t\tstr += ' - ' + (-this.im);\n\t} else {\n\t\tstr += ' + ' + this.im;\n\t}\n\tstr += 'i';\n\treturn str;\n}\n\n\n// EXPORTS //\n\nexport default toString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Serializes a complex number as a JSON object.\n*\n* @private\n* @returns {Object} JSON representation\n*/\nfunction toJSON() {\n\t/* eslint-disable no-invalid-this */\n\tvar out = {};\n\tout.type = 'Complex64';\n\tout.re = this.re;\n\tout.im = this.im;\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default toJSON;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// VARIABLES //\n\nvar BYTES_PER_ELEMENT = 8; // 4 bytes per float32 x (1 real + 1 imag component)\n\n\n// MAIN //\n\n/**\n* Returns a boolean indicating if a value is a `Complex64Array`.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a `Complex64Array`\n*\n* @example\n* import Complex64Array from '@stdlib/array-complex64';\n*\n* var bool = isComplex64Array( new Complex64Array( 10 ) );\n* // returns true\n*\n* bool = isComplex64Array( [] );\n* // returns false\n*/\nfunction isComplex64Array( value ) {\n\t// Note: the following is not robust and that is intentional. In this case, we are seeking a lower cost way to reasonably determine whether an input value is a `Complex64Array` in order to avoid walking the prototype chain and resolving constructors, which is necessary for robust identification of cross-realm instances. For more robust validation, see `@stdlib/assert/is-complex64array`.\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\tvalue.constructor.name === 'Complex64Array' &&\n\t\tvalue.BYTES_PER_ELEMENT === BYTES_PER_ELEMENT\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isComplex64Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// VARIABLES //\n\nvar BYTES_PER_ELEMENT = 16; // 8 bytes per float64 x (1 real + 1 imag component)\n\n\n// MAIN //\n\n/**\n* Returns a boolean indicating if a value is a `Complex128Array`.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a `Complex128Array`\n*\n* @example\n* import Complex128Array from '@stdlib/array-complex128';\n*\n* var bool = isComplex128Array( new Complex128Array( 10 ) );\n* // returns true\n*\n* bool = isComplex128Array( [] );\n* // returns false\n*/\nfunction isComplex128Array( value ) {\n\t// Note: the following is not robust and that is intentional. In this case, we are seeking a lower cost way to reasonably determine whether an input value is a `Complex128Array` in order to avoid walking the prototype chain and resolving constructors, which is necessary for robust identification of cross-realm instances. For more robust validation, see `@stdlib/assert/is-complex128array`.\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\tvalue.constructor.name === 'Complex128Array' &&\n\t\tvalue.BYTES_PER_ELEMENT === BYTES_PER_ELEMENT\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isComplex128Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport hasOwnProp from '@stdlib/assert-has-own-property';\nimport Symbol from '@stdlib/symbol-ctor';\n\n\n// MAIN //\n\n/**\n* Tests for native `Symbol.iterator` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Symbol.iterator` support\n*\n* @example\n* var bool = hasIteratorSymbolSupport();\n* // returns \n*/\nfunction hasIteratorSymbolSupport() {\n\treturn (\n\t\ttypeof Symbol === 'function' &&\n\t\ttypeof Symbol( 'foo' ) === 'symbol' &&\n\t\thasOwnProp( Symbol, 'iterator' ) &&\n\t\ttypeof Symbol.iterator === 'symbol'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default hasIteratorSymbolSupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport hasIteratorSymbolSupport from '@stdlib/assert-has-iterator-symbol-support';\n\n\n// MAIN //\n\n/**\n* Iterator symbol.\n*\n* @name IteratorSymbol\n* @constant\n* @type {(symbol|null)}\n*\n* @example\n* function iterator() {\n* var it;\n* var i;\n*\n* i = -1;\n*\n* it = {};\n* it.next = next;\n* it.return = done;\n*\n* if ( IteratorSymbol ) {\n* it[ IteratorSymbol ] = iterator;\n* }\n* return it;\n*\n* function next() {\n* i += 1;\n* return {\n* 'value': i,\n* 'done': false\n* };\n* }\n*\n* function done( value ) {\n* if ( arguments.length === 0 ) {\n* return {\n* 'done': true\n* };\n* }\n* return {\n* 'value': value,\n* 'done': true\n* };\n* }\n* }\n*\n* var obj = iterator();\n*/\nvar IteratorSymbol = ( hasIteratorSymbolSupport() ) ? Symbol.iterator : null;\n\n\n// EXPORTS //\n\nexport default IteratorSymbol;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport defineProperty from '@stdlib/utils-define-property';\n\n\n// MAIN //\n\n/**\n* Defines a non-enumerable read-only accessor.\n*\n* @param {Object} obj - object on which to define the property\n* @param {(string|symbol)} prop - property name\n* @param {Function} getter - accessor\n*\n* @example\n* function getter() {\n* return 'bar';\n* }\n*\n* var obj = {};\n*\n* setNonEnumerableReadOnlyAccessor( obj, 'foo', getter );\n*\n* try {\n* obj.foo = 'boop';\n* } catch ( err ) {\n* console.error( err.message );\n* }\n*/\nfunction setNonEnumerableReadOnlyAccessor( obj, prop, getter ) { // eslint-disable-line id-length\n\tdefineProperty( obj, prop, {\n\t\t'configurable': false,\n\t\t'enumerable': false,\n\t\t'get': getter\n\t});\n}\n\n\n// EXPORTS //\n\nexport default setNonEnumerableReadOnlyAccessor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isNumber } from '@stdlib/assert-is-number';\nimport defineProperty from '@stdlib/utils-define-property';\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport float64ToFloat32 from '@stdlib/number-float64-base-to-float32';\nimport format from '@stdlib/string-format';\nimport toStr from './tostring.js';\nimport toJSON from './tojson.js';\n\n\n// MAIN //\n\n/**\n* 64-bit complex number constructor.\n*\n* @constructor\n* @param {number} real - real component\n* @param {number} imag - imaginary component\n* @throws {TypeError} must invoke using the `new` keyword\n* @throws {TypeError} real component must be a number\n* @throws {TypeError} imaginary component must be a number\n* @returns {Complex64} 64-bit complex number\n*\n* @example\n* var z = new Complex64( 5.0, 3.0 );\n* // returns \n*/\nfunction Complex64( real, imag ) {\n\tif ( !( this instanceof Complex64 ) ) {\n\t\tthrow new TypeError( 'invalid invocation. Constructor must be called with the `new` keyword.' );\n\t}\n\tif ( !isNumber( real ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Real component must be a number. Value: `%s`.', real ) );\n\t}\n\tif ( !isNumber( imag ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Imaginary component must be a number. Value: `%s`.', imag ) );\n\t}\n\tdefineProperty( this, 're', {\n\t\t'configurable': false,\n\t\t'enumerable': true,\n\t\t'writable': false,\n\t\t'value': float64ToFloat32( real )\n\t});\n\tdefineProperty( this, 'im', {\n\t\t'configurable': false,\n\t\t'enumerable': true,\n\t\t'writable': false,\n\t\t'value': float64ToFloat32( imag )\n\t});\n\treturn this;\n}\n\n/**\n* Size (in bytes) of each component.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex64\n* @type {integer}\n* @returns {integer} size of each component\n*\n* @example\n* var nbytes = Complex64.BYTES_PER_ELEMENT;\n* // returns 4\n*/\nsetReadOnly( Complex64, 'BYTES_PER_ELEMENT', 4 );\n\n/**\n* Size (in bytes) of each component.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex64.prototype\n* @type {integer}\n* @returns {integer} size of each component\n*\n* @example\n* var z = new Complex64( 5.0, 3.0 );\n*\n* var nbytes = z.BYTES_PER_ELEMENT;\n* // returns 4\n*/\nsetReadOnly( Complex64.prototype, 'BYTES_PER_ELEMENT', 4 );\n\n/**\n* Length (in bytes) of a complex number.\n*\n* @name byteLength\n* @memberof Complex64.prototype\n* @type {integer}\n* @returns {integer} byte length\n*\n* @example\n* var z = new Complex64( 5.0, 3.0 );\n*\n* var nbytes = z.byteLength;\n* // returns 8\n*/\nsetReadOnly( Complex64.prototype, 'byteLength', 8 );\n\n/**\n* Serializes a complex number as a string.\n*\n* @name toString\n* @memberof Complex64.prototype\n* @type {Function}\n* @returns {string} serialized complex number\n*\n* @example\n* var z = new Complex64( 5.0, 3.0 );\n*\n* var str = z.toString();\n* // returns '5 + 3i'\n*/\nsetReadOnly( Complex64.prototype, 'toString', toStr );\n\n/**\n* Serializes a complex number as a JSON object.\n*\n* ## Notes\n*\n* - `JSON.stringify()` implicitly calls this method when stringifying a `Complex64` instance.\n*\n* @name toJSON\n* @memberof Complex64.prototype\n* @type {Function}\n* @returns {Object} serialized complex number\n*\n* @example\n* var z = new Complex64( 5.0, 3.0 );\n*\n* var obj = z.toJSON();\n* // returns { 'type': 'Complex64', 're': 5.0, 'im': 3.0 }\n*/\nsetReadOnly( Complex64.prototype, 'toJSON', toJSON );\n\n\n// EXPORTS //\n\nexport default Complex64;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Returns the real component of a single-precision complex floating-point number.\n*\n* @param {Complex} z - complex number\n* @returns {number} real component\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n*\n* var z = new Complex64( 5.0, 3.0 );\n*\n* var re = realf( z );\n* // returns 5.0\n*/\nfunction realf( z ) {\n\treturn z.re;\n}\n\n\n// EXPORTS //\n\nexport default realf;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Returns the imaginary component of a single-precision complex floating-point number.\n*\n* @param {Complex} z - complex number\n* @returns {number} imaginary component\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n*\n* var z = new Complex64( 5.0, 3.0 );\n*\n* var im = imagf( z );\n* // returns 3.0\n*/\nfunction imagf( z ) {\n\treturn z.im;\n}\n\n\n// EXPORTS //\n\nexport default imagf;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport Float32Array from '@stdlib/array-float32';\n\n\n// MAIN //\n\n/**\n* Reinterprets a `Complex64Array` as a `Float32Array`.\n*\n* @param {Complex64Array} x - input array\n* @param {NonNegativeInteger} offset - starting index\n* @returns {Float32Array} `Float32Array` view\n*\n* @example\n* import Complex64Array from '@stdlib/array-complex64';\n*\n* var x = new Complex64Array( 10 );\n*\n* var out = reinterpret( x, 0 );\n* // returns \n*\n* var bool = ( out.buffer === x.buffer );\n* // returns true\n*/\nfunction reinterpret( x, offset ) {\n\treturn new Float32Array( x.buffer, x.byteOffset+(x.BYTES_PER_ELEMENT*offset), 2*(x.length-offset) ); // eslint-disable-line max-len\n}\n\n\n// EXPORTS //\n\nexport default reinterpret;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport Float64Array from '@stdlib/array-float64';\n\n\n// MAIN //\n\n/**\n* Reinterprets a `Complex128Array` as a `Float64Array`.\n*\n* @param {Complex128Array} x - input array\n* @param {NonNegativeInteger} offset - starting index\n* @returns {Float64Array} `Float64Array` view\n*\n* @example\n* import Complex128Array from '@stdlib/array-complex128';\n*\n* var x = new Complex128Array( 10 );\n*\n* var out = reinterpret( x, 0 );\n* // returns \n*\n* var bool = ( out.buffer === x.buffer );\n* // returns true\n*/\nfunction reinterpret( x, offset ) {\n\treturn new Float64Array( x.buffer, x.byteOffset+(x.BYTES_PER_ELEMENT*offset), 2*(x.length-offset) ); // eslint-disable-line max-len\n}\n\n\n// EXPORTS //\n\nexport default reinterpret;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Serializes a complex number as a string.\n*\n* @private\n* @returns {string} serialized complex number\n*/\nfunction toString() { // eslint-disable-line stdlib/no-redeclare\n\t/* eslint-disable no-invalid-this */\n\tvar str = '' + this.re;\n\tif ( this.im < 0 ) {\n\t\tstr += ' - ' + (-this.im);\n\t} else {\n\t\tstr += ' + ' + this.im;\n\t}\n\tstr += 'i';\n\treturn str;\n}\n\n\n// EXPORTS //\n\nexport default toString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Serializes a complex number as a JSON object.\n*\n* @private\n* @returns {Object} JSON representation\n*/\nfunction toJSON() {\n\t/* eslint-disable no-invalid-this */\n\tvar out = {};\n\tout.type = 'Complex64';\n\tout.re = this.re;\n\tout.im = this.im;\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default toJSON;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// VARIABLES //\n\nvar GETTERS = {\n\t'float64': getFloat64,\n\t'float32': getFloat32,\n\t'int32': getInt32,\n\t'int16': getInt16,\n\t'int8': getInt8,\n\t'uint32': getUint32,\n\t'uint16': getUint16,\n\t'uint8': getUint8,\n\t'uint8c': getUint8c,\n\t'generic': getGeneric,\n\t'default': getArrayLike\n};\n\n\n// FUNCTIONS //\n\n/**\n* Returns an element from a `Float64Array`.\n*\n* @private\n* @param {Float64Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n*\n* var arr = new Float64Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getFloat64( arr, 2 );\n* // returns 3.0\n*/\nfunction getFloat64( arr, idx ) {\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from a `Float32Array`.\n*\n* @private\n* @param {Float32Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Float32Array from '@stdlib/array-float32';\n*\n* var arr = new Float32Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getFloat32( arr, 2 );\n* // returns 3.0\n*/\nfunction getFloat32( arr, idx ) {\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from an `Int32Array`.\n*\n* @private\n* @param {Int32Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Int32Array from '@stdlib/array-int32';\n*\n* var arr = new Int32Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getInt32( arr, 2 );\n* // returns 3\n*/\nfunction getInt32( arr, idx ) { // eslint-disable-line stdlib/jsdoc-doctest-decimal-point\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from an `Int16Array`.\n*\n* @private\n* @param {Int16Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Int16Array from '@stdlib/array-int16';\n*\n* var arr = new Int16Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getInt16( arr, 2 );\n* // returns 3\n*/\nfunction getInt16( arr, idx ) { // eslint-disable-line stdlib/jsdoc-doctest-decimal-point\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from an `Int8Array`.\n*\n* @private\n* @param {Int8Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Int8Array from '@stdlib/array-int8';\n*\n* var arr = new Int8Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getInt8( arr, 2 );\n* // returns 3\n*/\nfunction getInt8( arr, idx ) { // eslint-disable-line stdlib/jsdoc-doctest-decimal-point\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from a `Uint32Array`.\n*\n* @private\n* @param {Uint32Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Uint32Array from '@stdlib/array-uint32';\n*\n* var arr = new Uint32Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getUint32( arr, 2 );\n* // returns 3\n*/\nfunction getUint32( arr, idx ) { // eslint-disable-line stdlib/jsdoc-doctest-decimal-point\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from a `Uint16Array`.\n*\n* @private\n* @param {Uint16Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Uint16Array from '@stdlib/array-uint16';\n*\n* var arr = new Uint16Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getUint16( arr, 2 );\n* // returns 3\n*/\nfunction getUint16( arr, idx ) { // eslint-disable-line stdlib/jsdoc-doctest-decimal-point\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from a `Uint8Array`.\n*\n* @private\n* @param {Uint8Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Uint8Array from '@stdlib/array-uint8';\n*\n* var arr = new Uint8Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getUint8( arr, 2 );\n* // returns 3\n*/\nfunction getUint8( arr, idx ) { // eslint-disable-line stdlib/jsdoc-doctest-decimal-point\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from a `Uint8ClampedArray`.\n*\n* @private\n* @param {Uint8ClampedArray} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Uint8ClampedArray from '@stdlib/array-uint8c';\n*\n* var arr = new Uint8ClampedArray( [ 1, 2, 3, 4 ] );\n*\n* var v = getUint8c( arr, 2 );\n* // returns 3\n*/\nfunction getUint8c( arr, idx ) { // eslint-disable-line stdlib/jsdoc-doctest-decimal-point\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from a generic `Array`.\n*\n* @private\n* @param {Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {*} element value\n*\n* @example\n* var arr = [ 1, 2, 3, 4 ];\n*\n* var v = getGeneric( arr, 2 );\n* // returns 3\n*/\nfunction getGeneric( arr, idx ) {\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from an indexed array-like object.\n*\n* @private\n* @param {Collection} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {*} element value\n*\n* @example\n* var arr = [ 1, 2, 3, 4 ];\n*\n* var v = getArrayLike( arr, 2 );\n* // returns 3\n*/\nfunction getArrayLike( arr, idx ) {\n\treturn arr[ idx ];\n}\n\n\n// MAIN //\n\n/**\n* Returns an accessor function for retrieving an element from an indexed array-like object.\n*\n* @param {string} dtype - array dtype\n* @returns {Function} accessor\n*\n* @example\n* import dtype from '@stdlib/array-dtype';\n*\n* var arr = [ 1, 2, 3, 4 ];\n*\n* var get = getter( dtype( arr ) );\n* var v = get( arr, 2 );\n* // returns 3\n*/\nfunction getter( dtype ) {\n\tvar f = GETTERS[ dtype ];\n\tif ( typeof f === 'function' ) {\n\t\treturn f;\n\t}\n\treturn GETTERS.default;\n}\n\n\n// EXPORTS //\n\nexport default getter;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// VARIABLES //\n\nvar GETTERS = {\n\t'complex128': getComplex128,\n\t'complex64': getComplex64,\n\t'default': getArrayLike\n};\n\n\n// FUNCTIONS //\n\n/**\n* Returns an element from a `Complex128Array`.\n*\n* @private\n* @param {Complex128Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Complex128Array from '@stdlib/array-complex128';\n* import real from '@stdlib/complex-float64-real';\n* import imag from '@stdlib/complex-float64-imag';\n*\n* var arr = new Complex128Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getComplex128( arr, 1 );\n* // returns \n*\n* var re = real( v );\n* // returns 3.0\n*\n* var im = imag( v );\n* // returns 4.0\n*/\nfunction getComplex128( arr, idx ) {\n\treturn arr.get( idx );\n}\n\n/**\n* Returns an element from a `Complex64Array`.\n*\n* @private\n* @param {Complex64Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Complex64Array from '@stdlib/array-complex64';\n* import realf from '@stdlib/complex-float32-real';\n* import imagf from '@stdlib/complex-float32-imag';\n*\n* var arr = new Complex64Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getComplex64( arr, 1 );\n* // returns \n*\n* var re = realf( v );\n* // returns 3.0\n*\n* var im = imagf( v );\n* // returns 4.0\n*/\nfunction getComplex64( arr, idx ) {\n\treturn arr.get( idx );\n}\n\n/**\n* Returns an element from an array-like object supporting the get/set protocol.\n*\n* @private\n* @param {Collection} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {*} element value\n*\n* @example\n* var arr = [ 1, 2, 3, 4 ];\n*\n* function get( idx ) {\n* return arr[ idx ];\n* }\n*\n* function set( value, idx ) {\n* arr[ idx ] = value;\n* }\n*\n* arr.get = get;\n* arr.set = set;\n*\n* var v = getArrayLike( arr, 2 );\n* // returns 3\n*/\nfunction getArrayLike( arr, idx ) {\n\treturn arr.get( idx );\n}\n\n\n// MAIN //\n\n/**\n* Returns an accessor function for retrieving an element from an array-like object supporting the get/set protocol.\n*\n* @param {string} dtype - array dtype\n* @returns {Function} accessor\n*\n* @example\n* import Complex64Array from '@stdlib/array-complex64';\n* import realf from '@stdlib/complex-float32-real';\n* import imagf from '@stdlib/complex-float32-imag';\n* import dtype from '@stdlib/array-dtype';\n*\n* var arr = new Complex64Array( [ 1, 2, 3, 4 ] );\n*\n* var get = getter( dtype( arr ) );\n* var v = get( arr, 1 );\n* // returns \n*\n* var re = realf( v );\n* // returns 3.0\n*\n* var im = imagf( v );\n* // returns 4.0\n*/\nfunction getter( dtype ) {\n\tvar f = GETTERS[ dtype ];\n\tif ( typeof f === 'function' ) {\n\t\treturn f;\n\t}\n\treturn GETTERS.default;\n}\n\n\n// EXPORTS //\n\nexport default getter;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isArrayLikeObject from '@stdlib/assert-is-array-like-object';\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport realf from '@stdlib/complex-realf';\nimport imagf from '@stdlib/complex-imagf';\nimport format from '@stdlib/string-format';\n\n\n// MAIN //\n\n/**\n* Returns an array of iterated values.\n*\n* @private\n* @param {Object} it - iterator\n* @returns {(Array|TypeError)} array or an error\n*/\nfunction fromIterator( it ) {\n\tvar out;\n\tvar v;\n\tvar z;\n\n\tout = [];\n\twhile ( true ) {\n\t\tv = it.next();\n\t\tif ( v.done ) {\n\t\t\tbreak;\n\t\t}\n\t\tz = v.value;\n\t\tif ( isArrayLikeObject( z ) && z.length >= 2 ) {\n\t\t\tout.push( z[ 0 ], z[ 1 ] );\n\t\t} else if ( isComplexLike( z ) ) {\n\t\t\tout.push( realf( z ), imagf( z ) );\n\t\t} else {\n\t\t\treturn new TypeError( format( 'invalid argument. An iterator must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', z ) );\n\t\t}\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default fromIterator;\n","/* eslint-disable no-restricted-syntax, max-lines, no-invalid-this */\n\n/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isNonNegativeInteger } from '@stdlib/assert-is-nonnegative-integer';\nimport isArrayLikeObject from '@stdlib/assert-is-array-like-object';\nimport isCollection from '@stdlib/assert-is-collection';\nimport isArrayBuffer from '@stdlib/assert-is-arraybuffer';\nimport isObject from '@stdlib/assert-is-object';\nimport isArray from '@stdlib/assert-is-array';\nimport { isPrimitive as isString } from '@stdlib/assert-is-string';\nimport isFunction from '@stdlib/assert-is-function';\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport isEven from '@stdlib/math-base-assert-is-even';\nimport isInteger from '@stdlib/math-base-assert-is-integer';\nimport isComplex64Array from '@stdlib/array-base-assert-is-complex64array';\nimport isComplex128Array from '@stdlib/array-base-assert-is-complex128array';\nimport hasIteratorSymbolSupport from '@stdlib/assert-has-iterator-symbol-support';\nimport ITERATOR_SYMBOL from '@stdlib/symbol-iterator';\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport setReadOnlyAccessor from '@stdlib/utils-define-nonenumerable-read-only-accessor';\nimport Float32Array from '@stdlib/array-float32';\nimport Complex64 from '@stdlib/complex-float32';\nimport format from '@stdlib/string-format';\nimport realf from '@stdlib/complex-realf';\nimport imagf from '@stdlib/complex-imagf';\nimport floor from '@stdlib/math-base-special-floor';\nimport reinterpret64 from '@stdlib/strided-base-reinterpret-complex64';\nimport reinterpret128 from '@stdlib/strided-base-reinterpret-complex128';\nimport getter from '@stdlib/array-base-getter';\nimport accessorGetter from '@stdlib/array-base-accessor-getter';\nimport fromIterator from './from_iterator.js';\nimport fromIteratorMap from './from_iterator_map.js';\nimport fromArray from './from_array.js';\n\n\n// VARIABLES //\n\nvar BYTES_PER_ELEMENT = Float32Array.BYTES_PER_ELEMENT * 2;\nvar HAS_ITERATOR_SYMBOL = hasIteratorSymbolSupport();\n\n\n// FUNCTIONS //\n\n/**\n* Returns a boolean indicating if a value is a complex typed array.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a complex typed array\n*/\nfunction isComplexArray( value ) {\n\treturn (\n\t\tvalue instanceof Complex64Array ||\n\t\t(\n\t\t\ttypeof value === 'object' &&\n\t\t\tvalue !== null &&\n\t\t\t(\n\t\t\t\tvalue.constructor.name === 'Complex64Array' ||\n\t\t\t\tvalue.constructor.name === 'Complex128Array'\n\t\t\t) &&\n\t\t\ttypeof value._length === 'number' && // eslint-disable-line no-underscore-dangle\n\n\t\t\t// NOTE: we don't perform a more rigorous test here for a typed array for performance reasons, as robustly checking for a typed array instance could require walking the prototype tree and performing relatively expensive constructor checks...\n\t\t\ttypeof value._buffer === 'object' // eslint-disable-line no-underscore-dangle\n\t\t)\n\t);\n}\n\n/**\n* Returns a boolean indicating if a value is a complex typed array constructor.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a complex typed array constructor\n*/\nfunction isComplexArrayConstructor( value ) {\n\treturn (\n\t\tvalue === Complex64Array ||\n\n\t\t// NOTE: weaker test in order to avoid a circular dependency with Complex128Array...\n\t\tvalue.name === 'Complex128Array'\n\t);\n}\n\n/**\n* Retrieves a complex number from a complex number array buffer.\n*\n* @private\n* @param {Float32Array} buf - array buffer\n* @param {NonNegativeInteger} idx - element index\n* @returns {Complex64} complex number\n*/\nfunction getComplex64( buf, idx ) {\n\tidx *= 2;\n\treturn new Complex64( buf[ idx ], buf[ idx+1 ] );\n}\n\n\n// MAIN //\n\n/**\n* 64-bit complex number array constructor.\n*\n* @constructor\n* @param {(NonNegativeInteger|Collection|ArrayBuffer|Iterable)} [arg] - length, typed array, array-like object, buffer, or an iterable\n* @param {NonNegativeInteger} [byteOffset=0] - byte offset\n* @param {NonNegativeInteger} [length] - view length\n* @throws {RangeError} ArrayBuffer byte length must be a multiple of `8`\n* @throws {RangeError} array-like object and typed array input arguments must have a length which is a multiple of two\n* @throws {TypeError} if provided only a single argument, must provide a valid argument\n* @throws {TypeError} byte offset must be a nonnegative integer\n* @throws {RangeError} byte offset must be a multiple of `8`\n* @throws {TypeError} view length must be a positive multiple of `8`\n* @throws {RangeError} must provide sufficient memory to accommodate byte offset and view length requirements\n* @throws {TypeError} an iterator must return either a two element array containing real and imaginary components or a complex number\n* @returns {Complex64Array} complex number array\n*\n* @example\n* var arr = new Complex64Array();\n* // returns \n*\n* var len = arr.length;\n* // returns 0\n*\n* @example\n* var arr = new Complex64Array( 2 );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*\n* @example\n* var arr = new Complex64Array( [ 1.0, -1.0 ] );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* import ArrayBuffer from '@stdlib/array-buffer';\n*\n* var buf = new ArrayBuffer( 16 );\n* var arr = new Complex64Array( buf );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*\n* @example\n* import ArrayBuffer from '@stdlib/array-buffer';\n*\n* var buf = new ArrayBuffer( 16 );\n* var arr = new Complex64Array( buf, 8 );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* import ArrayBuffer from '@stdlib/array-buffer';\n*\n* var buf = new ArrayBuffer( 32 );\n* var arr = new Complex64Array( buf, 8, 2 );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*/\nfunction Complex64Array() {\n\tvar byteOffset;\n\tvar nargs;\n\tvar buf;\n\tvar len;\n\n\tnargs = arguments.length;\n\tif ( !(this instanceof Complex64Array) ) {\n\t\tif ( nargs === 0 ) {\n\t\t\treturn new Complex64Array();\n\t\t}\n\t\tif ( nargs === 1 ) {\n\t\t\treturn new Complex64Array( arguments[0] );\n\t\t}\n\t\tif ( nargs === 2 ) {\n\t\t\treturn new Complex64Array( arguments[0], arguments[1] );\n\t\t}\n\t\treturn new Complex64Array( arguments[0], arguments[1], arguments[2] );\n\t}\n\t// Create the underlying data buffer...\n\tif ( nargs === 0 ) {\n\t\tbuf = new Float32Array( 0 ); // backward-compatibility\n\t} else if ( nargs === 1 ) {\n\t\tif ( isNonNegativeInteger( arguments[0] ) ) {\n\t\t\tbuf = new Float32Array( arguments[0]*2 );\n\t\t} else if ( isCollection( arguments[0] ) ) {\n\t\t\tbuf = arguments[ 0 ];\n\t\t\tlen = buf.length;\n\n\t\t\t// If provided a \"generic\" array, peak at the first value, and, if the value is a complex number, try to process as an array of complex numbers, falling back to \"normal\" typed array initialization if we fail and ensuring consistency if the first value had not been a complex number...\n\t\t\tif ( len && isArray( buf ) && isComplexLike( buf[0] ) ) {\n\t\t\t\tbuf = fromArray( new Float32Array( len*2 ), buf );\n\t\t\t\tif ( buf === null ) {\n\t\t\t\t\t// We failed and we are now forced to allocate a new array :-(\n\t\t\t\t\tif ( !isEven( len ) ) {\n\t\t\t\t\t\tthrow new RangeError( format( 'invalid argument. Array-like object arguments must have a length which is a multiple of two. Length: `%u`.', len ) );\n\t\t\t\t\t}\n\t\t\t\t\t// We failed, so fall back to directly setting values...\n\t\t\t\t\tbuf = new Float32Array( arguments[0] );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ( isComplex64Array( buf ) ) {\n\t\t\t\t\tbuf = reinterpret64( buf, 0 );\n\t\t\t\t} else if ( isComplex128Array( buf ) ) {\n\t\t\t\t\tbuf = reinterpret128( buf, 0 );\n\t\t\t\t} else if ( !isEven( len ) ) {\n\t\t\t\t\tthrow new RangeError( format( 'invalid argument. Array-like object and typed array arguments must have a length which is a multiple of two. Length: `%u`.', len ) );\n\t\t\t\t}\n\t\t\t\tbuf = new Float32Array( buf );\n\t\t\t}\n\t\t} else if ( isArrayBuffer( arguments[0] ) ) {\n\t\t\tbuf = arguments[ 0 ];\n\t\t\tif ( !isInteger( buf.byteLength/BYTES_PER_ELEMENT ) ) {\n\t\t\t\tthrow new RangeError( format( 'invalid argument. ArrayBuffer byte length must be a multiple of %u. Byte length: `%u`.', BYTES_PER_ELEMENT, buf.byteLength ) );\n\t\t\t}\n\t\t\tbuf = new Float32Array( buf );\n\t\t} else if ( isObject( arguments[0] ) ) {\n\t\t\tbuf = arguments[ 0 ];\n\t\t\tif ( HAS_ITERATOR_SYMBOL === false ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Environment lacks Symbol.iterator support. Must provide a length, ArrayBuffer, typed array, or array-like object. Value: `%s`.', buf ) );\n\t\t\t}\n\t\t\tif ( !isFunction( buf[ ITERATOR_SYMBOL ] ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.', buf ) );\n\t\t\t}\n\t\t\tbuf = buf[ ITERATOR_SYMBOL ]();\n\t\t\tif ( !isFunction( buf.next ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.', buf ) ); // FIXME: `buf` is what is returned from above, NOT the original value\n\t\t\t}\n\t\t\tbuf = fromIterator( buf );\n\t\t\tif ( buf instanceof Error ) {\n\t\t\t\tthrow buf;\n\t\t\t}\n\t\t\tbuf = new Float32Array( buf );\n\t\t} else {\n\t\t\tthrow new TypeError( format( 'invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.', arguments[0] ) );\n\t\t}\n\t} else {\n\t\tbuf = arguments[ 0 ];\n\t\tif ( !isArrayBuffer( buf ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. First argument must be an ArrayBuffer. Value: `%s`.', buf ) );\n\t\t}\n\t\tbyteOffset = arguments[ 1 ];\n\t\tif ( !isNonNegativeInteger( byteOffset ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Byte offset must be a nonnegative integer. Value: `%s`.', byteOffset ) );\n\t\t}\n\t\tif ( !isInteger( byteOffset/BYTES_PER_ELEMENT ) ) {\n\t\t\tthrow new RangeError( format( 'invalid argument. Byte offset must be a multiple of %u. Value: `%u`.', BYTES_PER_ELEMENT, byteOffset ) );\n\t\t}\n\t\tif ( nargs === 2 ) {\n\t\t\tlen = buf.byteLength - byteOffset;\n\t\t\tif ( !isInteger( len/BYTES_PER_ELEMENT ) ) {\n\t\t\t\tthrow new RangeError( format( 'invalid arguments. ArrayBuffer view byte length must be a multiple of %u. View byte length: `%u`.', BYTES_PER_ELEMENT, len ) );\n\t\t\t}\n\t\t\tbuf = new Float32Array( buf, byteOffset );\n\t\t} else {\n\t\t\tlen = arguments[ 2 ];\n\t\t\tif ( !isNonNegativeInteger( len ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Length must be a nonnegative integer. Value: `%s`.', len ) );\n\t\t\t}\n\t\t\tif ( (len*BYTES_PER_ELEMENT) > (buf.byteLength-byteOffset) ) {\n\t\t\t\tthrow new RangeError( format( 'invalid arguments. ArrayBuffer has insufficient capacity. Either decrease the array length or provide a bigger buffer. Minimum capacity: `%u`.', len*BYTES_PER_ELEMENT ) );\n\t\t\t}\n\t\t\tbuf = new Float32Array( buf, byteOffset, len*2 );\n\t\t}\n\t}\n\tsetReadOnly( this, '_buffer', buf );\n\tsetReadOnly( this, '_length', buf.length/2 );\n\n\treturn this;\n}\n\n/**\n* Size (in bytes) of each array element.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex64Array\n* @readonly\n* @type {PositiveInteger}\n* @default 8\n*\n* @example\n* var nbytes = Complex64Array.BYTES_PER_ELEMENT;\n* // returns 8\n*/\nsetReadOnly( Complex64Array, 'BYTES_PER_ELEMENT', BYTES_PER_ELEMENT );\n\n/**\n* Constructor name.\n*\n* @name name\n* @memberof Complex64Array\n* @readonly\n* @type {string}\n* @default 'Complex64Array'\n*\n* @example\n* var str = Complex64Array.name;\n* // returns 'Complex64Array'\n*/\nsetReadOnly( Complex64Array, 'name', 'Complex64Array' );\n\n/**\n* Creates a new 64-bit complex number array from an array-like object or an iterable.\n*\n* @name from\n* @memberof Complex64Array\n* @type {Function}\n* @param {(Collection|Iterable)} src - array-like object or iterable\n* @param {Function} [clbk] - callback to invoke for each source element\n* @param {*} [thisArg] - context\n* @throws {TypeError} `this` context must be a constructor\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be an array-like object or an iterable\n* @throws {TypeError} second argument must be a function\n* @throws {RangeError} array-like objects must have a length which is a multiple of two\n* @throws {TypeError} an iterator must return either a two element array containing real and imaginary components or a complex number\n* @throws {TypeError} when provided an iterator, a callback must return either a two element array containing real and imaginary components or a complex number\n* @returns {Complex64Array} 64-bit complex number array\n*\n* @example\n* var arr = Complex64Array.from( [ 1.0, -1.0 ] );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n*\n* var arr = Complex64Array.from( [ new Complex64( 1.0, 1.0 ) ] );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* function clbk( v ) {\n* return new Complex64( realf(v)*2.0, imagf(v)*2.0 );\n* }\n*\n* var arr = Complex64Array.from( [ new Complex64( 1.0, 1.0 ) ], clbk );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*/\nsetReadOnly( Complex64Array, 'from', function from( src ) {\n\tvar thisArg;\n\tvar nargs;\n\tvar clbk;\n\tvar out;\n\tvar buf;\n\tvar tmp;\n\tvar get;\n\tvar len;\n\tvar flg;\n\tvar v;\n\tvar i;\n\tvar j;\n\tif ( !isFunction( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` context must be a constructor.' );\n\t}\n\tif ( !isComplexArrayConstructor( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tnargs = arguments.length;\n\tif ( nargs > 1 ) {\n\t\tclbk = arguments[ 1 ];\n\t\tif ( !isFunction( clbk ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be a function. Value: `%s`.', clbk ) );\n\t\t}\n\t\tif ( nargs > 2 ) {\n\t\t\tthisArg = arguments[ 2 ];\n\t\t}\n\t}\n\tif ( isComplexArray( src ) ) {\n\t\tlen = src.length;\n\t\tif ( clbk ) {\n\t\t\tout = new this( len );\n\t\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\t\tj = 0;\n\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\tv = clbk.call( thisArg, src.get( i ), i );\n\t\t\t\tif ( isComplexLike( v ) ) {\n\t\t\t\t\tbuf[ j ] = realf( v );\n\t\t\t\t\tbuf[ j+1 ] = imagf( v );\n\t\t\t\t} else if ( isArrayLikeObject( v ) && v.length >= 2 ) {\n\t\t\t\t\tbuf[ j ] = v[ 0 ];\n\t\t\t\t\tbuf[ j+1 ] = v[ 1 ];\n\t\t\t\t} else {\n\t\t\t\t\tthrow new TypeError( format( 'invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', v ) );\n\t\t\t\t}\n\t\t\t\tj += 2; // stride\n\t\t\t}\n\t\t\treturn out;\n\t\t}\n\t\treturn new this( src );\n\t}\n\tif ( isCollection( src ) ) {\n\t\tif ( clbk ) {\n\t\t\t// Note: array contents affect how we iterate over a provided data source. If only complex number objects, we can extract real and imaginary components. Otherwise, for non-complex number arrays (e.g., `Float64Array`, etc), we assume a strided array where real and imaginary components are interleaved. In the former case, we expect a callback to return real and imaginary components (possibly as a complex number). In the latter case, we expect a callback to return *either* a real or imaginary component.\n\n\t\t\tlen = src.length;\n\t\t\tif ( src.get && src.set ) {\n\t\t\t\tget = accessorGetter( 'default' );\n\t\t\t} else {\n\t\t\t\tget = getter( 'default' );\n\t\t\t}\n\t\t\t// Detect whether we've been provided an array which returns complex number objects...\n\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\tif ( !isComplexLike( get( src, i ) ) ) {\n\t\t\t\t\tflg = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// If an array does not contain only complex number objects, then we assume interleaved real and imaginary components...\n\t\t\tif ( flg ) {\n\t\t\t\tif ( !isEven( len ) ) {\n\t\t\t\t\tthrow new RangeError( format( 'invalid argument. First argument must have a length which is a multiple of %u. Length: `%u`.', 2, len ) );\n\t\t\t\t}\n\t\t\t\tout = new this( len/2 );\n\t\t\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\t\tbuf[ i ] = clbk.call( thisArg, get( src, i ), i );\n\t\t\t\t}\n\t\t\t\treturn out;\n\t\t\t}\n\t\t\t// If an array contains only complex number objects, then we need to extract real and imaginary components...\n\t\t\tout = new this( len );\n\t\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\t\tj = 0;\n\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\tv = clbk.call( thisArg, get( src, i ), i );\n\t\t\t\tif ( isComplexLike( v ) ) {\n\t\t\t\t\tbuf[ j ] = realf( v );\n\t\t\t\t\tbuf[ j+1 ] = imagf( v );\n\t\t\t\t} else if ( isArrayLikeObject( v ) && v.length >= 2 ) {\n\t\t\t\t\tbuf[ j ] = v[ 0 ];\n\t\t\t\t\tbuf[ j+1 ] = v[ 1 ];\n\t\t\t\t} else {\n\t\t\t\t\tthrow new TypeError( format( 'invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', v ) );\n\t\t\t\t}\n\t\t\t\tj += 2; // stride\n\t\t\t}\n\t\t\treturn out;\n\t\t}\n\t\treturn new this( src );\n\t}\n\tif ( isObject( src ) && HAS_ITERATOR_SYMBOL && isFunction( src[ ITERATOR_SYMBOL ] ) ) { // eslint-disable-line max-len\n\t\tbuf = src[ ITERATOR_SYMBOL ]();\n\t\tif ( !isFunction( buf.next ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.', src ) );\n\t\t}\n\t\tif ( clbk ) {\n\t\t\ttmp = fromIteratorMap( buf, clbk, thisArg );\n\t\t} else {\n\t\t\ttmp = fromIterator( buf );\n\t\t}\n\t\tif ( tmp instanceof Error ) {\n\t\t\tthrow tmp;\n\t\t}\n\t\tlen = tmp.length / 2;\n\t\tout = new this( len );\n\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\tbuf[ i ] = tmp[ i ];\n\t\t}\n\t\treturn out;\n\t}\n\tthrow new TypeError( format( 'invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.', src ) );\n});\n\n/**\n* Creates a new 64-bit complex number array from a variable number of arguments.\n*\n* @name of\n* @memberof Complex64Array\n* @type {Function}\n* @param {...*} element - array elements\n* @throws {TypeError} `this` context must be a constructor\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Complex64Array} 64-bit complex number array\n*\n* @example\n* var arr = Complex64Array.of( 1.0, 1.0, 1.0, 1.0 );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*/\nsetReadOnly( Complex64Array, 'of', function of() {\n\tvar args;\n\tvar i;\n\tif ( !isFunction( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` context must be a constructor.' );\n\t}\n\tif ( !isComplexArrayConstructor( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\targs = [];\n\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\targs.push( arguments[ i ] );\n\t}\n\treturn new this( args );\n});\n\n/**\n* Returns an array element with support for both nonnegative and negative integer indices.\n*\n* @name at\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {integer} idx - element index\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} must provide an integer\n* @returns {(Complex64|void)} array element\n*\n* @example\n* var arr = new Complex64Array( 10 );\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* var z = arr.at( 0 );\n* // returns \n*\n* var re = realf( z );\n* // returns 0.0\n*\n* var im = imagf( z );\n* // returns 0.0\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 9.0, -9.0 ], 9 );\n*\n* z = arr.at( 0 );\n* // returns \n*\n* re = realf( z );\n* // returns 1.0\n*\n* im = imagf( z );\n* // returns -1.0\n*\n* z = arr.at( -1 );\n* // returns \n*\n* re = realf( z );\n* // returns 9.0\n*\n* im = imagf( z );\n* // returns -9.0\n*\n* z = arr.at( 100 );\n* // returns undefined\n*\n* z = arr.at( -100 );\n* // returns undefined\n*/\nsetReadOnly( Complex64Array.prototype, 'at', function at( idx ) {\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isInteger( idx ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Must provide an integer. Value: `%s`.', idx ) );\n\t}\n\tif ( idx < 0 ) {\n\t\tidx += this._length;\n\t}\n\tif ( idx < 0 || idx >= this._length ) {\n\t\treturn;\n\t}\n\treturn getComplex64( this._buffer, idx );\n});\n\n/**\n* Pointer to the underlying data buffer.\n*\n* @name buffer\n* @memberof Complex64Array.prototype\n* @readonly\n* @type {ArrayBuffer}\n*\n* @example\n* var arr = new Complex64Array( 10 );\n*\n* var buf = arr.buffer;\n* // returns \n*/\nsetReadOnlyAccessor( Complex64Array.prototype, 'buffer', function get() {\n\treturn this._buffer.buffer;\n});\n\n/**\n* Size (in bytes) of the array.\n*\n* @name byteLength\n* @memberof Complex64Array.prototype\n* @readonly\n* @type {NonNegativeInteger}\n*\n* @example\n* var arr = new Complex64Array( 10 );\n*\n* var byteLength = arr.byteLength;\n* // returns 80\n*/\nsetReadOnlyAccessor( Complex64Array.prototype, 'byteLength', function get() {\n\treturn this._buffer.byteLength;\n});\n\n/**\n* Offset (in bytes) of the array from the start of its underlying `ArrayBuffer`.\n*\n* @name byteOffset\n* @memberof Complex64Array.prototype\n* @readonly\n* @type {NonNegativeInteger}\n*\n* @example\n* var arr = new Complex64Array( 10 );\n*\n* var byteOffset = arr.byteOffset;\n* // returns 0\n*/\nsetReadOnlyAccessor( Complex64Array.prototype, 'byteOffset', function get() {\n\treturn this._buffer.byteOffset;\n});\n\n/**\n* Size (in bytes) of each array element.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex64Array.prototype\n* @readonly\n* @type {PositiveInteger}\n* @default 8\n*\n* @example\n* var arr = new Complex64Array( 10 );\n*\n* var nbytes = arr.BYTES_PER_ELEMENT;\n* // returns 8\n*/\nsetReadOnly( Complex64Array.prototype, 'BYTES_PER_ELEMENT', Complex64Array.BYTES_PER_ELEMENT );\n\n/**\n* Copies a sequence of elements within the array to the position starting at `target`.\n*\n* @name copyWithin\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {integer} target - index at which to start copying elements\n* @param {integer} start - source index at which to copy elements from\n* @param {integer} [end] - source index at which to stop copying elements from\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Complex64Array} modified array\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* var arr = new Complex64Array( 4 );\n*\n* // Set the array elements:\n* arr.set( new Complex64( 1.0, 1.0 ), 0 );\n* arr.set( new Complex64( 2.0, 2.0 ), 1 );\n* arr.set( new Complex64( 3.0, 3.0 ), 2 );\n* arr.set( new Complex64( 4.0, 4.0 ), 3 );\n*\n* // Copy the first two elements to the last two elements:\n* arr.copyWithin( 2, 0, 2 );\n*\n* // Get the last array element:\n* var z = arr.get( 3 );\n*\n* var re = realf( z );\n* // returns 2.0\n*\n* var im = imagf( z );\n* // returns 2.0\n*/\nsetReadOnly( Complex64Array.prototype, 'copyWithin', function copyWithin( target, start ) {\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\t// FIXME: prefer a functional `copyWithin` implementation which addresses lack of universal browser support (e.g., IE11 and Safari) or ensure that typed arrays are polyfilled\n\tif ( arguments.length === 2 ) {\n\t\tthis._buffer.copyWithin( target*2, start*2 );\n\t} else {\n\t\tthis._buffer.copyWithin( target*2, start*2, arguments[2]*2 );\n\t}\n\treturn this;\n});\n\n/**\n* Returns an iterator for iterating over array key-value pairs.\n*\n* @name entries\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Iterator} iterator\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n*\n* var arr = [\n* new Complex64( 1.0, 1.0 ),\n* new Complex64( 2.0, 2.0 ),\n* new Complex64( 3.0, 3.0 )\n* ];\n* arr = new Complex64Array( arr );\n*\n* // Create an iterator:\n* var it = arr.entries();\n*\n* // Iterate over the key-value pairs...\n* var v = it.next().value;\n* // returns [ 0, ]\n*\n* v = it.next().value;\n* // returns [ 1, ]\n*\n* v = it.next().value;\n* // returns [ 2, ]\n*\n* var bool = it.next().done;\n* // returns true\n*/\nsetReadOnly( Complex64Array.prototype, 'entries', function entries() {\n\tvar buffer;\n\tvar self;\n\tvar iter;\n\tvar len;\n\tvar FLG;\n\tvar i;\n\tvar j;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tself = this;\n\tbuffer = this._buffer;\n\tlen = this._length;\n\n\t// Initialize the iteration indices:\n\ti = -1;\n\tj = -2;\n\n\t// Create an iterator protocol-compliant object:\n\titer = {};\n\tsetReadOnly( iter, 'next', next );\n\tsetReadOnly( iter, 'return', end );\n\n\tif ( ITERATOR_SYMBOL ) {\n\t\tsetReadOnly( iter, ITERATOR_SYMBOL, factory );\n\t}\n\treturn iter;\n\n\t/**\n\t* Returns an iterator protocol-compliant object containing the next iterated value.\n\t*\n\t* @private\n\t* @returns {Object} iterator protocol-compliant object\n\t*/\n\tfunction next() {\n\t\tvar z;\n\t\ti += 1;\n\t\tif ( FLG || i >= len ) {\n\t\t\treturn {\n\t\t\t\t'done': true\n\t\t\t};\n\t\t}\n\t\tj += 2;\n\t\tz = new Complex64( buffer[ j ], buffer[ j+1 ] );\n\t\treturn {\n\t\t\t'value': [ i, z ],\n\t\t\t'done': false\n\t\t};\n\t}\n\n\t/**\n\t* Finishes an iterator.\n\t*\n\t* @private\n\t* @param {*} [value] - value to return\n\t* @returns {Object} iterator protocol-compliant object\n\t*/\n\tfunction end( value ) {\n\t\tFLG = true;\n\t\tif ( arguments.length ) {\n\t\t\treturn {\n\t\t\t\t'value': value,\n\t\t\t\t'done': true\n\t\t\t};\n\t\t}\n\t\treturn {\n\t\t\t'done': true\n\t\t};\n\t}\n\n\t/**\n\t* Returns a new iterator.\n\t*\n\t* @private\n\t* @returns {Iterator} iterator\n\t*/\n\tfunction factory() {\n\t\treturn self.entries();\n\t}\n});\n\n/**\n* Tests whether all elements in an array pass a test implemented by a predicate function.\n*\n* @name every\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {boolean} boolean indicating whether all elements pass a test\n*\n* @example\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* function predicate( v ) {\n* return ( realf( v ) === imagf( v ) );\n* }\n*\n* var arr = new Complex64Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var bool = arr.every( predicate );\n* // returns true\n*/\nsetReadOnly( Complex64Array.prototype, 'every', function every( predicate, thisArg ) {\n\tvar buf;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tif ( !predicate.call( thisArg, getComplex64( buf, i ), i, this ) ) {\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn true;\n});\n\n/**\n* Returns a modified typed array filled with a fill value.\n*\n* @name fill\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {ComplexLike} value - fill value\n* @param {integer} [start=0] - starting index (inclusive)\n* @param {integer} [end] - ending index (exclusive)\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a complex number\n* @throws {TypeError} second argument must be an integer\n* @throws {TypeError} third argument must be an integer\n*\n* @example\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* var arr = new Complex64Array( 3 );\n*\n* arr.fill( new Complex64( 1.0, 1.0 ), 1 );\n*\n* var z = arr.get( 1 );\n* // returns \n*\n* var re = realf( z );\n* // returns 1.0\n*\n* var im = imagf( z );\n* // returns 1.0\n*\n* z = arr.get( 1 );\n* // returns \n*\n* re = realf( z );\n* // returns 1.0\n*\n* im = imagf( z );\n* // returns 1.0\n*/\nsetReadOnly( Complex64Array.prototype, 'fill', function fill( value, start, end ) {\n\tvar buf;\n\tvar len;\n\tvar idx;\n\tvar re;\n\tvar im;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isComplexLike( value ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a complex number. Value: `%s`.', value ) );\n\t}\n\tbuf = this._buffer;\n\tlen = this._length;\n\tif ( arguments.length > 1 ) {\n\t\tif ( !isInteger( start ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be an integer. Value: `%s`.', start ) );\n\t\t}\n\t\tif ( start < 0 ) {\n\t\t\tstart += len;\n\t\t\tif ( start < 0 ) {\n\t\t\t\tstart = 0;\n\t\t\t}\n\t\t}\n\t\tif ( arguments.length > 2 ) {\n\t\t\tif ( !isInteger( end ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Third argument must be an integer. Value: `%s`.', end ) );\n\t\t\t}\n\t\t\tif ( end < 0 ) {\n\t\t\t\tend += len;\n\t\t\t\tif ( end < 0 ) {\n\t\t\t\t\tend = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( end > len ) {\n\t\t\t\tend = len;\n\t\t\t}\n\t\t} else {\n\t\t\tend = len;\n\t\t}\n\t} else {\n\t\tstart = 0;\n\t\tend = len;\n\t}\n\tre = realf( value );\n\tim = imagf( value );\n\tfor ( i = start; i < end; i++ ) {\n\t\tidx = 2*i;\n\t\tbuf[ idx ] = re;\n\t\tbuf[ idx+1 ] = im;\n\t}\n\treturn this;\n});\n\n/**\n* Returns a new array containing the elements of an array which pass a test implemented by a predicate function.\n*\n* @name filter\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {Complex64Array} complex number array\n*\n* @example\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* function predicate( v ) {\n* return ( realf( v ) === imagf( v ) );\n* }\n*\n* var arr = new Complex64Array( 3 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n*\n* var out = arr.filter( predicate );\n* // returns \n*\n* var len = out.length;\n* // returns 1\n*\n* var z = out.get( 0 );\n* // returns \n*\n* var re = realf( z );\n* // returns 2.0\n*\n* var im = imagf( z );\n* // returns 2.0\n*/\nsetReadOnly( Complex64Array.prototype, 'filter', function filter( predicate, thisArg ) {\n\tvar buf;\n\tvar out;\n\tvar i;\n\tvar z;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tout = [];\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tz = getComplex64( buf, i );\n\t\tif ( predicate.call( thisArg, z, i, this ) ) {\n\t\t\tout.push( z );\n\t\t}\n\t}\n\treturn new this.constructor( out );\n});\n\n/**\n* Returns the first element in an array for which a predicate function returns a truthy value.\n*\n* @name find\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {(Complex64|void)} array element or undefined\n*\n* @example\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n* import Complex64 from '@stdlib/complex-float32';\n*\n* function predicate( v ) {\n* return ( realf( v ) === imagf( v ) );\n* }\n*\n* var arr = new Complex64Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var z = arr.find( predicate );\n* // returns \n*\n* var re = realf( z );\n* // returns 1.0\n*\n* var im = imagf( z );\n* // returns 1.0\n*/\nsetReadOnly( Complex64Array.prototype, 'find', function find( predicate, thisArg ) {\n\tvar buf;\n\tvar i;\n\tvar z;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tz = getComplex64( buf, i );\n\t\tif ( predicate.call( thisArg, z, i, this ) ) {\n\t\t\treturn z;\n\t\t}\n\t}\n});\n\n/**\n* Returns the index of the first element in an array for which a predicate function returns a truthy value.\n*\n* @name findIndex\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {integer} index or -1\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* function predicate( v ) {\n* return ( realf( v ) === imagf( v ) );\n* }\n*\n* var arr = new Complex64Array( 3 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var idx = arr.findIndex( predicate );\n* // returns 2\n*/\nsetReadOnly( Complex64Array.prototype, 'findIndex', function findIndex( predicate, thisArg ) {\n\tvar buf;\n\tvar i;\n\tvar z;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tz = getComplex64( buf, i );\n\t\tif ( predicate.call( thisArg, z, i, this ) ) {\n\t\t\treturn i;\n\t\t}\n\t}\n\treturn -1;\n});\n\n/**\n* Returns the last element in an array for which a predicate function returns a truthy value.\n*\n* @name findLast\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {(Complex64|void)} array element or undefined\n*\n* @example\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n* import Complex64 from '@stdlib/complex-float32';\n*\n* function predicate( v ) {\n* return ( realf( v ) === imagf( v ) );\n* }\n*\n* var arr = new Complex64Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var z = arr.findLast( predicate );\n* // returns \n*\n* var re = realf( z );\n* // returns 3.0\n*\n* var im = imagf( z );\n* // returns 3.0\n*/\nsetReadOnly( Complex64Array.prototype, 'findLast', function findLast( predicate, thisArg ) {\n\tvar buf;\n\tvar i;\n\tvar z;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = this._length-1; i >= 0; i-- ) {\n\t\tz = getComplex64( buf, i );\n\t\tif ( predicate.call( thisArg, z, i, this ) ) {\n\t\t\treturn z;\n\t\t}\n\t}\n});\n\n/**\n* Returns the index of the last element in an array for which a predicate function returns a truthy value.\n*\n* @name findLastIndex\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {integer} index or -1\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* function predicate( v ) {\n* return ( realf( v ) === imagf( v ) );\n* }\n*\n* var arr = new Complex64Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n*\n* var idx = arr.findLastIndex( predicate );\n* // returns 1\n*/\nsetReadOnly( Complex64Array.prototype, 'findLastIndex', function findLastIndex( predicate, thisArg ) {\n\tvar buf;\n\tvar i;\n\tvar z;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = this._length-1; i >= 0; i-- ) {\n\t\tz = getComplex64( buf, i );\n\t\tif ( predicate.call( thisArg, z, i, this ) ) {\n\t\t\treturn i;\n\t\t}\n\t}\n\treturn -1;\n});\n\n/**\n* Invokes a function once for each array element.\n*\n* @name forEach\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {Function} fcn - function to invoke\n* @param {*} [thisArg] - function invocation context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n*\n* function log( v, i ) {\n* console.log( '%s: %s', i, v.toString() );\n* }\n*\n* var arr = new Complex64Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* arr.forEach( log );\n*/\nsetReadOnly( Complex64Array.prototype, 'forEach', function forEach( fcn, thisArg ) {\n\tvar buf;\n\tvar i;\n\tvar z;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( fcn ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', fcn ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tz = getComplex64( buf, i );\n\t\tfcn.call( thisArg, z, i, this );\n\t}\n});\n\n/**\n* Returns an array element.\n*\n* @name get\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {NonNegativeInteger} idx - element index\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} must provide a nonnegative integer\n* @returns {(Complex64|void)} array element\n*\n* @example\n* var arr = new Complex64Array( 10 );\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* var z = arr.get( 0 );\n* // returns \n*\n* var re = realf( z );\n* // returns 0.0\n*\n* var im = imagf( z );\n* // returns 0.0\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n*\n* z = arr.get( 0 );\n* // returns \n*\n* re = realf( z );\n* // returns 1.0\n*\n* im = imagf( z );\n* // returns -1.0\n*\n* z = arr.get( 100 );\n* // returns undefined\n*/\nsetReadOnly( Complex64Array.prototype, 'get', function get( idx ) {\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isNonNegativeInteger( idx ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Must provide a nonnegative integer. Value: `%s`.', idx ) );\n\t}\n\tif ( idx >= this._length ) {\n\t\treturn;\n\t}\n\treturn getComplex64( this._buffer, idx );\n});\n\n/**\n* Returns a boolean indicating whether an array includes a provided value.\n*\n* @name includes\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {ComplexLike} searchElement - search element\n* @param {integer} [fromIndex=0] - starting index (inclusive)\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a complex number\n* @throws {TypeError} second argument must be an integer\n* @returns {boolean} boolean indicating whether an array includes a provided value\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n*\n* var arr = new Complex64Array( 5 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n* arr.set( [ 4.0, -4.0 ], 3 );\n* arr.set( [ 5.0, -5.0 ], 4 );\n*\n* var bool = arr.includes( new Complex64( 3.0, -3.0 ) );\n* // returns true\n*\n* bool = arr.includes( new Complex64( 3.0, -3.0 ), 3 );\n* // returns false\n*\n* bool = arr.includes( new Complex64( 4.0, -4.0 ), -3 );\n* // returns true\n*/\nsetReadOnly( Complex64Array.prototype, 'includes', function includes( searchElement, fromIndex ) {\n\tvar buf;\n\tvar idx;\n\tvar re;\n\tvar im;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isComplexLike( searchElement ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a complex number. Value: `%s`.', searchElement ) );\n\t}\n\tif ( arguments.length > 1 ) {\n\t\tif ( !isInteger( fromIndex ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be an integer. Value: `%s`.', fromIndex ) );\n\t\t}\n\t\tif ( fromIndex < 0 ) {\n\t\t\tfromIndex += this._length;\n\t\t\tif ( fromIndex < 0 ) {\n\t\t\t\tfromIndex = 0;\n\t\t\t}\n\t\t}\n\t} else {\n\t\tfromIndex = 0;\n\t}\n\tre = realf( searchElement );\n\tim = imagf( searchElement );\n\tbuf = this._buffer;\n\tfor ( i = fromIndex; i < this._length; i++ ) {\n\t\tidx = 2 * i;\n\t\tif ( re === buf[ idx ] && im === buf[ idx+1 ] ) {\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n});\n\n/**\n* Returns the first index at which a given element can be found.\n*\n* @name indexOf\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {ComplexLike} searchElement - element to find\n* @param {integer} [fromIndex=0] - starting index (inclusive)\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a complex number\n* @throws {TypeError} second argument must be an integer\n* @returns {integer} index or -1\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n*\n* var arr = new Complex64Array( 10 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n* arr.set( [ 4.0, -4.0 ], 3 );\n* arr.set( [ 5.0, -5.0 ], 4 );\n*\n* var idx = arr.indexOf( new Complex64( 3.0, -3.0 ) );\n* // returns 2\n*\n* idx = arr.indexOf( new Complex64( 3.0, -3.0 ), 3 );\n* // returns -1\n*\n* idx = arr.indexOf( new Complex64( 4.0, -4.0 ), -3 );\n* // returns -1\n*/\nsetReadOnly( Complex64Array.prototype, 'indexOf', function indexOf( searchElement, fromIndex ) {\n\tvar buf;\n\tvar idx;\n\tvar re;\n\tvar im;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isComplexLike( searchElement ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a complex number. Value: `%s`.', searchElement ) );\n\t}\n\tif ( arguments.length > 1 ) {\n\t\tif ( !isInteger( fromIndex ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be an integer. Value: `%s`.', fromIndex ) );\n\t\t}\n\t\tif ( fromIndex < 0 ) {\n\t\t\tfromIndex += this._length;\n\t\t\tif ( fromIndex < 0 ) {\n\t\t\t\tfromIndex = 0;\n\t\t\t}\n\t\t}\n\t} else {\n\t\tfromIndex = 0;\n\t}\n\tre = realf( searchElement );\n\tim = imagf( searchElement );\n\tbuf = this._buffer;\n\tfor ( i = fromIndex; i < this._length; i++ ) {\n\t\tidx = 2 * i;\n\t\tif ( re === buf[ idx ] && im === buf[ idx+1 ] ) {\n\t\t\treturn i;\n\t\t}\n\t}\n\treturn -1;\n});\n\n/**\n* Returns a new string by concatenating all array elements.\n*\n* @name join\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {string} [separator=','] - element separator\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a string\n* @returns {string} string representation\n*\n* @example\n* var arr = new Complex64Array( 2 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n*\n* var str = arr.join();\n* // returns '1 + 1i,2 + 2i'\n*\n* str = arr.join( '/' );\n* // returns '1 + 1i/2 + 2i'\n*/\nsetReadOnly( Complex64Array.prototype, 'join', function join( separator ) {\n\tvar out;\n\tvar buf;\n\tvar sep;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( arguments.length === 0 ) {\n\t\tsep = ',';\n\t} else if ( isString( separator ) ) {\n\t\tsep = separator;\n\t} else {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a string. Value: `%s`.', separator ) );\n\t}\n\tout = [];\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tout.push( getComplex64( buf, i ).toString() );\n\t}\n\treturn out.join( sep );\n});\n\n/**\n* Returns the last index at which a given element can be found.\n*\n* @name lastIndexOf\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {ComplexLike} searchElement - element to find\n* @param {integer} [fromIndex] - index at which to start searching backward (inclusive)\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a complex number\n* @throws {TypeError} second argument must be an integer\n* @returns {integer} index or -1\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n*\n* var arr = new Complex64Array( 5 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n* arr.set( [ 4.0, -4.0 ], 3 );\n* arr.set( [ 3.0, -3.0 ], 4 );\n*\n* var idx = arr.lastIndexOf( new Complex64( 3.0, -3.0 ) );\n* // returns 4\n*\n* idx = arr.lastIndexOf( new Complex64( 3.0, -3.0 ), 3 );\n* // returns 2\n*\n* idx = arr.lastIndexOf( new Complex64( 5.0, -5.0 ), 3 );\n* // returns -1\n*\n* idx = arr.lastIndexOf( new Complex64( 2.0, -2.0 ), -3 );\n* // returns 1\n*/\nsetReadOnly( Complex64Array.prototype, 'lastIndexOf', function lastIndexOf( searchElement, fromIndex ) {\n\tvar buf;\n\tvar idx;\n\tvar re;\n\tvar im;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isComplexLike( searchElement ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a complex number. Value: `%s`.', searchElement ) );\n\t}\n\tif ( arguments.length > 1 ) {\n\t\tif ( !isInteger( fromIndex ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be an integer. Value: `%s`.', fromIndex ) );\n\t\t}\n\t\tif ( fromIndex >= this._length ) {\n\t\t\tfromIndex = this._length - 1;\n\t\t} else if ( fromIndex < 0 ) {\n\t\t\tfromIndex += this._length;\n\t\t}\n\t} else {\n\t\tfromIndex = this._length - 1;\n\t}\n\tre = realf( searchElement );\n\tim = imagf( searchElement );\n\tbuf = this._buffer;\n\tfor ( i = fromIndex; i >= 0; i-- ) {\n\t\tidx = 2 * i;\n\t\tif ( re === buf[ idx ] && im === buf[ idx+1 ] ) {\n\t\t\treturn i;\n\t\t}\n\t}\n\treturn -1;\n});\n\n/**\n* Number of array elements.\n*\n* @name length\n* @memberof Complex64Array.prototype\n* @readonly\n* @type {NonNegativeInteger}\n*\n* @example\n* var arr = new Complex64Array( 10 );\n*\n* var len = arr.length;\n* // returns 10\n*/\nsetReadOnlyAccessor( Complex64Array.prototype, 'length', function get() {\n\treturn this._length;\n});\n\n/**\n* Returns a new array with each element being the result of a provided callback function.\n*\n* @name map\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {Function} fcn - callback function\n* @param {*} [thisArg] - callback function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {Complex64Array} complex number array\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* function scale( v, i ) {\n* return new Complex64( 2.0*realf( v ), 2.0*imagf( v ) );\n* }\n*\n* var arr = new Complex64Array( 3 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n*\n* var out = arr.map( scale );\n* // returns \n*\n* var z = out.get( 0 );\n* // returns \n*\n* var re = realf( z );\n* // returns 2\n*\n* var im = imagf( z );\n* // returns -2\n*/\nsetReadOnly( Complex64Array.prototype, 'map', function map( fcn, thisArg ) {\n\tvar outbuf;\n\tvar buf;\n\tvar out;\n\tvar i;\n\tvar v;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( fcn ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', fcn ) );\n\t}\n\tbuf = this._buffer;\n\tout = new this.constructor( this._length );\n\toutbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tv = fcn.call( thisArg, getComplex64( buf, i ), i, this );\n\t\tif ( isComplexLike( v ) ) {\n\t\t\toutbuf[ 2*i ] = realf( v );\n\t\t\toutbuf[ (2*i)+1 ] = imagf( v );\n\t\t} else if ( isArrayLikeObject( v ) && v.length === 2 ) {\n\t\t\toutbuf[ 2*i ] = v[ 0 ];\n\t\t\toutbuf[ (2*i)+1 ] = v[ 1 ];\n\t\t} else {\n\t\t\tthrow new TypeError( format( 'invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', v ) );\n\t\t}\n\t}\n\treturn out;\n});\n\n/**\n* Applies a provided callback function to each element of the array, in order, passing in the return value from the calculation on the preceding element and returning the accumulated result upon completion.\n*\n* @name reduce\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {Function} reducer - callback function\n* @param {*} [initialValue] - initial value\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @throws {Error} if not provided an initial value, the array must have at least one element\n* @returns {*} accumulated result\n*\n* @example\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n* import caddf from '@stdlib/math-base-ops-caddf';\n*\n* var arr = new Complex64Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var z = arr.reduce( caddf );\n* // returns \n*\n* var re = realf( z );\n* // returns 6.0\n*\n* var im = imagf( z );\n* // returns 6.0\n*/\nsetReadOnly( Complex64Array.prototype, 'reduce', function reduce( reducer, initialValue ) {\n\tvar buf;\n\tvar acc;\n\tvar len;\n\tvar v;\n\tvar i;\n\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( reducer ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', reducer ) );\n\t}\n\tbuf = this._buffer;\n\tlen = this._length;\n\tif ( arguments.length > 1 ) {\n\t\tacc = initialValue;\n\t\ti = 0;\n\t} else {\n\t\tif ( len === 0 ) {\n\t\t\tthrow new Error( 'invalid operation. If not provided an initial value, an array must contain at least one element.' );\n\t\t}\n\t\tacc = getComplex64( buf, 0 );\n\t\ti = 1;\n\t}\n\tfor ( ; i < len; i++ ) {\n\t\tv = getComplex64( buf, i );\n\t\tacc = reducer( acc, v, i, this );\n\t}\n\treturn acc;\n});\n\n/**\n* Reverses an array in-place.\n*\n* @name reverse\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Complex64Array} reversed array\n*\n* @example\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* var arr = new Complex64Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var out = arr.reverse();\n* // returns \n*\n* var z = out.get( 0 );\n* // returns \n*\n* var re = realf( z );\n* // returns 3.0\n*\n* var im = imagf( z );\n* // returns 3.0\n*\n* z = out.get( 1 );\n* // returns \n*\n* re = realf( z );\n* // returns 2.0\n*\n* im = imagf( z );\n* // returns 2.0\n*\n* z = out.get( 2 );\n* // returns \n*\n* re = realf( z );\n* // returns 1.0\n*\n* im = imagf( z );\n* // returns 1.0\n*/\nsetReadOnly( Complex64Array.prototype, 'reverse', function reverse() {\n\tvar buf;\n\tvar tmp;\n\tvar len;\n\tvar N;\n\tvar i;\n\tvar j;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tlen = this._length;\n\tbuf = this._buffer;\n\tN = floor( len / 2 );\n\tfor ( i = 0; i < N; i++ ) {\n\t\tj = len - i - 1;\n\t\ttmp = buf[ (2*i) ];\n\t\tbuf[ (2*i) ] = buf[ (2*j) ];\n\t\tbuf[ (2*j) ] = tmp;\n\t\ttmp = buf[ (2*i)+1 ];\n\t\tbuf[ (2*i)+1 ] = buf[ (2*j)+1 ];\n\t\tbuf[ (2*j)+1 ] = tmp;\n\t}\n\treturn this;\n});\n\n/**\n* Sets an array element.\n*\n* ## Notes\n*\n* - When provided a typed array, real or complex, we must check whether the source array shares the same buffer as the target array and whether the underlying memory overlaps. In particular, we are concerned with the following scenario:\n*\n* ```text\n* buf: ---------------------\n* src: ---------------------\n* ```\n*\n* In the above, as we copy values from `src`, we will overwrite values in the `src` view, resulting in duplicated values copied into the end of `buf`, which is not intended. Hence, to avoid overwriting source values, we must **copy** source values to a temporary array.\n*\n* In the other overlapping scenario,\n*\n* ```text\n* buf: ---------------------\n* src: ---------------------\n* ```\n*\n* by the time we begin copying into the overlapping region, we are copying from the end of `src`, a non-overlapping region, which means we don't run the risk of copying copied values, rather than the original `src` values, as intended.\n*\n* @name set\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {(Collection|Complex|ComplexArray)} value - value(s)\n* @param {NonNegativeInteger} [i=0] - element index at which to start writing values\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be either a complex number, an array-like object, or a complex number array\n* @throws {TypeError} index argument must be a nonnegative integer\n* @throws {RangeError} array-like objects must have a length which is a multiple of two\n* @throws {RangeError} index argument is out-of-bounds\n* @throws {RangeError} target array lacks sufficient storage to accommodate source values\n* @returns {void}\n*\n* @example\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* var arr = new Complex64Array( 10 );\n*\n* var z = arr.get( 0 );\n* // returns \n*\n* var re = realf( z );\n* // returns 0.0\n*\n* var im = imagf( z );\n* // returns 0.0\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n*\n* z = arr.get( 0 );\n* // returns \n*\n* re = realf( z );\n* // returns 1.0\n*\n* im = imagf( z );\n* // returns -1.0\n*/\nsetReadOnly( Complex64Array.prototype, 'set', function set( value ) {\n\t/* eslint-disable no-underscore-dangle */\n\tvar sbuf;\n\tvar idx;\n\tvar buf;\n\tvar tmp;\n\tvar flg;\n\tvar N;\n\tvar v;\n\tvar i;\n\tvar j;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tbuf = this._buffer;\n\tif ( arguments.length > 1 ) {\n\t\tidx = arguments[ 1 ];\n\t\tif ( !isNonNegativeInteger( idx ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Index argument must be a nonnegative integer. Value: `%s`.', idx ) );\n\t\t}\n\t} else {\n\t\tidx = 0;\n\t}\n\tif ( isComplexLike( value ) ) {\n\t\tif ( idx >= this._length ) {\n\t\t\tthrow new RangeError( format( 'invalid argument. Index argument is out-of-bounds. Value: `%u`.', idx ) );\n\t\t}\n\t\tidx *= 2;\n\t\tbuf[ idx ] = realf( value );\n\t\tbuf[ idx+1 ] = imagf( value );\n\t\treturn;\n\t}\n\tif ( isComplexArray( value ) ) {\n\t\tN = value._length;\n\t\tif ( idx+N > this._length ) {\n\t\t\tthrow new RangeError( 'invalid arguments. Target array lacks sufficient storage to accommodate source values.' );\n\t\t}\n\t\tsbuf = value._buffer;\n\n\t\t// Check for overlapping memory...\n\t\tj = buf.byteOffset + (idx*BYTES_PER_ELEMENT);\n\t\tif (\n\t\t\tsbuf.buffer === buf.buffer &&\n\t\t\t(\n\t\t\t\tsbuf.byteOffset < j &&\n\t\t\t\tsbuf.byteOffset+sbuf.byteLength > j\n\t\t\t)\n\t\t) {\n\t\t\t// We need to copy source values...\n\t\t\ttmp = new Float32Array( sbuf.length );\n\t\t\tfor ( i = 0; i < sbuf.length; i++ ) {\n\t\t\t\ttmp[ i ] = sbuf[ i ];\n\t\t\t}\n\t\t\tsbuf = tmp;\n\t\t}\n\t\tidx *= 2;\n\t\tj = 0;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\tbuf[ idx ] = sbuf[ j ];\n\t\t\tbuf[ idx+1 ] = sbuf[ j+1 ];\n\t\t\tidx += 2; // stride\n\t\t\tj += 2; // stride\n\t\t}\n\t\treturn;\n\t}\n\tif ( isCollection( value ) ) {\n\t\t// Detect whether we've been provided an array of complex numbers...\n\t\tN = value.length;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\tif ( !isComplexLike( value[ i ] ) ) {\n\t\t\t\tflg = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t// If an array does not contain only complex numbers, then we assume interleaved real and imaginary components...\n\t\tif ( flg ) {\n\t\t\tif ( !isEven( N ) ) {\n\t\t\t\tthrow new RangeError( format( 'invalid argument. Array-like object arguments must have a length which is a multiple of two. Length: `%u`.', N ) );\n\t\t\t}\n\t\t\tif ( idx+(N/2) > this._length ) {\n\t\t\t\tthrow new RangeError( 'invalid arguments. Target array lacks sufficient storage to accommodate source values.' );\n\t\t\t}\n\t\t\tsbuf = value;\n\n\t\t\t// Check for overlapping memory...\n\t\t\tj = buf.byteOffset + (idx*BYTES_PER_ELEMENT);\n\t\t\tif (\n\t\t\t\tsbuf.buffer === buf.buffer &&\n\t\t\t\t(\n\t\t\t\t\tsbuf.byteOffset < j &&\n\t\t\t\t\tsbuf.byteOffset+sbuf.byteLength > j\n\t\t\t\t)\n\t\t\t) {\n\t\t\t\t// We need to copy source values...\n\t\t\t\ttmp = new Float32Array( N );\n\t\t\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\t\t\ttmp[ i ] = sbuf[ i ]; // TODO: handle accessor arrays\n\t\t\t\t}\n\t\t\t\tsbuf = tmp;\n\t\t\t}\n\t\t\tidx *= 2;\n\t\t\tN /= 2;\n\t\t\tj = 0;\n\t\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\t\tbuf[ idx ] = sbuf[ j ];\n\t\t\t\tbuf[ idx+1 ] = sbuf[ j+1 ];\n\t\t\t\tidx += 2; // stride\n\t\t\t\tj += 2; // stride\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\t// If an array contains only complex numbers, then we need to extract real and imaginary components...\n\t\tif ( idx+N > this._length ) {\n\t\t\tthrow new RangeError( 'invalid arguments. Target array lacks sufficient storage to accommodate source values.' );\n\t\t}\n\t\tidx *= 2;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\tv = value[ i ];\n\t\t\tbuf[ idx ] = realf( v );\n\t\t\tbuf[ idx+1 ] = imagf( v );\n\t\t\tidx += 2; // stride\n\t\t}\n\t\treturn;\n\t}\n\tthrow new TypeError( format( 'invalid argument. First argument must be either a complex number, an array-like object, or a complex number array. Value: `%s`.', value ) );\n\n\t/* eslint-enable no-underscore-dangle */\n});\n\n/**\n* Copies a portion of a typed array to a new typed array.\n*\n* @name slice\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {integer} [start=0] - starting index (inclusive)\n* @param {integer} [end] - ending index (exclusive)\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be an integer\n* @throws {TypeError} second argument must be an integer\n* @returns {Complex64Array} complex number array\n*\n* @example\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* var arr = new Complex64Array( 5 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n* arr.set( [ 4.0, -4.0 ], 3 );\n* arr.set( [ 5.0, -5.0 ], 4 );\n*\n* var out = arr.slice();\n* // returns \n*\n* var len = out.length;\n* // returns 5\n*\n* var z = out.get( 0 );\n* // returns \n*\n* var re = realf( z );\n* // returns 1.0\n*\n* var im = imagf( z );\n* // returns -1.0\n*\n* z = out.get( len-1 );\n* // returns \n*\n* re = realf( z );\n* // returns 5.0\n*\n* im = imagf( z );\n* // returns -5.0\n*\n* out = arr.slice( 1, -2 );\n* // returns \n*\n* len = out.length;\n* // returns 2\n*\n* z = out.get( 0 );\n* // returns \n*\n* re = realf( z );\n* // returns 2.0\n*\n* im = imagf( z );\n* // returns -2.0\n*\n* z = out.get( len-1 );\n* // returns \n*\n* re = realf( z );\n* // returns 3.0\n*\n* im = imagf( z );\n* // returns -3.0\n*/\nsetReadOnly( Complex64Array.prototype, 'slice', function slice( start, end ) {\n\tvar outlen;\n\tvar outbuf;\n\tvar out;\n\tvar idx;\n\tvar buf;\n\tvar len;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tbuf = this._buffer;\n\tlen = this._length;\n\tif ( arguments.length === 0 ) {\n\t\tstart = 0;\n\t\tend = len;\n\t} else {\n\t\tif ( !isInteger( start ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. First argument must be an integer. Value: `%s`.', start ) );\n\t\t}\n\t\tif ( start < 0 ) {\n\t\t\tstart += len;\n\t\t\tif ( start < 0 ) {\n\t\t\t\tstart = 0;\n\t\t\t}\n\t\t}\n\t\tif ( arguments.length === 1 ) {\n\t\t\tend = len;\n\t\t} else {\n\t\t\tif ( !isInteger( end ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be an integer. Value: `%s`.', end ) );\n\t\t\t}\n\t\t\tif ( end < 0 ) {\n\t\t\t\tend += len;\n\t\t\t\tif ( end < 0 ) {\n\t\t\t\t\tend = 0;\n\t\t\t\t}\n\t\t\t} else if ( end > len ) {\n\t\t\t\tend = len;\n\t\t\t}\n\t\t}\n\t}\n\tif ( start < end ) {\n\t\toutlen = end - start;\n\t} else {\n\t\toutlen = 0;\n\t}\n\tout = new this.constructor( outlen );\n\toutbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\tfor ( i = 0; i < outlen; i++ ) {\n\t\tidx = 2*(i+start);\n\t\toutbuf[ 2*i ] = buf[ idx ];\n\t\toutbuf[ (2*i)+1 ] = buf[ idx+1 ];\n\t}\n\treturn out;\n});\n\n/**\n* Tests whether at least one element in an array passes a test implemented by a predicate function.\n*\n* @name some\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {boolean} boolean indicating whether at least one element passes a test\n*\n* @example\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* function predicate( v ) {\n* return ( realf( v ) === imagf( v ) );\n* }\n*\n* var arr = new Complex64Array( 3 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n*\n* var bool = arr.some( predicate );\n* // returns true\n*/\nsetReadOnly( Complex64Array.prototype, 'some', function some( predicate, thisArg ) {\n\tvar buf;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tif ( predicate.call( thisArg, getComplex64( buf, i ), i, this ) ) {\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n});\n\n/**\n* Creates a new typed array view over the same underlying `ArrayBuffer` and with the same underlying data type as the host array.\n*\n* @name subarray\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {integer} [begin=0] - starting index (inclusive)\n* @param {integer} [end] - ending index (exclusive)\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be an integer\n* @throws {TypeError} second argument must be an integer\n* @returns {Complex64Array} subarray\n*\n* @example\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* var arr = new Complex64Array( 5 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n* arr.set( [ 4.0, -4.0 ], 3 );\n* arr.set( [ 5.0, -5.0 ], 4 );\n*\n* var subarr = arr.subarray();\n* // returns \n*\n* var len = subarr.length;\n* // returns 5\n*\n* var z = subarr.get( 0 );\n* // returns \n*\n* var re = realf( z );\n* // returns 1.0\n*\n* var im = imagf( z );\n* // returns -1.0\n*\n* z = subarr.get( len-1 );\n* // returns \n*\n* re = realf( z );\n* // returns 5.0\n*\n* im = imagf( z );\n* // returns -5.0\n*\n* subarr = arr.subarray( 1, -2 );\n* // returns \n*\n* len = subarr.length;\n* // returns 2\n*\n* z = subarr.get( 0 );\n* // returns \n*\n* re = realf( z );\n* // returns 2.0\n*\n* im = imagf( z );\n* // returns -2.0\n*\n* z = subarr.get( len-1 );\n* // returns \n*\n* re = realf( z );\n* // returns 3.0\n*\n* im = imagf( z );\n* // returns -3.0\n*/\nsetReadOnly( Complex64Array.prototype, 'subarray', function subarray( begin, end ) {\n\tvar offset;\n\tvar buf;\n\tvar len;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tbuf = this._buffer;\n\tlen = this._length;\n\tif ( arguments.length === 0 ) {\n\t\tbegin = 0;\n\t\tend = len;\n\t} else {\n\t\tif ( !isInteger( begin ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. First argument must be an integer. Value: `%s`.', begin ) );\n\t\t}\n\t\tif ( begin < 0 ) {\n\t\t\tbegin += len;\n\t\t\tif ( begin < 0 ) {\n\t\t\t\tbegin = 0;\n\t\t\t}\n\t\t}\n\t\tif ( arguments.length === 1 ) {\n\t\t\tend = len;\n\t\t} else {\n\t\t\tif ( !isInteger( end ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be an integer. Value: `%s`.', end ) );\n\t\t\t}\n\t\t\tif ( end < 0 ) {\n\t\t\t\tend += len;\n\t\t\t\tif ( end < 0 ) {\n\t\t\t\t\tend = 0;\n\t\t\t\t}\n\t\t\t} else if ( end > len ) {\n\t\t\t\tend = len;\n\t\t\t}\n\t\t}\n\t}\n\tif ( begin >= len ) {\n\t\tlen = 0;\n\t\toffset = buf.byteLength;\n\t} else if ( begin >= end ) {\n\t\tlen = 0;\n\t\toffset = buf.byteOffset + (begin*BYTES_PER_ELEMENT);\n\t} else {\n\t\tlen = end - begin;\n\t\toffset = buf.byteOffset + ( begin*BYTES_PER_ELEMENT );\n\t}\n\treturn new this.constructor( buf.buffer, offset, ( len < 0 ) ? 0 : len );\n});\n\n/**\n* Returns a new typed array containing the elements in reversed order.\n*\n* @name toReversed\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Complex64Array} reversed array\n*\n* @example\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* var arr = new Complex64Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var out = arr.toReversed();\n* // returns \n*\n* var z = out.get( 0 );\n* // returns \n*\n* var re = realf( z );\n* // returns 3.0\n*\n* var im = imagf( z );\n* // returns 3.0\n*\n* z = out.get( 1 );\n* // returns \n*\n* re = realf( z );\n* // returns 2.0\n*\n* im = imagf( z );\n* // returns 2.0\n*\n* z = out.get( 2 );\n* // returns \n*\n* re = realf( z );\n* // returns 1.0\n*\n* im = imagf( z );\n* // returns 1.0\n*/\nsetReadOnly( Complex64Array.prototype, 'toReversed', function toReversed() {\n\tvar outbuf;\n\tvar out;\n\tvar len;\n\tvar buf;\n\tvar i;\n\tvar j;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tlen = this._length;\n\tout = new this.constructor( len );\n\tbuf = this._buffer;\n\toutbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\tfor ( i = 0; i < len; i++ ) {\n\t\tj = len - i - 1;\n\t\toutbuf[ (2*i) ] = buf[ (2*j) ];\n\t\toutbuf[ (2*i)+1 ] = buf[ (2*j)+1 ];\n\t}\n\treturn out;\n});\n\n/**\n* Serializes an array as a string.\n*\n* @name toString\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @throws {TypeError} `this` must be a complex number array\n* @returns {string} string representation\n*\n* @example\n* var arr = new Complex64Array( 2 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n*\n* var str = arr.toString();\n* // returns '1 + 1i,2 + 2i'\n*/\nsetReadOnly( Complex64Array.prototype, 'toString', function toString() {\n\tvar out;\n\tvar buf;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tout = [];\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tout.push( getComplex64( buf, i ).toString() );\n\t}\n\treturn out.join( ',' );\n});\n\n/**\n* Returns a new typed array with the element at a provided index replaced with a provided value.\n*\n* @name with\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {integer} index - element index\n* @param {ComplexLike} value - new value\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be an integer\n* @throws {RangeError} index argument is out-of-bounds\n* @throws {TypeError} second argument must be a complex number\n* @returns {Complex64Array} new typed array\n*\n* @example\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n* import Complex64 from '@stdlib/complex-float32';\n*\n* var arr = new Complex64Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var out = arr.with( 0, new Complex64( 4.0, 4.0 ) );\n* // returns \n*\n* var z = out.get( 0 );\n* // returns \n*\n* var re = realf( z );\n* // returns 4.0\n*\n* var im = imagf( z );\n* // returns 4.0\n*/\nsetReadOnly( Complex64Array.prototype, 'with', function copyWith( index, value ) {\n\tvar buf;\n\tvar out;\n\tvar len;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isInteger( index ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be an integer. Value: `%s`.', index ) );\n\t}\n\tlen = this._length;\n\tif ( index < 0 ) {\n\t\tindex += len;\n\t}\n\tif ( index < 0 || index >= len ) {\n\t\tthrow new RangeError( format( 'invalid argument. Index argument is out-of-bounds. Value: `%s`.', index ) );\n\t}\n\tif ( !isComplexLike( value ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Second argument must be a complex number. Value: `%s`.', value ) );\n\t}\n\tout = new this.constructor( this._buffer );\n\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\tbuf[ 2*index ] = realf( value );\n\tbuf[ (2*index)+1 ] = imagf( value );\n\treturn out;\n});\n\n\n// EXPORTS //\n\nexport default Complex64Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport realf from '@stdlib/complex-realf';\nimport imagf from '@stdlib/complex-imagf';\n\n\n// MAIN //\n\n/**\n* Returns a strided array of real and imaginary components.\n*\n* @private\n* @param {Float32Array} buf - output array\n* @param {Array} arr - array containing complex numbers\n* @returns {(Float32Array|null)} output array or null\n*/\nfunction fromArray( buf, arr ) {\n\tvar len;\n\tvar v;\n\tvar i;\n\tvar j;\n\n\tlen = arr.length;\n\tj = 0;\n\tfor ( i = 0; i < len; i++ ) {\n\t\tv = arr[ i ];\n\t\tif ( !isComplexLike( v ) ) {\n\t\t\treturn null;\n\t\t}\n\t\tbuf[ j ] = realf( v );\n\t\tbuf[ j+1 ] = imagf( v );\n\t\tj += 2; // stride\n\t}\n\treturn buf;\n}\n\n\n// EXPORTS //\n\nexport default fromArray;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isNumber } from '@stdlib/assert-is-number';\nimport defineProperty from '@stdlib/utils-define-property';\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport format from '@stdlib/string-format';\nimport toStr from './tostring.js';\nimport toJSON from './tojson.js';\n\n\n// MAIN //\n\n/**\n* 128-bit complex number constructor.\n*\n* @constructor\n* @param {number} real - real component\n* @param {number} imag - imaginary component\n* @throws {TypeError} must invoke using the `new` keyword\n* @throws {TypeError} real component must be a number\n* @throws {TypeError} imaginary component must be a number\n* @returns {Complex128} 128-bit complex number\n*\n* @example\n* var z = new Complex128( 5.0, 3.0 );\n* // returns \n*/\nfunction Complex128( real, imag ) {\n\tif ( !( this instanceof Complex128 ) ) {\n\t\tthrow new TypeError( 'invalid invocation. Constructor must be called with the `new` keyword.' );\n\t}\n\tif ( !isNumber( real ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Real component must be a number. Value: `%s`.', real ) );\n\t}\n\tif ( !isNumber( imag ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Imaginary component must be a number. Value: `%s`.', imag ) );\n\t}\n\tdefineProperty( this, 're', {\n\t\t'configurable': false,\n\t\t'enumerable': true,\n\t\t'writable': false,\n\t\t'value': real\n\t});\n\tdefineProperty( this, 'im', {\n\t\t'configurable': false,\n\t\t'enumerable': true,\n\t\t'writable': false,\n\t\t'value': imag\n\t});\n\treturn this;\n}\n\n/**\n* Size (in bytes) of each component.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex128\n* @type {integer}\n* @returns {integer} size of each component\n*\n* @example\n* var nbytes = Complex128.BYTES_PER_ELEMENT;\n* // returns 8\n*/\nsetReadOnly( Complex128, 'BYTES_PER_ELEMENT', 8 );\n\n/**\n* Size (in bytes) of each component.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex128.prototype\n* @type {integer}\n* @returns {integer} size of each component\n*\n* @example\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var nbytes = z.BYTES_PER_ELEMENT;\n* // returns 8\n*/\nsetReadOnly( Complex128.prototype, 'BYTES_PER_ELEMENT', 8 );\n\n/**\n* Length (in bytes) of a complex number.\n*\n* @name byteLength\n* @memberof Complex128.prototype\n* @type {integer}\n* @returns {integer} byte length\n*\n* @example\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var nbytes = z.byteLength;\n* // returns 16\n*/\nsetReadOnly( Complex128.prototype, 'byteLength', 16 );\n\n/**\n* Serializes a complex number as a string.\n*\n* @name toString\n* @memberof Complex128.prototype\n* @type {Function}\n* @returns {string} serialized complex number\n*\n* @example\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var str = z.toString();\n* // returns '5 + 3i'\n*/\nsetReadOnly( Complex128.prototype, 'toString', toStr );\n\n/**\n* Serializes a complex number as a JSON object.\n*\n* ## Notes\n*\n* - `JSON.stringify()` implicitly calls this method when stringifying a `Complex128` instance.\n*\n* @name toJSON\n* @memberof Complex128.prototype\n* @type {Function}\n* @returns {Object} serialized complex number\n*\n* @example\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var obj = z.toJSON();\n* // returns { 'type': 'Complex128', 're': 5.0, 'im': 3.0 }\n*/\nsetReadOnly( Complex128.prototype, 'toJSON', toJSON );\n\n\n// EXPORTS //\n\nexport default Complex128;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Returns the real component of a double-precision complex floating-point number.\n*\n* @param {Complex} z - complex number\n* @returns {number} real component\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n*\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var re = real( z );\n* // returns 5.0\n*/\nfunction real( z ) {\n\treturn z.re;\n}\n\n\n// EXPORTS //\n\nexport default real;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Returns the imaginary component of a double-precision complex floating-point number.\n*\n* @param {Complex} z - complex number\n* @returns {number} imaginary component\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n*\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var im = imag( z );\n* // returns 3.0\n*/\nfunction imag( z ) {\n\treturn z.im;\n}\n\n\n// EXPORTS //\n\nexport default imag;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isArrayLikeObject from '@stdlib/assert-is-array-like-object';\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport format from '@stdlib/string-format';\nimport real from '@stdlib/complex-real';\nimport imag from '@stdlib/complex-imag';\n\n\n// MAIN //\n\n/**\n* Returns an array of iterated values.\n*\n* @private\n* @param {Object} it - iterator\n* @returns {(Array|TypeError)} array or an error\n*/\nfunction fromIterator( it ) {\n\tvar out;\n\tvar v;\n\tvar z;\n\n\tout = [];\n\twhile ( true ) {\n\t\tv = it.next();\n\t\tif ( v.done ) {\n\t\t\tbreak;\n\t\t}\n\t\tz = v.value;\n\t\tif ( isArrayLikeObject( z ) && z.length >= 2 ) {\n\t\t\tout.push( z[ 0 ], z[ 1 ] );\n\t\t} else if ( isComplexLike( z ) ) {\n\t\t\tout.push( real( z ), imag( z ) );\n\t\t} else {\n\t\t\treturn new TypeError( format( 'invalid argument. An iterator must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', z ) );\n\t\t}\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default fromIterator;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isArrayLikeObject from '@stdlib/assert-is-array-like-object';\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport realf from '@stdlib/complex-realf';\nimport imagf from '@stdlib/complex-imagf';\nimport format from '@stdlib/string-format';\n\n\n// MAIN //\n\n/**\n* Returns an array of iterated values.\n*\n* @private\n* @param {Object} it - iterator\n* @param {Function} clbk - callback to invoke for each iterated value\n* @param {*} thisArg - invocation context\n* @returns {(Array|TypeError)} array or an error\n*/\nfunction fromIteratorMap( it, clbk, thisArg ) {\n\tvar out;\n\tvar v;\n\tvar z;\n\tvar i;\n\n\tout = [];\n\ti = -1;\n\twhile ( true ) {\n\t\tv = it.next();\n\t\tif ( v.done ) {\n\t\t\tbreak;\n\t\t}\n\t\ti += 1;\n\t\tz = clbk.call( thisArg, v.value, i );\n\t\tif ( isArrayLikeObject( z ) && z.length >= 2 ) {\n\t\t\tout.push( z[ 0 ], z[ 1 ] );\n\t\t} else if ( isComplexLike( z ) ) {\n\t\t\tout.push( realf( z ), imagf( z ) );\n\t\t} else {\n\t\t\treturn new TypeError( format( 'invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', z ) );\n\t\t}\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default fromIteratorMap;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Serializes a complex number as a string.\n*\n* @private\n* @returns {string} serialized complex number\n*/\nfunction toString() { // eslint-disable-line stdlib/no-redeclare\n\t/* eslint-disable no-invalid-this */\n\tvar str = '' + this.re;\n\tif ( this.im < 0 ) {\n\t\tstr += ' - ' + (-this.im);\n\t} else {\n\t\tstr += ' + ' + this.im;\n\t}\n\tstr += 'i';\n\treturn str;\n}\n\n\n// EXPORTS //\n\nexport default toString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Serializes a complex number as a JSON object.\n*\n* @private\n* @returns {Object} JSON representation\n*/\nfunction toJSON() {\n\t/* eslint-disable no-invalid-this */\n\tvar out = {};\n\tout.type = 'Complex128';\n\tout.re = this.re;\n\tout.im = this.im;\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default toJSON;\n","/* eslint-disable no-restricted-syntax, max-lines, no-invalid-this */\n\n/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isNonNegativeInteger } from '@stdlib/assert-is-nonnegative-integer';\nimport isArrayLikeObject from '@stdlib/assert-is-array-like-object';\nimport isCollection from '@stdlib/assert-is-collection';\nimport isArrayBuffer from '@stdlib/assert-is-arraybuffer';\nimport isObject from '@stdlib/assert-is-object';\nimport isArray from '@stdlib/assert-is-array';\nimport isString from '@stdlib/assert-is-string';\nimport isFunction from '@stdlib/assert-is-function';\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport isEven from '@stdlib/math-base-assert-is-even';\nimport isInteger from '@stdlib/math-base-assert-is-integer';\nimport isComplex64Array from '@stdlib/array-base-assert-is-complex64array';\nimport isComplex128Array from '@stdlib/array-base-assert-is-complex128array';\nimport hasIteratorSymbolSupport from '@stdlib/assert-has-iterator-symbol-support';\nimport ITERATOR_SYMBOL from '@stdlib/symbol-iterator';\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport setReadOnlyAccessor from '@stdlib/utils-define-nonenumerable-read-only-accessor';\nimport Float64Array from '@stdlib/array-float64';\nimport Complex128 from '@stdlib/complex-float64';\nimport real from '@stdlib/complex-real';\nimport imag from '@stdlib/complex-imag';\nimport floor from '@stdlib/math-base-special-floor';\nimport reinterpret64 from '@stdlib/strided-base-reinterpret-complex64';\nimport reinterpret128 from '@stdlib/strided-base-reinterpret-complex128';\nimport getter from '@stdlib/array-base-getter';\nimport accessorGetter from '@stdlib/array-base-accessor-getter';\nimport format from '@stdlib/string-format';\nimport fromIterator from './from_iterator.js';\nimport fromIteratorMap from './from_iterator_map.js';\nimport fromArray from './from_array.js';\n\n\n// VARIABLES //\n\nvar BYTES_PER_ELEMENT = Float64Array.BYTES_PER_ELEMENT * 2;\nvar HAS_ITERATOR_SYMBOL = hasIteratorSymbolSupport();\n\n\n// FUNCTIONS //\n\n/**\n* Returns a boolean indicating if a value is a complex typed array.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a complex typed array\n*/\nfunction isComplexArray( value ) {\n\treturn (\n\t\tvalue instanceof Complex128Array ||\n\t\t(\n\t\t\ttypeof value === 'object' &&\n\t\t\tvalue !== null &&\n\t\t\t(\n\t\t\t\tvalue.constructor.name === 'Complex64Array' ||\n\t\t\t\tvalue.constructor.name === 'Complex128Array'\n\t\t\t) &&\n\t\t\ttypeof value._length === 'number' && // eslint-disable-line no-underscore-dangle\n\n\t\t\t// NOTE: we don't perform a more rigorous test here for a typed array for performance reasons, as robustly checking for a typed array instance could require walking the prototype tree and performing relatively expensive constructor checks...\n\t\t\ttypeof value._buffer === 'object' // eslint-disable-line no-underscore-dangle\n\t\t)\n\t);\n}\n\n/**\n* Returns a boolean indicating if a value is a complex typed array constructor.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a complex typed array constructor\n*/\nfunction isComplexArrayConstructor( value ) {\n\treturn (\n\t\tvalue === Complex128Array ||\n\n\t\t// NOTE: weaker test in order to avoid a circular dependency with Complex64Array...\n\t\tvalue.name === 'Complex64Array'\n\t);\n}\n\n/**\n* Retrieves a complex number from a complex number array buffer.\n*\n* @private\n* @param {Float64Array} buf - array buffer\n* @param {NonNegativeInteger} idx - element index\n* @returns {Complex128} complex number\n*/\nfunction getComplex128( buf, idx ) {\n\tidx *= 2;\n\treturn new Complex128( buf[ idx ], buf[ idx+1 ] );\n}\n\n\n// MAIN //\n\n/**\n* 128-bit complex number array constructor.\n*\n* @constructor\n* @param {(NonNegativeInteger|Collection|ArrayBuffer|Iterable)} [arg] - length, typed array, array-like object, buffer, or iterable\n* @param {NonNegativeInteger} [byteOffset=0] - byte offset\n* @param {NonNegativeInteger} [length] - view length\n* @throws {RangeError} ArrayBuffer byte length must be a multiple of `16`\n* @throws {RangeError} array-like object and typed array input arguments must have a length which is a multiple of two\n* @throws {TypeError} if provided only a single argument, must provide a valid argument\n* @throws {TypeError} byte offset must be a nonnegative integer\n* @throws {RangeError} byte offset must be a multiple of `16`\n* @throws {TypeError} view length must be a positive multiple of `16`\n* @throws {RangeError} must provide sufficient memory to accommodate byte offset and view length requirements\n* @throws {TypeError} an iterator must return either a two element array containing real and imaginary components or a complex number\n* @returns {Complex128Array} complex number array\n*\n* @example\n* var arr = new Complex128Array();\n* // returns \n*\n* var len = arr.length;\n* // returns 0\n*\n* @example\n* var arr = new Complex128Array( 2 );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*\n* @example\n* var arr = new Complex128Array( [ 1.0, -1.0 ] );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* import ArrayBuffer from '@stdlib/array-buffer';\n*\n* var buf = new ArrayBuffer( 32 );\n* var arr = new Complex128Array( buf );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*\n* @example\n* import ArrayBuffer from '@stdlib/array-buffer';\n*\n* var buf = new ArrayBuffer( 32 );\n* var arr = new Complex128Array( buf, 16 );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* import ArrayBuffer from '@stdlib/array-buffer';\n*\n* var buf = new ArrayBuffer( 64 );\n* var arr = new Complex128Array( buf, 16, 2 );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*/\nfunction Complex128Array() {\n\tvar byteOffset;\n\tvar nargs;\n\tvar buf;\n\tvar len;\n\n\tnargs = arguments.length;\n\tif ( !(this instanceof Complex128Array) ) {\n\t\tif ( nargs === 0 ) {\n\t\t\treturn new Complex128Array();\n\t\t}\n\t\tif ( nargs === 1 ) {\n\t\t\treturn new Complex128Array( arguments[0] );\n\t\t}\n\t\tif ( nargs === 2 ) {\n\t\t\treturn new Complex128Array( arguments[0], arguments[1] );\n\t\t}\n\t\treturn new Complex128Array( arguments[0], arguments[1], arguments[2] );\n\t}\n\t// Create the underlying data buffer...\n\tif ( nargs === 0 ) {\n\t\tbuf = new Float64Array( 0 ); // backward-compatibility\n\t} else if ( nargs === 1 ) {\n\t\tif ( isNonNegativeInteger( arguments[0] ) ) {\n\t\t\tbuf = new Float64Array( arguments[0]*2 );\n\t\t} else if ( isCollection( arguments[0] ) ) {\n\t\t\tbuf = arguments[ 0 ];\n\t\t\tlen = buf.length;\n\n\t\t\t// If provided a \"generic\" array, peak at the first value, and, if the value is a complex number, try to process as an array of complex numbers, falling back to \"normal\" typed array initialization if we fail and ensuring consistency if the first value had not been a complex number...\n\t\t\tif ( len && isArray( buf ) && isComplexLike( buf[0] ) ) {\n\t\t\t\tbuf = fromArray( new Float64Array( len*2 ), buf );\n\t\t\t\tif ( buf === null ) {\n\t\t\t\t\t// We failed and we are now forced to allocate a new array :-(\n\t\t\t\t\tif ( !isEven( len ) ) {\n\t\t\t\t\t\tthrow new RangeError( format( 'invalid argument. Array-like object arguments must have a length which is a multiple of two. Length: `%u`.', len ) );\n\t\t\t\t\t}\n\t\t\t\t\t// We failed, so fall back to directly setting values...\n\t\t\t\t\tbuf = new Float64Array( arguments[0] );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ( isComplex64Array( buf ) ) {\n\t\t\t\t\tbuf = reinterpret64( buf, 0 );\n\t\t\t\t} else if ( isComplex128Array( buf ) ) {\n\t\t\t\t\tbuf = reinterpret128( buf, 0 );\n\t\t\t\t} else if ( !isEven( len ) ) {\n\t\t\t\t\tthrow new RangeError( format( 'invalid argument. Array-like object and typed array arguments must have a length which is a multiple of two. Length: `%u`.', len ) );\n\t\t\t\t}\n\t\t\t\tbuf = new Float64Array( buf );\n\t\t\t}\n\t\t} else if ( isArrayBuffer( arguments[0] ) ) {\n\t\t\tbuf = arguments[ 0 ];\n\t\t\tif ( !isInteger( buf.byteLength/BYTES_PER_ELEMENT ) ) {\n\t\t\t\tthrow new RangeError( format( 'invalid argument. ArrayBuffer byte length must be a multiple of %u. Byte length: `%u`.', BYTES_PER_ELEMENT, buf.byteLength ) );\n\t\t\t}\n\t\t\tbuf = new Float64Array( buf );\n\t\t} else if ( isObject( arguments[0] ) ) {\n\t\t\tbuf = arguments[ 0 ];\n\t\t\tif ( HAS_ITERATOR_SYMBOL === false ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Environment lacks Symbol.iterator support. Must provide a length, ArrayBuffer, typed array, or array-like object. Value: `%s`.', buf ) );\n\t\t\t}\n\t\t\tif ( !isFunction( buf[ ITERATOR_SYMBOL ] ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.', buf ) );\n\t\t\t}\n\t\t\tbuf = buf[ ITERATOR_SYMBOL ]();\n\t\t\tif ( !isFunction( buf.next ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.', buf ) );\n\t\t\t}\n\t\t\tbuf = fromIterator( buf );\n\t\t\tif ( buf instanceof Error ) {\n\t\t\t\tthrow buf;\n\t\t\t}\n\t\t\tbuf = new Float64Array( buf );\n\t\t} else {\n\t\t\tthrow new TypeError( format( 'invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.', arguments[0] ) );\n\t\t}\n\t} else {\n\t\tbuf = arguments[ 0 ];\n\t\tif ( !isArrayBuffer( buf ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. First argument must be an ArrayBuffer. Value: `%s`.', buf ) );\n\t\t}\n\t\tbyteOffset = arguments[ 1 ];\n\t\tif ( !isNonNegativeInteger( byteOffset ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Byte offset must be a nonnegative integer. Value: `%s`.', byteOffset ) );\n\t\t}\n\t\tif ( !isInteger( byteOffset/BYTES_PER_ELEMENT ) ) {\n\t\t\tthrow new RangeError( format( 'invalid argument. Byte offset must be a multiple of %u. Value: `%u`.', BYTES_PER_ELEMENT, byteOffset ) );\n\t\t}\n\t\tif ( nargs === 2 ) {\n\t\t\tlen = buf.byteLength - byteOffset;\n\t\t\tif ( !isInteger( len/BYTES_PER_ELEMENT ) ) {\n\t\t\t\tthrow new RangeError( format( 'invalid arguments. ArrayBuffer view byte length must be a multiple of %u. View byte length: `%u`.', BYTES_PER_ELEMENT, len ) );\n\t\t\t}\n\t\t\tbuf = new Float64Array( buf, byteOffset );\n\t\t} else {\n\t\t\tlen = arguments[ 2 ];\n\t\t\tif ( !isNonNegativeInteger( len ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Length must be a nonnegative integer. Value: `%s`.', len ) );\n\t\t\t}\n\t\t\tif ( (len*BYTES_PER_ELEMENT) > (buf.byteLength-byteOffset) ) {\n\t\t\t\tthrow new RangeError( format( 'invalid arguments. ArrayBuffer has insufficient capacity. Either decrease the array length or provide a bigger buffer. Minimum capacity: `%u`.', len*BYTES_PER_ELEMENT ) );\n\t\t\t}\n\t\t\tbuf = new Float64Array( buf, byteOffset, len*2 );\n\t\t}\n\t}\n\tsetReadOnly( this, '_buffer', buf );\n\tsetReadOnly( this, '_length', buf.length/2 );\n\n\treturn this;\n}\n\n/**\n* Size (in bytes) of each array element.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex128Array\n* @readonly\n* @type {PositiveInteger}\n* @default 16\n*\n* @example\n* var nbytes = Complex128Array.BYTES_PER_ELEMENT;\n* // returns 16\n*/\nsetReadOnly( Complex128Array, 'BYTES_PER_ELEMENT', BYTES_PER_ELEMENT );\n\n/**\n* Constructor name.\n*\n* @name name\n* @memberof Complex128Array\n* @readonly\n* @type {string}\n* @default 'Complex128Array'\n*\n* @example\n* var name = Complex128Array.name;\n* // returns 'Complex128Array'\n*/\nsetReadOnly( Complex128Array, 'name', 'Complex128Array' );\n\n/**\n* Creates a new 128-bit complex number array from an array-like object or an iterable.\n*\n* @name from\n* @memberof Complex128Array\n* @type {Function}\n* @param {(Collection|Object)} src - array-like object or iterable\n* @param {Function} [clbk] - callback to invoke for each source element\n* @param {*} [thisArg] - context\n* @throws {TypeError} `this` context must be a constructor\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be an array-like object or an iterable\n* @throws {TypeError} second argument must be a function\n* @throws {RangeError} array-like objects must have a length which is a multiple of two\n* @throws {TypeError} an iterator must return either a two element array containing real and imaginary components or a complex number\n* @throws {TypeError} when provided an iterator, a callback must return either a two element array containing real and imaginary components or a complex number\n* @returns {Complex128Array} 128-bit complex number array\n*\n* @example\n* var arr = Complex128Array.from( [ 1.0, -1.0 ] );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n*\n* var arr = Complex128Array.from( [ new Complex128( 1.0, 1.0 ) ] );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* function clbk( v ) {\n* return new Complex128( real(v)*2.0, imag(v)*2.0 );\n* }\n*\n* var arr = Complex128Array.from( [ new Complex128( 1.0, 1.0 ) ], clbk );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*/\nsetReadOnly( Complex128Array, 'from', function from( src ) {\n\tvar thisArg;\n\tvar nargs;\n\tvar clbk;\n\tvar out;\n\tvar buf;\n\tvar tmp;\n\tvar get;\n\tvar len;\n\tvar flg;\n\tvar v;\n\tvar i;\n\tvar j;\n\tif ( !isFunction( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` context must be a constructor.' );\n\t}\n\tif ( !isComplexArrayConstructor( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tnargs = arguments.length;\n\tif ( nargs > 1 ) {\n\t\tclbk = arguments[ 1 ];\n\t\tif ( !isFunction( clbk ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be a function. Value: `%s`.', clbk ) );\n\t\t}\n\t\tif ( nargs > 2 ) {\n\t\t\tthisArg = arguments[ 2 ];\n\t\t}\n\t}\n\tif ( isComplexArray( src ) ) {\n\t\tlen = src.length;\n\t\tif ( clbk ) {\n\t\t\tout = new this( len );\n\t\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\t\tj = 0;\n\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\tv = clbk.call( thisArg, src.get( i ), i );\n\t\t\t\tif ( isComplexLike( v ) ) {\n\t\t\t\t\tbuf[ j ] = real( v );\n\t\t\t\t\tbuf[ j+1 ] = imag( v );\n\t\t\t\t} else if ( isArrayLikeObject( v ) && v.length >= 2 ) {\n\t\t\t\t\tbuf[ j ] = v[ 0 ];\n\t\t\t\t\tbuf[ j+1 ] = v[ 1 ];\n\t\t\t\t} else {\n\t\t\t\t\tthrow new TypeError( format( 'invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', v ) );\n\t\t\t\t}\n\t\t\t\tj += 2; // stride\n\t\t\t}\n\t\t\treturn out;\n\t\t}\n\t\treturn new this( src );\n\t}\n\tif ( isCollection( src ) ) {\n\t\tif ( clbk ) {\n\t\t\t// Note: array contents affect how we iterate over a provided data source. If only complex number objects, we can extract real and imaginary components. Otherwise, for non-complex number arrays (e.g., `Float64Array`, etc), we assume a strided array where real and imaginary components are interleaved. In the former case, we expect a callback to return real and imaginary components (possibly as a complex number). In the latter case, we expect a callback to return *either* a real or imaginary component.\n\n\t\t\tlen = src.length;\n\t\t\tif ( src.get && src.set ) {\n\t\t\t\tget = accessorGetter( 'default' );\n\t\t\t} else {\n\t\t\t\tget = getter( 'default' );\n\t\t\t}\n\t\t\t// Detect whether we've been provided an array which returns complex number objects...\n\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\tif ( !isComplexLike( get( src, i ) ) ) {\n\t\t\t\t\tflg = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// If an array does not contain only complex number objects, then we assume interleaved real and imaginary components...\n\t\t\tif ( flg ) {\n\t\t\t\tif ( !isEven( len ) ) {\n\t\t\t\t\tthrow new RangeError( format( 'invalid argument. First argument must have a length which is a multiple of two. Length: `%u`.', len ) );\n\t\t\t\t}\n\t\t\t\tout = new this( len/2 );\n\t\t\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\t\tbuf[ i ] = clbk.call( thisArg, get( src, i ), i );\n\t\t\t\t}\n\t\t\t\treturn out;\n\t\t\t}\n\t\t\t// If an array contains only complex number objects, then we need to extract real and imaginary components...\n\t\t\tout = new this( len );\n\t\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\t\tj = 0;\n\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\tv = clbk.call( thisArg, get( src, i ), i );\n\t\t\t\tif ( isComplexLike( v ) ) {\n\t\t\t\t\tbuf[ j ] = real( v );\n\t\t\t\t\tbuf[ j+1 ] = imag( v );\n\t\t\t\t} else if ( isArrayLikeObject( v ) && v.length >= 2 ) {\n\t\t\t\t\tbuf[ j ] = v[ 0 ];\n\t\t\t\t\tbuf[ j+1 ] = v[ 1 ];\n\t\t\t\t} else {\n\t\t\t\t\tthrow new TypeError( format( 'invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', v ) );\n\t\t\t\t}\n\t\t\t\tj += 2; // stride\n\t\t\t}\n\t\t\treturn out;\n\t\t}\n\t\treturn new this( src );\n\t}\n\tif ( isObject( src ) && HAS_ITERATOR_SYMBOL && isFunction( src[ ITERATOR_SYMBOL ] ) ) { // eslint-disable-line max-len\n\t\tbuf = src[ ITERATOR_SYMBOL ]();\n\t\tif ( !isFunction( buf.next ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.', src ) );\n\t\t}\n\t\tif ( clbk ) {\n\t\t\ttmp = fromIteratorMap( buf, clbk, thisArg );\n\t\t} else {\n\t\t\ttmp = fromIterator( buf );\n\t\t}\n\t\tif ( tmp instanceof Error ) {\n\t\t\tthrow tmp;\n\t\t}\n\t\tlen = tmp.length / 2;\n\t\tout = new this( len );\n\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\tbuf[ i ] = tmp[ i ];\n\t\t}\n\t\treturn out;\n\t}\n\tthrow new TypeError( format( 'invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.', src ) );\n});\n\n/**\n* Creates a new 128-bit complex number array from a variable number of arguments.\n*\n* @name of\n* @memberof Complex128Array\n* @type {Function}\n* @param {...*} element - array elements\n* @throws {TypeError} `this` context must be a constructor\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Complex128Array} 128-bit complex number array\n*\n* @example\n* var arr = Complex128Array.of( 1.0, 1.0, 1.0, 1.0 );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*/\nsetReadOnly( Complex128Array, 'of', function of() {\n\tvar args;\n\tvar i;\n\tif ( !isFunction( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` context must be a constructor.' );\n\t}\n\tif ( !isComplexArrayConstructor( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\targs = [];\n\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\targs.push( arguments[ i ] );\n\t}\n\treturn new this( args );\n});\n\n/**\n* Returns an array element with support for both nonnegative and negative integer indices.\n*\n* @name at\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {integer} idx - element index\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} must provide an integer\n* @returns {(Complex128|void)} array element\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* var arr = new Complex128Array( 10 );\n*\n* var z = arr.at( 0 );\n* // returns \n*\n* var re = real( z );\n* // returns 0.0\n*\n* var im = imag( z );\n* // returns 0.0\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 9.0, -9.0 ], 9 );\n*\n* z = arr.at( 0 );\n* // returns \n*\n* re = real( z );\n* // returns 1.0\n*\n* im = imag( z );\n* // returns -1.0\n*\n* z = arr.at( -1 );\n* // returns \n*\n* re = real( z );\n* // returns 9.0\n*\n* im = imag( z );\n* // returns -9.0\n*\n* z = arr.at( 100 );\n* // returns undefined\n*\n* z = arr.at( -100 );\n* // returns undefined\n*/\nsetReadOnly( Complex128Array.prototype, 'at', function at( idx ) {\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isInteger( idx ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Must provide an integer. Value: `%s`.', idx ) );\n\t}\n\tif ( idx < 0 ) {\n\t\tidx += this._length;\n\t}\n\tif ( idx < 0 || idx >= this._length ) {\n\t\treturn;\n\t}\n\treturn getComplex128( this._buffer, idx );\n});\n\n/**\n* Pointer to the underlying data buffer.\n*\n* @name buffer\n* @memberof Complex128Array.prototype\n* @readonly\n* @type {ArrayBuffer}\n*\n* @example\n* var arr = new Complex128Array( 10 );\n*\n* var buf = arr.buffer;\n* // returns \n*/\nsetReadOnlyAccessor( Complex128Array.prototype, 'buffer', function get() {\n\treturn this._buffer.buffer;\n});\n\n/**\n* Size (in bytes) of the array.\n*\n* @name byteLength\n* @memberof Complex128Array.prototype\n* @readonly\n* @type {NonNegativeInteger}\n*\n* @example\n* var arr = new Complex128Array( 10 );\n*\n* var byteLength = arr.byteLength;\n* // returns 160\n*/\nsetReadOnlyAccessor( Complex128Array.prototype, 'byteLength', function get() {\n\treturn this._buffer.byteLength;\n});\n\n/**\n* Offset (in bytes) of the array from the start of its underlying `ArrayBuffer`.\n*\n* @name byteOffset\n* @memberof Complex128Array.prototype\n* @readonly\n* @type {NonNegativeInteger}\n*\n* @example\n* var arr = new Complex128Array( 10 );\n*\n* var byteOffset = arr.byteOffset;\n* // returns 0\n*/\nsetReadOnlyAccessor( Complex128Array.prototype, 'byteOffset', function get() {\n\treturn this._buffer.byteOffset;\n});\n\n/**\n* Size (in bytes) of each array element.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex128Array.prototype\n* @readonly\n* @type {PositiveInteger}\n* @default 16\n*\n* @example\n* var arr = new Complex128Array( 10 );\n*\n* var nbytes = arr.BYTES_PER_ELEMENT;\n* // returns 16\n*/\nsetReadOnly( Complex128Array.prototype, 'BYTES_PER_ELEMENT', Complex128Array.BYTES_PER_ELEMENT );\n\n/**\n* Copies a sequence of elements within the array to the position starting at `target`.\n*\n* @name copyWithin\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {integer} target - index at which to start copying elements\n* @param {integer} start - source index at which to copy elements from\n* @param {integer} [end] - source index at which to stop copying elements from\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Complex128Array} modified array\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* var arr = new Complex128Array( 4 );\n*\n* // Set the array elements:\n* arr.set( new Complex128( 1.0, 1.0 ), 0 );\n* arr.set( new Complex128( 2.0, 2.0 ), 1 );\n* arr.set( new Complex128( 3.0, 3.0 ), 2 );\n* arr.set( new Complex128( 4.0, 4.0 ), 3 );\n*\n* // Copy the first two elements to the last two elements:\n* arr.copyWithin( 2, 0, 2 );\n*\n* // Get the last array element:\n* var z = arr.get( 3 );\n*\n* var re = real( z );\n* // returns 2.0\n*\n* var im = imag( z );\n* // returns 2.0\n*/\nsetReadOnly( Complex128Array.prototype, 'copyWithin', function copyWithin( target, start ) {\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\t// FIXME: prefer a functional `copyWithin` implementation which addresses lack of universal browser support (e.g., IE11 and Safari) or ensure that typed arrays are polyfilled\n\tif ( arguments.length === 2 ) {\n\t\tthis._buffer.copyWithin( target*2, start*2 );\n\t} else {\n\t\tthis._buffer.copyWithin( target*2, start*2, arguments[2]*2 );\n\t}\n\treturn this;\n});\n\n/**\n* Returns an iterator for iterating over array key-value pairs.\n*\n* @name entries\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Iterator} iterator\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n*\n* var arr = [\n* new Complex128( 1.0, 1.0 ),\n* new Complex128( 2.0, 2.0 ),\n* new Complex128( 3.0, 3.0 )\n* ];\n* arr = new Complex128Array( arr );\n*\n* // Create an iterator:\n* var it = arr.entries();\n*\n* // Iterate over the key-value pairs...\n* var v = it.next().value;\n* // returns [ 0, ]\n*\n* v = it.next().value;\n* // returns [ 1, ]\n*\n* v = it.next().value;\n* // returns [ 2, ]\n*\n* var bool = it.next().done;\n* // returns true\n*/\nsetReadOnly( Complex128Array.prototype, 'entries', function entries() {\n\tvar buffer;\n\tvar self;\n\tvar iter;\n\tvar len;\n\tvar FLG;\n\tvar i;\n\tvar j;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tself = this;\n\tbuffer = this._buffer;\n\tlen = this._length;\n\n\t// Initialize the iteration indices:\n\ti = -1;\n\tj = -2;\n\n\t// Create an iterator protocol-compliant object:\n\titer = {};\n\tsetReadOnly( iter, 'next', next );\n\tsetReadOnly( iter, 'return', end );\n\n\tif ( ITERATOR_SYMBOL ) {\n\t\tsetReadOnly( iter, ITERATOR_SYMBOL, factory );\n\t}\n\treturn iter;\n\n\t/**\n\t* Returns an iterator protocol-compliant object containing the next iterated value.\n\t*\n\t* @private\n\t* @returns {Object} iterator protocol-compliant object\n\t*/\n\tfunction next() {\n\t\tvar z;\n\t\ti += 1;\n\t\tif ( FLG || i >= len ) {\n\t\t\treturn {\n\t\t\t\t'done': true\n\t\t\t};\n\t\t}\n\t\tj += 2;\n\t\tz = new Complex128( buffer[ j ], buffer[ j+1 ] );\n\t\treturn {\n\t\t\t'value': [ i, z ],\n\t\t\t'done': false\n\t\t};\n\t}\n\n\t/**\n\t* Finishes an iterator.\n\t*\n\t* @private\n\t* @param {*} [value] - value to return\n\t* @returns {Object} iterator protocol-compliant object\n\t*/\n\tfunction end( value ) {\n\t\tFLG = true;\n\t\tif ( arguments.length ) {\n\t\t\treturn {\n\t\t\t\t'value': value,\n\t\t\t\t'done': true\n\t\t\t};\n\t\t}\n\t\treturn {\n\t\t\t'done': true\n\t\t};\n\t}\n\n\t/**\n\t* Returns a new iterator.\n\t*\n\t* @private\n\t* @returns {Iterator} iterator\n\t*/\n\tfunction factory() {\n\t\treturn self.entries();\n\t}\n});\n\n/**\n* Tests whether all elements in an array pass a test implemented by a predicate function.\n*\n* @name every\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {boolean} boolean indicating whether all elements pass a test\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* function predicate( v ) {\n* return ( real( v ) === imag( v ) );\n* }\n*\n* var arr = new Complex128Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var bool = arr.every( predicate );\n* // returns true\n*/\nsetReadOnly( Complex128Array.prototype, 'every', function every( predicate, thisArg ) {\n\tvar buf;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tif ( !predicate.call( thisArg, getComplex128( buf, i ), i, this ) ) {\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn true;\n});\n\n/**\n* Returns a modified typed array filled with a fill value.\n*\n* @name fill\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {ComplexLike} value - fill value\n* @param {integer} [start=0] - starting index (inclusive)\n* @param {integer} [end] - ending index (exclusive)\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a complex number\n* @throws {TypeError} second argument must be an integer\n* @throws {TypeError} third argument must be an integer\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* var arr = new Complex128Array( 3 );\n*\n* arr.fill( new Complex128( 1.0, 1.0 ), 1 );\n*\n* var z = arr.get( 1 );\n* // returns \n*\n* var re = real( z );\n* // returns 1.0\n*\n* var im = imag( z );\n* // returns 1.0\n*\n* z = arr.get( 1 );\n* // returns \n*\n* re = real( z );\n* // returns 1.0\n*\n* im = imag( z );\n* // returns 1.0\n*/\nsetReadOnly( Complex128Array.prototype, 'fill', function fill( value, start, end ) {\n\tvar buf;\n\tvar len;\n\tvar idx;\n\tvar re;\n\tvar im;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isComplexLike( value ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a complex number. Value: `%s`.', value ) );\n\t}\n\tbuf = this._buffer;\n\tlen = this._length;\n\tif ( arguments.length > 1 ) {\n\t\tif ( !isInteger( start ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be an integer. Value: `%s`.', start ) );\n\t\t}\n\t\tif ( start < 0 ) {\n\t\t\tstart += len;\n\t\t\tif ( start < 0 ) {\n\t\t\t\tstart = 0;\n\t\t\t}\n\t\t}\n\t\tif ( arguments.length > 2 ) {\n\t\t\tif ( !isInteger( end ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Third argument must be an integer. Value: `%s`.', end ) );\n\t\t\t}\n\t\t\tif ( end < 0 ) {\n\t\t\t\tend += len;\n\t\t\t\tif ( end < 0 ) {\n\t\t\t\t\tend = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( end > len ) {\n\t\t\t\tend = len;\n\t\t\t}\n\t\t} else {\n\t\t\tend = len;\n\t\t}\n\t} else {\n\t\tstart = 0;\n\t\tend = len;\n\t}\n\tre = real( value );\n\tim = imag( value );\n\tfor ( i = start; i < end; i++ ) {\n\t\tidx = 2*i;\n\t\tbuf[ idx ] = re;\n\t\tbuf[ idx+1 ] = im;\n\t}\n\treturn this;\n});\n\n/**\n* Returns a new array containing the elements of an array which pass a test implemented by a predicate function.\n*\n* @name filter\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {Complex128Array} complex number array\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* function predicate( v ) {\n* return ( real( v ) === imag( v ) );\n* }\n*\n* var arr = new Complex128Array( 3 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n*\n* var out = arr.filter( predicate );\n* // returns \n*\n* var len = out.length;\n* // returns 1\n*\n* var z = out.get( 0 );\n* // returns \n*\n* var re = real( z );\n* // returns 2.0\n*\n* var im = imag( z );\n* // returns 2.0\n*/\nsetReadOnly( Complex128Array.prototype, 'filter', function filter( predicate, thisArg ) {\n\tvar buf;\n\tvar out;\n\tvar i;\n\tvar z;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tout = [];\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tz = getComplex128( buf, i );\n\t\tif ( predicate.call( thisArg, z, i, this ) ) {\n\t\t\tout.push( z );\n\t\t}\n\t}\n\treturn new this.constructor( out );\n});\n\n/**\n* Returns the first element in an array for which a predicate function returns a truthy value.\n*\n* @name find\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {(Complex128|void)} array element or undefined\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* function predicate( v ) {\n* return ( real( v ) === imag( v ) );\n* }\n*\n* var arr = new Complex128Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var z = arr.find( predicate );\n* // returns \n*\n* var re = real( z );\n* // returns 1.0\n*\n* var im = imag( z );\n* // returns 1.0\n*/\nsetReadOnly( Complex128Array.prototype, 'find', function find( predicate, thisArg ) {\n\tvar buf;\n\tvar i;\n\tvar z;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tz = getComplex128( buf, i );\n\t\tif ( predicate.call( thisArg, z, i, this ) ) {\n\t\t\treturn z;\n\t\t}\n\t}\n});\n\n/**\n* Returns the index of the first element in an array for which a predicate function returns a truthy value.\n*\n* @name findIndex\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {integer} index or -1\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* function predicate( v ) {\n* return ( real( v ) === imag( v ) );\n* }\n*\n* var arr = new Complex128Array( 3 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var idx = arr.findIndex( predicate );\n* // returns 2\n*/\nsetReadOnly( Complex128Array.prototype, 'findIndex', function findIndex( predicate, thisArg ) {\n\tvar buf;\n\tvar i;\n\tvar z;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tz = getComplex128( buf, i );\n\t\tif ( predicate.call( thisArg, z, i, this ) ) {\n\t\t\treturn i;\n\t\t}\n\t}\n\treturn -1;\n});\n\n/**\n* Returns the last element in an array for which a predicate function returns a truthy value.\n*\n* @name findLast\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {(Complex128|void)} array element or undefined\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* function predicate( v ) {\n* return ( real( v ) === imag( v ) );\n* }\n*\n* var arr = new Complex128Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var z = arr.findLast( predicate );\n* // returns \n*\n* var re = real( z );\n* // returns 3.0\n*\n* var im = imag( z );\n* // returns 3.0\n*/\nsetReadOnly( Complex128Array.prototype, 'findLast', function findLast( predicate, thisArg ) {\n\tvar buf;\n\tvar i;\n\tvar z;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = this._length-1; i >= 0; i-- ) {\n\t\tz = getComplex128( buf, i );\n\t\tif ( predicate.call( thisArg, z, i, this ) ) {\n\t\t\treturn z;\n\t\t}\n\t}\n});\n\n/**\n* Returns the index of the last element in an array for which a predicate function returns a truthy value.\n*\n* @name findLastIndex\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {integer} index or -1\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* function predicate( v ) {\n* return ( real( v ) === imag( v ) );\n* }\n*\n* var arr = new Complex128Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n*\n* var idx = arr.findLastIndex( predicate );\n* // returns 1\n*/\nsetReadOnly( Complex128Array.prototype, 'findLastIndex', function findLastIndex( predicate, thisArg ) {\n\tvar buf;\n\tvar i;\n\tvar z;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = this._length-1; i >= 0; i-- ) {\n\t\tz = getComplex128( buf, i );\n\t\tif ( predicate.call( thisArg, z, i, this ) ) {\n\t\t\treturn i;\n\t\t}\n\t}\n\treturn -1;\n});\n\n/**\n* Invokes a function once for each array element.\n*\n* @name forEach\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {Function} fcn - function to invoke\n* @param {*} [thisArg] - function invocation context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n*\n* function log( v, i ) {\n* console.log( '%s: %s', i, v.toString() );\n* }\n*\n* var arr = new Complex128Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* arr.forEach( log );\n*/\nsetReadOnly( Complex128Array.prototype, 'forEach', function forEach( fcn, thisArg ) {\n\tvar buf;\n\tvar i;\n\tvar z;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( fcn ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', fcn ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tz = getComplex128( buf, i );\n\t\tfcn.call( thisArg, z, i, this );\n\t}\n});\n\n/**\n* Returns an array element.\n*\n* @name get\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {NonNegativeInteger} idx - element index\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} must provide a nonnegative integer\n* @returns {(Complex128|void)} array element\n*\n* @example\n* var arr = new Complex128Array( 10 );\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* var z = arr.get( 0 );\n* // returns \n*\n* var re = real( z );\n* // returns 0.0\n*\n* var im = imag( z );\n* // returns 0.0\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n*\n* z = arr.get( 0 );\n* // returns \n*\n* re = real( z );\n* // returns 1.0\n*\n* im = imag( z );\n* // returns -1.0\n*\n* z = arr.get( 100 );\n* // returns undefined\n*/\nsetReadOnly( Complex128Array.prototype, 'get', function get( idx ) {\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isNonNegativeInteger( idx ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Must provide a nonnegative integer. Value: `%s`.', idx ) );\n\t}\n\tif ( idx >= this._length ) {\n\t\treturn;\n\t}\n\treturn getComplex128( this._buffer, idx );\n});\n\n/**\n* Number of array elements.\n*\n* @name length\n* @memberof Complex128Array.prototype\n* @readonly\n* @type {NonNegativeInteger}\n*\n* @example\n* var arr = new Complex128Array( 10 );\n*\n* var len = arr.length;\n* // returns 10\n*/\nsetReadOnlyAccessor( Complex128Array.prototype, 'length', function get() {\n\treturn this._length;\n});\n\n/**\n* Returns a boolean indicating whether an array includes a provided value.\n*\n* @name includes\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {ComplexLike} searchElement - search element\n* @param {integer} [fromIndex=0] - starting index (inclusive)\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a complex number\n* @throws {TypeError} second argument must be an integer\n* @returns {boolean} boolean indicating whether an array includes a provided value\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n*\n* var arr = new Complex128Array( 5 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n* arr.set( [ 4.0, -4.0 ], 3 );\n* arr.set( [ 5.0, -5.0 ], 4 );\n*\n* var bool = arr.includes( new Complex128( 3.0, -3.0 ) );\n* // returns true\n*\n* bool = arr.includes( new Complex128( 3.0, -3.0 ), 3 );\n* // returns false\n*\n* bool = arr.includes( new Complex128( 4.0, -4.0 ), -3 );\n* // returns true\n*/\nsetReadOnly( Complex128Array.prototype, 'includes', function includes( searchElement, fromIndex ) {\n\tvar buf;\n\tvar idx;\n\tvar re;\n\tvar im;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isComplexLike( searchElement ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a complex number. Value: `%s`.', searchElement ) );\n\t}\n\tif ( arguments.length > 1 ) {\n\t\tif ( !isInteger( fromIndex ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be an integer. Value: `%s`.', fromIndex ) );\n\t\t}\n\t\tif ( fromIndex < 0 ) {\n\t\t\tfromIndex += this._length;\n\t\t\tif ( fromIndex < 0 ) {\n\t\t\t\tfromIndex = 0;\n\t\t\t}\n\t\t}\n\t} else {\n\t\tfromIndex = 0;\n\t}\n\tre = real( searchElement );\n\tim = imag( searchElement );\n\tbuf = this._buffer;\n\tfor ( i = fromIndex; i < this._length; i++ ) {\n\t\tidx = 2 * i;\n\t\tif ( re === buf[ idx ] && im === buf[ idx+1 ] ) {\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n});\n\n/**\n* Returns the first index at which a given element can be found.\n*\n* @name indexOf\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {ComplexLike} searchElement - element to find\n* @param {integer} [fromIndex=0] - starting index (inclusive)\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a complex number\n* @throws {TypeError} second argument must be an integer\n* @returns {integer} index or -1\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n*\n* var arr = new Complex128Array( 5 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n* arr.set( [ 4.0, -4.0 ], 3 );\n* arr.set( [ 5.0, -5.0 ], 4 );\n*\n* var idx = arr.indexOf( new Complex128( 3.0, -3.0 ) );\n* // returns 2\n*\n* idx = arr.indexOf( new Complex128( 3.0, -3.0 ), 3 );\n* // returns -1\n*\n* idx = arr.indexOf( new Complex128( 4.0, -4.0 ), -3 );\n* // returns 3\n*/\nsetReadOnly( Complex128Array.prototype, 'indexOf', function indexOf( searchElement, fromIndex ) {\n\tvar buf;\n\tvar idx;\n\tvar re;\n\tvar im;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isComplexLike( searchElement ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a complex number. Value: `%s`.', searchElement ) );\n\t}\n\tif ( arguments.length > 1 ) {\n\t\tif ( !isInteger( fromIndex ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be an integer. Value: `%s`.', fromIndex ) );\n\t\t}\n\t\tif ( fromIndex < 0 ) {\n\t\t\tfromIndex += this._length;\n\t\t\tif ( fromIndex < 0 ) {\n\t\t\t\tfromIndex = 0;\n\t\t\t}\n\t\t}\n\t} else {\n\t\tfromIndex = 0;\n\t}\n\tre = real( searchElement );\n\tim = imag( searchElement );\n\tbuf = this._buffer;\n\tfor ( i = fromIndex; i < this._length; i++ ) {\n\t\tidx = 2 * i;\n\t\tif ( re === buf[ idx ] && im === buf[ idx+1 ] ) {\n\t\t\treturn i;\n\t\t}\n\t}\n\treturn -1;\n});\n\n/**\n* Returns a new string by concatenating all array elements.\n*\n* @name join\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {string} [separator=','] - element separator\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a string\n* @returns {string} string representation\n*\n* @example\n* var arr = new Complex128Array( 2 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n*\n* var str = arr.join();\n* // returns '1 + 1i,2 + 2i'\n*\n* str = arr.join( '/' );\n* // returns '1 + 1i/2 + 2i'\n*/\nsetReadOnly( Complex128Array.prototype, 'join', function join( separator ) {\n\tvar out;\n\tvar buf;\n\tvar sep;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( arguments.length === 0 ) {\n\t\tsep = ',';\n\t} else if ( isString( separator ) ) {\n\t\tsep = separator;\n\t} else {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a string. Value: `%s`.', separator ) );\n\t}\n\tout = [];\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tout.push( getComplex128( buf, i ).toString() );\n\t}\n\treturn out.join( sep );\n});\n\n/**\n* Returns the last index at which a given element can be found.\n*\n* @name lastIndexOf\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {ComplexLike} searchElement - element to find\n* @param {integer} [fromIndex] - index at which to start searching backward (inclusive)\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a complex number\n* @throws {TypeError} second argument must be an integer\n* @returns {integer} index or -1\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n*\n* var arr = new Complex128Array( 5 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n* arr.set( [ 4.0, -4.0 ], 3 );\n* arr.set( [ 3.0, -3.0 ], 4 );\n*\n* var idx = arr.lastIndexOf( new Complex128( 3.0, -3.0 ) );\n* // returns 4\n*\n* idx = arr.lastIndexOf( new Complex128( 3.0, -3.0 ), 3 );\n* // returns 2\n*\n* idx = arr.lastIndexOf( new Complex128( 5.0, -5.0 ), 3 );\n* // returns -1\n*\n* idx = arr.lastIndexOf( new Complex128( 2.0, -2.0 ), -3 );\n* // returns 1\n*/\nsetReadOnly( Complex128Array.prototype, 'lastIndexOf', function lastIndexOf( searchElement, fromIndex ) {\n\tvar buf;\n\tvar idx;\n\tvar re;\n\tvar im;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isComplexLike( searchElement ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a complex number. Value: `%s`.', searchElement ) );\n\t}\n\tif ( arguments.length > 1 ) {\n\t\tif ( !isInteger( fromIndex ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be an integer. Value: `%s`.', fromIndex ) );\n\t\t}\n\t\tif ( fromIndex >= this._length ) {\n\t\t\tfromIndex = this._length - 1;\n\t\t} else if ( fromIndex < 0 ) {\n\t\t\tfromIndex += this._length;\n\t\t}\n\t} else {\n\t\tfromIndex = this._length - 1;\n\t}\n\tre = real( searchElement );\n\tim = imag( searchElement );\n\tbuf = this._buffer;\n\tfor ( i = fromIndex; i >= 0; i-- ) {\n\t\tidx = 2 * i;\n\t\tif ( re === buf[ idx ] && im === buf[ idx+1 ] ) {\n\t\t\treturn i;\n\t\t}\n\t}\n\treturn -1;\n});\n\n/**\n* Returns a new array with each element being the result of a provided callback function.\n*\n* @name map\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {Function} fcn - callback function\n* @param {*} [thisArg] - callback function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {Complex128Array} complex number array\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* function scale( v, i ) {\n* return new Complex128( 2.0*real( v ), 2.0*imag( v ) );\n* }\n*\n* var arr = new Complex128Array( 3 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n*\n* var out = arr.map( scale );\n* // returns \n*\n* var z = out.get( 0 );\n* // returns \n*\n* var re = real( z );\n* // returns 2.0\n*\n* var im = imag( z );\n* // returns -2.0\n*/\nsetReadOnly( Complex128Array.prototype, 'map', function map( fcn, thisArg ) {\n\tvar outbuf;\n\tvar buf;\n\tvar out;\n\tvar i;\n\tvar v;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( fcn ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', fcn ) );\n\t}\n\tbuf = this._buffer;\n\tout = new this.constructor( this._length );\n\toutbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tv = fcn.call( thisArg, getComplex128( buf, i ), i, this );\n\t\tif ( isComplexLike( v ) ) {\n\t\t\toutbuf[ 2*i ] = real( v );\n\t\t\toutbuf[ (2*i)+1 ] = imag( v );\n\t\t} else if ( isArrayLikeObject( v ) && v.length === 2 ) {\n\t\t\toutbuf[ 2*i ] = v[ 0 ];\n\t\t\toutbuf[ (2*i)+1 ] = v[ 1 ];\n\t\t} else {\n\t\t\tthrow new TypeError( format( 'invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', v ) );\n\t\t}\n\t}\n\treturn out;\n});\n\n/**\n* Applies a provided callback function to each element of the array, in order, passing in the return value from the calculation on the preceding element and returning the accumulated result upon completion.\n*\n* @name reduce\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {Function} reducer - callback function\n* @param {*} [initialValue] - initial value\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @throws {Error} if not provided an initial value, the array must have at least one element\n* @returns {*} accumulated result\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n* import cadd from '@stdlib/math-base-ops-cadd';\n*\n* var arr = new Complex128Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var z = arr.reduce( cadd );\n* // returns \n*\n* var re = real( z );\n* // returns 6.0\n*\n* var im = imag( z );\n* // returns 6.0\n*/\nsetReadOnly( Complex128Array.prototype, 'reduce', function reduce( reducer, initialValue ) {\n\tvar buf;\n\tvar acc;\n\tvar len;\n\tvar v;\n\tvar i;\n\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( reducer ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', reducer ) );\n\t}\n\tbuf = this._buffer;\n\tlen = this._length;\n\tif ( arguments.length > 1 ) {\n\t\tacc = initialValue;\n\t\ti = 0;\n\t} else {\n\t\tif ( len === 0 ) {\n\t\t\tthrow new Error( 'invalid operation. If not provided an initial value, an array must contain at least one element.' );\n\t\t}\n\t\tacc = getComplex128( buf, 0 );\n\t\ti = 1;\n\t}\n\tfor ( ; i < len; i++ ) {\n\t\tv = getComplex128( buf, i );\n\t\tacc = reducer( acc, v, i, this );\n\t}\n\treturn acc;\n});\n\n/**\n* Reverses an array in-place.\n*\n* @name reverse\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Complex128Array} reversed array\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* var arr = new Complex128Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var out = arr.reverse();\n* // returns \n*\n* var z = out.get( 0 );\n* // returns \n*\n* var re = real( z );\n* // returns 3.0\n*\n* var im = imag( z );\n* // returns 3.0\n*\n* z = out.get( 1 );\n* // returns \n*\n* re = real( z );\n* // returns 2.0\n*\n* im = imag( z );\n* // returns 2.0\n*\n* z = out.get( 2 );\n* // returns \n*\n* re = real( z );\n* // returns 1.0\n*\n* im = imag( z );\n* // returns 1.0\n*/\nsetReadOnly( Complex128Array.prototype, 'reverse', function reverse() {\n\tvar buf;\n\tvar tmp;\n\tvar len;\n\tvar N;\n\tvar i;\n\tvar j;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tlen = this._length;\n\tbuf = this._buffer;\n\tN = floor( len / 2 );\n\tfor ( i = 0; i < N; i++ ) {\n\t\tj = len - i - 1;\n\t\ttmp = buf[ (2*i) ];\n\t\tbuf[ (2*i) ] = buf[ (2*j) ];\n\t\tbuf[ (2*j) ] = tmp;\n\t\ttmp = buf[ (2*i)+1 ];\n\t\tbuf[ (2*i)+1 ] = buf[ (2*j)+1 ];\n\t\tbuf[ (2*j)+1 ] = tmp;\n\t}\n\treturn this;\n});\n\n/**\n* Sets an array element.\n*\n* ## Notes\n*\n* - When provided a typed array, real or complex, we must check whether the source array shares the same buffer as the target array and whether the underlying memory overlaps. In particular, we are concerned with the following scenario:\n*\n* ```text\n* buf: ---------------------\n* src: ---------------------\n* ```\n*\n* In the above, as we copy values from `src`, we will overwrite values in the `src` view, resulting in duplicated values copied into the end of `buf`, which is not intended. Hence, to avoid overwriting source values, we must **copy** source values to a temporary array.\n*\n* In the other overlapping scenario,\n*\n* ```text\n* buf: ---------------------\n* src: ---------------------\n* ```\n*\n* by the time we begin copying into the overlapping region, we are copying from the end of `src`, a non-overlapping region, which means we don't run the risk of copying copied values, rather than the original `src` values as intended.\n*\n* @name set\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {(Collection|Complex|ComplexArray)} value - value(s)\n* @param {NonNegativeInteger} [i=0] - element index at which to start writing values\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be either a complex number, an array-like object, or a complex number array\n* @throws {TypeError} index argument must be a nonnegative integer\n* @throws {RangeError} array-like objects must have a length which is a multiple of two\n* @throws {RangeError} index argument is out-of-bounds\n* @throws {RangeError} target array lacks sufficient storage to accommodate source values\n* @returns {void}\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* var arr = new Complex128Array( 10 );\n*\n* var z = arr.get( 0 );\n* // returns \n*\n* var re = real( z );\n* // returns 0.0\n*\n* var im = imag( z );\n* // returns 0.0\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n*\n* z = arr.get( 0 );\n* // returns \n*\n* re = real( z );\n* // returns 1.0\n*\n* im = imag( z );\n* // returns -1.0\n*/\nsetReadOnly( Complex128Array.prototype, 'set', function set( value ) {\n\t/* eslint-disable no-underscore-dangle */\n\tvar sbuf;\n\tvar idx;\n\tvar buf;\n\tvar tmp;\n\tvar flg;\n\tvar N;\n\tvar v;\n\tvar i;\n\tvar j;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tbuf = this._buffer;\n\tif ( arguments.length > 1 ) {\n\t\tidx = arguments[ 1 ];\n\t\tif ( !isNonNegativeInteger( idx ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Index argument must be a nonnegative integer. Value: `%s`.', idx ) );\n\t\t}\n\t} else {\n\t\tidx = 0;\n\t}\n\tif ( isComplexLike( value ) ) {\n\t\tif ( idx >= this._length ) {\n\t\t\tthrow new RangeError( format( 'invalid argument. Index argument is out-of-bounds. Value: `%u`.', idx ) );\n\t\t}\n\t\tidx *= 2;\n\t\tbuf[ idx ] = real( value );\n\t\tbuf[ idx+1 ] = imag( value );\n\t\treturn;\n\t}\n\tif ( isComplexArray( value ) ) {\n\t\tN = value._length;\n\t\tif ( idx+N > this._length ) {\n\t\t\tthrow new RangeError( 'invalid arguments. Target array lacks sufficient storage to accommodate source values.' );\n\t\t}\n\t\tsbuf = value._buffer;\n\n\t\t// Check for overlapping memory...\n\t\tj = buf.byteOffset + (idx*BYTES_PER_ELEMENT);\n\t\tif (\n\t\t\tsbuf.buffer === buf.buffer &&\n\t\t\t(\n\t\t\t\tsbuf.byteOffset < j &&\n\t\t\t\tsbuf.byteOffset+sbuf.byteLength > j\n\t\t\t)\n\t\t) {\n\t\t\t// We need to copy source values...\n\t\t\ttmp = new Float64Array( sbuf.length );\n\t\t\tfor ( i = 0; i < sbuf.length; i++ ) {\n\t\t\t\ttmp[ i ] = sbuf[ i ];\n\t\t\t}\n\t\t\tsbuf = tmp;\n\t\t}\n\t\tidx *= 2;\n\t\tj = 0;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\tbuf[ idx ] = sbuf[ j ];\n\t\t\tbuf[ idx+1 ] = sbuf[ j+1 ];\n\t\t\tidx += 2; // stride\n\t\t\tj += 2; // stride\n\t\t}\n\t\treturn;\n\t}\n\tif ( isCollection( value ) ) {\n\t\t// Detect whether we've been provided an array of complex numbers...\n\t\tN = value.length;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\tif ( !isComplexLike( value[ i ] ) ) {\n\t\t\t\tflg = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t// If an array does not contain only complex numbers, then we assume interleaved real and imaginary components...\n\t\tif ( flg ) {\n\t\t\tif ( !isEven( N ) ) {\n\t\t\t\tthrow new RangeError( format( 'invalid argument. Array-like object arguments must have a length which is a multiple of two. Length: `%u`.', N ) );\n\t\t\t}\n\t\t\tif ( idx+(N/2) > this._length ) {\n\t\t\t\tthrow new RangeError( 'invalid arguments. Target array lacks sufficient storage to accommodate source values.' );\n\t\t\t}\n\t\t\tsbuf = value;\n\n\t\t\t// Check for overlapping memory...\n\t\t\tj = buf.byteOffset + (idx*BYTES_PER_ELEMENT);\n\t\t\tif (\n\t\t\t\tsbuf.buffer === buf.buffer &&\n\t\t\t\t(\n\t\t\t\t\tsbuf.byteOffset < j &&\n\t\t\t\t\tsbuf.byteOffset+sbuf.byteLength > j\n\t\t\t\t)\n\t\t\t) {\n\t\t\t\t// We need to copy source values...\n\t\t\t\ttmp = new Float64Array( N );\n\t\t\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\t\t\ttmp[ i ] = sbuf[ i ];\n\t\t\t\t}\n\t\t\t\tsbuf = tmp;\n\t\t\t}\n\t\t\tidx *= 2;\n\t\t\tN /= 2;\n\t\t\tj = 0;\n\t\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\t\tbuf[ idx ] = sbuf[ j ];\n\t\t\t\tbuf[ idx+1 ] = sbuf[ j+1 ];\n\t\t\t\tidx += 2; // stride\n\t\t\t\tj += 2; // stride\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\t// If an array contains only complex numbers, then we need to extract real and imaginary components...\n\t\tif ( idx+N > this._length ) {\n\t\t\tthrow new RangeError( 'invalid arguments. Target array lacks sufficient storage to accommodate source values.' );\n\t\t}\n\t\tidx *= 2;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\tv = value[ i ];\n\t\t\tbuf[ idx ] = real( v );\n\t\t\tbuf[ idx+1 ] = imag( v );\n\t\t\tidx += 2; // stride\n\t\t}\n\t\treturn;\n\t}\n\tthrow new TypeError( format( 'invalid argument. First argument must be either a complex number, an array-like object, or a complex number array. Value: `%s`.', value ) );\n\n\t/* eslint-enable no-underscore-dangle */\n});\n\n/**\n* Copies a portion of a typed array to a new typed array.\n*\n* @name slice\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {integer} [start=0] - starting index (inclusive)\n* @param {integer} [end] - ending index (exclusive)\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be an integer\n* @throws {TypeError} second argument must be an integer\n* @returns {Complex128Array} complex number array\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* var arr = new Complex128Array( 5 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n* arr.set( [ 4.0, -4.0 ], 3 );\n* arr.set( [ 5.0, -5.0 ], 4 );\n*\n* var out = arr.slice();\n* // returns \n*\n* var len = out.length;\n* // returns 5\n*\n* var z = out.get( 0 );\n* // returns \n*\n* var re = real( z );\n* // returns 1.0\n*\n* var im = imag( z );\n* // returns -1.0\n*\n* z = out.get( len-1 );\n* // returns \n*\n* re = real( z );\n* // returns 5.0\n*\n* im = imag( z );\n* // returns -5.0\n*\n* out = arr.slice( 1, -2 );\n* // returns \n*\n* len = out.length;\n* // returns 2\n*\n* z = out.get( 0 );\n* // returns \n*\n* re = real( z );\n* // returns 2.0\n*\n* im = imag( z );\n* // returns -2.0\n*\n* z = out.get( len-1 );\n* // returns \n*\n* re = real( z );\n* // returns 3.0\n*\n* im = imag( z );\n* // returns -3.0\n*/\nsetReadOnly( Complex128Array.prototype, 'slice', function slice( start, end ) {\n\tvar outlen;\n\tvar outbuf;\n\tvar out;\n\tvar idx;\n\tvar buf;\n\tvar len;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tbuf = this._buffer;\n\tlen = this._length;\n\tif ( arguments.length === 0 ) {\n\t\tstart = 0;\n\t\tend = len;\n\t} else {\n\t\tif ( !isInteger( start ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. First argument must be an integer. Value: `%s`.', start ) );\n\t\t}\n\t\tif ( start < 0 ) {\n\t\t\tstart += len;\n\t\t\tif ( start < 0 ) {\n\t\t\t\tstart = 0;\n\t\t\t}\n\t\t}\n\t\tif ( arguments.length === 1 ) {\n\t\t\tend = len;\n\t\t} else {\n\t\t\tif ( !isInteger( end ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be an integer. Value: `%s`.', end ) );\n\t\t\t}\n\t\t\tif ( end < 0 ) {\n\t\t\t\tend += len;\n\t\t\t\tif ( end < 0 ) {\n\t\t\t\t\tend = 0;\n\t\t\t\t}\n\t\t\t} else if ( end > len ) {\n\t\t\t\tend = len;\n\t\t\t}\n\t\t}\n\t}\n\tif ( start < end ) {\n\t\toutlen = end - start;\n\t} else {\n\t\toutlen = 0;\n\t}\n\tout = new this.constructor( outlen );\n\toutbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\tfor ( i = 0; i < outlen; i++ ) {\n\t\tidx = 2*(i+start);\n\t\toutbuf[ 2*i ] = buf[ idx ];\n\t\toutbuf[ (2*i)+1 ] = buf[ idx+1 ];\n\t}\n\treturn out;\n});\n\n/**\n* Tests whether at least one element in an array passes a test implemented by a predicate function.\n*\n* @name some\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {boolean} boolean indicating whether at least one element passes a test\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* function predicate( v ) {\n* return ( real( v ) === imag( v ) );\n* }\n*\n* var arr = new Complex128Array( 3 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n*\n* var bool = arr.some( predicate );\n* // returns true\n*/\nsetReadOnly( Complex128Array.prototype, 'some', function some( predicate, thisArg ) {\n\tvar buf;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tif ( predicate.call( thisArg, getComplex128( buf, i ), i, this ) ) {\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n});\n\n/**\n* Creates a new typed array view over the same underlying `ArrayBuffer` and with the same underlying data type as the host array.\n*\n* @name subarray\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {integer} [begin=0] - starting index (inclusive)\n* @param {integer} [end] - ending index (exclusive)\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be an integer\n* @throws {TypeError} second argument must be an integer\n* @returns {Complex64Array} subarray\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* var arr = new Complex128Array( 5 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n* arr.set( [ 4.0, -4.0 ], 3 );\n* arr.set( [ 5.0, -5.0 ], 4 );\n*\n* var subarr = arr.subarray();\n* // returns \n*\n* var len = subarr.length;\n* // returns 5\n*\n* var z = subarr.get( 0 );\n* // returns \n*\n* var re = real( z );\n* // returns 1.0\n*\n* var im = imag( z );\n* // returns -1.0\n*\n* z = subarr.get( len-1 );\n* // returns \n*\n* re = real( z );\n* // returns 5.0\n*\n* im = imag( z );\n* // returns -5.0\n*\n* subarr = arr.subarray( 1, -2 );\n* // returns \n*\n* len = subarr.length;\n* // returns 2\n*\n* z = subarr.get( 0 );\n* // returns \n*\n* re = real( z );\n* // returns 2.0\n*\n* im = imag( z );\n* // returns -2.0\n*\n* z = subarr.get( len-1 );\n* // returns \n*\n* re = real( z );\n* // returns 3.0\n*\n* im = imag( z );\n* // returns -3.0\n*/\nsetReadOnly( Complex128Array.prototype, 'subarray', function subarray( begin, end ) {\n\tvar offset;\n\tvar buf;\n\tvar len;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tbuf = this._buffer;\n\tlen = this._length;\n\tif ( arguments.length === 0 ) {\n\t\tbegin = 0;\n\t\tend = len;\n\t} else {\n\t\tif ( !isInteger( begin ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. First argument must be an integer. Value: `%s`.', begin ) );\n\t\t}\n\t\tif ( begin < 0 ) {\n\t\t\tbegin += len;\n\t\t\tif ( begin < 0 ) {\n\t\t\t\tbegin = 0;\n\t\t\t}\n\t\t}\n\t\tif ( arguments.length === 1 ) {\n\t\t\tend = len;\n\t\t} else {\n\t\t\tif ( !isInteger( end ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be an integer. Value: `%s`.', end ) );\n\t\t\t}\n\t\t\tif ( end < 0 ) {\n\t\t\t\tend += len;\n\t\t\t\tif ( end < 0 ) {\n\t\t\t\t\tend = 0;\n\t\t\t\t}\n\t\t\t} else if ( end > len ) {\n\t\t\t\tend = len;\n\t\t\t}\n\t\t}\n\t}\n\tif ( begin >= len ) {\n\t\tlen = 0;\n\t\toffset = buf.byteLength;\n\t} else if ( begin >= end ) {\n\t\tlen = 0;\n\t\toffset = buf.byteOffset + ( begin*BYTES_PER_ELEMENT );\n\t} else {\n\t\tlen = end - begin;\n\t\toffset = buf.byteOffset + ( begin*BYTES_PER_ELEMENT );\n\t}\n\treturn new this.constructor( buf.buffer, offset, ( len < 0 ) ? 0 : len );\n});\n\n/**\n* Returns a new typed array containing the elements in reversed order.\n*\n* @name toReversed\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Complex128Array} reversed array\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* var arr = new Complex128Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var out = arr.toReversed();\n* // returns \n*\n* var z = out.get( 0 );\n* // returns \n*\n* var re = real( z );\n* // returns 3.0\n*\n* var im = imag( z );\n* // returns 3.0\n*\n* z = out.get( 1 );\n* // returns \n*\n* re = real( z );\n* // returns 2.0\n*\n* im = imag( z );\n* // returns 2.0\n*\n* z = out.get( 2 );\n* // returns \n*\n* re = real( z );\n* // returns 1.0\n*\n* im = imag( z );\n* // returns 1.0\n*/\nsetReadOnly( Complex128Array.prototype, 'toReversed', function toReversed() {\n\tvar outbuf;\n\tvar out;\n\tvar len;\n\tvar buf;\n\tvar i;\n\tvar j;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tlen = this._length;\n\tout = new this.constructor( len );\n\tbuf = this._buffer;\n\toutbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\tfor ( i = 0; i < len; i++ ) {\n\t\tj = len - i - 1;\n\t\toutbuf[ (2*i) ] = buf[ (2*j) ];\n\t\toutbuf[ (2*i)+1 ] = buf[ (2*j)+1 ];\n\t}\n\treturn out;\n});\n\n/**\n* Serializes an array as a string.\n*\n* @name toString\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @throws {TypeError} `this` must be a complex number array\n* @returns {string} string representation\n*\n* @example\n* var arr = new Complex128Array( 2 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n*\n* var str = arr.toString();\n* // returns '1 + 1i,2 + 2i'\n*/\nsetReadOnly( Complex128Array.prototype, 'toString', function toString() {\n\tvar out;\n\tvar buf;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tout = [];\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tout.push( getComplex128( buf, i ).toString() );\n\t}\n\treturn out.join( ',' );\n});\n\n/**\n* Returns a new typed array with the element at a provided index replaced with a provided value.\n*\n* @name with\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {integer} index - element index\n* @param {ComplexLike} value - new value\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be an integer\n* @throws {RangeError} index argument is out-of-bounds\n* @throws {TypeError} second argument must be a complex number\n* @returns {Complex128Array} new typed array\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n* import Complex128 from '@stdlib/complex-float64';\n*\n* var arr = new Complex128Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var out = arr.with( 0, new Complex128( 4.0, 4.0 ) );\n* // returns \n*\n* var z = out.get( 0 );\n* // returns \n*\n* var re = real( z );\n* // returns 4.0\n*\n* var im = imag( z );\n* // returns 4.0\n*/\nsetReadOnly( Complex128Array.prototype, 'with', function copyWith( index, value ) {\n\tvar buf;\n\tvar out;\n\tvar len;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isInteger( index ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be an integer. Value: `%s`.', index ) );\n\t}\n\tlen = this._length;\n\tif ( index < 0 ) {\n\t\tindex += len;\n\t}\n\tif ( index < 0 || index >= len ) {\n\t\tthrow new RangeError( format( 'invalid argument. Index argument is out-of-bounds. Value: `%s`.', index ) );\n\t}\n\tif ( !isComplexLike( value ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Second argument must be a complex number. Value: `%s`.', value ) );\n\t}\n\tout = new this.constructor( this._buffer );\n\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\tbuf[ 2*index ] = real( value );\n\tbuf[ (2*index)+1 ] = imag( value );\n\treturn out;\n});\n\n\n// EXPORTS //\n\nexport default Complex128Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport real from '@stdlib/complex-real';\nimport imag from '@stdlib/complex-imag';\n\n\n// MAIN //\n\n/**\n* Returns a strided array of real and imaginary components.\n*\n* @private\n* @param {Float64Array} buf - output array\n* @param {Array} arr - array containing complex numbers\n* @returns {(Float64Array|null)} output array or null\n*/\nfunction fromArray( buf, arr ) {\n\tvar len;\n\tvar v;\n\tvar i;\n\tvar j;\n\n\tlen = arr.length;\n\tj = 0;\n\tfor ( i = 0; i < len; i++ ) {\n\t\tv = arr[ i ];\n\t\tif ( !isComplexLike( v ) ) {\n\t\t\treturn null;\n\t\t}\n\t\tbuf[ j ] = real( v );\n\t\tbuf[ j+1 ] = imag( v );\n\t\tj += 2; // stride\n\t}\n\treturn buf;\n}\n\n\n// EXPORTS //\n\nexport default fromArray;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isArrayLikeObject from '@stdlib/assert-is-array-like-object';\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport format from '@stdlib/string-format';\nimport real from '@stdlib/complex-real';\nimport imag from '@stdlib/complex-imag';\n\n\n// MAIN //\n\n/**\n* Returns an array of iterated values.\n*\n* @private\n* @param {Object} it - iterator\n* @param {Function} clbk - callback to invoke for each iterated value\n* @param {*} thisArg - invocation context\n* @returns {(Array|TypeError)} array or an error\n*/\nfunction fromIteratorMap( it, clbk, thisArg ) {\n\tvar out;\n\tvar v;\n\tvar z;\n\tvar i;\n\n\tout = [];\n\ti = -1;\n\twhile ( true ) {\n\t\tv = it.next();\n\t\tif ( v.done ) {\n\t\t\tbreak;\n\t\t}\n\t\ti += 1;\n\t\tz = clbk.call( thisArg, v.value, i );\n\t\tif ( isArrayLikeObject( z ) && z.length >= 2 ) {\n\t\t\tout.push( z[ 0 ], z[ 1 ] );\n\t\t} else if ( isComplexLike( z ) ) {\n\t\t\tout.push( real( z ), imag( z ) );\n\t\t} else {\n\t\t\treturn new TypeError( format( 'invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', z ) );\n\t\t}\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default fromIteratorMap;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport Float64Array from '@stdlib/array-float64';\nimport Float32Array from '@stdlib/array-float32';\nimport Int16Array from '@stdlib/array-int16';\nimport Int32Array from '@stdlib/array-int32';\nimport Int8Array from '@stdlib/array-int8';\nimport Uint16Array from '@stdlib/array-uint16';\nimport Uint32Array from '@stdlib/array-uint32';\nimport Uint8Array from '@stdlib/array-uint8';\nimport Uint8ClampedArray from '@stdlib/array-uint8c';\nimport Complex64Array from '@stdlib/array-complex64';\nimport Complex128Array from '@stdlib/array-complex128';\n\n\n// MAIN //\n\n// Mapping from data types to constructors...\nvar ctors = {\n\t'float64': Float64Array,\n\t'float32': Float32Array,\n\t'generic': Array, // TODO: replace with `stdlib` pkg\n\t'int16': Int16Array,\n\t'int32': Int32Array,\n\t'int8': Int8Array,\n\t'uint16': Uint16Array,\n\t'uint32': Uint32Array,\n\t'uint8': Uint8Array,\n\t'uint8c': Uint8ClampedArray,\n\t'complex64': Complex64Array,\n\t'complex128': Complex128Array\n};\n\n\n// EXPORTS //\n\nexport default ctors;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Returns default array settings.\n*\n* @returns {Object} defaults\n*\n* @example\n* var o = defaults();\n* // returns {...}\n*/\nfunction defaults() {\n\treturn {\n\t\t// Data types:\n\t\t'dtypes': {\n\t\t\t'default': 'float64',\n\t\t\t'numeric': 'float64',\n\t\t\t'real': 'float64',\n\t\t\t'floating_point': 'float64',\n\t\t\t'real_floating_point': 'float64',\n\t\t\t'complex_floating_point': 'complex128',\n\t\t\t'boolean': 'bool',\n\t\t\t'integer': 'int32',\n\t\t\t'signed_integer': 'int32',\n\t\t\t'unsigned_integer': 'uint32'\n\t\t}\n\t};\n}\n\n\n// EXPORTS //\n\nexport default defaults;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport defaults from './main.js';\n\n\n// VARIABLES //\n\nvar DEFAULTS = defaults();\nvar HASH = {\n\t'dtypes.default': DEFAULTS.dtypes.default,\n\t'dtypes.numeric': DEFAULTS.dtypes.numeric,\n\t'dtypes.real': DEFAULTS.dtypes.real,\n\t'dtypes.floating_point': DEFAULTS.dtypes.floating_point,\n\t'dtypes.real_floating_point': DEFAULTS.dtypes.real_floating_point,\n\t'dtypes.complex_floating_point': DEFAULTS.dtypes.complex_floating_point,\n\t'dtypes.boolean': DEFAULTS.dtypes.boolean,\n\t'dtypes.integer': DEFAULTS.dtypes.integer,\n\t'dtypes.signed_integer': DEFAULTS.dtypes.signed_integer,\n\t'dtypes.unsigned_integer': DEFAULTS.dtypes.unsigned_integer\n};\n\n\n// MAIN //\n\n/**\n* Returns a default array setting.\n*\n* @param {string} name - setting name\n* @returns {*} default setting or null\n*\n* @example\n* var v = get( 'dtypes.default' );\n* // returns \n*/\nfunction get( name ) {\n\tvar v = HASH[ name ];\n\treturn ( v === void 0 ) ? null : v;\n}\n\n\n// EXPORTS //\n\nexport default get;\n","/**\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* Return default array settings.\n*\n* @module @stdlib/array-defaults\n*\n* @example\n* import defaults from '@stdlib/array-defaults';\n*\n* var o = defaults();\n* // returns {...}\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport get from './get.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'get', get );\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isNonNegativeInteger } from '@stdlib/assert-is-nonnegative-integer';\nimport ctors from '@stdlib/array-ctors';\nimport gzeros from '@stdlib/array-base-zeros';\nimport defaults from '@stdlib/array-defaults';\nimport format from '@stdlib/string-format';\n\n\n// VARIABLES //\n\nvar DEFAULT_DTYPE = defaults.get( 'dtypes.default' );\n\n\n// MAIN //\n\n/**\n* Creates a zero-filled array having a specified length.\n*\n* @param {NonNegativeInteger} length - array length\n* @param {string} [dtype=\"float64\"] - data type\n* @throws {TypeError} first argument must be a nonnegative integer\n* @throws {TypeError} second argument must be a recognized data type\n* @returns {(TypedArray|Array|ComplexArray)} array or typed array\n*\n* @example\n* var arr = zeros( 2 );\n* // returns [ 0.0, 0.0 ]\n*\n* @example\n* var arr = zeros( 2, 'float32' );\n* // returns [ 0.0, 0.0 ]\n*/\nfunction zeros( length ) {\n\tvar dtype;\n\tvar ctor;\n\tif ( !isNonNegativeInteger( length ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a nonnegative integer. Value: `%s`.', length ) );\n\t}\n\tif ( arguments.length > 1 ) {\n\t\tdtype = arguments[ 1 ];\n\t} else {\n\t\tdtype = DEFAULT_DTYPE;\n\t}\n\tif ( dtype === 'generic' ) {\n\t\treturn gzeros( length );\n\t}\n\tctor = ctors( dtype );\n\tif ( ctor === null ) {\n\t\tthrow new TypeError( format( 'invalid argument. Second argument must be a recognized data type. Value: `%s`.', dtype ) );\n\t}\n\treturn new ctor( length ); // WARNING: we assume that, apart from 'generic', the constructors for supported array data types are zero-filled by default\n}\n\n\n// EXPORTS //\n\nexport default zeros;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Returns a filled \"generic\" array.\n*\n* @param {*} value - fill value\n* @param {NonNegativeInteger} len - array length\n* @returns {Array} filled array\n*\n* @example\n* var out = filled( 0.0, 3 );\n* // returns [ 0.0, 0.0, 0.0 ]\n*\n* @example\n* var out = filled( 'beep', 3 );\n* // returns [ 'beep', 'beep', 'beep' ]\n*/\nfunction filled( value, len ) {\n\tvar arr;\n\tvar i;\n\n\t// Manually push elements in order to ensure \"fast\" elements...\n\tarr = [];\n\tfor ( i = 0; i < len; i++ ) {\n\t\tarr.push( value );\n\t}\n\treturn arr;\n}\n\n\n// EXPORTS //\n\nexport default filled;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport filled from '@stdlib/array-base-filled';\n\n\n// MAIN //\n\n/**\n* Returns a zero-filled \"generic\" array.\n*\n* @param {NonNegativeInteger} len - array length\n* @returns {Array} output array\n*\n* @example\n* var out = zeros( 3 );\n* // returns [ 0.0, 0.0, 0.0 ]\n*/\nfunction zeros( len ) {\n\treturn filled( 0.0, len );\n}\n\n\n// EXPORTS //\n\nexport default zeros;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport table from './ctors.js';\n\n\n// MAIN //\n\n/**\n* Returns an array constructor.\n*\n* @param {string} dtype - data type\n* @returns {(Function|null)} constructor or null\n*\n* @example\n* var ctor = ctors( 'float64' );\n* // returns \n*\n* @example\n* var ctor = ctors( 'float' );\n* // returns null\n*/\nfunction ctors( dtype ) {\n\treturn table[ dtype ] || null;\n}\n\n\n// EXPORTS //\n\nexport default ctors;\n","/**\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// MODULES //\n\nimport zeros from '@stdlib/array-zeros';\n\n\n// MAIN //\n\n/**\n* Creates an uninitialized array having a specified length.\n*\n* @private\n* @param {NonNegativeInteger} length - array length\n* @param {string} [dtype=\"float64\"] - data type\n* @throws {TypeError} first argument must be a nonnegative integer\n* @throws {TypeError} second argument must be a recognized data type\n* @returns {(TypedArray|Array|ComplexArray)} array or typed array\n*\n* @example\n* var arr = empty( 2 );\n* // returns \n*\n* @example\n* var arr = empty( 2, 'float32' );\n* // returns \n*/\nfunction empty( length ) {\n\tif ( arguments.length > 1 ) {\n\t\treturn zeros( length, arguments[ 1 ] );\n\t}\n\treturn zeros( length );\n}\n\n\n// EXPORTS //\n\nexport default empty;\n"],"names":["main","Object","defineProperty","isNumber","value","zeros","n","i","out","zeroPad","str","width","right","negative","pad","length","startsWithMinus","substr","lowercase","String","prototype","toLowerCase","uppercase","toUpperCase","formatInteger","token","base","specifier","arg","parseInt","isFinite","Error","toString","precision","padRight","sign","alternate","call","charAt","abs","Math","replace","RE_EXP_POS_DIGITS","RE_EXP_NEG_DIGITS","RE_ONLY_DIGITS","RE_DIGITS_BEFORE_EXP","RE_TRAILING_PERIOD_ZERO","RE_PERIOD_ZERO_EXP","RE_ZERO_BEFORE_EXP","formatDouble","digits","f","parseFloat","toExponential","toFixed","toPrecision","spaces","fromCharCode","isArray","Array","isnan","initialize","flags","mapping","formatInterpolate","tokens","hasPeriod","flag","num","pos","j","TypeError","padZeros","indexOf","arguments","maxWidth","substring","RE","parse","match","formatTokenize","content","prev","exec","slice","lastIndex","push","format","args","tokenize","interpolate","apply","objectProtoype","toStr","defineGetter","__defineGetter__","defineSetter","__defineSetter__","lookupGetter","__lookupGetter__","lookupSetter","__lookupSetter__","err","hasDefinePropertySupport","builtin","obj","prop","descriptor","hasValue","hasGet","hasSet","__proto__","get","set","defineProperty$1","setNonEnumerableReadOnly","configurable","enumerable","writable","FLG","Symbol","hasToStringTagSupport","toStringTag","has","hasOwnProperty","hasOwnProp","property","Sym","toStrTag","nativeClass","hasToStringTag","v","isOwn","tag","main$b","Number","test","isPrimitive","isObject","setReadOnly","FLOAT64_PINF","POSITIVE_INFINITY","FLOAT64_NINF","NEGATIVE_INFINITY","floor","isInteger","x","PINF","NINF","isInt","valueOf","isNonNegativeInteger","hasFloat64Array","Float64Array","ctor","Float64Array$1","bool","arr","GlobalFloat64Array","NaN","hasFloat64ArraySupport","hasFloat32Array","Float32Array","Float32Array$1","GlobalFloat32Array","hasFloat32ArraySupport","hasInt16Array","Int16Array","Int16Array$1","GlobalInt16Array","INT16_MAX","hasInt16ArraySupport","hasInt32Array","Int32Array","Int32Array$1","GlobalInt32Array","INT32_MAX","hasInt32ArraySupport","hasInt8Array","Int8Array","Int8Array$1","GlobalInt8Array","INT8_MAX","hasInt8ArraySupport","hasUint16Array","Uint16Array","Uint16Array$1","GlobalUint16Array","UINT16_MAX","hasUint16ArraySupport","hasUint32Array","Uint32Array","Uint32Array$1","GlobalUint32Array","UINT32_MAX","hasUint32ArraySupport","hasUint8Array","Uint8Array","Uint8Array$1","GlobalUint8Array","UINT8_MAX","hasUint8ArraySupport","hasUint8ClampedArray","Uint8ClampedArray","Uint8ClampedArray$1","GlobalUint8ClampedArray","hasUint8ClampedArraySupport","MAX_ARRAY_LENGTH","isArrayLikeObject","MAX_LENGTH","MAX_TYPED_ARRAY_LENGTH","isCollection","hasArrayBuffer","ArrayBuffer","isArrayBuffer","main$1","isString","isBoolean","Bool","Boolean","self","window","global","globalThis","root","codegen","Function","GlobalThis","Self","Win","Global","getGlobal","nodeList","document","childNodes","typedarray","reFunctionName","RE_FUNCTION_NAME","isObjectLike","constructorName","name","constructor","_isBuffer","isBuffer","REGEXP","predicate","len","arrayfun","ctorName","type","isFunction","typeOf","Complex128","real","imag","this","re","im","fround","FLOAT32_VIEW","float64ToFloat32$1","Complex64","float64ToFloat32","isComplexLike","isEven","BYTES_PER_ELEMENT","isComplex64Array","isComplex128Array","hasIteratorSymbolSupport","iterator","IteratorSymbol","setNonEnumerableReadOnlyAccessor","getter","realf","z","imagf","reinterpret","offset","buffer","byteOffset","GETTERS","float64","idx","float32","int32","int16","int8","uint32","uint16","uint8","uint8c","generic","default","dtype","complex128","complex64","fromIterator","it","next","done","HAS_ITERATOR_SYMBOL","isComplexArray","Complex64Array","_length","_buffer","isComplexArrayConstructor","getComplex64","buf","nargs","fromArray","RangeError","reinterpret64","reinterpret128","byteLength","ITERATOR_SYMBOL","src","thisArg","clbk","tmp","flg","accessorGetter","fromIteratorMap","setReadOnlyAccessor","target","start","copyWithin","iter","entries","end","fcn","searchElement","fromIndex","separator","sep","join","outbuf","reducer","initialValue","acc","N","sbuf","outlen","begin","index","Complex128Array","getComplex128","ctors","defaults","dtypes","numeric","floating_point","real_floating_point","complex_floating_point","boolean","integer","signed_integer","unsigned_integer","DEFAULTS","HASH","DEFAULT_DTYPE","filled","table","empty"],"mappings":";;AAsBA,IAAIA,EAA0C,mBAA1BC,OAAOC,eAAkCD,OAAOC,eAAiB,KCiCrF,IAAIA,EAAiBD,OAAOC,eCjB5B,SAASC,EAAUC,GAClB,MAA0B,iBAAVA,CACjB,CCAA,SAASC,EAAOC,GACf,IACIC,EADAC,EAAM,GAEV,IAAMD,EAAI,EAAGA,EAAID,EAAGC,IACnBC,GAAO,IAER,OAAOA,CACR,CAcA,SAASC,EAASC,EAAKC,EAAOC,GAC7B,I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AAST,OAAOE,eACzC,6BAA8BO,GAAST,OAAOG,oBAC9C,gCAAiCM,GAAST,OAAOI,uBACjD,iBAAkBK,GAAST,OAAOK,QAClC,iBAAkBI,GAAST,OAAOM,QAClC,wBAAyBG,GAAST,OAAOO,eACzC,0BAA2BE,GAAST,OAAOQ,kBCG5CzN,EAAA3I,GAAA,ODaA,SAAcgP,GACb,IAAI7G,EAAImO,GAAMtH,GACd,YAAe,IAAN7G,EAAiB,KAAOA,CAClC,IE1BA,IAAIoO,GAAgBZ,GAAS3O,IAAK,kBAsBlC,SAAS3G,GAAOU,GACf,IAAIsR,EACA3I,EACJ,IAAMH,GAAsBxI,GAC3B,MAAM,IAAIwD,UAAWgB,EAAQ,+EAAgFxE,IAO9G,GAAe,aAJdsR,EADI3N,UAAU3D,OAAS,EACf2D,UAAW,GAEX6R,IAGR,OC5BF,SAAiBnW,EAAOkP,GACvB,IAAIzF,EACAtJ,EAIJ,IADAsJ,EAAM,GACAtJ,EAAI,EAAGA,EAAI+O,EAAK/O,IACrBsJ,EAAIvE,KAAMlF,GAEX,OAAOyJ,CACR,CCTQ2M,CAAQ,EF2BCzV,GAGhB,GADA2I,EG1BD,SAAgB2I,GACf,OAAOoE,GAAOpE,IAAW,IAC1B,CHwBQqD,CAAOrD,GACA,OAAT3I,EACJ,MAAM,IAAInF,UAAWgB,EAAQ,iFAAkF8M,IAEhH,OAAO,IAAI3I,EAAM3I,EAClB,CI3BA,SAAS2V,GAAO3V,GACf,OAAK2D,UAAU3D,OAAS,EAChBV,GAAOU,EAAQ2D,UAAW,IAE3BrE,GAAOU,EACf","x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195]} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index 3284db1..0000000 --- a/stats.html +++ /dev/null @@ -1,4842 +0,0 @@ - - - - - - - - Rollup Visualizer - - - -
- - - - - From c06218291fbbd81b4c7fa8c7d66859dd197d7221 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Thu, 1 Aug 2024 13:15:25 +0000 Subject: [PATCH 72/75] Auto-generated commit --- .editorconfig | 181 - .eslintrc.js | 1 - .gitattributes | 66 - .github/.keepalive | 1 - .github/PULL_REQUEST_TEMPLATE.md | 7 - .github/workflows/benchmark.yml | 64 - .github/workflows/cancel.yml | 57 - .github/workflows/close_pull_requests.yml | 54 - .github/workflows/examples.yml | 64 - .github/workflows/npm_downloads.yml | 112 - .github/workflows/productionize.yml | 794 ---- .github/workflows/publish.yml | 252 -- .github/workflows/test.yml | 99 - .github/workflows/test_bundles.yml | 186 - .github/workflows/test_coverage.yml | 133 - .github/workflows/test_install.yml | 85 - .gitignore | 190 - .npmignore | 229 - .npmrc | 31 - CHANGELOG.md | 88 - CITATION.cff | 30 - CODE_OF_CONDUCT.md | 3 - CONTRIBUTING.md | 3 - Makefile | 534 --- README.md | 38 +- SECURITY.md | 5 - benchmark/benchmark.js | 282 -- benchmark/benchmark.length.bool.js | 93 - benchmark/benchmark.length.complex128.js | 93 - benchmark/benchmark.length.complex64.js | 93 - benchmark/benchmark.length.float32.js | 93 - benchmark/benchmark.length.float64.js | 93 - benchmark/benchmark.length.generic.js | 93 - benchmark/benchmark.length.int16.js | 93 - benchmark/benchmark.length.int32.js | 93 - benchmark/benchmark.length.int8.js | 93 - benchmark/benchmark.length.uint16.js | 93 - benchmark/benchmark.length.uint32.js | 93 - benchmark/benchmark.length.uint8.js | 93 - benchmark/benchmark.length.uint8c.js | 93 - branches.md | 56 - dist/index.d.ts | 3 - dist/index.js | 9 - dist/index.js.map | 7 - docs/repl.txt | 35 - docs/types/test.ts | 78 - examples/index.js | 33 - lib/index.js | 58 - lib/is_buffer_uint8array.js | 47 - lib/main.js | 107 - lib/polyfill.js | 56 - docs/types/index.d.ts => mod.d.ts | 2 +- mod.js | 4 + mod.js.map | 1 + package.json | 84 +- stats.html | 4842 +++++++++++++++++++++ test/dist/test.js | 33 - test/test.js | 60 - test/test.main.js | 285 -- test/test.polyfill.js | 340 -- 60 files changed, 4860 insertions(+), 6078 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 benchmark/benchmark.js delete mode 100644 benchmark/benchmark.length.bool.js delete mode 100644 benchmark/benchmark.length.complex128.js delete mode 100644 benchmark/benchmark.length.complex64.js delete mode 100644 benchmark/benchmark.length.float32.js delete mode 100644 benchmark/benchmark.length.float64.js delete mode 100644 benchmark/benchmark.length.generic.js delete mode 100644 benchmark/benchmark.length.int16.js delete mode 100644 benchmark/benchmark.length.int32.js delete mode 100644 benchmark/benchmark.length.int8.js delete mode 100644 benchmark/benchmark.length.uint16.js delete mode 100644 benchmark/benchmark.length.uint32.js delete mode 100644 benchmark/benchmark.length.uint8.js delete mode 100644 benchmark/benchmark.length.uint8c.js 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/repl.txt delete mode 100644 docs/types/test.ts delete mode 100644 examples/index.js delete mode 100644 lib/index.js delete mode 100644 lib/is_buffer_uint8array.js delete mode 100644 lib/main.js delete mode 100644 lib/polyfill.js rename docs/types/index.d.ts => mod.d.ts (94%) create mode 100644 mod.js create mode 100644 mod.js.map create mode 100644 stats.html delete mode 100644 test/dist/test.js delete mode 100644 test/test.js delete mode 100644 test/test.main.js delete mode 100644 test/test.polyfill.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/.keepalive b/.github/.keepalive deleted file mode 100644 index 091708e..0000000 --- a/.github/.keepalive +++ /dev/null @@ -1 +0,0 @@ -2024-08-01T06:04:20.853Z diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index 96f81a8..0000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,7 +0,0 @@ - - -We are excited about your pull request, but unfortunately we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/empty) 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 ddb353e..0000000 --- a/.github/workflows/close_pull_requests.yml +++ /dev/null @@ -1,54 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: close_pull_requests - -# Workflow triggers: -on: - pull_request_target: - types: [opened] - -# Workflow jobs: -jobs: - - # Define job to close all pull requests: - run: - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Close pull request - - name: 'Close pull request' - # Pin action to full length commit SHA corresponding to v3.1.2 - uses: superbrothers/close-pull-request@9c18513d320d7b2c7185fb93396d0c664d5d8448 - with: - comment: | - Thank you for submitting a pull request. :raised_hands: - - We greatly appreciate your willingness to submit a contribution. However, we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). - - We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/empty) 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 8376c30..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: '49 1 * * 5' - - # 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 + + + + 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 8e62cb8..0000000 --- a/test/test.js +++ /dev/null @@ -1,60 +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 proxyquire = require( 'proxyquire' ); -var main = require( './../lib/main.js' ); -var polyfill = require( './../lib/polyfill.js' ); -var empty = require( './../lib' ); - - -// TESTS // - -tape( 'main export is a function', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof empty, 'function', 'main export is a function' ); - t.end(); -}); - -tape( 'if an environment supports Node.js buffer instances inheriting from Uint8Array, the main export supports returning arrays having uninitialized memory', function test( t ) { - var empty = proxyquire( './../lib', { - './is_buffer_uint8array.js': mock - }); - t.strictEqual( empty, main, 'returns expected value' ); - t.end(); - - function mock() { - return true; - } -}); - -tape( 'if an environment does not support Node.js buffer instances inheriting from Uint8Array, the main export supports returning zero-filled arrays', function test( t ) { - var empty = proxyquire( './../lib', { - './is_buffer_uint8array.js': mock - }); - t.strictEqual( empty, polyfill, 'returns expected value' ); - t.end(); - - function mock() { - return false; - } -}); diff --git a/test/test.main.js b/test/test.main.js deleted file mode 100644 index 73fce24..0000000 --- a/test/test.main.js +++ /dev/null @@ -1,285 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2024 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR 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 Float64Array = require( '@stdlib/array-float64' ); -var Float32Array = require( '@stdlib/array-float32' ); -var Int32Array = require( '@stdlib/array-int32' ); -var Uint32Array = require( '@stdlib/array-uint32' ); -var Int16Array = require( '@stdlib/array-int16' ); -var Uint16Array = require( '@stdlib/array-uint16' ); -var Int8Array = require( '@stdlib/array-int8' ); -var Uint8Array = require( '@stdlib/array-uint8' ); -var Uint8ClampedArray = require( '@stdlib/array-uint8c' ); -var Complex64Array = require( '@stdlib/array-complex64' ); -var Complex128Array = require( '@stdlib/array-complex128' ); -var BooleanArray = require( '@stdlib/array-bool' ); -var instanceOf = require( '@stdlib/assert-instance-of' ); -var empty = require( './../lib/main.js' ); - - -// TESTS // - -tape( 'main export is a function', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof empty, 'function', 'main export is a function' ); - t.end(); -}); - -tape( 'the function throws an error if provided a value other than a nonnegative integer for the first argument', function test( t ) { - var values; - var i; - - values = [ - '5', - -3, - 3.14, - NaN, - true, - false, - null, - void 0, - [], - {}, - function noop() {} - ]; - - for ( i = 0; i < values.length; i++ ) { - t.throws( badValue( values[i] ), TypeError, 'throws an error when provided '+values[i] ); - } - t.end(); - - function badValue( value ) { - return function badValue() { - empty( value ); - }; - } -}); - -tape( 'the function throws an error if provided a value other than a nonnegative integer for the first argument (dtype)', function test( t ) { - var values; - var i; - - values = [ - '5', - -3, - 3.14, - NaN, - true, - false, - null, - void 0, - [], - {}, - function noop() {} - ]; - - for ( i = 0; i < values.length; i++ ) { - t.throws( badValue( values[i] ), TypeError, 'throws an error when provided '+values[i] ); - } - t.end(); - - function badValue( value ) { - return function badValue() { - empty( value, 'float32' ); - }; - } -}); - -tape( 'the function throws an error if provided an unrecognized data type', function test( t ) { - var values; - var i; - - values = [ - '5', - 'beep', - 'empty', - 'Int32', - 'Uint32', - 'Int16', - 'Uint16', - 'Int8', - 'Uint8', - 'Uint8c', - 'uint8_clamped', - 'Float64', - 'Float32', - 'FLOAT64', - 'FLOAT32', - 'GENERIC' - ]; - - for ( i = 0; i < values.length; i++ ) { - t.throws( badValue( values[i] ), TypeError, 'throws an error when provided '+values[i] ); - } - t.end(); - - function badValue( value ) { - return function badValue() { - empty( 10, value ); - }; - } -}); - -tape( 'the function returns an empty array (default)', function test( t ) { - var arr; - - arr = empty( 5 ); - t.strictEqual( instanceOf( arr, Float64Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=float64)', function test( t ) { - var arr; - - arr = empty( 5, 'float64' ); - t.strictEqual( instanceOf( arr, Float64Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=float32)', function test( t ) { - var arr; - - arr = empty( 5, 'float32' ); - t.strictEqual( instanceOf( arr, Float32Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=bool)', function test( t ) { - var arr; - - arr = empty( 5, 'bool' ); - t.strictEqual( instanceOf( arr, BooleanArray ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=complex128)', function test( t ) { - var arr; - - arr = empty( 5, 'complex128' ); - t.strictEqual( instanceOf( arr, Complex128Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=complex64)', function test( t ) { - var arr; - - arr = empty( 5, 'complex64' ); - t.strictEqual( instanceOf( arr, Complex64Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=int32)', function test( t ) { - var arr; - - arr = empty( 5, 'int32' ); - t.strictEqual( instanceOf( arr, Int32Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=uint32)', function test( t ) { - var arr; - - arr = empty( 5, 'uint32' ); - t.strictEqual( instanceOf( arr, Uint32Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=int16)', function test( t ) { - var arr; - - arr = empty( 5, 'int16' ); - t.strictEqual( instanceOf( arr, Int16Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=uint16)', function test( t ) { - var arr; - - arr = empty( 5, 'uint16' ); - t.strictEqual( instanceOf( arr, Uint16Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=int8)', function test( t ) { - var arr; - - arr = empty( 5, 'int8' ); - t.strictEqual( instanceOf( arr, Int8Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=uint8)', function test( t ) { - var arr; - - arr = empty( 5, 'uint8' ); - t.strictEqual( instanceOf( arr, Uint8Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=uint8c)', function test( t ) { - var arr; - - arr = empty( 5, 'uint8c' ); - t.strictEqual( instanceOf( arr, Uint8ClampedArray ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=generic)', function test( t ) { - var expected; - var arr; - - expected = [ 0, 0, 0, 0, 0 ]; - - arr = empty( 5, 'generic' ); - t.strictEqual( instanceOf( arr, Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); diff --git a/test/test.polyfill.js b/test/test.polyfill.js deleted file mode 100644 index 4fc9472..0000000 --- a/test/test.polyfill.js +++ /dev/null @@ -1,340 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2024 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR 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 Float64Array = require( '@stdlib/array-float64' ); -var Float32Array = require( '@stdlib/array-float32' ); -var Int32Array = require( '@stdlib/array-int32' ); -var Uint32Array = require( '@stdlib/array-uint32' ); -var Int16Array = require( '@stdlib/array-int16' ); -var Uint16Array = require( '@stdlib/array-uint16' ); -var Int8Array = require( '@stdlib/array-int8' ); -var Uint8Array = require( '@stdlib/array-uint8' ); -var Uint8ClampedArray = require( '@stdlib/array-uint8c' ); -var Complex64Array = require( '@stdlib/array-complex64' ); -var Complex128Array = require( '@stdlib/array-complex128' ); -var BooleanArray = require( '@stdlib/array-bool' ); -var reinterpret64 = require( '@stdlib/strided-base-reinterpret-complex64' ); -var reinterpret128 = require( '@stdlib/strided-base-reinterpret-complex128' ); -var reinterpretBoolean = require( '@stdlib/strided-base-reinterpret-boolean' ); -var instanceOf = require( '@stdlib/assert-instance-of' ); -var empty = require( './../lib/polyfill.js' ); - - -// TESTS // - -tape( 'main export is a function', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof empty, 'function', 'main export is a function' ); - t.end(); -}); - -tape( 'the function throws an error if provided a value other than a nonnegative integer for the first argument', function test( t ) { - var values; - var i; - - values = [ - '5', - -3, - 3.14, - NaN, - true, - false, - null, - void 0, - [], - {}, - function noop() {} - ]; - - for ( i = 0; i < values.length; i++ ) { - t.throws( badValue( values[i] ), TypeError, 'throws an error when provided '+values[i] ); - } - t.end(); - - function badValue( value ) { - return function badValue() { - empty( value ); - }; - } -}); - -tape( 'the function throws an error if provided a value other than a nonnegative integer for the first argument (dtype)', function test( t ) { - var values; - var i; - - values = [ - '5', - -3, - 3.14, - NaN, - true, - false, - null, - void 0, - [], - {}, - function noop() {} - ]; - - for ( i = 0; i < values.length; i++ ) { - t.throws( badValue( values[i] ), TypeError, 'throws an error when provided '+values[i] ); - } - t.end(); - - function badValue( value ) { - return function badValue() { - empty( value, 'float32' ); - }; - } -}); - -tape( 'the function throws an error if provided an unrecognized data type', function test( t ) { - var values; - var i; - - values = [ - '5', - 'beep', - 'empty', - 'Int32', - 'Uint32', - 'Int16', - 'Uint16', - 'Int8', - 'Uint8', - 'Uint8c', - 'uint8_clamped', - 'Float64', - 'Float32', - 'FLOAT64', - 'FLOAT32', - 'GENERIC' - ]; - - for ( i = 0; i < values.length; i++ ) { - t.throws( badValue( values[i] ), TypeError, 'throws an error when provided '+values[i] ); - } - t.end(); - - function badValue( value ) { - return function badValue() { - empty( 10, value ); - }; - } -}); - -tape( 'the function returns a zero-filled array (default)', function test( t ) { - var expected; - var arr; - - expected = new Float64Array( [ 0.0, 0.0, 0.0, 0.0, 0.0 ] ); - - arr = empty( 5 ); - t.strictEqual( instanceOf( arr, Float64Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=float64)', function test( t ) { - var expected; - var arr; - - expected = new Float64Array( [ 0.0, 0.0, 0.0, 0.0, 0.0 ] ); - - arr = empty( 5, 'float64' ); - t.strictEqual( instanceOf( arr, Float64Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=float32)', function test( t ) { - var expected; - var arr; - - expected = new Float32Array( [ 0.0, 0.0, 0.0, 0.0, 0.0 ] ); - - arr = empty( 5, 'float32' ); - t.strictEqual( instanceOf( arr, Float32Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=bool)', function test( t ) { - var expected; - var arr; - - expected = new Uint8Array( [ 0, 0, 0, 0 ] ); - - arr = empty( 4, 'bool' ); - t.strictEqual( instanceOf( arr, BooleanArray ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( reinterpretBoolean( arr, 0 ), expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=complex128)', function test( t ) { - var expected; - var arr; - - expected = new Float64Array( [ 0.0, 0.0, 0.0, 0.0 ] ); - - arr = empty( 2, 'complex128' ); - t.strictEqual( instanceOf( arr, Complex128Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length/2, 'returns expected value' ); - t.deepEqual( reinterpret128( arr, 0 ), expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=complex64)', function test( t ) { - var expected; - var arr; - - expected = new Float32Array( [ 0.0, 0.0, 0.0, 0.0 ] ); - - arr = empty( 2, 'complex64' ); - t.strictEqual( instanceOf( arr, Complex64Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length/2, 'returns expected value' ); - t.deepEqual( reinterpret64( arr, 0 ), expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=int32)', function test( t ) { - var expected; - var arr; - - expected = new Int32Array( [ 0, 0, 0, 0, 0 ] ); - - arr = empty( 5, 'int32' ); - t.strictEqual( instanceOf( arr, Int32Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=uint32)', function test( t ) { - var expected; - var arr; - - expected = new Uint32Array( [ 0, 0, 0, 0, 0 ] ); - - arr = empty( 5, 'uint32' ); - t.strictEqual( instanceOf( arr, Uint32Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=int16)', function test( t ) { - var expected; - var arr; - - expected = new Int16Array( [ 0, 0, 0, 0, 0 ] ); - - arr = empty( 5, 'int16' ); - t.strictEqual( instanceOf( arr, Int16Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=uint16)', function test( t ) { - var expected; - var arr; - - expected = new Uint16Array( [ 0, 0, 0, 0, 0 ] ); - - arr = empty( 5, 'uint16' ); - t.strictEqual( instanceOf( arr, Uint16Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=int8)', function test( t ) { - var expected; - var arr; - - expected = new Int8Array( [ 0, 0, 0, 0, 0 ] ); - - arr = empty( 5, 'int8' ); - t.strictEqual( instanceOf( arr, Int8Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=uint8)', function test( t ) { - var expected; - var arr; - - expected = new Uint8Array( [ 0, 0, 0, 0, 0 ] ); - - arr = empty( 5, 'uint8' ); - t.strictEqual( instanceOf( arr, Uint8Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=uint8c)', function test( t ) { - var expected; - var arr; - - expected = new Uint8ClampedArray( [ 0, 0, 0, 0, 0 ] ); - - arr = empty( 5, 'uint8c' ); - t.strictEqual( instanceOf( arr, Uint8ClampedArray ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=generic)', function test( t ) { - var expected; - var arr; - - expected = [ 0, 0, 0, 0, 0 ]; - - arr = empty( 5, 'generic' ); - t.strictEqual( instanceOf( arr, Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); From 69948c764d14b7ff4f982c4237982384b5dfcfcf Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sun, 1 Sep 2024 08:41:27 +0000 Subject: [PATCH 73/75] Transform error messages --- lib/main.js | 6 +++--- package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/main.js b/lib/main.js index 33d8392..44eb4a4 100644 --- a/lib/main.js +++ b/lib/main.js @@ -26,7 +26,7 @@ var ctors = require( '@stdlib/array-typed-ctors' ); var zeros = require( '@stdlib/array-base-zeros' ); var bytesPerElement = require( '@stdlib/ndarray-base-bytes-per-element' ); var defaults = require( '@stdlib/array-defaults' ); -var format = require( '@stdlib/string-format' ); +var format = require( '@stdlib/error-tools-fmtprodmsg' ); // VARIABLES // @@ -63,7 +63,7 @@ function empty( length ) { var nb; if ( !isNonNegativeInteger( length ) ) { - throw new TypeError( format( 'invalid argument. First argument must be a nonnegative integer. Value: `%s`.', length ) ); + throw new TypeError( format( '1Zj2d', length ) ); } if ( arguments.length > 1 ) { dtype = arguments[ 1 ]; @@ -75,7 +75,7 @@ function empty( length ) { } nbytes = bytesPerElement( dtype ); if ( nbytes === null ) { - throw new TypeError( format( 'invalid argument. Second argument must be a supported data type. Value: `%s`.', dtype ) ); + throw new TypeError( format( '1ZjEC', dtype ) ); } // Resolve typed array constructor: ctor = ctors( dtype ); diff --git a/package.json b/package.json index 235e155..79091a5 100644 --- a/package.json +++ b/package.json @@ -46,7 +46,7 @@ "@stdlib/assert-is-uint8array": "^0.2.2", "@stdlib/buffer-alloc-unsafe": "^0.2.2", "@stdlib/ndarray-base-bytes-per-element": "^0.2.2", - "@stdlib/string-format": "^0.2.2", + "@stdlib/error-tools-fmtprodmsg": "^0.2.2", "@stdlib/types": "^0.4.1", "@stdlib/error-tools-fmtprodmsg": "^0.2.2" }, From 122bce40120a255bf349eee0edfb2b07fa963b30 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sun, 1 Sep 2024 13:08:15 +0000 Subject: [PATCH 74/75] Remove files --- mod.d.ts | 51 - mod.js | 4 - mod.js.map | 1 - stats.html | 4842 ---------------------------------------------------- 4 files changed, 4898 deletions(-) delete mode 100644 mod.d.ts delete mode 100644 mod.js delete mode 100644 mod.js.map delete mode 100644 stats.html diff --git a/mod.d.ts b/mod.d.ts deleted file mode 100644 index e22b893..0000000 --- a/mod.d.ts +++ /dev/null @@ -1,51 +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 - -/// - -import { DataTypeMap } from '@stdlib/types/array'; - -/** -* Creates an uninitialized array having a specified length. -* -* ## Notes -* -* - In browser environments, the function always returns zero-filled arrays. -* - If `dtype` is `'generic'`, the function always returns a zero-filled array. -* - In Node.js versions `>=3.0.0`, the underlying memory of returned typed arrays is **not** initialized. Memory contents are unknown and may contain **sensitive** data. -* -* @param length - array length -* @param dtype - data type (default: 'float64') -* @returns empty array -* -* @example -* var arr = empty( 2 ); -* // returns -* -* @example -* var arr = empty( 2, 'float32' ); -* // returns -*/ -declare function empty = 'float64'>( length: number, dtype?: T ): DataTypeMap[T]; - - -// EXPORTS // - -export = empty; diff --git a/mod.js b/mod.js deleted file mode 100644 index 0ce0bcf..0000000 --- a/mod.js +++ /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 -/// -var r="function"==typeof Object.defineProperty?Object.defineProperty:null;var e=Object.defineProperty;function t(r){return"number"==typeof r}function n(r){var e,t="";for(e=0;e0&&(e-=1),n=i.toExponential(e)):n=i.toPrecision(r.precision),r.alternate||(n=h.call(n,v,"$1e"),n=h.call(n,w,"e"),n=h.call(n,g,""));break;default:throw new Error("invalid double notation. Value: "+r.specifier)}return n=h.call(n,c,"e+0$1"),n=h.call(n,p,"e-0$1"),r.alternate&&(n=h.call(n,m,"$1."),n=h.call(n,y,"$1.e")),i>=0&&r.sign&&(n=r.sign+n),n=r.specifier===s.call(r.specifier)?s.call(n):l.call(n)}function d(r){var e,t="";for(e=0;e127)throw new Error("invalid character code. Value: "+n.arg);n.arg=T(a)?String(n.arg):E(a)}break;case"e":case"E":case"f":case"F":case"g":case"G":e||(n.precision=6),n.arg=b(n);break;default:throw new Error("invalid specifier: "+n.specifier)}n.maxWidth>=0&&n.arg.length>n.maxWidth&&(n.arg=n.arg.substring(0,n.maxWidth)),n.padZeros?n.arg=i(n.arg,n.width||n.precision,n.padRight):n.width&&(n.arg=(c=n.arg,p=n.width,m=n.padRight,y=void 0,(y=p-c.length)<0?c:c=m?c+d(y):d(y)+c)),f+=n.arg||"",l+=1}return f}var A=/%(?:([1-9]\d*)\$)?([0 +\-#]*)(\*|\d+)?(?:(\.)(\*|\d+)?)?[hlL]?([%A-Za-z])/g;function S(r){var e={mapping:r[1]?parseInt(r[1],10):void 0,flags:r[2],width:r[3],precision:r[5],specifier:r[6]};return"."===r[4]&&void 0===r[5]&&(e.precision="1"),e}function j(r){var e,t,n,i;for(t=[],i=0,n=A.exec(r);n;)(e=r.slice(i,A.lastIndex-n[0].length)).length&&t.push(e),t.push(S(n)),i=A.lastIndex,n=A.exec(r);return(e=r.slice(i)).length&&t.push(e),t}function F(r){var e,t;if("string"!=typeof r)throw new TypeError(F("invalid argument. First argument must be a string. Value: `%s`.",r));for(e=[j(r)],t=1;trr&&tr(r)}function ir(r){return P(r)&&nr(r)}function or(r){return H(r)&&nr(r.valueOf())}function ar(r){return ir(r)||or(r)}function ur(r){return ir(r)&&r>=0}function fr(r){return or(r)&&r.valueOf()>=0}function lr(r){return ur(r)||fr(r)}N(ar,"isPrimitive",ir),N(ar,"isObject",or),N(lr,"isPrimitive",ur),N(lr,"isObject",fr);var sr="function"==typeof Float64Array;var hr="function"==typeof Float64Array?Float64Array:null;var cr="function"==typeof Float64Array?Float64Array:void 0;var pr=function(){var r,e,t;if("function"!=typeof hr)return!1;try{e=new hr([1,3.14,-3.14,NaN]),t=e,r=(sr&&t instanceof Float64Array||"[object Float64Array]"===X(t))&&1===e[0]&&3.14===e[1]&&-3.14===e[2]&&e[3]!=e[3]}catch(e){r=!1}return r}()?cr:function(){throw new Error("not implemented")},mr="function"==typeof Float32Array;var yr="function"==typeof Float32Array?Float32Array:null;var gr="function"==typeof Float32Array?Float32Array:void 0;var wr=function(){var r,e,t;if("function"!=typeof yr)return!1;try{e=new yr([1,3.14,-3.14,5e40]),t=e,r=(mr&&t instanceof Float32Array||"[object Float32Array]"===X(t))&&1===e[0]&&3.140000104904175===e[1]&&-3.140000104904175===e[2]&&e[3]===Q}catch(e){r=!1}return r}()?gr:function(){throw new Error("not implemented")},vr="function"==typeof Int16Array;var br="function"==typeof Int16Array?Int16Array:null;var dr="function"==typeof Int16Array?Int16Array:void 0;var Er=function(){var r,e,t;if("function"!=typeof br)return!1;try{e=new br([1,3.14,-3.14,32768]),t=e,r=(vr&&t instanceof Int16Array||"[object Int16Array]"===X(t))&&1===e[0]&&3===e[1]&&-3===e[2]&&-32768===e[3]}catch(e){r=!1}return r}()?dr:function(){throw new Error("not implemented")},_r="function"==typeof Int32Array;var Tr="function"==typeof Int32Array?Int32Array:null;var xr="function"==typeof Int32Array?Int32Array:void 0;var Vr=function(){var r,e,t;if("function"!=typeof Tr)return!1;try{e=new Tr([1,3.14,-3.14,2147483648]),t=e,r=(_r&&t instanceof Int32Array||"[object Int32Array]"===X(t))&&1===e[0]&&3===e[1]&&-3===e[2]&&-2147483648===e[3]}catch(e){r=!1}return r}()?xr:function(){throw new Error("not implemented")},Ar="function"==typeof Int8Array;var Sr="function"==typeof Int8Array?Int8Array:null;var jr="function"==typeof Int8Array?Int8Array:void 0;var Fr=function(){var r,e,t;if("function"!=typeof Sr)return!1;try{e=new Sr([1,3.14,-3.14,128]),t=e,r=(Ar&&t instanceof Int8Array||"[object Int8Array]"===X(t))&&1===e[0]&&3===e[1]&&-3===e[2]&&-128===e[3]}catch(e){r=!1}return r}()?jr:function(){throw new Error("not implemented")},kr="function"==typeof Uint16Array;var Lr="function"==typeof Uint16Array?Uint16Array:null;var Rr="function"==typeof Uint16Array?Uint16Array:void 0;var Ir=function(){var r,e,t;if("function"!=typeof Lr)return!1;try{e=new Lr(e=[1,3.14,-3.14,65536,65537]),t=e,r=(kr&&t instanceof Uint16Array||"[object Uint16Array]"===X(t))&&1===e[0]&&3===e[1]&&65533===e[2]&&0===e[3]&&1===e[4]}catch(e){r=!1}return r}()?Rr:function(){throw new Error("not implemented")},Br="function"==typeof Uint32Array;var Or="function"==typeof Uint32Array?Uint32Array:null;var Cr="function"==typeof Uint32Array?Uint32Array:void 0;var Mr=function(){var r,e,t;if("function"!=typeof Or)return!1;try{e=new Or(e=[1,3.14,-3.14,4294967296,4294967297]),t=e,r=(Br&&t instanceof Uint32Array||"[object Uint32Array]"===X(t))&&1===e[0]&&3===e[1]&&4294967293===e[2]&&0===e[3]&&1===e[4]}catch(e){r=!1}return r}()?Cr:function(){throw new Error("not implemented")},Nr="function"==typeof Uint8Array;var Pr="function"==typeof Uint8Array?Uint8Array:null;var Ur="function"==typeof Uint8Array?Uint8Array:void 0;var Yr=function(){var r,e,t;if("function"!=typeof Pr)return!1;try{e=new Pr(e=[1,3.14,-3.14,256,257]),t=e,r=(Nr&&t instanceof Uint8Array||"[object Uint8Array]"===X(t))&&1===e[0]&&3===e[1]&&253===e[2]&&0===e[3]&&1===e[4]}catch(e){r=!1}return r}()?Ur:function(){throw new Error("not implemented")},Wr="function"==typeof Uint8ClampedArray;var $r="function"==typeof Uint8ClampedArray?Uint8ClampedArray:null;var Gr="function"==typeof Uint8ClampedArray?Uint8ClampedArray:void 0;var Zr=function(){var r,e,t;if("function"!=typeof $r)return!1;try{e=new $r([-1,0,1,3.14,4.99,255,256]),t=e,r=(Wr&&t instanceof Uint8ClampedArray||"[object Uint8ClampedArray]"===X(t))&&0===e[0]&&0===e[1]&&1===e[2]&&3===e[3]&&5===e[4]&&255===e[5]&&255===e[6]}catch(e){r=!1}return r}()?Gr:function(){throw new Error("not implemented")},Jr=4294967295;function Xr(r){return"object"==typeof r&&null!==r&&"number"==typeof r.length&&tr(r.length)&&r.length>=0&&r.length<=Jr}var zr=9007199254740991;function qr(r){return"object"==typeof r&&null!==r&&"number"==typeof r.length&&tr(r.length)&&r.length>=0&&r.length<=zr}var Dr="function"==typeof ArrayBuffer;function Hr(r){return Dr&&r instanceof ArrayBuffer||"[object ArrayBuffer]"===X(r)}var Kr=Array.isArray?Array.isArray:function(r){return"[object Array]"===X(r)};function Qr(r){return"object"==typeof r&&null!==r&&!Kr(r)}function re(r){return"string"==typeof r}var ee=String.prototype.valueOf;var te=Y();function ne(r){return"object"==typeof r&&(r instanceof String||(te?function(r){try{return ee.call(r),!0}catch(r){return!1}}(r):"[object String]"===X(r)))}function ie(r){return re(r)||ne(r)}N(ie,"isPrimitive",re),N(ie,"isObject",ne);var oe=/./;function ae(r){return"boolean"==typeof r}var ue=Boolean,fe=Boolean.prototype.toString;var le=Y();function se(r){return"object"==typeof r&&(r instanceof ue||(le?function(r){try{return fe.call(r),!0}catch(r){return!1}}(r):"[object Boolean]"===X(r)))}function he(r){return ae(r)||se(r)}N(he,"isPrimitive",ae),N(he,"isObject",se);var ce="object"==typeof self?self:null,pe="object"==typeof window?window:null,me="undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},ye="object"==typeof me?me:null,ge="object"==typeof globalThis?globalThis:null;var we=function(r){if(arguments.length){if(!ae(r))throw new TypeError(F("invalid argument. Must provide a boolean. Value: `%s`.",r));if(r)return new Function("return this;")()}if(ge)return ge;if(ce)return ce;if(pe)return pe;if(ye)return ye;throw new Error("unexpected error. Unable to resolve global object.")}(),ve=we.document&&we.document.childNodes,be=Int8Array;function de(){return/^\s*function\s*([^(]*)/i}var Ee=/^\s*function\s*([^(]*)/i;function _e(r){return null!==r&&"object"==typeof r}function Te(r){var e,t,n,i;if(("Object"===(t=X(r).slice(8,-1))||"Error"===t)&&r.constructor){if("string"==typeof(n=r.constructor).name)return n.name;if(e=Ee.exec(n.toString()))return e[1]}return _e(i=r)&&(i._isBuffer||i.constructor&&"function"==typeof i.constructor.isBuffer&&i.constructor.isBuffer(i))?"Buffer":t}N(de,"REGEXP",Ee),N(_e,"isObjectLikeArray",function(r){if("function"!=typeof r)throw new TypeError(F("invalid argument. Must provide a function. Value: `%s`.",r));return function(e){var t,n;if(!Kr(e))return!1;if(0===(t=e.length))return!1;for(n=0;n=2)e.push(n[0],n[1]);else{if(!Le(n))return new TypeError(F("invalid argument. An iterator must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",n));e.push(Ye(n),We(n))}return e}var De=2*wr.BYTES_PER_ELEMENT,He=Me();function Ke(r){return r instanceof et||"object"==typeof r&&null!==r&&("Complex64Array"===r.constructor.name||"Complex128Array"===r.constructor.name)&&"number"==typeof r._length&&"object"==typeof r._buffer}function Qe(r){return r===et||"Complex128Array"===r.name}function rt(r,e){return new Ue(r[e*=2],r[e+1])}function et(){var r,e,t,n;if(e=arguments.length,!(this instanceof et))return 0===e?new et:1===e?new et(arguments[0]):2===e?new et(arguments[0],arguments[1]):new et(arguments[0],arguments[1],arguments[2]);if(0===e)t=new wr(0);else if(1===e)if(ur(arguments[0]))t=new wr(2*arguments[0]);else if(qr(arguments[0]))if((n=(t=arguments[0]).length)&&Kr(t)&&Le(t[0])){if(t=function(r,e){var t,n,i,o;for(t=e.length,o=0,i=0;it.byteLength-r)throw new RangeError(F("invalid arguments. ArrayBuffer has insufficient capacity. Either decrease the array length or provide a bigger buffer. Minimum capacity: `%u`.",n*De));t=new wr(t,r,2*n)}}return N(this,"_buffer",t),N(this,"_length",t.length/2),this}function tt(r,e){if(!(this instanceof tt))throw new TypeError("invalid invocation. Constructor must be called with the `new` keyword.");if(!P(r))throw new TypeError(F("invalid argument. Real component must be a number. Value: `%s`.",r));if(!P(e))throw new TypeError(F("invalid argument. Imaginary component must be a number. Value: `%s`.",e));return M(this,"re",{configurable:!1,enumerable:!0,writable:!1,value:r}),M(this,"im",{configurable:!1,enumerable:!0,writable:!1,value:e}),this}function nt(r){return r.re}function it(r){return r.im}function ot(r){var e,t,n;for(e=[];!(t=r.next()).done;)if(Xr(n=t.value)&&n.length>=2)e.push(n[0],n[1]);else{if(!Le(n))return new TypeError(F("invalid argument. An iterator must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",n));e.push(nt(n),it(n))}return e}N(et,"BYTES_PER_ELEMENT",De),N(et,"name","Complex64Array"),N(et,"from",(function(r){var e,t,n,i,o,a,u,f,l,s,h,c;if(!Ve(this))throw new TypeError("invalid invocation. `this` context must be a constructor.");if(!Qe(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if((t=arguments.length)>1){if(!Ve(n=arguments[1]))throw new TypeError(F("invalid argument. Second argument must be a function. Value: `%s`.",n));t>2&&(e=arguments[2])}if(Ke(r)){if(f=r.length,n){for(o=(i=new this(f))._buffer,c=0,h=0;h=2))throw new TypeError(F("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",s));o[c]=s[0],o[c+1]=s[1]}c+=2}return i}return new this(r)}if(qr(r)){if(n){for(f=r.length,u=r.get&&r.set?ze("default"):Je("default"),h=0;h=2))throw new TypeError(F("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",s));o[c]=s[0],o[c+1]=s[1]}c+=2}return i}return new this(r)}if(Qr(r)&&He&&Ve(r[Ne])){if(!Ve((o=r[Ne]()).next))throw new TypeError(F("invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.",r));if(a=n?function(r,e,t){var n,i,o,a;for(n=[],a=-1;!(i=r.next()).done;)if(a+=1,Xr(o=e.call(t,i.value,a))&&o.length>=2)n.push(o[0],o[1]);else{if(!Le(o))return new TypeError(F("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",o));n.push(Ye(o),We(o))}return n}(o,n,e):qe(o),a instanceof Error)throw a;for(o=(i=new this(f=a.length/2))._buffer,h=0;h=this._length))return rt(this._buffer,r)})),Pe(et.prototype,"buffer",(function(){return this._buffer.buffer})),Pe(et.prototype,"byteLength",(function(){return this._buffer.byteLength})),Pe(et.prototype,"byteOffset",(function(){return this._buffer.byteOffset})),N(et.prototype,"BYTES_PER_ELEMENT",et.BYTES_PER_ELEMENT),N(et.prototype,"copyWithin",(function(r,e){if(!Ke(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");return 2===arguments.length?this._buffer.copyWithin(2*r,2*e):this._buffer.copyWithin(2*r,2*e,2*arguments[2]),this})),N(et.prototype,"entries",(function(){var r,e,t,n,i,o,a;if(!Ke(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");return e=this,r=this._buffer,n=this._length,o=-1,a=-2,N(t={},"next",(function(){var e;if(o+=1,i||o>=n)return{done:!0};return e=new Ue(r[a+=2],r[a+1]),{value:[o,e],done:!1}})),N(t,"return",(function(r){if(i=!0,arguments.length)return{value:r,done:!0};return{done:!0}})),Ne&&N(t,Ne,(function(){return e.entries()})),t})),N(et.prototype,"every",(function(r,e){var t,n;if(!Ke(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Ve(r))throw new TypeError(F("invalid argument. First argument must be a function. Value: `%s`.",r));for(t=this._buffer,n=0;n1){if(!tr(e))throw new TypeError(F("invalid argument. Second argument must be an integer. Value: `%s`.",e));if(e<0&&(e+=i)<0&&(e=0),arguments.length>2){if(!tr(t))throw new TypeError(F("invalid argument. Third argument must be an integer. Value: `%s`.",t));t<0&&(t+=i)<0&&(t=0),t>i&&(t=i)}else t=i}else e=0,t=i;for(a=Ye(r),u=We(r),f=e;f=0;n--)if(i=rt(t,n),r.call(e,i,n,this))return i})),N(et.prototype,"findLastIndex",(function(r,e){var t,n,i;if(!Ke(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Ve(r))throw new TypeError(F("invalid argument. First argument must be a function. Value: `%s`.",r));for(t=this._buffer,n=this._length-1;n>=0;n--)if(i=rt(t,n),r.call(e,i,n,this))return n;return-1})),N(et.prototype,"forEach",(function(r,e){var t,n,i;if(!Ke(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Ve(r))throw new TypeError(F("invalid argument. First argument must be a function. Value: `%s`.",r));for(t=this._buffer,n=0;n=this._length))return rt(this._buffer,r)})),N(et.prototype,"includes",(function(r,e){var t,n,i,o,a;if(!Ke(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Le(r))throw new TypeError(F("invalid argument. First argument must be a complex number. Value: `%s`.",r));if(arguments.length>1){if(!tr(e))throw new TypeError(F("invalid argument. Second argument must be an integer. Value: `%s`.",e));e<0&&(e+=this._length)<0&&(e=0)}else e=0;for(i=Ye(r),o=We(r),t=this._buffer,a=e;a1){if(!tr(e))throw new TypeError(F("invalid argument. Second argument must be an integer. Value: `%s`.",e));e<0&&(e+=this._length)<0&&(e=0)}else e=0;for(i=Ye(r),o=We(r),t=this._buffer,a=e;a1){if(!tr(e))throw new TypeError(F("invalid argument. Second argument must be an integer. Value: `%s`.",e));e>=this._length?e=this._length-1:e<0&&(e+=this._length)}else e=this._length-1;for(i=Ye(r),o=We(r),t=this._buffer,a=e;a>=0;a--)if(i===t[n=2*a]&&o===t[n+1])return a;return-1})),Pe(et.prototype,"length",(function(){return this._length})),N(et.prototype,"map",(function(r,e){var t,n,i,o,a;if(!Ke(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Ve(r))throw new TypeError(F("invalid argument. First argument must be a function. Value: `%s`.",r));for(n=this._buffer,t=(i=new this.constructor(this._length))._buffer,o=0;o1)n=e,o=0;else{if(0===i)throw new Error("invalid operation. If not provided an initial value, an array must contain at least one element.");n=rt(t,0),o=1}for(;o1){if(!ur(t=arguments[1]))throw new TypeError(F("invalid argument. Index argument must be a nonnegative integer. Value: `%s`.",t))}else t=0;if(Le(r)){if(t>=this._length)throw new RangeError(F("invalid argument. Index argument is out-of-bounds. Value: `%u`.",t));return n[t*=2]=Ye(r),void(n[t+1]=We(r))}if(Ke(r)){if(t+(a=r._length)>this._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");if(e=r._buffer,l=n.byteOffset+t*De,e.buffer===n.buffer&&e.byteOffsetl){for(i=new wr(e.length),f=0;fthis._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");if(e=r,l=n.byteOffset+t*De,e.buffer===n.buffer&&e.byteOffsetl){for(i=new wr(a),f=0;fthis._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");for(t*=2,f=0;fu&&(e=u)}}for(t=ri&&(e=i)}}return r>=i?(i=0,t=n.byteLength):r>=e?(i=0,t=n.byteOffset+r*De):(i=e-r,t=n.byteOffset+r*De),new this.constructor(n.buffer,t,i<0?0:i)})),N(et.prototype,"toReversed",(function(){var r,e,t,n,i,o;if(!Ke(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");for(t=this._length,e=new this.constructor(t),n=this._buffer,r=e._buffer,i=0;i=i)throw new RangeError(F("invalid argument. Index argument is out-of-bounds. Value: `%s`.",r));if(!Le(e))throw new TypeError(F("invalid argument. Second argument must be a complex number. Value: `%s`.",e));return(t=(n=new this.constructor(this._buffer))._buffer)[2*r]=Ye(e),t[2*r+1]=We(e),n})),N(tt,"BYTES_PER_ELEMENT",8),N(tt.prototype,"BYTES_PER_ELEMENT",8),N(tt.prototype,"byteLength",16),N(tt.prototype,"toString",(function(){var r=""+this.re;return this.im<0?r+=" - "+-this.im:r+=" + "+this.im,r+="i"})),N(tt.prototype,"toJSON",(function(){var r={type:"Complex128"};return r.re=this.re,r.im=this.im,r}));var at=2*pr.BYTES_PER_ELEMENT,ut=Me();function ft(r){return r instanceof ht||"object"==typeof r&&null!==r&&("Complex64Array"===r.constructor.name||"Complex128Array"===r.constructor.name)&&"number"==typeof r._length&&"object"==typeof r._buffer}function lt(r){return r===ht||"Complex64Array"===r.name}function st(r,e){return new tt(r[e*=2],r[e+1])}function ht(){var r,e,t,n;if(e=arguments.length,!(this instanceof ht))return 0===e?new ht:1===e?new ht(arguments[0]):2===e?new ht(arguments[0],arguments[1]):new ht(arguments[0],arguments[1],arguments[2]);if(0===e)t=new pr(0);else if(1===e)if(ur(arguments[0]))t=new pr(2*arguments[0]);else if(qr(arguments[0]))if((n=(t=arguments[0]).length)&&Kr(t)&&Le(t[0])){if(t=function(r,e){var t,n,i,o;for(t=e.length,o=0,i=0;it.byteLength-r)throw new RangeError(F("invalid arguments. ArrayBuffer has insufficient capacity. Either decrease the array length or provide a bigger buffer. Minimum capacity: `%u`.",n*at));t=new pr(t,r,2*n)}}return N(this,"_buffer",t),N(this,"_length",t.length/2),this}N(ht,"BYTES_PER_ELEMENT",at),N(ht,"name","Complex128Array"),N(ht,"from",(function(r){var e,t,n,i,o,a,u,f,l,s,h,c;if(!Ve(this))throw new TypeError("invalid invocation. `this` context must be a constructor.");if(!lt(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if((t=arguments.length)>1){if(!Ve(n=arguments[1]))throw new TypeError(F("invalid argument. Second argument must be a function. Value: `%s`.",n));t>2&&(e=arguments[2])}if(ft(r)){if(f=r.length,n){for(o=(i=new this(f))._buffer,c=0,h=0;h=2))throw new TypeError(F("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",s));o[c]=s[0],o[c+1]=s[1]}c+=2}return i}return new this(r)}if(qr(r)){if(n){for(f=r.length,u=r.get&&r.set?ze("default"):Je("default"),h=0;h=2))throw new TypeError(F("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",s));o[c]=s[0],o[c+1]=s[1]}c+=2}return i}return new this(r)}if(Qr(r)&&ut&&Ve(r[Ne])){if(!Ve((o=r[Ne]()).next))throw new TypeError(F("invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.",r));if(a=n?function(r,e,t){var n,i,o,a;for(n=[],a=-1;!(i=r.next()).done;)if(a+=1,Xr(o=e.call(t,i.value,a))&&o.length>=2)n.push(o[0],o[1]);else{if(!Le(o))return new TypeError(F("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",o));n.push(nt(o),it(o))}return n}(o,n,e):ot(o),a instanceof Error)throw a;for(o=(i=new this(f=a.length/2))._buffer,h=0;h=this._length))return st(this._buffer,r)})),Pe(ht.prototype,"buffer",(function(){return this._buffer.buffer})),Pe(ht.prototype,"byteLength",(function(){return this._buffer.byteLength})),Pe(ht.prototype,"byteOffset",(function(){return this._buffer.byteOffset})),N(ht.prototype,"BYTES_PER_ELEMENT",ht.BYTES_PER_ELEMENT),N(ht.prototype,"copyWithin",(function(r,e){if(!ft(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");return 2===arguments.length?this._buffer.copyWithin(2*r,2*e):this._buffer.copyWithin(2*r,2*e,2*arguments[2]),this})),N(ht.prototype,"entries",(function(){var r,e,t,n,i,o,a;if(!ft(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");return e=this,r=this._buffer,n=this._length,o=-1,a=-2,N(t={},"next",(function(){var e;if(o+=1,i||o>=n)return{done:!0};return e=new tt(r[a+=2],r[a+1]),{value:[o,e],done:!1}})),N(t,"return",(function(r){if(i=!0,arguments.length)return{value:r,done:!0};return{done:!0}})),Ne&&N(t,Ne,(function(){return e.entries()})),t})),N(ht.prototype,"every",(function(r,e){var t,n;if(!ft(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Ve(r))throw new TypeError(F("invalid argument. First argument must be a function. Value: `%s`.",r));for(t=this._buffer,n=0;n1){if(!tr(e))throw new TypeError(F("invalid argument. Second argument must be an integer. Value: `%s`.",e));if(e<0&&(e+=i)<0&&(e=0),arguments.length>2){if(!tr(t))throw new TypeError(F("invalid argument. Third argument must be an integer. Value: `%s`.",t));t<0&&(t+=i)<0&&(t=0),t>i&&(t=i)}else t=i}else e=0,t=i;for(a=nt(r),u=it(r),f=e;f=0;n--)if(i=st(t,n),r.call(e,i,n,this))return i})),N(ht.prototype,"findLastIndex",(function(r,e){var t,n,i;if(!ft(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Ve(r))throw new TypeError(F("invalid argument. First argument must be a function. Value: `%s`.",r));for(t=this._buffer,n=this._length-1;n>=0;n--)if(i=st(t,n),r.call(e,i,n,this))return n;return-1})),N(ht.prototype,"forEach",(function(r,e){var t,n,i;if(!ft(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Ve(r))throw new TypeError(F("invalid argument. First argument must be a function. Value: `%s`.",r));for(t=this._buffer,n=0;n=this._length))return st(this._buffer,r)})),Pe(ht.prototype,"length",(function(){return this._length})),N(ht.prototype,"includes",(function(r,e){var t,n,i,o,a;if(!ft(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Le(r))throw new TypeError(F("invalid argument. First argument must be a complex number. Value: `%s`.",r));if(arguments.length>1){if(!tr(e))throw new TypeError(F("invalid argument. Second argument must be an integer. Value: `%s`.",e));e<0&&(e+=this._length)<0&&(e=0)}else e=0;for(i=nt(r),o=it(r),t=this._buffer,a=e;a1){if(!tr(e))throw new TypeError(F("invalid argument. Second argument must be an integer. Value: `%s`.",e));e<0&&(e+=this._length)<0&&(e=0)}else e=0;for(i=nt(r),o=it(r),t=this._buffer,a=e;a1){if(!tr(e))throw new TypeError(F("invalid argument. Second argument must be an integer. Value: `%s`.",e));e>=this._length?e=this._length-1:e<0&&(e+=this._length)}else e=this._length-1;for(i=nt(r),o=it(r),t=this._buffer,a=e;a>=0;a--)if(i===t[n=2*a]&&o===t[n+1])return a;return-1})),N(ht.prototype,"map",(function(r,e){var t,n,i,o,a;if(!ft(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Ve(r))throw new TypeError(F("invalid argument. First argument must be a function. Value: `%s`.",r));for(n=this._buffer,t=(i=new this.constructor(this._length))._buffer,o=0;o1)n=e,o=0;else{if(0===i)throw new Error("invalid operation. If not provided an initial value, an array must contain at least one element.");n=st(t,0),o=1}for(;o1){if(!ur(t=arguments[1]))throw new TypeError(F("invalid argument. Index argument must be a nonnegative integer. Value: `%s`.",t))}else t=0;if(Le(r)){if(t>=this._length)throw new RangeError(F("invalid argument. Index argument is out-of-bounds. Value: `%u`.",t));return n[t*=2]=nt(r),void(n[t+1]=it(r))}if(ft(r)){if(t+(a=r._length)>this._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");if(e=r._buffer,l=n.byteOffset+t*at,e.buffer===n.buffer&&e.byteOffsetl){for(i=new pr(e.length),f=0;fthis._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");if(e=r,l=n.byteOffset+t*at,e.buffer===n.buffer&&e.byteOffsetl){for(i=new pr(a),f=0;fthis._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");for(t*=2,f=0;fu&&(e=u)}}for(t=ri&&(e=i)}}return r>=i?(i=0,t=n.byteLength):r>=e?(i=0,t=n.byteOffset+r*at):(i=e-r,t=n.byteOffset+r*at),new this.constructor(n.buffer,t,i<0?0:i)})),N(ht.prototype,"toReversed",(function(){var r,e,t,n,i,o;if(!ft(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");for(t=this._length,e=new this.constructor(t),n=this._buffer,r=e._buffer,i=0;i=i)throw new RangeError(F("invalid argument. Index argument is out-of-bounds. Value: `%s`.",r));if(!Le(e))throw new TypeError(F("invalid argument. Second argument must be a complex number. Value: `%s`.",e));return(t=(n=new this.constructor(this._buffer))._buffer)[2*r]=nt(e),t[2*r+1]=it(e),n}));var ct={float64:pr,float32:wr,generic:Array,int16:Er,int32:Vr,int8:Fr,uint16:Ir,uint32:Mr,uint8:Yr,uint8c:Zr,complex64:et,complex128:ht};function pt(){return{dtypes:{default:"float64",numeric:"float64",real:"float64",floating_point:"float64",real_floating_point:"float64",complex_floating_point:"complex128",boolean:"bool",integer:"int32",signed_integer:"int32",unsigned_integer:"uint32"}}}var mt={dtypes:{default:"float64",numeric:"float64",real:"float64",floating_point:"float64",real_floating_point:"float64",complex_floating_point:"complex128",boolean:"bool",integer:"int32",signed_integer:"int32",unsigned_integer:"uint32"}},yt={"dtypes.default":mt.dtypes.default,"dtypes.numeric":mt.dtypes.numeric,"dtypes.real":mt.dtypes.real,"dtypes.floating_point":mt.dtypes.floating_point,"dtypes.real_floating_point":mt.dtypes.real_floating_point,"dtypes.complex_floating_point":mt.dtypes.complex_floating_point,"dtypes.boolean":mt.dtypes.boolean,"dtypes.integer":mt.dtypes.integer,"dtypes.signed_integer":mt.dtypes.signed_integer,"dtypes.unsigned_integer":mt.dtypes.unsigned_integer};N(pt,"get",(function(r){var e=yt[r];return void 0===e?null:e}));var gt=pt.get("dtypes.default");function wt(r){var e,t;if(!ur(r))throw new TypeError(F("invalid argument. First argument must be a nonnegative integer. Value: `%s`.",r));if("generic"===(e=arguments.length>1?arguments[1]:gt))return function(r,e){var t,n;for(t=[],n=0;n1?wt(r,arguments[1]):wt(r)}export{vt as default}; -//# sourceMappingURL=mod.js.map diff --git a/mod.js.map b/mod.js.map deleted file mode 100644 index 19bc5a2..0000000 --- a/mod.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"mod.js","sources":["../node_modules/@stdlib/utils-define-property/lib/define_property.js","../node_modules/@stdlib/utils-define-property/lib/builtin.js","../node_modules/@stdlib/string-base-format-interpolate/lib/is_number.js","../node_modules/@stdlib/string-base-format-interpolate/lib/zero_pad.js","../node_modules/@stdlib/string-base-format-interpolate/lib/format_integer.js","../node_modules/@stdlib/string-base-format-interpolate/lib/format_double.js","../node_modules/@stdlib/string-base-format-interpolate/lib/space_pad.js","../node_modules/@stdlib/string-base-format-interpolate/lib/main.js","../node_modules/@stdlib/string-base-format-interpolate/lib/is_string.js","../node_modules/@stdlib/string-base-format-tokenize/lib/main.js","../node_modules/@stdlib/string-format/lib/main.js","../node_modules/@stdlib/string-format/lib/is_string.js","../node_modules/@stdlib/utils-define-property/lib/polyfill.js","../node_modules/@stdlib/utils-define-property/lib/index.js","../node_modules/@stdlib/utils-define-property/lib/has_define_property_support.js","../node_modules/@stdlib/utils-define-nonenumerable-read-only-property/lib/main.js","../node_modules/@stdlib/assert-is-number/lib/primitive.js","../node_modules/@stdlib/assert-has-tostringtag-support/lib/main.js","../node_modules/@stdlib/assert-has-symbol-support/lib/main.js","../node_modules/@stdlib/utils-native-class/lib/tostring.js","../node_modules/@stdlib/assert-has-own-property/lib/main.js","../node_modules/@stdlib/symbol-ctor/lib/main.js","../node_modules/@stdlib/utils-native-class/lib/tostringtag.js","../node_modules/@stdlib/utils-native-class/lib/index.js","../node_modules/@stdlib/utils-native-class/lib/polyfill.js","../node_modules/@stdlib/utils-native-class/lib/main.js","../node_modules/@stdlib/number-ctor/lib/main.js","../node_modules/@stdlib/assert-is-number/lib/tostring.js","../node_modules/@stdlib/assert-is-number/lib/object.js","../node_modules/@stdlib/assert-is-number/lib/try2serialize.js","../node_modules/@stdlib/assert-is-number/lib/main.js","../node_modules/@stdlib/assert-is-number/lib/index.js","../node_modules/@stdlib/constants-float64-pinf/lib/index.js","../node_modules/@stdlib/constants-float64-ninf/lib/index.js","../node_modules/@stdlib/math-base-special-floor/lib/main.js","../node_modules/@stdlib/math-base-assert-is-integer/lib/main.js","../node_modules/@stdlib/assert-is-integer/lib/integer.js","../node_modules/@stdlib/assert-is-integer/lib/primitive.js","../node_modules/@stdlib/assert-is-integer/lib/object.js","../node_modules/@stdlib/assert-is-integer/lib/main.js","../node_modules/@stdlib/assert-is-nonnegative-integer/lib/primitive.js","../node_modules/@stdlib/assert-is-nonnegative-integer/lib/object.js","../node_modules/@stdlib/assert-is-nonnegative-integer/lib/main.js","../node_modules/@stdlib/assert-is-integer/lib/index.js","../node_modules/@stdlib/assert-is-nonnegative-integer/lib/index.js","../node_modules/@stdlib/assert-is-float64array/lib/main.js","../node_modules/@stdlib/assert-has-float64array-support/lib/float64array.js","../node_modules/@stdlib/array-float64/lib/main.js","../node_modules/@stdlib/array-float64/lib/index.js","../node_modules/@stdlib/assert-has-float64array-support/lib/main.js","../node_modules/@stdlib/array-float64/lib/polyfill.js","../node_modules/@stdlib/assert-is-float32array/lib/main.js","../node_modules/@stdlib/assert-has-float32array-support/lib/float32array.js","../node_modules/@stdlib/array-float32/lib/main.js","../node_modules/@stdlib/array-float32/lib/index.js","../node_modules/@stdlib/assert-has-float32array-support/lib/main.js","../node_modules/@stdlib/array-float32/lib/polyfill.js","../node_modules/@stdlib/assert-is-int16array/lib/main.js","../node_modules/@stdlib/constants-int16-max/lib/index.js","../node_modules/@stdlib/assert-has-int16array-support/lib/int16array.js","../node_modules/@stdlib/array-int16/lib/main.js","../node_modules/@stdlib/array-int16/lib/index.js","../node_modules/@stdlib/assert-has-int16array-support/lib/main.js","../node_modules/@stdlib/constants-int16-min/lib/index.js","../node_modules/@stdlib/array-int16/lib/polyfill.js","../node_modules/@stdlib/assert-is-int32array/lib/main.js","../node_modules/@stdlib/constants-int32-max/lib/index.js","../node_modules/@stdlib/assert-has-int32array-support/lib/int32array.js","../node_modules/@stdlib/array-int32/lib/main.js","../node_modules/@stdlib/array-int32/lib/index.js","../node_modules/@stdlib/assert-has-int32array-support/lib/main.js","../node_modules/@stdlib/constants-int32-min/lib/index.js","../node_modules/@stdlib/array-int32/lib/polyfill.js","../node_modules/@stdlib/assert-is-int8array/lib/main.js","../node_modules/@stdlib/constants-int8-max/lib/index.js","../node_modules/@stdlib/assert-has-int8array-support/lib/int8array.js","../node_modules/@stdlib/array-int8/lib/main.js","../node_modules/@stdlib/array-int8/lib/index.js","../node_modules/@stdlib/assert-has-int8array-support/lib/main.js","../node_modules/@stdlib/constants-int8-min/lib/index.js","../node_modules/@stdlib/array-int8/lib/polyfill.js","../node_modules/@stdlib/assert-is-uint16array/lib/main.js","../node_modules/@stdlib/constants-uint16-max/lib/index.js","../node_modules/@stdlib/assert-has-uint16array-support/lib/uint16array.js","../node_modules/@stdlib/array-uint16/lib/main.js","../node_modules/@stdlib/array-uint16/lib/index.js","../node_modules/@stdlib/assert-has-uint16array-support/lib/main.js","../node_modules/@stdlib/array-uint16/lib/polyfill.js","../node_modules/@stdlib/assert-is-uint32array/lib/main.js","../node_modules/@stdlib/constants-uint32-max/lib/index.js","../node_modules/@stdlib/assert-has-uint32array-support/lib/uint32array.js","../node_modules/@stdlib/array-uint32/lib/main.js","../node_modules/@stdlib/array-uint32/lib/index.js","../node_modules/@stdlib/assert-has-uint32array-support/lib/main.js","../node_modules/@stdlib/array-uint32/lib/polyfill.js","../node_modules/@stdlib/assert-is-uint8array/lib/main.js","../node_modules/@stdlib/constants-uint8-max/lib/index.js","../node_modules/@stdlib/assert-has-uint8array-support/lib/uint8array.js","../node_modules/@stdlib/array-uint8/lib/main.js","../node_modules/@stdlib/array-uint8/lib/index.js","../node_modules/@stdlib/assert-has-uint8array-support/lib/main.js","../node_modules/@stdlib/array-uint8/lib/polyfill.js","../node_modules/@stdlib/assert-is-uint8clampedarray/lib/main.js","../node_modules/@stdlib/assert-has-uint8clampedarray-support/lib/uint8clampedarray.js","../node_modules/@stdlib/array-uint8c/lib/main.js","../node_modules/@stdlib/array-uint8c/lib/index.js","../node_modules/@stdlib/assert-has-uint8clampedarray-support/lib/main.js","../node_modules/@stdlib/array-uint8c/lib/polyfill.js","../node_modules/@stdlib/constants-array-max-array-length/lib/index.js","../node_modules/@stdlib/assert-is-array-like-object/lib/main.js","../node_modules/@stdlib/constants-array-max-typed-array-length/lib/index.js","../node_modules/@stdlib/assert-is-collection/lib/main.js","../node_modules/@stdlib/assert-is-arraybuffer/lib/main.js","../node_modules/@stdlib/assert-is-array/lib/main.js","../node_modules/@stdlib/assert-is-object/lib/main.js","../node_modules/@stdlib/assert-is-string/lib/primitive.js","../node_modules/@stdlib/assert-is-string/lib/valueof.js","../node_modules/@stdlib/assert-is-string/lib/object.js","../node_modules/@stdlib/assert-is-string/lib/try2valueof.js","../node_modules/@stdlib/assert-is-string/lib/main.js","../node_modules/@stdlib/assert-is-string/lib/index.js","../node_modules/@stdlib/utils-type-of/lib/fixtures/re.js","../node_modules/@stdlib/assert-is-boolean/lib/primitive.js","../node_modules/@stdlib/boolean-ctor/lib/main.js","../node_modules/@stdlib/assert-is-boolean/lib/tostring.js","../node_modules/@stdlib/assert-is-boolean/lib/object.js","../node_modules/@stdlib/assert-is-boolean/lib/try2serialize.js","../node_modules/@stdlib/assert-is-boolean/lib/main.js","../node_modules/@stdlib/assert-is-boolean/lib/index.js","../node_modules/@stdlib/utils-global/lib/self.js","../node_modules/@stdlib/utils-global/lib/window.js","../node_modules/@stdlib/utils-global/lib/global.js","../node_modules/@stdlib/utils-global/lib/global_this.js","../node_modules/@stdlib/utils-type-of/lib/fixtures/nodelist.js","../node_modules/@stdlib/utils-global/lib/main.js","../node_modules/@stdlib/utils-global/lib/codegen.js","../node_modules/@stdlib/utils-type-of/lib/fixtures/typedarray.js","../node_modules/@stdlib/regexp-function-name/lib/main.js","../node_modules/@stdlib/regexp-function-name/lib/regexp.js","../node_modules/@stdlib/assert-is-object-like/lib/main.js","../node_modules/@stdlib/utils-constructor-name/lib/main.js","../node_modules/@stdlib/assert-is-buffer/lib/main.js","../node_modules/@stdlib/regexp-function-name/lib/index.js","../node_modules/@stdlib/assert-is-object-like/lib/index.js","../node_modules/@stdlib/assert-tools-array-function/lib/main.js","../node_modules/@stdlib/utils-type-of/lib/index.js","../node_modules/@stdlib/utils-type-of/lib/check.js","../node_modules/@stdlib/utils-type-of/lib/polyfill.js","../node_modules/@stdlib/utils-type-of/lib/main.js","../node_modules/@stdlib/assert-is-function/lib/main.js","../node_modules/@stdlib/assert-is-complex-like/node_modules/@stdlib/complex-float64-ctor/lib/main.js","../node_modules/@stdlib/assert-is-complex-like/node_modules/@stdlib/complex-float64-ctor/lib/tostring.js","../node_modules/@stdlib/assert-is-complex-like/node_modules/@stdlib/complex-float64-ctor/lib/tojson.js","../node_modules/@stdlib/number-float64-base-to-float32/lib/main.js","../node_modules/@stdlib/number-float64-base-to-float32/lib/polyfill.js","../node_modules/@stdlib/number-float64-base-to-float32/lib/index.js","../node_modules/@stdlib/complex-float32-ctor/lib/main.js","../node_modules/@stdlib/assert-is-complex-like/lib/main.js","../node_modules/@stdlib/math-base-assert-is-even/lib/main.js","../node_modules/@stdlib/complex-float32-ctor/lib/tostring.js","../node_modules/@stdlib/complex-float32-ctor/lib/tojson.js","../node_modules/@stdlib/array-base-assert-is-complex64array/lib/main.js","../node_modules/@stdlib/array-base-assert-is-complex128array/lib/main.js","../node_modules/@stdlib/assert-has-iterator-symbol-support/lib/main.js","../node_modules/@stdlib/symbol-iterator/lib/main.js","../node_modules/@stdlib/utils-define-nonenumerable-read-only-accessor/lib/main.js","../node_modules/@stdlib/complex-float32/lib/main.js","../node_modules/@stdlib/complex-realf/lib/main.js","../node_modules/@stdlib/complex-imagf/lib/main.js","../node_modules/@stdlib/strided-base-reinterpret-complex64/lib/main.js","../node_modules/@stdlib/strided-base-reinterpret-complex128/lib/main.js","../node_modules/@stdlib/complex-float32/lib/tostring.js","../node_modules/@stdlib/complex-float32/lib/tojson.js","../node_modules/@stdlib/array-base-getter/lib/main.js","../node_modules/@stdlib/array-base-accessor-getter/lib/main.js","../node_modules/@stdlib/array-ctors/node_modules/@stdlib/array-complex64/lib/from_iterator.js","../node_modules/@stdlib/array-ctors/node_modules/@stdlib/array-complex64/lib/main.js","../node_modules/@stdlib/array-ctors/node_modules/@stdlib/array-complex64/lib/from_array.js","../node_modules/@stdlib/complex-float64/lib/main.js","../node_modules/@stdlib/complex-real/lib/main.js","../node_modules/@stdlib/complex-imag/lib/main.js","../node_modules/@stdlib/array-ctors/node_modules/@stdlib/array-complex128/lib/from_iterator.js","../node_modules/@stdlib/array-ctors/node_modules/@stdlib/array-complex64/lib/from_iterator_map.js","../node_modules/@stdlib/complex-float64/lib/tostring.js","../node_modules/@stdlib/complex-float64/lib/tojson.js","../node_modules/@stdlib/array-ctors/node_modules/@stdlib/array-complex128/lib/main.js","../node_modules/@stdlib/array-ctors/node_modules/@stdlib/array-complex128/lib/from_array.js","../node_modules/@stdlib/array-ctors/node_modules/@stdlib/array-complex128/lib/from_iterator_map.js","../node_modules/@stdlib/array-ctors/lib/ctors.js","../node_modules/@stdlib/array-defaults/lib/main.js","../node_modules/@stdlib/array-defaults/lib/get.js","../node_modules/@stdlib/array-defaults/lib/index.js","../node_modules/@stdlib/array-zeros/lib/main.js","../node_modules/@stdlib/array-base-filled/lib/main.js","../node_modules/@stdlib/array-base-zeros/lib/main.js","../node_modules/@stdlib/array-ctors/lib/main.js","../lib/polyfill.js"],"sourcesContent":["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Object.defineProperty === 'function' ) ? Object.defineProperty : null;\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Defines (or modifies) an object property.\n*\n* ## Notes\n*\n* - Property descriptors come in two flavors: **data descriptors** and **accessor descriptors**. A data descriptor is a property that has a value, which may or may not be writable. An accessor descriptor is a property described by a getter-setter function pair. A descriptor must be one of these two flavors and cannot be both.\n*\n* @name defineProperty\n* @type {Function}\n* @param {Object} obj - object on which to define the property\n* @param {(string|symbol)} prop - property name\n* @param {Object} descriptor - property descriptor\n* @param {boolean} [descriptor.configurable=false] - boolean indicating if property descriptor can be changed and if the property can be deleted from the provided object\n* @param {boolean} [descriptor.enumerable=false] - boolean indicating if the property shows up when enumerating object properties\n* @param {boolean} [descriptor.writable=false] - boolean indicating if the value associated with the property can be changed with an assignment operator\n* @param {*} [descriptor.value] - property value\n* @param {(Function|void)} [descriptor.get=undefined] - function which serves as a getter for the property, or, if no getter, undefined. When the property is accessed, a getter function is called without arguments and with the `this` context set to the object through which the property is accessed (which may not be the object on which the property is defined due to inheritance). The return value will be used as the property value.\n* @param {(Function|void)} [descriptor.set=undefined] - function which serves as a setter for the property, or, if no setter, undefined. When assigning a property value, a setter function is called with one argument (the value being assigned to the property) and with the `this` context set to the object through which the property is assigned.\n* @throws {TypeError} first argument must be an object\n* @throws {TypeError} third argument must be an object\n* @throws {Error} property descriptor cannot have both a value and a setter and/or getter\n* @returns {Object} object with added property\n*\n* @example\n* var obj = {};\n*\n* defineProperty( obj, 'foo', {\n* 'value': 'bar'\n* });\n*\n* var str = obj.foo;\n* // returns 'bar'\n*/\nvar defineProperty = Object.defineProperty;\n\n\n// EXPORTS //\n\nexport default defineProperty;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Tests if a value is a number primitive.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number primitive\n*\n* @example\n* var bool = isNumber( 3.14 );\n* // returns true\n*\n* @example\n* var bool = isNumber( NaN );\n* // returns true\n*\n* @example\n* var bool = isNumber( new Number( 3.14 ) );\n* // returns false\n*/\nfunction isNumber( value ) {\n\treturn ( typeof value === 'number' ); // NOTE: we inline the `isNumber.isPrimitive` function from `@stdlib/assert/is-number` in order to avoid circular dependencies.\n}\n\n\n// EXPORTS //\n\nexport default isNumber;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// FUNCTIONS //\n\n/**\n* Tests if a string starts with a minus sign (`-`).\n*\n* @private\n* @param {string} str - input string\n* @returns {boolean} boolean indicating if a string starts with a minus sign (`-`)\n*/\nfunction startsWithMinus( str ) {\n\treturn str[ 0 ] === '-';\n}\n\n/**\n* Returns a string of `n` zeros.\n*\n* @private\n* @param {number} n - number of zeros\n* @returns {string} string of zeros\n*/\nfunction zeros( n ) {\n\tvar out = '';\n\tvar i;\n\tfor ( i = 0; i < n; i++ ) {\n\t\tout += '0';\n\t}\n\treturn out;\n}\n\n\n// MAIN //\n\n/**\n* Pads a token with zeros to the specified width.\n*\n* @private\n* @param {string} str - token argument\n* @param {number} width - token width\n* @param {boolean} [right=false] - boolean indicating whether to pad to the right\n* @returns {string} padded token argument\n*/\nfunction zeroPad( str, width, right ) {\n\tvar negative = false;\n\tvar pad = width - str.length;\n\tif ( pad < 0 ) {\n\t\treturn str;\n\t}\n\tif ( startsWithMinus( str ) ) {\n\t\tnegative = true;\n\t\tstr = str.substr( 1 );\n\t}\n\tstr = ( right ) ?\n\t\tstr + zeros( pad ) :\n\t\tzeros( pad ) + str;\n\tif ( negative ) {\n\t\tstr = '-' + str;\n\t}\n\treturn str;\n}\n\n\n// EXPORTS //\n\nexport default zeroPad;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isNumber from './is_number.js';\nimport zeroPad from './zero_pad.js';\n\n// NOTE: for the following, we explicitly avoid using stdlib packages in this particular package in order to avoid circular dependencies.\nvar lowercase = String.prototype.toLowerCase;\nvar uppercase = String.prototype.toUpperCase;\n\n\n// MAIN //\n\n/**\n* Formats a token object argument as an integer.\n*\n* @private\n* @param {Object} token - token object\n* @throws {Error} must provide a valid integer\n* @returns {string} formatted token argument\n*/\nfunction formatInteger( token ) {\n\tvar base;\n\tvar out;\n\tvar i;\n\n\tswitch ( token.specifier ) {\n\tcase 'b':\n\t\t// Case: %b (binary)\n\t\tbase = 2;\n\t\tbreak;\n\tcase 'o':\n\t\t// Case: %o (octal)\n\t\tbase = 8;\n\t\tbreak;\n\tcase 'x':\n\tcase 'X':\n\t\t// Case: %x, %X (hexadecimal)\n\t\tbase = 16;\n\t\tbreak;\n\tcase 'd':\n\tcase 'i':\n\tcase 'u':\n\tdefault:\n\t\t// Case: %d, %i, %u (decimal)\n\t\tbase = 10;\n\t\tbreak;\n\t}\n\tout = token.arg;\n\ti = parseInt( out, 10 );\n\tif ( !isFinite( i ) ) { // NOTE: We use the global `isFinite` function here instead of `@stdlib/math/base/assert/is-finite` in order to avoid circular dependencies.\n\t\tif ( !isNumber( out ) ) {\n\t\t\tthrow new Error( 'invalid integer. Value: ' + out );\n\t\t}\n\t\ti = 0;\n\t}\n\tif ( i < 0 && ( token.specifier === 'u' || base !== 10 ) ) {\n\t\ti = 0xffffffff + i + 1;\n\t}\n\tif ( i < 0 ) {\n\t\tout = ( -i ).toString( base );\n\t\tif ( token.precision ) {\n\t\t\tout = zeroPad( out, token.precision, token.padRight );\n\t\t}\n\t\tout = '-' + out;\n\t} else {\n\t\tout = i.toString( base );\n\t\tif ( !i && !token.precision ) {\n\t\t\tout = '';\n\t\t} else if ( token.precision ) {\n\t\t\tout = zeroPad( out, token.precision, token.padRight );\n\t\t}\n\t\tif ( token.sign ) {\n\t\t\tout = token.sign + out;\n\t\t}\n\t}\n\tif ( base === 16 ) {\n\t\tif ( token.alternate ) {\n\t\t\tout = '0x' + out;\n\t\t}\n\t\tout = ( token.specifier === uppercase.call( token.specifier ) ) ?\n\t\t\tuppercase.call( out ) :\n\t\t\tlowercase.call( out );\n\t}\n\tif ( base === 8 ) {\n\t\tif ( token.alternate && out.charAt( 0 ) !== '0' ) {\n\t\t\tout = '0' + out;\n\t\t}\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default formatInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isNumber from './is_number.js';\n\n// NOTE: for the following, we explicitly avoid using stdlib packages in this particular package in order to avoid circular dependencies.\nvar abs = Math.abs; // eslint-disable-line stdlib/no-builtin-math\nvar lowercase = String.prototype.toLowerCase;\nvar uppercase = String.prototype.toUpperCase;\nvar replace = String.prototype.replace;\n\n\n// VARIABLES //\n\nvar RE_EXP_POS_DIGITS = /e\\+(\\d)$/;\nvar RE_EXP_NEG_DIGITS = /e-(\\d)$/;\nvar RE_ONLY_DIGITS = /^(\\d+)$/;\nvar RE_DIGITS_BEFORE_EXP = /^(\\d+)e/;\nvar RE_TRAILING_PERIOD_ZERO = /\\.0$/;\nvar RE_PERIOD_ZERO_EXP = /\\.0*e/;\nvar RE_ZERO_BEFORE_EXP = /(\\..*[^0])0*e/;\n\n\n// MAIN //\n\n/**\n* Formats a token object argument as a floating-point number.\n*\n* @private\n* @param {Object} token - token object\n* @throws {Error} must provide a valid floating-point number\n* @returns {string} formatted token argument\n*/\nfunction formatDouble( token ) {\n\tvar digits;\n\tvar out;\n\tvar f = parseFloat( token.arg );\n\tif ( !isFinite( f ) ) { // NOTE: We use the global `isFinite` function here instead of `@stdlib/math/base/assert/is-finite` in order to avoid circular dependencies.\n\t\tif ( !isNumber( token.arg ) ) {\n\t\t\tthrow new Error( 'invalid floating-point number. Value: ' + out );\n\t\t}\n\t\t// Case: NaN, Infinity, or -Infinity\n\t\tf = token.arg;\n\t}\n\tswitch ( token.specifier ) {\n\tcase 'e':\n\tcase 'E':\n\t\tout = f.toExponential( token.precision );\n\t\tbreak;\n\tcase 'f':\n\tcase 'F':\n\t\tout = f.toFixed( token.precision );\n\t\tbreak;\n\tcase 'g':\n\tcase 'G':\n\t\tif ( abs( f ) < 0.0001 ) {\n\t\t\tdigits = token.precision;\n\t\t\tif ( digits > 0 ) {\n\t\t\t\tdigits -= 1;\n\t\t\t}\n\t\t\tout = f.toExponential( digits );\n\t\t} else {\n\t\t\tout = f.toPrecision( token.precision );\n\t\t}\n\t\tif ( !token.alternate ) {\n\t\t\tout = replace.call( out, RE_ZERO_BEFORE_EXP, '$1e' );\n\t\t\tout = replace.call( out, RE_PERIOD_ZERO_EXP, 'e' );\n\t\t\tout = replace.call( out, RE_TRAILING_PERIOD_ZERO, '' );\n\t\t}\n\t\tbreak;\n\tdefault:\n\t\tthrow new Error( 'invalid double notation. Value: ' + token.specifier );\n\t}\n\tout = replace.call( out, RE_EXP_POS_DIGITS, 'e+0$1' );\n\tout = replace.call( out, RE_EXP_NEG_DIGITS, 'e-0$1' );\n\tif ( token.alternate ) {\n\t\tout = replace.call( out, RE_ONLY_DIGITS, '$1.' );\n\t\tout = replace.call( out, RE_DIGITS_BEFORE_EXP, '$1.e' );\n\t}\n\tif ( f >= 0 && token.sign ) {\n\t\tout = token.sign + out;\n\t}\n\tout = ( token.specifier === uppercase.call( token.specifier ) ) ?\n\t\tuppercase.call( out ) :\n\t\tlowercase.call( out );\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default formatDouble;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// FUNCTIONS //\n\n/**\n* Returns `n` spaces.\n*\n* @private\n* @param {number} n - number of spaces\n* @returns {string} string of spaces\n*/\nfunction spaces( n ) {\n\tvar out = '';\n\tvar i;\n\tfor ( i = 0; i < n; i++ ) {\n\t\tout += ' ';\n\t}\n\treturn out;\n}\n\n\n// MAIN //\n\n/**\n* Pads a token with spaces to the specified width.\n*\n* @private\n* @param {string} str - token argument\n* @param {number} width - token width\n* @param {boolean} [right=false] - boolean indicating whether to pad to the right\n* @returns {string} padded token argument\n*/\nfunction spacePad( str, width, right ) {\n\tvar pad = width - str.length;\n\tif ( pad < 0 ) {\n\t\treturn str;\n\t}\n\tstr = ( right ) ?\n\t\tstr + spaces( pad ) :\n\t\tspaces( pad ) + str;\n\treturn str;\n}\n\n\n// EXPORTS //\n\nexport default spacePad;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport formatInteger from './format_integer.js';\nimport isString from './is_string.js';\nimport formatDouble from './format_double.js';\nimport spacePad from './space_pad.js';\nimport zeroPad from './zero_pad.js';\n\n\n// VARIABLES //\n\nvar fromCharCode = String.fromCharCode;\nvar isArray = Array.isArray; // NOTE: We use the global `Array.isArray` function here instead of `@stdlib/assert/is-array` to avoid circular dependencies.\n\n\n// FUNCTIONS //\n\n/**\n* Returns a boolean indicating whether a value is `NaN`.\n*\n* @private\n* @param {*} value - input value\n* @returns {boolean} boolean indicating whether a value is `NaN`\n*\n* @example\n* var bool = isnan( NaN );\n* // returns true\n*\n* @example\n* var bool = isnan( 4 );\n* // returns false\n*/\nfunction isnan( value ) { // explicitly define a function here instead of `@stdlib/math/base/assert/is-nan` in order to avoid circular dependencies\n\treturn ( value !== value );\n}\n\n/**\n* Initializes token object with properties of supplied format identifier object or default values if not present.\n*\n* @private\n* @param {Object} token - format identifier object\n* @returns {Object} token object\n*/\nfunction initialize( token ) {\n\tvar out = {};\n\tout.specifier = token.specifier;\n\tout.precision = ( token.precision === void 0 ) ? 1 : token.precision;\n\tout.width = token.width;\n\tout.flags = token.flags || '';\n\tout.mapping = token.mapping;\n\treturn out;\n}\n\n\n// MAIN //\n\n/**\n* Generates string from a token array by interpolating values.\n*\n* @param {Array} tokens - string parts and format identifier objects\n* @param {Array} ...args - variable values\n* @throws {TypeError} first argument must be an array\n* @throws {Error} invalid flags\n* @returns {string} formatted string\n*\n* @example\n* var tokens = [ 'beep ', { 'specifier': 's' } ];\n* var out = formatInterpolate( tokens, 'boop' );\n* // returns 'beep boop'\n*/\nfunction formatInterpolate( tokens ) {\n\tvar hasPeriod;\n\tvar flags;\n\tvar token;\n\tvar flag;\n\tvar num;\n\tvar out;\n\tvar pos;\n\tvar i;\n\tvar j;\n\n\tif ( !isArray( tokens ) ) {\n\t\tthrow new TypeError( 'invalid argument. First argument must be an array. Value: `' + tokens + '`.' );\n\t}\n\tout = '';\n\tpos = 1;\n\tfor ( i = 0; i < tokens.length; i++ ) {\n\t\ttoken = tokens[ i ];\n\t\tif ( isString( token ) ) {\n\t\t\tout += token;\n\t\t} else {\n\t\t\thasPeriod = token.precision !== void 0;\n\t\t\ttoken = initialize( token );\n\t\t\tif ( !token.specifier ) {\n\t\t\t\tthrow new TypeError( 'invalid argument. Token is missing `specifier` property. Index: `'+ i +'`. Value: `' + token + '`.' );\n\t\t\t}\n\t\t\tif ( token.mapping ) {\n\t\t\t\tpos = token.mapping;\n\t\t\t}\n\t\t\tflags = token.flags;\n\t\t\tfor ( j = 0; j < flags.length; j++ ) {\n\t\t\t\tflag = flags.charAt( j );\n\t\t\t\tswitch ( flag ) {\n\t\t\t\tcase ' ':\n\t\t\t\t\ttoken.sign = ' ';\n\t\t\t\t\tbreak;\n\t\t\t\tcase '+':\n\t\t\t\t\ttoken.sign = '+';\n\t\t\t\t\tbreak;\n\t\t\t\tcase '-':\n\t\t\t\t\ttoken.padRight = true;\n\t\t\t\t\ttoken.padZeros = false;\n\t\t\t\t\tbreak;\n\t\t\t\tcase '0':\n\t\t\t\t\ttoken.padZeros = flags.indexOf( '-' ) < 0; // NOTE: We use built-in `Array.prototype.indexOf` here instead of `@stdlib/assert/contains` in order to avoid circular dependencies.\n\t\t\t\t\tbreak;\n\t\t\t\tcase '#':\n\t\t\t\t\ttoken.alternate = true;\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tthrow new Error( 'invalid flag: ' + flag );\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( token.width === '*' ) {\n\t\t\t\ttoken.width = parseInt( arguments[ pos ], 10 );\n\t\t\t\tpos += 1;\n\t\t\t\tif ( isnan( token.width ) ) {\n\t\t\t\t\tthrow new TypeError( 'the argument for * width at position ' + pos + ' is not a number. Value: `' + token.width + '`.' );\n\t\t\t\t}\n\t\t\t\tif ( token.width < 0 ) {\n\t\t\t\t\ttoken.padRight = true;\n\t\t\t\t\ttoken.width = -token.width;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( hasPeriod ) {\n\t\t\t\tif ( token.precision === '*' ) {\n\t\t\t\t\ttoken.precision = parseInt( arguments[ pos ], 10 );\n\t\t\t\t\tpos += 1;\n\t\t\t\t\tif ( isnan( token.precision ) ) {\n\t\t\t\t\t\tthrow new TypeError( 'the argument for * precision at position ' + pos + ' is not a number. Value: `' + token.precision + '`.' );\n\t\t\t\t\t}\n\t\t\t\t\tif ( token.precision < 0 ) {\n\t\t\t\t\t\ttoken.precision = 1;\n\t\t\t\t\t\thasPeriod = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\ttoken.arg = arguments[ pos ];\n\t\t\tswitch ( token.specifier ) {\n\t\t\tcase 'b':\n\t\t\tcase 'o':\n\t\t\tcase 'x':\n\t\t\tcase 'X':\n\t\t\tcase 'd':\n\t\t\tcase 'i':\n\t\t\tcase 'u':\n\t\t\t\t// Case: %b (binary), %o (octal), %x, %X (hexadecimal), %d, %i (decimal), %u (unsigned decimal)\n\t\t\t\tif ( hasPeriod ) {\n\t\t\t\t\ttoken.padZeros = false;\n\t\t\t\t}\n\t\t\t\ttoken.arg = formatInteger( token );\n\t\t\t\tbreak;\n\t\t\tcase 's':\n\t\t\t\t// Case: %s (string)\n\t\t\t\ttoken.maxWidth = ( hasPeriod ) ? token.precision : -1;\n\t\t\t\ttoken.arg = String( token.arg );\n\t\t\t\tbreak;\n\t\t\tcase 'c':\n\t\t\t\t// Case: %c (character)\n\t\t\t\tif ( !isnan( token.arg ) ) {\n\t\t\t\t\tnum = parseInt( token.arg, 10 );\n\t\t\t\t\tif ( num < 0 || num > 127 ) {\n\t\t\t\t\t\tthrow new Error( 'invalid character code. Value: ' + token.arg );\n\t\t\t\t\t}\n\t\t\t\t\ttoken.arg = ( isnan( num ) ) ? String( token.arg ) : fromCharCode( num ); // eslint-disable-line max-len\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'e':\n\t\t\tcase 'E':\n\t\t\tcase 'f':\n\t\t\tcase 'F':\n\t\t\tcase 'g':\n\t\t\tcase 'G':\n\t\t\t\t// Case: %e, %E (scientific notation), %f, %F (decimal floating point), %g, %G (uses the shorter of %e/E or %f/F)\n\t\t\t\tif ( !hasPeriod ) {\n\t\t\t\t\ttoken.precision = 6;\n\t\t\t\t}\n\t\t\t\ttoken.arg = formatDouble( token );\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tthrow new Error( 'invalid specifier: ' + token.specifier );\n\t\t\t}\n\t\t\t// Fit argument into field width...\n\t\t\tif ( token.maxWidth >= 0 && token.arg.length > token.maxWidth ) {\n\t\t\t\ttoken.arg = token.arg.substring( 0, token.maxWidth );\n\t\t\t}\n\t\t\tif ( token.padZeros ) {\n\t\t\t\ttoken.arg = zeroPad( token.arg, token.width || token.precision, token.padRight ); // eslint-disable-line max-len\n\t\t\t} else if ( token.width ) {\n\t\t\t\ttoken.arg = spacePad( token.arg, token.width, token.padRight );\n\t\t\t}\n\t\t\tout += token.arg || '';\n\t\t\tpos += 1;\n\t\t}\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default formatInterpolate;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Tests if a value is a string primitive.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a string primitive\n*\n* @example\n* var bool = isString( 'beep' );\n* // returns true\n*\n* @example\n* var bool = isString( new String( 'beep' ) );\n* // returns false\n*/\nfunction isString( value ) {\n\treturn ( typeof value === 'string' ); // NOTE: we inline the `isString.isPrimitive` function from `@stdlib/assert/is-string` in order to avoid circular dependencies.\n}\n\n\n// EXPORTS //\n\nexport default isString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// VARIABLES //\n\nvar RE = /%(?:([1-9]\\d*)\\$)?([0 +\\-#]*)(\\*|\\d+)?(?:(\\.)(\\*|\\d+)?)?[hlL]?([%A-Za-z])/g;\n\n\n// FUNCTIONS //\n\n/**\n* Parses a delimiter.\n*\n* @private\n* @param {Array} match - regular expression match\n* @returns {Object} delimiter token object\n*/\nfunction parse( match ) {\n\tvar token = {\n\t\t'mapping': ( match[ 1 ] ) ? parseInt( match[ 1 ], 10 ) : void 0,\n\t\t'flags': match[ 2 ],\n\t\t'width': match[ 3 ],\n\t\t'precision': match[ 5 ],\n\t\t'specifier': match[ 6 ]\n\t};\n\tif ( match[ 4 ] === '.' && match[ 5 ] === void 0 ) {\n\t\ttoken.precision = '1';\n\t}\n\treturn token;\n}\n\n\n// MAIN //\n\n/**\n* Tokenizes a string into an array of string parts and format identifier objects.\n*\n* @param {string} str - input string\n* @returns {Array} tokens\n*\n* @example\n* var tokens = formatTokenize( 'Hello %s!' );\n* // returns [ 'Hello ', {...}, '!' ]\n*/\nfunction formatTokenize( str ) {\n\tvar content;\n\tvar tokens;\n\tvar match;\n\tvar prev;\n\n\ttokens = [];\n\tprev = 0;\n\tmatch = RE.exec( str );\n\twhile ( match ) {\n\t\tcontent = str.slice( prev, RE.lastIndex - match[ 0 ].length );\n\t\tif ( content.length ) {\n\t\t\ttokens.push( content );\n\t\t}\n\t\ttokens.push( parse( match ) );\n\t\tprev = RE.lastIndex;\n\t\tmatch = RE.exec( str );\n\t}\n\tcontent = str.slice( prev );\n\tif ( content.length ) {\n\t\ttokens.push( content );\n\t}\n\treturn tokens;\n}\n\n\n// EXPORTS //\n\nexport default formatTokenize;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport interpolate from '@stdlib/string-base-format-interpolate';\nimport tokenize from '@stdlib/string-base-format-tokenize';\nimport isString from './is_string.js';\n\n\n// MAIN //\n\n/**\n* Inserts supplied variable values into a format string.\n*\n* @param {string} str - input string\n* @param {Array} ...args - variable values\n* @throws {TypeError} first argument must be a string\n* @throws {Error} invalid flags\n* @returns {string} formatted string\n*\n* @example\n* var str = format( 'Hello %s!', 'world' );\n* // returns 'Hello world!'\n*\n* @example\n* var str = format( 'Pi: ~%.2f', 3.141592653589793 );\n* // returns 'Pi: ~3.14'\n*/\nfunction format( str ) {\n\tvar args;\n\tvar i;\n\n\tif ( !isString( str ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a string. Value: `%s`.', str ) );\n\t}\n\targs = [ tokenize( str ) ];\n\tfor ( i = 1; i < arguments.length; i++ ) {\n\t\targs.push( arguments[ i ] );\n\t}\n\treturn interpolate.apply( null, args );\n}\n\n\n// EXPORTS //\n\nexport default format;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Tests if a value is a string primitive.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a string primitive\n*\n* @example\n* var bool = isString( 'beep' );\n* // returns true\n*\n* @example\n* var bool = isString( new String( 'beep' ) );\n* // returns false\n*/\nfunction isString( value ) {\n\treturn ( typeof value === 'string' ); // NOTE: we inline the `isString.isPrimitive` function from `@stdlib/assert/is-string` in order to avoid circular dependencies.\n}\n\n\n// EXPORTS //\n\nexport default isString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable no-underscore-dangle, no-proto */\n\n'use strict';\n\n// MODULES //\n\nimport format from '@stdlib/string-format';\n\n\n// VARIABLES //\n\nvar objectProtoype = Object.prototype;\nvar toStr = objectProtoype.toString;\nvar defineGetter = objectProtoype.__defineGetter__;\nvar defineSetter = objectProtoype.__defineSetter__;\nvar lookupGetter = objectProtoype.__lookupGetter__;\nvar lookupSetter = objectProtoype.__lookupSetter__;\n\n\n// MAIN //\n\n/**\n* Defines (or modifies) an object property.\n*\n* ## Notes\n*\n* - Property descriptors come in two flavors: **data descriptors** and **accessor descriptors**. A data descriptor is a property that has a value, which may or may not be writable. An accessor descriptor is a property described by a getter-setter function pair. A descriptor must be one of these two flavors and cannot be both.\n*\n* @param {Object} obj - object on which to define the property\n* @param {string} prop - property name\n* @param {Object} descriptor - property descriptor\n* @param {boolean} [descriptor.configurable=false] - boolean indicating if property descriptor can be changed and if the property can be deleted from the provided object\n* @param {boolean} [descriptor.enumerable=false] - boolean indicating if the property shows up when enumerating object properties\n* @param {boolean} [descriptor.writable=false] - boolean indicating if the value associated with the property can be changed with an assignment operator\n* @param {*} [descriptor.value] - property value\n* @param {(Function|void)} [descriptor.get=undefined] - function which serves as a getter for the property, or, if no getter, undefined. When the property is accessed, a getter function is called without arguments and with the `this` context set to the object through which the property is accessed (which may not be the object on which the property is defined due to inheritance). The return value will be used as the property value.\n* @param {(Function|void)} [descriptor.set=undefined] - function which serves as a setter for the property, or, if no setter, undefined. When assigning a property value, a setter function is called with one argument (the value being assigned to the property) and with the `this` context set to the object through which the property is assigned.\n* @throws {TypeError} first argument must be an object\n* @throws {TypeError} third argument must be an object\n* @throws {Error} property descriptor cannot have both a value and a setter and/or getter\n* @returns {Object} object with added property\n*\n* @example\n* var obj = {};\n*\n* defineProperty( obj, 'foo', {\n* 'value': 'bar'\n* });\n*\n* var str = obj.foo;\n* // returns 'bar'\n*/\nfunction defineProperty( obj, prop, descriptor ) {\n\tvar prototype;\n\tvar hasValue;\n\tvar hasGet;\n\tvar hasSet;\n\n\tif ( typeof obj !== 'object' || obj === null || toStr.call( obj ) === '[object Array]' ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be an object. Value: `%s`.', obj ) );\n\t}\n\tif ( typeof descriptor !== 'object' || descriptor === null || toStr.call( descriptor ) === '[object Array]' ) {\n\t\tthrow new TypeError( format( 'invalid argument. Property descriptor must be an object. Value: `%s`.', descriptor ) );\n\t}\n\thasValue = ( 'value' in descriptor );\n\tif ( hasValue ) {\n\t\tif (\n\t\t\tlookupGetter.call( obj, prop ) ||\n\t\t\tlookupSetter.call( obj, prop )\n\t\t) {\n\t\t\t// Override `__proto__` to avoid touching inherited accessors:\n\t\t\tprototype = obj.__proto__;\n\t\t\tobj.__proto__ = objectProtoype;\n\n\t\t\t// Delete property as existing getters/setters prevent assigning value to specified property:\n\t\t\tdelete obj[ prop ];\n\t\t\tobj[ prop ] = descriptor.value;\n\n\t\t\t// Restore original prototype:\n\t\t\tobj.__proto__ = prototype;\n\t\t} else {\n\t\t\tobj[ prop ] = descriptor.value;\n\t\t}\n\t}\n\thasGet = ( 'get' in descriptor );\n\thasSet = ( 'set' in descriptor );\n\n\tif ( hasValue && ( hasGet || hasSet ) ) {\n\t\tthrow new Error( 'invalid argument. Cannot specify one or more accessors and a value or writable attribute in the property descriptor.' );\n\t}\n\n\tif ( hasGet && defineGetter ) {\n\t\tdefineGetter.call( obj, prop, descriptor.get );\n\t}\n\tif ( hasSet && defineSetter ) {\n\t\tdefineSetter.call( obj, prop, descriptor.set );\n\t}\n\treturn obj;\n}\n\n\n// EXPORTS //\n\nexport default defineProperty;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Define (or modify) an object property.\n*\n* @module @stdlib/utils-define-property\n*\n* @example\n* import defineProperty from '@stdlib/utils-define-property';\n*\n* var obj = {};\n* defineProperty( obj, 'foo', {\n* 'value': 'bar',\n* 'writable': false,\n* 'configurable': false,\n* 'enumerable': false\n* });\n* obj.foo = 'boop'; // => throws\n*/\n\n// MODULES //\n\nimport hasDefinePropertySupport from './has_define_property_support.js';\nimport builtin from './builtin.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar defineProperty;\nif ( hasDefinePropertySupport() ) {\n\tdefineProperty = builtin;\n} else {\n\tdefineProperty = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default defineProperty;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport defineProperty from './define_property.js';\n\n\n// MAIN //\n\n/**\n* Tests for `Object.defineProperty` support.\n*\n* @private\n* @returns {boolean} boolean indicating if an environment has `Object.defineProperty` support\n*\n* @example\n* var bool = hasDefinePropertySupport();\n* // returns \n*/\nfunction hasDefinePropertySupport() {\n\t// Test basic support...\n\ttry {\n\t\tdefineProperty( {}, 'x', {} );\n\t\treturn true;\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\treturn false;\n\t}\n}\n\n\n// EXPORTS //\n\nexport default hasDefinePropertySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport defineProperty from '@stdlib/utils-define-property';\n\n\n// MAIN //\n\n/**\n* Defines a non-enumerable read-only property.\n*\n* @param {Object} obj - object on which to define the property\n* @param {(string|symbol)} prop - property name\n* @param {*} value - value to set\n*\n* @example\n* var obj = {};\n*\n* setNonEnumerableReadOnly( obj, 'foo', 'bar' );\n*\n* try {\n* obj.foo = 'boop';\n* } catch ( err ) {\n* console.error( err.message );\n* }\n*/\nfunction setNonEnumerableReadOnly( obj, prop, value ) {\n\tdefineProperty( obj, prop, {\n\t\t'configurable': false,\n\t\t'enumerable': false,\n\t\t'writable': false,\n\t\t'value': value\n\t});\n}\n\n\n// EXPORTS //\n\nexport default setNonEnumerableReadOnly;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Tests if a value is a number primitive.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number primitive\n*\n* @example\n* var bool = isNumber( 3.14 );\n* // returns true\n*\n* @example\n* var bool = isNumber( NaN );\n* // returns true\n*\n* @example\n* var bool = isNumber( new Number( 3.14 ) );\n* // returns false\n*/\nfunction isNumber( value ) {\n\treturn ( typeof value === 'number' );\n}\n\n\n// EXPORTS //\n\nexport default isNumber;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport hasSymbols from '@stdlib/assert-has-symbol-support';\n\n\n// VARIABLES //\n\nvar FLG = hasSymbols();\n\n\n// MAIN //\n\n/**\n* Tests for native `toStringTag` support.\n*\n* @returns {boolean} boolean indicating if an environment has `toStringTag` support\n*\n* @example\n* var bool = hasToStringTagSupport();\n* // returns \n*/\nfunction hasToStringTagSupport() {\n\treturn ( FLG && typeof Symbol.toStringTag === 'symbol' );\n}\n\n\n// EXPORTS //\n\nexport default hasToStringTagSupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Tests for native `Symbol` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Symbol` support\n*\n* @example\n* var bool = hasSymbolSupport();\n* // returns \n*/\nfunction hasSymbolSupport() {\n\treturn (\n\t\ttypeof Symbol === 'function' &&\n\t\ttypeof Symbol( 'foo' ) === 'symbol'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default hasSymbolSupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar toStr = Object.prototype.toString;\n\n\n// EXPORTS //\n\nexport default toStr;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// FUNCTIONS //\n\nvar has = Object.prototype.hasOwnProperty;\n\n\n// MAIN //\n\n/**\n* Tests if an object has a specified property.\n*\n* @param {*} value - value to test\n* @param {*} property - property to test\n* @returns {boolean} boolean indicating if an object has a specified property\n*\n* @example\n* var beep = {\n* 'boop': true\n* };\n*\n* var bool = hasOwnProp( beep, 'boop' );\n* // returns true\n*\n* @example\n* var beep = {\n* 'boop': true\n* };\n*\n* var bool = hasOwnProp( beep, 'bap' );\n* // returns false\n*/\nfunction hasOwnProp( value, property ) {\n\tif (\n\t\tvalue === void 0 ||\n\t\tvalue === null\n\t) {\n\t\treturn false;\n\t}\n\treturn has.call( value, property );\n}\n\n\n// EXPORTS //\n\nexport default hasOwnProp;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar Sym = ( typeof Symbol === 'function' ) ? Symbol : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default Sym;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport Symbol from '@stdlib/symbol-ctor';\n\n\n// MAIN //\n\nvar toStrTag = ( typeof Symbol === 'function' ) ? Symbol.toStringTag : '';\n\n\n// EXPORTS //\n\nexport default toStrTag;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Return a string value indicating a specification defined classification of an object.\n*\n* @module @stdlib/utils-native-class\n*\n* @example\n* import nativeClass from '@stdlib/utils-native-class';\n*\n* var str = nativeClass( 'a' );\n* // returns '[object String]'\n*\n* str = nativeClass( 5 );\n* // returns '[object Number]'\n*\n* function Beep() {\n* return this;\n* }\n* str = nativeClass( new Beep() );\n* // returns '[object Object]'\n*/\n\n// MODULES //\n\nimport hasToStringTag from '@stdlib/assert-has-tostringtag-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar main;\nif ( hasToStringTag() ) {\n\tmain = polyfill;\n} else {\n\tmain = builtin;\n}\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport hasOwnProp from '@stdlib/assert-has-own-property';\nimport toStringTag from './tostringtag.js';\nimport toStr from './tostring.js';\n\n\n// MAIN //\n\n/**\n* Returns a string value indicating a specification defined classification of an object in environments supporting `Symbol.toStringTag`.\n*\n* @param {*} v - input value\n* @returns {string} string value indicating a specification defined classification of the input value\n*\n* @example\n* var str = nativeClass( 'a' );\n* // returns '[object String]'\n*\n* @example\n* var str = nativeClass( 5 );\n* // returns '[object Number]'\n*\n* @example\n* function Beep() {\n* return this;\n* }\n* var str = nativeClass( new Beep() );\n* // returns '[object Object]'\n*/\nfunction nativeClass( v ) {\n\tvar isOwn;\n\tvar tag;\n\tvar out;\n\n\tif ( v === null || v === void 0 ) {\n\t\treturn toStr.call( v );\n\t}\n\ttag = v[ toStringTag ];\n\tisOwn = hasOwnProp( v, toStringTag );\n\n\t// Attempt to override the `toStringTag` property. For built-ins having a `Symbol.toStringTag` property (e.g., `JSON`, `Math`, etc), the `Symbol.toStringTag` property is read-only (e.g., , so we need to wrap in a `try/catch`.\n\ttry {\n\t\tv[ toStringTag ] = void 0;\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\treturn toStr.call( v );\n\t}\n\tout = toStr.call( v );\n\n\tif ( isOwn ) {\n\t\tv[ toStringTag ] = tag;\n\t} else {\n\t\tdelete v[ toStringTag ];\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default nativeClass;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport toStr from './tostring.js';\n\n\n// MAIN //\n\n/**\n* Returns a string value indicating a specification defined classification (via the internal property `[[Class]]`) of an object.\n*\n* @param {*} v - input value\n* @returns {string} string value indicating a specification defined classification of the input value\n*\n* @example\n* var str = nativeClass( 'a' );\n* // returns '[object String]'\n*\n* @example\n* var str = nativeClass( 5 );\n* // returns '[object Number]'\n*\n* @example\n* function Beep() {\n* return this;\n* }\n* var str = nativeClass( new Beep() );\n* // returns '[object Object]'\n*/\nfunction nativeClass( v ) {\n\treturn toStr.call( v );\n}\n\n\n// EXPORTS //\n\nexport default nativeClass;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// EXPORTS //\n\nexport default Number; // eslint-disable-line stdlib/require-globals\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport Number from '@stdlib/number-ctor';\n\n\n// MAIN //\n\n// eslint-disable-next-line stdlib/no-redeclare\nvar toString = Number.prototype.toString; // non-generic\n\n\n// EXPORTS //\n\nexport default toString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport hasToStringTag from '@stdlib/assert-has-tostringtag-support';\nimport nativeClass from '@stdlib/utils-native-class';\nimport Number from '@stdlib/number-ctor';\nimport test from './try2serialize.js';\n\n\n// VARIABLES //\n\nvar FLG = hasToStringTag();\n\n\n// MAIN //\n\n/**\n* Tests if a value is a number object.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number object\n*\n* @example\n* var bool = isNumber( 3.14 );\n* // returns false\n*\n* @example\n* var bool = isNumber( new Number( 3.14 ) );\n* // returns true\n*/\nfunction isNumber( value ) {\n\tif ( typeof value === 'object' ) {\n\t\tif ( value instanceof Number ) {\n\t\t\treturn true;\n\t\t}\n\t\tif ( FLG ) {\n\t\t\treturn test( value );\n\t\t}\n\t\treturn ( nativeClass( value ) === '[object Number]' );\n\t}\n\treturn false;\n}\n\n\n// EXPORTS //\n\nexport default isNumber;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport toString from './tostring.js'; // eslint-disable-line stdlib/no-redeclare\n\n\n// MAIN //\n\n/**\n* Attempts to serialize a value to a string.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value can be serialized\n*/\nfunction test( value ) {\n\ttry {\n\t\ttoString.call( value );\n\t\treturn true;\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\treturn false;\n\t}\n}\n\n\n// EXPORTS //\n\nexport default test;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a number.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a number\n*\n* @example\n* var bool = isNumber( 3.14 );\n* // returns true\n*\n* @example\n* var bool = isNumber( new Number( 3.14 ) );\n* // returns true\n*\n* @example\n* var bool = isNumber( NaN );\n* // returns true\n*\n* @example\n* var bool = isNumber( null );\n* // returns false\n*/\nfunction isNumber( value ) {\n\treturn ( isPrimitive( value ) || isObject( value ) );\n}\n\n\n// EXPORTS //\n\nexport default isNumber;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test if a value is a number.\n*\n* @module @stdlib/assert-is-number\n*\n* @example\n* import isNumber from '@stdlib/assert-is-number';\n*\n* var bool = isNumber( 3.14 );\n* // returns true\n*\n* bool = isNumber( new Number( 3.14 ) );\n* // returns true\n*\n* bool = isNumber( NaN );\n* // returns true\n*\n* bool = isNumber( null );\n* // returns false\n*\n* @example\n* import { isPrimitive as isNumber } from '@stdlib/assert-is-number';\n*\n* var bool = isNumber( 3.14 );\n* // returns true\n*\n* bool = isNumber( NaN );\n* // returns true\n*\n* bool = isNumber( new Number( 3.14 ) );\n* // returns false\n*\n* @example\n* import { isObject as isNumber } from '@stdlib/assert-is-number';\n*\n* var bool = isNumber( 3.14 );\n* // returns false\n*\n* bool = isNumber( new Number( 3.14 ) );\n* // returns true\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'isPrimitive', isPrimitive );\nsetReadOnly( main, 'isObject', isObject );\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Double-precision floating-point positive infinity.\n*\n* @module @stdlib/constants-float64-pinf\n* @type {number}\n*\n* @example\n* import FLOAT64_PINF from '@stdlib/constants-float64-pinf';\n* // returns Infinity\n*/\n\n\n// MAIN //\n\n/**\n* Double-precision floating-point positive infinity.\n*\n* ## Notes\n*\n* Double-precision floating-point positive infinity has the bit sequence\n*\n* ```binarystring\n* 0 11111111111 00000000000000000000 00000000000000000000000000000000\n* ```\n*\n* @constant\n* @type {number}\n* @default Number.POSITIVE_INFINITY\n* @see [IEEE 754]{@link https://en.wikipedia.org/wiki/IEEE_754-1985}\n*/\nvar FLOAT64_PINF = Number.POSITIVE_INFINITY; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default FLOAT64_PINF;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Double-precision floating-point negative infinity.\n*\n* @module @stdlib/constants-float64-ninf\n* @type {number}\n*\n* @example\n* import FLOAT64_NINF from '@stdlib/constants-float64-ninf';\n* // returns -Infinity\n*/\n\n// MODULES //\n\nimport Number from '@stdlib/number-ctor';\n\n\n// MAIN //\n\n/**\n* Double-precision floating-point negative infinity.\n*\n* ## Notes\n*\n* Double-precision floating-point negative infinity has the bit sequence\n*\n* ```binarystring\n* 1 11111111111 00000000000000000000 00000000000000000000000000000000\n* ```\n*\n* @constant\n* @type {number}\n* @default Number.NEGATIVE_INFINITY\n* @see [IEEE 754]{@link https://en.wikipedia.org/wiki/IEEE_754-1985}\n*/\nvar FLOAT64_NINF = Number.NEGATIVE_INFINITY;\n\n\n// EXPORTS //\n\nexport default FLOAT64_NINF;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: implementation (?)\n\n/**\n* Rounds a double-precision floating-point number toward negative infinity.\n*\n* @param {number} x - input value\n* @returns {number} rounded value\n*\n* @example\n* var v = floor( -4.2 );\n* // returns -5.0\n*\n* @example\n* var v = floor( 9.99999 );\n* // returns 9.0\n*\n* @example\n* var v = floor( 0.0 );\n* // returns 0.0\n*\n* @example\n* var v = floor( NaN );\n* // returns NaN\n*/\nvar floor = Math.floor; // eslint-disable-line stdlib/no-builtin-math\n\n\n// EXPORTS //\n\nexport default floor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport floor from '@stdlib/math-base-special-floor';\n\n\n// MAIN //\n\n/**\n* Tests if a finite double-precision floating-point number is an integer.\n*\n* @param {number} x - value to test\n* @returns {boolean} boolean indicating whether the value is an integer\n*\n* @example\n* var bool = isInteger( 1.0 );\n* // returns true\n*\n* @example\n* var bool = isInteger( 3.14 );\n* // returns false\n*/\nfunction isInteger( x ) {\n\treturn (floor(x) === x);\n}\n\n\n// EXPORTS //\n\nexport default isInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport PINF from '@stdlib/constants-float64-pinf';\nimport NINF from '@stdlib/constants-float64-ninf';\nimport isInt from '@stdlib/math-base-assert-is-integer';\n\n\n// MAIN //\n\n/**\n* Tests if a number primitive is an integer value.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a number primitive is an integer value\n*/\nfunction isInteger( value ) {\n\treturn (\n\t\tvalue < PINF &&\n\t\tvalue > NINF &&\n\t\tisInt( value )\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isNumber } from '@stdlib/assert-is-number';\nimport isInt from './integer.js';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a number primitive having an integer value.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number primitive having an integer value\n*\n* @example\n* var bool = isInteger( -3.0 );\n* // returns true\n*\n* @example\n* var bool = isInteger( new Number( -3.0 ) );\n* // returns false\n*/\nfunction isInteger( value ) {\n\treturn (\n\t\tisNumber( value ) &&\n\t\tisInt( value )\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isObject as isNumber } from '@stdlib/assert-is-number';\nimport isInt from './integer.js';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a number object having an integer value.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number object having an integer value\n*\n* @example\n* var bool = isInteger( 3.0 );\n* // returns false\n*\n* @example\n* var bool = isInteger( new Number( 3.0 ) );\n* // returns true\n*/\nfunction isInteger( value ) {\n\treturn (\n\t\tisNumber( value ) &&\n\t\tisInt( value.valueOf() )\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\n/**\n* Tests if a value is an integer.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an integer\n*\n* @example\n* var bool = isInteger( 5.0 );\n* // returns true\n*\n* @example\n* var bool = isInteger( new Number( 5.0 ) );\n* // returns true\n*\n* @example\n* var bool = isInteger( -3.14 );\n* // returns false\n*\n* @example\n* var bool = isInteger( null );\n* // returns false\n*/\nfunction isInteger( value ) {\n\treturn ( isPrimitive( value ) || isObject( value ) );\n}\n\n\n// EXPORTS //\n\nexport default isInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isInteger } from '@stdlib/assert-is-integer';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a number primitive having a nonnegative integer value.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number primitive having a nonnegative integer value\n*\n* @example\n* var bool = isNonNegativeInteger( 3.0 );\n* // returns true\n*\n* @example\n* var bool = isNonNegativeInteger( new Number( 3.0 ) );\n* // returns false\n*/\nfunction isNonNegativeInteger( value ) {\n\treturn (\n\t\tisInteger( value ) &&\n\t\tvalue >= 0\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isNonNegativeInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isObject as isInteger } from '@stdlib/assert-is-integer';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a number object having a nonnegative integer value.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number object having a nonnegative integer value\n*\n* @example\n* var bool = isNonNegativeInteger( 3.0 );\n* // returns false\n*\n* @example\n* var bool = isNonNegativeInteger( new Number( 3.0 ) );\n* // returns true\n*/\nfunction isNonNegativeInteger( value ) {\n\treturn (\n\t\tisInteger( value ) &&\n\t\tvalue.valueOf() >= 0\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isNonNegativeInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a nonnegative integer.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a nonnegative integer\n*\n* @example\n* var bool = isNonNegativeInteger( 5.0 );\n* // returns true\n*\n* @example\n* var bool = isNonNegativeInteger( new Number( 5.0 ) );\n* // returns true\n*\n* @example\n* var bool = isNonNegativeInteger( -5.0 );\n* // returns false\n*\n* @example\n* var bool = isNonNegativeInteger( 3.14 );\n* // returns false\n*\n* @example\n* var bool = isNonNegativeInteger( null );\n* // returns false\n*/\nfunction isNonNegativeInteger( value ) {\n\treturn ( isPrimitive( value ) || isObject( value ) );\n}\n\n\n// EXPORTS //\n\nexport default isNonNegativeInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test if a value is an integer.\n*\n* @module @stdlib/assert-is-integer\n*\n* @example\n* import isInteger from '@stdlib/assert-is-integer';\n*\n* var bool = isInteger( 5.0 );\n* // returns true\n*\n* bool = isInteger( new Number( 5.0 ) );\n* // returns true\n*\n* bool = isInteger( -3.14 );\n* // returns false\n*\n* bool = isInteger( null );\n* // returns false\n*\n* @example\n* // Use interface to check for integer primitives...\n* import { isPrimitive as isInteger } from '@stdlib/assert-is-integer';\n*\n* var bool = isInteger( -3.0 );\n* // returns true\n*\n* bool = isInteger( new Number( -3.0 ) );\n* // returns false\n*\n* @example\n* // Use interface to check for integer objects...\n* import { isObject as isInteger } from '@stdlib/assert-is-integer';\n*\n* var bool = isInteger( 3.0 );\n* // returns false\n*\n* bool = isInteger( new Number( 3.0 ) );\n* // returns true\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'isPrimitive', isPrimitive );\nsetReadOnly( main, 'isObject', isObject );\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test if a value is a nonnegative integer.\n*\n* @module @stdlib/assert-is-nonnegative-integer\n*\n* @example\n* import isNonNegativeInteger from '@stdlib/assert-is-nonnegative-integer';\n*\n* var bool = isNonNegativeInteger( 5.0 );\n* // returns true\n*\n* bool = isNonNegativeInteger( new Number( 5.0 ) );\n* // returns true\n*\n* bool = isNonNegativeInteger( -5.0 );\n* // returns false\n*\n* bool = isNonNegativeInteger( 3.14 );\n* // returns false\n*\n* bool = isNonNegativeInteger( null );\n* // returns false\n*\n* @example\n* import { isPrimitive as isNonNegativeInteger } from '@stdlib/assert-is-nonnegative-integer';\n*\n* var bool = isNonNegativeInteger( 3.0 );\n* // returns true\n*\n* bool = isNonNegativeInteger( new Number( 3.0 ) );\n* // returns false\n*\n* @example\n* import { isObject as isNonNegativeInteger } from '@stdlib/assert-is-nonnegative-integer';\n*\n* var bool = isNonNegativeInteger( 3.0 );\n* // returns false\n*\n* bool = isNonNegativeInteger( new Number( 3.0 ) );\n* // returns true\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'isPrimitive', isPrimitive );\nsetReadOnly( main, 'isObject', isObject );\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasFloat64Array = ( typeof Float64Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Float64Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a Float64Array\n*\n* @example\n* var bool = isFloat64Array( new Float64Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isFloat64Array( [] );\n* // returns false\n*/\nfunction isFloat64Array( value ) {\n\treturn (\n\t\t( hasFloat64Array && value instanceof Float64Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Float64Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isFloat64Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Float64Array === 'function' ) ? Float64Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Float64Array === 'function' ) ? Float64Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of double-precision floating-point numbers in the platform byte order.\n*\n* @module @stdlib/array-float64\n*\n* @example\n* import ctor from '@stdlib/array-float64';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasFloat64ArraySupport from '@stdlib/assert-has-float64array-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasFloat64ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isFloat64Array from '@stdlib/assert-is-float64array';\nimport GlobalFloat64Array from './float64array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Float64Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Float64Array` support\n*\n* @example\n* var bool = hasFloat64ArraySupport();\n* // returns \n*/\nfunction hasFloat64ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalFloat64Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = new GlobalFloat64Array( [ 1.0, 3.14, -3.14, NaN ] );\n\t\tbool = (\n\t\t\tisFloat64Array( arr ) &&\n\t\t\tarr[ 0 ] === 1.0 &&\n\t\t\tarr[ 1 ] === 3.14 &&\n\t\t\tarr[ 2 ] === -3.14 &&\n\t\t\tarr[ 3 ] !== arr[ 3 ]\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasFloat64ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of double-precision floating-point numbers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasFloat32Array = ( typeof Float32Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Float32Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a Float32Array\n*\n* @example\n* var bool = isFloat32Array( new Float32Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isFloat32Array( [] );\n* // returns false\n*/\nfunction isFloat32Array( value ) {\n\treturn (\n\t\t( hasFloat32Array && value instanceof Float32Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Float32Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isFloat32Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Float32Array === 'function' ) ? Float32Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Float32Array === 'function' ) ? Float32Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of single-precision floating-point numbers in the platform byte order.\n*\n* @module @stdlib/array-float32\n*\n* @example\n* import ctor from '@stdlib/array-float32';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasFloat32ArraySupport from '@stdlib/assert-has-float32array-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasFloat32ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isFloat32Array from '@stdlib/assert-is-float32array';\nimport PINF from '@stdlib/constants-float64-pinf';\nimport GlobalFloat32Array from './float32array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Float32Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Float32Array` support\n*\n* @example\n* var bool = hasFloat32ArraySupport();\n* // returns \n*/\nfunction hasFloat32ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalFloat32Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = new GlobalFloat32Array( [ 1.0, 3.14, -3.14, 5.0e40 ] );\n\t\tbool = (\n\t\t\tisFloat32Array( arr ) &&\n\t\t\tarr[ 0 ] === 1.0 &&\n\t\t\tarr[ 1 ] === 3.140000104904175 &&\n\t\t\tarr[ 2 ] === -3.140000104904175 &&\n\t\t\tarr[ 3 ] === PINF\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasFloat32ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of single-precision floating-point numbers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasInt16Array = ( typeof Int16Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is an Int16Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an Int16Array\n*\n* @example\n* var bool = isInt16Array( new Int16Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isInt16Array( [] );\n* // returns false\n*/\nfunction isInt16Array( value ) {\n\treturn (\n\t\t( hasInt16Array && value instanceof Int16Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Int16Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isInt16Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum signed 16-bit integer.\n*\n* @module @stdlib/constants-int16-max\n* @type {integer32}\n*\n* @example\n* import INT16_MAX from '@stdlib/constants-int16-max';\n* // returns 32767\n*/\n\n\n// MAIN //\n\n/**\n* Maximum signed 16-bit integer.\n*\n* ## Notes\n*\n* The number has the value\n*\n* ```tex\n* 2^{15} - 1\n* ```\n*\n* which corresponds to the bit sequence\n*\n* ```binarystring\n* 0111111111111111\n* ```\n*\n* @constant\n* @type {integer32}\n* @default 32767\n*/\nvar INT16_MAX = 32767|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default INT16_MAX;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Int16Array === 'function' ) ? Int16Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Int16Array === 'function' ) ? Int16Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of twos-complement 16-bit signed integers in the platform byte order.\n*\n* @module @stdlib/array-int16\n*\n* @example\n* import ctor from '@stdlib/array-int16';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasInt16ArraySupport from '@stdlib/assert-has-int16array-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasInt16ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isInt16Array from '@stdlib/assert-is-int16array';\nimport INT16_MAX from '@stdlib/constants-int16-max';\nimport INT16_MIN from '@stdlib/constants-int16-min';\nimport GlobalInt16Array from './int16array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Int16Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Int16Array` support\n*\n* @example\n* var bool = hasInt16ArraySupport();\n* // returns \n*/\nfunction hasInt16ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalInt16Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = new GlobalInt16Array( [ 1, 3.14, -3.14, INT16_MAX+1 ] );\n\t\tbool = (\n\t\t\tisInt16Array( arr ) &&\n\t\t\tarr[ 0 ] === 1 &&\n\t\t\tarr[ 1 ] === 3 && // truncation\n\t\t\tarr[ 2 ] === -3 && // truncation\n\t\t\tarr[ 3 ] === INT16_MIN // wrap around\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasInt16ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Minimum signed 16-bit integer.\n*\n* @module @stdlib/constants-int16-min\n* @type {integer32}\n*\n* @example\n* import INT16_MIN from '@stdlib/constants-int16-min';\n* // returns -32768\n*/\n\n\n// MAIN //\n\n/**\n* Minimum signed 16-bit integer.\n*\n* ## Notes\n*\n* The number has the value\n*\n* ```tex\n* -(2^{15})\n* ```\n*\n* which corresponds to the two's complement bit sequence\n*\n* ```binarystring\n* 1000000000000000\n* ```\n*\n* @constant\n* @type {integer32}\n* @default -32768\n*/\nvar INT16_MIN = -32768|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default INT16_MIN;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of twos-complement 16-bit signed integers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasInt32Array = ( typeof Int32Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is an Int32Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an Int32Array\n*\n* @example\n* var bool = isInt32Array( new Int32Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isInt32Array( [] );\n* // returns false\n*/\nfunction isInt32Array( value ) {\n\treturn (\n\t\t( hasInt32Array && value instanceof Int32Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Int32Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isInt32Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum signed 32-bit integer.\n*\n* @module @stdlib/constants-int32-max\n* @type {integer32}\n*\n* @example\n* import INT32_MAX from '@stdlib/constants-int32-max';\n* // returns 2147483647\n*/\n\n\n// MAIN //\n\n/**\n* Maximum signed 32-bit integer.\n*\n* ## Notes\n*\n* The number has the value\n*\n* ```tex\n* 2^{31} - 1\n* ```\n*\n* which corresponds to the bit sequence\n*\n* ```binarystring\n* 01111111111111111111111111111111\n* ```\n*\n* @constant\n* @type {integer32}\n* @default 2147483647\n*/\nvar INT32_MAX = 2147483647|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default INT32_MAX;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Int32Array === 'function' ) ? Int32Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Int32Array === 'function' ) ? Int32Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of twos-complement 32-bit signed integers in the platform byte order.\n*\n* @module @stdlib/array-int32\n*\n* @example\n* import ctor from '@stdlib/array-int32';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasInt32ArraySupport from '@stdlib/assert-has-int32array-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasInt32ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isInt32Array from '@stdlib/assert-is-int32array';\nimport INT32_MAX from '@stdlib/constants-int32-max';\nimport INT32_MIN from '@stdlib/constants-int32-min';\nimport GlobalInt32Array from './int32array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Int32Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Int32Array` support\n*\n* @example\n* var bool = hasInt32ArraySupport();\n* // returns \n*/\nfunction hasInt32ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalInt32Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = new GlobalInt32Array( [ 1, 3.14, -3.14, INT32_MAX+1 ] );\n\t\tbool = (\n\t\t\tisInt32Array( arr ) &&\n\t\t\tarr[ 0 ] === 1 &&\n\t\t\tarr[ 1 ] === 3 && // truncation\n\t\t\tarr[ 2 ] === -3 && // truncation\n\t\t\tarr[ 3 ] === INT32_MIN // wrap around\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasInt32ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Minimum signed 32-bit integer.\n*\n* @module @stdlib/constants-int32-min\n* @type {integer32}\n*\n* @example\n* import INT32_MIN from '@stdlib/constants-int32-min';\n* // returns -2147483648\n*/\n\n\n// MAIN //\n\n/**\n* Minimum signed 32-bit integer.\n*\n* ## Notes\n*\n* The number has the value\n*\n* ```tex\n* -(2^{31})\n* ```\n*\n* which corresponds to the two's complement bit sequence\n*\n* ```binarystring\n* 10000000000000000000000000000000\n* ```\n*\n* @constant\n* @type {integer32}\n* @default -2147483648\n*/\nvar INT32_MIN = -2147483648|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default INT32_MIN;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of twos-complement 32-bit signed integers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasInt8Array = ( typeof Int8Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is an Int8Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an Int8Array\n*\n* @example\n* var bool = isInt8Array( new Int8Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isInt8Array( [] );\n* // returns false\n*/\nfunction isInt8Array( value ) {\n\treturn (\n\t\t( hasInt8Array && value instanceof Int8Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Int8Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isInt8Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum signed 8-bit integer.\n*\n* @module @stdlib/constants-int8-max\n* @type {integer32}\n*\n* @example\n* import INT8_MAX from '@stdlib/constants-int8-max';\n* // returns 127\n*/\n\n\n// MAIN //\n\n/**\n* Maximum signed 8-bit integer.\n*\n* ## Notes\n*\n* The number is given by\n*\n* ```tex\n* 2^{7} - 1\n* ```\n*\n* which corresponds to the bit sequence\n*\n* ```binarystring\n* 01111111\n* ```\n*\n* @constant\n* @type {integer32}\n* @default 127\n*/\nvar INT8_MAX = 127|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default INT8_MAX;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Int8Array === 'function' ) ? Int8Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Int8Array === 'function' ) ? Int8Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of twos-complement 8-bit signed integers in the platform byte order.\n*\n* @module @stdlib/array-int8\n*\n* @example\n* import ctor from '@stdlib/array-int8';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasInt8ArraySupport from '@stdlib/assert-has-int8array-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasInt8ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isInt8Array from '@stdlib/assert-is-int8array';\nimport INT8_MAX from '@stdlib/constants-int8-max';\nimport INT8_MIN from '@stdlib/constants-int8-min';\nimport GlobalInt8Array from './int8array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Int8Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Int8Array` support\n*\n* @example\n* var bool = hasInt8ArraySupport();\n* // returns \n*/\nfunction hasInt8ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalInt8Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = new GlobalInt8Array( [ 1, 3.14, -3.14, INT8_MAX+1 ] );\n\t\tbool = (\n\t\t\tisInt8Array( arr ) &&\n\t\t\tarr[ 0 ] === 1 &&\n\t\t\tarr[ 1 ] === 3 && // truncation\n\t\t\tarr[ 2 ] === -3 && // truncation\n\t\t\tarr[ 3 ] === INT8_MIN // wrap around\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasInt8ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Minimum signed 8-bit integer.\n*\n* @module @stdlib/constants-int8-min\n* @type {integer32}\n*\n* @example\n* import INT8_MIN from '@stdlib/constants-int8-min';\n* // returns -128\n*/\n\n\n// MAIN //\n\n/**\n* Minimum signed 8-bit integer.\n*\n* ## Notes\n*\n* The number is given by\n*\n* ```tex\n* -(2^{7})\n* ```\n*\n* which corresponds to the two's complement bit sequence\n*\n* ```binarystring\n* 10000000\n* ```\n*\n* @constant\n* @type {integer32}\n* @default -128\n*/\nvar INT8_MIN = -128|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default INT8_MIN;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of twos-complement 8-bit signed integers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasUint16Array = ( typeof Uint16Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Uint16Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a Uint16Array\n*\n* @example\n* var bool = isUint16Array( new Uint16Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isUint16Array( [] );\n* // returns false\n*/\nfunction isUint16Array( value ) {\n\treturn (\n\t\t( hasUint16Array && value instanceof Uint16Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Uint16Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isUint16Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum unsigned 16-bit integer.\n*\n* @module @stdlib/constants-uint16-max\n* @type {integer32}\n*\n* @example\n* import UINT16_MAX from '@stdlib/constants-uint16-max';\n* // returns 65535\n*/\n\n\n// MAIN //\n\n/**\n* Maximum unsigned 16-bit integer.\n*\n* ## Notes\n*\n* The number has the value\n*\n* ```tex\n* 2^{16} - 1\n* ```\n*\n* which corresponds to the bit sequence\n*\n* ```binarystring\n* 1111111111111111\n* ```\n*\n* @constant\n* @type {integer32}\n* @default 65535\n*/\nvar UINT16_MAX = 65535|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default UINT16_MAX;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Uint16Array === 'function' ) ? Uint16Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Uint16Array === 'function' ) ? Uint16Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of 16-bit unsigned integers in the platform byte order.\n*\n* @module @stdlib/array-uint16\n*\n* @example\n* import ctor from '@stdlib/array-uint16';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasUint16ArraySupport from '@stdlib/assert-has-uint16array-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasUint16ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isUint16Array from '@stdlib/assert-is-uint16array';\nimport UINT16_MAX from '@stdlib/constants-uint16-max';\nimport GlobalUint16Array from './uint16array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Uint16Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Uint16Array` support\n*\n* @example\n* var bool = hasUint16ArraySupport();\n* // returns \n*/\nfunction hasUint16ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalUint16Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = [ 1, 3.14, -3.14, UINT16_MAX+1, UINT16_MAX+2 ];\n\t\tarr = new GlobalUint16Array( arr );\n\t\tbool = (\n\t\t\tisUint16Array( arr ) &&\n\t\t\tarr[ 0 ] === 1 &&\n\t\t\tarr[ 1 ] === 3 && // truncation\n\t\t\tarr[ 2 ] === UINT16_MAX-2 && // truncation and wrap around\n\t\t\tarr[ 3 ] === 0 && // wrap around\n\t\t\tarr[ 4 ] === 1 // wrap around\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasUint16ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of 16-bit unsigned integers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasUint32Array = ( typeof Uint32Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Uint32Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a Uint32Array\n*\n* @example\n* var bool = isUint32Array( new Uint32Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isUint32Array( [] );\n* // returns false\n*/\nfunction isUint32Array( value ) {\n\treturn (\n\t\t( hasUint32Array && value instanceof Uint32Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Uint32Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isUint32Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum unsigned 32-bit integer.\n*\n* @module @stdlib/constants-uint32-max\n* @type {uinteger32}\n*\n* @example\n* import UINT32_MAX from '@stdlib/constants-uint32-max';\n* // returns 4294967295\n*/\n\n\n// MAIN //\n\n/**\n* Maximum unsigned 32-bit integer.\n*\n* ## Notes\n*\n* The number has the value\n*\n* ```tex\n* 2^{32} - 1\n* ```\n*\n* which corresponds to the bit sequence\n*\n* ```binarystring\n* 11111111111111111111111111111111\n* ```\n*\n* @constant\n* @type {uinteger32}\n* @default 4294967295\n*/\nvar UINT32_MAX = 4294967295;\n\n\n// EXPORTS //\n\nexport default UINT32_MAX;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Uint32Array === 'function' ) ? Uint32Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Uint32Array === 'function' ) ? Uint32Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of 32-bit unsigned integers in the platform byte order.\n*\n* @module @stdlib/array-uint32\n*\n* @example\n* import ctor from '@stdlib/array-uint32';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasUint32ArraySupport from '@stdlib/assert-has-uint32array-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasUint32ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isUint32Array from '@stdlib/assert-is-uint32array';\nimport UINT32_MAX from '@stdlib/constants-uint32-max';\nimport GlobalUint32Array from './uint32array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Uint32Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Uint32Array` support\n*\n* @example\n* var bool = hasUint32ArraySupport();\n* // returns \n*/\nfunction hasUint32ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalUint32Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = [ 1, 3.14, -3.14, UINT32_MAX+1, UINT32_MAX+2 ];\n\t\tarr = new GlobalUint32Array( arr );\n\t\tbool = (\n\t\t\tisUint32Array( arr ) &&\n\t\t\tarr[ 0 ] === 1 &&\n\t\t\tarr[ 1 ] === 3 && // truncation\n\t\t\tarr[ 2 ] === UINT32_MAX-2 && // truncation and wrap around\n\t\t\tarr[ 3 ] === 0 && // wrap around\n\t\t\tarr[ 4 ] === 1 // wrap around\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasUint32ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of 32-bit unsigned integers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasUint8Array = ( typeof Uint8Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Uint8Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a Uint8Array\n*\n* @example\n* var bool = isUint8Array( new Uint8Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isUint8Array( [] );\n* // returns false\n*/\nfunction isUint8Array( value ) {\n\treturn (\n\t\t( hasUint8Array && value instanceof Uint8Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Uint8Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isUint8Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum unsigned 8-bit integer.\n*\n* @module @stdlib/constants-uint8-max\n* @type {integer32}\n*\n* @example\n* import UINT8_MAX from '@stdlib/constants-uint8-max';\n* // returns 255\n*/\n\n\n// MAIN //\n\n/**\n* Maximum unsigned 8-bit integer.\n*\n* ## Notes\n*\n* The number has the value\n*\n* ```tex\n* 2^{8} - 1\n* ```\n*\n* which corresponds to the bit sequence\n*\n* ```binarystring\n* 11111111\n* ```\n*\n* @constant\n* @type {integer32}\n* @default 255\n*/\nvar UINT8_MAX = 255|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default UINT8_MAX;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Uint8Array === 'function' ) ? Uint8Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Uint8Array === 'function' ) ? Uint8Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of 8-bit unsigned integers in the platform byte order.\n*\n* @module @stdlib/array-uint8\n*\n* @example\n* import ctor from '@stdlib/array-uint8';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasUint8ArraySupport from '@stdlib/assert-has-uint8array-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasUint8ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isUint8Array from '@stdlib/assert-is-uint8array';\nimport UINT8_MAX from '@stdlib/constants-uint8-max';\nimport GlobalUint8Array from './uint8array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Uint8Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Uint8Array` support\n*\n* @example\n* var bool = hasUint8ArraySupport();\n* // returns \n*/\nfunction hasUint8ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalUint8Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = [ 1, 3.14, -3.14, UINT8_MAX+1, UINT8_MAX+2 ];\n\t\tarr = new GlobalUint8Array( arr );\n\t\tbool = (\n\t\t\tisUint8Array( arr ) &&\n\t\t\tarr[ 0 ] === 1 &&\n\t\t\tarr[ 1 ] === 3 && // truncation\n\t\t\tarr[ 2 ] === UINT8_MAX-2 && // truncation and wrap around\n\t\t\tarr[ 3 ] === 0 && // wrap around\n\t\t\tarr[ 4 ] === 1 // wrap around\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasUint8ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of 8-bit unsigned integers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasUint8ClampedArray = ( typeof Uint8ClampedArray === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Uint8ClampedArray.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a Uint8ClampedArray\n*\n* @example\n* var bool = isUint8ClampedArray( new Uint8ClampedArray( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isUint8ClampedArray( [] );\n* // returns false\n*/\nfunction isUint8ClampedArray( value ) {\n\treturn (\n\t\t( hasUint8ClampedArray && value instanceof Uint8ClampedArray ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Uint8ClampedArray]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isUint8ClampedArray;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Uint8ClampedArray === 'function' ) ? Uint8ClampedArray : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Uint8ClampedArray === 'function' ) ? Uint8ClampedArray : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of 8-bit unsigned integers in the platform byte order clamped to 0-255.\n*\n* @module @stdlib/array-uint8c\n*\n* @example\n* import ctor from '@stdlib/array-uint8c';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasUint8ClampedArraySupport from '@stdlib/assert-has-uint8clampedarray-support'; // eslint-disable-line id-length\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasUint8ClampedArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isUint8ClampedArray from '@stdlib/assert-is-uint8clampedarray';\nimport GlobalUint8ClampedArray from './uint8clampedarray.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Uint8ClampedArray` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Uint8ClampedArray` support\n*\n* @example\n* var bool = hasUint8ClampedArraySupport();\n* // returns \n*/\nfunction hasUint8ClampedArraySupport() { // eslint-disable-line id-length\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalUint8ClampedArray !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = new GlobalUint8ClampedArray( [ -1, 0, 1, 3.14, 4.99, 255, 256 ] );\n\t\tbool = (\n\t\t\tisUint8ClampedArray( arr ) &&\n\t\t\tarr[ 0 ] === 0 && // clamped\n\t\t\tarr[ 1 ] === 0 &&\n\t\t\tarr[ 2 ] === 1 &&\n\t\t\tarr[ 3 ] === 3 && // round to nearest\n\t\t\tarr[ 4 ] === 5 && // round to nearest\n\t\t\tarr[ 5 ] === 255 &&\n\t\t\tarr[ 6 ] === 255 // clamped\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasUint8ClampedArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of 8-bit unsigned integers in the platform byte order clamped to 0-255.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum length of a generic array.\n*\n* @module @stdlib/constants-array-max-array-length\n*\n* @example\n* import MAX_ARRAY_LENGTH from '@stdlib/constants-array-max-array-length';\n* // returns 4294967295\n*/\n\n// MAIN //\n\n/**\n* Maximum length of a generic array.\n*\n* ```tex\n* 2^{32} - 1\n* ```\n*\n* @constant\n* @type {uinteger32}\n* @default 4294967295\n*/\nvar MAX_ARRAY_LENGTH = 4294967295>>>0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default MAX_ARRAY_LENGTH;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isInteger from '@stdlib/math-base-assert-is-integer';\nimport MAX_LENGTH from '@stdlib/constants-array-max-array-length';\n\n\n// MAIN //\n\n/**\n* Tests if a value is an array-like object.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is an array-like object\n*\n* @example\n* var bool = isArrayLikeObject( [] );\n* // returns true\n*\n* @example\n* var bool = isArrayLikeObject( { 'length':10 } );\n* // returns true\n*\n* @example\n* var bool = isArrayLikeObject( 'beep' );\n* // returns false\n*/\nfunction isArrayLikeObject( value ) {\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\ttypeof value.length === 'number' &&\n\t\tisInteger( value.length ) &&\n\t\tvalue.length >= 0 &&\n\t\tvalue.length <= MAX_LENGTH\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isArrayLikeObject;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum length of a typed array.\n*\n* @module @stdlib/constants-array-max-typed-array-length\n*\n* @example\n* import MAX_TYPED_ARRAY_LENGTH from '@stdlib/constants-array-max-typed-array-length';\n* // returns 9007199254740991\n*/\n\n// MAIN //\n\n/**\n* Maximum length of a typed array.\n*\n* ```tex\n* 2^{53} - 1\n* ```\n*\n* @constant\n* @type {number}\n* @default 9007199254740991\n*/\nvar MAX_TYPED_ARRAY_LENGTH = 9007199254740991;\n\n\n// EXPORTS //\n\nexport default MAX_TYPED_ARRAY_LENGTH;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isInteger from '@stdlib/math-base-assert-is-integer';\nimport MAX_LENGTH from '@stdlib/constants-array-max-typed-array-length';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a collection.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether a value is a collection\n*\n* @example\n* var bool = isCollection( [] );\n* // returns true\n*\n* @example\n* var bool = isCollection( {} );\n* // returns false\n*/\nfunction isCollection( value ) {\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\ttypeof value.length === 'number' &&\n\t\tisInteger( value.length ) &&\n\t\tvalue.length >= 0 &&\n\t\tvalue.length <= MAX_LENGTH\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isCollection;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasArrayBuffer = ( typeof ArrayBuffer === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is an ArrayBuffer.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an ArrayBuffer\n*\n* @example\n* import ArrayBuffer from '@stdlib/array-buffer';\n*\n* var bool = isArrayBuffer( new ArrayBuffer( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isArrayBuffer( [] );\n* // returns false\n*/\nfunction isArrayBuffer( value ) {\n\treturn (\n\t\t( hasArrayBuffer && value instanceof ArrayBuffer ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object ArrayBuffer]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isArrayBuffer;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar f;\n\n\n// FUNCTIONS //\n\n/**\n* Tests if a value is an array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an array\n*\n* @example\n* var bool = isArray( [] );\n* // returns true\n*\n* @example\n* var bool = isArray( {} );\n* // returns false\n*/\nfunction isArray( value ) {\n\treturn ( nativeClass( value ) === '[object Array]' );\n}\n\n\n// MAIN //\n\nif ( Array.isArray ) {\n\tf = Array.isArray;\n} else {\n\tf = isArray;\n}\n\n\n// EXPORTS //\n\nexport default f;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isArray from '@stdlib/assert-is-array';\n\n\n// MAIN //\n\n/**\n* Tests if a value is an object; e.g., `{}`.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an object\n*\n* @example\n* var bool = isObject( {} );\n* // returns true\n*\n* @example\n* var bool = isObject( null );\n* // returns false\n*/\nfunction isObject( value ) {\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\t!isArray( value )\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isObject;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Tests if a value is a string primitive.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a string primitive\n*\n* @example\n* var bool = isString( 'beep' );\n* // returns true\n*\n* @example\n* var bool = isString( new String( 'beep' ) );\n* // returns false\n*/\nfunction isString( value ) {\n\treturn ( typeof value === 'string' );\n}\n\n\n// EXPORTS //\n\nexport default isString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// eslint-disable-next-line stdlib/no-redeclare\nvar valueOf = String.prototype.valueOf; // non-generic\n\n\n// EXPORTS //\n\nexport default valueOf;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport hasToStringTag from '@stdlib/assert-has-tostringtag-support';\nimport nativeClass from '@stdlib/utils-native-class';\nimport test from './try2valueof.js';\n\n\n// VARIABLES //\n\nvar FLG = hasToStringTag();\n\n\n// MAIN //\n\n/**\n* Tests if a value is a string object.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a string object\n*\n* @example\n* var bool = isString( new String( 'beep' ) );\n* // returns true\n*\n* @example\n* var bool = isString( 'beep' );\n* // returns false\n*/\nfunction isString( value ) {\n\tif ( typeof value === 'object' ) {\n\t\tif ( value instanceof String ) {\n\t\t\treturn true;\n\t\t}\n\t\tif ( FLG ) {\n\t\t\treturn test( value );\n\t\t}\n\t\treturn ( nativeClass( value ) === '[object String]' );\n\t}\n\treturn false;\n}\n\n\n// EXPORTS //\n\nexport default isString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport valueOf from './valueof.js'; // eslint-disable-line stdlib/no-redeclare\n\n\n// MAIN //\n\n/**\n* Attempts to extract a string value.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a string can be extracted\n*/\nfunction test( value ) {\n\ttry {\n\t\tvalueOf.call( value );\n\t\treturn true;\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\treturn false;\n\t}\n}\n\n\n// EXPORTS //\n\nexport default test;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a string.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a string\n*\n* @example\n* var bool = isString( new String( 'beep' ) );\n* // returns true\n*\n* @example\n* var bool = isString( 'beep' );\n* // returns true\n*/\nfunction isString( value ) {\n\treturn ( isPrimitive( value ) || isObject( value ) );\n}\n\n\n// EXPORTS //\n\nexport default isString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test if a value is a string.\n*\n* @module @stdlib/assert-is-string\n*\n* @example\n* import isString from '@stdlib/assert-is-string';\n*\n* var bool = isString( 'beep' );\n* // returns true\n*\n* bool = isString( new String( 'beep' ) );\n* // returns true\n*\n* bool = isString( 5 );\n* // returns false\n*\n* @example\n* import { isObject as isString } from '@stdlib/assert-is-string';\n*\n* var bool = isString( new String( 'beep' ) );\n* // returns true\n*\n* bool = isString( 'beep' );\n* // returns false\n*\n* @example\n* import { isPrimitive as isString } from '@stdlib/assert-is-string';\n*\n* var bool = isString( 'beep' );\n* // returns true\n*\n* bool = isString( new String( 'beep' ) );\n* // returns false\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'isPrimitive', isPrimitive );\nsetReadOnly( main, 'isObject', isObject );\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\nvar RE = /./;\n\n\n// EXPORTS //\n\nexport default RE;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Tests if a value is a boolean primitive.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a boolean primitive\n*\n* @example\n* var bool = isBoolean( true );\n* // returns true\n*\n* @example\n* var bool = isBoolean( false );\n* // returns true\n*\n* @example\n* import Boolean from '@stdlib/boolean-ctor';\n*\n* var bool = isBoolean( new Boolean( true ) );\n* // returns false\n*/\nfunction isBoolean( value ) {\n\treturn ( typeof value === 'boolean' );\n}\n\n\n// EXPORTS //\n\nexport default isBoolean;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Returns a boolean.\n*\n* @name Boolean\n* @constructor\n* @type {Function}\n* @param {*} value - input value\n* @returns {(boolean|Boolean)} boolean\n*\n* @example\n* var b = Boolean( null );\n* // returns false\n*\n* b = Boolean( [] );\n* // returns true\n*\n* b = Boolean( {} );\n* // returns true\n*\n* @example\n* var b = new Boolean( false );\n* // returns \n*/\nvar Bool = Boolean; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default Bool;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// eslint-disable-next-line stdlib/no-redeclare\nvar toString = Boolean.prototype.toString; // non-generic\n\n\n// EXPORTS //\n\nexport default toString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport hasToStringTag from '@stdlib/assert-has-tostringtag-support';\nimport nativeClass from '@stdlib/utils-native-class';\nimport Boolean from '@stdlib/boolean-ctor';\nimport test from './try2serialize.js';\n\n\n// VARIABLES //\n\nvar FLG = hasToStringTag();\n\n\n// MAIN //\n\n/**\n* Tests if a value is a boolean object.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a boolean object\n*\n* @example\n* var bool = isBoolean( true );\n* // returns false\n*\n* @example\n* import Boolean from '@stdlib/boolean-ctor';\n*\n* var bool = isBoolean( new Boolean( false ) );\n* // returns true\n*/\nfunction isBoolean( value ) {\n\tif ( typeof value === 'object' ) {\n\t\tif ( value instanceof Boolean ) {\n\t\t\treturn true;\n\t\t}\n\t\tif ( FLG ) {\n\t\t\treturn test( value );\n\t\t}\n\t\treturn ( nativeClass( value ) === '[object Boolean]' );\n\t}\n\treturn false;\n}\n\n\n// EXPORTS //\n\nexport default isBoolean;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport toString from './tostring.js'; // eslint-disable-line stdlib/no-redeclare\n\n\n// MAIN //\n\n/**\n* Attempts to serialize a value to a string.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value can be serialized\n*/\nfunction test( value ) {\n\ttry {\n\t\ttoString.call( value );\n\t\treturn true;\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\treturn false;\n\t}\n}\n\n\n// EXPORTS //\n\nexport default test;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a boolean.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a boolean\n*\n* @example\n* var bool = isBoolean( false );\n* // returns true\n*\n* @example\n* var bool = isBoolean( true );\n* // returns true\n*\n* @example\n* import Boolean from '@stdlib/boolean-ctor';\n*\n* var bool = isBoolean( new Boolean( false ) );\n* // returns true\n*\n* @example\n* import Boolean from '@stdlib/boolean-ctor';\n*\n* var bool = isBoolean( new Boolean( true ) );\n* // returns true\n*/\nfunction isBoolean( value ) {\n\treturn ( isPrimitive( value ) || isObject( value ) );\n}\n\n\n// EXPORTS //\n\nexport default isBoolean;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test if a value is a boolean.\n*\n* @module @stdlib/assert-is-boolean\n*\n* @example\n* import Boolean from '@stdlib/boolean-ctor';\n* import isBoolean from '@stdlib/assert-is-boolean';\n*\n* var bool = isBoolean( false );\n* // returns true\n*\n* bool = isBoolean( new Boolean( false ) );\n* // returns true\n*\n* @example\n* import Boolean from '@stdlib/boolean-ctor';\n* import { isPrimitive as isBoolean } from '@stdlib/assert-is-boolean';\n*\n* var bool = isBoolean( false );\n* // returns true\n*\n* bool = isBoolean( new Boolean( true ) );\n* // returns false\n*\n* @example\n* import Boolean from '@stdlib/boolean-ctor';\n* import { isObject as isBoolean } from '@stdlib/assert-is-boolean';\n*\n* var bool = isBoolean( true );\n* // returns false\n*\n* bool = isBoolean( new Boolean( false ) );\n* // returns true\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'isPrimitive', isPrimitive );\nsetReadOnly( main, 'isObject', isObject );\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar obj = ( typeof self === 'object' ) ? self : null;\n\n\n// EXPORTS //\n\nexport default obj;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar obj = ( typeof window === 'object' ) ? window : null;\n\n\n// EXPORTS //\n\nexport default obj;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar obj = ( typeof global === 'object' ) ? global : null;\n\n\n// EXPORTS //\n\nexport default obj;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar obj = ( typeof globalThis === 'object' ) ? globalThis : null; // eslint-disable-line no-undef\n\n\n// EXPORTS //\n\nexport default obj;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport getGlobal from '@stdlib/utils-global';\n\n\n// MAIN //\n\nvar root = getGlobal();\nvar nodeList = root.document && root.document.childNodes;\n\n\n// EXPORTS //\n\nexport default nodeList;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isBoolean } from '@stdlib/assert-is-boolean';\nimport format from '@stdlib/string-format';\nimport getThis from './codegen.js';\nimport Self from './self.js';\nimport Win from './window.js';\nimport Global from './global.js';\nimport GlobalThis from './global_this.js';\n\n\n// MAIN //\n\n/**\n* Returns the global object.\n*\n* ## Notes\n*\n* - Using code generation is the **most** reliable way to resolve the global object; however, doing so is likely to violate content security policies (CSPs) in, e.g., Chrome Apps and elsewhere.\n*\n* @param {boolean} [codegen=false] - boolean indicating whether to use code generation to resolve the global object\n* @throws {TypeError} must provide a boolean\n* @throws {Error} unable to resolve global object\n* @returns {Object} global object\n*\n* @example\n* var g = getGlobal();\n* // returns {...}\n*/\nfunction getGlobal( codegen ) {\n\tif ( arguments.length ) {\n\t\tif ( !isBoolean( codegen ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Must provide a boolean. Value: `%s`.', codegen ) );\n\t\t}\n\t\tif ( codegen ) {\n\t\t\treturn getThis();\n\t\t}\n\t\t// Fall through...\n\t}\n\t// Case: 2020 revision of ECMAScript standard\n\tif ( GlobalThis ) {\n\t\treturn GlobalThis;\n\t}\n\t// Case: browsers and web workers\n\tif ( Self ) {\n\t\treturn Self;\n\t}\n\t// Case: browsers\n\tif ( Win ) {\n\t\treturn Win;\n\t}\n\t// Case: Node.js\n\tif ( Global ) {\n\t\treturn Global;\n\t}\n\t// Case: unknown\n\tthrow new Error( 'unexpected error. Unable to resolve global object.' );\n}\n\n\n// EXPORTS //\n\nexport default getGlobal;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Returns the global object using code generation.\n*\n* @private\n* @returns {Object} global object\n*/\nfunction getGlobal() {\n\treturn new Function( 'return this;' )(); // eslint-disable-line no-new-func, stdlib/require-globals\n}\n\n\n// EXPORTS //\n\nexport default getGlobal;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\nvar typedarray = Int8Array; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default typedarray;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Returns a regular expression to capture everything that is not a space immediately after the `function` keyword and before the first left parenthesis.\n*\n* @returns {RegExp} regular expression\n*\n* @example\n* var RE_FUNCTION_NAME = reFunctionName();\n*\n* function fname( fcn ) {\n* return RE_FUNCTION_NAME.exec( fcn.toString() )[ 1 ];\n* }\n*\n* var fn = fname( Math.sqrt );\n* // returns 'sqrt'\n*\n* fn = fname( Int8Array );\n* // returns 'Int8Array'\n*\n* fn = fname( Object.prototype.toString );\n* // returns 'toString'\n*\n* fn = fname( function(){} );\n* // returns ''\n*/\nfunction reFunctionName() {\n\treturn /^\\s*function\\s*([^(]*)/i;\n}\n\n\n// EXPORTS //\n\nexport default reFunctionName;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport reFunctionName from './main.js';\n\n\n// MAIN //\n\n/**\n* Captures everything that is not a space immediately after the `function` keyword and before the first left parenthesis.\n*\n* Regular expression: `/^\\s*function\\s*([^(]*)/i`\n*\n* - `/^\\s*`\n* - Match zero or more spaces at beginning\n*\n* - `function`\n* - Match the word `function`\n*\n* - `\\s*`\n* - Match zero or more spaces after the word `function`\n*\n* - `()`\n* - Capture\n*\n* - `[^(]*`\n* - Match anything except a left parenthesis `(` zero or more times\n*\n* - `/i`\n* - ignore case\n*\n* @constant\n* @type {RegExp}\n* @default /^\\s*function\\s*([^(]*)/i\n*/\nvar RE_FUNCTION_NAME = reFunctionName();\n\n\n// EXPORTS //\n\nexport default RE_FUNCTION_NAME;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Tests if a value is object-like.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether a value is object-like\n*\n* @example\n* var bool = isObjectLike( {} );\n* // returns true\n*\n* @example\n* var bool = isObjectLike( [] );\n* // returns true\n*\n* @example\n* var bool = isObjectLike( null );\n* // returns false\n*/\nfunction isObjectLike( value ) {\n\treturn (\n\t\tvalue !== null &&\n\t\ttypeof value === 'object'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isObjectLike;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\nimport { REGEXP as RE } from '@stdlib/regexp-function-name';\nimport isBuffer from '@stdlib/assert-is-buffer';\n\n\n// MAIN //\n\n/**\n* Determines the name of a value's constructor.\n*\n* @param {*} v - input value\n* @returns {string} name of a value's constructor\n*\n* @example\n* var v = constructorName( 'a' );\n* // returns 'String'\n*\n* @example\n* var v = constructorName( 5 );\n* // returns 'Number'\n*\n* @example\n* var v = constructorName( null );\n* // returns 'Null'\n*\n* @example\n* var v = constructorName( undefined );\n* // returns 'Undefined'\n*\n* @example\n* var v = constructorName( function noop() {} );\n* // returns 'Function'\n*/\nfunction constructorName( v ) {\n\tvar match;\n\tvar name;\n\tvar ctor;\n\tname = nativeClass( v ).slice( 8, -1 );\n\tif ( (name === 'Object' || name === 'Error') && v.constructor ) {\n\t\tctor = v.constructor;\n\t\tif ( typeof ctor.name === 'string' ) {\n\t\t\treturn ctor.name;\n\t\t}\n\t\tmatch = RE.exec( ctor.toString() );\n\t\tif ( match ) {\n\t\t\treturn match[ 1 ];\n\t\t}\n\t}\n\tif ( isBuffer( v ) ) {\n\t\treturn 'Buffer';\n\t}\n\treturn name;\n}\n\n\n// EXPORTS //\n\nexport default constructorName;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isObjectLike from '@stdlib/assert-is-object-like';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Buffer instance.\n*\n* @param {*} value - value to validate\n* @returns {boolean} boolean indicating if a value is a Buffer instance\n*\n* @example\n* var v = isBuffer( new Buffer( 'beep' ) );\n* // returns true\n*\n* @example\n* var v = isBuffer( new Buffer( [1,2,3,4] ) );\n* // returns true\n*\n* @example\n* var v = isBuffer( {} );\n* // returns false\n*\n* @example\n* var v = isBuffer( [] );\n* // returns false\n*/\nfunction isBuffer( value ) {\n\treturn (\n\t\tisObjectLike( value ) &&\n\t\t(\n\t\t\t// eslint-disable-next-line no-underscore-dangle\n\t\t\tvalue._isBuffer || // for envs missing Object.prototype.constructor (e.g., Safari 5-7)\n\t\t\t(\n\t\t\t\tvalue.constructor &&\n\n\t\t\t\t// WARNING: `typeof` is not a foolproof check, as certain envs consider RegExp and NodeList instances to be functions\n\t\t\t\ttypeof value.constructor.isBuffer === 'function' &&\n\t\t\t\tvalue.constructor.isBuffer( value )\n\t\t\t)\n\t\t)\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isBuffer;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Regular expression to capture everything that is not a space immediately after the `function` keyword and before the first left parenthesis.\n*\n* @module @stdlib/regexp-function-name\n*\n* @example\n* import reFunctionName from '@stdlib/regexp-function-name';\n* var RE_FUNCTION_NAME = reFunctionName();\n*\n* function fname( fcn ) {\n* return RE_FUNCTION_NAME.exec( fcn.toString() )[ 1 ];\n* }\n*\n* var fn = fname( Math.sqrt );\n* // returns 'sqrt'\n*\n* fn = fname( Int8Array );\n* // returns 'Int8Array'\n*\n* fn = fname( Object.prototype.toString );\n* // returns 'toString'\n*\n* fn = fname( function(){} );\n* // returns ''\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport REGEXP from './regexp.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'REGEXP', REGEXP );\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test if a value is object-like.\n*\n* @module @stdlib/assert-is-object-like\n*\n* @example\n* import isObjectLike from '@stdlib/assert-is-object-like';\n*\n* var bool = isObjectLike( {} );\n* // returns true\n*\n* bool = isObjectLike( [] );\n* // returns true\n*\n* bool = isObjectLike( null );\n* // returns false\n*\n* @example\n* import { isObjectLikeArray as isObjectLike } from '@stdlib/assert-is-object-like';\n*\n* var bool = isObjectLike( [ {}, [] ] );\n* // returns true\n*\n* bool = isObjectLike( [ {}, '3.0' ] );\n* // returns false\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport arrayfun from '@stdlib/assert-tools-array-function';\nimport main from './main.js';\n\n\n// VARIABLES //\n\nvar isObjectLikeArray = arrayfun( main );\n\n\n// MAIN //\n\nsetReadOnly( main, 'isObjectLikeArray', isObjectLikeArray );\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isArray from '@stdlib/assert-is-array';\nimport format from '@stdlib/string-format';\n\n\n// MAIN //\n\n/**\n* Returns a function which tests if every element in an array passes a test condition.\n*\n* @param {Function} predicate - function to apply\n* @throws {TypeError} must provide a function\n* @returns {Function} an array function\n*\n* @example\n* import isOdd from '@stdlib/assert-is-odd';\n*\n* var arr1 = [ 1, 3, 5, 7 ];\n* var arr2 = [ 3, 5, 8 ];\n*\n* var validate = arrayfcn( isOdd );\n*\n* var bool = validate( arr1 );\n* // returns true\n*\n* bool = validate( arr2 );\n* // returns false\n*/\nfunction arrayfcn( predicate ) {\n\tif ( typeof predicate !== 'function' ) {\n\t\tthrow new TypeError( format( 'invalid argument. Must provide a function. Value: `%s`.', predicate ) );\n\t}\n\treturn every;\n\n\t/**\n\t* Tests if every element in an array passes a test condition.\n\t*\n\t* @private\n\t* @param {*} value - value to test\n\t* @returns {boolean} boolean indicating whether a value is an array for which all elements pass a test condition\n\t*/\n\tfunction every( value ) {\n\t\tvar len;\n\t\tvar i;\n\t\tif ( !isArray( value ) ) {\n\t\t\treturn false;\n\t\t}\n\t\tlen = value.length;\n\t\tif ( len === 0 ) {\n\t\t\treturn false;\n\t\t}\n\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\tif ( predicate( value[ i ] ) === false ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}\n}\n\n\n// EXPORTS //\n\nexport default arrayfcn;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Determine a value's type.\n*\n* @module @stdlib/utils-type-of\n*\n* @example\n* import typeOf from '@stdlib/utils-type-of';\n*\n* var str = typeOf( 'a' );\n* // returns 'string'\n*\n* str = typeOf( 5 );\n* // returns 'number'\n*/\n\n// MODULES //\n\nimport usePolyfill from './check.js';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar main = ( usePolyfill() ) ? polyfill : builtin;\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport RE from './fixtures/re.js';\nimport nodeList from './fixtures/nodelist.js';\nimport typedarray from './fixtures/typedarray.js';\n\n\n// MAIN //\n\n/**\n* Checks whether a polyfill is needed when using the `typeof` operator.\n*\n* @private\n* @returns {boolean} boolean indicating whether a polyfill is needed\n*/\nfunction check() {\n\tif (\n\t\t// Chrome 1-12 returns 'function' for regular expression instances (see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/typeof):\n\t\ttypeof RE === 'function' ||\n\n\t\t// Safari 8 returns 'object' for typed array and weak map constructors (underscore #1929):\n\t\ttypeof typedarray === 'object' ||\n\n\t\t// PhantomJS 1.9 returns 'function' for `NodeList` instances (underscore #2236):\n\t\ttypeof nodeList === 'function'\n\t) {\n\t\treturn true;\n\t}\n\treturn false;\n}\n\n\n// EXPORTS //\n\nexport default check;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport ctorName from '@stdlib/utils-constructor-name';\n\n\n// MAIN //\n\n/**\n* Determines a value's type.\n*\n* @param {*} v - input value\n* @returns {string} string indicating the value's type\n*/\nfunction typeOf( v ) {\n\treturn ctorName( v ).toLowerCase();\n}\n\n\n// EXPORTS //\n\nexport default typeOf;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport ctorName from '@stdlib/utils-constructor-name';\n\n\n// NOTES //\n\n/*\n* Built-in `typeof` operator behavior:\n*\n* ```text\n* typeof null => 'object'\n* typeof undefined => 'undefined'\n* typeof 'a' => 'string'\n* typeof 5 => 'number'\n* typeof NaN => 'number'\n* typeof true => 'boolean'\n* typeof false => 'boolean'\n* typeof {} => 'object'\n* typeof [] => 'object'\n* typeof function foo(){} => 'function'\n* typeof function* foo(){} => 'object'\n* typeof Symbol() => 'symbol'\n* ```\n*\n*/\n\n\n// MAIN //\n\n/**\n* Determines a value's type.\n*\n* @param {*} v - input value\n* @returns {string} string indicating the value's type\n*/\nfunction typeOf( v ) {\n\tvar type;\n\n\t// Address `typeof null` => `object` (see http://wiki.ecmascript.org/doku.php?id=harmony:typeof_null):\n\tif ( v === null ) {\n\t\treturn 'null';\n\t}\n\ttype = typeof v;\n\n\t// If the `typeof` operator returned something other than `object`, we are done. Otherwise, we need to check for an internal class name or search for a constructor.\n\tif ( type === 'object' ) {\n\t\treturn ctorName( v ).toLowerCase();\n\t}\n\treturn type;\n}\n\n\n// EXPORTS //\n\nexport default typeOf;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport typeOf from '@stdlib/utils-type-of';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a function.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a function\n*\n* @example\n* function beep() {\n* return 'beep';\n* }\n*\n* var bool = isFunction( beep );\n* // returns true\n*/\nfunction isFunction( value ) {\n\t// Note: cannot use `typeof` directly, as various browser engines incorrectly return `'function'` when operating on non-function objects, such as regular expressions and NodeLists.\n\treturn ( typeOf( value ) === 'function' );\n}\n\n\n// EXPORTS //\n\nexport default isFunction;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isNumber } from '@stdlib/assert-is-number';\nimport defineProperty from '@stdlib/utils-define-property';\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport format from '@stdlib/string-format';\nimport toStr from './tostring.js';\nimport toJSON from './tojson.js';\n\n\n// MAIN //\n\n/**\n* 128-bit complex number constructor.\n*\n* @constructor\n* @param {number} real - real component\n* @param {number} imag - imaginary component\n* @throws {TypeError} must invoke using the `new` keyword\n* @throws {TypeError} real component must be a number\n* @throws {TypeError} imaginary component must be a number\n* @returns {Complex128} 128-bit complex number\n*\n* @example\n* var z = new Complex128( 5.0, 3.0 );\n* // returns \n*/\nfunction Complex128( real, imag ) {\n\tif ( !( this instanceof Complex128 ) ) {\n\t\tthrow new TypeError( 'invalid invocation. Constructor must be called with the `new` keyword.' );\n\t}\n\tif ( !isNumber( real ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Real component must be a number. Value: `%s`.', real ) );\n\t}\n\tif ( !isNumber( imag ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Imaginary component must be a number. Value: `%s`.', imag ) );\n\t}\n\tdefineProperty( this, 're', {\n\t\t'configurable': false,\n\t\t'enumerable': true,\n\t\t'writable': false,\n\t\t'value': real\n\t});\n\tdefineProperty( this, 'im', {\n\t\t'configurable': false,\n\t\t'enumerable': true,\n\t\t'writable': false,\n\t\t'value': imag\n\t});\n\treturn this;\n}\n\n/**\n* Size (in bytes) of each component.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex128\n* @type {integer}\n* @returns {integer} size of each component\n*\n* @example\n* var nbytes = Complex128.BYTES_PER_ELEMENT;\n* // returns 8\n*/\nsetReadOnly( Complex128, 'BYTES_PER_ELEMENT', 8 );\n\n/**\n* Size (in bytes) of each component.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex128.prototype\n* @type {integer}\n* @returns {integer} size of each component\n*\n* @example\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var nbytes = z.BYTES_PER_ELEMENT;\n* // returns 8\n*/\nsetReadOnly( Complex128.prototype, 'BYTES_PER_ELEMENT', 8 );\n\n/**\n* Length (in bytes) of a complex number.\n*\n* @name byteLength\n* @memberof Complex128.prototype\n* @type {integer}\n* @returns {integer} byte length\n*\n* @example\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var nbytes = z.byteLength;\n* // returns 16\n*/\nsetReadOnly( Complex128.prototype, 'byteLength', 16 );\n\n/**\n* Serializes a complex number as a string.\n*\n* @name toString\n* @memberof Complex128.prototype\n* @type {Function}\n* @returns {string} serialized complex number\n*\n* @example\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var str = z.toString();\n* // returns '5 + 3i'\n*/\nsetReadOnly( Complex128.prototype, 'toString', toStr );\n\n/**\n* Serializes a complex number as a JSON object.\n*\n* ## Notes\n*\n* - `JSON.stringify()` implicitly calls this method when stringifying a `Complex128` instance.\n*\n* @name toJSON\n* @memberof Complex128.prototype\n* @type {Function}\n* @returns {Object} serialized complex number\n*\n* @example\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var obj = z.toJSON();\n* // returns { 'type': 'Complex128', 're': 5.0, 'im': 3.0 }\n*/\nsetReadOnly( Complex128.prototype, 'toJSON', toJSON );\n\n\n// EXPORTS //\n\nexport default Complex128;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Serializes a complex number as a string.\n*\n* @private\n* @returns {string} serialized complex number\n*/\nfunction toString() { // eslint-disable-line stdlib/no-redeclare\n\t/* eslint-disable no-invalid-this */\n\tvar str = '' + this.re;\n\tif ( this.im < 0 ) {\n\t\tstr += ' - ' + (-this.im);\n\t} else {\n\t\tstr += ' + ' + this.im;\n\t}\n\tstr += 'i';\n\treturn str;\n}\n\n\n// EXPORTS //\n\nexport default toString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Serializes a complex number as a JSON object.\n*\n* @private\n* @returns {Object} JSON representation\n*/\nfunction toJSON() {\n\t/* eslint-disable no-invalid-this */\n\tvar out = {};\n\tout.type = 'Complex128';\n\tout.re = this.re;\n\tout.im = this.im;\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default toJSON;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar fround = ( typeof Math.fround === 'function' ) ? Math.fround : null; // eslint-disable-line stdlib/no-builtin-math\n\n\n// EXPORTS //\n\nexport default fround;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport Float32Array from '@stdlib/array-float32';\n\n\n// VARIABLES //\n\nvar FLOAT32_VIEW = new Float32Array( 1 );\n\n\n// MAIN //\n\n/**\n* Converts a double-precision floating-point number to the nearest single-precision floating-point number.\n*\n* @param {number} x - double-precision floating-point number\n* @returns {number} nearest single-precision floating-point number\n*\n* @example\n* var y = float64ToFloat32( 1.337 );\n* // returns 1.3370000123977661\n*/\nfunction float64ToFloat32( x ) {\n\tFLOAT32_VIEW[ 0 ] = x;\n\treturn FLOAT32_VIEW[ 0 ];\n}\n\n\n// EXPORTS //\n\nexport default float64ToFloat32;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Convert a double-precision floating-point number to the nearest single-precision floating-point number.\n*\n* @module @stdlib/number-float64-base-to-float32\n*\n* @example\n* import float64ToFloat32 from '@stdlib/number-float64-base-to-float32';\n*\n* var y = float64ToFloat32( 1.337 );\n* // returns 1.3370000123977661\n*/\n\n// MODULES //\n\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar float64ToFloat32;\nif ( typeof builtin === 'function' ) {\n\tfloat64ToFloat32 = builtin;\n} else {\n\tfloat64ToFloat32 = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default float64ToFloat32;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isNumber } from '@stdlib/assert-is-number';\nimport defineProperty from '@stdlib/utils-define-property';\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport float64ToFloat32 from '@stdlib/number-float64-base-to-float32';\nimport format from '@stdlib/string-format';\nimport toStr from './tostring.js';\nimport toJSON from './tojson.js';\n\n\n// MAIN //\n\n/**\n* 64-bit complex number constructor.\n*\n* @constructor\n* @param {number} real - real component\n* @param {number} imag - imaginary component\n* @throws {TypeError} must invoke using the `new` keyword\n* @throws {TypeError} real component must be a number\n* @throws {TypeError} imaginary component must be a number\n* @returns {Complex64} 64-bit complex number\n*\n* @example\n* var z = new Complex64( 5.0, 3.0 );\n* // returns \n*/\nfunction Complex64( real, imag ) {\n\tif ( !( this instanceof Complex64 ) ) {\n\t\tthrow new TypeError( 'invalid invocation. Constructor must be called with the `new` keyword.' );\n\t}\n\tif ( !isNumber( real ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Real component must be a number. Value: `%s`.', real ) );\n\t}\n\tif ( !isNumber( imag ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Imaginary component must be a number. Value: `%s`.', imag ) );\n\t}\n\tdefineProperty( this, 're', {\n\t\t'configurable': false,\n\t\t'enumerable': true,\n\t\t'writable': false,\n\t\t'value': float64ToFloat32( real )\n\t});\n\tdefineProperty( this, 'im', {\n\t\t'configurable': false,\n\t\t'enumerable': true,\n\t\t'writable': false,\n\t\t'value': float64ToFloat32( imag )\n\t});\n\treturn this;\n}\n\n/**\n* Size (in bytes) of each component.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex64\n* @type {integer}\n* @returns {integer} size of each component\n*\n* @example\n* var nbytes = Complex64.BYTES_PER_ELEMENT;\n* // returns 4\n*/\nsetReadOnly( Complex64, 'BYTES_PER_ELEMENT', 4 );\n\n/**\n* Size (in bytes) of each component.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex64.prototype\n* @type {integer}\n* @returns {integer} size of each component\n*\n* @example\n* var z = new Complex64( 5.0, 3.0 );\n*\n* var nbytes = z.BYTES_PER_ELEMENT;\n* // returns 4\n*/\nsetReadOnly( Complex64.prototype, 'BYTES_PER_ELEMENT', 4 );\n\n/**\n* Length (in bytes) of a complex number.\n*\n* @name byteLength\n* @memberof Complex64.prototype\n* @type {integer}\n* @returns {integer} byte length\n*\n* @example\n* var z = new Complex64( 5.0, 3.0 );\n*\n* var nbytes = z.byteLength;\n* // returns 8\n*/\nsetReadOnly( Complex64.prototype, 'byteLength', 8 );\n\n/**\n* Serializes a complex number as a string.\n*\n* @name toString\n* @memberof Complex64.prototype\n* @type {Function}\n* @returns {string} serialized complex number\n*\n* @example\n* var z = new Complex64( 5.0, 3.0 );\n*\n* var str = z.toString();\n* // returns '5 + 3i'\n*/\nsetReadOnly( Complex64.prototype, 'toString', toStr );\n\n/**\n* Serializes a complex number as a JSON object.\n*\n* ## Notes\n*\n* - `JSON.stringify()` implicitly calls this method when stringifying a `Complex64` instance.\n*\n* @name toJSON\n* @memberof Complex64.prototype\n* @type {Function}\n* @returns {Object} serialized complex number\n*\n* @example\n* var z = new Complex64( 5.0, 3.0 );\n*\n* var obj = z.toJSON();\n* // returns { 'type': 'Complex64', 're': 5.0, 'im': 3.0 }\n*/\nsetReadOnly( Complex64.prototype, 'toJSON', toJSON );\n\n\n// EXPORTS //\n\nexport default Complex64;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport Complex128 from '@stdlib/complex-float64-ctor';\nimport Complex64 from '@stdlib/complex-float32-ctor';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a complex number-like object.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a complex number-like object.\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64-ctor';\n* import Complex64 from '@stdlib/complex-float32-ctor';\n*\n* var x = new Complex128( 4.0, 2.0 );\n* var bool = isComplexLike( x );\n* // returns true\n*\n* x = new Complex64( 4.0, 2.0 );\n* bool = isComplexLike( x );\n* // returns true\n*/\nfunction isComplexLike( value ) {\n\tif ( value instanceof Complex128 || value instanceof Complex64 ) {\n\t\treturn true;\n\t}\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\ttypeof value.re === 'number' &&\n\t\ttypeof value.im === 'number'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isComplexLike;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isInteger from '@stdlib/math-base-assert-is-integer';\n\n\n// MAIN //\n\n/**\n* Tests if a finite numeric value is an even number.\n*\n* @param {number} x - value to test\n* @returns {boolean} boolean indicating whether the value is an even number\n*\n* @example\n* var bool = isEven( 5.0 );\n* // returns false\n*\n* @example\n* var bool = isEven( -2.0 );\n* // returns true\n*\n* @example\n* var bool = isEven( 0.0 );\n* // returns true\n*\n* @example\n* var bool = isEven( NaN );\n* // returns false\n*/\nfunction isEven( x ) {\n\treturn isInteger( x/2.0 );\n}\n\n\n// EXPORTS //\n\nexport default isEven;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Serializes a complex number as a string.\n*\n* @private\n* @returns {string} serialized complex number\n*/\nfunction toString() { // eslint-disable-line stdlib/no-redeclare\n\t/* eslint-disable no-invalid-this */\n\tvar str = '' + this.re;\n\tif ( this.im < 0 ) {\n\t\tstr += ' - ' + (-this.im);\n\t} else {\n\t\tstr += ' + ' + this.im;\n\t}\n\tstr += 'i';\n\treturn str;\n}\n\n\n// EXPORTS //\n\nexport default toString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Serializes a complex number as a JSON object.\n*\n* @private\n* @returns {Object} JSON representation\n*/\nfunction toJSON() {\n\t/* eslint-disable no-invalid-this */\n\tvar out = {};\n\tout.type = 'Complex64';\n\tout.re = this.re;\n\tout.im = this.im;\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default toJSON;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// VARIABLES //\n\nvar BYTES_PER_ELEMENT = 8; // 4 bytes per float32 x (1 real + 1 imag component)\n\n\n// MAIN //\n\n/**\n* Returns a boolean indicating if a value is a `Complex64Array`.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a `Complex64Array`\n*\n* @example\n* import Complex64Array from '@stdlib/array-complex64';\n*\n* var bool = isComplex64Array( new Complex64Array( 10 ) );\n* // returns true\n*\n* bool = isComplex64Array( [] );\n* // returns false\n*/\nfunction isComplex64Array( value ) {\n\t// Note: the following is not robust and that is intentional. In this case, we are seeking a lower cost way to reasonably determine whether an input value is a `Complex64Array` in order to avoid walking the prototype chain and resolving constructors, which is necessary for robust identification of cross-realm instances. For more robust validation, see `@stdlib/assert/is-complex64array`.\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\tvalue.constructor.name === 'Complex64Array' &&\n\t\tvalue.BYTES_PER_ELEMENT === BYTES_PER_ELEMENT\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isComplex64Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// VARIABLES //\n\nvar BYTES_PER_ELEMENT = 16; // 8 bytes per float64 x (1 real + 1 imag component)\n\n\n// MAIN //\n\n/**\n* Returns a boolean indicating if a value is a `Complex128Array`.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a `Complex128Array`\n*\n* @example\n* import Complex128Array from '@stdlib/array-complex128';\n*\n* var bool = isComplex128Array( new Complex128Array( 10 ) );\n* // returns true\n*\n* bool = isComplex128Array( [] );\n* // returns false\n*/\nfunction isComplex128Array( value ) {\n\t// Note: the following is not robust and that is intentional. In this case, we are seeking a lower cost way to reasonably determine whether an input value is a `Complex128Array` in order to avoid walking the prototype chain and resolving constructors, which is necessary for robust identification of cross-realm instances. For more robust validation, see `@stdlib/assert/is-complex128array`.\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\tvalue.constructor.name === 'Complex128Array' &&\n\t\tvalue.BYTES_PER_ELEMENT === BYTES_PER_ELEMENT\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isComplex128Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport hasOwnProp from '@stdlib/assert-has-own-property';\nimport Symbol from '@stdlib/symbol-ctor';\n\n\n// MAIN //\n\n/**\n* Tests for native `Symbol.iterator` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Symbol.iterator` support\n*\n* @example\n* var bool = hasIteratorSymbolSupport();\n* // returns \n*/\nfunction hasIteratorSymbolSupport() {\n\treturn (\n\t\ttypeof Symbol === 'function' &&\n\t\ttypeof Symbol( 'foo' ) === 'symbol' &&\n\t\thasOwnProp( Symbol, 'iterator' ) &&\n\t\ttypeof Symbol.iterator === 'symbol'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default hasIteratorSymbolSupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport hasIteratorSymbolSupport from '@stdlib/assert-has-iterator-symbol-support';\n\n\n// MAIN //\n\n/**\n* Iterator symbol.\n*\n* @name IteratorSymbol\n* @constant\n* @type {(symbol|null)}\n*\n* @example\n* function iterator() {\n* var it;\n* var i;\n*\n* i = -1;\n*\n* it = {};\n* it.next = next;\n* it.return = done;\n*\n* if ( IteratorSymbol ) {\n* it[ IteratorSymbol ] = iterator;\n* }\n* return it;\n*\n* function next() {\n* i += 1;\n* return {\n* 'value': i,\n* 'done': false\n* };\n* }\n*\n* function done( value ) {\n* if ( arguments.length === 0 ) {\n* return {\n* 'done': true\n* };\n* }\n* return {\n* 'value': value,\n* 'done': true\n* };\n* }\n* }\n*\n* var obj = iterator();\n*/\nvar IteratorSymbol = ( hasIteratorSymbolSupport() ) ? Symbol.iterator : null;\n\n\n// EXPORTS //\n\nexport default IteratorSymbol;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport defineProperty from '@stdlib/utils-define-property';\n\n\n// MAIN //\n\n/**\n* Defines a non-enumerable read-only accessor.\n*\n* @param {Object} obj - object on which to define the property\n* @param {(string|symbol)} prop - property name\n* @param {Function} getter - accessor\n*\n* @example\n* function getter() {\n* return 'bar';\n* }\n*\n* var obj = {};\n*\n* setNonEnumerableReadOnlyAccessor( obj, 'foo', getter );\n*\n* try {\n* obj.foo = 'boop';\n* } catch ( err ) {\n* console.error( err.message );\n* }\n*/\nfunction setNonEnumerableReadOnlyAccessor( obj, prop, getter ) { // eslint-disable-line id-length\n\tdefineProperty( obj, prop, {\n\t\t'configurable': false,\n\t\t'enumerable': false,\n\t\t'get': getter\n\t});\n}\n\n\n// EXPORTS //\n\nexport default setNonEnumerableReadOnlyAccessor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isNumber } from '@stdlib/assert-is-number';\nimport defineProperty from '@stdlib/utils-define-property';\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport float64ToFloat32 from '@stdlib/number-float64-base-to-float32';\nimport format from '@stdlib/string-format';\nimport toStr from './tostring.js';\nimport toJSON from './tojson.js';\n\n\n// MAIN //\n\n/**\n* 64-bit complex number constructor.\n*\n* @constructor\n* @param {number} real - real component\n* @param {number} imag - imaginary component\n* @throws {TypeError} must invoke using the `new` keyword\n* @throws {TypeError} real component must be a number\n* @throws {TypeError} imaginary component must be a number\n* @returns {Complex64} 64-bit complex number\n*\n* @example\n* var z = new Complex64( 5.0, 3.0 );\n* // returns \n*/\nfunction Complex64( real, imag ) {\n\tif ( !( this instanceof Complex64 ) ) {\n\t\tthrow new TypeError( 'invalid invocation. Constructor must be called with the `new` keyword.' );\n\t}\n\tif ( !isNumber( real ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Real component must be a number. Value: `%s`.', real ) );\n\t}\n\tif ( !isNumber( imag ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Imaginary component must be a number. Value: `%s`.', imag ) );\n\t}\n\tdefineProperty( this, 're', {\n\t\t'configurable': false,\n\t\t'enumerable': true,\n\t\t'writable': false,\n\t\t'value': float64ToFloat32( real )\n\t});\n\tdefineProperty( this, 'im', {\n\t\t'configurable': false,\n\t\t'enumerable': true,\n\t\t'writable': false,\n\t\t'value': float64ToFloat32( imag )\n\t});\n\treturn this;\n}\n\n/**\n* Size (in bytes) of each component.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex64\n* @type {integer}\n* @returns {integer} size of each component\n*\n* @example\n* var nbytes = Complex64.BYTES_PER_ELEMENT;\n* // returns 4\n*/\nsetReadOnly( Complex64, 'BYTES_PER_ELEMENT', 4 );\n\n/**\n* Size (in bytes) of each component.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex64.prototype\n* @type {integer}\n* @returns {integer} size of each component\n*\n* @example\n* var z = new Complex64( 5.0, 3.0 );\n*\n* var nbytes = z.BYTES_PER_ELEMENT;\n* // returns 4\n*/\nsetReadOnly( Complex64.prototype, 'BYTES_PER_ELEMENT', 4 );\n\n/**\n* Length (in bytes) of a complex number.\n*\n* @name byteLength\n* @memberof Complex64.prototype\n* @type {integer}\n* @returns {integer} byte length\n*\n* @example\n* var z = new Complex64( 5.0, 3.0 );\n*\n* var nbytes = z.byteLength;\n* // returns 8\n*/\nsetReadOnly( Complex64.prototype, 'byteLength', 8 );\n\n/**\n* Serializes a complex number as a string.\n*\n* @name toString\n* @memberof Complex64.prototype\n* @type {Function}\n* @returns {string} serialized complex number\n*\n* @example\n* var z = new Complex64( 5.0, 3.0 );\n*\n* var str = z.toString();\n* // returns '5 + 3i'\n*/\nsetReadOnly( Complex64.prototype, 'toString', toStr );\n\n/**\n* Serializes a complex number as a JSON object.\n*\n* ## Notes\n*\n* - `JSON.stringify()` implicitly calls this method when stringifying a `Complex64` instance.\n*\n* @name toJSON\n* @memberof Complex64.prototype\n* @type {Function}\n* @returns {Object} serialized complex number\n*\n* @example\n* var z = new Complex64( 5.0, 3.0 );\n*\n* var obj = z.toJSON();\n* // returns { 'type': 'Complex64', 're': 5.0, 'im': 3.0 }\n*/\nsetReadOnly( Complex64.prototype, 'toJSON', toJSON );\n\n\n// EXPORTS //\n\nexport default Complex64;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Returns the real component of a single-precision complex floating-point number.\n*\n* @param {Complex} z - complex number\n* @returns {number} real component\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n*\n* var z = new Complex64( 5.0, 3.0 );\n*\n* var re = realf( z );\n* // returns 5.0\n*/\nfunction realf( z ) {\n\treturn z.re;\n}\n\n\n// EXPORTS //\n\nexport default realf;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Returns the imaginary component of a single-precision complex floating-point number.\n*\n* @param {Complex} z - complex number\n* @returns {number} imaginary component\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n*\n* var z = new Complex64( 5.0, 3.0 );\n*\n* var im = imagf( z );\n* // returns 3.0\n*/\nfunction imagf( z ) {\n\treturn z.im;\n}\n\n\n// EXPORTS //\n\nexport default imagf;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport Float32Array from '@stdlib/array-float32';\n\n\n// MAIN //\n\n/**\n* Reinterprets a `Complex64Array` as a `Float32Array`.\n*\n* @param {Complex64Array} x - input array\n* @param {NonNegativeInteger} offset - starting index\n* @returns {Float32Array} `Float32Array` view\n*\n* @example\n* import Complex64Array from '@stdlib/array-complex64';\n*\n* var x = new Complex64Array( 10 );\n*\n* var out = reinterpret( x, 0 );\n* // returns \n*\n* var bool = ( out.buffer === x.buffer );\n* // returns true\n*/\nfunction reinterpret( x, offset ) {\n\treturn new Float32Array( x.buffer, x.byteOffset+(x.BYTES_PER_ELEMENT*offset), 2*(x.length-offset) ); // eslint-disable-line max-len\n}\n\n\n// EXPORTS //\n\nexport default reinterpret;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport Float64Array from '@stdlib/array-float64';\n\n\n// MAIN //\n\n/**\n* Reinterprets a `Complex128Array` as a `Float64Array`.\n*\n* @param {Complex128Array} x - input array\n* @param {NonNegativeInteger} offset - starting index\n* @returns {Float64Array} `Float64Array` view\n*\n* @example\n* import Complex128Array from '@stdlib/array-complex128';\n*\n* var x = new Complex128Array( 10 );\n*\n* var out = reinterpret( x, 0 );\n* // returns \n*\n* var bool = ( out.buffer === x.buffer );\n* // returns true\n*/\nfunction reinterpret( x, offset ) {\n\treturn new Float64Array( x.buffer, x.byteOffset+(x.BYTES_PER_ELEMENT*offset), 2*(x.length-offset) ); // eslint-disable-line max-len\n}\n\n\n// EXPORTS //\n\nexport default reinterpret;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Serializes a complex number as a string.\n*\n* @private\n* @returns {string} serialized complex number\n*/\nfunction toString() { // eslint-disable-line stdlib/no-redeclare\n\t/* eslint-disable no-invalid-this */\n\tvar str = '' + this.re;\n\tif ( this.im < 0 ) {\n\t\tstr += ' - ' + (-this.im);\n\t} else {\n\t\tstr += ' + ' + this.im;\n\t}\n\tstr += 'i';\n\treturn str;\n}\n\n\n// EXPORTS //\n\nexport default toString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Serializes a complex number as a JSON object.\n*\n* @private\n* @returns {Object} JSON representation\n*/\nfunction toJSON() {\n\t/* eslint-disable no-invalid-this */\n\tvar out = {};\n\tout.type = 'Complex64';\n\tout.re = this.re;\n\tout.im = this.im;\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default toJSON;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// VARIABLES //\n\nvar GETTERS = {\n\t'float64': getFloat64,\n\t'float32': getFloat32,\n\t'int32': getInt32,\n\t'int16': getInt16,\n\t'int8': getInt8,\n\t'uint32': getUint32,\n\t'uint16': getUint16,\n\t'uint8': getUint8,\n\t'uint8c': getUint8c,\n\t'generic': getGeneric,\n\t'default': getArrayLike\n};\n\n\n// FUNCTIONS //\n\n/**\n* Returns an element from a `Float64Array`.\n*\n* @private\n* @param {Float64Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n*\n* var arr = new Float64Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getFloat64( arr, 2 );\n* // returns 3.0\n*/\nfunction getFloat64( arr, idx ) {\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from a `Float32Array`.\n*\n* @private\n* @param {Float32Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Float32Array from '@stdlib/array-float32';\n*\n* var arr = new Float32Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getFloat32( arr, 2 );\n* // returns 3.0\n*/\nfunction getFloat32( arr, idx ) {\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from an `Int32Array`.\n*\n* @private\n* @param {Int32Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Int32Array from '@stdlib/array-int32';\n*\n* var arr = new Int32Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getInt32( arr, 2 );\n* // returns 3\n*/\nfunction getInt32( arr, idx ) { // eslint-disable-line stdlib/jsdoc-doctest-decimal-point\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from an `Int16Array`.\n*\n* @private\n* @param {Int16Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Int16Array from '@stdlib/array-int16';\n*\n* var arr = new Int16Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getInt16( arr, 2 );\n* // returns 3\n*/\nfunction getInt16( arr, idx ) { // eslint-disable-line stdlib/jsdoc-doctest-decimal-point\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from an `Int8Array`.\n*\n* @private\n* @param {Int8Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Int8Array from '@stdlib/array-int8';\n*\n* var arr = new Int8Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getInt8( arr, 2 );\n* // returns 3\n*/\nfunction getInt8( arr, idx ) { // eslint-disable-line stdlib/jsdoc-doctest-decimal-point\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from a `Uint32Array`.\n*\n* @private\n* @param {Uint32Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Uint32Array from '@stdlib/array-uint32';\n*\n* var arr = new Uint32Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getUint32( arr, 2 );\n* // returns 3\n*/\nfunction getUint32( arr, idx ) { // eslint-disable-line stdlib/jsdoc-doctest-decimal-point\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from a `Uint16Array`.\n*\n* @private\n* @param {Uint16Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Uint16Array from '@stdlib/array-uint16';\n*\n* var arr = new Uint16Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getUint16( arr, 2 );\n* // returns 3\n*/\nfunction getUint16( arr, idx ) { // eslint-disable-line stdlib/jsdoc-doctest-decimal-point\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from a `Uint8Array`.\n*\n* @private\n* @param {Uint8Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Uint8Array from '@stdlib/array-uint8';\n*\n* var arr = new Uint8Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getUint8( arr, 2 );\n* // returns 3\n*/\nfunction getUint8( arr, idx ) { // eslint-disable-line stdlib/jsdoc-doctest-decimal-point\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from a `Uint8ClampedArray`.\n*\n* @private\n* @param {Uint8ClampedArray} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Uint8ClampedArray from '@stdlib/array-uint8c';\n*\n* var arr = new Uint8ClampedArray( [ 1, 2, 3, 4 ] );\n*\n* var v = getUint8c( arr, 2 );\n* // returns 3\n*/\nfunction getUint8c( arr, idx ) { // eslint-disable-line stdlib/jsdoc-doctest-decimal-point\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from a generic `Array`.\n*\n* @private\n* @param {Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {*} element value\n*\n* @example\n* var arr = [ 1, 2, 3, 4 ];\n*\n* var v = getGeneric( arr, 2 );\n* // returns 3\n*/\nfunction getGeneric( arr, idx ) {\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from an indexed array-like object.\n*\n* @private\n* @param {Collection} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {*} element value\n*\n* @example\n* var arr = [ 1, 2, 3, 4 ];\n*\n* var v = getArrayLike( arr, 2 );\n* // returns 3\n*/\nfunction getArrayLike( arr, idx ) {\n\treturn arr[ idx ];\n}\n\n\n// MAIN //\n\n/**\n* Returns an accessor function for retrieving an element from an indexed array-like object.\n*\n* @param {string} dtype - array dtype\n* @returns {Function} accessor\n*\n* @example\n* import dtype from '@stdlib/array-dtype';\n*\n* var arr = [ 1, 2, 3, 4 ];\n*\n* var get = getter( dtype( arr ) );\n* var v = get( arr, 2 );\n* // returns 3\n*/\nfunction getter( dtype ) {\n\tvar f = GETTERS[ dtype ];\n\tif ( typeof f === 'function' ) {\n\t\treturn f;\n\t}\n\treturn GETTERS.default;\n}\n\n\n// EXPORTS //\n\nexport default getter;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// VARIABLES //\n\nvar GETTERS = {\n\t'complex128': getComplex128,\n\t'complex64': getComplex64,\n\t'default': getArrayLike\n};\n\n\n// FUNCTIONS //\n\n/**\n* Returns an element from a `Complex128Array`.\n*\n* @private\n* @param {Complex128Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Complex128Array from '@stdlib/array-complex128';\n* import real from '@stdlib/complex-float64-real';\n* import imag from '@stdlib/complex-float64-imag';\n*\n* var arr = new Complex128Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getComplex128( arr, 1 );\n* // returns \n*\n* var re = real( v );\n* // returns 3.0\n*\n* var im = imag( v );\n* // returns 4.0\n*/\nfunction getComplex128( arr, idx ) {\n\treturn arr.get( idx );\n}\n\n/**\n* Returns an element from a `Complex64Array`.\n*\n* @private\n* @param {Complex64Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Complex64Array from '@stdlib/array-complex64';\n* import realf from '@stdlib/complex-float32-real';\n* import imagf from '@stdlib/complex-float32-imag';\n*\n* var arr = new Complex64Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getComplex64( arr, 1 );\n* // returns \n*\n* var re = realf( v );\n* // returns 3.0\n*\n* var im = imagf( v );\n* // returns 4.0\n*/\nfunction getComplex64( arr, idx ) {\n\treturn arr.get( idx );\n}\n\n/**\n* Returns an element from an array-like object supporting the get/set protocol.\n*\n* @private\n* @param {Collection} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {*} element value\n*\n* @example\n* var arr = [ 1, 2, 3, 4 ];\n*\n* function get( idx ) {\n* return arr[ idx ];\n* }\n*\n* function set( value, idx ) {\n* arr[ idx ] = value;\n* }\n*\n* arr.get = get;\n* arr.set = set;\n*\n* var v = getArrayLike( arr, 2 );\n* // returns 3\n*/\nfunction getArrayLike( arr, idx ) {\n\treturn arr.get( idx );\n}\n\n\n// MAIN //\n\n/**\n* Returns an accessor function for retrieving an element from an array-like object supporting the get/set protocol.\n*\n* @param {string} dtype - array dtype\n* @returns {Function} accessor\n*\n* @example\n* import Complex64Array from '@stdlib/array-complex64';\n* import realf from '@stdlib/complex-float32-real';\n* import imagf from '@stdlib/complex-float32-imag';\n* import dtype from '@stdlib/array-dtype';\n*\n* var arr = new Complex64Array( [ 1, 2, 3, 4 ] );\n*\n* var get = getter( dtype( arr ) );\n* var v = get( arr, 1 );\n* // returns \n*\n* var re = realf( v );\n* // returns 3.0\n*\n* var im = imagf( v );\n* // returns 4.0\n*/\nfunction getter( dtype ) {\n\tvar f = GETTERS[ dtype ];\n\tif ( typeof f === 'function' ) {\n\t\treturn f;\n\t}\n\treturn GETTERS.default;\n}\n\n\n// EXPORTS //\n\nexport default getter;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isArrayLikeObject from '@stdlib/assert-is-array-like-object';\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport realf from '@stdlib/complex-realf';\nimport imagf from '@stdlib/complex-imagf';\nimport format from '@stdlib/string-format';\n\n\n// MAIN //\n\n/**\n* Returns an array of iterated values.\n*\n* @private\n* @param {Object} it - iterator\n* @returns {(Array|TypeError)} array or an error\n*/\nfunction fromIterator( it ) {\n\tvar out;\n\tvar v;\n\tvar z;\n\n\tout = [];\n\twhile ( true ) {\n\t\tv = it.next();\n\t\tif ( v.done ) {\n\t\t\tbreak;\n\t\t}\n\t\tz = v.value;\n\t\tif ( isArrayLikeObject( z ) && z.length >= 2 ) {\n\t\t\tout.push( z[ 0 ], z[ 1 ] );\n\t\t} else if ( isComplexLike( z ) ) {\n\t\t\tout.push( realf( z ), imagf( z ) );\n\t\t} else {\n\t\t\treturn new TypeError( format( 'invalid argument. An iterator must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', z ) );\n\t\t}\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default fromIterator;\n","/* eslint-disable no-restricted-syntax, max-lines, no-invalid-this */\n\n/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isNonNegativeInteger } from '@stdlib/assert-is-nonnegative-integer';\nimport isArrayLikeObject from '@stdlib/assert-is-array-like-object';\nimport isCollection from '@stdlib/assert-is-collection';\nimport isArrayBuffer from '@stdlib/assert-is-arraybuffer';\nimport isObject from '@stdlib/assert-is-object';\nimport isArray from '@stdlib/assert-is-array';\nimport { isPrimitive as isString } from '@stdlib/assert-is-string';\nimport isFunction from '@stdlib/assert-is-function';\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport isEven from '@stdlib/math-base-assert-is-even';\nimport isInteger from '@stdlib/math-base-assert-is-integer';\nimport isComplex64Array from '@stdlib/array-base-assert-is-complex64array';\nimport isComplex128Array from '@stdlib/array-base-assert-is-complex128array';\nimport hasIteratorSymbolSupport from '@stdlib/assert-has-iterator-symbol-support';\nimport ITERATOR_SYMBOL from '@stdlib/symbol-iterator';\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport setReadOnlyAccessor from '@stdlib/utils-define-nonenumerable-read-only-accessor';\nimport Float32Array from '@stdlib/array-float32';\nimport Complex64 from '@stdlib/complex-float32';\nimport format from '@stdlib/string-format';\nimport realf from '@stdlib/complex-realf';\nimport imagf from '@stdlib/complex-imagf';\nimport floor from '@stdlib/math-base-special-floor';\nimport reinterpret64 from '@stdlib/strided-base-reinterpret-complex64';\nimport reinterpret128 from '@stdlib/strided-base-reinterpret-complex128';\nimport getter from '@stdlib/array-base-getter';\nimport accessorGetter from '@stdlib/array-base-accessor-getter';\nimport fromIterator from './from_iterator.js';\nimport fromIteratorMap from './from_iterator_map.js';\nimport fromArray from './from_array.js';\n\n\n// VARIABLES //\n\nvar BYTES_PER_ELEMENT = Float32Array.BYTES_PER_ELEMENT * 2;\nvar HAS_ITERATOR_SYMBOL = hasIteratorSymbolSupport();\n\n\n// FUNCTIONS //\n\n/**\n* Returns a boolean indicating if a value is a complex typed array.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a complex typed array\n*/\nfunction isComplexArray( value ) {\n\treturn (\n\t\tvalue instanceof Complex64Array ||\n\t\t(\n\t\t\ttypeof value === 'object' &&\n\t\t\tvalue !== null &&\n\t\t\t(\n\t\t\t\tvalue.constructor.name === 'Complex64Array' ||\n\t\t\t\tvalue.constructor.name === 'Complex128Array'\n\t\t\t) &&\n\t\t\ttypeof value._length === 'number' && // eslint-disable-line no-underscore-dangle\n\n\t\t\t// NOTE: we don't perform a more rigorous test here for a typed array for performance reasons, as robustly checking for a typed array instance could require walking the prototype tree and performing relatively expensive constructor checks...\n\t\t\ttypeof value._buffer === 'object' // eslint-disable-line no-underscore-dangle\n\t\t)\n\t);\n}\n\n/**\n* Returns a boolean indicating if a value is a complex typed array constructor.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a complex typed array constructor\n*/\nfunction isComplexArrayConstructor( value ) {\n\treturn (\n\t\tvalue === Complex64Array ||\n\n\t\t// NOTE: weaker test in order to avoid a circular dependency with Complex128Array...\n\t\tvalue.name === 'Complex128Array'\n\t);\n}\n\n/**\n* Retrieves a complex number from a complex number array buffer.\n*\n* @private\n* @param {Float32Array} buf - array buffer\n* @param {NonNegativeInteger} idx - element index\n* @returns {Complex64} complex number\n*/\nfunction getComplex64( buf, idx ) {\n\tidx *= 2;\n\treturn new Complex64( buf[ idx ], buf[ idx+1 ] );\n}\n\n\n// MAIN //\n\n/**\n* 64-bit complex number array constructor.\n*\n* @constructor\n* @param {(NonNegativeInteger|Collection|ArrayBuffer|Iterable)} [arg] - length, typed array, array-like object, buffer, or an iterable\n* @param {NonNegativeInteger} [byteOffset=0] - byte offset\n* @param {NonNegativeInteger} [length] - view length\n* @throws {RangeError} ArrayBuffer byte length must be a multiple of `8`\n* @throws {RangeError} array-like object and typed array input arguments must have a length which is a multiple of two\n* @throws {TypeError} if provided only a single argument, must provide a valid argument\n* @throws {TypeError} byte offset must be a nonnegative integer\n* @throws {RangeError} byte offset must be a multiple of `8`\n* @throws {TypeError} view length must be a positive multiple of `8`\n* @throws {RangeError} must provide sufficient memory to accommodate byte offset and view length requirements\n* @throws {TypeError} an iterator must return either a two element array containing real and imaginary components or a complex number\n* @returns {Complex64Array} complex number array\n*\n* @example\n* var arr = new Complex64Array();\n* // returns \n*\n* var len = arr.length;\n* // returns 0\n*\n* @example\n* var arr = new Complex64Array( 2 );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*\n* @example\n* var arr = new Complex64Array( [ 1.0, -1.0 ] );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* import ArrayBuffer from '@stdlib/array-buffer';\n*\n* var buf = new ArrayBuffer( 16 );\n* var arr = new Complex64Array( buf );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*\n* @example\n* import ArrayBuffer from '@stdlib/array-buffer';\n*\n* var buf = new ArrayBuffer( 16 );\n* var arr = new Complex64Array( buf, 8 );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* import ArrayBuffer from '@stdlib/array-buffer';\n*\n* var buf = new ArrayBuffer( 32 );\n* var arr = new Complex64Array( buf, 8, 2 );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*/\nfunction Complex64Array() {\n\tvar byteOffset;\n\tvar nargs;\n\tvar buf;\n\tvar len;\n\n\tnargs = arguments.length;\n\tif ( !(this instanceof Complex64Array) ) {\n\t\tif ( nargs === 0 ) {\n\t\t\treturn new Complex64Array();\n\t\t}\n\t\tif ( nargs === 1 ) {\n\t\t\treturn new Complex64Array( arguments[0] );\n\t\t}\n\t\tif ( nargs === 2 ) {\n\t\t\treturn new Complex64Array( arguments[0], arguments[1] );\n\t\t}\n\t\treturn new Complex64Array( arguments[0], arguments[1], arguments[2] );\n\t}\n\t// Create the underlying data buffer...\n\tif ( nargs === 0 ) {\n\t\tbuf = new Float32Array( 0 ); // backward-compatibility\n\t} else if ( nargs === 1 ) {\n\t\tif ( isNonNegativeInteger( arguments[0] ) ) {\n\t\t\tbuf = new Float32Array( arguments[0]*2 );\n\t\t} else if ( isCollection( arguments[0] ) ) {\n\t\t\tbuf = arguments[ 0 ];\n\t\t\tlen = buf.length;\n\n\t\t\t// If provided a \"generic\" array, peak at the first value, and, if the value is a complex number, try to process as an array of complex numbers, falling back to \"normal\" typed array initialization if we fail and ensuring consistency if the first value had not been a complex number...\n\t\t\tif ( len && isArray( buf ) && isComplexLike( buf[0] ) ) {\n\t\t\t\tbuf = fromArray( new Float32Array( len*2 ), buf );\n\t\t\t\tif ( buf === null ) {\n\t\t\t\t\t// We failed and we are now forced to allocate a new array :-(\n\t\t\t\t\tif ( !isEven( len ) ) {\n\t\t\t\t\t\tthrow new RangeError( format( 'invalid argument. Array-like object arguments must have a length which is a multiple of two. Length: `%u`.', len ) );\n\t\t\t\t\t}\n\t\t\t\t\t// We failed, so fall back to directly setting values...\n\t\t\t\t\tbuf = new Float32Array( arguments[0] );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ( isComplex64Array( buf ) ) {\n\t\t\t\t\tbuf = reinterpret64( buf, 0 );\n\t\t\t\t} else if ( isComplex128Array( buf ) ) {\n\t\t\t\t\tbuf = reinterpret128( buf, 0 );\n\t\t\t\t} else if ( !isEven( len ) ) {\n\t\t\t\t\tthrow new RangeError( format( 'invalid argument. Array-like object and typed array arguments must have a length which is a multiple of two. Length: `%u`.', len ) );\n\t\t\t\t}\n\t\t\t\tbuf = new Float32Array( buf );\n\t\t\t}\n\t\t} else if ( isArrayBuffer( arguments[0] ) ) {\n\t\t\tbuf = arguments[ 0 ];\n\t\t\tif ( !isInteger( buf.byteLength/BYTES_PER_ELEMENT ) ) {\n\t\t\t\tthrow new RangeError( format( 'invalid argument. ArrayBuffer byte length must be a multiple of %u. Byte length: `%u`.', BYTES_PER_ELEMENT, buf.byteLength ) );\n\t\t\t}\n\t\t\tbuf = new Float32Array( buf );\n\t\t} else if ( isObject( arguments[0] ) ) {\n\t\t\tbuf = arguments[ 0 ];\n\t\t\tif ( HAS_ITERATOR_SYMBOL === false ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Environment lacks Symbol.iterator support. Must provide a length, ArrayBuffer, typed array, or array-like object. Value: `%s`.', buf ) );\n\t\t\t}\n\t\t\tif ( !isFunction( buf[ ITERATOR_SYMBOL ] ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.', buf ) );\n\t\t\t}\n\t\t\tbuf = buf[ ITERATOR_SYMBOL ]();\n\t\t\tif ( !isFunction( buf.next ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.', buf ) ); // FIXME: `buf` is what is returned from above, NOT the original value\n\t\t\t}\n\t\t\tbuf = fromIterator( buf );\n\t\t\tif ( buf instanceof Error ) {\n\t\t\t\tthrow buf;\n\t\t\t}\n\t\t\tbuf = new Float32Array( buf );\n\t\t} else {\n\t\t\tthrow new TypeError( format( 'invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.', arguments[0] ) );\n\t\t}\n\t} else {\n\t\tbuf = arguments[ 0 ];\n\t\tif ( !isArrayBuffer( buf ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. First argument must be an ArrayBuffer. Value: `%s`.', buf ) );\n\t\t}\n\t\tbyteOffset = arguments[ 1 ];\n\t\tif ( !isNonNegativeInteger( byteOffset ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Byte offset must be a nonnegative integer. Value: `%s`.', byteOffset ) );\n\t\t}\n\t\tif ( !isInteger( byteOffset/BYTES_PER_ELEMENT ) ) {\n\t\t\tthrow new RangeError( format( 'invalid argument. Byte offset must be a multiple of %u. Value: `%u`.', BYTES_PER_ELEMENT, byteOffset ) );\n\t\t}\n\t\tif ( nargs === 2 ) {\n\t\t\tlen = buf.byteLength - byteOffset;\n\t\t\tif ( !isInteger( len/BYTES_PER_ELEMENT ) ) {\n\t\t\t\tthrow new RangeError( format( 'invalid arguments. ArrayBuffer view byte length must be a multiple of %u. View byte length: `%u`.', BYTES_PER_ELEMENT, len ) );\n\t\t\t}\n\t\t\tbuf = new Float32Array( buf, byteOffset );\n\t\t} else {\n\t\t\tlen = arguments[ 2 ];\n\t\t\tif ( !isNonNegativeInteger( len ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Length must be a nonnegative integer. Value: `%s`.', len ) );\n\t\t\t}\n\t\t\tif ( (len*BYTES_PER_ELEMENT) > (buf.byteLength-byteOffset) ) {\n\t\t\t\tthrow new RangeError( format( 'invalid arguments. ArrayBuffer has insufficient capacity. Either decrease the array length or provide a bigger buffer. Minimum capacity: `%u`.', len*BYTES_PER_ELEMENT ) );\n\t\t\t}\n\t\t\tbuf = new Float32Array( buf, byteOffset, len*2 );\n\t\t}\n\t}\n\tsetReadOnly( this, '_buffer', buf );\n\tsetReadOnly( this, '_length', buf.length/2 );\n\n\treturn this;\n}\n\n/**\n* Size (in bytes) of each array element.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex64Array\n* @readonly\n* @type {PositiveInteger}\n* @default 8\n*\n* @example\n* var nbytes = Complex64Array.BYTES_PER_ELEMENT;\n* // returns 8\n*/\nsetReadOnly( Complex64Array, 'BYTES_PER_ELEMENT', BYTES_PER_ELEMENT );\n\n/**\n* Constructor name.\n*\n* @name name\n* @memberof Complex64Array\n* @readonly\n* @type {string}\n* @default 'Complex64Array'\n*\n* @example\n* var str = Complex64Array.name;\n* // returns 'Complex64Array'\n*/\nsetReadOnly( Complex64Array, 'name', 'Complex64Array' );\n\n/**\n* Creates a new 64-bit complex number array from an array-like object or an iterable.\n*\n* @name from\n* @memberof Complex64Array\n* @type {Function}\n* @param {(Collection|Iterable)} src - array-like object or iterable\n* @param {Function} [clbk] - callback to invoke for each source element\n* @param {*} [thisArg] - context\n* @throws {TypeError} `this` context must be a constructor\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be an array-like object or an iterable\n* @throws {TypeError} second argument must be a function\n* @throws {RangeError} array-like objects must have a length which is a multiple of two\n* @throws {TypeError} an iterator must return either a two element array containing real and imaginary components or a complex number\n* @throws {TypeError} when provided an iterator, a callback must return either a two element array containing real and imaginary components or a complex number\n* @returns {Complex64Array} 64-bit complex number array\n*\n* @example\n* var arr = Complex64Array.from( [ 1.0, -1.0 ] );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n*\n* var arr = Complex64Array.from( [ new Complex64( 1.0, 1.0 ) ] );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* function clbk( v ) {\n* return new Complex64( realf(v)*2.0, imagf(v)*2.0 );\n* }\n*\n* var arr = Complex64Array.from( [ new Complex64( 1.0, 1.0 ) ], clbk );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*/\nsetReadOnly( Complex64Array, 'from', function from( src ) {\n\tvar thisArg;\n\tvar nargs;\n\tvar clbk;\n\tvar out;\n\tvar buf;\n\tvar tmp;\n\tvar get;\n\tvar len;\n\tvar flg;\n\tvar v;\n\tvar i;\n\tvar j;\n\tif ( !isFunction( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` context must be a constructor.' );\n\t}\n\tif ( !isComplexArrayConstructor( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tnargs = arguments.length;\n\tif ( nargs > 1 ) {\n\t\tclbk = arguments[ 1 ];\n\t\tif ( !isFunction( clbk ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be a function. Value: `%s`.', clbk ) );\n\t\t}\n\t\tif ( nargs > 2 ) {\n\t\t\tthisArg = arguments[ 2 ];\n\t\t}\n\t}\n\tif ( isComplexArray( src ) ) {\n\t\tlen = src.length;\n\t\tif ( clbk ) {\n\t\t\tout = new this( len );\n\t\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\t\tj = 0;\n\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\tv = clbk.call( thisArg, src.get( i ), i );\n\t\t\t\tif ( isComplexLike( v ) ) {\n\t\t\t\t\tbuf[ j ] = realf( v );\n\t\t\t\t\tbuf[ j+1 ] = imagf( v );\n\t\t\t\t} else if ( isArrayLikeObject( v ) && v.length >= 2 ) {\n\t\t\t\t\tbuf[ j ] = v[ 0 ];\n\t\t\t\t\tbuf[ j+1 ] = v[ 1 ];\n\t\t\t\t} else {\n\t\t\t\t\tthrow new TypeError( format( 'invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', v ) );\n\t\t\t\t}\n\t\t\t\tj += 2; // stride\n\t\t\t}\n\t\t\treturn out;\n\t\t}\n\t\treturn new this( src );\n\t}\n\tif ( isCollection( src ) ) {\n\t\tif ( clbk ) {\n\t\t\t// Note: array contents affect how we iterate over a provided data source. If only complex number objects, we can extract real and imaginary components. Otherwise, for non-complex number arrays (e.g., `Float64Array`, etc), we assume a strided array where real and imaginary components are interleaved. In the former case, we expect a callback to return real and imaginary components (possibly as a complex number). In the latter case, we expect a callback to return *either* a real or imaginary component.\n\n\t\t\tlen = src.length;\n\t\t\tif ( src.get && src.set ) {\n\t\t\t\tget = accessorGetter( 'default' );\n\t\t\t} else {\n\t\t\t\tget = getter( 'default' );\n\t\t\t}\n\t\t\t// Detect whether we've been provided an array which returns complex number objects...\n\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\tif ( !isComplexLike( get( src, i ) ) ) {\n\t\t\t\t\tflg = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// If an array does not contain only complex number objects, then we assume interleaved real and imaginary components...\n\t\t\tif ( flg ) {\n\t\t\t\tif ( !isEven( len ) ) {\n\t\t\t\t\tthrow new RangeError( format( 'invalid argument. First argument must have a length which is a multiple of %u. Length: `%u`.', 2, len ) );\n\t\t\t\t}\n\t\t\t\tout = new this( len/2 );\n\t\t\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\t\tbuf[ i ] = clbk.call( thisArg, get( src, i ), i );\n\t\t\t\t}\n\t\t\t\treturn out;\n\t\t\t}\n\t\t\t// If an array contains only complex number objects, then we need to extract real and imaginary components...\n\t\t\tout = new this( len );\n\t\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\t\tj = 0;\n\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\tv = clbk.call( thisArg, get( src, i ), i );\n\t\t\t\tif ( isComplexLike( v ) ) {\n\t\t\t\t\tbuf[ j ] = realf( v );\n\t\t\t\t\tbuf[ j+1 ] = imagf( v );\n\t\t\t\t} else if ( isArrayLikeObject( v ) && v.length >= 2 ) {\n\t\t\t\t\tbuf[ j ] = v[ 0 ];\n\t\t\t\t\tbuf[ j+1 ] = v[ 1 ];\n\t\t\t\t} else {\n\t\t\t\t\tthrow new TypeError( format( 'invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', v ) );\n\t\t\t\t}\n\t\t\t\tj += 2; // stride\n\t\t\t}\n\t\t\treturn out;\n\t\t}\n\t\treturn new this( src );\n\t}\n\tif ( isObject( src ) && HAS_ITERATOR_SYMBOL && isFunction( src[ ITERATOR_SYMBOL ] ) ) { // eslint-disable-line max-len\n\t\tbuf = src[ ITERATOR_SYMBOL ]();\n\t\tif ( !isFunction( buf.next ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.', src ) );\n\t\t}\n\t\tif ( clbk ) {\n\t\t\ttmp = fromIteratorMap( buf, clbk, thisArg );\n\t\t} else {\n\t\t\ttmp = fromIterator( buf );\n\t\t}\n\t\tif ( tmp instanceof Error ) {\n\t\t\tthrow tmp;\n\t\t}\n\t\tlen = tmp.length / 2;\n\t\tout = new this( len );\n\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\tbuf[ i ] = tmp[ i ];\n\t\t}\n\t\treturn out;\n\t}\n\tthrow new TypeError( format( 'invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.', src ) );\n});\n\n/**\n* Creates a new 64-bit complex number array from a variable number of arguments.\n*\n* @name of\n* @memberof Complex64Array\n* @type {Function}\n* @param {...*} element - array elements\n* @throws {TypeError} `this` context must be a constructor\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Complex64Array} 64-bit complex number array\n*\n* @example\n* var arr = Complex64Array.of( 1.0, 1.0, 1.0, 1.0 );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*/\nsetReadOnly( Complex64Array, 'of', function of() {\n\tvar args;\n\tvar i;\n\tif ( !isFunction( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` context must be a constructor.' );\n\t}\n\tif ( !isComplexArrayConstructor( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\targs = [];\n\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\targs.push( arguments[ i ] );\n\t}\n\treturn new this( args );\n});\n\n/**\n* Returns an array element with support for both nonnegative and negative integer indices.\n*\n* @name at\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {integer} idx - element index\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} must provide an integer\n* @returns {(Complex64|void)} array element\n*\n* @example\n* var arr = new Complex64Array( 10 );\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* var z = arr.at( 0 );\n* // returns \n*\n* var re = realf( z );\n* // returns 0.0\n*\n* var im = imagf( z );\n* // returns 0.0\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 9.0, -9.0 ], 9 );\n*\n* z = arr.at( 0 );\n* // returns \n*\n* re = realf( z );\n* // returns 1.0\n*\n* im = imagf( z );\n* // returns -1.0\n*\n* z = arr.at( -1 );\n* // returns \n*\n* re = realf( z );\n* // returns 9.0\n*\n* im = imagf( z );\n* // returns -9.0\n*\n* z = arr.at( 100 );\n* // returns undefined\n*\n* z = arr.at( -100 );\n* // returns undefined\n*/\nsetReadOnly( Complex64Array.prototype, 'at', function at( idx ) {\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isInteger( idx ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Must provide an integer. Value: `%s`.', idx ) );\n\t}\n\tif ( idx < 0 ) {\n\t\tidx += this._length;\n\t}\n\tif ( idx < 0 || idx >= this._length ) {\n\t\treturn;\n\t}\n\treturn getComplex64( this._buffer, idx );\n});\n\n/**\n* Pointer to the underlying data buffer.\n*\n* @name buffer\n* @memberof Complex64Array.prototype\n* @readonly\n* @type {ArrayBuffer}\n*\n* @example\n* var arr = new Complex64Array( 10 );\n*\n* var buf = arr.buffer;\n* // returns \n*/\nsetReadOnlyAccessor( Complex64Array.prototype, 'buffer', function get() {\n\treturn this._buffer.buffer;\n});\n\n/**\n* Size (in bytes) of the array.\n*\n* @name byteLength\n* @memberof Complex64Array.prototype\n* @readonly\n* @type {NonNegativeInteger}\n*\n* @example\n* var arr = new Complex64Array( 10 );\n*\n* var byteLength = arr.byteLength;\n* // returns 80\n*/\nsetReadOnlyAccessor( Complex64Array.prototype, 'byteLength', function get() {\n\treturn this._buffer.byteLength;\n});\n\n/**\n* Offset (in bytes) of the array from the start of its underlying `ArrayBuffer`.\n*\n* @name byteOffset\n* @memberof Complex64Array.prototype\n* @readonly\n* @type {NonNegativeInteger}\n*\n* @example\n* var arr = new Complex64Array( 10 );\n*\n* var byteOffset = arr.byteOffset;\n* // returns 0\n*/\nsetReadOnlyAccessor( Complex64Array.prototype, 'byteOffset', function get() {\n\treturn this._buffer.byteOffset;\n});\n\n/**\n* Size (in bytes) of each array element.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex64Array.prototype\n* @readonly\n* @type {PositiveInteger}\n* @default 8\n*\n* @example\n* var arr = new Complex64Array( 10 );\n*\n* var nbytes = arr.BYTES_PER_ELEMENT;\n* // returns 8\n*/\nsetReadOnly( Complex64Array.prototype, 'BYTES_PER_ELEMENT', Complex64Array.BYTES_PER_ELEMENT );\n\n/**\n* Copies a sequence of elements within the array to the position starting at `target`.\n*\n* @name copyWithin\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {integer} target - index at which to start copying elements\n* @param {integer} start - source index at which to copy elements from\n* @param {integer} [end] - source index at which to stop copying elements from\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Complex64Array} modified array\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* var arr = new Complex64Array( 4 );\n*\n* // Set the array elements:\n* arr.set( new Complex64( 1.0, 1.0 ), 0 );\n* arr.set( new Complex64( 2.0, 2.0 ), 1 );\n* arr.set( new Complex64( 3.0, 3.0 ), 2 );\n* arr.set( new Complex64( 4.0, 4.0 ), 3 );\n*\n* // Copy the first two elements to the last two elements:\n* arr.copyWithin( 2, 0, 2 );\n*\n* // Get the last array element:\n* var z = arr.get( 3 );\n*\n* var re = realf( z );\n* // returns 2.0\n*\n* var im = imagf( z );\n* // returns 2.0\n*/\nsetReadOnly( Complex64Array.prototype, 'copyWithin', function copyWithin( target, start ) {\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\t// FIXME: prefer a functional `copyWithin` implementation which addresses lack of universal browser support (e.g., IE11 and Safari) or ensure that typed arrays are polyfilled\n\tif ( arguments.length === 2 ) {\n\t\tthis._buffer.copyWithin( target*2, start*2 );\n\t} else {\n\t\tthis._buffer.copyWithin( target*2, start*2, arguments[2]*2 );\n\t}\n\treturn this;\n});\n\n/**\n* Returns an iterator for iterating over array key-value pairs.\n*\n* @name entries\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Iterator} iterator\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n*\n* var arr = [\n* new Complex64( 1.0, 1.0 ),\n* new Complex64( 2.0, 2.0 ),\n* new Complex64( 3.0, 3.0 )\n* ];\n* arr = new Complex64Array( arr );\n*\n* // Create an iterator:\n* var it = arr.entries();\n*\n* // Iterate over the key-value pairs...\n* var v = it.next().value;\n* // returns [ 0, ]\n*\n* v = it.next().value;\n* // returns [ 1, ]\n*\n* v = it.next().value;\n* // returns [ 2, ]\n*\n* var bool = it.next().done;\n* // returns true\n*/\nsetReadOnly( Complex64Array.prototype, 'entries', function entries() {\n\tvar buffer;\n\tvar self;\n\tvar iter;\n\tvar len;\n\tvar FLG;\n\tvar i;\n\tvar j;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tself = this;\n\tbuffer = this._buffer;\n\tlen = this._length;\n\n\t// Initialize the iteration indices:\n\ti = -1;\n\tj = -2;\n\n\t// Create an iterator protocol-compliant object:\n\titer = {};\n\tsetReadOnly( iter, 'next', next );\n\tsetReadOnly( iter, 'return', end );\n\n\tif ( ITERATOR_SYMBOL ) {\n\t\tsetReadOnly( iter, ITERATOR_SYMBOL, factory );\n\t}\n\treturn iter;\n\n\t/**\n\t* Returns an iterator protocol-compliant object containing the next iterated value.\n\t*\n\t* @private\n\t* @returns {Object} iterator protocol-compliant object\n\t*/\n\tfunction next() {\n\t\tvar z;\n\t\ti += 1;\n\t\tif ( FLG || i >= len ) {\n\t\t\treturn {\n\t\t\t\t'done': true\n\t\t\t};\n\t\t}\n\t\tj += 2;\n\t\tz = new Complex64( buffer[ j ], buffer[ j+1 ] );\n\t\treturn {\n\t\t\t'value': [ i, z ],\n\t\t\t'done': false\n\t\t};\n\t}\n\n\t/**\n\t* Finishes an iterator.\n\t*\n\t* @private\n\t* @param {*} [value] - value to return\n\t* @returns {Object} iterator protocol-compliant object\n\t*/\n\tfunction end( value ) {\n\t\tFLG = true;\n\t\tif ( arguments.length ) {\n\t\t\treturn {\n\t\t\t\t'value': value,\n\t\t\t\t'done': true\n\t\t\t};\n\t\t}\n\t\treturn {\n\t\t\t'done': true\n\t\t};\n\t}\n\n\t/**\n\t* Returns a new iterator.\n\t*\n\t* @private\n\t* @returns {Iterator} iterator\n\t*/\n\tfunction factory() {\n\t\treturn self.entries();\n\t}\n});\n\n/**\n* Tests whether all elements in an array pass a test implemented by a predicate function.\n*\n* @name every\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {boolean} boolean indicating whether all elements pass a test\n*\n* @example\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* function predicate( v ) {\n* return ( realf( v ) === imagf( v ) );\n* }\n*\n* var arr = new Complex64Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var bool = arr.every( predicate );\n* // returns true\n*/\nsetReadOnly( Complex64Array.prototype, 'every', function every( predicate, thisArg ) {\n\tvar buf;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tif ( !predicate.call( thisArg, getComplex64( buf, i ), i, this ) ) {\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn true;\n});\n\n/**\n* Returns a modified typed array filled with a fill value.\n*\n* @name fill\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {ComplexLike} value - fill value\n* @param {integer} [start=0] - starting index (inclusive)\n* @param {integer} [end] - ending index (exclusive)\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a complex number\n* @throws {TypeError} second argument must be an integer\n* @throws {TypeError} third argument must be an integer\n*\n* @example\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* var arr = new Complex64Array( 3 );\n*\n* arr.fill( new Complex64( 1.0, 1.0 ), 1 );\n*\n* var z = arr.get( 1 );\n* // returns \n*\n* var re = realf( z );\n* // returns 1.0\n*\n* var im = imagf( z );\n* // returns 1.0\n*\n* z = arr.get( 1 );\n* // returns \n*\n* re = realf( z );\n* // returns 1.0\n*\n* im = imagf( z );\n* // returns 1.0\n*/\nsetReadOnly( Complex64Array.prototype, 'fill', function fill( value, start, end ) {\n\tvar buf;\n\tvar len;\n\tvar idx;\n\tvar re;\n\tvar im;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isComplexLike( value ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a complex number. Value: `%s`.', value ) );\n\t}\n\tbuf = this._buffer;\n\tlen = this._length;\n\tif ( arguments.length > 1 ) {\n\t\tif ( !isInteger( start ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be an integer. Value: `%s`.', start ) );\n\t\t}\n\t\tif ( start < 0 ) {\n\t\t\tstart += len;\n\t\t\tif ( start < 0 ) {\n\t\t\t\tstart = 0;\n\t\t\t}\n\t\t}\n\t\tif ( arguments.length > 2 ) {\n\t\t\tif ( !isInteger( end ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Third argument must be an integer. Value: `%s`.', end ) );\n\t\t\t}\n\t\t\tif ( end < 0 ) {\n\t\t\t\tend += len;\n\t\t\t\tif ( end < 0 ) {\n\t\t\t\t\tend = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( end > len ) {\n\t\t\t\tend = len;\n\t\t\t}\n\t\t} else {\n\t\t\tend = len;\n\t\t}\n\t} else {\n\t\tstart = 0;\n\t\tend = len;\n\t}\n\tre = realf( value );\n\tim = imagf( value );\n\tfor ( i = start; i < end; i++ ) {\n\t\tidx = 2*i;\n\t\tbuf[ idx ] = re;\n\t\tbuf[ idx+1 ] = im;\n\t}\n\treturn this;\n});\n\n/**\n* Returns a new array containing the elements of an array which pass a test implemented by a predicate function.\n*\n* @name filter\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {Complex64Array} complex number array\n*\n* @example\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* function predicate( v ) {\n* return ( realf( v ) === imagf( v ) );\n* }\n*\n* var arr = new Complex64Array( 3 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n*\n* var out = arr.filter( predicate );\n* // returns \n*\n* var len = out.length;\n* // returns 1\n*\n* var z = out.get( 0 );\n* // returns \n*\n* var re = realf( z );\n* // returns 2.0\n*\n* var im = imagf( z );\n* // returns 2.0\n*/\nsetReadOnly( Complex64Array.prototype, 'filter', function filter( predicate, thisArg ) {\n\tvar buf;\n\tvar out;\n\tvar i;\n\tvar z;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tout = [];\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tz = getComplex64( buf, i );\n\t\tif ( predicate.call( thisArg, z, i, this ) ) {\n\t\t\tout.push( z );\n\t\t}\n\t}\n\treturn new this.constructor( out );\n});\n\n/**\n* Returns the first element in an array for which a predicate function returns a truthy value.\n*\n* @name find\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {(Complex64|void)} array element or undefined\n*\n* @example\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n* import Complex64 from '@stdlib/complex-float32';\n*\n* function predicate( v ) {\n* return ( realf( v ) === imagf( v ) );\n* }\n*\n* var arr = new Complex64Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var z = arr.find( predicate );\n* // returns \n*\n* var re = realf( z );\n* // returns 1.0\n*\n* var im = imagf( z );\n* // returns 1.0\n*/\nsetReadOnly( Complex64Array.prototype, 'find', function find( predicate, thisArg ) {\n\tvar buf;\n\tvar i;\n\tvar z;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tz = getComplex64( buf, i );\n\t\tif ( predicate.call( thisArg, z, i, this ) ) {\n\t\t\treturn z;\n\t\t}\n\t}\n});\n\n/**\n* Returns the index of the first element in an array for which a predicate function returns a truthy value.\n*\n* @name findIndex\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {integer} index or -1\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* function predicate( v ) {\n* return ( realf( v ) === imagf( v ) );\n* }\n*\n* var arr = new Complex64Array( 3 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var idx = arr.findIndex( predicate );\n* // returns 2\n*/\nsetReadOnly( Complex64Array.prototype, 'findIndex', function findIndex( predicate, thisArg ) {\n\tvar buf;\n\tvar i;\n\tvar z;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tz = getComplex64( buf, i );\n\t\tif ( predicate.call( thisArg, z, i, this ) ) {\n\t\t\treturn i;\n\t\t}\n\t}\n\treturn -1;\n});\n\n/**\n* Returns the last element in an array for which a predicate function returns a truthy value.\n*\n* @name findLast\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {(Complex64|void)} array element or undefined\n*\n* @example\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n* import Complex64 from '@stdlib/complex-float32';\n*\n* function predicate( v ) {\n* return ( realf( v ) === imagf( v ) );\n* }\n*\n* var arr = new Complex64Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var z = arr.findLast( predicate );\n* // returns \n*\n* var re = realf( z );\n* // returns 3.0\n*\n* var im = imagf( z );\n* // returns 3.0\n*/\nsetReadOnly( Complex64Array.prototype, 'findLast', function findLast( predicate, thisArg ) {\n\tvar buf;\n\tvar i;\n\tvar z;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = this._length-1; i >= 0; i-- ) {\n\t\tz = getComplex64( buf, i );\n\t\tif ( predicate.call( thisArg, z, i, this ) ) {\n\t\t\treturn z;\n\t\t}\n\t}\n});\n\n/**\n* Returns the index of the last element in an array for which a predicate function returns a truthy value.\n*\n* @name findLastIndex\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {integer} index or -1\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* function predicate( v ) {\n* return ( realf( v ) === imagf( v ) );\n* }\n*\n* var arr = new Complex64Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n*\n* var idx = arr.findLastIndex( predicate );\n* // returns 1\n*/\nsetReadOnly( Complex64Array.prototype, 'findLastIndex', function findLastIndex( predicate, thisArg ) {\n\tvar buf;\n\tvar i;\n\tvar z;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = this._length-1; i >= 0; i-- ) {\n\t\tz = getComplex64( buf, i );\n\t\tif ( predicate.call( thisArg, z, i, this ) ) {\n\t\t\treturn i;\n\t\t}\n\t}\n\treturn -1;\n});\n\n/**\n* Invokes a function once for each array element.\n*\n* @name forEach\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {Function} fcn - function to invoke\n* @param {*} [thisArg] - function invocation context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n*\n* function log( v, i ) {\n* console.log( '%s: %s', i, v.toString() );\n* }\n*\n* var arr = new Complex64Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* arr.forEach( log );\n*/\nsetReadOnly( Complex64Array.prototype, 'forEach', function forEach( fcn, thisArg ) {\n\tvar buf;\n\tvar i;\n\tvar z;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( fcn ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', fcn ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tz = getComplex64( buf, i );\n\t\tfcn.call( thisArg, z, i, this );\n\t}\n});\n\n/**\n* Returns an array element.\n*\n* @name get\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {NonNegativeInteger} idx - element index\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} must provide a nonnegative integer\n* @returns {(Complex64|void)} array element\n*\n* @example\n* var arr = new Complex64Array( 10 );\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* var z = arr.get( 0 );\n* // returns \n*\n* var re = realf( z );\n* // returns 0.0\n*\n* var im = imagf( z );\n* // returns 0.0\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n*\n* z = arr.get( 0 );\n* // returns \n*\n* re = realf( z );\n* // returns 1.0\n*\n* im = imagf( z );\n* // returns -1.0\n*\n* z = arr.get( 100 );\n* // returns undefined\n*/\nsetReadOnly( Complex64Array.prototype, 'get', function get( idx ) {\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isNonNegativeInteger( idx ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Must provide a nonnegative integer. Value: `%s`.', idx ) );\n\t}\n\tif ( idx >= this._length ) {\n\t\treturn;\n\t}\n\treturn getComplex64( this._buffer, idx );\n});\n\n/**\n* Returns a boolean indicating whether an array includes a provided value.\n*\n* @name includes\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {ComplexLike} searchElement - search element\n* @param {integer} [fromIndex=0] - starting index (inclusive)\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a complex number\n* @throws {TypeError} second argument must be an integer\n* @returns {boolean} boolean indicating whether an array includes a provided value\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n*\n* var arr = new Complex64Array( 5 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n* arr.set( [ 4.0, -4.0 ], 3 );\n* arr.set( [ 5.0, -5.0 ], 4 );\n*\n* var bool = arr.includes( new Complex64( 3.0, -3.0 ) );\n* // returns true\n*\n* bool = arr.includes( new Complex64( 3.0, -3.0 ), 3 );\n* // returns false\n*\n* bool = arr.includes( new Complex64( 4.0, -4.0 ), -3 );\n* // returns true\n*/\nsetReadOnly( Complex64Array.prototype, 'includes', function includes( searchElement, fromIndex ) {\n\tvar buf;\n\tvar idx;\n\tvar re;\n\tvar im;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isComplexLike( searchElement ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a complex number. Value: `%s`.', searchElement ) );\n\t}\n\tif ( arguments.length > 1 ) {\n\t\tif ( !isInteger( fromIndex ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be an integer. Value: `%s`.', fromIndex ) );\n\t\t}\n\t\tif ( fromIndex < 0 ) {\n\t\t\tfromIndex += this._length;\n\t\t\tif ( fromIndex < 0 ) {\n\t\t\t\tfromIndex = 0;\n\t\t\t}\n\t\t}\n\t} else {\n\t\tfromIndex = 0;\n\t}\n\tre = realf( searchElement );\n\tim = imagf( searchElement );\n\tbuf = this._buffer;\n\tfor ( i = fromIndex; i < this._length; i++ ) {\n\t\tidx = 2 * i;\n\t\tif ( re === buf[ idx ] && im === buf[ idx+1 ] ) {\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n});\n\n/**\n* Returns the first index at which a given element can be found.\n*\n* @name indexOf\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {ComplexLike} searchElement - element to find\n* @param {integer} [fromIndex=0] - starting index (inclusive)\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a complex number\n* @throws {TypeError} second argument must be an integer\n* @returns {integer} index or -1\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n*\n* var arr = new Complex64Array( 10 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n* arr.set( [ 4.0, -4.0 ], 3 );\n* arr.set( [ 5.0, -5.0 ], 4 );\n*\n* var idx = arr.indexOf( new Complex64( 3.0, -3.0 ) );\n* // returns 2\n*\n* idx = arr.indexOf( new Complex64( 3.0, -3.0 ), 3 );\n* // returns -1\n*\n* idx = arr.indexOf( new Complex64( 4.0, -4.0 ), -3 );\n* // returns -1\n*/\nsetReadOnly( Complex64Array.prototype, 'indexOf', function indexOf( searchElement, fromIndex ) {\n\tvar buf;\n\tvar idx;\n\tvar re;\n\tvar im;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isComplexLike( searchElement ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a complex number. Value: `%s`.', searchElement ) );\n\t}\n\tif ( arguments.length > 1 ) {\n\t\tif ( !isInteger( fromIndex ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be an integer. Value: `%s`.', fromIndex ) );\n\t\t}\n\t\tif ( fromIndex < 0 ) {\n\t\t\tfromIndex += this._length;\n\t\t\tif ( fromIndex < 0 ) {\n\t\t\t\tfromIndex = 0;\n\t\t\t}\n\t\t}\n\t} else {\n\t\tfromIndex = 0;\n\t}\n\tre = realf( searchElement );\n\tim = imagf( searchElement );\n\tbuf = this._buffer;\n\tfor ( i = fromIndex; i < this._length; i++ ) {\n\t\tidx = 2 * i;\n\t\tif ( re === buf[ idx ] && im === buf[ idx+1 ] ) {\n\t\t\treturn i;\n\t\t}\n\t}\n\treturn -1;\n});\n\n/**\n* Returns a new string by concatenating all array elements.\n*\n* @name join\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {string} [separator=','] - element separator\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a string\n* @returns {string} string representation\n*\n* @example\n* var arr = new Complex64Array( 2 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n*\n* var str = arr.join();\n* // returns '1 + 1i,2 + 2i'\n*\n* str = arr.join( '/' );\n* // returns '1 + 1i/2 + 2i'\n*/\nsetReadOnly( Complex64Array.prototype, 'join', function join( separator ) {\n\tvar out;\n\tvar buf;\n\tvar sep;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( arguments.length === 0 ) {\n\t\tsep = ',';\n\t} else if ( isString( separator ) ) {\n\t\tsep = separator;\n\t} else {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a string. Value: `%s`.', separator ) );\n\t}\n\tout = [];\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tout.push( getComplex64( buf, i ).toString() );\n\t}\n\treturn out.join( sep );\n});\n\n/**\n* Returns the last index at which a given element can be found.\n*\n* @name lastIndexOf\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {ComplexLike} searchElement - element to find\n* @param {integer} [fromIndex] - index at which to start searching backward (inclusive)\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a complex number\n* @throws {TypeError} second argument must be an integer\n* @returns {integer} index or -1\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n*\n* var arr = new Complex64Array( 5 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n* arr.set( [ 4.0, -4.0 ], 3 );\n* arr.set( [ 3.0, -3.0 ], 4 );\n*\n* var idx = arr.lastIndexOf( new Complex64( 3.0, -3.0 ) );\n* // returns 4\n*\n* idx = arr.lastIndexOf( new Complex64( 3.0, -3.0 ), 3 );\n* // returns 2\n*\n* idx = arr.lastIndexOf( new Complex64( 5.0, -5.0 ), 3 );\n* // returns -1\n*\n* idx = arr.lastIndexOf( new Complex64( 2.0, -2.0 ), -3 );\n* // returns 1\n*/\nsetReadOnly( Complex64Array.prototype, 'lastIndexOf', function lastIndexOf( searchElement, fromIndex ) {\n\tvar buf;\n\tvar idx;\n\tvar re;\n\tvar im;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isComplexLike( searchElement ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a complex number. Value: `%s`.', searchElement ) );\n\t}\n\tif ( arguments.length > 1 ) {\n\t\tif ( !isInteger( fromIndex ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be an integer. Value: `%s`.', fromIndex ) );\n\t\t}\n\t\tif ( fromIndex >= this._length ) {\n\t\t\tfromIndex = this._length - 1;\n\t\t} else if ( fromIndex < 0 ) {\n\t\t\tfromIndex += this._length;\n\t\t}\n\t} else {\n\t\tfromIndex = this._length - 1;\n\t}\n\tre = realf( searchElement );\n\tim = imagf( searchElement );\n\tbuf = this._buffer;\n\tfor ( i = fromIndex; i >= 0; i-- ) {\n\t\tidx = 2 * i;\n\t\tif ( re === buf[ idx ] && im === buf[ idx+1 ] ) {\n\t\t\treturn i;\n\t\t}\n\t}\n\treturn -1;\n});\n\n/**\n* Number of array elements.\n*\n* @name length\n* @memberof Complex64Array.prototype\n* @readonly\n* @type {NonNegativeInteger}\n*\n* @example\n* var arr = new Complex64Array( 10 );\n*\n* var len = arr.length;\n* // returns 10\n*/\nsetReadOnlyAccessor( Complex64Array.prototype, 'length', function get() {\n\treturn this._length;\n});\n\n/**\n* Returns a new array with each element being the result of a provided callback function.\n*\n* @name map\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {Function} fcn - callback function\n* @param {*} [thisArg] - callback function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {Complex64Array} complex number array\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* function scale( v, i ) {\n* return new Complex64( 2.0*realf( v ), 2.0*imagf( v ) );\n* }\n*\n* var arr = new Complex64Array( 3 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n*\n* var out = arr.map( scale );\n* // returns \n*\n* var z = out.get( 0 );\n* // returns \n*\n* var re = realf( z );\n* // returns 2\n*\n* var im = imagf( z );\n* // returns -2\n*/\nsetReadOnly( Complex64Array.prototype, 'map', function map( fcn, thisArg ) {\n\tvar outbuf;\n\tvar buf;\n\tvar out;\n\tvar i;\n\tvar v;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( fcn ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', fcn ) );\n\t}\n\tbuf = this._buffer;\n\tout = new this.constructor( this._length );\n\toutbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tv = fcn.call( thisArg, getComplex64( buf, i ), i, this );\n\t\tif ( isComplexLike( v ) ) {\n\t\t\toutbuf[ 2*i ] = realf( v );\n\t\t\toutbuf[ (2*i)+1 ] = imagf( v );\n\t\t} else if ( isArrayLikeObject( v ) && v.length === 2 ) {\n\t\t\toutbuf[ 2*i ] = v[ 0 ];\n\t\t\toutbuf[ (2*i)+1 ] = v[ 1 ];\n\t\t} else {\n\t\t\tthrow new TypeError( format( 'invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', v ) );\n\t\t}\n\t}\n\treturn out;\n});\n\n/**\n* Applies a provided callback function to each element of the array, in order, passing in the return value from the calculation on the preceding element and returning the accumulated result upon completion.\n*\n* @name reduce\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {Function} reducer - callback function\n* @param {*} [initialValue] - initial value\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @throws {Error} if not provided an initial value, the array must have at least one element\n* @returns {*} accumulated result\n*\n* @example\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n* import caddf from '@stdlib/math-base-ops-caddf';\n*\n* var arr = new Complex64Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var z = arr.reduce( caddf );\n* // returns \n*\n* var re = realf( z );\n* // returns 6.0\n*\n* var im = imagf( z );\n* // returns 6.0\n*/\nsetReadOnly( Complex64Array.prototype, 'reduce', function reduce( reducer, initialValue ) {\n\tvar buf;\n\tvar acc;\n\tvar len;\n\tvar v;\n\tvar i;\n\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( reducer ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', reducer ) );\n\t}\n\tbuf = this._buffer;\n\tlen = this._length;\n\tif ( arguments.length > 1 ) {\n\t\tacc = initialValue;\n\t\ti = 0;\n\t} else {\n\t\tif ( len === 0 ) {\n\t\t\tthrow new Error( 'invalid operation. If not provided an initial value, an array must contain at least one element.' );\n\t\t}\n\t\tacc = getComplex64( buf, 0 );\n\t\ti = 1;\n\t}\n\tfor ( ; i < len; i++ ) {\n\t\tv = getComplex64( buf, i );\n\t\tacc = reducer( acc, v, i, this );\n\t}\n\treturn acc;\n});\n\n/**\n* Reverses an array in-place.\n*\n* @name reverse\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Complex64Array} reversed array\n*\n* @example\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* var arr = new Complex64Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var out = arr.reverse();\n* // returns \n*\n* var z = out.get( 0 );\n* // returns \n*\n* var re = realf( z );\n* // returns 3.0\n*\n* var im = imagf( z );\n* // returns 3.0\n*\n* z = out.get( 1 );\n* // returns \n*\n* re = realf( z );\n* // returns 2.0\n*\n* im = imagf( z );\n* // returns 2.0\n*\n* z = out.get( 2 );\n* // returns \n*\n* re = realf( z );\n* // returns 1.0\n*\n* im = imagf( z );\n* // returns 1.0\n*/\nsetReadOnly( Complex64Array.prototype, 'reverse', function reverse() {\n\tvar buf;\n\tvar tmp;\n\tvar len;\n\tvar N;\n\tvar i;\n\tvar j;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tlen = this._length;\n\tbuf = this._buffer;\n\tN = floor( len / 2 );\n\tfor ( i = 0; i < N; i++ ) {\n\t\tj = len - i - 1;\n\t\ttmp = buf[ (2*i) ];\n\t\tbuf[ (2*i) ] = buf[ (2*j) ];\n\t\tbuf[ (2*j) ] = tmp;\n\t\ttmp = buf[ (2*i)+1 ];\n\t\tbuf[ (2*i)+1 ] = buf[ (2*j)+1 ];\n\t\tbuf[ (2*j)+1 ] = tmp;\n\t}\n\treturn this;\n});\n\n/**\n* Sets an array element.\n*\n* ## Notes\n*\n* - When provided a typed array, real or complex, we must check whether the source array shares the same buffer as the target array and whether the underlying memory overlaps. In particular, we are concerned with the following scenario:\n*\n* ```text\n* buf: ---------------------\n* src: ---------------------\n* ```\n*\n* In the above, as we copy values from `src`, we will overwrite values in the `src` view, resulting in duplicated values copied into the end of `buf`, which is not intended. Hence, to avoid overwriting source values, we must **copy** source values to a temporary array.\n*\n* In the other overlapping scenario,\n*\n* ```text\n* buf: ---------------------\n* src: ---------------------\n* ```\n*\n* by the time we begin copying into the overlapping region, we are copying from the end of `src`, a non-overlapping region, which means we don't run the risk of copying copied values, rather than the original `src` values, as intended.\n*\n* @name set\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {(Collection|Complex|ComplexArray)} value - value(s)\n* @param {NonNegativeInteger} [i=0] - element index at which to start writing values\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be either a complex number, an array-like object, or a complex number array\n* @throws {TypeError} index argument must be a nonnegative integer\n* @throws {RangeError} array-like objects must have a length which is a multiple of two\n* @throws {RangeError} index argument is out-of-bounds\n* @throws {RangeError} target array lacks sufficient storage to accommodate source values\n* @returns {void}\n*\n* @example\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* var arr = new Complex64Array( 10 );\n*\n* var z = arr.get( 0 );\n* // returns \n*\n* var re = realf( z );\n* // returns 0.0\n*\n* var im = imagf( z );\n* // returns 0.0\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n*\n* z = arr.get( 0 );\n* // returns \n*\n* re = realf( z );\n* // returns 1.0\n*\n* im = imagf( z );\n* // returns -1.0\n*/\nsetReadOnly( Complex64Array.prototype, 'set', function set( value ) {\n\t/* eslint-disable no-underscore-dangle */\n\tvar sbuf;\n\tvar idx;\n\tvar buf;\n\tvar tmp;\n\tvar flg;\n\tvar N;\n\tvar v;\n\tvar i;\n\tvar j;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tbuf = this._buffer;\n\tif ( arguments.length > 1 ) {\n\t\tidx = arguments[ 1 ];\n\t\tif ( !isNonNegativeInteger( idx ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Index argument must be a nonnegative integer. Value: `%s`.', idx ) );\n\t\t}\n\t} else {\n\t\tidx = 0;\n\t}\n\tif ( isComplexLike( value ) ) {\n\t\tif ( idx >= this._length ) {\n\t\t\tthrow new RangeError( format( 'invalid argument. Index argument is out-of-bounds. Value: `%u`.', idx ) );\n\t\t}\n\t\tidx *= 2;\n\t\tbuf[ idx ] = realf( value );\n\t\tbuf[ idx+1 ] = imagf( value );\n\t\treturn;\n\t}\n\tif ( isComplexArray( value ) ) {\n\t\tN = value._length;\n\t\tif ( idx+N > this._length ) {\n\t\t\tthrow new RangeError( 'invalid arguments. Target array lacks sufficient storage to accommodate source values.' );\n\t\t}\n\t\tsbuf = value._buffer;\n\n\t\t// Check for overlapping memory...\n\t\tj = buf.byteOffset + (idx*BYTES_PER_ELEMENT);\n\t\tif (\n\t\t\tsbuf.buffer === buf.buffer &&\n\t\t\t(\n\t\t\t\tsbuf.byteOffset < j &&\n\t\t\t\tsbuf.byteOffset+sbuf.byteLength > j\n\t\t\t)\n\t\t) {\n\t\t\t// We need to copy source values...\n\t\t\ttmp = new Float32Array( sbuf.length );\n\t\t\tfor ( i = 0; i < sbuf.length; i++ ) {\n\t\t\t\ttmp[ i ] = sbuf[ i ];\n\t\t\t}\n\t\t\tsbuf = tmp;\n\t\t}\n\t\tidx *= 2;\n\t\tj = 0;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\tbuf[ idx ] = sbuf[ j ];\n\t\t\tbuf[ idx+1 ] = sbuf[ j+1 ];\n\t\t\tidx += 2; // stride\n\t\t\tj += 2; // stride\n\t\t}\n\t\treturn;\n\t}\n\tif ( isCollection( value ) ) {\n\t\t// Detect whether we've been provided an array of complex numbers...\n\t\tN = value.length;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\tif ( !isComplexLike( value[ i ] ) ) {\n\t\t\t\tflg = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t// If an array does not contain only complex numbers, then we assume interleaved real and imaginary components...\n\t\tif ( flg ) {\n\t\t\tif ( !isEven( N ) ) {\n\t\t\t\tthrow new RangeError( format( 'invalid argument. Array-like object arguments must have a length which is a multiple of two. Length: `%u`.', N ) );\n\t\t\t}\n\t\t\tif ( idx+(N/2) > this._length ) {\n\t\t\t\tthrow new RangeError( 'invalid arguments. Target array lacks sufficient storage to accommodate source values.' );\n\t\t\t}\n\t\t\tsbuf = value;\n\n\t\t\t// Check for overlapping memory...\n\t\t\tj = buf.byteOffset + (idx*BYTES_PER_ELEMENT);\n\t\t\tif (\n\t\t\t\tsbuf.buffer === buf.buffer &&\n\t\t\t\t(\n\t\t\t\t\tsbuf.byteOffset < j &&\n\t\t\t\t\tsbuf.byteOffset+sbuf.byteLength > j\n\t\t\t\t)\n\t\t\t) {\n\t\t\t\t// We need to copy source values...\n\t\t\t\ttmp = new Float32Array( N );\n\t\t\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\t\t\ttmp[ i ] = sbuf[ i ]; // TODO: handle accessor arrays\n\t\t\t\t}\n\t\t\t\tsbuf = tmp;\n\t\t\t}\n\t\t\tidx *= 2;\n\t\t\tN /= 2;\n\t\t\tj = 0;\n\t\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\t\tbuf[ idx ] = sbuf[ j ];\n\t\t\t\tbuf[ idx+1 ] = sbuf[ j+1 ];\n\t\t\t\tidx += 2; // stride\n\t\t\t\tj += 2; // stride\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\t// If an array contains only complex numbers, then we need to extract real and imaginary components...\n\t\tif ( idx+N > this._length ) {\n\t\t\tthrow new RangeError( 'invalid arguments. Target array lacks sufficient storage to accommodate source values.' );\n\t\t}\n\t\tidx *= 2;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\tv = value[ i ];\n\t\t\tbuf[ idx ] = realf( v );\n\t\t\tbuf[ idx+1 ] = imagf( v );\n\t\t\tidx += 2; // stride\n\t\t}\n\t\treturn;\n\t}\n\tthrow new TypeError( format( 'invalid argument. First argument must be either a complex number, an array-like object, or a complex number array. Value: `%s`.', value ) );\n\n\t/* eslint-enable no-underscore-dangle */\n});\n\n/**\n* Copies a portion of a typed array to a new typed array.\n*\n* @name slice\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {integer} [start=0] - starting index (inclusive)\n* @param {integer} [end] - ending index (exclusive)\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be an integer\n* @throws {TypeError} second argument must be an integer\n* @returns {Complex64Array} complex number array\n*\n* @example\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* var arr = new Complex64Array( 5 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n* arr.set( [ 4.0, -4.0 ], 3 );\n* arr.set( [ 5.0, -5.0 ], 4 );\n*\n* var out = arr.slice();\n* // returns \n*\n* var len = out.length;\n* // returns 5\n*\n* var z = out.get( 0 );\n* // returns \n*\n* var re = realf( z );\n* // returns 1.0\n*\n* var im = imagf( z );\n* // returns -1.0\n*\n* z = out.get( len-1 );\n* // returns \n*\n* re = realf( z );\n* // returns 5.0\n*\n* im = imagf( z );\n* // returns -5.0\n*\n* out = arr.slice( 1, -2 );\n* // returns \n*\n* len = out.length;\n* // returns 2\n*\n* z = out.get( 0 );\n* // returns \n*\n* re = realf( z );\n* // returns 2.0\n*\n* im = imagf( z );\n* // returns -2.0\n*\n* z = out.get( len-1 );\n* // returns \n*\n* re = realf( z );\n* // returns 3.0\n*\n* im = imagf( z );\n* // returns -3.0\n*/\nsetReadOnly( Complex64Array.prototype, 'slice', function slice( start, end ) {\n\tvar outlen;\n\tvar outbuf;\n\tvar out;\n\tvar idx;\n\tvar buf;\n\tvar len;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tbuf = this._buffer;\n\tlen = this._length;\n\tif ( arguments.length === 0 ) {\n\t\tstart = 0;\n\t\tend = len;\n\t} else {\n\t\tif ( !isInteger( start ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. First argument must be an integer. Value: `%s`.', start ) );\n\t\t}\n\t\tif ( start < 0 ) {\n\t\t\tstart += len;\n\t\t\tif ( start < 0 ) {\n\t\t\t\tstart = 0;\n\t\t\t}\n\t\t}\n\t\tif ( arguments.length === 1 ) {\n\t\t\tend = len;\n\t\t} else {\n\t\t\tif ( !isInteger( end ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be an integer. Value: `%s`.', end ) );\n\t\t\t}\n\t\t\tif ( end < 0 ) {\n\t\t\t\tend += len;\n\t\t\t\tif ( end < 0 ) {\n\t\t\t\t\tend = 0;\n\t\t\t\t}\n\t\t\t} else if ( end > len ) {\n\t\t\t\tend = len;\n\t\t\t}\n\t\t}\n\t}\n\tif ( start < end ) {\n\t\toutlen = end - start;\n\t} else {\n\t\toutlen = 0;\n\t}\n\tout = new this.constructor( outlen );\n\toutbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\tfor ( i = 0; i < outlen; i++ ) {\n\t\tidx = 2*(i+start);\n\t\toutbuf[ 2*i ] = buf[ idx ];\n\t\toutbuf[ (2*i)+1 ] = buf[ idx+1 ];\n\t}\n\treturn out;\n});\n\n/**\n* Tests whether at least one element in an array passes a test implemented by a predicate function.\n*\n* @name some\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {boolean} boolean indicating whether at least one element passes a test\n*\n* @example\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* function predicate( v ) {\n* return ( realf( v ) === imagf( v ) );\n* }\n*\n* var arr = new Complex64Array( 3 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n*\n* var bool = arr.some( predicate );\n* // returns true\n*/\nsetReadOnly( Complex64Array.prototype, 'some', function some( predicate, thisArg ) {\n\tvar buf;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tif ( predicate.call( thisArg, getComplex64( buf, i ), i, this ) ) {\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n});\n\n/**\n* Creates a new typed array view over the same underlying `ArrayBuffer` and with the same underlying data type as the host array.\n*\n* @name subarray\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {integer} [begin=0] - starting index (inclusive)\n* @param {integer} [end] - ending index (exclusive)\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be an integer\n* @throws {TypeError} second argument must be an integer\n* @returns {Complex64Array} subarray\n*\n* @example\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* var arr = new Complex64Array( 5 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n* arr.set( [ 4.0, -4.0 ], 3 );\n* arr.set( [ 5.0, -5.0 ], 4 );\n*\n* var subarr = arr.subarray();\n* // returns \n*\n* var len = subarr.length;\n* // returns 5\n*\n* var z = subarr.get( 0 );\n* // returns \n*\n* var re = realf( z );\n* // returns 1.0\n*\n* var im = imagf( z );\n* // returns -1.0\n*\n* z = subarr.get( len-1 );\n* // returns \n*\n* re = realf( z );\n* // returns 5.0\n*\n* im = imagf( z );\n* // returns -5.0\n*\n* subarr = arr.subarray( 1, -2 );\n* // returns \n*\n* len = subarr.length;\n* // returns 2\n*\n* z = subarr.get( 0 );\n* // returns \n*\n* re = realf( z );\n* // returns 2.0\n*\n* im = imagf( z );\n* // returns -2.0\n*\n* z = subarr.get( len-1 );\n* // returns \n*\n* re = realf( z );\n* // returns 3.0\n*\n* im = imagf( z );\n* // returns -3.0\n*/\nsetReadOnly( Complex64Array.prototype, 'subarray', function subarray( begin, end ) {\n\tvar offset;\n\tvar buf;\n\tvar len;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tbuf = this._buffer;\n\tlen = this._length;\n\tif ( arguments.length === 0 ) {\n\t\tbegin = 0;\n\t\tend = len;\n\t} else {\n\t\tif ( !isInteger( begin ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. First argument must be an integer. Value: `%s`.', begin ) );\n\t\t}\n\t\tif ( begin < 0 ) {\n\t\t\tbegin += len;\n\t\t\tif ( begin < 0 ) {\n\t\t\t\tbegin = 0;\n\t\t\t}\n\t\t}\n\t\tif ( arguments.length === 1 ) {\n\t\t\tend = len;\n\t\t} else {\n\t\t\tif ( !isInteger( end ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be an integer. Value: `%s`.', end ) );\n\t\t\t}\n\t\t\tif ( end < 0 ) {\n\t\t\t\tend += len;\n\t\t\t\tif ( end < 0 ) {\n\t\t\t\t\tend = 0;\n\t\t\t\t}\n\t\t\t} else if ( end > len ) {\n\t\t\t\tend = len;\n\t\t\t}\n\t\t}\n\t}\n\tif ( begin >= len ) {\n\t\tlen = 0;\n\t\toffset = buf.byteLength;\n\t} else if ( begin >= end ) {\n\t\tlen = 0;\n\t\toffset = buf.byteOffset + (begin*BYTES_PER_ELEMENT);\n\t} else {\n\t\tlen = end - begin;\n\t\toffset = buf.byteOffset + ( begin*BYTES_PER_ELEMENT );\n\t}\n\treturn new this.constructor( buf.buffer, offset, ( len < 0 ) ? 0 : len );\n});\n\n/**\n* Returns a new typed array containing the elements in reversed order.\n*\n* @name toReversed\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Complex64Array} reversed array\n*\n* @example\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* var arr = new Complex64Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var out = arr.toReversed();\n* // returns \n*\n* var z = out.get( 0 );\n* // returns \n*\n* var re = realf( z );\n* // returns 3.0\n*\n* var im = imagf( z );\n* // returns 3.0\n*\n* z = out.get( 1 );\n* // returns \n*\n* re = realf( z );\n* // returns 2.0\n*\n* im = imagf( z );\n* // returns 2.0\n*\n* z = out.get( 2 );\n* // returns \n*\n* re = realf( z );\n* // returns 1.0\n*\n* im = imagf( z );\n* // returns 1.0\n*/\nsetReadOnly( Complex64Array.prototype, 'toReversed', function toReversed() {\n\tvar outbuf;\n\tvar out;\n\tvar len;\n\tvar buf;\n\tvar i;\n\tvar j;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tlen = this._length;\n\tout = new this.constructor( len );\n\tbuf = this._buffer;\n\toutbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\tfor ( i = 0; i < len; i++ ) {\n\t\tj = len - i - 1;\n\t\toutbuf[ (2*i) ] = buf[ (2*j) ];\n\t\toutbuf[ (2*i)+1 ] = buf[ (2*j)+1 ];\n\t}\n\treturn out;\n});\n\n/**\n* Serializes an array as a string.\n*\n* @name toString\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @throws {TypeError} `this` must be a complex number array\n* @returns {string} string representation\n*\n* @example\n* var arr = new Complex64Array( 2 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n*\n* var str = arr.toString();\n* // returns '1 + 1i,2 + 2i'\n*/\nsetReadOnly( Complex64Array.prototype, 'toString', function toString() {\n\tvar out;\n\tvar buf;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tout = [];\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tout.push( getComplex64( buf, i ).toString() );\n\t}\n\treturn out.join( ',' );\n});\n\n/**\n* Returns a new typed array with the element at a provided index replaced with a provided value.\n*\n* @name with\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {integer} index - element index\n* @param {ComplexLike} value - new value\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be an integer\n* @throws {RangeError} index argument is out-of-bounds\n* @throws {TypeError} second argument must be a complex number\n* @returns {Complex64Array} new typed array\n*\n* @example\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n* import Complex64 from '@stdlib/complex-float32';\n*\n* var arr = new Complex64Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var out = arr.with( 0, new Complex64( 4.0, 4.0 ) );\n* // returns \n*\n* var z = out.get( 0 );\n* // returns \n*\n* var re = realf( z );\n* // returns 4.0\n*\n* var im = imagf( z );\n* // returns 4.0\n*/\nsetReadOnly( Complex64Array.prototype, 'with', function copyWith( index, value ) {\n\tvar buf;\n\tvar out;\n\tvar len;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isInteger( index ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be an integer. Value: `%s`.', index ) );\n\t}\n\tlen = this._length;\n\tif ( index < 0 ) {\n\t\tindex += len;\n\t}\n\tif ( index < 0 || index >= len ) {\n\t\tthrow new RangeError( format( 'invalid argument. Index argument is out-of-bounds. Value: `%s`.', index ) );\n\t}\n\tif ( !isComplexLike( value ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Second argument must be a complex number. Value: `%s`.', value ) );\n\t}\n\tout = new this.constructor( this._buffer );\n\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\tbuf[ 2*index ] = realf( value );\n\tbuf[ (2*index)+1 ] = imagf( value );\n\treturn out;\n});\n\n\n// EXPORTS //\n\nexport default Complex64Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport realf from '@stdlib/complex-realf';\nimport imagf from '@stdlib/complex-imagf';\n\n\n// MAIN //\n\n/**\n* Returns a strided array of real and imaginary components.\n*\n* @private\n* @param {Float32Array} buf - output array\n* @param {Array} arr - array containing complex numbers\n* @returns {(Float32Array|null)} output array or null\n*/\nfunction fromArray( buf, arr ) {\n\tvar len;\n\tvar v;\n\tvar i;\n\tvar j;\n\n\tlen = arr.length;\n\tj = 0;\n\tfor ( i = 0; i < len; i++ ) {\n\t\tv = arr[ i ];\n\t\tif ( !isComplexLike( v ) ) {\n\t\t\treturn null;\n\t\t}\n\t\tbuf[ j ] = realf( v );\n\t\tbuf[ j+1 ] = imagf( v );\n\t\tj += 2; // stride\n\t}\n\treturn buf;\n}\n\n\n// EXPORTS //\n\nexport default fromArray;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isNumber } from '@stdlib/assert-is-number';\nimport defineProperty from '@stdlib/utils-define-property';\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport format from '@stdlib/string-format';\nimport toStr from './tostring.js';\nimport toJSON from './tojson.js';\n\n\n// MAIN //\n\n/**\n* 128-bit complex number constructor.\n*\n* @constructor\n* @param {number} real - real component\n* @param {number} imag - imaginary component\n* @throws {TypeError} must invoke using the `new` keyword\n* @throws {TypeError} real component must be a number\n* @throws {TypeError} imaginary component must be a number\n* @returns {Complex128} 128-bit complex number\n*\n* @example\n* var z = new Complex128( 5.0, 3.0 );\n* // returns \n*/\nfunction Complex128( real, imag ) {\n\tif ( !( this instanceof Complex128 ) ) {\n\t\tthrow new TypeError( 'invalid invocation. Constructor must be called with the `new` keyword.' );\n\t}\n\tif ( !isNumber( real ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Real component must be a number. Value: `%s`.', real ) );\n\t}\n\tif ( !isNumber( imag ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Imaginary component must be a number. Value: `%s`.', imag ) );\n\t}\n\tdefineProperty( this, 're', {\n\t\t'configurable': false,\n\t\t'enumerable': true,\n\t\t'writable': false,\n\t\t'value': real\n\t});\n\tdefineProperty( this, 'im', {\n\t\t'configurable': false,\n\t\t'enumerable': true,\n\t\t'writable': false,\n\t\t'value': imag\n\t});\n\treturn this;\n}\n\n/**\n* Size (in bytes) of each component.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex128\n* @type {integer}\n* @returns {integer} size of each component\n*\n* @example\n* var nbytes = Complex128.BYTES_PER_ELEMENT;\n* // returns 8\n*/\nsetReadOnly( Complex128, 'BYTES_PER_ELEMENT', 8 );\n\n/**\n* Size (in bytes) of each component.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex128.prototype\n* @type {integer}\n* @returns {integer} size of each component\n*\n* @example\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var nbytes = z.BYTES_PER_ELEMENT;\n* // returns 8\n*/\nsetReadOnly( Complex128.prototype, 'BYTES_PER_ELEMENT', 8 );\n\n/**\n* Length (in bytes) of a complex number.\n*\n* @name byteLength\n* @memberof Complex128.prototype\n* @type {integer}\n* @returns {integer} byte length\n*\n* @example\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var nbytes = z.byteLength;\n* // returns 16\n*/\nsetReadOnly( Complex128.prototype, 'byteLength', 16 );\n\n/**\n* Serializes a complex number as a string.\n*\n* @name toString\n* @memberof Complex128.prototype\n* @type {Function}\n* @returns {string} serialized complex number\n*\n* @example\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var str = z.toString();\n* // returns '5 + 3i'\n*/\nsetReadOnly( Complex128.prototype, 'toString', toStr );\n\n/**\n* Serializes a complex number as a JSON object.\n*\n* ## Notes\n*\n* - `JSON.stringify()` implicitly calls this method when stringifying a `Complex128` instance.\n*\n* @name toJSON\n* @memberof Complex128.prototype\n* @type {Function}\n* @returns {Object} serialized complex number\n*\n* @example\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var obj = z.toJSON();\n* // returns { 'type': 'Complex128', 're': 5.0, 'im': 3.0 }\n*/\nsetReadOnly( Complex128.prototype, 'toJSON', toJSON );\n\n\n// EXPORTS //\n\nexport default Complex128;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Returns the real component of a double-precision complex floating-point number.\n*\n* @param {Complex} z - complex number\n* @returns {number} real component\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n*\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var re = real( z );\n* // returns 5.0\n*/\nfunction real( z ) {\n\treturn z.re;\n}\n\n\n// EXPORTS //\n\nexport default real;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Returns the imaginary component of a double-precision complex floating-point number.\n*\n* @param {Complex} z - complex number\n* @returns {number} imaginary component\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n*\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var im = imag( z );\n* // returns 3.0\n*/\nfunction imag( z ) {\n\treturn z.im;\n}\n\n\n// EXPORTS //\n\nexport default imag;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isArrayLikeObject from '@stdlib/assert-is-array-like-object';\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport format from '@stdlib/string-format';\nimport real from '@stdlib/complex-real';\nimport imag from '@stdlib/complex-imag';\n\n\n// MAIN //\n\n/**\n* Returns an array of iterated values.\n*\n* @private\n* @param {Object} it - iterator\n* @returns {(Array|TypeError)} array or an error\n*/\nfunction fromIterator( it ) {\n\tvar out;\n\tvar v;\n\tvar z;\n\n\tout = [];\n\twhile ( true ) {\n\t\tv = it.next();\n\t\tif ( v.done ) {\n\t\t\tbreak;\n\t\t}\n\t\tz = v.value;\n\t\tif ( isArrayLikeObject( z ) && z.length >= 2 ) {\n\t\t\tout.push( z[ 0 ], z[ 1 ] );\n\t\t} else if ( isComplexLike( z ) ) {\n\t\t\tout.push( real( z ), imag( z ) );\n\t\t} else {\n\t\t\treturn new TypeError( format( 'invalid argument. An iterator must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', z ) );\n\t\t}\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default fromIterator;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isArrayLikeObject from '@stdlib/assert-is-array-like-object';\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport realf from '@stdlib/complex-realf';\nimport imagf from '@stdlib/complex-imagf';\nimport format from '@stdlib/string-format';\n\n\n// MAIN //\n\n/**\n* Returns an array of iterated values.\n*\n* @private\n* @param {Object} it - iterator\n* @param {Function} clbk - callback to invoke for each iterated value\n* @param {*} thisArg - invocation context\n* @returns {(Array|TypeError)} array or an error\n*/\nfunction fromIteratorMap( it, clbk, thisArg ) {\n\tvar out;\n\tvar v;\n\tvar z;\n\tvar i;\n\n\tout = [];\n\ti = -1;\n\twhile ( true ) {\n\t\tv = it.next();\n\t\tif ( v.done ) {\n\t\t\tbreak;\n\t\t}\n\t\ti += 1;\n\t\tz = clbk.call( thisArg, v.value, i );\n\t\tif ( isArrayLikeObject( z ) && z.length >= 2 ) {\n\t\t\tout.push( z[ 0 ], z[ 1 ] );\n\t\t} else if ( isComplexLike( z ) ) {\n\t\t\tout.push( realf( z ), imagf( z ) );\n\t\t} else {\n\t\t\treturn new TypeError( format( 'invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', z ) );\n\t\t}\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default fromIteratorMap;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Serializes a complex number as a string.\n*\n* @private\n* @returns {string} serialized complex number\n*/\nfunction toString() { // eslint-disable-line stdlib/no-redeclare\n\t/* eslint-disable no-invalid-this */\n\tvar str = '' + this.re;\n\tif ( this.im < 0 ) {\n\t\tstr += ' - ' + (-this.im);\n\t} else {\n\t\tstr += ' + ' + this.im;\n\t}\n\tstr += 'i';\n\treturn str;\n}\n\n\n// EXPORTS //\n\nexport default toString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Serializes a complex number as a JSON object.\n*\n* @private\n* @returns {Object} JSON representation\n*/\nfunction toJSON() {\n\t/* eslint-disable no-invalid-this */\n\tvar out = {};\n\tout.type = 'Complex128';\n\tout.re = this.re;\n\tout.im = this.im;\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default toJSON;\n","/* eslint-disable no-restricted-syntax, max-lines, no-invalid-this */\n\n/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isNonNegativeInteger } from '@stdlib/assert-is-nonnegative-integer';\nimport isArrayLikeObject from '@stdlib/assert-is-array-like-object';\nimport isCollection from '@stdlib/assert-is-collection';\nimport isArrayBuffer from '@stdlib/assert-is-arraybuffer';\nimport isObject from '@stdlib/assert-is-object';\nimport isArray from '@stdlib/assert-is-array';\nimport isString from '@stdlib/assert-is-string';\nimport isFunction from '@stdlib/assert-is-function';\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport isEven from '@stdlib/math-base-assert-is-even';\nimport isInteger from '@stdlib/math-base-assert-is-integer';\nimport isComplex64Array from '@stdlib/array-base-assert-is-complex64array';\nimport isComplex128Array from '@stdlib/array-base-assert-is-complex128array';\nimport hasIteratorSymbolSupport from '@stdlib/assert-has-iterator-symbol-support';\nimport ITERATOR_SYMBOL from '@stdlib/symbol-iterator';\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport setReadOnlyAccessor from '@stdlib/utils-define-nonenumerable-read-only-accessor';\nimport Float64Array from '@stdlib/array-float64';\nimport Complex128 from '@stdlib/complex-float64';\nimport real from '@stdlib/complex-real';\nimport imag from '@stdlib/complex-imag';\nimport floor from '@stdlib/math-base-special-floor';\nimport reinterpret64 from '@stdlib/strided-base-reinterpret-complex64';\nimport reinterpret128 from '@stdlib/strided-base-reinterpret-complex128';\nimport getter from '@stdlib/array-base-getter';\nimport accessorGetter from '@stdlib/array-base-accessor-getter';\nimport format from '@stdlib/string-format';\nimport fromIterator from './from_iterator.js';\nimport fromIteratorMap from './from_iterator_map.js';\nimport fromArray from './from_array.js';\n\n\n// VARIABLES //\n\nvar BYTES_PER_ELEMENT = Float64Array.BYTES_PER_ELEMENT * 2;\nvar HAS_ITERATOR_SYMBOL = hasIteratorSymbolSupport();\n\n\n// FUNCTIONS //\n\n/**\n* Returns a boolean indicating if a value is a complex typed array.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a complex typed array\n*/\nfunction isComplexArray( value ) {\n\treturn (\n\t\tvalue instanceof Complex128Array ||\n\t\t(\n\t\t\ttypeof value === 'object' &&\n\t\t\tvalue !== null &&\n\t\t\t(\n\t\t\t\tvalue.constructor.name === 'Complex64Array' ||\n\t\t\t\tvalue.constructor.name === 'Complex128Array'\n\t\t\t) &&\n\t\t\ttypeof value._length === 'number' && // eslint-disable-line no-underscore-dangle\n\n\t\t\t// NOTE: we don't perform a more rigorous test here for a typed array for performance reasons, as robustly checking for a typed array instance could require walking the prototype tree and performing relatively expensive constructor checks...\n\t\t\ttypeof value._buffer === 'object' // eslint-disable-line no-underscore-dangle\n\t\t)\n\t);\n}\n\n/**\n* Returns a boolean indicating if a value is a complex typed array constructor.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a complex typed array constructor\n*/\nfunction isComplexArrayConstructor( value ) {\n\treturn (\n\t\tvalue === Complex128Array ||\n\n\t\t// NOTE: weaker test in order to avoid a circular dependency with Complex64Array...\n\t\tvalue.name === 'Complex64Array'\n\t);\n}\n\n/**\n* Retrieves a complex number from a complex number array buffer.\n*\n* @private\n* @param {Float64Array} buf - array buffer\n* @param {NonNegativeInteger} idx - element index\n* @returns {Complex128} complex number\n*/\nfunction getComplex128( buf, idx ) {\n\tidx *= 2;\n\treturn new Complex128( buf[ idx ], buf[ idx+1 ] );\n}\n\n\n// MAIN //\n\n/**\n* 128-bit complex number array constructor.\n*\n* @constructor\n* @param {(NonNegativeInteger|Collection|ArrayBuffer|Iterable)} [arg] - length, typed array, array-like object, buffer, or iterable\n* @param {NonNegativeInteger} [byteOffset=0] - byte offset\n* @param {NonNegativeInteger} [length] - view length\n* @throws {RangeError} ArrayBuffer byte length must be a multiple of `16`\n* @throws {RangeError} array-like object and typed array input arguments must have a length which is a multiple of two\n* @throws {TypeError} if provided only a single argument, must provide a valid argument\n* @throws {TypeError} byte offset must be a nonnegative integer\n* @throws {RangeError} byte offset must be a multiple of `16`\n* @throws {TypeError} view length must be a positive multiple of `16`\n* @throws {RangeError} must provide sufficient memory to accommodate byte offset and view length requirements\n* @throws {TypeError} an iterator must return either a two element array containing real and imaginary components or a complex number\n* @returns {Complex128Array} complex number array\n*\n* @example\n* var arr = new Complex128Array();\n* // returns \n*\n* var len = arr.length;\n* // returns 0\n*\n* @example\n* var arr = new Complex128Array( 2 );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*\n* @example\n* var arr = new Complex128Array( [ 1.0, -1.0 ] );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* import ArrayBuffer from '@stdlib/array-buffer';\n*\n* var buf = new ArrayBuffer( 32 );\n* var arr = new Complex128Array( buf );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*\n* @example\n* import ArrayBuffer from '@stdlib/array-buffer';\n*\n* var buf = new ArrayBuffer( 32 );\n* var arr = new Complex128Array( buf, 16 );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* import ArrayBuffer from '@stdlib/array-buffer';\n*\n* var buf = new ArrayBuffer( 64 );\n* var arr = new Complex128Array( buf, 16, 2 );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*/\nfunction Complex128Array() {\n\tvar byteOffset;\n\tvar nargs;\n\tvar buf;\n\tvar len;\n\n\tnargs = arguments.length;\n\tif ( !(this instanceof Complex128Array) ) {\n\t\tif ( nargs === 0 ) {\n\t\t\treturn new Complex128Array();\n\t\t}\n\t\tif ( nargs === 1 ) {\n\t\t\treturn new Complex128Array( arguments[0] );\n\t\t}\n\t\tif ( nargs === 2 ) {\n\t\t\treturn new Complex128Array( arguments[0], arguments[1] );\n\t\t}\n\t\treturn new Complex128Array( arguments[0], arguments[1], arguments[2] );\n\t}\n\t// Create the underlying data buffer...\n\tif ( nargs === 0 ) {\n\t\tbuf = new Float64Array( 0 ); // backward-compatibility\n\t} else if ( nargs === 1 ) {\n\t\tif ( isNonNegativeInteger( arguments[0] ) ) {\n\t\t\tbuf = new Float64Array( arguments[0]*2 );\n\t\t} else if ( isCollection( arguments[0] ) ) {\n\t\t\tbuf = arguments[ 0 ];\n\t\t\tlen = buf.length;\n\n\t\t\t// If provided a \"generic\" array, peak at the first value, and, if the value is a complex number, try to process as an array of complex numbers, falling back to \"normal\" typed array initialization if we fail and ensuring consistency if the first value had not been a complex number...\n\t\t\tif ( len && isArray( buf ) && isComplexLike( buf[0] ) ) {\n\t\t\t\tbuf = fromArray( new Float64Array( len*2 ), buf );\n\t\t\t\tif ( buf === null ) {\n\t\t\t\t\t// We failed and we are now forced to allocate a new array :-(\n\t\t\t\t\tif ( !isEven( len ) ) {\n\t\t\t\t\t\tthrow new RangeError( format( 'invalid argument. Array-like object arguments must have a length which is a multiple of two. Length: `%u`.', len ) );\n\t\t\t\t\t}\n\t\t\t\t\t// We failed, so fall back to directly setting values...\n\t\t\t\t\tbuf = new Float64Array( arguments[0] );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ( isComplex64Array( buf ) ) {\n\t\t\t\t\tbuf = reinterpret64( buf, 0 );\n\t\t\t\t} else if ( isComplex128Array( buf ) ) {\n\t\t\t\t\tbuf = reinterpret128( buf, 0 );\n\t\t\t\t} else if ( !isEven( len ) ) {\n\t\t\t\t\tthrow new RangeError( format( 'invalid argument. Array-like object and typed array arguments must have a length which is a multiple of two. Length: `%u`.', len ) );\n\t\t\t\t}\n\t\t\t\tbuf = new Float64Array( buf );\n\t\t\t}\n\t\t} else if ( isArrayBuffer( arguments[0] ) ) {\n\t\t\tbuf = arguments[ 0 ];\n\t\t\tif ( !isInteger( buf.byteLength/BYTES_PER_ELEMENT ) ) {\n\t\t\t\tthrow new RangeError( format( 'invalid argument. ArrayBuffer byte length must be a multiple of %u. Byte length: `%u`.', BYTES_PER_ELEMENT, buf.byteLength ) );\n\t\t\t}\n\t\t\tbuf = new Float64Array( buf );\n\t\t} else if ( isObject( arguments[0] ) ) {\n\t\t\tbuf = arguments[ 0 ];\n\t\t\tif ( HAS_ITERATOR_SYMBOL === false ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Environment lacks Symbol.iterator support. Must provide a length, ArrayBuffer, typed array, or array-like object. Value: `%s`.', buf ) );\n\t\t\t}\n\t\t\tif ( !isFunction( buf[ ITERATOR_SYMBOL ] ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.', buf ) );\n\t\t\t}\n\t\t\tbuf = buf[ ITERATOR_SYMBOL ]();\n\t\t\tif ( !isFunction( buf.next ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.', buf ) );\n\t\t\t}\n\t\t\tbuf = fromIterator( buf );\n\t\t\tif ( buf instanceof Error ) {\n\t\t\t\tthrow buf;\n\t\t\t}\n\t\t\tbuf = new Float64Array( buf );\n\t\t} else {\n\t\t\tthrow new TypeError( format( 'invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.', arguments[0] ) );\n\t\t}\n\t} else {\n\t\tbuf = arguments[ 0 ];\n\t\tif ( !isArrayBuffer( buf ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. First argument must be an ArrayBuffer. Value: `%s`.', buf ) );\n\t\t}\n\t\tbyteOffset = arguments[ 1 ];\n\t\tif ( !isNonNegativeInteger( byteOffset ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Byte offset must be a nonnegative integer. Value: `%s`.', byteOffset ) );\n\t\t}\n\t\tif ( !isInteger( byteOffset/BYTES_PER_ELEMENT ) ) {\n\t\t\tthrow new RangeError( format( 'invalid argument. Byte offset must be a multiple of %u. Value: `%u`.', BYTES_PER_ELEMENT, byteOffset ) );\n\t\t}\n\t\tif ( nargs === 2 ) {\n\t\t\tlen = buf.byteLength - byteOffset;\n\t\t\tif ( !isInteger( len/BYTES_PER_ELEMENT ) ) {\n\t\t\t\tthrow new RangeError( format( 'invalid arguments. ArrayBuffer view byte length must be a multiple of %u. View byte length: `%u`.', BYTES_PER_ELEMENT, len ) );\n\t\t\t}\n\t\t\tbuf = new Float64Array( buf, byteOffset );\n\t\t} else {\n\t\t\tlen = arguments[ 2 ];\n\t\t\tif ( !isNonNegativeInteger( len ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Length must be a nonnegative integer. Value: `%s`.', len ) );\n\t\t\t}\n\t\t\tif ( (len*BYTES_PER_ELEMENT) > (buf.byteLength-byteOffset) ) {\n\t\t\t\tthrow new RangeError( format( 'invalid arguments. ArrayBuffer has insufficient capacity. Either decrease the array length or provide a bigger buffer. Minimum capacity: `%u`.', len*BYTES_PER_ELEMENT ) );\n\t\t\t}\n\t\t\tbuf = new Float64Array( buf, byteOffset, len*2 );\n\t\t}\n\t}\n\tsetReadOnly( this, '_buffer', buf );\n\tsetReadOnly( this, '_length', buf.length/2 );\n\n\treturn this;\n}\n\n/**\n* Size (in bytes) of each array element.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex128Array\n* @readonly\n* @type {PositiveInteger}\n* @default 16\n*\n* @example\n* var nbytes = Complex128Array.BYTES_PER_ELEMENT;\n* // returns 16\n*/\nsetReadOnly( Complex128Array, 'BYTES_PER_ELEMENT', BYTES_PER_ELEMENT );\n\n/**\n* Constructor name.\n*\n* @name name\n* @memberof Complex128Array\n* @readonly\n* @type {string}\n* @default 'Complex128Array'\n*\n* @example\n* var name = Complex128Array.name;\n* // returns 'Complex128Array'\n*/\nsetReadOnly( Complex128Array, 'name', 'Complex128Array' );\n\n/**\n* Creates a new 128-bit complex number array from an array-like object or an iterable.\n*\n* @name from\n* @memberof Complex128Array\n* @type {Function}\n* @param {(Collection|Object)} src - array-like object or iterable\n* @param {Function} [clbk] - callback to invoke for each source element\n* @param {*} [thisArg] - context\n* @throws {TypeError} `this` context must be a constructor\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be an array-like object or an iterable\n* @throws {TypeError} second argument must be a function\n* @throws {RangeError} array-like objects must have a length which is a multiple of two\n* @throws {TypeError} an iterator must return either a two element array containing real and imaginary components or a complex number\n* @throws {TypeError} when provided an iterator, a callback must return either a two element array containing real and imaginary components or a complex number\n* @returns {Complex128Array} 128-bit complex number array\n*\n* @example\n* var arr = Complex128Array.from( [ 1.0, -1.0 ] );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n*\n* var arr = Complex128Array.from( [ new Complex128( 1.0, 1.0 ) ] );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* function clbk( v ) {\n* return new Complex128( real(v)*2.0, imag(v)*2.0 );\n* }\n*\n* var arr = Complex128Array.from( [ new Complex128( 1.0, 1.0 ) ], clbk );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*/\nsetReadOnly( Complex128Array, 'from', function from( src ) {\n\tvar thisArg;\n\tvar nargs;\n\tvar clbk;\n\tvar out;\n\tvar buf;\n\tvar tmp;\n\tvar get;\n\tvar len;\n\tvar flg;\n\tvar v;\n\tvar i;\n\tvar j;\n\tif ( !isFunction( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` context must be a constructor.' );\n\t}\n\tif ( !isComplexArrayConstructor( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tnargs = arguments.length;\n\tif ( nargs > 1 ) {\n\t\tclbk = arguments[ 1 ];\n\t\tif ( !isFunction( clbk ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be a function. Value: `%s`.', clbk ) );\n\t\t}\n\t\tif ( nargs > 2 ) {\n\t\t\tthisArg = arguments[ 2 ];\n\t\t}\n\t}\n\tif ( isComplexArray( src ) ) {\n\t\tlen = src.length;\n\t\tif ( clbk ) {\n\t\t\tout = new this( len );\n\t\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\t\tj = 0;\n\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\tv = clbk.call( thisArg, src.get( i ), i );\n\t\t\t\tif ( isComplexLike( v ) ) {\n\t\t\t\t\tbuf[ j ] = real( v );\n\t\t\t\t\tbuf[ j+1 ] = imag( v );\n\t\t\t\t} else if ( isArrayLikeObject( v ) && v.length >= 2 ) {\n\t\t\t\t\tbuf[ j ] = v[ 0 ];\n\t\t\t\t\tbuf[ j+1 ] = v[ 1 ];\n\t\t\t\t} else {\n\t\t\t\t\tthrow new TypeError( format( 'invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', v ) );\n\t\t\t\t}\n\t\t\t\tj += 2; // stride\n\t\t\t}\n\t\t\treturn out;\n\t\t}\n\t\treturn new this( src );\n\t}\n\tif ( isCollection( src ) ) {\n\t\tif ( clbk ) {\n\t\t\t// Note: array contents affect how we iterate over a provided data source. If only complex number objects, we can extract real and imaginary components. Otherwise, for non-complex number arrays (e.g., `Float64Array`, etc), we assume a strided array where real and imaginary components are interleaved. In the former case, we expect a callback to return real and imaginary components (possibly as a complex number). In the latter case, we expect a callback to return *either* a real or imaginary component.\n\n\t\t\tlen = src.length;\n\t\t\tif ( src.get && src.set ) {\n\t\t\t\tget = accessorGetter( 'default' );\n\t\t\t} else {\n\t\t\t\tget = getter( 'default' );\n\t\t\t}\n\t\t\t// Detect whether we've been provided an array which returns complex number objects...\n\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\tif ( !isComplexLike( get( src, i ) ) ) {\n\t\t\t\t\tflg = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// If an array does not contain only complex number objects, then we assume interleaved real and imaginary components...\n\t\t\tif ( flg ) {\n\t\t\t\tif ( !isEven( len ) ) {\n\t\t\t\t\tthrow new RangeError( format( 'invalid argument. First argument must have a length which is a multiple of two. Length: `%u`.', len ) );\n\t\t\t\t}\n\t\t\t\tout = new this( len/2 );\n\t\t\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\t\tbuf[ i ] = clbk.call( thisArg, get( src, i ), i );\n\t\t\t\t}\n\t\t\t\treturn out;\n\t\t\t}\n\t\t\t// If an array contains only complex number objects, then we need to extract real and imaginary components...\n\t\t\tout = new this( len );\n\t\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\t\tj = 0;\n\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\tv = clbk.call( thisArg, get( src, i ), i );\n\t\t\t\tif ( isComplexLike( v ) ) {\n\t\t\t\t\tbuf[ j ] = real( v );\n\t\t\t\t\tbuf[ j+1 ] = imag( v );\n\t\t\t\t} else if ( isArrayLikeObject( v ) && v.length >= 2 ) {\n\t\t\t\t\tbuf[ j ] = v[ 0 ];\n\t\t\t\t\tbuf[ j+1 ] = v[ 1 ];\n\t\t\t\t} else {\n\t\t\t\t\tthrow new TypeError( format( 'invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', v ) );\n\t\t\t\t}\n\t\t\t\tj += 2; // stride\n\t\t\t}\n\t\t\treturn out;\n\t\t}\n\t\treturn new this( src );\n\t}\n\tif ( isObject( src ) && HAS_ITERATOR_SYMBOL && isFunction( src[ ITERATOR_SYMBOL ] ) ) { // eslint-disable-line max-len\n\t\tbuf = src[ ITERATOR_SYMBOL ]();\n\t\tif ( !isFunction( buf.next ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.', src ) );\n\t\t}\n\t\tif ( clbk ) {\n\t\t\ttmp = fromIteratorMap( buf, clbk, thisArg );\n\t\t} else {\n\t\t\ttmp = fromIterator( buf );\n\t\t}\n\t\tif ( tmp instanceof Error ) {\n\t\t\tthrow tmp;\n\t\t}\n\t\tlen = tmp.length / 2;\n\t\tout = new this( len );\n\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\tbuf[ i ] = tmp[ i ];\n\t\t}\n\t\treturn out;\n\t}\n\tthrow new TypeError( format( 'invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.', src ) );\n});\n\n/**\n* Creates a new 128-bit complex number array from a variable number of arguments.\n*\n* @name of\n* @memberof Complex128Array\n* @type {Function}\n* @param {...*} element - array elements\n* @throws {TypeError} `this` context must be a constructor\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Complex128Array} 128-bit complex number array\n*\n* @example\n* var arr = Complex128Array.of( 1.0, 1.0, 1.0, 1.0 );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*/\nsetReadOnly( Complex128Array, 'of', function of() {\n\tvar args;\n\tvar i;\n\tif ( !isFunction( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` context must be a constructor.' );\n\t}\n\tif ( !isComplexArrayConstructor( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\targs = [];\n\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\targs.push( arguments[ i ] );\n\t}\n\treturn new this( args );\n});\n\n/**\n* Returns an array element with support for both nonnegative and negative integer indices.\n*\n* @name at\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {integer} idx - element index\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} must provide an integer\n* @returns {(Complex128|void)} array element\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* var arr = new Complex128Array( 10 );\n*\n* var z = arr.at( 0 );\n* // returns \n*\n* var re = real( z );\n* // returns 0.0\n*\n* var im = imag( z );\n* // returns 0.0\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 9.0, -9.0 ], 9 );\n*\n* z = arr.at( 0 );\n* // returns \n*\n* re = real( z );\n* // returns 1.0\n*\n* im = imag( z );\n* // returns -1.0\n*\n* z = arr.at( -1 );\n* // returns \n*\n* re = real( z );\n* // returns 9.0\n*\n* im = imag( z );\n* // returns -9.0\n*\n* z = arr.at( 100 );\n* // returns undefined\n*\n* z = arr.at( -100 );\n* // returns undefined\n*/\nsetReadOnly( Complex128Array.prototype, 'at', function at( idx ) {\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isInteger( idx ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Must provide an integer. Value: `%s`.', idx ) );\n\t}\n\tif ( idx < 0 ) {\n\t\tidx += this._length;\n\t}\n\tif ( idx < 0 || idx >= this._length ) {\n\t\treturn;\n\t}\n\treturn getComplex128( this._buffer, idx );\n});\n\n/**\n* Pointer to the underlying data buffer.\n*\n* @name buffer\n* @memberof Complex128Array.prototype\n* @readonly\n* @type {ArrayBuffer}\n*\n* @example\n* var arr = new Complex128Array( 10 );\n*\n* var buf = arr.buffer;\n* // returns \n*/\nsetReadOnlyAccessor( Complex128Array.prototype, 'buffer', function get() {\n\treturn this._buffer.buffer;\n});\n\n/**\n* Size (in bytes) of the array.\n*\n* @name byteLength\n* @memberof Complex128Array.prototype\n* @readonly\n* @type {NonNegativeInteger}\n*\n* @example\n* var arr = new Complex128Array( 10 );\n*\n* var byteLength = arr.byteLength;\n* // returns 160\n*/\nsetReadOnlyAccessor( Complex128Array.prototype, 'byteLength', function get() {\n\treturn this._buffer.byteLength;\n});\n\n/**\n* Offset (in bytes) of the array from the start of its underlying `ArrayBuffer`.\n*\n* @name byteOffset\n* @memberof Complex128Array.prototype\n* @readonly\n* @type {NonNegativeInteger}\n*\n* @example\n* var arr = new Complex128Array( 10 );\n*\n* var byteOffset = arr.byteOffset;\n* // returns 0\n*/\nsetReadOnlyAccessor( Complex128Array.prototype, 'byteOffset', function get() {\n\treturn this._buffer.byteOffset;\n});\n\n/**\n* Size (in bytes) of each array element.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex128Array.prototype\n* @readonly\n* @type {PositiveInteger}\n* @default 16\n*\n* @example\n* var arr = new Complex128Array( 10 );\n*\n* var nbytes = arr.BYTES_PER_ELEMENT;\n* // returns 16\n*/\nsetReadOnly( Complex128Array.prototype, 'BYTES_PER_ELEMENT', Complex128Array.BYTES_PER_ELEMENT );\n\n/**\n* Copies a sequence of elements within the array to the position starting at `target`.\n*\n* @name copyWithin\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {integer} target - index at which to start copying elements\n* @param {integer} start - source index at which to copy elements from\n* @param {integer} [end] - source index at which to stop copying elements from\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Complex128Array} modified array\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* var arr = new Complex128Array( 4 );\n*\n* // Set the array elements:\n* arr.set( new Complex128( 1.0, 1.0 ), 0 );\n* arr.set( new Complex128( 2.0, 2.0 ), 1 );\n* arr.set( new Complex128( 3.0, 3.0 ), 2 );\n* arr.set( new Complex128( 4.0, 4.0 ), 3 );\n*\n* // Copy the first two elements to the last two elements:\n* arr.copyWithin( 2, 0, 2 );\n*\n* // Get the last array element:\n* var z = arr.get( 3 );\n*\n* var re = real( z );\n* // returns 2.0\n*\n* var im = imag( z );\n* // returns 2.0\n*/\nsetReadOnly( Complex128Array.prototype, 'copyWithin', function copyWithin( target, start ) {\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\t// FIXME: prefer a functional `copyWithin` implementation which addresses lack of universal browser support (e.g., IE11 and Safari) or ensure that typed arrays are polyfilled\n\tif ( arguments.length === 2 ) {\n\t\tthis._buffer.copyWithin( target*2, start*2 );\n\t} else {\n\t\tthis._buffer.copyWithin( target*2, start*2, arguments[2]*2 );\n\t}\n\treturn this;\n});\n\n/**\n* Returns an iterator for iterating over array key-value pairs.\n*\n* @name entries\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Iterator} iterator\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n*\n* var arr = [\n* new Complex128( 1.0, 1.0 ),\n* new Complex128( 2.0, 2.0 ),\n* new Complex128( 3.0, 3.0 )\n* ];\n* arr = new Complex128Array( arr );\n*\n* // Create an iterator:\n* var it = arr.entries();\n*\n* // Iterate over the key-value pairs...\n* var v = it.next().value;\n* // returns [ 0, ]\n*\n* v = it.next().value;\n* // returns [ 1, ]\n*\n* v = it.next().value;\n* // returns [ 2, ]\n*\n* var bool = it.next().done;\n* // returns true\n*/\nsetReadOnly( Complex128Array.prototype, 'entries', function entries() {\n\tvar buffer;\n\tvar self;\n\tvar iter;\n\tvar len;\n\tvar FLG;\n\tvar i;\n\tvar j;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tself = this;\n\tbuffer = this._buffer;\n\tlen = this._length;\n\n\t// Initialize the iteration indices:\n\ti = -1;\n\tj = -2;\n\n\t// Create an iterator protocol-compliant object:\n\titer = {};\n\tsetReadOnly( iter, 'next', next );\n\tsetReadOnly( iter, 'return', end );\n\n\tif ( ITERATOR_SYMBOL ) {\n\t\tsetReadOnly( iter, ITERATOR_SYMBOL, factory );\n\t}\n\treturn iter;\n\n\t/**\n\t* Returns an iterator protocol-compliant object containing the next iterated value.\n\t*\n\t* @private\n\t* @returns {Object} iterator protocol-compliant object\n\t*/\n\tfunction next() {\n\t\tvar z;\n\t\ti += 1;\n\t\tif ( FLG || i >= len ) {\n\t\t\treturn {\n\t\t\t\t'done': true\n\t\t\t};\n\t\t}\n\t\tj += 2;\n\t\tz = new Complex128( buffer[ j ], buffer[ j+1 ] );\n\t\treturn {\n\t\t\t'value': [ i, z ],\n\t\t\t'done': false\n\t\t};\n\t}\n\n\t/**\n\t* Finishes an iterator.\n\t*\n\t* @private\n\t* @param {*} [value] - value to return\n\t* @returns {Object} iterator protocol-compliant object\n\t*/\n\tfunction end( value ) {\n\t\tFLG = true;\n\t\tif ( arguments.length ) {\n\t\t\treturn {\n\t\t\t\t'value': value,\n\t\t\t\t'done': true\n\t\t\t};\n\t\t}\n\t\treturn {\n\t\t\t'done': true\n\t\t};\n\t}\n\n\t/**\n\t* Returns a new iterator.\n\t*\n\t* @private\n\t* @returns {Iterator} iterator\n\t*/\n\tfunction factory() {\n\t\treturn self.entries();\n\t}\n});\n\n/**\n* Tests whether all elements in an array pass a test implemented by a predicate function.\n*\n* @name every\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {boolean} boolean indicating whether all elements pass a test\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* function predicate( v ) {\n* return ( real( v ) === imag( v ) );\n* }\n*\n* var arr = new Complex128Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var bool = arr.every( predicate );\n* // returns true\n*/\nsetReadOnly( Complex128Array.prototype, 'every', function every( predicate, thisArg ) {\n\tvar buf;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tif ( !predicate.call( thisArg, getComplex128( buf, i ), i, this ) ) {\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn true;\n});\n\n/**\n* Returns a modified typed array filled with a fill value.\n*\n* @name fill\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {ComplexLike} value - fill value\n* @param {integer} [start=0] - starting index (inclusive)\n* @param {integer} [end] - ending index (exclusive)\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a complex number\n* @throws {TypeError} second argument must be an integer\n* @throws {TypeError} third argument must be an integer\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* var arr = new Complex128Array( 3 );\n*\n* arr.fill( new Complex128( 1.0, 1.0 ), 1 );\n*\n* var z = arr.get( 1 );\n* // returns \n*\n* var re = real( z );\n* // returns 1.0\n*\n* var im = imag( z );\n* // returns 1.0\n*\n* z = arr.get( 1 );\n* // returns \n*\n* re = real( z );\n* // returns 1.0\n*\n* im = imag( z );\n* // returns 1.0\n*/\nsetReadOnly( Complex128Array.prototype, 'fill', function fill( value, start, end ) {\n\tvar buf;\n\tvar len;\n\tvar idx;\n\tvar re;\n\tvar im;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isComplexLike( value ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a complex number. Value: `%s`.', value ) );\n\t}\n\tbuf = this._buffer;\n\tlen = this._length;\n\tif ( arguments.length > 1 ) {\n\t\tif ( !isInteger( start ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be an integer. Value: `%s`.', start ) );\n\t\t}\n\t\tif ( start < 0 ) {\n\t\t\tstart += len;\n\t\t\tif ( start < 0 ) {\n\t\t\t\tstart = 0;\n\t\t\t}\n\t\t}\n\t\tif ( arguments.length > 2 ) {\n\t\t\tif ( !isInteger( end ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Third argument must be an integer. Value: `%s`.', end ) );\n\t\t\t}\n\t\t\tif ( end < 0 ) {\n\t\t\t\tend += len;\n\t\t\t\tif ( end < 0 ) {\n\t\t\t\t\tend = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( end > len ) {\n\t\t\t\tend = len;\n\t\t\t}\n\t\t} else {\n\t\t\tend = len;\n\t\t}\n\t} else {\n\t\tstart = 0;\n\t\tend = len;\n\t}\n\tre = real( value );\n\tim = imag( value );\n\tfor ( i = start; i < end; i++ ) {\n\t\tidx = 2*i;\n\t\tbuf[ idx ] = re;\n\t\tbuf[ idx+1 ] = im;\n\t}\n\treturn this;\n});\n\n/**\n* Returns a new array containing the elements of an array which pass a test implemented by a predicate function.\n*\n* @name filter\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {Complex128Array} complex number array\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* function predicate( v ) {\n* return ( real( v ) === imag( v ) );\n* }\n*\n* var arr = new Complex128Array( 3 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n*\n* var out = arr.filter( predicate );\n* // returns \n*\n* var len = out.length;\n* // returns 1\n*\n* var z = out.get( 0 );\n* // returns \n*\n* var re = real( z );\n* // returns 2.0\n*\n* var im = imag( z );\n* // returns 2.0\n*/\nsetReadOnly( Complex128Array.prototype, 'filter', function filter( predicate, thisArg ) {\n\tvar buf;\n\tvar out;\n\tvar i;\n\tvar z;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tout = [];\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tz = getComplex128( buf, i );\n\t\tif ( predicate.call( thisArg, z, i, this ) ) {\n\t\t\tout.push( z );\n\t\t}\n\t}\n\treturn new this.constructor( out );\n});\n\n/**\n* Returns the first element in an array for which a predicate function returns a truthy value.\n*\n* @name find\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {(Complex128|void)} array element or undefined\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* function predicate( v ) {\n* return ( real( v ) === imag( v ) );\n* }\n*\n* var arr = new Complex128Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var z = arr.find( predicate );\n* // returns \n*\n* var re = real( z );\n* // returns 1.0\n*\n* var im = imag( z );\n* // returns 1.0\n*/\nsetReadOnly( Complex128Array.prototype, 'find', function find( predicate, thisArg ) {\n\tvar buf;\n\tvar i;\n\tvar z;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tz = getComplex128( buf, i );\n\t\tif ( predicate.call( thisArg, z, i, this ) ) {\n\t\t\treturn z;\n\t\t}\n\t}\n});\n\n/**\n* Returns the index of the first element in an array for which a predicate function returns a truthy value.\n*\n* @name findIndex\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {integer} index or -1\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* function predicate( v ) {\n* return ( real( v ) === imag( v ) );\n* }\n*\n* var arr = new Complex128Array( 3 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var idx = arr.findIndex( predicate );\n* // returns 2\n*/\nsetReadOnly( Complex128Array.prototype, 'findIndex', function findIndex( predicate, thisArg ) {\n\tvar buf;\n\tvar i;\n\tvar z;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tz = getComplex128( buf, i );\n\t\tif ( predicate.call( thisArg, z, i, this ) ) {\n\t\t\treturn i;\n\t\t}\n\t}\n\treturn -1;\n});\n\n/**\n* Returns the last element in an array for which a predicate function returns a truthy value.\n*\n* @name findLast\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {(Complex128|void)} array element or undefined\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* function predicate( v ) {\n* return ( real( v ) === imag( v ) );\n* }\n*\n* var arr = new Complex128Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var z = arr.findLast( predicate );\n* // returns \n*\n* var re = real( z );\n* // returns 3.0\n*\n* var im = imag( z );\n* // returns 3.0\n*/\nsetReadOnly( Complex128Array.prototype, 'findLast', function findLast( predicate, thisArg ) {\n\tvar buf;\n\tvar i;\n\tvar z;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = this._length-1; i >= 0; i-- ) {\n\t\tz = getComplex128( buf, i );\n\t\tif ( predicate.call( thisArg, z, i, this ) ) {\n\t\t\treturn z;\n\t\t}\n\t}\n});\n\n/**\n* Returns the index of the last element in an array for which a predicate function returns a truthy value.\n*\n* @name findLastIndex\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {integer} index or -1\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* function predicate( v ) {\n* return ( real( v ) === imag( v ) );\n* }\n*\n* var arr = new Complex128Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n*\n* var idx = arr.findLastIndex( predicate );\n* // returns 1\n*/\nsetReadOnly( Complex128Array.prototype, 'findLastIndex', function findLastIndex( predicate, thisArg ) {\n\tvar buf;\n\tvar i;\n\tvar z;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = this._length-1; i >= 0; i-- ) {\n\t\tz = getComplex128( buf, i );\n\t\tif ( predicate.call( thisArg, z, i, this ) ) {\n\t\t\treturn i;\n\t\t}\n\t}\n\treturn -1;\n});\n\n/**\n* Invokes a function once for each array element.\n*\n* @name forEach\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {Function} fcn - function to invoke\n* @param {*} [thisArg] - function invocation context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n*\n* function log( v, i ) {\n* console.log( '%s: %s', i, v.toString() );\n* }\n*\n* var arr = new Complex128Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* arr.forEach( log );\n*/\nsetReadOnly( Complex128Array.prototype, 'forEach', function forEach( fcn, thisArg ) {\n\tvar buf;\n\tvar i;\n\tvar z;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( fcn ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', fcn ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tz = getComplex128( buf, i );\n\t\tfcn.call( thisArg, z, i, this );\n\t}\n});\n\n/**\n* Returns an array element.\n*\n* @name get\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {NonNegativeInteger} idx - element index\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} must provide a nonnegative integer\n* @returns {(Complex128|void)} array element\n*\n* @example\n* var arr = new Complex128Array( 10 );\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* var z = arr.get( 0 );\n* // returns \n*\n* var re = real( z );\n* // returns 0.0\n*\n* var im = imag( z );\n* // returns 0.0\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n*\n* z = arr.get( 0 );\n* // returns \n*\n* re = real( z );\n* // returns 1.0\n*\n* im = imag( z );\n* // returns -1.0\n*\n* z = arr.get( 100 );\n* // returns undefined\n*/\nsetReadOnly( Complex128Array.prototype, 'get', function get( idx ) {\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isNonNegativeInteger( idx ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Must provide a nonnegative integer. Value: `%s`.', idx ) );\n\t}\n\tif ( idx >= this._length ) {\n\t\treturn;\n\t}\n\treturn getComplex128( this._buffer, idx );\n});\n\n/**\n* Number of array elements.\n*\n* @name length\n* @memberof Complex128Array.prototype\n* @readonly\n* @type {NonNegativeInteger}\n*\n* @example\n* var arr = new Complex128Array( 10 );\n*\n* var len = arr.length;\n* // returns 10\n*/\nsetReadOnlyAccessor( Complex128Array.prototype, 'length', function get() {\n\treturn this._length;\n});\n\n/**\n* Returns a boolean indicating whether an array includes a provided value.\n*\n* @name includes\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {ComplexLike} searchElement - search element\n* @param {integer} [fromIndex=0] - starting index (inclusive)\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a complex number\n* @throws {TypeError} second argument must be an integer\n* @returns {boolean} boolean indicating whether an array includes a provided value\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n*\n* var arr = new Complex128Array( 5 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n* arr.set( [ 4.0, -4.0 ], 3 );\n* arr.set( [ 5.0, -5.0 ], 4 );\n*\n* var bool = arr.includes( new Complex128( 3.0, -3.0 ) );\n* // returns true\n*\n* bool = arr.includes( new Complex128( 3.0, -3.0 ), 3 );\n* // returns false\n*\n* bool = arr.includes( new Complex128( 4.0, -4.0 ), -3 );\n* // returns true\n*/\nsetReadOnly( Complex128Array.prototype, 'includes', function includes( searchElement, fromIndex ) {\n\tvar buf;\n\tvar idx;\n\tvar re;\n\tvar im;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isComplexLike( searchElement ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a complex number. Value: `%s`.', searchElement ) );\n\t}\n\tif ( arguments.length > 1 ) {\n\t\tif ( !isInteger( fromIndex ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be an integer. Value: `%s`.', fromIndex ) );\n\t\t}\n\t\tif ( fromIndex < 0 ) {\n\t\t\tfromIndex += this._length;\n\t\t\tif ( fromIndex < 0 ) {\n\t\t\t\tfromIndex = 0;\n\t\t\t}\n\t\t}\n\t} else {\n\t\tfromIndex = 0;\n\t}\n\tre = real( searchElement );\n\tim = imag( searchElement );\n\tbuf = this._buffer;\n\tfor ( i = fromIndex; i < this._length; i++ ) {\n\t\tidx = 2 * i;\n\t\tif ( re === buf[ idx ] && im === buf[ idx+1 ] ) {\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n});\n\n/**\n* Returns the first index at which a given element can be found.\n*\n* @name indexOf\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {ComplexLike} searchElement - element to find\n* @param {integer} [fromIndex=0] - starting index (inclusive)\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a complex number\n* @throws {TypeError} second argument must be an integer\n* @returns {integer} index or -1\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n*\n* var arr = new Complex128Array( 5 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n* arr.set( [ 4.0, -4.0 ], 3 );\n* arr.set( [ 5.0, -5.0 ], 4 );\n*\n* var idx = arr.indexOf( new Complex128( 3.0, -3.0 ) );\n* // returns 2\n*\n* idx = arr.indexOf( new Complex128( 3.0, -3.0 ), 3 );\n* // returns -1\n*\n* idx = arr.indexOf( new Complex128( 4.0, -4.0 ), -3 );\n* // returns 3\n*/\nsetReadOnly( Complex128Array.prototype, 'indexOf', function indexOf( searchElement, fromIndex ) {\n\tvar buf;\n\tvar idx;\n\tvar re;\n\tvar im;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isComplexLike( searchElement ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a complex number. Value: `%s`.', searchElement ) );\n\t}\n\tif ( arguments.length > 1 ) {\n\t\tif ( !isInteger( fromIndex ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be an integer. Value: `%s`.', fromIndex ) );\n\t\t}\n\t\tif ( fromIndex < 0 ) {\n\t\t\tfromIndex += this._length;\n\t\t\tif ( fromIndex < 0 ) {\n\t\t\t\tfromIndex = 0;\n\t\t\t}\n\t\t}\n\t} else {\n\t\tfromIndex = 0;\n\t}\n\tre = real( searchElement );\n\tim = imag( searchElement );\n\tbuf = this._buffer;\n\tfor ( i = fromIndex; i < this._length; i++ ) {\n\t\tidx = 2 * i;\n\t\tif ( re === buf[ idx ] && im === buf[ idx+1 ] ) {\n\t\t\treturn i;\n\t\t}\n\t}\n\treturn -1;\n});\n\n/**\n* Returns a new string by concatenating all array elements.\n*\n* @name join\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {string} [separator=','] - element separator\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a string\n* @returns {string} string representation\n*\n* @example\n* var arr = new Complex128Array( 2 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n*\n* var str = arr.join();\n* // returns '1 + 1i,2 + 2i'\n*\n* str = arr.join( '/' );\n* // returns '1 + 1i/2 + 2i'\n*/\nsetReadOnly( Complex128Array.prototype, 'join', function join( separator ) {\n\tvar out;\n\tvar buf;\n\tvar sep;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( arguments.length === 0 ) {\n\t\tsep = ',';\n\t} else if ( isString( separator ) ) {\n\t\tsep = separator;\n\t} else {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a string. Value: `%s`.', separator ) );\n\t}\n\tout = [];\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tout.push( getComplex128( buf, i ).toString() );\n\t}\n\treturn out.join( sep );\n});\n\n/**\n* Returns the last index at which a given element can be found.\n*\n* @name lastIndexOf\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {ComplexLike} searchElement - element to find\n* @param {integer} [fromIndex] - index at which to start searching backward (inclusive)\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a complex number\n* @throws {TypeError} second argument must be an integer\n* @returns {integer} index or -1\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n*\n* var arr = new Complex128Array( 5 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n* arr.set( [ 4.0, -4.0 ], 3 );\n* arr.set( [ 3.0, -3.0 ], 4 );\n*\n* var idx = arr.lastIndexOf( new Complex128( 3.0, -3.0 ) );\n* // returns 4\n*\n* idx = arr.lastIndexOf( new Complex128( 3.0, -3.0 ), 3 );\n* // returns 2\n*\n* idx = arr.lastIndexOf( new Complex128( 5.0, -5.0 ), 3 );\n* // returns -1\n*\n* idx = arr.lastIndexOf( new Complex128( 2.0, -2.0 ), -3 );\n* // returns 1\n*/\nsetReadOnly( Complex128Array.prototype, 'lastIndexOf', function lastIndexOf( searchElement, fromIndex ) {\n\tvar buf;\n\tvar idx;\n\tvar re;\n\tvar im;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isComplexLike( searchElement ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a complex number. Value: `%s`.', searchElement ) );\n\t}\n\tif ( arguments.length > 1 ) {\n\t\tif ( !isInteger( fromIndex ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be an integer. Value: `%s`.', fromIndex ) );\n\t\t}\n\t\tif ( fromIndex >= this._length ) {\n\t\t\tfromIndex = this._length - 1;\n\t\t} else if ( fromIndex < 0 ) {\n\t\t\tfromIndex += this._length;\n\t\t}\n\t} else {\n\t\tfromIndex = this._length - 1;\n\t}\n\tre = real( searchElement );\n\tim = imag( searchElement );\n\tbuf = this._buffer;\n\tfor ( i = fromIndex; i >= 0; i-- ) {\n\t\tidx = 2 * i;\n\t\tif ( re === buf[ idx ] && im === buf[ idx+1 ] ) {\n\t\t\treturn i;\n\t\t}\n\t}\n\treturn -1;\n});\n\n/**\n* Returns a new array with each element being the result of a provided callback function.\n*\n* @name map\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {Function} fcn - callback function\n* @param {*} [thisArg] - callback function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {Complex128Array} complex number array\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* function scale( v, i ) {\n* return new Complex128( 2.0*real( v ), 2.0*imag( v ) );\n* }\n*\n* var arr = new Complex128Array( 3 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n*\n* var out = arr.map( scale );\n* // returns \n*\n* var z = out.get( 0 );\n* // returns \n*\n* var re = real( z );\n* // returns 2.0\n*\n* var im = imag( z );\n* // returns -2.0\n*/\nsetReadOnly( Complex128Array.prototype, 'map', function map( fcn, thisArg ) {\n\tvar outbuf;\n\tvar buf;\n\tvar out;\n\tvar i;\n\tvar v;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( fcn ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', fcn ) );\n\t}\n\tbuf = this._buffer;\n\tout = new this.constructor( this._length );\n\toutbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tv = fcn.call( thisArg, getComplex128( buf, i ), i, this );\n\t\tif ( isComplexLike( v ) ) {\n\t\t\toutbuf[ 2*i ] = real( v );\n\t\t\toutbuf[ (2*i)+1 ] = imag( v );\n\t\t} else if ( isArrayLikeObject( v ) && v.length === 2 ) {\n\t\t\toutbuf[ 2*i ] = v[ 0 ];\n\t\t\toutbuf[ (2*i)+1 ] = v[ 1 ];\n\t\t} else {\n\t\t\tthrow new TypeError( format( 'invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', v ) );\n\t\t}\n\t}\n\treturn out;\n});\n\n/**\n* Applies a provided callback function to each element of the array, in order, passing in the return value from the calculation on the preceding element and returning the accumulated result upon completion.\n*\n* @name reduce\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {Function} reducer - callback function\n* @param {*} [initialValue] - initial value\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @throws {Error} if not provided an initial value, the array must have at least one element\n* @returns {*} accumulated result\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n* import cadd from '@stdlib/math-base-ops-cadd';\n*\n* var arr = new Complex128Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var z = arr.reduce( cadd );\n* // returns \n*\n* var re = real( z );\n* // returns 6.0\n*\n* var im = imag( z );\n* // returns 6.0\n*/\nsetReadOnly( Complex128Array.prototype, 'reduce', function reduce( reducer, initialValue ) {\n\tvar buf;\n\tvar acc;\n\tvar len;\n\tvar v;\n\tvar i;\n\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( reducer ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', reducer ) );\n\t}\n\tbuf = this._buffer;\n\tlen = this._length;\n\tif ( arguments.length > 1 ) {\n\t\tacc = initialValue;\n\t\ti = 0;\n\t} else {\n\t\tif ( len === 0 ) {\n\t\t\tthrow new Error( 'invalid operation. If not provided an initial value, an array must contain at least one element.' );\n\t\t}\n\t\tacc = getComplex128( buf, 0 );\n\t\ti = 1;\n\t}\n\tfor ( ; i < len; i++ ) {\n\t\tv = getComplex128( buf, i );\n\t\tacc = reducer( acc, v, i, this );\n\t}\n\treturn acc;\n});\n\n/**\n* Reverses an array in-place.\n*\n* @name reverse\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Complex128Array} reversed array\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* var arr = new Complex128Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var out = arr.reverse();\n* // returns \n*\n* var z = out.get( 0 );\n* // returns \n*\n* var re = real( z );\n* // returns 3.0\n*\n* var im = imag( z );\n* // returns 3.0\n*\n* z = out.get( 1 );\n* // returns \n*\n* re = real( z );\n* // returns 2.0\n*\n* im = imag( z );\n* // returns 2.0\n*\n* z = out.get( 2 );\n* // returns \n*\n* re = real( z );\n* // returns 1.0\n*\n* im = imag( z );\n* // returns 1.0\n*/\nsetReadOnly( Complex128Array.prototype, 'reverse', function reverse() {\n\tvar buf;\n\tvar tmp;\n\tvar len;\n\tvar N;\n\tvar i;\n\tvar j;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tlen = this._length;\n\tbuf = this._buffer;\n\tN = floor( len / 2 );\n\tfor ( i = 0; i < N; i++ ) {\n\t\tj = len - i - 1;\n\t\ttmp = buf[ (2*i) ];\n\t\tbuf[ (2*i) ] = buf[ (2*j) ];\n\t\tbuf[ (2*j) ] = tmp;\n\t\ttmp = buf[ (2*i)+1 ];\n\t\tbuf[ (2*i)+1 ] = buf[ (2*j)+1 ];\n\t\tbuf[ (2*j)+1 ] = tmp;\n\t}\n\treturn this;\n});\n\n/**\n* Sets an array element.\n*\n* ## Notes\n*\n* - When provided a typed array, real or complex, we must check whether the source array shares the same buffer as the target array and whether the underlying memory overlaps. In particular, we are concerned with the following scenario:\n*\n* ```text\n* buf: ---------------------\n* src: ---------------------\n* ```\n*\n* In the above, as we copy values from `src`, we will overwrite values in the `src` view, resulting in duplicated values copied into the end of `buf`, which is not intended. Hence, to avoid overwriting source values, we must **copy** source values to a temporary array.\n*\n* In the other overlapping scenario,\n*\n* ```text\n* buf: ---------------------\n* src: ---------------------\n* ```\n*\n* by the time we begin copying into the overlapping region, we are copying from the end of `src`, a non-overlapping region, which means we don't run the risk of copying copied values, rather than the original `src` values as intended.\n*\n* @name set\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {(Collection|Complex|ComplexArray)} value - value(s)\n* @param {NonNegativeInteger} [i=0] - element index at which to start writing values\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be either a complex number, an array-like object, or a complex number array\n* @throws {TypeError} index argument must be a nonnegative integer\n* @throws {RangeError} array-like objects must have a length which is a multiple of two\n* @throws {RangeError} index argument is out-of-bounds\n* @throws {RangeError} target array lacks sufficient storage to accommodate source values\n* @returns {void}\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* var arr = new Complex128Array( 10 );\n*\n* var z = arr.get( 0 );\n* // returns \n*\n* var re = real( z );\n* // returns 0.0\n*\n* var im = imag( z );\n* // returns 0.0\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n*\n* z = arr.get( 0 );\n* // returns \n*\n* re = real( z );\n* // returns 1.0\n*\n* im = imag( z );\n* // returns -1.0\n*/\nsetReadOnly( Complex128Array.prototype, 'set', function set( value ) {\n\t/* eslint-disable no-underscore-dangle */\n\tvar sbuf;\n\tvar idx;\n\tvar buf;\n\tvar tmp;\n\tvar flg;\n\tvar N;\n\tvar v;\n\tvar i;\n\tvar j;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tbuf = this._buffer;\n\tif ( arguments.length > 1 ) {\n\t\tidx = arguments[ 1 ];\n\t\tif ( !isNonNegativeInteger( idx ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Index argument must be a nonnegative integer. Value: `%s`.', idx ) );\n\t\t}\n\t} else {\n\t\tidx = 0;\n\t}\n\tif ( isComplexLike( value ) ) {\n\t\tif ( idx >= this._length ) {\n\t\t\tthrow new RangeError( format( 'invalid argument. Index argument is out-of-bounds. Value: `%u`.', idx ) );\n\t\t}\n\t\tidx *= 2;\n\t\tbuf[ idx ] = real( value );\n\t\tbuf[ idx+1 ] = imag( value );\n\t\treturn;\n\t}\n\tif ( isComplexArray( value ) ) {\n\t\tN = value._length;\n\t\tif ( idx+N > this._length ) {\n\t\t\tthrow new RangeError( 'invalid arguments. Target array lacks sufficient storage to accommodate source values.' );\n\t\t}\n\t\tsbuf = value._buffer;\n\n\t\t// Check for overlapping memory...\n\t\tj = buf.byteOffset + (idx*BYTES_PER_ELEMENT);\n\t\tif (\n\t\t\tsbuf.buffer === buf.buffer &&\n\t\t\t(\n\t\t\t\tsbuf.byteOffset < j &&\n\t\t\t\tsbuf.byteOffset+sbuf.byteLength > j\n\t\t\t)\n\t\t) {\n\t\t\t// We need to copy source values...\n\t\t\ttmp = new Float64Array( sbuf.length );\n\t\t\tfor ( i = 0; i < sbuf.length; i++ ) {\n\t\t\t\ttmp[ i ] = sbuf[ i ];\n\t\t\t}\n\t\t\tsbuf = tmp;\n\t\t}\n\t\tidx *= 2;\n\t\tj = 0;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\tbuf[ idx ] = sbuf[ j ];\n\t\t\tbuf[ idx+1 ] = sbuf[ j+1 ];\n\t\t\tidx += 2; // stride\n\t\t\tj += 2; // stride\n\t\t}\n\t\treturn;\n\t}\n\tif ( isCollection( value ) ) {\n\t\t// Detect whether we've been provided an array of complex numbers...\n\t\tN = value.length;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\tif ( !isComplexLike( value[ i ] ) ) {\n\t\t\t\tflg = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t// If an array does not contain only complex numbers, then we assume interleaved real and imaginary components...\n\t\tif ( flg ) {\n\t\t\tif ( !isEven( N ) ) {\n\t\t\t\tthrow new RangeError( format( 'invalid argument. Array-like object arguments must have a length which is a multiple of two. Length: `%u`.', N ) );\n\t\t\t}\n\t\t\tif ( idx+(N/2) > this._length ) {\n\t\t\t\tthrow new RangeError( 'invalid arguments. Target array lacks sufficient storage to accommodate source values.' );\n\t\t\t}\n\t\t\tsbuf = value;\n\n\t\t\t// Check for overlapping memory...\n\t\t\tj = buf.byteOffset + (idx*BYTES_PER_ELEMENT);\n\t\t\tif (\n\t\t\t\tsbuf.buffer === buf.buffer &&\n\t\t\t\t(\n\t\t\t\t\tsbuf.byteOffset < j &&\n\t\t\t\t\tsbuf.byteOffset+sbuf.byteLength > j\n\t\t\t\t)\n\t\t\t) {\n\t\t\t\t// We need to copy source values...\n\t\t\t\ttmp = new Float64Array( N );\n\t\t\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\t\t\ttmp[ i ] = sbuf[ i ];\n\t\t\t\t}\n\t\t\t\tsbuf = tmp;\n\t\t\t}\n\t\t\tidx *= 2;\n\t\t\tN /= 2;\n\t\t\tj = 0;\n\t\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\t\tbuf[ idx ] = sbuf[ j ];\n\t\t\t\tbuf[ idx+1 ] = sbuf[ j+1 ];\n\t\t\t\tidx += 2; // stride\n\t\t\t\tj += 2; // stride\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\t// If an array contains only complex numbers, then we need to extract real and imaginary components...\n\t\tif ( idx+N > this._length ) {\n\t\t\tthrow new RangeError( 'invalid arguments. Target array lacks sufficient storage to accommodate source values.' );\n\t\t}\n\t\tidx *= 2;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\tv = value[ i ];\n\t\t\tbuf[ idx ] = real( v );\n\t\t\tbuf[ idx+1 ] = imag( v );\n\t\t\tidx += 2; // stride\n\t\t}\n\t\treturn;\n\t}\n\tthrow new TypeError( format( 'invalid argument. First argument must be either a complex number, an array-like object, or a complex number array. Value: `%s`.', value ) );\n\n\t/* eslint-enable no-underscore-dangle */\n});\n\n/**\n* Copies a portion of a typed array to a new typed array.\n*\n* @name slice\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {integer} [start=0] - starting index (inclusive)\n* @param {integer} [end] - ending index (exclusive)\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be an integer\n* @throws {TypeError} second argument must be an integer\n* @returns {Complex128Array} complex number array\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* var arr = new Complex128Array( 5 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n* arr.set( [ 4.0, -4.0 ], 3 );\n* arr.set( [ 5.0, -5.0 ], 4 );\n*\n* var out = arr.slice();\n* // returns \n*\n* var len = out.length;\n* // returns 5\n*\n* var z = out.get( 0 );\n* // returns \n*\n* var re = real( z );\n* // returns 1.0\n*\n* var im = imag( z );\n* // returns -1.0\n*\n* z = out.get( len-1 );\n* // returns \n*\n* re = real( z );\n* // returns 5.0\n*\n* im = imag( z );\n* // returns -5.0\n*\n* out = arr.slice( 1, -2 );\n* // returns \n*\n* len = out.length;\n* // returns 2\n*\n* z = out.get( 0 );\n* // returns \n*\n* re = real( z );\n* // returns 2.0\n*\n* im = imag( z );\n* // returns -2.0\n*\n* z = out.get( len-1 );\n* // returns \n*\n* re = real( z );\n* // returns 3.0\n*\n* im = imag( z );\n* // returns -3.0\n*/\nsetReadOnly( Complex128Array.prototype, 'slice', function slice( start, end ) {\n\tvar outlen;\n\tvar outbuf;\n\tvar out;\n\tvar idx;\n\tvar buf;\n\tvar len;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tbuf = this._buffer;\n\tlen = this._length;\n\tif ( arguments.length === 0 ) {\n\t\tstart = 0;\n\t\tend = len;\n\t} else {\n\t\tif ( !isInteger( start ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. First argument must be an integer. Value: `%s`.', start ) );\n\t\t}\n\t\tif ( start < 0 ) {\n\t\t\tstart += len;\n\t\t\tif ( start < 0 ) {\n\t\t\t\tstart = 0;\n\t\t\t}\n\t\t}\n\t\tif ( arguments.length === 1 ) {\n\t\t\tend = len;\n\t\t} else {\n\t\t\tif ( !isInteger( end ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be an integer. Value: `%s`.', end ) );\n\t\t\t}\n\t\t\tif ( end < 0 ) {\n\t\t\t\tend += len;\n\t\t\t\tif ( end < 0 ) {\n\t\t\t\t\tend = 0;\n\t\t\t\t}\n\t\t\t} else if ( end > len ) {\n\t\t\t\tend = len;\n\t\t\t}\n\t\t}\n\t}\n\tif ( start < end ) {\n\t\toutlen = end - start;\n\t} else {\n\t\toutlen = 0;\n\t}\n\tout = new this.constructor( outlen );\n\toutbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\tfor ( i = 0; i < outlen; i++ ) {\n\t\tidx = 2*(i+start);\n\t\toutbuf[ 2*i ] = buf[ idx ];\n\t\toutbuf[ (2*i)+1 ] = buf[ idx+1 ];\n\t}\n\treturn out;\n});\n\n/**\n* Tests whether at least one element in an array passes a test implemented by a predicate function.\n*\n* @name some\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {boolean} boolean indicating whether at least one element passes a test\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* function predicate( v ) {\n* return ( real( v ) === imag( v ) );\n* }\n*\n* var arr = new Complex128Array( 3 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n*\n* var bool = arr.some( predicate );\n* // returns true\n*/\nsetReadOnly( Complex128Array.prototype, 'some', function some( predicate, thisArg ) {\n\tvar buf;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tif ( predicate.call( thisArg, getComplex128( buf, i ), i, this ) ) {\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n});\n\n/**\n* Creates a new typed array view over the same underlying `ArrayBuffer` and with the same underlying data type as the host array.\n*\n* @name subarray\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {integer} [begin=0] - starting index (inclusive)\n* @param {integer} [end] - ending index (exclusive)\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be an integer\n* @throws {TypeError} second argument must be an integer\n* @returns {Complex64Array} subarray\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* var arr = new Complex128Array( 5 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n* arr.set( [ 4.0, -4.0 ], 3 );\n* arr.set( [ 5.0, -5.0 ], 4 );\n*\n* var subarr = arr.subarray();\n* // returns \n*\n* var len = subarr.length;\n* // returns 5\n*\n* var z = subarr.get( 0 );\n* // returns \n*\n* var re = real( z );\n* // returns 1.0\n*\n* var im = imag( z );\n* // returns -1.0\n*\n* z = subarr.get( len-1 );\n* // returns \n*\n* re = real( z );\n* // returns 5.0\n*\n* im = imag( z );\n* // returns -5.0\n*\n* subarr = arr.subarray( 1, -2 );\n* // returns \n*\n* len = subarr.length;\n* // returns 2\n*\n* z = subarr.get( 0 );\n* // returns \n*\n* re = real( z );\n* // returns 2.0\n*\n* im = imag( z );\n* // returns -2.0\n*\n* z = subarr.get( len-1 );\n* // returns \n*\n* re = real( z );\n* // returns 3.0\n*\n* im = imag( z );\n* // returns -3.0\n*/\nsetReadOnly( Complex128Array.prototype, 'subarray', function subarray( begin, end ) {\n\tvar offset;\n\tvar buf;\n\tvar len;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tbuf = this._buffer;\n\tlen = this._length;\n\tif ( arguments.length === 0 ) {\n\t\tbegin = 0;\n\t\tend = len;\n\t} else {\n\t\tif ( !isInteger( begin ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. First argument must be an integer. Value: `%s`.', begin ) );\n\t\t}\n\t\tif ( begin < 0 ) {\n\t\t\tbegin += len;\n\t\t\tif ( begin < 0 ) {\n\t\t\t\tbegin = 0;\n\t\t\t}\n\t\t}\n\t\tif ( arguments.length === 1 ) {\n\t\t\tend = len;\n\t\t} else {\n\t\t\tif ( !isInteger( end ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be an integer. Value: `%s`.', end ) );\n\t\t\t}\n\t\t\tif ( end < 0 ) {\n\t\t\t\tend += len;\n\t\t\t\tif ( end < 0 ) {\n\t\t\t\t\tend = 0;\n\t\t\t\t}\n\t\t\t} else if ( end > len ) {\n\t\t\t\tend = len;\n\t\t\t}\n\t\t}\n\t}\n\tif ( begin >= len ) {\n\t\tlen = 0;\n\t\toffset = buf.byteLength;\n\t} else if ( begin >= end ) {\n\t\tlen = 0;\n\t\toffset = buf.byteOffset + ( begin*BYTES_PER_ELEMENT );\n\t} else {\n\t\tlen = end - begin;\n\t\toffset = buf.byteOffset + ( begin*BYTES_PER_ELEMENT );\n\t}\n\treturn new this.constructor( buf.buffer, offset, ( len < 0 ) ? 0 : len );\n});\n\n/**\n* Returns a new typed array containing the elements in reversed order.\n*\n* @name toReversed\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Complex128Array} reversed array\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* var arr = new Complex128Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var out = arr.toReversed();\n* // returns \n*\n* var z = out.get( 0 );\n* // returns \n*\n* var re = real( z );\n* // returns 3.0\n*\n* var im = imag( z );\n* // returns 3.0\n*\n* z = out.get( 1 );\n* // returns \n*\n* re = real( z );\n* // returns 2.0\n*\n* im = imag( z );\n* // returns 2.0\n*\n* z = out.get( 2 );\n* // returns \n*\n* re = real( z );\n* // returns 1.0\n*\n* im = imag( z );\n* // returns 1.0\n*/\nsetReadOnly( Complex128Array.prototype, 'toReversed', function toReversed() {\n\tvar outbuf;\n\tvar out;\n\tvar len;\n\tvar buf;\n\tvar i;\n\tvar j;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tlen = this._length;\n\tout = new this.constructor( len );\n\tbuf = this._buffer;\n\toutbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\tfor ( i = 0; i < len; i++ ) {\n\t\tj = len - i - 1;\n\t\toutbuf[ (2*i) ] = buf[ (2*j) ];\n\t\toutbuf[ (2*i)+1 ] = buf[ (2*j)+1 ];\n\t}\n\treturn out;\n});\n\n/**\n* Serializes an array as a string.\n*\n* @name toString\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @throws {TypeError} `this` must be a complex number array\n* @returns {string} string representation\n*\n* @example\n* var arr = new Complex128Array( 2 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n*\n* var str = arr.toString();\n* // returns '1 + 1i,2 + 2i'\n*/\nsetReadOnly( Complex128Array.prototype, 'toString', function toString() {\n\tvar out;\n\tvar buf;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tout = [];\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tout.push( getComplex128( buf, i ).toString() );\n\t}\n\treturn out.join( ',' );\n});\n\n/**\n* Returns a new typed array with the element at a provided index replaced with a provided value.\n*\n* @name with\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {integer} index - element index\n* @param {ComplexLike} value - new value\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be an integer\n* @throws {RangeError} index argument is out-of-bounds\n* @throws {TypeError} second argument must be a complex number\n* @returns {Complex128Array} new typed array\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n* import Complex128 from '@stdlib/complex-float64';\n*\n* var arr = new Complex128Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var out = arr.with( 0, new Complex128( 4.0, 4.0 ) );\n* // returns \n*\n* var z = out.get( 0 );\n* // returns \n*\n* var re = real( z );\n* // returns 4.0\n*\n* var im = imag( z );\n* // returns 4.0\n*/\nsetReadOnly( Complex128Array.prototype, 'with', function copyWith( index, value ) {\n\tvar buf;\n\tvar out;\n\tvar len;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isInteger( index ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be an integer. Value: `%s`.', index ) );\n\t}\n\tlen = this._length;\n\tif ( index < 0 ) {\n\t\tindex += len;\n\t}\n\tif ( index < 0 || index >= len ) {\n\t\tthrow new RangeError( format( 'invalid argument. Index argument is out-of-bounds. Value: `%s`.', index ) );\n\t}\n\tif ( !isComplexLike( value ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Second argument must be a complex number. Value: `%s`.', value ) );\n\t}\n\tout = new this.constructor( this._buffer );\n\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\tbuf[ 2*index ] = real( value );\n\tbuf[ (2*index)+1 ] = imag( value );\n\treturn out;\n});\n\n\n// EXPORTS //\n\nexport default Complex128Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport real from '@stdlib/complex-real';\nimport imag from '@stdlib/complex-imag';\n\n\n// MAIN //\n\n/**\n* Returns a strided array of real and imaginary components.\n*\n* @private\n* @param {Float64Array} buf - output array\n* @param {Array} arr - array containing complex numbers\n* @returns {(Float64Array|null)} output array or null\n*/\nfunction fromArray( buf, arr ) {\n\tvar len;\n\tvar v;\n\tvar i;\n\tvar j;\n\n\tlen = arr.length;\n\tj = 0;\n\tfor ( i = 0; i < len; i++ ) {\n\t\tv = arr[ i ];\n\t\tif ( !isComplexLike( v ) ) {\n\t\t\treturn null;\n\t\t}\n\t\tbuf[ j ] = real( v );\n\t\tbuf[ j+1 ] = imag( v );\n\t\tj += 2; // stride\n\t}\n\treturn buf;\n}\n\n\n// EXPORTS //\n\nexport default fromArray;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isArrayLikeObject from '@stdlib/assert-is-array-like-object';\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport format from '@stdlib/string-format';\nimport real from '@stdlib/complex-real';\nimport imag from '@stdlib/complex-imag';\n\n\n// MAIN //\n\n/**\n* Returns an array of iterated values.\n*\n* @private\n* @param {Object} it - iterator\n* @param {Function} clbk - callback to invoke for each iterated value\n* @param {*} thisArg - invocation context\n* @returns {(Array|TypeError)} array or an error\n*/\nfunction fromIteratorMap( it, clbk, thisArg ) {\n\tvar out;\n\tvar v;\n\tvar z;\n\tvar i;\n\n\tout = [];\n\ti = -1;\n\twhile ( true ) {\n\t\tv = it.next();\n\t\tif ( v.done ) {\n\t\t\tbreak;\n\t\t}\n\t\ti += 1;\n\t\tz = clbk.call( thisArg, v.value, i );\n\t\tif ( isArrayLikeObject( z ) && z.length >= 2 ) {\n\t\t\tout.push( z[ 0 ], z[ 1 ] );\n\t\t} else if ( isComplexLike( z ) ) {\n\t\t\tout.push( real( z ), imag( z ) );\n\t\t} else {\n\t\t\treturn new TypeError( format( 'invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', z ) );\n\t\t}\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default fromIteratorMap;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport Float64Array from '@stdlib/array-float64';\nimport Float32Array from '@stdlib/array-float32';\nimport Int16Array from '@stdlib/array-int16';\nimport Int32Array from '@stdlib/array-int32';\nimport Int8Array from '@stdlib/array-int8';\nimport Uint16Array from '@stdlib/array-uint16';\nimport Uint32Array from '@stdlib/array-uint32';\nimport Uint8Array from '@stdlib/array-uint8';\nimport Uint8ClampedArray from '@stdlib/array-uint8c';\nimport Complex64Array from '@stdlib/array-complex64';\nimport Complex128Array from '@stdlib/array-complex128';\n\n\n// MAIN //\n\n// Mapping from data types to constructors...\nvar ctors = {\n\t'float64': Float64Array,\n\t'float32': Float32Array,\n\t'generic': Array, // TODO: replace with `stdlib` pkg\n\t'int16': Int16Array,\n\t'int32': Int32Array,\n\t'int8': Int8Array,\n\t'uint16': Uint16Array,\n\t'uint32': Uint32Array,\n\t'uint8': Uint8Array,\n\t'uint8c': Uint8ClampedArray,\n\t'complex64': Complex64Array,\n\t'complex128': Complex128Array\n};\n\n\n// EXPORTS //\n\nexport default ctors;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Returns default array settings.\n*\n* @returns {Object} defaults\n*\n* @example\n* var o = defaults();\n* // returns {...}\n*/\nfunction defaults() {\n\treturn {\n\t\t// Data types:\n\t\t'dtypes': {\n\t\t\t'default': 'float64',\n\t\t\t'numeric': 'float64',\n\t\t\t'real': 'float64',\n\t\t\t'floating_point': 'float64',\n\t\t\t'real_floating_point': 'float64',\n\t\t\t'complex_floating_point': 'complex128',\n\t\t\t'boolean': 'bool',\n\t\t\t'integer': 'int32',\n\t\t\t'signed_integer': 'int32',\n\t\t\t'unsigned_integer': 'uint32'\n\t\t}\n\t};\n}\n\n\n// EXPORTS //\n\nexport default defaults;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport defaults from './main.js';\n\n\n// VARIABLES //\n\nvar DEFAULTS = defaults();\nvar HASH = {\n\t'dtypes.default': DEFAULTS.dtypes.default,\n\t'dtypes.numeric': DEFAULTS.dtypes.numeric,\n\t'dtypes.real': DEFAULTS.dtypes.real,\n\t'dtypes.floating_point': DEFAULTS.dtypes.floating_point,\n\t'dtypes.real_floating_point': DEFAULTS.dtypes.real_floating_point,\n\t'dtypes.complex_floating_point': DEFAULTS.dtypes.complex_floating_point,\n\t'dtypes.boolean': DEFAULTS.dtypes.boolean,\n\t'dtypes.integer': DEFAULTS.dtypes.integer,\n\t'dtypes.signed_integer': DEFAULTS.dtypes.signed_integer,\n\t'dtypes.unsigned_integer': DEFAULTS.dtypes.unsigned_integer\n};\n\n\n// MAIN //\n\n/**\n* Returns a default array setting.\n*\n* @param {string} name - setting name\n* @returns {*} default setting or null\n*\n* @example\n* var v = get( 'dtypes.default' );\n* // returns \n*/\nfunction get( name ) {\n\tvar v = HASH[ name ];\n\treturn ( v === void 0 ) ? null : v;\n}\n\n\n// EXPORTS //\n\nexport default get;\n","/**\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* Return default array settings.\n*\n* @module @stdlib/array-defaults\n*\n* @example\n* import defaults from '@stdlib/array-defaults';\n*\n* var o = defaults();\n* // returns {...}\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport get from './get.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'get', get );\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isNonNegativeInteger } from '@stdlib/assert-is-nonnegative-integer';\nimport ctors from '@stdlib/array-ctors';\nimport gzeros from '@stdlib/array-base-zeros';\nimport defaults from '@stdlib/array-defaults';\nimport format from '@stdlib/string-format';\n\n\n// VARIABLES //\n\nvar DEFAULT_DTYPE = defaults.get( 'dtypes.default' );\n\n\n// MAIN //\n\n/**\n* Creates a zero-filled array having a specified length.\n*\n* @param {NonNegativeInteger} length - array length\n* @param {string} [dtype=\"float64\"] - data type\n* @throws {TypeError} first argument must be a nonnegative integer\n* @throws {TypeError} second argument must be a recognized data type\n* @returns {(TypedArray|Array|ComplexArray)} array or typed array\n*\n* @example\n* var arr = zeros( 2 );\n* // returns [ 0.0, 0.0 ]\n*\n* @example\n* var arr = zeros( 2, 'float32' );\n* // returns [ 0.0, 0.0 ]\n*/\nfunction zeros( length ) {\n\tvar dtype;\n\tvar ctor;\n\tif ( !isNonNegativeInteger( length ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a nonnegative integer. Value: `%s`.', length ) );\n\t}\n\tif ( arguments.length > 1 ) {\n\t\tdtype = arguments[ 1 ];\n\t} else {\n\t\tdtype = DEFAULT_DTYPE;\n\t}\n\tif ( dtype === 'generic' ) {\n\t\treturn gzeros( length );\n\t}\n\tctor = ctors( dtype );\n\tif ( ctor === null ) {\n\t\tthrow new TypeError( format( 'invalid argument. Second argument must be a recognized data type. Value: `%s`.', dtype ) );\n\t}\n\treturn new ctor( length ); // WARNING: we assume that, apart from 'generic', the constructors for supported array data types are zero-filled by default\n}\n\n\n// EXPORTS //\n\nexport default zeros;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Returns a filled \"generic\" array.\n*\n* @param {*} value - fill value\n* @param {NonNegativeInteger} len - array length\n* @returns {Array} filled array\n*\n* @example\n* var out = filled( 0.0, 3 );\n* // returns [ 0.0, 0.0, 0.0 ]\n*\n* @example\n* var out = filled( 'beep', 3 );\n* // returns [ 'beep', 'beep', 'beep' ]\n*/\nfunction filled( value, len ) {\n\tvar arr;\n\tvar i;\n\n\t// Manually push elements in order to ensure \"fast\" elements...\n\tarr = [];\n\tfor ( i = 0; i < len; i++ ) {\n\t\tarr.push( value );\n\t}\n\treturn arr;\n}\n\n\n// EXPORTS //\n\nexport default filled;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport filled from '@stdlib/array-base-filled';\n\n\n// MAIN //\n\n/**\n* Returns a zero-filled \"generic\" array.\n*\n* @param {NonNegativeInteger} len - array length\n* @returns {Array} output array\n*\n* @example\n* var out = zeros( 3 );\n* // returns [ 0.0, 0.0, 0.0 ]\n*/\nfunction zeros( len ) {\n\treturn filled( 0.0, len );\n}\n\n\n// EXPORTS //\n\nexport default zeros;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport table from './ctors.js';\n\n\n// MAIN //\n\n/**\n* Returns an array constructor.\n*\n* @param {string} dtype - data type\n* @returns {(Function|null)} constructor or null\n*\n* @example\n* var ctor = ctors( 'float64' );\n* // returns \n*\n* @example\n* var ctor = ctors( 'float' );\n* // returns null\n*/\nfunction ctors( dtype ) {\n\treturn table[ dtype ] || null;\n}\n\n\n// EXPORTS //\n\nexport default ctors;\n","/**\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// MODULES //\n\nimport zeros from '@stdlib/array-zeros';\n\n\n// MAIN //\n\n/**\n* Creates an uninitialized array having a specified length.\n*\n* @private\n* @param {NonNegativeInteger} length - array length\n* @param {string} [dtype=\"float64\"] - data type\n* @throws {TypeError} first argument must be a nonnegative integer\n* @throws {TypeError} second argument must be a recognized data type\n* @returns {(TypedArray|Array|ComplexArray)} array or typed array\n*\n* @example\n* var arr = empty( 2 );\n* // returns \n*\n* @example\n* var arr = empty( 2, 'float32' );\n* // returns \n*/\nfunction empty( length ) {\n\tif ( arguments.length > 1 ) {\n\t\treturn zeros( length, arguments[ 1 ] );\n\t}\n\treturn zeros( length );\n}\n\n\n// EXPORTS //\n\nexport default empty;\n"],"names":["main","Object","defineProperty","isNumber","value","zeros","n","i","out","zeroPad","str","width","right","negative","pad","length","startsWithMinus","substr","lowercase","String","prototype","toLowerCase","uppercase","toUpperCase","formatInteger","token","base","specifier","arg","parseInt","isFinite","Error","toString","precision","padRight","sign","alternate","call","charAt","abs","Math","replace","RE_EXP_POS_DIGITS","RE_EXP_NEG_DIGITS","RE_ONLY_DIGITS","RE_DIGITS_BEFORE_EXP","RE_TRAILING_PERIOD_ZERO","RE_PERIOD_ZERO_EXP","RE_ZERO_BEFORE_EXP","formatDouble","digits","f","parseFloat","toExponential","toFixed","toPrecision","spaces","fromCharCode","isArray","Array","isnan","initialize","flags","mapping","formatInterpolate","tokens","hasPeriod","flag","num","pos","j","TypeError","padZeros","indexOf","arguments","maxWidth","substring","RE","parse","match","formatTokenize","content","prev","exec","slice","lastIndex","push","format","args","tokenize","interpolate","apply","objectProtoype","toStr","defineGetter","__defineGetter__","defineSetter","__defineSetter__","lookupGetter","__lookupGetter__","lookupSetter","__lookupSetter__","err","hasDefinePropertySupport","builtin","obj","prop","descriptor","hasValue","hasGet","hasSet","__proto__","get","set","defineProperty$1","setNonEnumerableReadOnly","configurable","enumerable","writable","FLG","Symbol","hasToStringTagSupport","toStringTag","has","hasOwnProperty","hasOwnProp","property","Sym","toStrTag","nativeClass","hasToStringTag","v","isOwn","tag","main$b","Number","test","isPrimitive","isObject","setReadOnly","FLOAT64_PINF","POSITIVE_INFINITY","FLOAT64_NINF","NEGATIVE_INFINITY","floor","isInteger","x","PINF","NINF","isInt","valueOf","isNonNegativeInteger","hasFloat64Array","Float64Array","ctor","Float64Array$1","bool","arr","GlobalFloat64Array","NaN","hasFloat64ArraySupport","hasFloat32Array","Float32Array","Float32Array$1","GlobalFloat32Array","hasFloat32ArraySupport","hasInt16Array","Int16Array","Int16Array$1","GlobalInt16Array","INT16_MAX","hasInt16ArraySupport","hasInt32Array","Int32Array","Int32Array$1","GlobalInt32Array","INT32_MAX","hasInt32ArraySupport","hasInt8Array","Int8Array","Int8Array$1","GlobalInt8Array","INT8_MAX","hasInt8ArraySupport","hasUint16Array","Uint16Array","Uint16Array$1","GlobalUint16Array","UINT16_MAX","hasUint16ArraySupport","hasUint32Array","Uint32Array","Uint32Array$1","GlobalUint32Array","UINT32_MAX","hasUint32ArraySupport","hasUint8Array","Uint8Array","Uint8Array$1","GlobalUint8Array","UINT8_MAX","hasUint8ArraySupport","hasUint8ClampedArray","Uint8ClampedArray","Uint8ClampedArray$1","GlobalUint8ClampedArray","hasUint8ClampedArraySupport","MAX_ARRAY_LENGTH","isArrayLikeObject","MAX_LENGTH","MAX_TYPED_ARRAY_LENGTH","isCollection","hasArrayBuffer","ArrayBuffer","isArrayBuffer","main$1","isString","isBoolean","Bool","Boolean","self","window","global","globalThis","root","codegen","Function","GlobalThis","Self","Win","Global","getGlobal","nodeList","document","childNodes","typedarray","reFunctionName","RE_FUNCTION_NAME","isObjectLike","constructorName","name","constructor","_isBuffer","isBuffer","REGEXP","predicate","len","arrayfun","ctorName","type","isFunction","typeOf","Complex128","real","imag","this","re","im","fround","FLOAT32_VIEW","float64ToFloat32$1","Complex64","float64ToFloat32","isComplexLike","isEven","BYTES_PER_ELEMENT","isComplex64Array","isComplex128Array","hasIteratorSymbolSupport","iterator","IteratorSymbol","setNonEnumerableReadOnlyAccessor","getter","realf","z","imagf","reinterpret","offset","buffer","byteOffset","GETTERS","float64","idx","float32","int32","int16","int8","uint32","uint16","uint8","uint8c","generic","default","dtype","complex128","complex64","fromIterator","it","next","done","HAS_ITERATOR_SYMBOL","isComplexArray","Complex64Array","_length","_buffer","isComplexArrayConstructor","getComplex64","buf","nargs","fromArray","RangeError","reinterpret64","reinterpret128","byteLength","ITERATOR_SYMBOL","src","thisArg","clbk","tmp","flg","accessorGetter","fromIteratorMap","setReadOnlyAccessor","target","start","copyWithin","iter","entries","end","fcn","searchElement","fromIndex","separator","sep","join","outbuf","reducer","initialValue","acc","N","sbuf","outlen","begin","index","Complex128Array","getComplex128","ctors","defaults","dtypes","numeric","floating_point","real_floating_point","complex_floating_point","boolean","integer","signed_integer","unsigned_integer","DEFAULTS","HASH","DEFAULT_DTYPE","filled","table","empty"],"mappings":";;AAsBA,IAAIA,E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EAAQ2D,UAAW,IAE3BrE,GAAOU,EACf","x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195]} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index 1862399..0000000 --- a/stats.html +++ /dev/null @@ -1,4842 +0,0 @@ - - - - - - - - Rollup Visualizer - - - -
- - - - - From 1e6b6928ce73575c4decd741cf276af114db2ce3 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sun, 1 Sep 2024 13:08:38 +0000 Subject: [PATCH 75/75] Auto-generated commit --- .editorconfig | 181 - .eslintrc.js | 1 - .gitattributes | 66 - .github/.keepalive | 1 - .github/PULL_REQUEST_TEMPLATE.md | 7 - .github/workflows/benchmark.yml | 64 - .github/workflows/cancel.yml | 57 - .github/workflows/close_pull_requests.yml | 54 - .github/workflows/examples.yml | 64 - .github/workflows/npm_downloads.yml | 112 - .github/workflows/productionize.yml | 794 ---- .github/workflows/publish.yml | 252 -- .github/workflows/test.yml | 99 - .github/workflows/test_bundles.yml | 186 - .github/workflows/test_coverage.yml | 133 - .github/workflows/test_install.yml | 85 - .gitignore | 190 - .npmignore | 229 - .npmrc | 31 - CHANGELOG.md | 242 - CITATION.cff | 30 - CODE_OF_CONDUCT.md | 3 - CONTRIBUTING.md | 3 - Makefile | 534 --- README.md | 38 +- SECURITY.md | 5 - benchmark/benchmark.js | 282 -- benchmark/benchmark.length.bool.js | 93 - benchmark/benchmark.length.complex128.js | 93 - benchmark/benchmark.length.complex64.js | 93 - benchmark/benchmark.length.float32.js | 93 - benchmark/benchmark.length.float64.js | 93 - benchmark/benchmark.length.generic.js | 93 - benchmark/benchmark.length.int16.js | 93 - benchmark/benchmark.length.int32.js | 93 - benchmark/benchmark.length.int8.js | 93 - benchmark/benchmark.length.uint16.js | 93 - benchmark/benchmark.length.uint32.js | 93 - benchmark/benchmark.length.uint8.js | 93 - benchmark/benchmark.length.uint8c.js | 93 - branches.md | 56 - dist/index.d.ts | 3 - dist/index.js | 9 - dist/index.js.map | 7 - docs/repl.txt | 35 - docs/types/test.ts | 78 - examples/index.js | 33 - lib/index.js | 58 - lib/is_buffer_uint8array.js | 47 - lib/main.js | 107 - lib/polyfill.js | 56 - docs/types/index.d.ts => mod.d.ts | 2 +- mod.js | 4 + mod.js.map | 1 + package.json | 84 +- stats.html | 4842 +++++++++++++++++++++ test/dist/test.js | 33 - test/test.js | 60 - test/test.main.js | 285 -- test/test.polyfill.js | 340 -- 60 files changed, 4860 insertions(+), 6232 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 benchmark/benchmark.js delete mode 100644 benchmark/benchmark.length.bool.js delete mode 100644 benchmark/benchmark.length.complex128.js delete mode 100644 benchmark/benchmark.length.complex64.js delete mode 100644 benchmark/benchmark.length.float32.js delete mode 100644 benchmark/benchmark.length.float64.js delete mode 100644 benchmark/benchmark.length.generic.js delete mode 100644 benchmark/benchmark.length.int16.js delete mode 100644 benchmark/benchmark.length.int32.js delete mode 100644 benchmark/benchmark.length.int8.js delete mode 100644 benchmark/benchmark.length.uint16.js delete mode 100644 benchmark/benchmark.length.uint32.js delete mode 100644 benchmark/benchmark.length.uint8.js delete mode 100644 benchmark/benchmark.length.uint8c.js 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/repl.txt delete mode 100644 docs/types/test.ts delete mode 100644 examples/index.js delete mode 100644 lib/index.js delete mode 100644 lib/is_buffer_uint8array.js delete mode 100644 lib/main.js delete mode 100644 lib/polyfill.js rename docs/types/index.d.ts => mod.d.ts (94%) create mode 100644 mod.js create mode 100644 mod.js.map create mode 100644 stats.html delete mode 100644 test/dist/test.js delete mode 100644 test/test.js delete mode 100644 test/test.main.js delete mode 100644 test/test.polyfill.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/.keepalive b/.github/.keepalive deleted file mode 100644 index 430a8b0..0000000 --- a/.github/.keepalive +++ /dev/null @@ -1 +0,0 @@ -2024-09-01T06:32:09.708Z diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index 96f81a8..0000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,7 +0,0 @@ - - -We are excited about your pull request, but unfortunately we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/empty) 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 ddb353e..0000000 --- a/.github/workflows/close_pull_requests.yml +++ /dev/null @@ -1,54 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Workflow name: -name: close_pull_requests - -# Workflow triggers: -on: - pull_request_target: - types: [opened] - -# Workflow jobs: -jobs: - - # Define job to close all pull requests: - run: - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Close pull request - - name: 'Close pull request' - # Pin action to full length commit SHA corresponding to v3.1.2 - uses: superbrothers/close-pull-request@9c18513d320d7b2c7185fb93396d0c664d5d8448 - with: - comment: | - Thank you for submitting a pull request. :raised_hands: - - We greatly appreciate your willingness to submit a contribution. However, we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). - - We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/empty) 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 8376c30..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: '49 1 * * 5' - - # 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 + + + + 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 8e62cb8..0000000 --- a/test/test.js +++ /dev/null @@ -1,60 +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 proxyquire = require( 'proxyquire' ); -var main = require( './../lib/main.js' ); -var polyfill = require( './../lib/polyfill.js' ); -var empty = require( './../lib' ); - - -// TESTS // - -tape( 'main export is a function', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof empty, 'function', 'main export is a function' ); - t.end(); -}); - -tape( 'if an environment supports Node.js buffer instances inheriting from Uint8Array, the main export supports returning arrays having uninitialized memory', function test( t ) { - var empty = proxyquire( './../lib', { - './is_buffer_uint8array.js': mock - }); - t.strictEqual( empty, main, 'returns expected value' ); - t.end(); - - function mock() { - return true; - } -}); - -tape( 'if an environment does not support Node.js buffer instances inheriting from Uint8Array, the main export supports returning zero-filled arrays', function test( t ) { - var empty = proxyquire( './../lib', { - './is_buffer_uint8array.js': mock - }); - t.strictEqual( empty, polyfill, 'returns expected value' ); - t.end(); - - function mock() { - return false; - } -}); diff --git a/test/test.main.js b/test/test.main.js deleted file mode 100644 index 73fce24..0000000 --- a/test/test.main.js +++ /dev/null @@ -1,285 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2024 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR 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 Float64Array = require( '@stdlib/array-float64' ); -var Float32Array = require( '@stdlib/array-float32' ); -var Int32Array = require( '@stdlib/array-int32' ); -var Uint32Array = require( '@stdlib/array-uint32' ); -var Int16Array = require( '@stdlib/array-int16' ); -var Uint16Array = require( '@stdlib/array-uint16' ); -var Int8Array = require( '@stdlib/array-int8' ); -var Uint8Array = require( '@stdlib/array-uint8' ); -var Uint8ClampedArray = require( '@stdlib/array-uint8c' ); -var Complex64Array = require( '@stdlib/array-complex64' ); -var Complex128Array = require( '@stdlib/array-complex128' ); -var BooleanArray = require( '@stdlib/array-bool' ); -var instanceOf = require( '@stdlib/assert-instance-of' ); -var empty = require( './../lib/main.js' ); - - -// TESTS // - -tape( 'main export is a function', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof empty, 'function', 'main export is a function' ); - t.end(); -}); - -tape( 'the function throws an error if provided a value other than a nonnegative integer for the first argument', function test( t ) { - var values; - var i; - - values = [ - '5', - -3, - 3.14, - NaN, - true, - false, - null, - void 0, - [], - {}, - function noop() {} - ]; - - for ( i = 0; i < values.length; i++ ) { - t.throws( badValue( values[i] ), TypeError, 'throws an error when provided '+values[i] ); - } - t.end(); - - function badValue( value ) { - return function badValue() { - empty( value ); - }; - } -}); - -tape( 'the function throws an error if provided a value other than a nonnegative integer for the first argument (dtype)', function test( t ) { - var values; - var i; - - values = [ - '5', - -3, - 3.14, - NaN, - true, - false, - null, - void 0, - [], - {}, - function noop() {} - ]; - - for ( i = 0; i < values.length; i++ ) { - t.throws( badValue( values[i] ), TypeError, 'throws an error when provided '+values[i] ); - } - t.end(); - - function badValue( value ) { - return function badValue() { - empty( value, 'float32' ); - }; - } -}); - -tape( 'the function throws an error if provided an unrecognized data type', function test( t ) { - var values; - var i; - - values = [ - '5', - 'beep', - 'empty', - 'Int32', - 'Uint32', - 'Int16', - 'Uint16', - 'Int8', - 'Uint8', - 'Uint8c', - 'uint8_clamped', - 'Float64', - 'Float32', - 'FLOAT64', - 'FLOAT32', - 'GENERIC' - ]; - - for ( i = 0; i < values.length; i++ ) { - t.throws( badValue( values[i] ), TypeError, 'throws an error when provided '+values[i] ); - } - t.end(); - - function badValue( value ) { - return function badValue() { - empty( 10, value ); - }; - } -}); - -tape( 'the function returns an empty array (default)', function test( t ) { - var arr; - - arr = empty( 5 ); - t.strictEqual( instanceOf( arr, Float64Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=float64)', function test( t ) { - var arr; - - arr = empty( 5, 'float64' ); - t.strictEqual( instanceOf( arr, Float64Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=float32)', function test( t ) { - var arr; - - arr = empty( 5, 'float32' ); - t.strictEqual( instanceOf( arr, Float32Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=bool)', function test( t ) { - var arr; - - arr = empty( 5, 'bool' ); - t.strictEqual( instanceOf( arr, BooleanArray ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=complex128)', function test( t ) { - var arr; - - arr = empty( 5, 'complex128' ); - t.strictEqual( instanceOf( arr, Complex128Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=complex64)', function test( t ) { - var arr; - - arr = empty( 5, 'complex64' ); - t.strictEqual( instanceOf( arr, Complex64Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=int32)', function test( t ) { - var arr; - - arr = empty( 5, 'int32' ); - t.strictEqual( instanceOf( arr, Int32Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=uint32)', function test( t ) { - var arr; - - arr = empty( 5, 'uint32' ); - t.strictEqual( instanceOf( arr, Uint32Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=int16)', function test( t ) { - var arr; - - arr = empty( 5, 'int16' ); - t.strictEqual( instanceOf( arr, Int16Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=uint16)', function test( t ) { - var arr; - - arr = empty( 5, 'uint16' ); - t.strictEqual( instanceOf( arr, Uint16Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=int8)', function test( t ) { - var arr; - - arr = empty( 5, 'int8' ); - t.strictEqual( instanceOf( arr, Int8Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=uint8)', function test( t ) { - var arr; - - arr = empty( 5, 'uint8' ); - t.strictEqual( instanceOf( arr, Uint8Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns an empty array (dtype=uint8c)', function test( t ) { - var arr; - - arr = empty( 5, 'uint8c' ); - t.strictEqual( instanceOf( arr, Uint8ClampedArray ), true, 'returns expected value' ); - t.strictEqual( arr.length, 5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=generic)', function test( t ) { - var expected; - var arr; - - expected = [ 0, 0, 0, 0, 0 ]; - - arr = empty( 5, 'generic' ); - t.strictEqual( instanceOf( arr, Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); diff --git a/test/test.polyfill.js b/test/test.polyfill.js deleted file mode 100644 index 4fc9472..0000000 --- a/test/test.polyfill.js +++ /dev/null @@ -1,340 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2024 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR 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 Float64Array = require( '@stdlib/array-float64' ); -var Float32Array = require( '@stdlib/array-float32' ); -var Int32Array = require( '@stdlib/array-int32' ); -var Uint32Array = require( '@stdlib/array-uint32' ); -var Int16Array = require( '@stdlib/array-int16' ); -var Uint16Array = require( '@stdlib/array-uint16' ); -var Int8Array = require( '@stdlib/array-int8' ); -var Uint8Array = require( '@stdlib/array-uint8' ); -var Uint8ClampedArray = require( '@stdlib/array-uint8c' ); -var Complex64Array = require( '@stdlib/array-complex64' ); -var Complex128Array = require( '@stdlib/array-complex128' ); -var BooleanArray = require( '@stdlib/array-bool' ); -var reinterpret64 = require( '@stdlib/strided-base-reinterpret-complex64' ); -var reinterpret128 = require( '@stdlib/strided-base-reinterpret-complex128' ); -var reinterpretBoolean = require( '@stdlib/strided-base-reinterpret-boolean' ); -var instanceOf = require( '@stdlib/assert-instance-of' ); -var empty = require( './../lib/polyfill.js' ); - - -// TESTS // - -tape( 'main export is a function', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof empty, 'function', 'main export is a function' ); - t.end(); -}); - -tape( 'the function throws an error if provided a value other than a nonnegative integer for the first argument', function test( t ) { - var values; - var i; - - values = [ - '5', - -3, - 3.14, - NaN, - true, - false, - null, - void 0, - [], - {}, - function noop() {} - ]; - - for ( i = 0; i < values.length; i++ ) { - t.throws( badValue( values[i] ), TypeError, 'throws an error when provided '+values[i] ); - } - t.end(); - - function badValue( value ) { - return function badValue() { - empty( value ); - }; - } -}); - -tape( 'the function throws an error if provided a value other than a nonnegative integer for the first argument (dtype)', function test( t ) { - var values; - var i; - - values = [ - '5', - -3, - 3.14, - NaN, - true, - false, - null, - void 0, - [], - {}, - function noop() {} - ]; - - for ( i = 0; i < values.length; i++ ) { - t.throws( badValue( values[i] ), TypeError, 'throws an error when provided '+values[i] ); - } - t.end(); - - function badValue( value ) { - return function badValue() { - empty( value, 'float32' ); - }; - } -}); - -tape( 'the function throws an error if provided an unrecognized data type', function test( t ) { - var values; - var i; - - values = [ - '5', - 'beep', - 'empty', - 'Int32', - 'Uint32', - 'Int16', - 'Uint16', - 'Int8', - 'Uint8', - 'Uint8c', - 'uint8_clamped', - 'Float64', - 'Float32', - 'FLOAT64', - 'FLOAT32', - 'GENERIC' - ]; - - for ( i = 0; i < values.length; i++ ) { - t.throws( badValue( values[i] ), TypeError, 'throws an error when provided '+values[i] ); - } - t.end(); - - function badValue( value ) { - return function badValue() { - empty( 10, value ); - }; - } -}); - -tape( 'the function returns a zero-filled array (default)', function test( t ) { - var expected; - var arr; - - expected = new Float64Array( [ 0.0, 0.0, 0.0, 0.0, 0.0 ] ); - - arr = empty( 5 ); - t.strictEqual( instanceOf( arr, Float64Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=float64)', function test( t ) { - var expected; - var arr; - - expected = new Float64Array( [ 0.0, 0.0, 0.0, 0.0, 0.0 ] ); - - arr = empty( 5, 'float64' ); - t.strictEqual( instanceOf( arr, Float64Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=float32)', function test( t ) { - var expected; - var arr; - - expected = new Float32Array( [ 0.0, 0.0, 0.0, 0.0, 0.0 ] ); - - arr = empty( 5, 'float32' ); - t.strictEqual( instanceOf( arr, Float32Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=bool)', function test( t ) { - var expected; - var arr; - - expected = new Uint8Array( [ 0, 0, 0, 0 ] ); - - arr = empty( 4, 'bool' ); - t.strictEqual( instanceOf( arr, BooleanArray ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( reinterpretBoolean( arr, 0 ), expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=complex128)', function test( t ) { - var expected; - var arr; - - expected = new Float64Array( [ 0.0, 0.0, 0.0, 0.0 ] ); - - arr = empty( 2, 'complex128' ); - t.strictEqual( instanceOf( arr, Complex128Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length/2, 'returns expected value' ); - t.deepEqual( reinterpret128( arr, 0 ), expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=complex64)', function test( t ) { - var expected; - var arr; - - expected = new Float32Array( [ 0.0, 0.0, 0.0, 0.0 ] ); - - arr = empty( 2, 'complex64' ); - t.strictEqual( instanceOf( arr, Complex64Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length/2, 'returns expected value' ); - t.deepEqual( reinterpret64( arr, 0 ), expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=int32)', function test( t ) { - var expected; - var arr; - - expected = new Int32Array( [ 0, 0, 0, 0, 0 ] ); - - arr = empty( 5, 'int32' ); - t.strictEqual( instanceOf( arr, Int32Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=uint32)', function test( t ) { - var expected; - var arr; - - expected = new Uint32Array( [ 0, 0, 0, 0, 0 ] ); - - arr = empty( 5, 'uint32' ); - t.strictEqual( instanceOf( arr, Uint32Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=int16)', function test( t ) { - var expected; - var arr; - - expected = new Int16Array( [ 0, 0, 0, 0, 0 ] ); - - arr = empty( 5, 'int16' ); - t.strictEqual( instanceOf( arr, Int16Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=uint16)', function test( t ) { - var expected; - var arr; - - expected = new Uint16Array( [ 0, 0, 0, 0, 0 ] ); - - arr = empty( 5, 'uint16' ); - t.strictEqual( instanceOf( arr, Uint16Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=int8)', function test( t ) { - var expected; - var arr; - - expected = new Int8Array( [ 0, 0, 0, 0, 0 ] ); - - arr = empty( 5, 'int8' ); - t.strictEqual( instanceOf( arr, Int8Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=uint8)', function test( t ) { - var expected; - var arr; - - expected = new Uint8Array( [ 0, 0, 0, 0, 0 ] ); - - arr = empty( 5, 'uint8' ); - t.strictEqual( instanceOf( arr, Uint8Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=uint8c)', function test( t ) { - var expected; - var arr; - - expected = new Uint8ClampedArray( [ 0, 0, 0, 0, 0 ] ); - - arr = empty( 5, 'uint8c' ); - t.strictEqual( instanceOf( arr, Uint8ClampedArray ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns a zero-filled array (dtype=generic)', function test( t ) { - var expected; - var arr; - - expected = [ 0, 0, 0, 0, 0 ]; - - arr = empty( 5, 'generic' ); - t.strictEqual( instanceOf( arr, Array ), true, 'returns expected value' ); - t.strictEqual( arr.length, expected.length, 'returns expected value' ); - t.deepEqual( arr, expected, 'returns expected value' ); - - t.end(); -});